Commit Graph

1378 Commits (dbd78db67ff97552dcec907570410a51e93f2f77)

Author SHA1 Message Date
Ignacio Casal Quinteiro 9f17da92d2 On Windows the path prefix should be checked caseless 2018-09-17 15:41:27 +02:00
Ignacio Casal Quinteiro c9dffb8570 Fix build on windows with meson 2018-09-17 15:41:27 +02:00
William Pitcock 101b99b5b5 pkgconf 1.5.3. 2018-07-28 19:47:53 -05:00
William Pitcock 47284486df regress: add test for empty tuple buffer overflow issue 2018-07-28 19:45:57 -05:00
kaniini 3b5626a008 Merge branch 'master' of awilfox/pkgconf into master 2018-07-29 00:18:09 +00:00
A. Wilcox 9b7affe0b1
tuple: Ensure buf length is always >= 1 in dequote
If a key is defined with no value, dequote will allocate a buffer with a
length of 0.  Since the buffer's length is 0, any manipulation of its
content is UB.

Example .pc file:

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

xcflags=
xlibs= -lSM -lICE  -lX11

Name: Obt
Description: Openbox Toolkit Library
Version: 3.6
Requires: glib-2.0 libxml-2.0
Libs: -L${libdir} -lobt ${xlibs}
Cflags: -I${includedir}/openbox/3.6 ${xcflags}

Output using pkgconf 1.5.2 on x86_64 Linux/musl:

% pkgconf --cflags obt-3.5
-I/usr/include/openbox/3.6 \�\\�I\�\ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2
2018-07-28 19:06:33 -05:00
William Pitcock 4735e17287 pkgconf 1.5.2. 2018-07-19 17:30:33 -05:00
William Pitcock 7939732f80 build: install pkgconf-personality(5) manpage 2018-07-19 17:27:02 -05:00
William Pitcock 41f8031533 man: add pkgconf-personality(5) 2018-07-19 17:25:28 -05:00
kaniini 7e89a30442 Merge branch 'graham/system-paths-regression' of pkgconf/pkgconf into master 2018-07-05 13:35:54 +00:00
Graham Ollis fb08ae2bd2 environment variables for system paths should override compiled-in defaults 2018-06-25 06:36:57 -04:00
William Pitcock 5601568267 pkgconf 1.5.1. 2018-06-16 16:37:36 -05:00
William Pitcock 6f05fec4b5 pkg: give a correctly sized vtable to the parser 2018-06-16 16:35:44 -05:00
William Pitcock 8f6e071d58 tests: add test fixture for bogus .pc files 2018-06-16 16:35:19 -05:00
William Pitcock b77c04f343 update NEWS 2018-06-14 16:17:54 -05:00
William Pitcock b46bb93cd1 libpkgconf: tuple: properly dequote tuples when added from the parser (closes legacy github bug #186) 2018-06-14 16:12:04 -05:00
William Pitcock ae7faf73fd tests: add testcase for tuple dequoting bug (legacy github bug #186) 2018-06-14 16:11:21 -05:00
William Pitcock 854a6adfe9 tests: add tuple-quoting fixture 2018-06-14 15:31:00 -05:00
William Pitcock 3673494431 README: make it more clear the git repo has moved 2018-06-14 14:49:24 -05:00
Graham Ollis 273d1d0461 use pkgconf_strlcpy
On Debian/Ubuntu I get:

  CC       libpkgconf/personality.lo
  libpkgconf/personality.c: In function ‘load_personality_with_path’:
  libpkgconf/personality.c:195:3: warning: implicit declaration of function ‘strlcpy’ [-Wimplicit-function-declaration]
  strlcpy(pathbuf, path, sizeof pathbuf);
        ^~~~~~~
  CC       libpkgconf/parser.lo
  CCLD     libpkgconf.la
  ar: `u' modifier ignored since `D' is the default (see `U')
  CC       cli/pkgconf-main.o
  CC       cli/pkgconf-getopt_long.o
  CC       cli/pkgconf-renderer-msvc.o
  CCLD     pkgconf
  ./.libs/libpkgconf.so: undefined reference to `strlcpy'
2018-06-14 14:46:34 -05:00
William Pitcock 2b5202dd1a cmake: likewise 2018-06-14 14:45:33 -05:00
William Pitcock 782c88ce77 meson: set PERSONALITY_PATH to something useful 2018-06-14 14:43:01 -05:00
William Pitcock ea98ff3e5b not at github anymore 2018-06-04 13:13:42 -05:00
William Pitcock ab8df57205 NEWS: mention progress on #166 2018-05-10 13:41:47 -05:00
William Pitcock 8aa662227c main: deduce the cross-compilation triplet based on program name 2018-05-10 13:37:40 -05:00
William Pitcock db7845b4c7 configure: fix search path for triplets 2018-05-10 13:36:49 -05:00
William Pitcock 3ccc4454d1 libpkgconf: personality: ensure the path list is properly initialized before searching for triplets 2018-05-10 13:36:22 -05:00
William Pitcock c46868294f cli: implement --personality 2018-05-09 22:53:55 -05:00
William Pitcock 40897f246b libpkgconf: personality: remove const from the default personality, since it's not really const 2018-05-09 22:52:27 -05:00
William Pitcock 25b2105e93 libpkgconf: client: if tracing is disabled, don't try to trace 2018-05-09 22:52:07 -05:00
William Pitcock e6ce6c8edd libpkgconf: personality: fixups 2018-05-09 22:39:39 -05:00
William Pitcock e9324ee4bc cli: implement --dump-personality 2018-05-09 22:21:45 -05:00
William Pitcock 751348298b libpkgconf: personality: fill in the rest of the personality parser 2018-05-09 22:08:28 -05:00
William Pitcock 1244f8f8e7 libpkgconf: refactor out the rfc822 message parser so that the cross-personality code can share it 2018-05-09 21:21:39 -05:00
William Pitcock f702967d0a libpkgconf: pkg: refactor pkgconf_pkg_new_from_file to prepare to factor out the rfc822 parser 2018-05-09 19:56:30 -05:00
William Pitcock 0f17a4f390 libpkgconf: pkg: mark owning client earlier, to allow for refactoring out the rfc822 parser 2018-05-09 19:33:12 -05:00
William Pitcock 9439b683ca libpkgconf: personality: add stub cross personality loader 2018-05-09 19:27:53 -05:00
William Pitcock 6b0e346c28 libpkgconf: refactor building the dir lists into separate concerns 2018-05-09 17:07:26 -05:00
William Pitcock 854490c5b9 libpkgconf: add basic support for cross-compile personality objects 2018-05-09 16:54:21 -05:00
William Pitcock 43e8c7b44d libpkgconf: path: add path list copying function 2018-05-09 16:35:21 -05:00
William Pitcock 15efbc249b update NEWS 2018-05-09 15:59:13 -05:00
orbea 4704b9325c man: Silence mandoc warnings for pkg.m4.7
man -Tlint pkg.m4

  new sentence, new line
    (mdoc) A new sentence starts in the middle of a text line. Start it
    on a new input line to help formatters produce correct spacing.

  skipping paragraph macro
    In mdoc(7) documents, this happens

      - at the beginning and end of sections and subsections
      - right before non-compact lists and displays
      - at the end of items in non-column, non-compact lists
      - and for multiple consecutive paragraph macros.

    In man(7) documents, it happens

      - for empty P, PP, and LP macros
      - for IP macros having neither head nor body arguments
      - for br or sp right after SH or SS

  no blank before trailing delimiter
    (mdoc) The last argument of a macro that supports trailing
    delimiter arguments is longer than one byte and ends with a
    trailing delimiter. Consider inserting a blank such that the
    delimiter becomes a separate argument, thus moving it out of
    the scope of the macro.

  man: pkg.m4.7:30:34: WARNING: new sentence, new line
  man: pkg.m4.7:38:20: WARNING: new sentence, new line
  man: pkg.m4.7:33:2: WARNING: skipping paragraph macro: Pp after Sh
  man: pkg.m4.7:41:2: WARNING: skipping paragraph macro: Pp at the end of Ss
  man: pkg.m4.7:46:2: WARNING: skipping paragraph macro: Pp at the end of Ss
  man: pkg.m4.7:134:27: STYLE: no blank before trailing delimiter: Nm ... check.
  man: pkg.m4.7:143:27: STYLE: no blank before trailing delimiter: Nm ... check.

https://man.openbsd.org/mandoc.1
2018-04-10 00:42:52 -05:00
orbea 8d060b84da man: Silence more mandoc warnings
man -Tlint pkgconf

  skipping no-space macro
    (mdoc) An input line begins with an Ns macro, or the next argument
    after an Ns macro is an isolated closing delimiter. The macro is
    ignored.

  unusual Xr order
    (mdoc) In the SEE ALSO section, an Xr macro with a lower section
    number follows one with a higher number, or two Xr macros referring
    to the same section are out of alphabetical order.

  man: pkgconf.1:114:16: WARNING: skipping no-space macro
  man: pkgconf.1:114:39: WARNING: skipping no-space macro
  man: pkgconf.1:119:14: WARNING: skipping no-space macro
  man: pkgconf.1:119:35: WARNING: skipping no-space macro
  man: pkgconf.1:119:56: WARNING: skipping no-space macro
  man: pkgconf.1:128:28: WARNING: skipping no-space macro
  man: pkgconf.1:147:24: WARNING: skipping no-space macro
  man: pkgconf.1:217:2: WARNING: unusual Xr order: pc(5) after pkg.m4(7)

  man -Tlint pc

  whitespace at end of input line
    (mdoc, man, roff) Whitespace at the end of input lines is almost
    never semantically significant -- but in the odd case where it
    might be, it is extremely confusing when reviewing and maintaining
    documents.

  new sentence, new line
    (mdoc) A new sentence starts in the middle of a text line. Start it
    on a new input line to help formatters produce correct spacing.

  missing -width in -tag list, using 8n
    (mdoc) Every Bl macro having the -tag argument requires -width, too.

  man: pc.5:17:76: STYLE: whitespace at end of input line
  man: pc.5:18:50: WARNING: new sentence, new line
  man: pc.5:49:67: WARNING: new sentence, new line
  man: pc.5:87:38: WARNING: new sentence, new line
  man: pc.5:90:27: WARNING: new sentence, new line
  man: pc.5:113:66: WARNING: new sentence, new line
  man: pc.5:117:61: WARNING: new sentence, new line
  man: pc.5:123:49: WARNING: new sentence, new line
  man: pc.5:56:2: WARNING: missing -width in -tag list, using 6n: Bl -tag
  man: pc.5:80:2: WARNING: missing -width in -tag list, using 6n: Bl -tag

https://man.openbsd.org/mandoc.1
2018-04-09 22:28:35 -05:00
orbea 3e8a55e186 man: Silence mandoc warnings.
man -Tlint pkgconf

  new sentence, new line
    (mdoc) A new sentence starts in the middle of a text line. Start it
    on a new input line to help formatters produce correct spacing.

  man: pkgconf.1:23:24: WARNING: new sentence, new line
  man: pkgconf.1:42:15: WARNING: new sentence, new line
  man: pkgconf.1:44:73: WARNING: new sentence, new line
  man: pkgconf.1:53:63: WARNING: new sentence, new line
  man: pkgconf.1:60:58: WARNING: new sentence, new line
  man: pkgconf.1:69:66: WARNING: new sentence, new line
  man: pkgconf.1:85:56: WARNING: new sentence, new line
  man: pkgconf.1:153:7: WARNING: new sentence, new line
  man: pkgconf.1:202:43: WARNING: new sentence, new line

  https://man.openbsd.org/mandoc.1
2018-04-09 03:33:58 -05:00
Leorize f36ccc1d91 libpkgconf: add support for Haiku
client: use BELIBRARIES

On Haiku, BELIBRARIES is the equivalent to LIBRARY_PATH on many other
systems, while LIBRARY_PATH is instead the LD_LIBRARY_PATH of Haiku.

pkg: bootstrap package search paths with Haiku's find_paths

This commit adds build_default_pkgconfig_path. The function appends
to the list given the default pkgconfig paths, and will supersede
get_default_pkgconfig_path
2018-04-05 10:02:54 -05:00
William Pitcock 3f753fa3dd libpkgconf: dependency: preference uncoloured nodes in event of a dependency collision 2018-03-18 19:03:18 -05:00
William Pitcock 7e9ed6922d libpkgconf: pkg: skip over -I cflags from Requires.internal nodes when building a cflags list 2018-03-18 18:05:55 -05:00
William Pitcock ad65bc4a71 libpkgconf: dependency: allow dependency nodes to be colored with traits 2018-03-18 18:03:33 -05:00
William Pitcock 9a53290d8a tests: add new test fixtures for Requires.internal 2018-03-18 18:00:04 -05:00
William Pitcock f03ec3ff90 libpkgconf: add support for proposed Requires.internal extension 2018-03-18 15:46:53 -05:00