From 24162508832f37f873ab12dfdfb191cf99318055 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Tue, 26 Jul 2022 02:57:39 +0100 Subject: gentoo auto-resync : 26:07:2022 - 02:57:39 --- sys-process/systemd-cron/Manifest | 2 + .../systemd-cron-1.15.19-default-mail-user.patch | 28 +++++++ .../systemd-cron/systemd-cron-1.15.19-r1.ebuild | 96 ++++++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 sys-process/systemd-cron/files/systemd-cron-1.15.19-default-mail-user.patch create mode 100644 sys-process/systemd-cron/systemd-cron-1.15.19-r1.ebuild (limited to 'sys-process/systemd-cron') diff --git a/sys-process/systemd-cron/Manifest b/sys-process/systemd-cron/Manifest index 6450b7030f13..9aafce7b31c5 100644 --- a/sys-process/systemd-cron/Manifest +++ b/sys-process/systemd-cron/Manifest @@ -1,5 +1,7 @@ +AUX systemd-cron-1.15.19-default-mail-user.patch 853 BLAKE2B a6ba1e178995e92dfe9fbc4dfbfdae3a4f5545c97c4da9a0e66976953049ab789fbad57e8b8ce989bff2b1b64f422923b3078eafe68bab506223288462652798 SHA512 7c72ba576249eee46fa29a464059ce345729ae158a5bf5fe08bc04062b321a8dfaaa1bd383c1295382ceca8122c47283685add5027f19bdadfc82b3e1c1faeb5 DIST systemd-cron-1.15.19.tar.gz 33234 BLAKE2B d03c7024f9e4e569086e60908b07255e59259bc90182e34897746e1477e1b59da1934f239ef7c673e5df52c1831f07b2e759aeb7c514ba23dbbbeb780cb08a7b SHA512 90ddb3584550714a21e88a89e804511af434432b95398f325f547ee226499f8b73e153b9cdb611a11389baf434d12bc39414244b0e5e1d4565ceaac5db12b012 DIST systemd-cron-1.5.18.tar.gz 33056 BLAKE2B a400d0169c2dcb68c91358bd2af70dca133749dab801dc87b4cdf05b8ccebe5e250466bfce93938e575aa2d832af9a4977be2f02767d2d808e45b11888277c95 SHA512 7de6a5d05ee1d73c5348ecedf6029b498b26e8cdeecce87b58f206a1719c4a90fba853eb99b860734174469c99c75a4a6fa33c13b4aac45fdc71de7f3231b9e3 +EBUILD systemd-cron-1.15.19-r1.ebuild 2653 BLAKE2B 9c675400130da7f49a7d080fbd6de5aa9ea02b240027abd9e5a33bcacc5f8af5d7e151c2a72ef10c0e748a822127cf16117382ed2baa7e862981f0c4b79d1282 SHA512 2ed37a799ebf6e4419b130c8ea2168a2ece5242fceae8bcbd0e202921fe39ea6f49aec3772b304362913a3e878006141b29deb7ca50475134a30211541d9a776 EBUILD systemd-cron-1.15.19.ebuild 2442 BLAKE2B f1f024b38571ee186f86643670a8d03c72fe1efa8535164b8659b7ecaa0861bb8d3c82193901ab72bf1b6d4a6de4b51f8cf29b3ea74d938885a7977a7135b174 SHA512 a15e6ba9e15cd17942e78fe2ce973d155558dacd3d074eefe9b6ddfe37663321e47a9549276fcd4fe77babd842a105a28621e4eb83c3eb4b8433e940e5c77772 EBUILD systemd-cron-1.5.18.ebuild 2485 BLAKE2B c7f6bc444cb081caebc1614739a5d48ce6ede2d3e993d488346f3addd19f13078ed51b1c96814340657c737a9e475294c415acebaf0f51bd6c4188eb9a6c8a92 SHA512 490277cf2f65115957e60c4fdd515b442f70045f6d45bcba4304e8635d38a5fc37a2a6a0e76fe6f52893af1a404850bdb9cca0a8d74d684e7215f32a02b79583 MISC metadata.xml 801 BLAKE2B 8ac1580d5dae701d11c893bc7d9990b8a0c023c148b9fb7a945ba7f12429dd4a2abc78331f659831fa26b5f5c570919156848c3ebcd4df7ea050fdc50272f43c SHA512 1c7e77f04d294fc51de86b07f63c9163468dcb321d14c8447c61a4a0a7f99efc438d6ae1ffe315cf148377c2ac5e038afcc93f68516b11ca5eb066f8b186bcef diff --git a/sys-process/systemd-cron/files/systemd-cron-1.15.19-default-mail-user.patch b/sys-process/systemd-cron/files/systemd-cron-1.15.19-default-mail-user.patch new file mode 100644 index 000000000000..420f68d81091 --- /dev/null +++ b/sys-process/systemd-cron/files/systemd-cron-1.15.19-default-mail-user.patch @@ -0,0 +1,28 @@ +From 525410d5dc2a7c33590d25d6c574dec7eb826ec1 Mon Sep 17 00:00:00 2001 +From: Richard Freeman +Date: Mon, 25 Jul 2022 15:36:21 -0400 +Subject: [PATCH] Fix default user fallback. + +Signed-off-by: Richard Freeman +--- + src/bin/mail_on_failure.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/bin/mail_on_failure.py b/src/bin/mail_on_failure.py +index 132eab9..dd2288f 100755 +--- a/src/bin/mail_on_failure.py ++++ b/src/bin/mail_on_failure.py +@@ -26,7 +26,9 @@ user = subprocess.check_output( + ['systemctl', 'show', args.unit, '--property=User'], + universal_newlines=True) + user = user.rstrip('\n') +-user = user.split('=')[1] if user else 'root' ++user = user.split('=')[1] ++if not user: ++ user = 'root' + + mailto = user + mailfrom = 'root' +-- +2.35.1 + diff --git a/sys-process/systemd-cron/systemd-cron-1.15.19-r1.ebuild b/sys-process/systemd-cron/systemd-cron-1.15.19-r1.ebuild new file mode 100644 index 000000000000..400475508671 --- /dev/null +++ b/sys-process/systemd-cron/systemd-cron-1.15.19-r1.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 +PYTHON_COMPAT=( pypy3 python3_{8..10} ) +inherit python-single-r1 systemd + +DESCRIPTION="systemd units to create timers for cron directories and crontab" +HOMEPAGE="https://github.com/systemd-cron/systemd-cron/" +SRC_URI="https://github.com/systemd-cron/${PN}/archive/v${PV}.tar.gz -> systemd-cron-${PV}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="cron-boot etc-crontab-systemd minutely +runparts setgid test yearly" +RESTRICT="!test? ( test )" + +RDEPEND=">=sys-apps/systemd-217 + sys-apps/debianutils + !sys-process/cronie[anacron] + !etc-crontab-systemd? ( !sys-process/dcron ) + ${PYTHON_DEPS} + sys-process/cronbase + acct-user/_cron-failure + acct-group/_cron-failure" + +DEPEND="sys-process/cronbase + test? ( sys-apps/man-db dev-python/pyflakes )" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +PATCHES=( "${FILESDIR}/${P}-default-mail-user.patch" ) + +src_prepare() { + python_fix_shebang --force "${S}/src/bin" + + sed -i \ + -e 's/^crontab/crontab-systemd/' \ + -e 's/^CRONTAB/CRONTAB-SYSTEMD/' \ + -- "${S}/src/man/crontab."{1,5}".in" || die + + sed -i \ + -e 's!/crontab$!/crontab-systemd!' \ + -e 's!/crontab\(\.[15]\)$!/crontab-systemd\1!' \ + -e 's/pyflakes3/pyflakes/' \ + -- "${S}/Makefile.in" || die + + if use etc-crontab-systemd + then sed -i \ + -e "s!/etc/crontab!/etc/crontab-systemd!" \ + -- "${S}/src/man/crontab."{1,5}".in" \ + "${S}/src/bin/systemd-crontab-generator.py" || die + fi + + eapply "${PATCHES[@]}" + eapply_user +} + +my_use_enable() { + if use ${1}; then + echo --enable-${2:-${1}}=yes + else + echo --enable-${2:-${1}}=no + fi +} + +src_configure() { + ./configure \ + --prefix="${EPREFIX}/usr" \ + --confdir="${EPREFIX}/etc" \ + --runparts="${EPREFIX}/bin/run-parts" \ + --mandir="${EPREFIX}/usr/share/man" \ + --unitdir="$(systemd_get_systemunitdir)" \ + --generatordir="$(systemd_get_systemgeneratordir)" \ + $(my_use_enable cron-boot boot) \ + $(my_use_enable minutely) \ + $(my_use_enable runparts) \ + $(my_use_enable yearly) \ + $(my_use_enable yearly quarterly) \ + $(my_use_enable yearly semi_annually) \ + $(my_use_enable setgid) \ + --enable-persistent=yes +} + +src_install() { + default + rm -f "${ED}"/usr/lib/sysusers.d/systemd-cron.conf +} + +pkg_postinst() { + elog "This package now supports USE=runparts which is enabled by default." + elog "This enables the traditional run-parts behavior." + elog "If you disable this flag you will get the new behavior of having" + elog "multiple jobs for each cron.* entry run in parallel with" + elog "separate services/logs/etc." +} -- cgit v1.2.3