|
b6e04e2d
|
2023-12-11T06:58:17
|
|
pkgconf 2.1.1
|
|
80b5011e
|
2024-02-04T03:04:52
|
|
Use traverse_serial to short circuit graph evaluation for already visited nodes.
In our previous attempt to optimize this problem, we did not track the type of the
visit to the node, e.g. whether it came from evaluating Requires or Requires.private,
which resulted in some solutions being correctly incalculated due to greedy optimization
of the dependency graph.
We reintroduce this optimization by adding a second traversal serial as well as
re-introducing the PROPF_VISITED node property as well as a new PROPF_VISITED_PRIVATE
node property flag. This allows a node to be revisted at maximum two times per
traversal level.
Co-authored-by: Yi Chou <yich@google.com>
|
|
a4ecd42b
|
2023-11-24T19:44:04
|
|
Fix it's -> its
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
|
5fb09af8
|
2023-11-22T18:43:04
|
|
queue: ensure the initial solution is cleaned up when it is no longer needed
|
|
f3540de3
|
2023-10-09T07:27:00
|
|
queue: clarify the relationship between a flattened dep and its parent
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
|
|
be1ea788
|
2023-10-15T08:32:48
|
|
Separate input world from output world
|
|
45073b74
|
2023-10-15T12:40:41
|
|
Circular deps: track ancestors, not serial
|
|
948297b5
|
2023-10-31T14:09:55
|
|
Search XDG Base Directories for personality files
Try $XDG_DATA_HOME/pkgconfig/personality.d and $XDG_DATA_DIRS/pkgconfig/personality.d.
|
|
d454f62c
|
2023-11-05T22:17:02
|
|
libpkgconf: fix -Walloc-size
GCC 14 introduces a new -Walloc-size included in -Wextra which gives:
```
libpkgconf/personality.c:260:11: warning: allocation of insufficient size '1' for type 'pkgconf_cross_personality_t' {aka 'struct pkgconf_cross_personality_'} with size '48' [-Walloc-size]
libpkgconf/queue.c:46:33: warning: allocation of insufficient size '1' for type 'pkgconf_queue_t' {aka'struct pkgconf_queue_'} with size '16' [-Walloc-size]
libpkgconf/client.c:164:33: warning: allocation of insufficient size '1' for type 'pkgconf_client_t' {aka 'struct pkgconf_client_'} with size '120' [-Walloc-size]
libpkgconf/path.c:105:14: warning: allocation of insufficient size '1' for type 'pkgconf_path_t' {aka 'struct pkgconf_path_'} with size '24' [-Walloc-size]
libpkgconf/path.c:237:22: warning: allocation of insufficient size '1' for type 'pkgconf_path_t' {aka 'struct pkgconf_path_'} with size '24' [-Walloc-size]
libpkgconf/tuple.c:239:34: warning: allocation of insufficient size '1' for type 'pkgconf_tuple_t' {aka 'struct pkgconf_tuple_'} with size '24' [-Walloc-size]
libpkgconf/dependency.c:133:13: warning: allocation of insufficient size '1' for type 'pkgconf_dependency_t' {aka 'struct pkgconf_dependency_'} with size '44' [-Walloc-size]
libpkgconf/dependency.c:472:17: warning: allocation of insufficient size '1' for type 'pkgconf_dependency_t' {aka 'struct pkgconf_dependency_'} with size '44' [-Walloc-size]
libpkgconf/fragment.c:146:22: warning: allocation of insufficient size '1' for type 'pkgconf_fragment_t' {aka 'struct pkgconf_fragment_'} with size '24' [-Walloc-size]
libpkgconf/fragment.c:195:22: warning: allocation of insufficient size '1' for type 'pkgconf_fragment_t' {aka 'struct pkgconf_fragment_'} with size '24' [-Walloc-size]
libpkgconf/fragment.c:356:14: warning: allocation of insufficient size '1' for type 'pkgconf_fragment_t' {aka 'struct pkgconf_fragment_'} with size '24' [-Walloc-size]
libpkgconf/pkg.c:422:13: warning: allocation of insufficient size '1' for type 'pkgconf_pkg_t' {aka 'struct pkgconf_pkg_'} with size '188' [-Walloc-size]
libpkgconf/client.c:164:33: warning: allocation of insufficient size '1' for type 'pkgconf_client_t' {aka 'struct pkgconf_client_'} with size '224' [-Walloc-size]
libpkgconf/personality.c:260:11: warning: allocation of insufficient size '1' for type 'pkgconf_cross_personality_t' {aka 'struct pkgconf_cross_personality_'} with size '96' [-Walloc-size]
libpkgconf/dependency.c:133:13: warning: allocation of insufficient size '1' for type 'pkgconf_dependency_t' {aka 'struct pkgconf_dependency_'} with size '80' [-Walloc-size]
libpkgconf/dependency.c:472:17: warning: allocation of insufficient size '1' for type 'pkgconf_dependency_t' {aka 'struct pkgconf_dependency_'} with size '80' [-Walloc-size]
libpkgconf/path.c:105:14: warning: allocation of insufficient size '1' for type 'pkgconf_path_t' {aka 'struct pkgconf_path_'} with size '48' [-Walloc-size]
libpkgconf/path.c:237:22: warning: allocation of insufficient size '1' for type 'pkgconf_path_t' {aka 'struct pkgconf_path_'} with size '48' [-Walloc-size]
libpkgconf/queue.c:46:33: warning: allocation of insufficient size '1' for type 'pkgconf_queue_t' {aka 'struct pkgconf_queue_'} with size '32' [-Walloc-size]
libpkgconf/tuple.c:239:34: warning: allocation of insufficient size '1' for type 'pkgconf_tuple_t' {aka 'struct pkgconf_tuple_'} with size '48' [-Walloc-size]
libpkgconf/fragment.c:146:22: warning: allocation of insufficient size '1' for type 'pkgconf_fragment_t' {aka 'struct pkgconf_fragment_'} with size '48' [-Walloc-size]
libpkgconf/fragment.c:195:22: warning: allocation of insufficient size '1' for type 'pkgconf_fragment_t' {aka 'struct pkgconf_fragment_'} with size '48' [-Walloc-size]
libpkgconf/fragment.c:356:14: warning: allocation of insufficient size '1' for type 'pkgconf_fragment_t' {aka 'struct pkgconf_fragment_'} with size '48' [-Walloc-size]
libpkgconf/pkg.c:422:13: warning: allocation of insufficient size '1' for type 'pkgconf_pkg_t' {aka 'struct pkgconf_pkg_'} with size '360' [-Walloc-size]
```
The calloc prototype is:
```
void *calloc(size_t nmemb, size_t size);
```
So, just swap the number of members and size arguments to match the prototype, as
we're initialising 1 struct of size `sizeof(struct ...)`. GCC then sees we're not
doing anything wrong.
The only exception there is for argv which I fixed while at it.
Signed-off-by: Sam James <sam@gentoo.org>
|
|
752a9825
|
2023-10-09T07:22:59
|
|
queue: demote requires to requires.private when processing requires.private parents
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
|
|
5aeb469b
|
2023-09-03T16:19:14
|
|
libpkgconf: fix memory leak
Signed-off-by: Colin Gillespie <colin@cgillespie.xyz>
|
|
652aff97
|
2023-10-08T22:27:56
|
|
path: add pkgconf_path_prepend API for --with-path
Otherwise, PKG_CONFIG_PATH and PKG_CONFIG_LIBDIR elements would be processed backwards.
Fixes: 384ade5 (path: prepend paths rather than append paths when processing --with-path arguments)
Closes: #250
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
|
|
a6fb59a0
|
2023-09-02T21:15:46
|
|
pkgconf 2.0.3.
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
|
|
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>
|
|
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>
|
|
eaa4bb44
|
2023-08-17T11:56:08
|
|
pkgconf 2.0.2.
|
|
a265f8a4
|
2023-08-17T11:53:07
|
|
libpkgconf: pkg: fix long-standing bug where -uninstalled pkg-config files would have the wrong identifier
|
|
6a84d704
|
2023-08-11T14:23:08
|
|
pkgconf 2.0.1.
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
|
|
4fb0988a
|
2023-08-11T14:16:41
|
|
libpkgconf: queue: make the pkgconf_queue_t type public
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
|
|
de51b03c
|
2023-08-04T08:45:16
|
|
pkgconf 2.0.0.
|
|
384ade5f
|
2023-08-04T08:24:32
|
|
path: prepend paths rather than append paths when processing --with-path arguments
|
|
a4eb097b
|
2023-08-04T08:23:00
|
|
queue: process packages in the resolution queue in the correct order
|
|
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.
|
|
35b1a623
|
2023-05-02T12:09:55
|
|
update libpkgconf version to 10905
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
|
|
f7bebba6
|
2023-04-24T15:50:00
|
|
fix meson.build
Co-authored-by: Ariadne Conill <ariadne@dereferenced.org>
|
|
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.
|
|
6d1f160e
|
2023-03-06T20:05:22
|
|
argvsplit: fix some quoting rules
|
|
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.
|
|
9ab5ea2e
|
2023-01-22T11:49:54
|
|
doc: personality: Add a documentation header
Signed-off-by: Andrej Shadura <andrew.shadura@collabora.co.uk>
|
|
f7305434
|
2023-01-22T04:56:06
|
|
libpkgconf: bump API version to 10904
|
|
d9e507cc
|
2023-01-21T21:31:38
|
|
pkg: do not do serial checks for flattened solutions, as they are already flattened
|
|
99bc93fb
|
2023-01-21T20:45:29
|
|
use SIZE_FMT_SPECIFIER everywhere
|
|
e2a12fd4
|
2023-01-21T20:39:53
|
|
main: reset solver when solving for library groups
|
|
648a2249
|
2023-01-21T20:17:33
|
|
fragment: render: only include trailing space if there is another fragment
|
|
506ebab7
|
2022-09-30T15:33:47
|
|
Ignore whitespace indentation
Fixes #265
|
|
be0d8119
|
2023-01-21T19:51:24
|
|
argvsplit: fix some quoting rules to match POSIX
|
|
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.
|
|
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
|
|
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/
|
|
6a66b312
|
2022-08-16T19:49:42
|
|
libpkgconf: increase API level to 10903
|
|
80bc5ac3
|
2022-08-16T19:38:40
|
|
tuple: if a global tuple is explicitly defined with --define-variable, prefer it
fixes github #259
|
|
5044491f
|
2022-08-16T19:27:35
|
|
queue: add function to free a compiled solution
|
|
ced9bee6
|
2022-08-16T18:51:11
|
|
pkg: remove dead store in pkgconf_compare_version
|
|
5500a151
|
2022-08-16T18:46:43
|
|
fragment: avoid trying to merge fragments where data == NULL
|
|
74faf8d0
|
2022-08-16T18:38:46
|
|
queue: do not enqueue unsolved nodes as part of a solution
|
|
696124b6
|
2022-08-12T12:36:21
|
|
pkg: add support for parsing the URL from pc files
|
|
aa99ddf7
|
2022-08-11T15:52:33
|
|
pkg: add Copyright and Maintainer fields
These are helpful pieces of information for BOM documents
generated by pkgconf.
|
|
28b5d57b
|
2022-08-08T10:25:24
|
|
pkg: free SPDX license tags when a package is destroyed
|
|
69a3d458
|
2022-08-08T09:59:50
|
|
libpkgconf: revise API revision to 10902
|
|
7e9aa7e1
|
2022-08-08T09:56:28
|
|
pkg: do not break cycles across dependency lists
|
|
69f630aa
|
2022-08-08T09:34:45
|
|
pkg: only advance serial if we are actually traversing from a root
|
|
5b10a85a
|
2022-08-08T09:08:27
|
|
queue: add pkgconf_queue_solve API
|
|
79d25f97
|
2022-08-08T00:58:39
|
|
queue: ensure private deps get flattened when --static is requested
|
|
7976daab
|
2022-08-06T22:30:25
|
|
bsdstubs: include errno.h
Needed for ENOMEM, and fixes the build on MacOS.
|
|
d8d669f6
|
2022-08-07T04:47:04
|
|
pkgconf 1.9.0.
|
|
0e05308f
|
2022-08-07T04:35:29
|
|
pkg: add SPDX license assertion to pkgconf builtin
|
|
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.
|
|
7edfdbff
|
2022-08-07T01:29:21
|
|
pkg: upgrade circular reference trace to a warning
|
|
662668d0
|
2022-08-07T01:09:07
|
|
pkg: add trace log when breaking a circular reference
|
|
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.
|
|
301d8fa0
|
2022-08-04T12:22:49
|
|
queue: free unused dependencies when flattening
|
|
34b11020
|
2022-08-04T11:53:02
|
|
dependency: zero list after freeing
|
|
e71a5a33
|
2022-08-04T11:52:26
|
|
dependency: add debug information for dependency refcounting
|
|
49342057
|
2022-08-04T11:50:50
|
|
pkg: add name of pkg being refed/unrefed to debug outpu
|
|
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.
|
|
a391f9b6
|
2022-08-03T16:32:35
|
|
pkg: use goto cleanup idiom
|
|
17173802
|
2022-08-03T16:27:42
|
|
cache: clear the cache with pkgconf_cache_remove
Which results in more code re-use.
|
|
e4d1c8ff
|
2022-08-03T16:22:14
|
|
queue: when flattening do nothing if the flattened deps are empty
|
|
66090011
|
2022-08-03T16:08:00
|
|
queue: unref dependency in all cases
|
|
e275594b
|
2022-08-03T15:56:54
|
|
queue: ensure cleanup happens when applying
|
|
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);
```
|
|
a4de6235
|
2022-08-03T15:29:57
|
|
cache: when removing a package from the cache unset the cached flag
|
|
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.
|
|
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.
|
|
6c70781a
|
2022-07-26T18:00:22
|
|
introduce PKG_CONFIG_PKGCONF1_SYSROOT_RULES for legacy pkgconf behavior
|
|
f8aefea7
|
2022-07-26T17:13:15
|
|
pkg: add flags argument to pkgconf_pkg_new_from_file
|
|
297e18f2
|
2022-07-26T17:08:48
|
|
tuple: add flags parameter to pkgconf_tuple_parse
|
|
b0802cb3
|
2022-06-26T19:41:31
|
|
Revert "pkgconf_pkg_parser_value_set(): fix code-path ordering bug."
This reverts commit 13fe4c8c589be99b12db62b053c38124afecf2d7.
|
|
72e429ae
|
2022-06-26T19:35:19
|
|
tuple: use ${pc_sysrootdir} instead of client->sysroot_dir where relevant
|
|
a61193c7
|
2022-06-26T19:16:00
|
|
pkg: fix sysroot_dir logic for github 213
|
|
d68a867d
|
2022-06-26T19:15:07
|
|
tuple: fall back to using globals rather than preferring them
|
|
fdd7d192
|
2022-06-26T18:38:55
|
|
queue: fix ISO C conformance for fallthrough label
|
|
a1a41511
|
2022-06-26T18:09:22
|
|
queue: handle pkgconf_pkg_verify_dependency failure while flattening
|
|
9bc6d80e
|
2022-06-26T18:06:04
|
|
queue: push new unresolved dependencies to the front of the queue, rather than the tail
|
|
fe4db3aa
|
2022-06-26T18:04:42
|
|
queue: skip dependency collection for root node
|
|
5a82a259
|
2022-06-26T15:17:08
|
|
queue: use maxdepth after flattening
|
|
a416dc1f
|
2022-06-26T15:16:36
|
|
queue: advance client serial when walking requires.private for flattening
|
|
197fcadd
|
2022-06-26T15:02:37
|
|
queue: add flattening code
|
|
5817e884
|
2022-06-26T07:22:56
|
|
pkg: track the number of hits a package has gotten while solving for dependencies
|
|
6ae17bd0
|
2022-06-26T06:05:40
|
|
pkg: split pkgconf_pkg_traverse into a serial-modifying version
|
|
ffa0805d
|
2022-06-26T04:38:02
|
|
cache: use pkgconf_reallocarray stub
|
|
c1579d38
|
2022-06-26T04:37:18
|
|
bsdstubs: add pkgconf_reallocarray
|
|
4c76f6bf
|
2022-06-26T04:33:47
|
|
meson: check for reallocarray
it is needed for the new cache code
|
|
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
|
|
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)
|
|
2d201af3
|
2022-04-01T14:14:54
|
|
libpkgconf: Add a helper to zero `pkgconf_list_t`s
|
|
cf48b61a
|
2022-02-21T04:42:26
|
|
stdinc: include strings.h on POSIX
|
|
0995e499
|
2022-02-21T04:27:11
|
|
Merge branch 'master' into readme-meson
|
|
a45dbccc
|
2022-02-21T04:25:36
|
|
Merge pull request #242 from data-man/dirent_latest
Update dirent.h to latest
|
|
c6cfca67
|
2022-02-21T04:25:26
|
|
Merge pull request #245 from dcbaker/submit/remove-const
libpkgconf: remove const modifier from error_handler data pointer
|