|
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
|
|
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
|
|
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.
|
|
b132ce83
|
2022-01-08T10:55:28
|
|
Update dirent.h to latest
|
|
6109e060
|
2021-12-11T14:49:05
|
|
docs: mention Meson instead of CMake for Win build
Fixes #233
|
|
2b82a4f6
|
2021-10-07T00:23:35
|
|
use a serial instead of PKGCONF_PKG_PROPF_SEEN
|
|
7d8cc1e4
|
2021-10-06T13:13:34
|
|
dependency: add pkgconf_dependency_copy()
|
|
c547edd0
|
2021-10-06T11:52:18
|
|
deconst the client on pkgconf_dependency_add()
|
|
4144d506
|
2021-10-06T11:48:13
|
|
implement dependency refcounting
|
|
8130dd15
|
2021-10-06T11:29:18
|
|
dependency: add pkgconf_dependency_free_one
|
|
4b87e256
|
2021-08-17T15:29:55
|
|
cache: clear package cache without using the refcounts
|
|
df1b671c
|
2021-08-17T15:18:47
|
|
dependency: use dependency match owner with pkgconf_pkg_unref()
|
|
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.
|
|
ceece2c1
|
2021-07-24T19:47:33
|
|
pkg: fix up comment about issue #213 workaround
|
|
ed86f2dd
|
2021-06-23T14:09:05
|
|
Don't prepend sysroot_dir if pkg-config file lies outside of sysroot_dir
|
|
d688a7bd
|
2021-06-11T15:00:47
|
|
implement pkgconf_cross_personality_deinit
|
|
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.
|
|
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
|
|
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
|
|
dbb6a232
|
2021-03-18T06:56:55
|
|
path: don't use PATH_MAX, use PKGCONF_ITEM_SIZE * 4 for realpath buffer
|
|
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.
|
|
008d7069
|
2021-03-18T06:03:32
|
|
libpkgconf: personality: default: set want_default_static and want_default_pure to true on windows
|
|
f9531ce9
|
2021-03-18T05:59:54
|
|
add support for pkgconf_cross_personality_t.want_default_pure
|
|
52d19e1b
|
2021-03-18T05:44:45
|
|
libpkgconf: fileio: pkgconf_fgetline(): handle quoted=true when a comment introduction is encountered
Fixes #215.
|