From b3f2504c1d05b5999b74b2135860fc721e3adf68 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 15 Jul 2022 07:41:50 +0100 Subject: gentoo auto-resync : 15:07:2022 - 07:41:50 --- sys-apps/plocate/Manifest | 4 +- ...plocate-1.1.16-error-to-fprintf-exit-musl.patch | 337 +++++++++++++++++++++ .../plocate-1.1.16-include-linux-stat_h-musl.patch | 30 ++ sys-apps/plocate/plocate-1.1.16.ebuild | 2 + 4 files changed, 372 insertions(+), 1 deletion(-) create mode 100644 sys-apps/plocate/files/plocate-1.1.16-error-to-fprintf-exit-musl.patch create mode 100644 sys-apps/plocate/files/plocate-1.1.16-include-linux-stat_h-musl.patch (limited to 'sys-apps/plocate') diff --git a/sys-apps/plocate/Manifest b/sys-apps/plocate/Manifest index 3dd280b3a3ac..c74e61a2b964 100644 --- a/sys-apps/plocate/Manifest +++ b/sys-apps/plocate/Manifest @@ -1,9 +1,11 @@ AUX plocate-1.1.15-meson-use-feature-option-for-libiouring.patch 1943 BLAKE2B cbcd583d93c3423c4cb8f13b3891ec34690ec1447c92f60291ec395437f11626aef82e669f470482c63232b9a7ebe73ed67cb7e0595a9f08b309f742c0d79d72 SHA512 110292358260f5fdf6f687b80c0375a91f224a190f6a25ec166c406cf4d39732493e0ebfea0fc02ccca18d95fdfcbff5d17d00cd10ac28c9a4ae46db8faf0ac9 +AUX plocate-1.1.16-error-to-fprintf-exit-musl.patch 10927 BLAKE2B a467330809ef59af57c37d584f6ccaf44da5e8ba0db38923f1d91bfdfc0061a9beab914e7527a7e532bdc0f4a2d9bb1f4438b63ade0a8947197dc233658663c9 SHA512 ad35e589f8efaa4998bc53b18c9bb7ffe201243640f86dbb39c7f43336ca068fc39cf357ebd1015cb57cdbbbf47f0ad81ddf7a757f17a9bd4ca1ea400bfef6ea +AUX plocate-1.1.16-include-linux-stat_h-musl.patch 860 BLAKE2B e22e96480d95da40dc5b935b61e2482d17c4754672ed9a33b7f98f2fa01f494f8a5b7fcf3354ae7861a6ea744906b135adb1658220776a6ec029c1623da67009 SHA512 475599d66efd9a6ceba650232a9f3b4480a6af6ef15c5d7bb6f85bcf63bf1b770e4c69c53f8bc308347639fb1a6eee45b5ae03d535c3a1c818bbda4729d10302 AUX plocate-cron.conf 237 BLAKE2B 531d6461309b520db31ab8f682ebbe56f2cd425222ebbc16a4662b606f5a0c6c62e4b1475a02ec3f244dde1ff73fe0ad16e0850aec53e6e8836fd0ba1273ad07 SHA512 ab055b052980783b5c63c716d7c12dcb19961a9f990c077e4f8c9bef4ca591bd281ac3941f872659a558a18b81c014dbc0655ff0a1872310670d8efc1d27cb00 AUX plocate.cron 1392 BLAKE2B 89f7eb05879c0c1a6c30376d36dc469dde0b94df3758ae659012cf9fb6e9fb2783a0d8e53ea5f79d99e2f00be72ef24a254f2d91038a30dc9e19cd2b250782f9 SHA512 b15583e98e253c2fcb658bd9c1c589bacddb8b033eb565333d9f990b1fd320fcfbe1d950657c8b5823d4cb034ccad369bdd2178ef955e42aa9c2f8e8a0268b3f AUX updatedb.conf 898 BLAKE2B de832ebc92e103ccaf8923b2eb872ad8e1ef36be2dfaa463a054e3e9fc256102db676ab0568501b695d943fcb74ae6ab01585bf7301cc6aa9ce6d709cc1690b5 SHA512 8b0b32e949636aef46c5439b0c963cc113306cedb1e5c84dbbfa2efba6562ca6dd602fdbfa0b3bc9095b0cf30a619ebb366535406cdb461f20d012ec1af7ff9d DIST plocate-1.1.15.tar.gz 73274 BLAKE2B 72dba287ba3357d2fa541542bf5e9d283eac672b7f3b2eebab687ecec930d6e91400eeb0f24c97d6133d69cae0308bc4473b7c8cbc5e263dd18ae8a7728a42a4 SHA512 772f82af38fd7b61fa51ac31f71d4a855542cfa617867da54b5ad8202f49f9e1861064a01e9b8f0937c3da902d84f19a50c1d0e4f037a491a9a6819b2413cfa1 DIST plocate-1.1.16.tar.gz 73397 BLAKE2B b6706145e9cba8b386761229cfbf23f8a9490596210b0a8dc467dfa6a6ed5b349c8f84cfcbe0430e89691afb50e257a3d331b1dcdc638611407587c8b623e72b SHA512 01dfc3ba434e6164f3e582fb102bd7ec0167a8f93e4cf9c3e72af804a8eda9b69b04fec20ee34fc19549d810b97076342f3a83b46705d0311ada6004d05da26c EBUILD plocate-1.1.15.ebuild 2195 BLAKE2B 707f602b2d22ab6a2856221c1d51b865d1cae1cfbc982e2ff839e70e0a7ff24ce15b9a967b30ca0a4fe7c9101d7e6e9e0ce782734752ced52098c65cd4b8121d SHA512 6394a30fb3ebb738d230c25d9e4857aca2ab5f31e279490b6b477dd871aaddf03cf5152b4dadbc92b8e87a06ccb8aaa3b8eec25af7fa92b0c2986ca136978ede -EBUILD plocate-1.1.16.ebuild 2196 BLAKE2B 634e6419b067d6f07c68e8e581221444106788996b17bed3af68d4d95e2c3b22cf78491608ec22435cf8e91e899480491a1c7edb6e73393e6bd82f81a2483879 SHA512 60b1b3de696979e06b1d94de11916b2e0b155af471775e4e4001f5d8dd228e63e0daff1a0975768a0e90f602a1b8463b7885a580c06c829ed11bf9a59a7e9988 +EBUILD plocate-1.1.16.ebuild 2317 BLAKE2B 943fce0b44252d0eabee8dc41cd6f1d68e405f2218fde801b09fe9edfd92490210cab90aff103a9467043e892de398c374a1bea9dabb2d6d91e064adc8ad9728 SHA512 f2e7f7d1bfcd0b67c6d1d0c9cdb17f956a1fe267331bc04e571c9274aaefb7f583c3f3fb11c82aef144d1aa5f5d3e7cb78cf43a8d785ab67bb05b211bcb86343 MISC metadata.xml 1437 BLAKE2B d3aece3d36e8cc4ceaf9947f0b535c7e2187a25cbb88910f704b1d72a2784831bfb746cca323c98183964688e6b5f2f2fa6bf54c97f8fc99eeea4ee946983e0d SHA512 b24d79da1b27531a7f3353128f7fbc583ef064f4aff58894e9d37dfa9144203c1f1898113aa31f82604aea93de66423e3313924bad25e31e075832c77a99c39e diff --git a/sys-apps/plocate/files/plocate-1.1.16-error-to-fprintf-exit-musl.patch b/sys-apps/plocate/files/plocate-1.1.16-error-to-fprintf-exit-musl.patch new file mode 100644 index 000000000000..6d108501307f --- /dev/null +++ b/sys-apps/plocate/files/plocate-1.1.16-error-to-fprintf-exit-musl.patch @@ -0,0 +1,337 @@ +https://bugs.gentoo.org/829580 +https://git.sesse.net/?p=plocate;a=commit;h=fd6198891d6fd9642effc0843fef6f23b991af3e + +From fd6198891d6fd9642effc0843fef6f23b991af3e Mon Sep 17 00:00:00 2001 +From: "Steinar H. Gunderson" +Date: Wed, 13 Jul 2022 22:31:54 +0200 +Subject: [PATCH 2/2] Remove dependency on non-POSIX header error.h. + +This helps compatibility with certain configurations of musl libc. +Note that the output format on updatedb.conf errors will change somewhat, +and only the first one will be reported followed by immediate exit +(unlike earlier, where all updatedb.conf errors would be output before exit). + +Based on a patch by Alfred Persson Forsberg. +--- + conf.cpp | 178 +++++++++++++++++++++++++++++-------------------------- + 1 file changed, 94 insertions(+), 84 deletions(-) + +diff --git a/conf.cpp b/conf.cpp +index 1055fd7..60dd93f 100644 +--- a/conf.cpp ++++ b/conf.cpp +@@ -22,7 +22,6 @@ any later version. + + #include "conf.h" + +-#include "error.h" + #include "lib.h" + + #include +@@ -167,11 +166,6 @@ uc_lex(void) + /* Fall through */ + case '\n': + uc_current_line++; +- if (uc_current_line == 0) { +- error_at_line(0, 0, UPDATEDB_CONF, uc_current_line - 1, +- _("warning: Line number overflow")); +- error_message_count--; /* Don't count as an error */ +- } + return UCT_EOL; + + case '=': +@@ -180,10 +174,9 @@ uc_lex(void) + case '"': { + while ((c = getc_unlocked(uc_file)) != '"') { + if (c == EOF || c == '\n') { +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("missing closing `\"'")); +- ungetc(c, uc_file); +- break; ++ fprintf(stderr, "%s:%u: missing closing `\"'\n", ++ UPDATEDB_CONF, uc_line); ++ exit(EXIT_FAILURE); + } + uc_lex_buf.push_back(c); + } +@@ -215,21 +208,18 @@ uc_lex(void) + static void + parse_updatedb_conf(void) + { +- int old_error_one_per_line; +- unsigned old_error_message_count; + bool had_prune_bind_mounts, had_prunefs, had_prunenames, had_prunepaths; + + uc_file = fopen(UPDATEDB_CONF, "r"); + if (uc_file == NULL) { +- if (errno != ENOENT) +- error(EXIT_FAILURE, errno, _("can not open `%s'"), UPDATEDB_CONF); +- goto err; ++ if (errno != ENOENT) { ++ perror(UPDATEDB_CONF); ++ exit(EXIT_FAILURE); ++ } ++ return; + } + flockfile(uc_file); + uc_current_line = 1; +- old_error_message_count = error_message_count; +- old_error_one_per_line = error_one_per_line; +- error_one_per_line = 1; + had_prune_bind_mounts = false; + had_prunefs = false; + had_prunenames = false; +@@ -263,40 +253,39 @@ parse_updatedb_conf(void) + break; + + case UCT_IDENTIFIER: +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("unknown variable `%s'"), uc_lex_buf.c_str()); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: unknown variable: `%s'\n", ++ UPDATEDB_CONF, uc_line, uc_lex_buf.c_str()); ++ exit(EXIT_FAILURE); + + default: +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("variable name expected")); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: variable name expected\n", ++ UPDATEDB_CONF, uc_line); ++ exit(EXIT_FAILURE); + } + if (*had_var != false) { +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("variable `%s' was already defined"), uc_lex_buf.c_str()); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: variable `%s' was already defined\n", ++ UPDATEDB_CONF, uc_line, uc_lex_buf.c_str()); ++ exit(EXIT_FAILURE); + } + *had_var = true; + var_token = token; + token = uc_lex(); + if (token != UCT_EQUAL) { +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("`=' expected after variable name")); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: `=' expected after variable name\n", ++ UPDATEDB_CONF, uc_line); ++ exit(EXIT_FAILURE); + } + token = uc_lex(); + if (token != UCT_QUOTED) { +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("value in quotes expected after `='")); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: value in quotes expected after `='\n", ++ UPDATEDB_CONF, uc_line); ++ exit(EXIT_FAILURE); + } + if (var_token == UCT_PRUNE_BIND_MOUNTS) { + if (parse_bool(&conf_prune_bind_mounts, uc_lex_buf.c_str()) != 0) { +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("invalid value `%s' of PRUNE_BIND_MOUNTS"), +- uc_lex_buf.c_str()); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: invalid value `%s' of PRUNE_BIND_MOUNTS\n", ++ UPDATEDB_CONF, uc_line, uc_lex_buf.c_str()); ++ exit(EXIT_FAILURE); + } + } else if (var_token == UCT_PRUNEFS) + var_add_values(&conf_prunefs, uc_lex_buf.c_str()); +@@ -308,12 +297,11 @@ parse_updatedb_conf(void) + abort(); + token = uc_lex(); + if (token != UCT_EOL && token != UCT_EOF) { +- error_at_line(0, 0, UPDATEDB_CONF, uc_line, +- _("unexpected data after variable value")); +- goto skip_to_eol; ++ fprintf(stderr, "%s:%u: unexpected data after variable value\n", ++ UPDATEDB_CONF, uc_line); ++ exit(EXIT_FAILURE); + } + /* Fall through */ +- skip_to_eol: + while (token != UCT_EOL) { + if (token == UCT_EOF) + goto eof; +@@ -321,14 +309,12 @@ parse_updatedb_conf(void) + } + } + eof: +- if (ferror(uc_file)) +- error(EXIT_FAILURE, 0, _("I/O error reading `%s'"), UPDATEDB_CONF); +- error_one_per_line = old_error_one_per_line; ++ if (ferror(uc_file)) { ++ perror(UPDATEDB_CONF); ++ exit(EXIT_FAILURE); ++ } + funlockfile(uc_file); + fclose(uc_file); +- if (error_message_count != old_error_message_count) +- exit(EXIT_FAILURE); +-err:; + } + + /* Command-line argument parsing */ +@@ -384,8 +370,11 @@ prepend_cwd(const string &path) + do + buf.resize(buf.size() * 1.5); + while ((res = getcwd(buf.data(), buf.size())) == NULL && errno == ERANGE); +- if (res == NULL) +- error(EXIT_FAILURE, errno, _("can not get current working directory")); ++ if (res == NULL) { ++ fprintf(stderr, "%s: %s: can not get current working directory\n", ++ program_invocation_name, strerror(errno)); ++ exit(EXIT_FAILURE); ++ } + buf.resize(strlen(buf.data())); + return buf + '/' + path; + } +@@ -438,54 +427,64 @@ parse_arguments(int argc, char *argv[]) + exit(EXIT_FAILURE); + + case 'B': +- if (got_prune_bind_mounts != false) +- error(EXIT_FAILURE, 0, +- _("--%s would override earlier command-line argument"), +- "prune-bind-mounts"); ++ if (got_prune_bind_mounts != false) { ++ fprintf(stderr, "%s: --%s would override earlier command-line argument\n", ++ program_invocation_name, "prune-bind-mounts"); ++ exit(EXIT_FAILURE); ++ } + got_prune_bind_mounts = true; +- if (parse_bool(&conf_prune_bind_mounts, optarg) != 0) +- error(EXIT_FAILURE, 0, _("invalid value `%s' of --%s"), optarg, +- "prune-bind-mounts"); ++ if (parse_bool(&conf_prune_bind_mounts, optarg) != 0) { ++ fprintf(stderr, "%s: invalid value %s of --%s\n", ++ program_invocation_name, optarg, "prune-bind-mounts"); ++ exit(EXIT_FAILURE); ++ } + break; + + case 'F': +- if (prunefs_changed != false) +- error(EXIT_FAILURE, 0, +- _("--%s would override earlier command-line argument"), +- "prunefs"); ++ if (prunefs_changed != false) { ++ fprintf(stderr, "%s: --%s would override earlier command-line argument\n", ++ program_invocation_name, "prunefs"); ++ exit(EXIT_FAILURE); ++ } + prunefs_changed = true; + conf_prunefs.clear(); + var_add_values(&conf_prunefs, optarg); + break; + + case 'N': +- if (prunenames_changed != false) +- error(EXIT_FAILURE, 0, +- _("--%s would override earlier command-line argument"), +- "prunenames"); ++ if (prunenames_changed != false) { ++ fprintf(stderr, "%s: --%s would override earlier command-line argument\n", ++ program_invocation_name, "prunenames"); ++ exit(EXIT_FAILURE); ++ } + prunenames_changed = true; + conf_prunenames.clear(); + var_add_values(&conf_prunenames, optarg); + break; + + case 'P': +- if (prunepaths_changed != false) +- error(EXIT_FAILURE, 0, +- _("--%s would override earlier command-line argument"), +- "prunepaths"); ++ if (prunepaths_changed != false) { ++ fprintf(stderr, "%s: --%s would override earlier command-line argument\n", ++ program_invocation_name, "prunepaths"); ++ exit(EXIT_FAILURE); ++ } + prunepaths_changed = true; + conf_prunepaths.clear(); + var_add_values(&conf_prunepaths, optarg); + break; + + case 'U': +- if (conf_scan_root != NULL) +- error(EXIT_FAILURE, 0, _("--%s specified twice"), +- "database-root"); ++ if (conf_scan_root != NULL) { ++ fprintf(stderr, "%s: --%s specified twice\n", ++ program_invocation_name, "database-root"); ++ exit(EXIT_FAILURE); ++ } + conf_scan_root = realpath(optarg, nullptr); +- if (conf_scan_root == NULL) +- error(EXIT_FAILURE, errno, _("invalid value `%s' of --%s"), optarg, +- "database-root"); ++ if (conf_scan_root == NULL) { ++ fprintf(stderr, "%s: %s: invalid value `%s' of --%s\n", ++ program_invocation_name, strerror(errno), optarg, "database-root"); ++ exit(EXIT_FAILURE); ++ } + break; + + case 'V': +@@ -517,13 +516,18 @@ parse_arguments(int argc, char *argv[]) + exit(EXIT_SUCCESS); + + case 'l': +- if (got_visibility != false) +- error(EXIT_FAILURE, 0, _("--%s specified twice"), +- "require-visibility"); ++ if (got_visibility != false) { ++ fprintf(stderr, "%s: --%s specified twice\n", ++ program_invocation_name, "require-visibility"); ++ exit(EXIT_FAILURE); ++ } ++ + got_visibility = true; +- if (parse_bool(&conf_check_visibility, optarg) != 0) +- error(EXIT_FAILURE, 0, _("invalid value `%s' of --%s"), optarg, +- "require-visibility"); ++ if (parse_bool(&conf_check_visibility, optarg) != 0) { ++ fprintf(stderr, "%s: invalid value `%s' of --%s", ++ program_invocation_name, optarg, "require-visibility"); ++ exit(EXIT_FAILURE); ++ } + break; + + case 'n': +@@ -532,8 +536,11 @@ parse_arguments(int argc, char *argv[]) + break; + + case 'o': +- if (!conf_output.empty()) +- error(EXIT_FAILURE, 0, _("--%s specified twice"), "output"); ++ if (!conf_output.empty()) { ++ fprintf(stderr, "%s: --%s specified twice", ++ program_invocation_name, "output"); ++ exit(EXIT_FAILURE); ++ } + conf_output = optarg; + break; + +@@ -558,8 +565,11 @@ parse_arguments(int argc, char *argv[]) + } + } + options_done: +- if (optind != argc) +- error(EXIT_FAILURE, 0, _("unexpected operand on command line")); ++ if (optind != argc) { ++ fprintf(stderr, "%s: unexpected operand on command line", ++ program_invocation_name); ++ exit(EXIT_FAILURE); ++ } + if (conf_scan_root == NULL) { + static char root[] = "/"; + +-- +2.35.1 + diff --git a/sys-apps/plocate/files/plocate-1.1.16-include-linux-stat_h-musl.patch b/sys-apps/plocate/files/plocate-1.1.16-include-linux-stat_h-musl.patch new file mode 100644 index 000000000000..a4b9fe4d1bc6 --- /dev/null +++ b/sys-apps/plocate/files/plocate-1.1.16-include-linux-stat_h-musl.patch @@ -0,0 +1,30 @@ +https://git.sesse.net/?p=plocate;a=commit;h=0125004cd28c5f9124632b594e51dde73af1691c +https://git.alpinelinux.org/aports/tree/community/plocate/include-statx.patch +https://bugs.gentoo.org/853769 + +From 0125004cd28c5f9124632b594e51dde73af1691c Mon Sep 17 00:00:00 2001 +From: "Steinar H. Gunderson" +Date: Sat, 25 Jun 2022 10:01:49 +0200 +Subject: [PATCH 1/2] Add a missing #include. + +Taken from the Alpine Linux packaging; seems to be for statx() +(presumably on musl libc). +--- + io_uring_engine.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/io_uring_engine.h b/io_uring_engine.h +index 688a6ae..bcb1058 100644 +--- a/io_uring_engine.h ++++ b/io_uring_engine.h +@@ -7,6 +7,7 @@ + #include + #include + #include ++#include + + struct io_uring_sqe; + #ifndef WITHOUT_URING +-- +2.35.1 + diff --git a/sys-apps/plocate/plocate-1.1.16.ebuild b/sys-apps/plocate/plocate-1.1.16.ebuild index baa634d92859..ea20d3fb9b1c 100644 --- a/sys-apps/plocate/plocate-1.1.16.ebuild +++ b/sys-apps/plocate/plocate-1.1.16.ebuild @@ -26,6 +26,8 @@ DEPEND="${RDEPEND}" PATCHES=( "${FILESDIR}"/${PN}-1.1.15-meson-use-feature-option-for-libiouring.patch + "${FILESDIR}"/${PN}-1.1.16-error-to-fprintf-exit-musl.patch + "${FILESDIR}"/${PN}-1.1.16-include-linux-stat_h-musl.patch ) pkg_setup() { -- cgit v1.2.3