public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/
Date: Tue,  1 Jun 2021 09:40:48 +0000 (UTC)	[thread overview]
Message-ID: <1622540437.681ce7bbb832154ab194bc579d095b4c39c807b9.sam@gentoo> (raw)

commit:     681ce7bbb832154ab194bc579d095b4c39c807b9
Author:     Florian Schmaus <flo <AT> geekplace <DOT> eu>
AuthorDate: Tue May 11 14:24:38 2021 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue Jun  1 09:40:37 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=681ce7bb

sys-apps/plocate: homogenize cron and systemd timer name

On systems using systemd with a cron compatibility layer,
e.g. sys-process/systemd-cron, udpatedb would potentially run twice
daily: One time invoked by cron, and a another time invoked by the
systemd timer.

This can be avoided if the cron file and the systemd timer have the
exact same name. If a systemd native timer with the same name is
found, systemd-crontab-generator (of sys-process/systemd-cron) will
ignore the cron file [1].

Therefore we rename the plocate cron file from plocate to
plocate-udpatedb, to match the systemd plocate-updatedb.timer.

1:
https://github.com/systemd-cron/systemd-cron/blob/be4aea647bce9a0f26c9b8126f7883dd5c0b60a2/src/bin/systemd-crontab-generator.py#L535

Closes: https://bugs.gentoo.org/780351
Signed-off-by: Florian Schmaus <flo <AT> geekplace.eu>
Closes: https://github.com/gentoo/gentoo/pull/20771
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sys-apps/plocate/{plocate-1.1.7.ebuild => plocate-1.1.7-r1.ebuild} | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sys-apps/plocate/plocate-1.1.7.ebuild b/sys-apps/plocate/plocate-1.1.7-r1.ebuild
similarity index 86%
rename from sys-apps/plocate/plocate-1.1.7.ebuild
rename to sys-apps/plocate/plocate-1.1.7-r1.ebuild
index 4aaa46baf9c..a708c02300a 100644
--- a/sys-apps/plocate/plocate-1.1.7.ebuild
+++ b/sys-apps/plocate/plocate-1.1.7-r1.ebuild
@@ -62,8 +62,11 @@ src_install() {
 	fperms 0644 /etc/{updatedb,plocate-cron}.conf
 
 	insinto /etc/cron.daily
-	newins "${FILESDIR}"/plocate.cron plocate
-	fperms 0755 /etc/cron.daily/plocate
+	# Ensure that the cron file has the same name as the
+	# systemd-timer, to avoid plocate being run twice daily on systems
+	# with a systemd compatiblity layer. See also bug #780351.
+	newins "${FILESDIR}"/plocate.cron plocate-updatedb
+	fperms 0755 /etc/cron.daily/plocate-updatedb
 
 	systemd_dounit "${BUILD_DIR}"/${PN}-updatedb.service "${S}"/${PN}-updatedb.timer
 }


             reply	other threads:[~2021-06-01  9:40 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-01  9:40 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-14  5:26 [gentoo-commits] repo/gentoo:master commit in: sys-apps/plocate/ Sam James
2025-01-18 14:20 Jakov Smolić
2025-01-18 11:03 Sam James
2024-12-15 22:14 Arsen Arsenović
2024-08-02 15:46 Florian Schmaus
2024-03-14  6:43 Joonas Niilola
2024-03-14  6:41 Sam James
2024-02-10  3:28 Sam James
2024-02-02  7:30 Joonas Niilola
2024-01-19 13:25 Arsen Arsenović
2024-01-02 12:53 Arsen Arsenović
2023-07-13  4:51 Joonas Niilola
2023-06-10 14:55 Arsen Arsenović
2023-03-04  8:18 Arthur Zamarin
2023-01-29  1:37 Arsen Arsenović
2023-01-18 11:55 Arsen Arsenović
2022-12-23 13:03 Florian Schmaus
2022-12-23 13:03 Florian Schmaus
2022-11-22  9:41 Florian Schmaus
2022-11-22  9:41 Florian Schmaus
2022-09-23  1:35 Sam James
2022-08-26 23:27 Sam James
2022-06-05 23:50 Sam James
2022-05-18 10:37 Florian Schmaus
2022-04-23 14:33 Robin H. Johnson
2022-04-17 16:44 Sam James
2022-03-10  7:51 Jakov Smolić
2022-02-20  5:51 Sam James
2022-02-10  7:51 Sam James
2022-02-03 18:18 Ionen Wolkens
2022-01-04 11:00 Florian Schmaus
2022-01-04 10:58 Florian Schmaus
2021-12-18 15:09 Arthur Zamarin
2021-11-08 11:16 Florian Schmaus
2021-11-08 11:16 Florian Schmaus
2021-11-06  8:33 Agostino Sarubbo
2021-10-20 10:31 Florian Schmaus
2021-10-04 22:58 Sam James
2021-09-29  7:56 Agostino Sarubbo
2021-09-08  3:10 Sam James
2021-07-27 20:35 Sam James
2021-07-27  3:21 Sam James
2021-06-29 17:02 Florian Schmaus
2021-06-29 17:02 Florian Schmaus
2021-06-29 17:02 Florian Schmaus
2021-05-03 20:20 Sam James
2021-05-03 20:20 Sam James
2021-04-05 14:35 Sam James
2021-03-20  5:59 Sam James
2021-03-20  5:43 Sam James
2021-03-20  5:43 Sam James
2021-03-20  5:43 Sam James
2021-03-20  5:43 Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1622540437.681ce7bbb832154ab194bc579d095b4c39c807b9.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox