libpkgconf


Log

Author Commit Date CI Message
Ariadne Conill a6fb59a0 2023-09-02T21:15:46 pkgconf 2.0.3. Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Ariadne Conill ee702658 2023-09-02T21:05:03 use PRIu64 format specifiers for some uint64 identifiers in trace logging Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Colin Gillespie 66994f15 2023-08-19T07:57:48 cli: fix --modversion not showing version in various cases There are numerous edge cases where version is wrong or missing when matching the dependency queue to resolved packages. This adds the dependency name as it appears in the dependency queue to each package as it is resolved, allowing for a simple and correct comparison when printing. Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
Ariadne Conill eaa4bb44 2023-08-17T11:56:08 pkgconf 2.0.2.
Ariadne Conill a265f8a4 2023-08-17T11:53:07 libpkgconf: pkg: fix long-standing bug where -uninstalled pkg-config files would have the wrong identifier
Ariadne Conill 6a84d704 2023-08-11T14:23:08 pkgconf 2.0.1. Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Ariadne Conill 4fb0988a 2023-08-11T14:16:41 libpkgconf: queue: make the pkgconf_queue_t type public Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Ariadne Conill de51b03c 2023-08-04T08:45:16 pkgconf 2.0.0.
Ariadne Conill 384ade5f 2023-08-04T08:24:32 path: prepend paths rather than append paths when processing --with-path arguments
Ariadne Conill a4eb097b 2023-08-04T08:23:00 queue: process packages in the resolution queue in the correct order
Ariadne Conill 5d0e2f50 2023-08-04T08:19:42 Track packages using a lifetime unique identifier Use that identifier to cancel graph edges rather than the number of hits, which biases the earliest edge rather than the latest.
Ariadne Conill 35b1a623 2023-05-02T12:09:55 update libpkgconf version to 10905 Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Harmen Stoppels f7bebba6 2023-04-24T15:50:00 fix meson.build Co-authored-by: Ariadne Conill <ariadne@dereferenced.org>
Harmen Stoppels 40638f24 2023-04-24T15:18:59 use AC_CHECK_DECLS to avoid implicit function definition AC_CHECK_FUNCS is not safe, since implicit function definitions is just a warning. On 64-bit glibc systems where reallocarray is not defined or hidden behind macros that are not set, it gets implicitly defined to return an integer, which is a big problem given that it should return a pointer, and leads to immediate segfaults.
huyubiao 6d1f160e 2023-03-06T20:05:22 argvsplit: fix some quoting rules
Taylor R Campbell 212c8586 2023-03-17T19:32:58 Avoid undefined behaviour with the ctype(3) functions. fix https://github.com/pkgconf/pkgconf/issues/291 As defined in the C standard: In all cases the argument is an int, the value of which shall be representable as an unsigned char or shall equal the value of the macro EOF. If the argument has any other value, the behavior is undefined. This is because they're designed to work with the int values returned by getc or fgetc; they need extra work to handle a char value. If EOF is -1 (as it almost always is), with 8-bit bytes, the allowed inputs to the ctype(3) functions are: {-1, 0, 1, 2, 3, ..., 255}. However, on platforms where char is signed, such as x86 with the usual ABI, code like char *ptr = ...; ... isspace(*ptr) ... may pass in values in the range: {-128, -127, -126, ..., -2, -1, 0, 1, ..., 127}. This has two problems: 1. Inputs in the set {-128, -127, -126, ..., -2} are forbidden. 2. The non-EOF byte 0xff is conflated with the value EOF = -1, so even though the input is not forbidden, it may give the wrong answer. Casting char to unsigned int first before passing the result to ctype(3) doesn't help: inputs like -128 are unchanged by this cast, because (on a two's-complement machine with 32-bit int and unsigned int), converting the signed char with integer value -128 to unsigned int gives integer value 2^32 - 128 = 0xffffff80, which is out of range, and which is converted in int back to -128, which is also out of range. It is necessary to cast char inputs to unsigned char first; you can then cast to unsigned int if you like but there's no need because the functions will always convert the argument to int by definition. So the above fragment needs to be: char *ptr = ...; ... isspace((unsigned char)*ptr) ... This patch changes unsigned int casts to unsigned char casts, and adds unsigned char casts where they are missing.
Andrej Shadura 9ab5ea2e 2023-01-22T11:49:54 doc: personality: Add a documentation header Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
Ariadne Conill f7305434 2023-01-22T04:56:06 libpkgconf: bump API version to 10904
Ariadne Conill d9e507cc 2023-01-21T21:31:38 pkg: do not do serial checks for flattened solutions, as they are already flattened
Ariadne Conill 99bc93fb 2023-01-21T20:45:29 use SIZE_FMT_SPECIFIER everywhere
Ariadne Conill e2a12fd4 2023-01-21T20:39:53 main: reset solver when solving for library groups
Ariadne Conill 648a2249 2023-01-21T20:17:33 fragment: render: only include trailing space if there is another fragment
Timo Röhling 506ebab7 2022-09-30T15:33:47 Ignore whitespace indentation Fixes #265
Ariadne Conill be0d8119 2023-01-21T19:51:24 argvsplit: fix some quoting rules to match POSIX
Doug Freed 08db74c4 2022-10-12T21:43:52 pkg: make pkgconf_compare_version consistent The code taken from rpmvercmp in pkg-config returns -1 if a is less than b, 0 if a is equal to b, and 1 if a is greater than b. This matches the expectations of the comparison operators that use this function. However, the tilde handling, the NULL handling, and the docstring all do the opposite. This fixes the tilde handling, the NULL handling, and the docstring to match the behavior of the rpmvercmp code and the expectations of the comparison operators.
Ziemowit Łąski 1c3f2461 2022-11-22T12:29:09 pkgconf: Handle spaces correctly when expanding variables Given the following .pc fragment: includedir=/mingw64/include Cflags: -I${includedir} -I${includedir}/taglib Should includedir be assigned the value 'C:/Program\ Files/Git/mingw64/include', the expansion of ${includedir} will be chopped off after the first space: Cflags: -IC:/Program\ With this patch, the expansion is corrected: Cflags: -IC:/Program\ Files/Git/mingw64/include -IC:/Program\ Files/Git/mingw64/include/taglib Create spaces-in-paths.pc
Ariadne Conill 628b2b2b 2023-01-20T22:07:03 tuple: test for, and stop string processing, on truncation otherwise a buffer overflow occurs. this has been a bug in pkgconf since the beginning, it seems. instead of disclosing the bug correctly, a "hotshot" developer decided to blog about it instead. sigh. https://nullprogram.com/blog/2023/01/18/
Ariadne Conill 6a66b312 2022-08-16T19:49:42 libpkgconf: increase API level to 10903
Ariadne Conill 80bc5ac3 2022-08-16T19:38:40 tuple: if a global tuple is explicitly defined with --define-variable, prefer it fixes github #259
Ariadne Conill 5044491f 2022-08-16T19:27:35 queue: add function to free a compiled solution
Ariadne Conill ced9bee6 2022-08-16T18:51:11 pkg: remove dead store in pkgconf_compare_version
Ariadne Conill 5500a151 2022-08-16T18:46:43 fragment: avoid trying to merge fragments where data == NULL
Ariadne Conill 74faf8d0 2022-08-16T18:38:46 queue: do not enqueue unsolved nodes as part of a solution
Ariadne Conill 696124b6 2022-08-12T12:36:21 pkg: add support for parsing the URL from pc files
Ariadne Conill aa99ddf7 2022-08-11T15:52:33 pkg: add Copyright and Maintainer fields These are helpful pieces of information for BOM documents generated by pkgconf.
Ariadne Conill 28b5d57b 2022-08-08T10:25:24 pkg: free SPDX license tags when a package is destroyed
Ariadne Conill 69a3d458 2022-08-08T09:59:50 libpkgconf: revise API revision to 10902
Ariadne Conill 7e9aa7e1 2022-08-08T09:56:28 pkg: do not break cycles across dependency lists
Ariadne Conill 69f630aa 2022-08-08T09:34:45 pkg: only advance serial if we are actually traversing from a root
Ariadne Conill 5b10a85a 2022-08-08T09:08:27 queue: add pkgconf_queue_solve API
Ariadne Conill 79d25f97 2022-08-08T00:58:39 queue: ensure private deps get flattened when --static is requested
Dylan Baker 7976daab 2022-08-06T22:30:25 bsdstubs: include errno.h Needed for ENOMEM, and fixes the build on MacOS.
Ariadne Conill d8d669f6 2022-08-07T04:47:04 pkgconf 1.9.0.
Ariadne Conill 0e05308f 2022-08-07T04:35:29 pkg: add SPDX license assertion to pkgconf builtin
Ariadne Conill 1389aa05 2022-08-07T04:21:22 pkg: add pkgconf_pkg_t.license field The pkgconf_pkg_t.license field maps to the new License keyword, and should be an SPDX license expression.
Ariadne Conill 7edfdbff 2022-08-07T01:29:21 pkg: upgrade circular reference trace to a warning
Ariadne Conill 662668d0 2022-08-07T01:09:07 pkg: add trace log when breaking a circular reference
Dylan Baker 49342057 2022-08-04T11:50:50 pkg: add name of pkg being refed/unrefed to debug outpu
Dylan Baker a46ce367 2022-08-03T16:40:04 queue: when collecting dependents don't iterate private twice Currently, the private field is iterated collecting private deps and normal deps. It should only be iterated when collecting private deps.
Dylan Baker a391f9b6 2022-08-03T16:32:35 pkg: use goto cleanup idiom
Dylan Baker 17173802 2022-08-03T16:27:42 cache: clear the cache with pkgconf_cache_remove Which results in more code re-use.
Dylan Baker e4d1c8ff 2022-08-03T16:22:14 queue: when flattening do nothing if the flattened deps are empty
Dylan Baker 66090011 2022-08-03T16:08:00 queue: unref dependency in all cases
Dylan Baker e275594b 2022-08-03T15:56:54 queue: ensure cleanup happens when applying
Dylan Baker 4a1119aa 2022-08-03T15:43:04 dependency: Fix reference counting of dependency_addraw We only want a reference to be added for the value inserted into the list, not the one returned. The returned one is unowned until it reaches the public dependency_add function, which returns an owned pointer instead. This makes things semantically more correct. Unfortunately, this means in a few cases we have to write some ugly code like: ```c pkgconf_dependency_t *dep = pkgcond_dependency_add("args"); pkgconf_dependency_unref(dep->owner, dep); ```
Dylan Baker a4de6235 2022-08-03T15:29:57 cache: when removing a package from the cache unset the cached flag
Dylan Baker ebe74fd2 2022-08-03T15:24:05 cache: free the cache table when it is empty and set to NULL We do the latter for the benefit of libpkgconf. This cleans up a significant number of memory leaks in the cache handling.
Dylan Baker 1cfa2d1e 2022-08-04T15:16:44 pkg: prevent circular ownership Otherwise in a case where A references B, and B references A, A and B will have mutual ownership of each other and prevent each other from being free'd.
Dylan Baker 301d8fa0 2022-08-04T12:22:49 queue: free unused dependencies when flattening
Dylan Baker 34b11020 2022-08-04T11:53:02 dependency: zero list after freeing
Dylan Baker e71a5a33 2022-08-04T11:52:26 dependency: add debug information for dependency refcounting
Dylan Baker 96c61cba 2022-08-03T12:00:21 libpkgconf: remove trailing ; from macro definition GCC has a lovely bug (which I will report as soon as I have an account), which causes -Wmisleading-indentation to miss cases of misleading indentation after a `;;`, since the macro adds `;`, and in call cases the caller also adds `;`, we end up with a double macro and gcc fails to warn.
Ariadne Conill 6c70781a 2022-07-26T18:00:22 introduce PKG_CONFIG_PKGCONF1_SYSROOT_RULES for legacy pkgconf behavior
Ariadne Conill f8aefea7 2022-07-26T17:13:15 pkg: add flags argument to pkgconf_pkg_new_from_file
Ariadne Conill 297e18f2 2022-07-26T17:08:48 tuple: add flags parameter to pkgconf_tuple_parse
Ariadne Conill b0802cb3 2022-06-26T19:41:31 Revert "pkgconf_pkg_parser_value_set(): fix code-path ordering bug." This reverts commit 13fe4c8c589be99b12db62b053c38124afecf2d7.
Ariadne Conill 72e429ae 2022-06-26T19:35:19 tuple: use ${pc_sysrootdir} instead of client->sysroot_dir where relevant
Ariadne Conill a61193c7 2022-06-26T19:16:00 pkg: fix sysroot_dir logic for github 213
Ariadne Conill d68a867d 2022-06-26T19:15:07 tuple: fall back to using globals rather than preferring them
Ariadne Conill fdd7d192 2022-06-26T18:38:55 queue: fix ISO C conformance for fallthrough label
Ariadne Conill a1a41511 2022-06-26T18:09:22 queue: handle pkgconf_pkg_verify_dependency failure while flattening
Ariadne Conill 9bc6d80e 2022-06-26T18:06:04 queue: push new unresolved dependencies to the front of the queue, rather than the tail
Ariadne Conill fe4db3aa 2022-06-26T18:04:42 queue: skip dependency collection for root node
Ariadne Conill 5a82a259 2022-06-26T15:17:08 queue: use maxdepth after flattening
Ariadne Conill a416dc1f 2022-06-26T15:16:36 queue: advance client serial when walking requires.private for flattening
Ariadne Conill 197fcadd 2022-06-26T15:02:37 queue: add flattening code
Ariadne Conill 5817e884 2022-06-26T07:22:56 pkg: track the number of hits a package has gotten while solving for dependencies
Ariadne Conill 6ae17bd0 2022-06-26T06:05:40 pkg: split pkgconf_pkg_traverse into a serial-modifying version
Ariadne Conill ffa0805d 2022-06-26T04:38:02 cache: use pkgconf_reallocarray stub
Ariadne Conill c1579d38 2022-06-26T04:37:18 bsdstubs: add pkgconf_reallocarray
Ariadne Conill 4c76f6bf 2022-06-26T04:33:47 meson: check for reallocarray it is needed for the new cache code
Ariadne Conill 46467240 2022-06-26T04:30:35 cache: refactor to use a continguous table and bsearch cache functions are the hottest part of the pkgconf code when profiled, by removing the linked list for lookups, we can turn lookups into an O(k) operation
Dylan Baker c0fa7879 2022-04-01T14:15:43 libpkgconf: zero path lists after freeing This is required to make the pointer safely re-usable after being freed, otherwise the list still says that it has nodes, but they point nowhere. This is particularly important for libpkgconf, if a caller needs to re-enter the library after freeing a path in a static path (such as the default personality)
Dylan Baker 2d201af3 2022-04-01T14:14:54 libpkgconf: Add a helper to zero `pkgconf_list_t`s
Ariadne Conill cf48b61a 2022-02-21T04:42:26 stdinc: include strings.h on POSIX
Ariadne Conill 0995e499 2022-02-21T04:27:11 Merge branch 'master' into readme-meson
Ariadne Conill a45dbccc 2022-02-21T04:25:36 Merge pull request #242 from data-man/dirent_latest Update dirent.h to latest
Ariadne Conill c6cfca67 2022-02-21T04:25:26 Merge pull request #245 from dcbaker/submit/remove-const libpkgconf: remove const modifier from error_handler data pointer
Dylan Baker c581e24a 2022-02-10T19:46:19 personality: use an unsigned to track initializations Instead of a bool. The latter will result in de-initing leaving the library unable to init again, which works out for the cli, but is problematic for other consumers (meson++ and muon). v2: - Add docs that the functions are not thread safe
Dylan Baker f5d6bb71 2022-02-04T16:06:08 libpkgconf: remove const modifier from error_handler data pointer Currently, the data pointer is `const void *`, which means that the handler can't modify the data without casting away the constness.
data-man b132ce83 2022-01-08T10:55:28 Update dirent.h to latest
Andrea Pappacoda 6109e060 2021-12-11T14:49:05 docs: mention Meson instead of CMake for Win build Fixes #233
Ariadne Conill 2b82a4f6 2021-10-07T00:23:35 use a serial instead of PKGCONF_PKG_PROPF_SEEN
Ariadne Conill 7d8cc1e4 2021-10-06T13:13:34 dependency: add pkgconf_dependency_copy()
Ariadne Conill c547edd0 2021-10-06T11:52:18 deconst the client on pkgconf_dependency_add()
Ariadne Conill 4144d506 2021-10-06T11:48:13 implement dependency refcounting
Ariadne Conill 8130dd15 2021-10-06T11:29:18 dependency: add pkgconf_dependency_free_one
Ariadne Conill 4b87e256 2021-08-17T15:29:55 cache: clear package cache without using the refcounts
Ariadne Conill df1b671c 2021-08-17T15:18:47 dependency: use dependency match owner with pkgconf_pkg_unref()
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.