summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/logrotate')
-rw-r--r--app-admin/logrotate/Manifest9
-rw-r--r--app-admin/logrotate/files/gcc-fnocommon.patch41
-rw-r--r--app-admin/logrotate/files/logrotate-3.14.0-ignore-hidden.patch14
-rw-r--r--app-admin/logrotate/files/logrotate-3.20.1-log-changes.patch147
-rw-r--r--app-admin/logrotate/files/logrotate.conf2
-rw-r--r--app-admin/logrotate/logrotate-3.15.1.ebuild102
-rw-r--r--app-admin/logrotate/logrotate-3.19.0.ebuild (renamed from app-admin/logrotate/logrotate-3.16.0.ebuild)49
-rw-r--r--app-admin/logrotate/logrotate-3.20.1-r1.ebuild (renamed from app-admin/logrotate/logrotate-3.14.0.ebuild)59
-rw-r--r--app-admin/logrotate/logrotate-3.21.0.ebuild (renamed from app-admin/logrotate/logrotate-3.17.0.ebuild)64
-rw-r--r--app-admin/logrotate/metadata.xml12
10 files changed, 239 insertions, 260 deletions
diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index 5526a34ad4fb..8c9bb675f204 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -1,4 +1,5 @@
-DIST logrotate-3.14.0.tar.gz 215413 BLAKE2B 7914188922d81b1f8b6c4e493fae71d23bc9e65ebfcb190ebb4287c875af53204cbecb51c2731a3dc57530a30c685c3a626074265d9a2462714ff6ff077ea5ca SHA512 5f584d9be01737960eaffcf43746270a5395486d2161577a9ee3e757cb4dfe5a207c8b1d097181dd413560d76ecc0e3d526f87d1b123a52dc3e5e49d529a5fb5
-DIST logrotate-3.15.1.tar.gz 220263 BLAKE2B c164c542a0770965f5193f5816509f566b9afeb82ce8388a184d16c2b3e79aa0ef93be10d477c85f62037f01b3e626ea56d3173ca8cf017b8aa315f2e23b1a2b SHA512 72294607762751fb1aaaca1d62ebd87d109d837d50606176159a5e74782a993123321967b7a6185df6ca9c87a54febb832ac7537ceaa580a895901a995570cd5
-DIST logrotate-3.16.0.tar.gz 221904 BLAKE2B 38bfde57e9e055b86d6f25f0dd7c49b5d35865671926b1f8a2bd703ac8b8b2252d40cc29b0e1440309ecf224c747a99a2eab0ea99c86782559bef797f61fadb8 SHA512 2f2e8ebf9349424f529e4cf35e75036dadb00df84feac6b421b5a558ce015c9b1a22586463cba95a0265c104a559dd236764f7e37707975e626e69cc87e963e2
-DIST logrotate-3.17.0.tar.gz 224559 BLAKE2B 6d019bafad6986a0b6264893d36a515db75d746dd590afd26825c01c68e9ccf3c260502a29912d75c069ece8715ae14d3c13d4030f6222187be0e1ca05d60e49 SHA512 ada4415ef68ad97c1415fa0c1ba7bf108621777cd91599bf4f999dea1c1025596543aa00fd579cae4d39315b71c4d8f96a9c9d1178f78be7c523470588ab1d31
+DIST logrotate-3.19.0.tar.xz 166276 BLAKE2B bb19690ca092905e527f6a0a7915373a65b29d3b50d97456ed31aa9b5b5698b3ae266c8e247a167198dcd8891a7e330f4913dfefa3563e5b2de7a6e0d067a6c3 SHA512 7838e14a5b147f6e5edf6efdf743deeca39fdb563fc6f14aa010ac5b7bdef9c2bb8005415481d1b042b31975052d5ed6e75c4bcd7e378003427ebe5ec02a1f2c
+DIST logrotate-3.20.1.tar.xz 166712 BLAKE2B 8481e0d746c6bcbe10f2686a921334c6f957c8d92520927de7bc8fb0b7631a444fedaa80f35bc2de7961b3d5833ce4ab885b1298b235b7f8b33cc3ae05438da6 SHA512 a9ed5796ab254f511d0029a8f29ef7557f62e12e3ea9af24e30b5b9f348b1c1a16df26d44314b78299916fb3b5000b9cd9eed7cee2cee8df11cfd8e40c79b092
+DIST logrotate-3.20.1.tar.xz.asc 833 BLAKE2B afc02177335bcd580e0617af8c50846b371c2d00ecd8fe329c2e298dc8c48823137625f455cea3d983a0d9971733297fa2c4d98ba3c6f72d2c07f8f21108cfe4 SHA512 2dd207feec431b223ff12f09f6cce14409d45e5bb3abaf2275dd773c7ee7c59ed7d32395e5869bfed70c970be4158fd299e6e269838378843dcb63ca5ebfa029
+DIST logrotate-3.21.0.tar.xz 168532 BLAKE2B f7fa0050bde51e2517eac8456ecf87648bc8423621830894ceb2a3ff6b9dfe32c5b53df6a4ee59aa91bd563ed94376a635159535f4fdc170fbc673354bcef508 SHA512 c576df7d2bc1a1db2f99befdd0ea627aef2d97bdcd4a7cdea76870623ba92fb1f04f1af6d15b75e4a9085f4aef2ae5e9843c4094cdd01e24d89872ccaf9c0d4a
+DIST logrotate-3.21.0.tar.xz.asc 833 BLAKE2B b2099a0b8c15d1ea7f7325884027dff08dcc8305113411448797b8089d17026242a3f10bd6d7f3d865e3e339ec6fb5faf4ff48f8fd65bca3af4da8b335c3b5f1 SHA512 8f4c1853cd84f85c796b72b43048f4cf04e3409703e7669ee91e1d1aa5e9e5c04261fac1cdf85ec303508d5b6dbf126a44eb9ec819bcc772c664830d39e1068c
diff --git a/app-admin/logrotate/files/gcc-fnocommon.patch b/app-admin/logrotate/files/gcc-fnocommon.patch
deleted file mode 100644
index d490c20ce0a9..000000000000
--- a/app-admin/logrotate/files/gcc-fnocommon.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 908e86191bf062711ea44c922e66d27203e90214 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
-Date: Wed, 8 Jan 2020 10:54:53 +0100
-Subject: [PATCH] split declaration and definition of queue variable
-
-Support compilation with -fno-common flag, which is the default for GCC 10.
-
-Fixes: #288
-Closes #289
----
- config.c | 2 ++
- logrotate.h | 3 ++-
- 2 files changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/config.c b/config.c
-index 0e9a828..f027c7e 100644
---- a/config.c
-+++ b/config.c
-@@ -28,6 +28,8 @@
- #include "log.h"
- #include "logrotate.h"
-
-+struct logInfoHead logs;
-+
- #if !defined(GLOB_ABORTED) && defined(GLOB_ABEND)
- #define GLOB_ABORTED GLOB_ABEND
- #endif
-diff --git a/logrotate.h b/logrotate.h
-index 1c178da..6c1c2e7 100644
---- a/logrotate.h
-+++ b/logrotate.h
-@@ -89,7 +89,8 @@ struct logInfo {
- TAILQ_ENTRY(logInfo) list;
- };
-
--TAILQ_HEAD(logInfoHead, logInfo) logs;
-+TAILQ_HEAD(logInfoHead, logInfo);
-+extern struct logInfoHead logs;
-
- extern int numLogs;
- extern int debug;
diff --git a/app-admin/logrotate/files/logrotate-3.14.0-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.14.0-ignore-hidden.patch
deleted file mode 100644
index 6745126259be..000000000000
--- a/app-admin/logrotate/files/logrotate-3.14.0-ignore-hidden.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c 2018-03-09 17:47:08.000000000 +0100
-+++ b/config.c 2018-03-09 19:47:42.274696766 +0100
-@@ -440,7 +440,9 @@
- int i;
-
- /* Check if fname is '.' or '..'; if so, return false */
-- if (fname[0] == '.' && (!fname[1] || (fname[1] == '.' && !fname[2])))
-+ /* Don't include 'hidden' files either; this breaks Gentoo
-+ portage config file management http://bugs.gentoo.org/87683 */
-+ if (fname[0] == '.')
- return 0;
-
- /* Check if fname is ending in a taboo-extension; if so, return false */
diff --git a/app-admin/logrotate/files/logrotate-3.20.1-log-changes.patch b/app-admin/logrotate/files/logrotate-3.20.1-log-changes.patch
new file mode 100644
index 000000000000..b7c4bb5275db
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.20.1-log-changes.patch
@@ -0,0 +1,147 @@
+https://bugs.gentoo.org/847382#c3
+https://github.com/logrotate/logrotate/commit/31cf1099ab8514dfcae5a980bc77352edd5292f8
+https://github.com/logrotate/logrotate/commit/7b1fa328bf70eb8434166f151bd075cd1440d0dc
+
+From 31cf1099ab8514dfcae5a980bc77352edd5292f8 Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Fri, 27 May 2022 09:56:07 +0200
+Subject: [PATCH] lockState: do not print `error:` when exit code is unaffected
+
+Closes: https://github.com/logrotate/logrotate/pull/448
+--- a/logrotate.c
++++ b/logrotate.c
+@@ -3050,8 +3050,8 @@ static int lockState(const char *stateFilename, int skip_state_lock)
+ }
+
+ if (sb.st_mode & S_IROTH) {
+- message(MESS_ERROR, "state file %s is world-readable and thus can"
+- " be locked from other unprivileged users."
++ message(MESS_NORMAL, "warning: state file %s is world-readable"
++ " and thus can be locked from other unprivileged users."
+ " Skipping lock acquisition...\n",
+ stateFilename);
+ close(lockFd);
+
+From 7b1fa328bf70eb8434166f151bd075cd1440d0dc Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka@redhat.com>
+Date: Fri, 27 May 2022 16:02:57 +0200
+Subject: [PATCH] log: unify handling of log levels
+
+Use MESS_WARN instead of MESS_NORMAL and make it always use
+the `warning:` prefix. MESS_WARN is now mapped to LOG_WARNING
+for syslog.
+
+Also drop MESS_VERBOSE, which was not set anywhere.
+
+Closes: https://github.com/logrotate/logrotate/pull/239
+Closes: https://github.com/logrotate/logrotate/pull/449
+--- a/config.c
++++ b/config.c
+@@ -643,7 +643,7 @@ static void set_criterium(enum criterium *pDst, enum criterium src, int *pSet)
+ {
+ if (*pSet && (*pDst != src)) {
+ /* we are overriding a previously set criterium */
+- message(MESS_VERBOSE, "warning: '%s' overrides previously specified '%s'\n",
++ message(MESS_DEBUG, "note: '%s' overrides previously specified '%s'\n",
+ crit_to_string(src), crit_to_string(*pDst));
+ }
+ *pDst = src;
+@@ -1021,7 +1021,7 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
+
+ if (getuid() == ROOT_UID) {
+ if ((sb_config.st_mode & 07533) != 0400) {
+- message(MESS_NORMAL,
++ message(MESS_WARN,
+ "Potentially dangerous mode on %s: 0%o\n",
+ configFile, (unsigned) (sb_config.st_mode & 07777));
+ }
+@@ -1386,7 +1386,7 @@ static int readConfigFile(const char *configFile, struct logInfo *defConfig)
+ RAISE_ERROR();
+ }
+ } else if (!strcmp(key, "errors")) {
+- message(MESS_NORMAL,
++ message(MESS_WARN,
+ "%s: %d: the errors directive is deprecated and no longer used.\n",
+ configFile, lineNum);
+ } else if (!strcmp(key, "mail")) {
+--- a/log.c
++++ b/log.c
+@@ -40,9 +40,12 @@ static void log_once(FILE *where, int level, const char *format, va_list args)
+ {
+ switch (level) {
+ case MESS_DEBUG:
+- case MESS_NORMAL:
+- case MESS_VERBOSE:
+ break;
++
++ case MESS_WARN:
++ fprintf(where, "warning: ");
++ break;
++
+ default:
+ fprintf(where, "error: ");
+ break;
+@@ -78,10 +81,11 @@ void message(int level, const char *format, ...)
+ priority |= LOG_DEBUG;
+ break;
+ case MESS_DEBUG:
+- case MESS_VERBOSE:
+- case MESS_NORMAL:
+ priority |= LOG_INFO;
+ break;
++ case MESS_WARN:
++ priority |= LOG_WARNING;
++ break;
+ case MESS_ERROR:
+ priority |= LOG_ERR;
+ break;
+--- a/log.h
++++ b/log.h
+@@ -5,8 +5,7 @@
+
+ #define MESS_REALDEBUG 1
+ #define MESS_DEBUG 2
+-#define MESS_VERBOSE 3
+-#define MESS_NORMAL 4
++#define MESS_WARN 4
+ #define MESS_ERROR 5
+ #define MESS_FATAL 6
+
+--- a/logrotate.c
++++ b/logrotate.c
+@@ -3050,7 +3050,7 @@ static int lockState(const char *stateFilename, int skip_state_lock)
+ }
+
+ if (sb.st_mode & S_IROTH) {
+- message(MESS_NORMAL, "warning: state file %s is world-readable"
++ message(MESS_WARN, "state file %s is world-readable"
+ " and thus can be locked from other unprivileged users."
+ " Skipping lock acquisition...\n",
+ stateFilename);
+@@ -3106,7 +3106,7 @@ int main(int argc, const char **argv)
+ POPT_AUTOHELP { NULL, 0, 0, NULL, 0, NULL, NULL }
+ };
+
+- logSetLevel(MESS_NORMAL);
++ logSetLevel(MESS_WARN);
+ setlocale (LC_ALL, "");
+
+ optCon = poptGetContext("logrotate", argc, argv, options, 0);
+@@ -3117,7 +3117,7 @@ int main(int argc, const char **argv)
+ switch (arg) {
+ case 'd':
+ debug = 1;
+- message(MESS_NORMAL, "WARNING: logrotate in debug mode does nothing"
++ message(MESS_WARN, "logrotate in debug mode does nothing"
+ " except printing debug messages! Consider using verbose"
+ " mode (-v) instead if this is not what you want.\n\n");
+ /* fallthrough */
+--- a/test/test-0080.sh
++++ b/test/test-0080.sh
+@@ -10,4 +10,4 @@ cleanup 80
+ preptest test.log 80 1 0
+
+ $RLR -d test-config.80 2>&1 | \
+- grep -q "warning: 'daily' overrides previously specified 'size'"
++ grep -q "note: 'daily' overrides previously specified 'size'"
+
diff --git a/app-admin/logrotate/files/logrotate.conf b/app-admin/logrotate/files/logrotate.conf
index ff3319fd8351..d25e02385866 100644
--- a/app-admin/logrotate/files/logrotate.conf
+++ b/app-admin/logrotate/files/logrotate.conf
@@ -39,4 +39,4 @@ include /etc/logrotate.d
rotate 1
}
-# system-specific logs may be also be configured here.
+# system-specific logs may also be configured here.
diff --git a/app-admin/logrotate/logrotate-3.15.1.ebuild b/app-admin/logrotate/logrotate-3.15.1.ebuild
deleted file mode 100644
index 7222c9aa2024..000000000000
--- a/app-admin/logrotate/logrotate-3.15.1.ebuild
+++ /dev/null
@@ -1,102 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit systemd
-
-DESCRIPTION="Rotates, compresses, and mails system logs"
-HOMEPAGE="https://github.com/logrotate/logrotate"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
-IUSE="acl +cron selinux"
-
-COMMON_DEPEND="
- >=dev-libs/popt-1.5
- selinux? ( sys-libs/libselinux )
- acl? ( virtual/acl )"
-
-DEPEND="${COMMON_DEPEND}
- >=sys-apps/sed-4"
-
-RDEPEND="${COMMON_DEPEND}
- selinux? ( sec-policy/selinux-logrotate )
- cron? ( virtual/cron )"
-
-STATEFILE="/var/lib/misc/logrotate.status"
-OLDSTATEFILE="/var/lib/logrotate.status"
-
-move_old_state_file() {
- elog "logrotate state file is now located at ${STATEFILE}"
- elog "See bug #357275"
- if [[ -e "${OLDSTATEFILE}" ]] ; then
- elog "Moving your current state file to new location: ${STATEFILE}"
- mv -n "${OLDSTATEFILE}" "${STATEFILE}" || die
- fi
-}
-
-install_cron_file() {
- exeinto /etc/cron.daily
- newexe "${S}"/examples/logrotate.cron "${PN}"
-}
-
-PATCHES=(
- "${FILESDIR}/${PN}-3.15.0-ignore-hidden.patch"
- "${FILESDIR}/gcc-fnocommon.patch"
-)
-
-src_prepare() {
- sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die
- default
-}
-
-src_configure() {
- econf \
- $(use_with acl) \
- $(use_with selinux) \
- --with-state-file-path="${STATEFILE}"
-}
-
-src_test() {
- emake test
-}
-
-src_install() {
- insinto /usr
- dobin logrotate
- doman logrotate.8
- dodoc ChangeLog.md
-
- insinto /etc
- doins "${FILESDIR}"/logrotate.conf
-
- use cron && install_cron_file
-
- systemd_dounit examples/logrotate.{service,timer}
- systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}".conf
-
- keepdir /etc/logrotate.d
-}
-
-pkg_postinst() {
- elog
- elog "The ${PN} binary is now installed under /usr/bin. Please"
- elog "update your links"
- elog
- move_old_state_file
- elog "If you are running systemd you might need to run:"
- elog "systemd-tmpfiles --create /usr/lib/tmpfiles.d/logrotate.conf"
- elog "in order to create the new location of the logrotate state file"
- elog
- if [[ -z ${REPLACING_VERSIONS} ]] ; then
- elog "If you wish to have logrotate e-mail you updates, please"
- elog "emerge virtual/mailx and configure logrotate in"
- elog "/etc/logrotate.conf appropriately"
- elog
- elog "Additionally, /etc/logrotate.conf may need to be modified"
- elog "for your particular needs. See man logrotate for details."
- fi
-}
diff --git a/app-admin/logrotate/logrotate-3.16.0.ebuild b/app-admin/logrotate/logrotate-3.19.0.ebuild
index b63b513c2ef8..461e26ab35da 100644
--- a/app-admin/logrotate/logrotate-3.16.0.ebuild
+++ b/app-admin/logrotate/logrotate-3.19.0.ebuild
@@ -1,33 +1,32 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit systemd
+inherit systemd tmpfiles
DESCRIPTION="Rotates, compresses, and mails system logs"
HOMEPAGE="https://github.com/logrotate/logrotate"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="acl +cron selinux"
-COMMON_DEPEND="
- >=dev-libs/popt-1.5
+DEPEND=">=dev-libs/popt-1.5
selinux? ( sys-libs/libselinux )
acl? ( virtual/acl )"
-
-DEPEND="${COMMON_DEPEND}
- >=sys-apps/sed-4"
-
-RDEPEND="${COMMON_DEPEND}
+RDEPEND="${DEPEND}
selinux? ( sec-policy/selinux-logrotate )
cron? ( virtual/cron )"
-STATEFILE="/var/lib/misc/logrotate.status"
-OLDSTATEFILE="/var/lib/logrotate.status"
+STATEFILE="${EPREFIX}/var/lib/misc/logrotate.status"
+OLDSTATEFILE="${EPREFIX}/var/lib/logrotate.status"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-3.15.0-ignore-hidden.patch"
+)
move_old_state_file() {
elog "logrotate state file is now located at ${STATEFILE}"
@@ -43,20 +42,17 @@ install_cron_file() {
newexe "${S}"/examples/logrotate.cron "${PN}"
}
-PATCHES=(
- "${FILESDIR}/${PN}-3.15.0-ignore-hidden.patch"
-)
-
src_prepare() {
- sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die
default
+
+ sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' examples/logrotate.{cron,service} || die
}
src_configure() {
econf \
- $(use_with acl) \
- $(use_with selinux) \
- --with-state-file-path="${STATEFILE}"
+ $(use_with acl) \
+ $(use_with selinux) \
+ --with-state-file-path="${STATEFILE}"
}
src_test() {
@@ -64,7 +60,6 @@ src_test() {
}
src_install() {
- insinto /usr
dobin logrotate
doman logrotate.8
dodoc ChangeLog.md
@@ -75,7 +70,7 @@ src_install() {
use cron && install_cron_file
systemd_dounit examples/logrotate.{service,timer}
- systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}".conf
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
keepdir /etc/logrotate.d
}
@@ -85,11 +80,11 @@ pkg_postinst() {
elog "The ${PN} binary is now installed under /usr/bin. Please"
elog "update your links"
elog
+
move_old_state_file
- elog "If you are running systemd you might need to run:"
- elog "systemd-tmpfiles --create /usr/lib/tmpfiles.d/logrotate.conf"
- elog "in order to create the new location of the logrotate state file"
- elog
+
+ tmpfiles_process ${PN}.conf
+
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog "If you wish to have logrotate e-mail you updates, please"
elog "emerge virtual/mailx and configure logrotate in"
diff --git a/app-admin/logrotate/logrotate-3.14.0.ebuild b/app-admin/logrotate/logrotate-3.20.1-r1.ebuild
index 0ae2272d3b99..83351a930bbc 100644
--- a/app-admin/logrotate/logrotate-3.14.0.ebuild
+++ b/app-admin/logrotate/logrotate-3.20.1-r1.ebuild
@@ -1,33 +1,36 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
-inherit systemd
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kamildudka.asc
+inherit systemd tmpfiles verify-sig
DESCRIPTION="Rotates, compresses, and mails system logs"
HOMEPAGE="https://github.com/logrotate/logrotate"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz"
+SRC_URI+=" verify-sig? ( https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz.asc )"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~s390 sparc x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="acl +cron selinux"
-COMMON_DEPEND="
- >=dev-libs/popt-1.5
+DEPEND=">=dev-libs/popt-1.5
selinux? ( sys-libs/libselinux )
acl? ( virtual/acl )"
-
-DEPEND="${COMMON_DEPEND}
- >=sys-apps/sed-4"
-
-RDEPEND="${COMMON_DEPEND}
+RDEPEND="${DEPEND}
selinux? ( sec-policy/selinux-logrotate )
cron? ( virtual/cron )"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-kamildudka )"
-STATEFILE="/var/lib/misc/logrotate.status"
-OLDSTATEFILE="/var/lib/logrotate.status"
+STATEFILE="${EPREFIX}/var/lib/misc/logrotate.status"
+OLDSTATEFILE="${EPREFIX}/var/lib/logrotate.status"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.15.0-ignore-hidden.patch
+ "${FILESDIR}"/${P}-log-changes.patch
+)
move_old_state_file() {
elog "logrotate state file is now located at ${STATEFILE}"
@@ -43,31 +46,23 @@ install_cron_file() {
newexe "${S}"/examples/logrotate.cron "${PN}"
}
-PATCHES=(
- "${FILESDIR}/${P}-ignore-hidden.patch"
-)
-
src_prepare() {
- sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die
default
+
+ sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' examples/logrotate.{cron,service} || die
}
src_configure() {
econf \
- $(use_with acl) \
- $(use_with selinux) \
- --with-state-file-path="${STATEFILE}"
-}
-
-src_test() {
- emake test
+ $(use_with acl) \
+ $(use_with selinux) \
+ --with-state-file-path="${STATEFILE}"
}
src_install() {
- insinto /usr
dobin logrotate
doman logrotate.8
- dodoc ChangeLog.md examples/logrotate-default
+ dodoc ChangeLog.md
insinto /etc
doins "${FILESDIR}"/logrotate.conf
@@ -75,7 +70,7 @@ src_install() {
use cron && install_cron_file
systemd_dounit examples/logrotate.{service,timer}
- systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}".conf
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
keepdir /etc/logrotate.d
}
@@ -85,11 +80,11 @@ pkg_postinst() {
elog "The ${PN} binary is now installed under /usr/bin. Please"
elog "update your links"
elog
+
move_old_state_file
- elog "If you are running systemd you might need to run:"
- elog "systemd-tmpfiles --create /usr/lib/tmpfiles.d/logrotate.conf"
- elog "in order to create the new location of the logrotate state file"
- elog
+
+ tmpfiles_process ${PN}.conf
+
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog "If you wish to have logrotate e-mail you updates, please"
elog "emerge virtual/mailx and configure logrotate in"
diff --git a/app-admin/logrotate/logrotate-3.17.0.ebuild b/app-admin/logrotate/logrotate-3.21.0.ebuild
index b63b513c2ef8..d32061f9eee4 100644
--- a/app-admin/logrotate/logrotate-3.17.0.ebuild
+++ b/app-admin/logrotate/logrotate-3.21.0.ebuild
@@ -1,33 +1,39 @@
-# Copyright 1999-2020 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
-inherit systemd
+VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/kamildudka.asc
+inherit systemd tmpfiles verify-sig
DESCRIPTION="Rotates, compresses, and mails system logs"
HOMEPAGE="https://github.com/logrotate/logrotate"
-SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.gz"
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz"
+SRC_URI+=" verify-sig? ( https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz.asc )"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86"
+KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
IUSE="acl +cron selinux"
-COMMON_DEPEND="
+DEPEND="
>=dev-libs/popt-1.5
selinux? ( sys-libs/libselinux )
- acl? ( virtual/acl )"
-
-DEPEND="${COMMON_DEPEND}
- >=sys-apps/sed-4"
-
-RDEPEND="${COMMON_DEPEND}
+ acl? ( virtual/acl )
+"
+RDEPEND="
+ ${DEPEND}
selinux? ( sec-policy/selinux-logrotate )
- cron? ( virtual/cron )"
+ cron? ( virtual/cron )
+"
+BDEPEND="verify-sig? ( sec-keys/openpgp-keys-kamildudka )"
-STATEFILE="/var/lib/misc/logrotate.status"
-OLDSTATEFILE="/var/lib/logrotate.status"
+STATEFILE="${EPREFIX}/var/lib/misc/logrotate.status"
+OLDSTATEFILE="${EPREFIX}/var/lib/logrotate.status"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-3.15.0-ignore-hidden.patch
+)
move_old_state_file() {
elog "logrotate state file is now located at ${STATEFILE}"
@@ -43,28 +49,20 @@ install_cron_file() {
newexe "${S}"/examples/logrotate.cron "${PN}"
}
-PATCHES=(
- "${FILESDIR}/${PN}-3.15.0-ignore-hidden.patch"
-)
-
src_prepare() {
- sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die
default
+
+ sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' examples/logrotate.{cron,service} || die
}
src_configure() {
econf \
- $(use_with acl) \
- $(use_with selinux) \
- --with-state-file-path="${STATEFILE}"
-}
-
-src_test() {
- emake test
+ $(use_with acl) \
+ $(use_with selinux) \
+ --with-state-file-path="${STATEFILE}"
}
src_install() {
- insinto /usr
dobin logrotate
doman logrotate.8
dodoc ChangeLog.md
@@ -75,7 +73,7 @@ src_install() {
use cron && install_cron_file
systemd_dounit examples/logrotate.{service,timer}
- systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles" "${PN}".conf
+ newtmpfiles "${FILESDIR}"/${PN}.tmpfiles ${PN}.conf
keepdir /etc/logrotate.d
}
@@ -85,11 +83,11 @@ pkg_postinst() {
elog "The ${PN} binary is now installed under /usr/bin. Please"
elog "update your links"
elog
+
move_old_state_file
- elog "If you are running systemd you might need to run:"
- elog "systemd-tmpfiles --create /usr/lib/tmpfiles.d/logrotate.conf"
- elog "in order to create the new location of the logrotate state file"
- elog
+
+ tmpfiles_process ${PN}.conf
+
if [[ -z ${REPLACING_VERSIONS} ]] ; then
elog "If you wish to have logrotate e-mail you updates, please"
elog "emerge virtual/mailx and configure logrotate in"
diff --git a/app-admin/logrotate/metadata.xml b/app-admin/logrotate/metadata.xml
index 051f4438e708..5fc3fca4708a 100644
--- a/app-admin/logrotate/metadata.xml
+++ b/app-admin/logrotate/metadata.xml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
- <pkgmetadata>
- <maintainer type="project">
- <email>base-system@gentoo.org</email>
- <name>Gentoo Base System</name>
- </maintainer>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>base-system@gentoo.org</email>
+ <name>Gentoo Base System</name>
+ </maintainer>
<longdescription lang="en">
Logrotate allows for the automatic rotation compression, removal
and mailing of log files. Logrotate can be set to handle a log