From 0f558761aa2dee1017b4751e4017205e015a9560 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 29 Jun 2022 12:04:12 +0100 Subject: gentoo resync : 29.12.2022 --- app-admin/logrotate/Manifest | 6 +- .../files/logrotate-3.20.1-log-changes.patch | 147 +++++++++++++++++++++ app-admin/logrotate/logrotate-3.18.1-r1.ebuild | 96 -------------- app-admin/logrotate/logrotate-3.20.1-r1.ebuild | 96 ++++++++++++++ 4 files changed, 247 insertions(+), 98 deletions(-) create mode 100644 app-admin/logrotate/files/logrotate-3.20.1-log-changes.patch delete mode 100644 app-admin/logrotate/logrotate-3.18.1-r1.ebuild create mode 100644 app-admin/logrotate/logrotate-3.20.1-r1.ebuild (limited to 'app-admin/logrotate') diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest index 34501ab112a1..dce189f18b15 100644 --- a/app-admin/logrotate/Manifest +++ b/app-admin/logrotate/Manifest @@ -1,8 +1,10 @@ AUX logrotate-3.15.0-ignore-hidden.patch 566 BLAKE2B 1739e0d175311eb2a3692826830bb101dc65b3966eb6dcd96fcbdb6bb1376eac5c0d0c78a26ff2ee6cfad57396d05dd3cae9ff4621a94b80d9a8b5877a52195d SHA512 ed572f12617812b44f7b79e9f3c7fb7aada1fed8f80244ee9e5e7c7f536e493c69790c7c62e0dc1951f979bc5a2cff581f439a8e1fb1a47722e6c0f1dcb4e65d +AUX logrotate-3.20.1-log-changes.patch 5617 BLAKE2B 775652dc7b8fc70e8ee57efb3f6d5d1763e1519493d72b2e07f0ed927c1f0c02567e5a1413ab22d562efae91e99a52c806aa4bc811637a259bcf5c6b8f7e6e03 SHA512 c934a526e4e8612a2df77912ce010873c0f6fe120a48d4f714ec8b90ac76a0a59df5a21b24da522d664be250153c0ec887b3381568d6389dcca46e523d10ea3e AUX logrotate.conf 740 BLAKE2B ade43681e1929aa8b7e167a2be0c8569f3842680687381c202ac04b5cf97cd85481f6ca7fbf6f0dffa64caa3b1d9cb0f1e2154af8882a3ce7008337f2a5ede6f SHA512 6411acd842fac1a8af72142cddfa76b567f6ba859bed91dab56f1d26b48f3dcaa3ffee6c8094860fe9c43f9b6bc398199c8f4047856b91d6d12333d0fc7aef96 AUX logrotate.tmpfiles 16 BLAKE2B 1f7925d6d2d4bc120d5202f49887b23e2eb633f5c369fe8d0bd1703e5075671dd1e13a030ec06fa269214bff9552670d3e0932e3dbde2e3673d59b7a50a2458b SHA512 f51852b1d5708a8fc48c6fcfd2fc4f34f3cd88d9119c607c0cb47f0cc0dc7370bd3399a9ebf781943cdd16a25bb4db0d81337140fc179faa72e18a848f3d8c36 -DIST logrotate-3.18.1.tar.gz 225226 BLAKE2B 6f40dfe89f9c6202263f16204a9cff07b921abc9a298b58649bb4968c9f498626741be334c47d4092da564ed75642b687ff6ef8781f69f5e25364f8635646d9d SHA512 c40f920686aee014c652f087c64f2a85e9e866a8717d1bd3f32a9dd7959a02962e6174de28ae685428b442e12079d0c8d91485611ca34a873ffae872a54ec9fe DIST logrotate-3.19.0.tar.xz 166276 BLAKE2B bb19690ca092905e527f6a0a7915373a65b29d3b50d97456ed31aa9b5b5698b3ae266c8e247a167198dcd8891a7e330f4913dfefa3563e5b2de7a6e0d067a6c3 SHA512 7838e14a5b147f6e5edf6efdf743deeca39fdb563fc6f14aa010ac5b7bdef9c2bb8005415481d1b042b31975052d5ed6e75c4bcd7e378003427ebe5ec02a1f2c -EBUILD logrotate-3.18.1-r1.ebuild 2258 BLAKE2B d877e8896d4611dab50826df614b40ae001f1993a0f457546cc887a99be8f2133daa68cb9998c34451d39c7b216ccdbd1e0b57f1a6c09157eeb2b9ded0ea6653 SHA512 4ab613cc46ed7c360236d3daa4ad96930e29b6d5251ff39ef77f4469fdb0dbdaf8dfb1e78fe0ea77d21a5b2cd9592cc11798fee46fd4c37804b5091b35b1b507 +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 EBUILD logrotate-3.19.0.ebuild 2257 BLAKE2B 0a66afed01ac2efcefccbb3abc5309ae27fcde5429368e13a17dc4672d06c6c67bd5546cf5e80da69eaa3f1cf36149409db004682e27d4e9995056deb0fe06df SHA512 f3d7b346b50e086bb50fa7d1b5d854d4c5fdf9a9700d9212eeb992da8a0dbf6c4a8b21ee0bf5a26d917ed2a581980952121d2c0c88f6fe1d3ca474db30a96d3f +EBUILD logrotate-3.20.1-r1.ebuild 2521 BLAKE2B 814c1d7aeb75675dba26a3f3db7d64d0f9221ed8efc6085f19b4b6fb720528a26ba7236b108d48854606879d1b9f3e48c6f74423d1905512da241848c97bb7e9 SHA512 8101cf963a0a526b868516cb2846512ec1ac46e01005a2f80f278a97b4fbf5edc3d3023f5e495338de849c059370de5a1381b9d454e6688a705d2b9c2e3bc002 MISC metadata.xml 1207 BLAKE2B 0d2ebf29e5ab5a01b2a8ac76ce1699e175d8fdba393ad97abad9cd3fbf9162042f253ab3551cde9273053c35b703e098d0501b67203da519b12258437d898f50 SHA512 3ac710f21ade3bb31767ea3e26b120a19a8ebfbfbcf5c66d30c888093428b0df026417e69d3823a2feaa27408b6015231f624b354df87ff50313edea39a0287b 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 +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 +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/logrotate-3.18.1-r1.ebuild b/app-admin/logrotate/logrotate-3.18.1-r1.ebuild deleted file mode 100644 index df10ba413502..000000000000 --- a/app-admin/logrotate/logrotate-3.18.1-r1.ebuild +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -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" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86" -IUSE="acl +cron selinux" - -DEPEND=" - >=dev-libs/popt-1.5 - selinux? ( sys-libs/libselinux ) - acl? ( virtual/acl )" -RDEPEND="${DEPEND} - selinux? ( sec-policy/selinux-logrotate ) - cron? ( virtual/cron )" - -STATEFILE="${EPREFIX}/var/lib/misc/logrotate.status" -OLDSTATEFILE="${EPREFIX}/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" -) - -src_prepare() { - sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' 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() { - 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} - newtmpfiles "${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 - - 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" - 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.20.1-r1.ebuild b/app-admin/logrotate/logrotate-3.20.1-r1.ebuild new file mode 100644 index 000000000000..9023bd91b43b --- /dev/null +++ b/app-admin/logrotate/logrotate-3.20.1-r1.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +VERIFY_SIG_OPENPGP_KEY_PATH="${BROOT}"/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.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 ~riscv ~s390 ~sparc ~x86" +IUSE="acl +cron selinux" + +DEPEND=">=dev-libs/popt-1.5 + selinux? ( sys-libs/libselinux ) + acl? ( virtual/acl )" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-logrotate ) + cron? ( virtual/cron )" +BDEPEND="verify-sig? ( sec-keys/openpgp-keys-kamildudka )" + +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}" + 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}" +} + +src_prepare() { + 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_install() { + 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} + newtmpfiles "${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 + + 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" + 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 +} -- cgit v1.2.3