[gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/files/
commit: 8a7a2361ce115ffa3e2e9200ab13d40959404bcc Author: Michael Mair-Keimberger levelnine at> AuthorDate: Sun Jan 1 13:41:23 2023 + Commit: Florian Schmaus gentoo org> CommitDate: Sun Jan 1 13:59:07 2023 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a7a2361 sys-apps/plocate: remove unused patches Signed-off-by: Michael Mair-Keimberger levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/28919 Signed-off-by: Florian Schmaus gentoo.org> ...plocate-1.1.16-error-to-fprintf-exit-musl.patch | 337 - .../plocate-1.1.16-include-linux-stat_h-musl.patch | 30 -- 2 files changed, 367 deletions(-) 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 deleted file mode 100644 index 6d108501307f.. --- a/sys-apps/plocate/files/plocate-1.1.16-error-to-fprintf-exit-musl.patch +++ /dev/null @@ -1,337 +0,0 @@ -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,
[gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/files/, sys-apps/plocate/
commit: 8ae581f317277614e761ff7659de8ba16abb2bab Author: Alfred Persson Forsberg catcream org> AuthorDate: Thu Jul 7 17:36:44 2022 + Commit: Sam James gentoo org> CommitDate: Fri Jul 15 01:17:05 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ae581f3 sys-apps/plocate: Fix build for musl Read each patch for explaination, both are now upstreamed! Should be in 1.1.17 (or whatever next release will be called). Closes: https://bugs.gentoo.org/show_bug.cgi?id=829580 Closes: https://bugs.gentoo.org/show_bug.cgi?id=853769 Signed-off-by: Alfred Persson Forsberg catcream.org> Closes: https://github.com/gentoo/gentoo/pull/26268 Signed-off-by: Sam James gentoo.org> ...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 + 3 files changed, 369 insertions(+) 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 ..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: +-
[gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/files/
commit: cdc384f7c94893a3e2df5db35968fdd0318c0eac Author: Michael Mair-Keimberger levelnine at> AuthorDate: Mon Apr 18 07:05:15 2022 + Commit: Sam James gentoo org> CommitDate: Mon Apr 18 07:15:41 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cdc384f7 sys-apps/plocate: remove unused patch Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Michael Mair-Keimberger levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/25074 Signed-off-by: Sam James gentoo.org> ...0-meson-use-feature-option-for-libiouring.patch | 38 -- 1 file changed, 38 deletions(-) diff --git a/sys-apps/plocate/files/plocate-1.1.10-meson-use-feature-option-for-libiouring.patch b/sys-apps/plocate/files/plocate-1.1.10-meson-use-feature-option-for-libiouring.patch deleted file mode 100644 index 183c9f8e7fff.. --- a/sys-apps/plocate/files/plocate-1.1.10-meson-use-feature-option-for-libiouring.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 562128212376305bac8edd10d80c24f1223f1870 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= -Date: Thu, 19 Aug 2021 12:03:39 +0200 -Subject: [PATCH plocate] meson: use feature option for libiouring - -source-based distributions would prefer to allow this option to be -disabled without a hack, regardless of is libiouring installed or not, -and meson already supports feature options for this purpose. - meson.build | 2 +- - meson_options.txt | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - -diff --git a/meson.build b/meson.build -index 6fb0f74..fb79e3f 100644 a/meson.build -+++ b/meson.build -@@ -10,7 +10,7 @@ add_project_arguments('-DPACKAGE_VERSION="' + meson.project_version() + '"', lan - add_project_arguments('-DPACKAGE_BUGREPORT="steinar+ploc...@gunderson.no"', language: 'cpp') - - cxx = meson.get_compiler('cpp') --uringdep = dependency('liburing', required: false) -+uringdep = dependency('liburing', required: get_option('use_libiouring')) - zstddep = dependency('libzstd') - threaddep = dependency('threads') - atomicdep = cxx.find_library('atomic', required: false) -diff --git a/meson_options.txt b/meson_options.txt -index 8ac13c5..9c90bf0 100644 a/meson_options.txt -+++ b/meson_options.txt -@@ -3,3 +3,4 @@ option('install_systemd', type: 'boolean', value: true, description: 'Install sy - option('systemunitdir', type: 'string', description: 'Where to install systemd units to (default: autodetect)') - option('locategroup', type: 'string', value: 'plocate', description: 'Group that the install script will use for the .db file') - option('updatedb_progname', type: 'string', value: 'updatedb', description: 'Binary name of updatedb') -+option('use_libiouring', type: 'feature', value: 'auto', description: 'Enable libiouring dependency (default: autodetect)') --- -2.31.1 -
[gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/files/
commit: 6f2a63f38bc257f03b73c88b6ed2d09677d7d586 Author: Michael Mair-Keimberger levelnine at> AuthorDate: Tue Nov 16 16:56:51 2021 + Commit: Joonas Niilola gentoo org> CommitDate: Tue Nov 16 17:02:34 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6f2a63f3 sys-apps/plocate: remove unused patch Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Michael Mair-Keimberger levelnine.at> Closes: https://github.com/gentoo/gentoo/pull/22976 Signed-off-by: Joonas Niilola gentoo.org> .../files/plocate-1.1.5-no-systemd-check.patch | 21 - 1 file changed, 21 deletions(-) diff --git a/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch b/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch deleted file mode 100644 index 2635a8007882.. --- a/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch +++ /dev/null @@ -1,21 +0,0 @@ -Unconditionally install systemd unit a/meson.build -+++ b/meson.build -@@ -76,17 +76,9 @@ -configuration: conf_data) - install_man(updatedb_conf_man) - --if get_option('install_systemd') -- systemd = dependency('systemd', required: false) -- if systemd.found() -- unitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir') - updatedb_service = configure_file(input: 'plocate-updatedb.service.in', - output: 'plocate-updatedb.service', - configuration: conf_data) -- install_data(updatedb_service, install_dir: unitdir) -- install_data('plocate-updatedb.timer', install_dir: unitdir) -- endif --endif - - # Requires having TurboPFor checked out, so not built by default. - # Unless you have a recent Meson, there's no apparently good way
[gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/files/, sys-apps/plocate/
commit: d5806bdf4686f5af5f9f7b06741578c3e40be456 Author: Arsen Arsenović aarsen me> AuthorDate: Tue Aug 24 22:41:26 2021 + Commit: Florian Schmaus gentoo org> CommitDate: Wed Aug 25 07:52:33 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5806bdf sys-apps/plocate: add version 1.1.10 Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Arsen Arsenović aarsen.me> Closes: https://github.com/gentoo/gentoo/pull/22022 Signed-off-by: Florian Schmaus gentoo.org> sys-apps/plocate/Manifest | 1 + ...0-meson-use-feature-option-for-libiouring.patch | 38 ++ sys-apps/plocate/plocate-1.1.10.ebuild | 81 ++ 3 files changed, 120 insertions(+) diff --git a/sys-apps/plocate/Manifest b/sys-apps/plocate/Manifest index 4d4a1d480d4..7a35e770f07 100644 --- a/sys-apps/plocate/Manifest +++ b/sys-apps/plocate/Manifest @@ -1 +1,2 @@ +DIST plocate-1.1.10.tar.gz 7 BLAKE2B 2d84177454380c9e806a46a6e7057aca15b65c9d83179ba35062d0b8772e7cb3ff50d594c294d73157e7705d4b2eea3f12d07e614076e6a6c7a9b532f42640f5 SHA512 eee4a8982b8fff18793cd06c35cdea501226fae6409df02e8bed3d14feb3ed4ba6c29e907f36f5efb74202e8926547def83379b03aeb6348e1a6e7b51f12fdb9 DIST plocate-1.1.8.tar.gz 71569 BLAKE2B 06ad0e9535b76bf0102cdeeb6014e2d84f85f51f5926520566e9c6871f04ac09651bb0674ed679d2a4c0d4e516e55dfef35a7021112fad3549bf76993554aeb5 SHA512 a685347df64ac1a3eb7789cb7023b4d0ffed5fb7435a4bd88c3943991e145a387829532ec0c01d30d851b97b8d3173ff4c7c274775e639b75f0b1b45e5bca2a6 diff --git a/sys-apps/plocate/files/plocate-1.1.10-meson-use-feature-option-for-libiouring.patch b/sys-apps/plocate/files/plocate-1.1.10-meson-use-feature-option-for-libiouring.patch new file mode 100644 index 000..183c9f8e7ff --- /dev/null +++ b/sys-apps/plocate/files/plocate-1.1.10-meson-use-feature-option-for-libiouring.patch @@ -0,0 +1,38 @@ +From 562128212376305bac8edd10d80c24f1223f1870 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= +Date: Thu, 19 Aug 2021 12:03:39 +0200 +Subject: [PATCH plocate] meson: use feature option for libiouring + +source-based distributions would prefer to allow this option to be +disabled without a hack, regardless of is libiouring installed or not, +and meson already supports feature options for this purpose. +--- + meson.build | 2 +- + meson_options.txt | 1 + + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 6fb0f74..fb79e3f 100644 +--- a/meson.build b/meson.build +@@ -10,7 +10,7 @@ add_project_arguments('-DPACKAGE_VERSION="' + meson.project_version() + '"', lan + add_project_arguments('-DPACKAGE_BUGREPORT="steinar+ploc...@gunderson.no"', language: 'cpp') + + cxx = meson.get_compiler('cpp') +-uringdep = dependency('liburing', required: false) ++uringdep = dependency('liburing', required: get_option('use_libiouring')) + zstddep = dependency('libzstd') + threaddep = dependency('threads') + atomicdep = cxx.find_library('atomic', required: false) +diff --git a/meson_options.txt b/meson_options.txt +index 8ac13c5..9c90bf0 100644 +--- a/meson_options.txt b/meson_options.txt +@@ -3,3 +3,4 @@ option('install_systemd', type: 'boolean', value: true, description: 'Install sy + option('systemunitdir', type: 'string', description: 'Where to install systemd units to (default: autodetect)') + option('locategroup', type: 'string', value: 'plocate', description: 'Group that the install script will use for the .db file') + option('updatedb_progname', type: 'string', value: 'updatedb', description: 'Binary name of updatedb') ++option('use_libiouring', type: 'feature', value: 'auto', description: 'Enable libiouring dependency (default: autodetect)') +-- +2.31.1 + diff --git a/sys-apps/plocate/plocate-1.1.10.ebuild b/sys-apps/plocate/plocate-1.1.10.ebuild new file mode 100644 index 000..d198d630c59 --- /dev/null +++ b/sys-apps/plocate/plocate-1.1.10.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit linux-info meson systemd + +DESCRIPTION="Posting locate is a much faster locate" +HOMEPAGE="https://plocate.sesse.net/; +SRC_URI="https://plocate.sesse.net/download/${P}.tar.gz; + +# GPL-2 for updatedb +# GPL-2+ for plocate itself +LICENSE="GPL-2 GPL-2+" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="+io-uring" + +RDEPEND=" + acct-group/locate + app-arch/zstd:= + io-uring? ( sys-libs/liburing:= ) + !sys-apps/mlocate +" +DEPEND="${RDEPEND}" + +CONFIG_CHECK="~IO_URING" +ERROR_IO_URING="required for USE=io-uring" + +PATCHES=( + "${FILESDIR}"/${PN}-1.1.10-meson-use-feature-option-for-libiouring.patch +) + +src_prepare() { + # We'll install the manpage ourself to locate.1 + sed -i "/install_man('plocate.1')/d" meson.build || die + + default +} + +src_configure() { + local emesonargs=( +
[gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/files/, sys-apps/plocate/
commit: fa05345540e33508d93f924e2b34c12e831c0bc9 Author: Sam James gentoo org> AuthorDate: Thu Aug 19 02:24:40 2021 + Commit: Sam James gentoo org> CommitDate: Thu Aug 19 02:24:40 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fa053455 Revert "sys-apps/plocate: add version 1.1.9" Didn't mean to push! This reverts commit f86f7acf1b4cb919a762e1595dea1011463099c7. Signed-off-by: Sam James gentoo.org> sys-apps/plocate/Manifest | 1 - .../files/plocate-1.1.9-no-systemd-check.patch | 38 -- sys-apps/plocate/plocate-1.1.9.ebuild | 82 -- 3 files changed, 121 deletions(-) diff --git a/sys-apps/plocate/Manifest b/sys-apps/plocate/Manifest index 381cb363f74..4d4a1d480d4 100644 --- a/sys-apps/plocate/Manifest +++ b/sys-apps/plocate/Manifest @@ -1,2 +1 @@ DIST plocate-1.1.8.tar.gz 71569 BLAKE2B 06ad0e9535b76bf0102cdeeb6014e2d84f85f51f5926520566e9c6871f04ac09651bb0674ed679d2a4c0d4e516e55dfef35a7021112fad3549bf76993554aeb5 SHA512 a685347df64ac1a3eb7789cb7023b4d0ffed5fb7435a4bd88c3943991e145a387829532ec0c01d30d851b97b8d3173ff4c7c274775e639b75f0b1b45e5bca2a6 -DIST plocate-1.1.9.tar.gz 71973 BLAKE2B c761735ee54c6f8430839dee1582b10e7eaf15e29cefed94d59221d0111d002cac88d86050099b6cdf0130b71a995c0d26fe57cbd9eccdf00b3489f5bd1ae432 SHA512 2a2bffa338add760e598ac14b68d063cb0cc7df244b6af84f70166294a0c0b66acdedce432d0573e8f2d8dcd3ddba597baa407e93cddc5c58a0b492a1e031135 diff --git a/sys-apps/plocate/files/plocate-1.1.9-no-systemd-check.patch b/sys-apps/plocate/files/plocate-1.1.9-no-systemd-check.patch deleted file mode 100644 index 677f20fc799..000 --- a/sys-apps/plocate/files/plocate-1.1.9-no-systemd-check.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 0b1e568bc66df9fdb0bfd6f54b4ff2e540769dbe Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= -Date: Thu, 19 Aug 2021 02:36:54 +0200 -Subject: [PATCH] unconditionally configure systemd service - - meson.build | 15 +++ - 1 file changed, 3 insertions(+), 12 deletions(-) - -diff --git a/meson.build b/meson.build -index dc14eb1..9a3b3fe 100644 a/meson.build -+++ b/meson.build -@@ -76,18 +76,9 @@ updatedb_conf_man = configure_file(input: 'updatedb.conf.5.in', -configuration: conf_data) - install_man(updatedb_conf_man) - --if get_option('install_systemd') -- unitdir = get_option('systemunitdir') -- if unitdir == '' -- unitdir = dependency('systemd').get_pkgconfig_variable('systemdsystemunitdir') -- endif -- -- updatedb_service = configure_file(input: 'plocate-updatedb.service.in', -- output: 'plocate-updatedb.service', -- configuration: conf_data) -- install_data(updatedb_service, install_dir: unitdir) -- install_data('plocate-updatedb.timer', install_dir: unitdir) --endif -+updatedb_service = configure_file(input: 'plocate-updatedb.service.in', -+ output: 'plocate-updatedb.service', -+ configuration: conf_data) - - # Requires having TurboPFor checked out, so not built by default. - # Unless you have a recent Meson, there's no apparently good way --- -2.31.1 - diff --git a/sys-apps/plocate/plocate-1.1.9.ebuild b/sys-apps/plocate/plocate-1.1.9.ebuild deleted file mode 100644 index 8153e282f37..000 --- a/sys-apps/plocate/plocate-1.1.9.ebuild +++ /dev/null @@ -1,82 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit linux-info meson systemd - -DESCRIPTION="Posting locate is a much faster locate" -HOMEPAGE="https://plocate.sesse.net/; -SRC_URI="https://plocate.sesse.net/download/${P}.tar.gz; - -# GPL-2 for updatedb -# GPL-2+ for plocate itself -LICENSE="GPL-2 GPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~arm64" -IUSE="+io-uring" - -RDEPEND=" - acct-group/locate - app-arch/zstd:= - io-uring? ( sys-libs/liburing:= ) - !sys-apps/mlocate -" -DEPEND="${RDEPEND}" - -CONFIG_CHECK="~IO_URING" -ERROR_IO_URING="required for USE=io-uring" - -PATCHES=( - "${FILESDIR}"/${PN}-1.1.9-no-systemd-check.patch -) - -src_prepare() { - # Pretend liburing dep doesn't exist when USE flag off - if ! use io-uring; then - sed -i "s/dependency('liburing/dependency('/" meson.build || die - fi - - # We'll install the manpage ourself to locate.1 - sed -i "/install_man('plocate.1')/d" meson.build || die - - default -} - -src_configure() { - local emesonargs=( - -Dlocategroup=locate - ) - meson_src_configure -} - -src_install() { - meson_src_install - dodoc README NEWS - newman "${S}"/${PN}.1 locate.1 - dosym plocate /usr/bin/locate - - insinto /etc - doins "${FILESDIR}"/updatedb.conf - doins "${FILESDIR}"/plocate-cron.conf - fperms 0644 /etc/{updatedb,plocate-cron}.conf - - insinto /etc/cron.daily -
[gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/files/
commit: 45861924b720544c3a19d567c2a385b02d2d103d Author: Sam James gentoo org> AuthorDate: Sat Mar 20 05:48:49 2021 + Commit: Sam James gentoo org> CommitDate: Sat Mar 20 05:48:49 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45861924 sys-apps/plocate: add explanatory note to systemd unit patch Signed-off-by: Sam James gentoo.org> sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch | 1 + 1 file changed, 1 insertion(+) diff --git a/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch b/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch index eeed8014056..2635a800788 100644 --- a/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch +++ b/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch @@ -1,3 +1,4 @@ +Unconditionally install systemd unit --- a/meson.build +++ b/meson.build @@ -76,17 +76,9 @@
[gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/files/
commit: ae3d4afb6099d44b57512707da1b461e6982b2e0 Author: Sam James gentoo org> AuthorDate: Sat Mar 20 05:48:23 2021 + Commit: Sam James gentoo org> CommitDate: Sat Mar 20 05:48:23 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae3d4afb sys-apps/plocate: drop unnecessary patch metadata Signed-off-by: Sam James gentoo.org> sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch b/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch index b54eda0ec38..eeed8014056 100644 --- a/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch +++ b/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch @@ -1,6 +1,5 @@ -diff -aur a/meson.build b/meson.build a/meson.build 2021-03-05 16:35:00.411781507 -0500 -+++ b/meson.build 2021-03-05 16:35:41.641782317 -0500 +--- a/meson.build b/meson.build @@ -76,17 +76,9 @@ configuration: conf_data) install_man(updatedb_conf_man)
[gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/files/, sys-apps/plocate/
commit: fb791526ce7bc605f666b2e833962fafaaa317fd Author: Jeffrey Lin icurse nl> AuthorDate: Fri Mar 5 15:31:54 2021 + Commit: Sam James gentoo org> CommitDate: Sat Mar 20 05:33:38 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb791526 sys-apps/plocate: new package Package-Manager: Portage-3.0.16, Repoman-3.0.2 Signed-off-by: Jeffrey Lin icurse.nl> Closes: https://github.com/gentoo/gentoo/pull/19786 Signed-off-by: Sam James gentoo.org> sys-apps/plocate/Manifest | 1 + .../files/plocate-1.1.5-no-systemd-check.patch | 21 ++ sys-apps/plocate/files/plocate-cron.conf | 9 +++ sys-apps/plocate/files/plocate.cron| 51 ++ sys-apps/plocate/files/updatedb.conf | 16 + sys-apps/plocate/metadata.xml | 33 ++ sys-apps/plocate/plocate-1.1.5.ebuild | 77 ++ 7 files changed, 208 insertions(+) diff --git a/sys-apps/plocate/Manifest b/sys-apps/plocate/Manifest new file mode 100644 index 000..17237dc8ed4 --- /dev/null +++ b/sys-apps/plocate/Manifest @@ -0,0 +1 @@ +DIST plocate-1.1.5.tar.gz 69090 BLAKE2B 70b398eb1a5d7b36294188966ef5f46843d9db9f41021a294d88795944412b4ef3819771082955a74a9945296fa14c59461a4ab4af197691f7085a40eeb7f0ef SHA512 6169ea7b3587e12e555a42e0c70e149626810f5e6f9f1f03ca1b069d7892d45bc52cabf072324eaa6f14055943dd680a71642914c0218a770e2b00a22c75efbc diff --git a/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch b/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch new file mode 100644 index 000..b54eda0ec38 --- /dev/null +++ b/sys-apps/plocate/files/plocate-1.1.5-no-systemd-check.patch @@ -0,0 +1,21 @@ +diff -aur a/meson.build b/meson.build +--- a/meson.build 2021-03-05 16:35:00.411781507 -0500 b/meson.build 2021-03-05 16:35:41.641782317 -0500 +@@ -76,17 +76,9 @@ +configuration: conf_data) + install_man(updatedb_conf_man) + +-if get_option('install_systemd') +- systemd = dependency('systemd', required: false) +- if systemd.found() +- unitdir = systemd.get_pkgconfig_variable('systemdsystemunitdir') + updatedb_service = configure_file(input: 'plocate-updatedb.service.in', + output: 'plocate-updatedb.service', + configuration: conf_data) +- install_data(updatedb_service, install_dir: unitdir) +- install_data('plocate-updatedb.timer', install_dir: unitdir) +- endif +-endif + + # Requires having TurboPFor checked out, so not built by default. + # Unless you have a recent Meson, there's no apparently good way diff --git a/sys-apps/plocate/files/plocate-cron.conf b/sys-apps/plocate/files/plocate-cron.conf new file mode 100644 index 000..f207344a9e6 --- /dev/null +++ b/sys-apps/plocate/files/plocate-cron.conf @@ -0,0 +1,9 @@ +# nice value to run at: see -n in nice(1) +NICE="19" + +# ionice class to run at: see -c in ionice(1) +# you have to install sys-apps/util-linux manually +IONICE_CLASS="2" + +# ionice priority to run at: see -n in ionice(1) +IONICE_PRIORITY="7" diff --git a/sys-apps/plocate/files/plocate.cron b/sys-apps/plocate/files/plocate.cron new file mode 100644 index 000..ebcfcbffe7b --- /dev/null +++ b/sys-apps/plocate/files/plocate.cron @@ -0,0 +1,51 @@ +#! /bin/sh +set -e + +# check if we run on battery and if so then don't run +if which on_ac_power >/dev/null 2>&1; then + ON_BATTERY=0 + on_ac_power >/dev/null 2>&1 || ON_BATTERY=$? + if [ "${ON_BATTERY}" -eq 1 ]; then + exit 0 + fi +fi + +# check if we are already running (lockfile) +LOCKFILE="/var/lock/plocate.daily.lock" +if [ -e "${LOCKFILE}" ]; then + echo >&2 "Warning: \"${LOCKFILE}\" already present, not running updatedb." + exit 1 +fi +touch "${LOCKFILE}" +# trap the lockfile only if we really run the updatedb +trap "rm -f ${LOCKFILE}" EXIT + +# source the user specified variables +if [ -f /etc/plocate-cron.conf ]; then + . /etc/plocate-cron.conf +fi + +# check the config file +NODEVS="" +if [ ! -f /etc/updatedb.conf ]; then + NODEVS=$(awk '$1 == "nodev" && $2 != "rootfs" { print $2 }' /proc/filesystems) +fi + +# alter the priority of the updatedb process +if [ -x /usr/bin/renice ]; then + /usr/bin/renice +${NICE:-19} -p $$ > /dev/null 2>&1 +fi +if [ -x /usr/bin/ionice ] && /usr/bin/ionice -c3 true 2>/dev/null; then + /usr/bin/ionice -c${IONICE_CLASS:-2} -n${IONICE_PRIORITY:-7} -p $$ > /dev/null 2>&1 +fi + +# Cleanup old temp files from previous unsuccessful runs +rm -f /var/lib/plocate/plocate.db.* + +# run the updatedb if possible +if [ -x /usr/sbin/updatedb ]; then + /usr/sbin/updatedb -f "${NODEVS}" +else + echo >&2 "Warning: \"/usr/sbin/updatedb\" is not executable, unable to run updatedb." + exit 0 +fi diff --git