cli


Log

Author Commit Date CI Message
Ariadne Conill 1e179963 2023-05-02T11:58:39 Enforce maximum package count correctly for --modversion Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
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.
Ariadne Conill 98b33b48 2023-01-21T21:43:08 cli: use flattened solution for almost all user-facing queries
Ariadne Conill 90b65c86 2023-01-21T21:31:16 main: use flattened solution for cflags/libs only
Ariadne Conill e2a12fd4 2023-01-21T20:39:53 main: reset solver when solving for library groups
Ariadne Conill b106de0c 2023-01-21T20:21:26 cli: add whitespace between cflags and libs fragments
Ariadne Conill bddf1641 2022-08-16T20:41:10 bomtool: fix ASan issues
Ariadne Conill 5044491f 2022-08-16T19:27:35 queue: add function to free a compiled solution
Ariadne Conill c6d14e6f 2022-08-16T18:53:29 cli: renderer-msvc: remove pointless buf_remaining store
Ariadne Conill 2c895411 2022-08-16T18:50:35 bomtool: return EXIT_FAILURE if solver fails to solve
Ariadne Conill c918b6e2 2022-08-13T06:44:40 bomtool: enable PKGCONF_PKG_PKGF_SEARCH_PRIVATE to collect dev dependencies
Ariadne Conill 12f3a309 2022-08-13T06:44:19 bomtool: write dependency relationships in both directions
Ariadne Conill 01c1d9f4 2022-08-12T13:07:58 bomtool: remove empty creation date field
Ariadne Conill 9e8052b6 2022-08-12T12:57:53 bomtool: add enough to generate a basic SBOM
Ariadne Conill 79327b89 2022-08-12T12:07:56 add bomtool skeleton
Ariadne Conill 68b5cab7 2022-08-11T15:06:08 cli: remove redundant SEARCH_PRIVATE block It turns out there was already a check for PKG_CFLAGS being requested, but the check was busted because PKG_CFLAGS is a combined-or of all of the various --cflags flags. Check that PKG_CFLAGS bits are set at all on want_flags instead.
psykose 74600558 2022-08-11T13:47:32 cli: use Requires.private when cflags are requested
Ariadne Conill 4e449bd4 2022-08-08T09:42:01 cli: do not search requires.private for --libs unless --static
Ariadne Conill 760d1eea 2022-08-08T09:27:39 cli: use pkgconf_queue_solve instead of pkgconf_queue_apply
Ariadne Conill b29f9d87 2022-08-08T00:40:52 cli: do not flatten or traverse the graph when asking for module-specific values
Ariadne Conill d5f9bdae 2022-08-07T04:36:45 cli: add support for dumping SPDX expressions from modules
Ariadne Conill 56881f64 2022-08-07T00:38:38 cli: resolve uninitialized pointer warnings reported by GCC 12
Dylan Baker 4493a322 2022-08-03T16:37:04 main: do cleanup when checking required version
Dylan Baker 38103134 2022-08-03T16:30:59 main: goto cleanup in validate case too This fixes leaks in two tests
Ariadne Conill 6c70781a 2022-07-26T18:00:22 introduce PKG_CONFIG_PKGCONF1_SYSROOT_RULES for legacy pkgconf behavior
Ariadne Conill 11164376 2022-06-26T18:34:22 main: handle --personality load failure
Ariadne Conill 04a6dda7 2022-06-26T18:17:30 main: refactor apply_variable
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.
Ariadne Conill 41bff109 2021-08-17T14:54:36 cli: ensure the client and cross-personality are cleaned up in all cases
Ariadne Conill f411e7e5 2021-08-17T14:47:10 cli: free package resolution queue unconditionally
Ariadne Conill ce82e36c 2021-08-17T14:39:44 cli: fix memory leak when packages are not provided on the command line
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
Ariadne Conill 599dfcb2 2021-03-18T06:42:57 main: extend copyright notice to 2021
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 f9531ce9 2021-03-18T05:59:54 add support for pkgconf_cross_personality_t.want_default_pure
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.
Ariadne Conill 47466470 2020-05-26T10:57:51 main: extend copyright statement to 2020 in --about
Ariadne Conill fce1199b 2020-05-24T14:34:17 cli: add support for PKG_CONFIG_MSVC_SYNTAX env variable Patch from Dan Kegel.
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 5f3aa3a8 2019-07-12T06:53:25 cli: bump copyright notice to 2019
Alexander Tsoy db9c1e96 2019-06-07T19:19:28 fix the order of header includes config.h should be included before stdinc.h, otherwise large file support is not enabled. Downstream bug: https://bugs.gentoo.org/687548
kaniini 7460d287 2019-05-18T00:52:09 Merge branch 'fix-msvc-build' of seungha.yang/pkgconf into master
Seungha Yang 5436558e 2019-05-11T01:15:24 main: Fix build with MSVC Use pkgconf_strndup() since strndup() might be unavailable
William Pitcock 0ba98da2 2019-05-06T15:22:11 lite: remove --simulate
William Pitcock 2d0c1f5c 2019-05-06T15:15:41 lite: disable debug logging
William Pitcock 43ca536b 2019-05-06T15:13:17 lite: disable some bloat
Emil Renner Berthing d926e75b 2019-03-06T16:03:32 main: fix personalities when argv[0] contains path
William Pitcock 8aa66222 2018-05-10T13:37:40 main: deduce the cross-compilation triplet based on program name
William Pitcock c4686829 2018-05-09T22:53:55 cli: implement --personality
William Pitcock e9324ee4 2018-05-09T22:21:45 cli: implement --dump-personality
William Pitcock 6b0e346c 2018-05-09T17:07:26 libpkgconf: refactor building the dir lists into separate concerns
William Pitcock 854490c5 2018-05-09T16:54:21 libpkgconf: add basic support for cross-compile personality objects
William Pitcock 7e9ed692 2018-03-18T18:04:02 libpkgconf: pkg: skip over -I cflags from Requires.internal nodes when building a cflags list
William Pitcock ad65bc4a 2018-03-18T18:01:59 libpkgconf: dependency: allow dependency nodes to be colored with traits
TingPing 60c05f56 2018-03-08T05:00:22 Improve prefix rewriting on Windows (#177) * cli: Default to rewriting prefix on Windows This matches `pkg-config` behavior * libpkgconf: Rewrite the prefix of all variables
William Pitcock 2156a74a 2018-02-28T13:00:53 cli: implement --fragment-filter (closes #167)
William Pitcock 2902141a 2018-02-12T00:42:27 build: move cli tool to cli folder