Commit Graph

1577 Commits (master)

Author SHA1 Message Date
Ariadne Conill 1d37e711ce pkgconf 2.4.3. 2025-03-07 16:37:15 -08:00
Ariadne Conill 933e925a16 tests: add test for fragment tree topological correctness
Fixes: https://github.com/pkgconf/pkgconf/issues/385
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-07 16:07:00 -08:00
Ariadne Conill c440e2da49 libpkgconf: fragment: properly group fragments together
Previously, fragment groupings could be overzealous.

Related: https://github.com/pkgconf/pkgconf/issues/385
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-07 12:39:52 -08:00
Ariadne Conill 4a62f61217 cli: add --fragment-tree visualization tool
Related: https://github.com/pkgconf/pkgconf/issues/385
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-07 12:24:25 -08:00
Ariadne Conill 5c9ee7eeea pkgconf 2.4.2. 2025-03-07 10:48:21 -08:00
Ariadne Conill 0df752a40a build: restore bmake compatibility
$(filter-out) is a GNU make extension.

Related: https://github.com/pkgconf/pkgconf/issues/382
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-07 10:17:31 -08:00
Ariadne Conill 5555862144 libpkgconf: fragment: fix fragment length estimation
The switch from flat fragment lists to fragment trees made the fragment length
estimation more complicated.  Originally, the code when migrated just probed the
length of child fragments directly, but this only works for fragment trees where
there is only one level of children.

In some cases, there may be more children at a lower depth that were not properly
accounted for in the length estimation, which led to truncated buffers being
generated.

Fixes: https://github.com/pkgconf/pkgconf/issues/383
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-07 10:05:41 -08:00
Ariadne Conill 948c9416d6 tests: parser: add C comment parsing test
Related: https://github.com/pkgconf/pkgconf/issues/384
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-07 09:48:27 -08:00
Ariadne Conill f3531f9f4d tests: add c-comment test fixture
Some pkg-config files apparently contain C comments, even though only normal
Unix # comments are supported in pkg-config files.  Ugh.

So we now test for this explicitly and make sure pkgconf handles it
gracefully.

Related: https://github.com/pkgconf/pkgconf/issues/384
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-07 09:43:03 -08:00
Ariadne Conill 4ed28a7ad4 libpkgconf: parser: reset read buffer when bailing early to read a new line
Otherwise the old line would not be removed from the buffer.

Related: https://github.com/pkgconf/pkgconf/issues/384
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-07 09:41:18 -08:00
Ariadne Conill c8566a5e0c tests: parser: add truncation test
Related: https://github.com/pkgconf/pkgconf/issues/384
2025-03-07 09:32:18 -08:00
Ariadne Conill 2d6bb53b1e tests: add truncated test fixture
Related: https://github.com/pkgconf/pkgconf/issues/384
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-07 09:28:21 -08:00
Ariadne Conill bfc9ded550 libpkgconf: fileio: stop considering an empty buffer as a read failure
This is to be expected with truncated and empty lines in .pc files anyway.

Related: https://github.com/pkgconf/pkgconf/issues/384
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-07 09:26:16 -08:00
Ariadne Conill c0d188fb44 libpkgconf: parser: gracefully handle pkgconf_fgetline failures
With the move to dynamic buffering of pkg-config files, it is possible for
pkgconf_fgetline to leave the buffer in an unwritten state, where a buffer
will not be allocated.

We must gracefully handle this situation, so we bail early and re-enter the
loop to try reading the buffer again.  If it fails again, then we finish
parsing the already read pkg-config data.

Related: https://github.com/pkgconf/pkgconf/issues/384
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-07 09:24:02 -08:00
Ariadne Conill 7e59a32a4b pkgconf 2.4.1. 2025-03-06 14:29:11 -08:00
Ariadne Conill 8b3dd835ae libpkgconf: queue: always evaluate the entire dependency graph when solving
Some types of pkgconf queries may look at subsets of the entire DAG, but
we must consistently solve for the entire DAG so that each query has a
consistent view of the DAG.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-06 14:25:23 -08:00
Ariadne Conill 38053395e8 pkgconf 2.4.0.
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-05 17:03:55 -08:00
Ariadne Conill 866df023ab build: increase libpkgconf SOVERSION to 6
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-05 17:02:06 -08:00
Ariadne Conill 3611b056fb libpkgconf: pkg: consistently use pc_sysrootdir for path munging
In some cases, client.sysroot_dir would be used instead of the
package-specific override.

Fixes: https://github.com/pkgconf/pkgconf/pull/280
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-05 16:54:52 -08:00
Ariadne Conill 97072df584 tests: add tests for validating fragment groups
Fixes: https://github.com/pkgconf/pkgconf/issues/371
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-05 15:55:05 -08:00
Ariadne Conill b80ce00fc2 tests: add additional fragment grouping fixtures
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-05 15:50:38 -08:00
Ariadne Conill 680a7c535e libpkgconf: add placeholder flags fields to all public objects that lacked them
Since we are breaking ABI anyway, we may as well try to make the
ABI break more futureproof.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-05 15:47:29 -08:00
Ariadne Conill 1dc078f08a libpkgconf: fragment: add padding bytes to length estimation for child fragments
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-05 15:39:26 -08:00
Ariadne Conill 4f78e44959 libpkgconf: fragment: track terminating fragments like -Wl,--end-group
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-05 15:36:56 -08:00
Ariadne Conill 6ec7df4d19 libpkgconf: fragment: plug memory leak when child fragments are present
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-05 15:07:15 -08:00
Ariadne Conill 543ab92639 libpkgconf: fragment: track text fragments as a tree instead of a flat list
This allows us to have more insight into the relationships between
text fragments, for example linker groups.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-05 15:00:54 -08:00
Ariadne Conill 5fbabf143c libpkgconf: fragment: add -nodefaultlibs to special flags list
Related: https://github.com/pkgconf/pkgconf/issues/371
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-04 14:25:43 -08:00
Ariadne Conill 97fbb4ffb9 tests: add fixture for fragment groups
Related: https://github.com/pkgconf/pkgconf/issues/371
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-03-04 14:19:37 -08:00
Ariadne Conill a6b1299537 tests: add regression test for --variable
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-18 16:35:00 -08:00
Ariadne Conill ea0e64582a cli: main: disable graph recursion with --variable
This was just a simple logic error.

Fixes: 4697d63 ("cli: main: allow use of multiple package names in solution-based queries")
Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
Closes: https://github.com/pkgconf/pkgconf/issues/376
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-18 16:34:18 -08:00
Ariadne Conill 9d94f4d28f meson: define kyua/atf-sh binary dependencies as native
They are used to run tests on the host.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-18 16:23:52 -08:00
Ariadne Conill 792e2c6225
libpkgconf: path: get rid of unused win32-specific variable
Windows builder was warning about this.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-04 17:00:30 -08:00
Ariadne Conill e8dc0e20a7
libpkgconf: parser: finalize the parsing buffer when done with it
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-04 16:57:14 -08:00
Ariadne Conill 5fe482b247
libpkgconf: buffer: pkgconf_buffer_lastc should always be 0 on an empty buffer
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-04 16:49:18 -08:00
Ariadne Conill 88258bd908
libpkgconf: buffer: round up buffer allocations to 4KB granules
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-04 16:31:01 -08:00
Ariadne Conill f0aa4071ef cli: fix warning in solver state debug function
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-03 05:33:53 -08:00
Ariadne Conill a4de29302c libpkgconf: fileio: use bool for fgetline return type instead of a pointer
(we internally look at the raw buffer anyway)

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-03 05:31:40 -08:00
Ariadne Conill 68e8f7208b tests: add test for issue #370
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-02 03:11:37 -08:00
Ariadne Conill f982cbdab9 tests: add fixtures for issue #370
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-02 03:08:49 -08:00
Ariadne Conill 6f1055d00d libpkgconf: queue: stop considering the lack of a pre-loaded match in a dependency node as a fatal error
This is a performance optimization, not an absolute source of truth.
We will evaluate the dependency node lazily in these cases anyway...

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-02 03:06:12 -08:00
Ariadne Conill b861bcad49 cli: solution: denote private dependency nodes in the solution
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-02 02:58:58 -08:00
Ariadne Conill a79952a084 libpkgconf: queue: always walk requires.private lists internally
This ensures the internal dependency graph solution is always consistent.
We filter out the nodes we don't care about in cases where we need to filter
as of commit 86602bc, so now we can just simplify the solving a little bit.

Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-02 02:30:38 -08:00
Ariadne Conill 86602bc17e libpkgconf: pkg: skip over private dependency nodes when --static is not explicitly requested
Fixes: 197fcad ("queue: add flattening code")
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-02 02:10:00 -08:00
Ariadne Conill d0f8f3f228 libpkgconf: fileio: rework to use pkgconf_buffer, allowing larger than 64KB lines
Fixes: 130907d ("fileio: add routine for portably yanking lines out of a FILE stream")
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-02 01:33:06 -08:00
Ariadne Conill 83a2ae0434 libpkgconf: buffer: fix memory allocation logic, add push/trim byte functions
Fixes: 1001750 ("libpkgconf: add buffer management functions")
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2025-02-02 01:30:54 -08:00
Ariadne Conill bd043cae9f libpkgconf: buffer: add PKGCONF_BUFFER_INITIALIZER 2025-02-02 00:31:54 -08:00
Ariadne Conill 10017500ff libpkgconf: add buffer management functions
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
2024-12-09 19:49:50 -08:00
Ariadne Conill 5c535171a5
Merge pull request #363 from SoapGentoo/pcfiledir_symlink
`${pcfiledir}` symlink resolving
2024-12-09 19:26:05 -08:00
Ariadne Conill 3cd6b8c523
Merge pull request #369 from jas4711/pkgm4-fix-fsf-license-and-serial
pkg.m4: Bump serial.  Use URL instead of obsolete FSF postal address.
2024-12-09 19:25:47 -08:00
Simon Josefsson 11236d44fd
pkg.m4: Bump serial. Use URL instead of obsolete FSF postal address.
Signed-off-by: Simon Josefsson <simon@josefsson.org>
2024-11-19 10:33:19 +01:00