Log

Author Commit Date CI Message
Ariadne Conill cef30268 2021-07-24T20:40:52 pkgconf 1.8.0.
Ariadne Conill a10a88ef 2021-07-24T20:39:29 tests: regress: disable sysroot_munge test for now, not working with distcheck
Ariadne Conill 2ed2b98e 2021-07-24T20:28:04 workflows: more distcheck fixes
Ariadne Conill 9b49eb22 2021-07-24T20:26:44 workflows: install xz package
Ariadne Conill 4d5b378f 2021-07-24T20:25:15 workflows: use distcheck instead of check for autotools tests
Ariadne Conill f3f71459 2021-07-24T20:19:46 NEWS: add updates for pkgconf 1.8.0
Ariadne Conill 78bcb171 2021-07-24T20:06:55 personality: do not perform path filtering on default SYSTEM_INCLUDE_PATHS and SYSTEM_LIBRARY_PATHS This is not consistent with the way the personality files or environment variables are handled. Fixes #224.
Ariadne Conill 4e73e37d 2021-07-24T19:56:46 meson: fix non-static build
Ariadne Conill ceece2c1 2021-07-24T19:47:33 pkg: fix up comment about issue #213 workaround
Ariadne Conill 76968a4f 2021-07-24T19:45:07 fix static builds on Windows with Meson Fixes #222
Sandro Mani ed86f2dd 2021-06-23T14:09:05 Don't prepend sysroot_dir if pkg-config file lies outside of sysroot_dir
Ariadne Conill 9ea26eb9 2021-07-24T19:37:41 README: expand on the pkg-config compatibility promise A bunch of CMake developers, who apparently did not comprehend the previous compatibility promise statement, decided to passive-aggressively demand we fix their non-bug anyway. Clarify in more detail what level of pkg-config compatibility we provide, and mention that such passive-aggressive behaviour is considered a CoC violation. Fixes #228.
Stone Tickle fa859bb0 2021-06-11T15:01:10 close error_msgout if opened
Stone Tickle dba26000 2021-06-11T15:00:58 deinit personality in cli
Stone Tickle d688a7bd 2021-06-11T15:00:47 implement pkgconf_cross_personality_deinit
midipix 13fe4c8c 2021-06-13T18:38:18 pkgconf_pkg_parser_value_set(): fix code-path ordering bug. Prior to this commit, the code path responsible for prefix redefinition (motivated by --define-prefix or otherwise) was visited more than once, specifically since the check ignored pkg->owner->prefix_varname.
Ariadne Conill 1f319c26 2021-05-19T05:52:27 we are moving to OFTC
orbea 2fdc5f00 2021-03-29T07:15:30 man: Document the --validate option.
Christoph Reiter 4f73f6a1 2021-03-20T11:01:14 Rework path handling on native Windows The current approach was to parse the .pc and, detect the prefix, throw everything together and at the end replace all \ with / to not produce invalid escape sequences. This has the problem that escaping in .pc files is ignored and no longer possible. Also in case the prefix path has a space in it the result would be invalid because of missing escaping. This changes the following things: * We no longer normalize values at the end. Instead we assume .pc files use "/" as a directory separator or "\\", same format as under Unix. "\" alone no longer works. This shouldn't be a problem since most build tools produce .pc files with "/" like meson, cmake, autotools. * When injecting the prefix at runtime we convert the prefix to use "/" and escape spaces so that in combination with the .pc content the result is a valid escaped path value again. This patch has been used in MSYS2 for some months now. See #212
Christoph Reiter 4be39c59 2021-03-19T16:59:02 Remove usage of cygwin_conv_path() under cygwin/msys This converted Unix paths to Windows paths, but all cygwin tools work with Unix paths so this shouldn't be needed. There is one use case if you use a cygwin pkgconf with a non-cygwin toolchain, but pkgconf works reasonable well natively now so this shouldn't be needed anymore and more likely leads to problems and confusion. Both cygwin and msys have patched this out already: * https://cygwin.com/git-cygwin-packages/?p=git/cygwin-packages/pkgconf.git;a=blob;f=pkgconf.cygport;h=e5d003f3f3dfc9e374b916974018022ad8d68852;hb=HEAD#l55 * https://github.com/msys2/MSYS2-packages/blob/a4bce0c2943109e7d06c8660d91b89065eb09bea/pkgconf/PKGBUILD#L26
Ariadne Conill 458101e7 2021-03-18T07:03:28 pkgconf 1.7.4.
Ariadne Conill dbb6a232 2021-03-18T06:56:55 path: don't use PATH_MAX, use PKGCONF_ITEM_SIZE * 4 for realpath buffer
Ariadne Conill a4e8cf87 2021-03-18T06:52:55 remove sourcehut CI config
Ariadne Conill 9f6b2ced 2021-03-18T06:52:31 README: use github CI badge
Ariadne Conill 37b596cc 2021-03-18T06:49:16 CI: fix alpine autotools CI
Ariadne Conill caaf4861 2021-03-18T06:48:07 CI: fix alpine CI
Ariadne Conill 00cc9a8c 2021-03-18T06:46:09 CI: add alpine CI alongside debian CI
Ariadne Conill 599dfcb2 2021-03-18T06:42:57 main: extend copyright notice to 2021
Ariadne Conill 402fd9fe 2021-03-18T06:38:24 add funding.yml
Ariadne Conill fd1b8ccc 2021-03-18T06:22:11 main: if PKG_CONFIG_FDO_SYSROOT_RULES is set, or DESTDIR matches PKG_CONFIG_SYSROOT_DIRS, disable the automatic sysroot rewriting Closes #205.
Ariadne Conill b6c8f6fb 2021-03-18T06:05:48 NEWS: document --static --pure default on Windows (closes #207)
Ariadne Conill 008d7069 2021-03-18T06:03:32 libpkgconf: personality: default: set want_default_static and want_default_pure to true on windows
Ariadne Conill f9531ce9 2021-03-18T05:59:54 add support for pkgconf_cross_personality_t.want_default_pure
Ariadne Conill 52d19e1b 2021-03-18T05:44:45 libpkgconf: fileio: pkgconf_fgetline(): handle quoted=true when a comment introduction is encountered Fixes #215.
Ariadne Conill 347281eb 2021-03-18T05:38:47 tests: add fragment-comment testcase (ref #215)
Jeff Moguillansky dcf529b8 2021-02-06T10:57:20 cli: add environment variable PKG_CONFIG_DONT_DEFINE_PREFIX On Windows, pkgconf redefines the prefix by default. This gives the user the option to disable this behavior via an environment variable. The benefit of an environment variable is the user can change this behavior when using a build system such as cmake or meson, which may not expose this parameter to the user.
Ryan Scott ab404bc2 2021-02-03T06:54:52 Fix #209 This commit fixes #209 by applying the suggestion from https://github.com/pkgconf/pkgconf/issues/209#issuecomment-771609136.
Fabian Groffen 13a5d9a5 2021-01-08T10:56:41 libpkgconf: path: supply buffer to realpath To avoid a crash on some platforms (like Darwin 9) provide a buffer to realpath(3). Darwin 9 (last PPC target) documents realpath needs to be given a buffer to the resolved_path argument large enough to hold PATH_MAX bytes. With NULL argument it crashes. Solaris makes no mention of resolved_path to be allowed NULL, yet recent versions accept it and malloc(3) accordingly. Because the documentation explicitly mentions PATH_MAX being the limit to what realpath(3) would write in resolved_path, switching to a static buffer here doesn't limit resolution compared to dynamically allocating a buffer by realpath(3). While this change requires a bit more space on the stack, it avoids a malloc/free sequence, and allows successful operation on (older) platforms that lack support for dynamically allocating a return buffer in realpath(3). Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Christoph Reiter 78a77dd4 2020-11-28T15:22:28 meson: install README.md/AUTHORS to share/doc/pkgconf To mirror what the autotools build does.
Christoph Reiter 0526364b 2020-11-28T15:21:02 meson: allow building a static version of libpkgconf when using library() instead of shared_library() the user can decide to build a shared or static version, or both. The default is still shared as before. This mirrors what the autotools based build sysstem can do.
Christoph Reiter a69bdfa2 2020-11-28T15:20:25 meson: generate a .pc file for libpkgconf
Christoph Reiter de8fc9e4 2020-11-28T15:19:41 meson: install headers into pkgconf/libpkgconf instead of just libpkgconf To mirror what the autotools build does
Christoph Reiter 869f2a84 2020-11-28T16:01:16 pkgconf_pkg_parser_version_func: fix whitespace detection In case the version string has no whitespace then strcspn() returns strlen() of the input, so whitespace is only found if len != strlen. This fixes invalid warnings when parsing version fields.
Christoph Reiter b218cae5 2020-11-23T17:45:16 Add CI for debian+meson/autotools Builds and runs tests. Using Debian testing since the test framework is only in testing right now.
Christoph Reiter 24589cdd 2020-11-22T19:59:19 Add basic CI for mingw-w64 32/64 bit This only builds things with meson and no tests are run.
Ariadne Conill f418b997 2020-11-21T09:59:58 configure: shift issue tracking back to github
orbea bd960e9d 2020-08-09T19:00:52 man: Silence pkgconf-personality.5 warning. man: ./pkgconf-personality.5:97:2: WARNING: unusual Xr order: pc(5) after pkg.m4(7)
Ariadne Conill 1eeb4ee5 2020-06-11T18:03:42 start NEWS for 1.7.4
Ariadne Conill 2a8bebf2 2020-06-11T18:00:56 libpkgconf: path: rewrite DOS paths in non-cygwin case too
Tobias Stoeckmann 262a0c96 2020-06-03T21:50:27 man: pkgconf: fixed typo Fixed typo in it's vs its.
Tobias Stoeckmann f818a69b 2020-06-03T21:42:25 libpkgconf: pkg: fix out ouf boundary access If a file with a matching "uninstalled" name exists but cannot be parsed, an invalid memory area is accessed. How to reproduce: $ touch poc-uninstalled.pc $ PKG_CONFIG_PATH=. pkgconf poc
Ariadne Conill ef135d81 2020-06-02T18:58:00 meson: remove some autotools cruft
Ariadne Conill aca06748 2020-05-30T19:17:12 pkgconf 1.7.3.
Ariadne Conill 40726b14 2020-05-30T19:09:59 update NEWS
Ariadne Conill 354c8727 2020-05-30T19:19:48 libpkgconf: tuple: fix truncation when no overflow occurs
Tobias Stoeckmann 5eb9cae0 2020-05-31T00:25:54 libpkgconf: tuple: fix out of boundary write This is the same issue which has been fixed in dependency code. If a line contains a variable which is longer than PKGCONF_ITEM_SIZE, then the varname buffer overflows. The code itself still does not check if a closing } exists and truncates variable names which are too long. Since these would be functional changes and this commit is about a protection against undefined behaviour on a language level, these changes are not included. Proof of concept: $ echo "Description: poc" > poc.pc $ echo "Version: 1" >> poc.pc $ echo -n 'Name: ${' $ dd if=/dev/zero bs=1 count=66535 | tr '\0' 'x' >> poc.pc $ echo >> poc.pc $ pkgconf poc.pc On my Linux system, when compiled with gcc, the varname buffer overflows directly into buf, which means that no crash can be notified. It's easiest to figure out when adding strlen() and sizeof() output as debug lines.
Tobias Stoeckmann 100bc605 2020-05-30T23:48:40 libpkgconf: fragment: fix out of boundary write fragment_quote adds quotation to fragments if needed. It allocates a buffer and grows it as needed. Unfortunately the dst pointer is not updated after a realloc, which means that dst still points into the old memory area. Further writing characters into that area leads to out of boundy writes. Proof of concept: $ cat > poc.pc << EOF Name: poc Description: poc Version: 1 CFlags: -Ia CFlags: -I%%%%%%%%%%%%%%%%%%%%b CFlags: -I%%%%%%%%%%%%%%%%%%%%c CFlags: -Id EOF $ pkgconf --cflags poc.pc Most reliable attempt is to compile pkgconf with address sanitizer, but this file should lead to an abort on a glibc system due to modified chunk pointers (tested with Linux on amd64). But since this is undefined behaviour, it depends on system details.
Ariadne Conill 7bd08a51 2020-05-30T12:41:47 update NEWS
Tobias Stoeckmann dc04193c 2020-05-29T19:35:42 libpkgconf: fragment: fix out of boundary read Parsing a fragment which consists only of a single dash leads to an out of boundary read. It duplicates the following entry which is not expected behaviour if another fragment follows. Proof of concept: $ cat > poc.pc << "EOF" Name: poc Description: poc Version: 1 Cflags: - -I/somewhere EOF $ PKG_CONFIG_PATH=. pkgconf --cflags poc -I/somewhere -I/somewhere If - is the last entry, it leads to an out of boundary read, which is easy to see if pkgconf is compiled with address sanitizer.
Vincent Torri 42b35531 2020-05-30T12:39:43 fix missing backslashes in paths on Windows According to https://docs.microsoft.com/fr-fr/windows/win32/fileio/naming-a-file backslashes (with slashes) are a path separator, hence must no be considered as an escape code. The first fix, in argvsplit.c, disables this. But because of fragment_quote(), the backslashes are doubled. Hence the second fix in fragment.c With this pc file : prefix=C:/Documents/msys2/opt/efl_64 libdir=${prefix}/lib includedir=${prefix}/include Name: eina Description: efl: eina Version: 1.24.99 Requires.private: iconv Libs: -L${libdir} -leina -pthread -levil Libs.private: -lpsapi -lole32 -lws2_32 -lsecur32 -luuid -lregex -lm Cflags:-I${includedir}/eina-1 -I${includedir}/efl-1 -I${includedir}/eina-1/eina -pthread pkgconf.exe --cflags eina returns : -IC:\Documents\msys2\opt\efl_64/include/eina-1 -IC:\Documents\msys2\opt\efl_64/include/efl-1 -IC:\Documents\msys2\opt\efl_64/include/eina-1/eina -pthread -DWINICONV_CONST= -IC:\Documents\msys2\opt\ewpi_64/include
Ariadne Conill e3e89926 2020-05-26T14:04:34 start NEWS for 1.7.3
Tobias Stoeckmann fb9acedc 2020-05-26T21:42:13 libpkgconf: dependency: fix out of boundary write It is possible to trigger an out of boundary write in function pkgconf_dependency_parse_str if a dependency line contains a very long comparator. The comparator is stored in a temporary buffer which has a size of PKGCONF_ITEM_SIZE. The line which is parsed can be up to PKGCONF_BUFSIZE characters long, which is larger than PKGCONF_ITEM_SIZE (although it depends on PATH_MAX). Having a comparator which is longer than PKGCONF_ITEM_SIZE therefore leads to an out of boundary write. Although it is undefined behaviour, this can lead to an overridden compare variable, which in turn can lead to an invalid instruction pointer, i.e. most likely a crash or code execution (very unlikely). Proof of concept: $ echo "Requires: x " > poc.pc $ dd if=/dev/zero bs=1 count=65535 | tr '\0' '<' >> poc.pc $ pkgconf poc.pc Eiter compile pkgconf with address sanitizer or run pkgconf multiple times, eventually it might crash (assuming that ASLR is in place). In order to fix this, I decided to use an end pointer to avoid OOB write. Alternative would be to increase the buffer size, but I try to avoid that since this would be additional ~60 KB stack space for a very unlikely situation.
Ariadne Conill c6b93941 2020-05-26T13:46:20 pkgconf 1.7.2.
Ariadne Conill c613eb5c 2020-05-26T13:41:39 libpkgconf: pkg: use a second pointer for demunging windows paths
Ariadne Conill 92b09aef 2020-05-26T11:06:35 pkgconf 1.7.1.
Ariadne Conill e70b536e 2020-05-26T11:01:46 libpkgconf: pkg: when generating a search path, use the correct path separator Before, this could result in generated paths like C:\foo\pkgconfig/bar.pc on Windows.
Ariadne Conill 47466470 2020-05-26T10:57:51 main: extend copyright statement to 2020 in --about
Ariadne Conill ee1fe1a7 2020-05-26T07:49:15 update NEWS for 1.7.1 changes so far
Ariadne Conill 0253fddc 2020-05-26T07:41:16 libpkgconf: pkg: fix computation of pkgconf_pkg_t.id on Windows. Windows allows both \ and / as valid path characters. A computed path such as C:\development\libfoo\pkgconfig/foo.pc will result in a computed pkgconf_pkg_t.id of "pkgconfig/foo". Accordingly, correct the path normalization for checking for / after the \ path has been dealt with in all cases.
Neal Gompa be6b382d 2020-05-25T07:56:05 Makefile.am: Add remaining Meson files to be included in dist tarballs The tarballs produced by 'make distcheck' did not include all files required for using Meson because they were not all enumerated in EXTRA_DIST. This change adds the remaining Meson files to the tarball.
Tobias Stoeckmann 9e16d270 2020-05-24T23:13:19 libpkgconf: personality: fix out of boundary access It is possible to set the instruction pointer to undefined values by using an operator larger than ':' in ASCII. Since the personality function array does not have 256 entries, an invalid operator can overflow the array. Proof of concept: $ echo "a _ b" > poc $ ln -s $(which pkgconf) poc-pkgconf $ ./poc-pkgconf
Ariadne Conill dd57abfe 2020-05-24T14:44:01 pkgconf 1.7.0.
Ariadne Conill 82d57184 2020-05-24T14:53:37 meson: fix detection of strndup() on windows
Ariadne Conill 4fb7683c 2020-05-24T14:40:47 add support for the PKGCONF_PKG_PKGF_DONT_MERGE_SPECIAL_FRAGMENTS flag used in build2.
Ariadne Conill fb9c2258 2020-05-24T14:37:13 update NEWS for previous patch
Ben 011db1bb 2020-04-26T17:28:03 Do not complain about malformed whitespace from \n on Version line Every version line has a newline at the end; the malformed whitespace checker should just check for trailing spaces and tabs. Resolves https://todo.sr.ht/~kaniini/pkgconf/15
Ariadne Conill fce1199b 2020-05-24T14:34:17 cli: add support for PKG_CONFIG_MSVC_SYNTAX env variable Patch from Dan Kegel.
Olaf Hering cdc2bf88 2020-05-24T14:29:19 use correct autoconf macro name AC_CONFIG_MACRO_DIR without trailing S is known by autoconf since 2.58. AC_CONFIG_MACRO_DIR with trailing S is known by autoconf newer than 2.69. This fixes libtool after 'autoreconf -fi'. Fixes commit a8a65c7f6c6b6463bbdee119c0ff71536925e455 Related to issue #145 Signed-off-by: Olaf Hering <olaf@aepfle.de>
Ariadne Conill 80508f71 2020-05-24T14:27:52 NEWS: start NEWS for 1.7.0 was hoping to go straight into 2.0 but we need a new maintenance branch :(
Ariadne Conill 382a89c1 2020-05-24T14:18:16 pkg: pkgconf_compare_version(): do not return levenshtein distance in strcmp() case
Tobias Stoeckmann 92745ad9 2020-05-24T21:51:14 libpkgconf: parser: fix out of boundary access It is possible to trigger an out of boundary access with specially crafted files. If a line consist of only a key and spaces, then op will point to '\0'-ending of the buffer. Since p is iterated by one byte right past this ending '\0', the next read access to p is effectively out of bounds. Theoretically this can also lead to out of boundary writes if spaces are encountered. Proof of concept (I recommend to compile with address sanitizer): $ echo -n a > poc.pc $ dd if=/dev/zero bs=1 count=65533 | tr '\0' ' ' >> poc.pc $ pkgconf poc.pc
Tobias Stoeckmann bd4ed1ca 2020-05-24T20:51:48 libpkgconf: fileio: prevent buffer overflow. pkgconf_fgetline is called with a user-defined buffer, its size, and a FILE stream to read input from. If the buffer is almost completely filled and the file stream contains an escaped character, then it is possible to trigger an off-by-one buffer overflow with a '\0' character. Easiest example to trigger this: char buf[2]; pkgconf_fgetline(buf, sizeof(buf), stdin); Enter "\\" (two backslashes) and press enter. If the library and the program are compiled with address sanitizer, you will see the program crashing. Otherwise it depends on your architecture what happens. Since nobody should be using a buffer of only size 1 or 2, keep enough space for a possibly escaped character in while loop by subtracting one more byte for this situation, not just for '\0'.
Ariadne Conill 62bbd3b6 2020-01-21T10:32:36 cli: remove --version to --modversion remapping This has been a source of frequent complaints, so we drop it. Resolves: https://todo.sr.ht/~kaniini/pkgconf/6
Ariadne Conill 48dc665a 2019-10-19T00:56:17 personality: add support for WantDefaultStatic setting
Ariadne Conill 40fe4835 2019-10-19T00:45:49 cli: main: add --shared option
Ariadne Conill f1ce3936 2019-09-30T05:22:21 fix pkgconf-personality man page
Ariadne Conill 2adafc27 2019-08-23T12:47:22 libpkgconf: personality: return the default personality if loading a personality file failed
Ariadne Conill 19aa93e3 2019-08-04T15:54:24 prepare for pkgconf 2.0 development
Nicolas Braud-Santoni 1d8c6b71 2019-07-12T16:50:51 Fix troff markup in pkgconf-personality(5) A list was started with .Bl but not ended (with .El)
Nicolas Braud-Santoni db3ba0ef 2019-07-12T16:50:50 Fix spelling in pkg.m4(7)
Ariadne Conill af1fbf98 2019-07-12T08:54:24 builds: add fedora meson build
Ariadne Conill 3f178f71 2019-07-12T08:42:11 builds: add fedora rawhide build
Ariadne Conill f3e1073f 2019-07-12T08:31:21 build: include meson build files in generated tarballs
Ariadne Conill d351e6ae 2019-07-12T08:23:36 Revert "tests: remove some no longer relevant bitrot in the test environment file" This reverts commit 107ad34f8fdae7af0f38afaa51e0ca8fdbee8250. Breaks autoconf.
Ariadne Conill 061627f0 2019-07-12T08:20:05 meson: bump required version to 0.47 for copy directive
Ariadne Conill 107ad34f 2019-07-12T08:19:19 tests: remove some no longer relevant bitrot in the test environment file
Ariadne Conill c862e030 2019-07-12T06:53:37 pkgconf 1.6.3.
Ariadne Conill 5f3aa3a8 2019-07-12T06:53:25 cli: bump copyright notice to 2019
Ariadne Conill 286e3547 2019-07-12T06:46:29 update NEWS for 1.6.3.
Ariadne Conill 3740bfb6 2019-07-12T06:42:08 tests: add test for malformed versions generating a diagnostic with --validate