diff options
Diffstat (limited to 'dev-util/pkgconf/files')
3 files changed, 207 insertions, 0 deletions
diff --git a/dev-util/pkgconf/files/pkgconf-2.1.0-digraph-test.patch b/dev-util/pkgconf/files/pkgconf-2.1.0-digraph-test.patch new file mode 100644 index 000000000000..90232ab4c15b --- /dev/null +++ b/dev-util/pkgconf/files/pkgconf-2.1.0-digraph-test.patch @@ -0,0 +1,41 @@ +https://github.com/pkgconf/pkgconf/pull/340 + +From db387172ac5fe2a3118945bf45bd90d8a2efeaf4 Mon Sep 17 00:00:00 2001 +From: Kai Pastor <dg0yt@darc.de> +Date: Wed, 17 Jan 2024 18:28:38 +0100 +Subject: [PATCH] Test digraph completeness for private-libs-duplication + +Complements 45073b7. +--- a/tests/requires.sh ++++ b/tests/requires.sh +@@ -10,6 +10,7 @@ tests_init \ + argv_parse2 \ + static_cflags \ + private_duplication \ ++ private_duplication_digraph \ + libs_static2 \ + missing \ + requires_internal \ +@@ -73,6 +74,21 @@ private_duplication_body() + pkgconf --static --libs-only-l private-libs-duplication + } + ++private_duplication_digraph_body() ++{ ++ export PKG_CONFIG_PATH="${selfdir}/lib1" ++ atf_check \ ++ -o 'match:"virtual:world" -> "private-libs-duplication"' \ ++ -o 'match:"virtual:world" -> "bar"' \ ++ -o 'match:"virtual:world" -> "baz"' \ ++ -o 'match:"virtual:world" -> "foo"' \ ++ -o 'match:"private-libs-duplication" -> "bar"' \ ++ -o 'match:"private-libs-duplication" -> "baz"' \ ++ -o 'match:"bar" -> "foo"' \ ++ -o 'match:"baz" -> "foo"' \ ++ pkgconf --static --libs-only-l private-libs-duplication --digraph ++} ++ + libs_static2_body() + { + export PKG_CONFIG_PATH="${selfdir}/lib1" + diff --git a/dev-util/pkgconf/files/pkgconf-2.1.0-fix-modversion.patch b/dev-util/pkgconf/files/pkgconf-2.1.0-fix-modversion.patch new file mode 100644 index 000000000000..3336a455794f --- /dev/null +++ b/dev-util/pkgconf/files/pkgconf-2.1.0-fix-modversion.patch @@ -0,0 +1,95 @@ +https://github.com/pkgconf/pkgconf/issues/335 +https://github.com/pkgconf/pkgconf/issues/332 +https://github.com/pkgconf/pkgconf/issues/317 +https://github.com/pkgconf/pkgconf/pull/336 + +https://github.com/pkgconf/pkgconf/commit/125af82dbe93eddadb7ec10eebac5087e9fbc451 +https://github.com/pkgconf/pkgconf/commit/b2f8386c32d1cb4dfa8f51c619c0c2a56a3544d6 +https://github.com/pkgconf/pkgconf/commit/5825e2c6d608ef74a97349e81d750ab95c53cf50 + +From 9a5c9be4ccef66a80df7533e00e525f87ff2fb01 Mon Sep 17 00:00:00 2001 +From: Kai Pastor <dg0yt@darc.de> +Date: Fri, 1 Dec 2023 21:20:39 +0100 +Subject: [PATCH 1/3] Test --modversion with constraint + +--- a/tests/regress.sh ++++ b/tests/regress.sh +@@ -27,6 +27,9 @@ tests_init \ + modversion_fullpath \ + modversion_provides \ + modversion_uninstalled \ ++ modversion_one_word_expression \ ++ modversion_two_word_expression \ ++ modversion_three_word_expression \ + pcpath \ + virtual_variable \ + fragment_collision \ +@@ -301,3 +304,21 @@ modversion_uninstalled_body() + atf_check -o inline:"1.2.3\n" \ + pkgconf --with-path="${selfdir}/lib1" --modversion omg + } ++ ++modversion_one_word_expression_body() ++{ ++ atf_check -o inline:"1.2.3\n" \ ++ pkgconf --with-path="${selfdir}/lib1" --modversion "foo > 1.0" ++} ++ ++modversion_two_word_expression_body() ++{ ++ atf_check -o inline:"1.2.3\n" \ ++ pkgconf --with-path="${selfdir}/lib1" --modversion foo "> 1.0" ++} ++ ++modversion_three_word_expression_body() ++{ ++ atf_check -o inline:"1.2.3\n" \ ++ pkgconf --with-path="${selfdir}/lib1" --modversion foo ">" 1.0 ++} + +From 0d4e6fa01074f5e540a7d89731edf44751bd17fc Mon Sep 17 00:00:00 2001 +From: Kai Pastor <dg0yt@darc.de> +Date: Fri, 1 Dec 2023 21:50:46 +0100 +Subject: [PATCH 2/3] Fix --modversion output + +--- a/cli/main.c ++++ b/cli/main.c +@@ -333,7 +333,12 @@ apply_modversion(pkgconf_client_t *client, pkgconf_pkg_t *world, void *data, int + pkgconf_dependency_t *dep = world_iter->data; + pkgconf_pkg_t *pkg = dep->match; + +- if (strcmp(pkg->why, queue_node->package)) ++ const size_t name_len = strlen(pkg->why); ++ if (name_len > strlen(queue_node->package) || ++ strncmp(pkg->why, queue_node->package, name_len) || ++ (queue_node->package[name_len] != 0 && ++ !isspace(queue_node->package[name_len]) && ++ !PKGCONF_IS_OPERATOR_CHAR(queue_node->package[name_len]))) + continue; + + if (pkg->version != NULL) { + +From ace73a690437488baea28130c98f0b1eaab4689e Mon Sep 17 00:00:00 2001 +From: Kai Pastor <dg0yt@darc.de> +Date: Fri, 1 Dec 2023 22:12:20 +0100 +Subject: [PATCH 3/3] Fix crash on two-word expressions + +--- a/cli/main.c ++++ b/cli/main.c +@@ -1405,6 +1405,15 @@ main(int argc, char *argv[]) + pkgconf_queue_push(&pkgq, package); + pkg_optind++; + } ++ else if (argv[pkg_optind + 2] == NULL) ++ { ++ char packagebuf[PKGCONF_BUFSIZE]; ++ ++ snprintf(packagebuf, sizeof packagebuf, "%s %s", package, argv[pkg_optind + 1]); ++ pkg_optind += 2; ++ ++ pkgconf_queue_push(&pkgq, packagebuf); ++ } + else + { + char packagebuf[PKGCONF_BUFSIZE]; + diff --git a/dev-util/pkgconf/files/pkgconf-2.1.0-traverse-only-once.patch b/dev-util/pkgconf/files/pkgconf-2.1.0-traverse-only-once.patch new file mode 100644 index 000000000000..80eab2485e1e --- /dev/null +++ b/dev-util/pkgconf/files/pkgconf-2.1.0-traverse-only-once.patch @@ -0,0 +1,71 @@ +https://issuetracker.google.com/issues/317357322 +https://bugs.gentoo.org/912843 +https://github.com/pkgconf/pkgconf/pull/339 + +From 478199b425b46e9dae36bb174f1bd08bf3ffb0f1 Mon Sep 17 00:00:00 2001 +From: Yi Chou <yich@google.com> +Date: Fri, 22 Dec 2023 00:13:31 +0800 +Subject: [PATCH] Use traverse_id to prevent traverse pkgdep twice + +--- a/libpkgconf/libpkgconf.h ++++ b/libpkgconf/libpkgconf.h +@@ -137,6 +137,8 @@ struct pkgconf_path_ { + #define PKGCONF_PKG_PROPF_CACHED 0x02 + #define PKGCONF_PKG_PROPF_UNINSTALLED 0x08 + #define PKGCONF_PKG_PROPF_VIRTUAL 0x10 ++#define PKGCONF_PKG_PROPF_VISITED 0x20 ++#define PKGCONF_PKG_PROPF_VISITED_PRIVATE 0x40 + + struct pkgconf_pkg_ { + int refcount; +@@ -176,6 +178,7 @@ struct pkgconf_pkg_ { + + uint64_t serial; + uint64_t identifier; ++ uint64_t traverse_id; + }; + + typedef bool (*pkgconf_pkg_iteration_func_t)(const pkgconf_pkg_t *pkg, void *data); +@@ -212,6 +215,7 @@ struct pkgconf_client_ { + + uint64_t serial; + uint64_t identifier; ++ uint64_t traverse_id; + + pkgconf_pkg_t **cache_table; + size_t cache_count; +--- a/libpkgconf/pkg.c ++++ b/libpkgconf/pkg.c +@@ -1628,6 +1628,21 @@ pkgconf_pkg_traverse_main(pkgconf_client_t *client, + if (maxdepth == 0) + return eflags; + ++ unsigned int visited_flag = (client->flags & PKGCONF_PKG_PKGF_ITER_PKG_IS_PRIVATE) ? PKGCONF_PKG_PROPF_VISITED_PRIVATE : PKGCONF_PKG_PROPF_VISITED; ++ ++ if (root->traverse_id == client->traverse_id) ++ { ++ if (root->flags & visited_flag) ++ return eflags; ++ } ++ else ++ { ++ root->traverse_id = client->traverse_id; ++ root->flags &= ~(PKGCONF_PKG_PROPF_VISITED | PKGCONF_PKG_PROPF_VISITED_PRIVATE); ++ } ++ ++ root->flags |= visited_flag; ++ + PKGCONF_TRACE(client, "%s: level %d, serial %"PRIu64, root->id, maxdepth, client->serial); + + if ((root->flags & PKGCONF_PKG_PROPF_VIRTUAL) != PKGCONF_PKG_PROPF_VIRTUAL || (client->flags & PKGCONF_PKG_PKGF_SKIP_ROOT_VIRTUAL) != PKGCONF_PKG_PKGF_SKIP_ROOT_VIRTUAL) +@@ -1672,6 +1687,9 @@ pkgconf_pkg_traverse(pkgconf_client_t *client, + int maxdepth, + unsigned int skip_flags) + { ++ static uint64_t traverse_id = 0; ++ client->traverse_id = ++traverse_id; ++ + if (root->flags & PKGCONF_PKG_PROPF_VIRTUAL) + client->serial++; + + |