diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-09-06 10:28:05 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-09-06 10:28:05 +0100 |
commit | f1af93971b7490792d8541bc790e0d8c6d787059 (patch) | |
tree | a38046712bbc3a3844d77452d16c84e716caa3d4 /app-admin/logrotate | |
parent | fc637fb28da700da71ec2064d65ca5a7a31b9c6c (diff) |
gentoo resync : 06.08.2019
Diffstat (limited to 'app-admin/logrotate')
-rw-r--r-- | app-admin/logrotate/Manifest | 9 | ||||
-rw-r--r-- | app-admin/logrotate/files/logrotate-3.9.1-Werror.patch | 12 | ||||
-rw-r--r-- | app-admin/logrotate/files/logrotate-3.9.1-atomic-create.patch | 43 | ||||
-rw-r--r-- | app-admin/logrotate/files/logrotate-3.9.1-fbsd.patch | 57 | ||||
-rw-r--r-- | app-admin/logrotate/files/logrotate-3.9.1-ignore-hidden.patch | 15 | ||||
-rw-r--r-- | app-admin/logrotate/files/logrotate-3.9.1-noasprintf.patch | 55 | ||||
-rw-r--r-- | app-admin/logrotate/logrotate-3.15.1.ebuild | 98 | ||||
-rw-r--r-- | app-admin/logrotate/logrotate-3.9.1.ebuild | 81 |
8 files changed, 100 insertions, 270 deletions
diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest index c770be83dfa5..506865132de1 100644 --- a/app-admin/logrotate/Manifest +++ b/app-admin/logrotate/Manifest @@ -2,19 +2,14 @@ AUX logrotate-3.13.0-fbsd.patch 855 BLAKE2B 48494caecc49d7b819f889bc7acf6bd29e71 AUX logrotate-3.13.0-ignore-hidden.patch 542 BLAKE2B 01c6e92306eaa2356090e5539555711ff09c7bdc6042aad7f3c5d9faacf449f00bb3040132bd00774104f8c0a8cb40073cb7c26323978ef199847a88eee26e45 SHA512 88bd9dd906171d45877e4c21e40cfc9a729742825b4c5d583fd9364d3943aa604e037e4b58e053a1fc7c0b77bd5ed6171f741778716ef753ecbb02ebaf012589 AUX logrotate-3.14.0-ignore-hidden.patch 548 BLAKE2B 29a8efd36b000cc670a8a2db46cac3ad12ca49c5900409c3e1b456da88acc869e66a479481fcb24731d44d7d1815fce54068542afaa4737093a65a35ea7cd79e SHA512 2f08e4b1b483d301e2c6f9a5440957f43d336d44b3393c4408a02b5491826f887d53c782a6c7472bdb1ede9baacf2d1608d7385a576da0a8441a4b5a48ee5113 AUX logrotate-3.15.0-ignore-hidden.patch 566 BLAKE2B 1739e0d175311eb2a3692826830bb101dc65b3966eb6dcd96fcbdb6bb1376eac5c0d0c78a26ff2ee6cfad57396d05dd3cae9ff4621a94b80d9a8b5877a52195d SHA512 ed572f12617812b44f7b79e9f3c7fb7aada1fed8f80244ee9e5e7c7f536e493c69790c7c62e0dc1951f979bc5a2cff581f439a8e1fb1a47722e6c0f1dcb4e65d -AUX logrotate-3.9.1-Werror.patch 344 BLAKE2B 6f132592ec2446943cb4f6426b7e25b432e9e44d82d080b3773ab7f5c34de019594ef77fa74cd74e026605e775ee2b119ab39c2eeb50a092dec1a1c502409b4a SHA512 6ae8b49d1f29ce1c32603716555085b7fa2d865177558abe92c84867c69ca84b8174563db07537801ad01572717670478b273acb34b5885b9170354d1cc02493 -AUX logrotate-3.9.1-atomic-create.patch 1253 BLAKE2B 2e3486f31991ea351300241fe2ea64ad8bea952c4faf7fbdf363b594a7823312c6c9497397abaf051c760e9fe93bb8b592ebb78ac85a23bba2f5db619de6c35f SHA512 92fa8e04522f9bf06840befcb019a498d465f2d8afa3475f97e953b4e8abf2cf63f2fa27d8c89c5620da59468f753d94720f5f3a604376d7e51b86c9eb156c99 -AUX logrotate-3.9.1-fbsd.patch 1393 BLAKE2B 27f82ffb51644ce117d53a0e484779692b0b8d547d14c944c87a41862127cf05c31477c73721bd2729dfc2c22264305ce60738063640dfef47c06bcdd9dd78e1 SHA512 dd8bc024eb280e5bcb2869682bedaf5c8db6d18976e412de3283f32bc5d9ad370fdda27194eae11fa3da53339d83ff20fe541e99eb8ed183997ecb85a606f822 -AUX logrotate-3.9.1-ignore-hidden.patch 551 BLAKE2B ed2a533ca01b99fa29b5a1fc4c51d5122e027f96d549dc2d453be963df990372b2b5a6ff994c62767657f49b46a950830ed43718f454f22283555ff1f7327486 SHA512 8a2060b4f3a92f7920090b4d02b4f66b7320c068936028f07dfefc0411b0f78b1477565cef627ce131d2cd5e98ead04b7d0289c4961e68da36a69a81d8b40acb -AUX logrotate-3.9.1-noasprintf.patch 1263 BLAKE2B 5f145d46e3c372d3999d58bb8e01ea07d7c81559f576a783548588b823abe33142fddb0bfbed51ddb4986aad0655a6c2b6c5f092866612af80aa2ed4c24368a6 SHA512 c84be7ef011fe09a2fae67fa918080c1b0c098f0000e6cacdfcc34311f17c0131e68bc1e337559391ae7272fd326ac7ba6ba1cca20f99a9cc51367ac35a924e6 AUX logrotate.conf 743 BLAKE2B d623d150d9959ae57e61af2c442434f81636521c133479aecbad8731662ee3743cb3db858ed8326ff87d61262d20893ab6141fe09d12979785e8c52c428f5964 SHA512 c0357a432a4619392895d8180db3c593239a96f62aba7cfd981c76e9d1dfd9d93d63860655025b1e9473374c2a51068028c3a3f316cb5cbb71562ca4a61d8d24 AUX logrotate.tmpfiles 16 BLAKE2B 1f7925d6d2d4bc120d5202f49887b23e2eb633f5c369fe8d0bd1703e5075671dd1e13a030ec06fa269214bff9552670d3e0932e3dbde2e3673d59b7a50a2458b SHA512 f51852b1d5708a8fc48c6fcfd2fc4f34f3cd88d9119c607c0cb47f0cc0dc7370bd3399a9ebf781943cdd16a25bb4db0d81337140fc179faa72e18a848f3d8c36 DIST logrotate-3.13.0.tar.gz 213726 BLAKE2B b9970a0fb49b9de9c83ee679fd4587b6a1623cf1aae2444e818339361c7b7762ce51fcbd124fefafbe47d529dd21ef346a6c9a267da20547914388db99dce003 SHA512 3dec2fcdd674d3337b71fd70339cb5e3dd06b4bc24bee191356a30c2a211a290ae7747e63b90581e32a6d6d1f73cf62d5b0ee5a91aa05bad4d6ee403a35d9e76 DIST logrotate-3.14.0.tar.gz 215413 BLAKE2B 7914188922d81b1f8b6c4e493fae71d23bc9e65ebfcb190ebb4287c875af53204cbecb51c2731a3dc57530a30c685c3a626074265d9a2462714ff6ff077ea5ca SHA512 5f584d9be01737960eaffcf43746270a5395486d2161577a9ee3e757cb4dfe5a207c8b1d097181dd413560d76ecc0e3d526f87d1b123a52dc3e5e49d529a5fb5 DIST logrotate-3.15.0.tar.gz 219496 BLAKE2B b9f9cd0b22b79c3da1ea6092c5f3ebf9fca39da3a4bb7e1da39a8bf96f0bdb573864b77681671ad227cfc444bbc3e64a518805780580adb954bfacd564f00e2f SHA512 9520f15eaec54da426699f1f5ce31949d1372fa25c5c127dfbf29ff717a1c15a6fd14437c1d7b67b116b12c8a5c28f6012e39ad4b3ca2b053c874d02efe98d84 -DIST logrotate-3.9.1.tar.gz 79061 BLAKE2B b07f8fd8eb59cc4d6c80441a3b5a8aab090bc13eb8fa5e35b111feb2203fb2c3092daa469e6fec02a29b1d377bca33fbbf5859bcd351a1f4a0d82343c5f65d3d SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28 +DIST logrotate-3.15.1.tar.gz 220263 BLAKE2B c164c542a0770965f5193f5816509f566b9afeb82ce8388a184d16c2b3e79aa0ef93be10d477c85f62037f01b3e626ea56d3173ca8cf017b8aa315f2e23b1a2b SHA512 72294607762751fb1aaaca1d62ebd87d109d837d50606176159a5e74782a993123321967b7a6185df6ca9c87a54febb832ac7537ceaa580a895901a995570cd5 EBUILD logrotate-3.13.0.ebuild 2543 BLAKE2B d79fec2304b6b52ec1cc064fc40aed2054edecf4abeb8dbd0d5df7f8bbb27e1a17a384cf4d44042197eac0c8ac7d5e6e888ef689fe2794ae206d946661b6196a SHA512 2f6b6caef77088ff1aee15f8a289f1b3559180034b5f2bfa5520b2c3627bb0f92e0f5555cbe914f4877b50729f84e3ca3f0353c6e1b63442e156b530819294a4 EBUILD logrotate-3.14.0.ebuild 2511 BLAKE2B c824de62f72544448b54948e5025b0bfee7be00b9355be4e5c64d51721efc064dacec319f9de4e93c61a7aec2bd70c4d0515a693be375d35c16c30cb1a2b927b SHA512 e088a56371b59e4d10f4ea5574ba12985b9b7fe81de11624cfb302fee0bc08581334230776aaca74d67d9ca160dad4301f06b14e5c608c26ecffccbf370a252e EBUILD logrotate-3.15.0.ebuild 2491 BLAKE2B 54d0c42640b5bc52d8a06515dc93a8fb3882e5bff1307ff83ba61c02022f5a798646e56eb3eac11edad9b1d4a347a792401a155e8782df4bfe78eb782d429043 SHA512 ca4f7eb1af6d0ade04ff4917b254bb63b733daac0bcffc758804c2f15478a8b8c2ea6715fd10ace0f09966557f3d6999fcfeddcd9fd22cae6594838507fa5f08 -EBUILD logrotate-3.9.1.ebuild 1767 BLAKE2B a59f23a8a0a24b416f23a087c60fe046260cc24521f68f2551bb2a2821d12e94307e2d620ec4b625cd1b6be21cafa3d2c0f044468dbc2760897e5bb7854ac7af SHA512 ed808392727749efb6d20a410810f6eb9cb364db2e11460f4c2940abd0fb1d7430b75102f2fcabcaf64e8818da39323010d2a5d223df49c705a6171acf541a03 +EBUILD logrotate-3.15.1.ebuild 2499 BLAKE2B c5642260f3cc83c3c2a9efc208b63d28db682dd25b38fdd03de9277818deba869fe0f809932c12a52f5a4bc9cebd2b3f00cf9d4df9f01b4333c1d3bdd9655a62 SHA512 264ff42deecdc6fcd787adb0fef729e0e96fba0705eceb49d5ff519b7fda2e149a59b1dcca022a55a1ae11c98f646e802dfa92a840a4bb78766b0e05ec206792 MISC metadata.xml 1126 BLAKE2B 1655e4bbc549896f4faef7cab3c539a5dc2a9910c80eacc6ee5626d97f1b6a5df448a502f3899833afb1723ee42f0be01e025a5d23ea3af1bab2a0311f43760e SHA512 f895d0c5ed7b02c4b92af5596a160199b6d765564050dda45171ff6e81137c508da5a8ae5fece89f04b2355d0f1b41f839aac667e4a8d8119ff64f44f34c6084 diff --git a/app-admin/logrotate/files/logrotate-3.9.1-Werror.patch b/app-admin/logrotate/files/logrotate-3.9.1-Werror.patch deleted file mode 100644 index b8cecc4ebfb2..000000000000 --- a/app-admin/logrotate/files/logrotate-3.9.1-Werror.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nuar a/Makefile.am b/Makefile.am ---- a/Makefile.am 2015-04-03 09:39:35.000000000 +0200 -+++ b/Makefile.am 2015-06-28 14:03:12.429999875 +0200 -@@ -1,7 +1,7 @@ - MAN = logrotate.8 - MAN5 = logrotate.conf.5 - --AM_CFLAGS = -Wall -Werror -+AM_CFLAGS = -Wall - sbin_PROGRAMS = logrotate - logrotate_SOURCES = logrotate.c log.c config.c basenames.c - diff --git a/app-admin/logrotate/files/logrotate-3.9.1-atomic-create.patch b/app-admin/logrotate/files/logrotate-3.9.1-atomic-create.patch deleted file mode 100644 index fdad8b6ea002..000000000000 --- a/app-admin/logrotate/files/logrotate-3.9.1-atomic-create.patch +++ /dev/null @@ -1,43 +0,0 @@ -diff -Nuar a/logrotate.c b/logrotate.c ---- a/logrotate.c 2015-06-28 13:57:18.449999884 +0200 -+++ b/logrotate.c 2015-06-28 14:02:20.799999876 +0200 -@@ -371,15 +371,18 @@ - int createOutputFile(char *fileName, int flags, struct stat *sb, acl_type acl, int force_mode) - { - int fd; -- struct stat sb_create; -- int acl_set = 0; -- -- fd = open(fileName, (flags | O_EXCL | O_NOFOLLOW), -- (S_IRUSR | S_IWUSR) & sb->st_mode); -+ int acl_set = 0; -+ struct stat sb_create; -+ char template[PATH_MAX + 1]; -+ mode_t umask_value; -+ snprintf(template, PATH_MAX, "%s/logrotate_temp.XXXXXX", ourDirName(fileName)); -+ umask_value = umask(0000); -+ fd = mkostemp(template, (flags | O_EXCL | O_NOFOLLOW)); -+ umask(umask_value); - - if (fd < 0) { -- message(MESS_ERROR, "error creating output file %s: %s\n", -- fileName, strerror(errno)); -+ message(MESS_ERROR, "error creating unique temp file: %s\n", -+ strerror(errno)); - return -1; - } - if (fchmod(fd, (S_IRUSR | S_IWUSR) & sb->st_mode)) { -@@ -430,6 +433,13 @@ - } - } - -+ if (rename(template, fileName)) { -+ message(MESS_ERROR, "error renaming temp file to %s: %s\n", -+ fileName, strerror(errno)); -+ close(fd); -+ return -1; -+ } -+ - return fd; - } - diff --git a/app-admin/logrotate/files/logrotate-3.9.1-fbsd.patch b/app-admin/logrotate/files/logrotate-3.9.1-fbsd.patch deleted file mode 100644 index 6e329d6149f3..000000000000 --- a/app-admin/logrotate/files/logrotate-3.9.1-fbsd.patch +++ /dev/null @@ -1,57 +0,0 @@ -diff -Nuar a/config.c b/config.c ---- a/config.c 2015-06-28 13:54:18.309999889 +0200 -+++ b/config.c 2015-06-28 13:56:49.599999885 +0200 -@@ -1,6 +1,6 @@ - #include "queue.h" - /* Alloca is defined in stdlib.h in NetBSD */ --#ifndef __NetBSD__ -+#if !defined(__NetBSD__) && !defined(__FreeBSD__) - #include <alloca.h> - #endif - #include <limits.h> -@@ -24,6 +24,10 @@ - #include <fnmatch.h> - #include <sys/mman.h> - -+#if !defined(PATH_MAX) && defined(__FreeBSD__) -+#include <sys/param.h> -+#endif -+ - #include "basenames.h" - #include "log.h" - #include "logrotate.h" -diff -Nuar a/logrotate.c b/logrotate.c ---- a/logrotate.c 2015-04-03 09:39:35.000000000 +0200 -+++ b/logrotate.c 2015-06-28 13:57:18.449999884 +0200 -@@ -1,6 +1,6 @@ - #include "queue.h" - /* alloca() is defined in stdlib.h in NetBSD */ --#ifndef __NetBSD__ -+#if !defined(__NetBSD__) && !defined(__FreeBSD__) - #include <alloca.h> - #endif - #include <limits.h> -@@ -26,6 +26,10 @@ - #include <limits.h> - #endif - -+#if !defined(PATH_MAX) && defined(__FreeBSD__) -+#include <sys/param.h> -+#endif -+ - #include "basenames.h" - #include "log.h" - #include "logrotate.h" -diff -Nuar a/Makefile b/Makefile ---- a/Makefile 2015-04-03 09:39:35.000000000 +0200 -+++ b/Makefile 2015-06-28 13:58:05.729999883 +0200 -@@ -22,7 +22,9 @@ - - ifeq ($(WITH_ACL),yes) - CFLAGS += -DWITH_ACL -+ifneq ($(OS_NAME),FreeBSD) - LOADLIBES += -lacl -+endif - # See pretest - TEST_ACL=1 - else diff --git a/app-admin/logrotate/files/logrotate-3.9.1-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.9.1-ignore-hidden.patch deleted file mode 100644 index 31d9298779c2..000000000000 --- a/app-admin/logrotate/files/logrotate-3.9.1-ignore-hidden.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff -Nuar a/config.c b/config.c ---- a/config.c 2015-04-03 09:39:35.000000000 +0200 -+++ b/config.c 2015-06-28 13:54:18.309999889 +0200 -@@ -359,7 +359,10 @@ - char *pattern; - - /* 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.9.1-noasprintf.patch b/app-admin/logrotate/files/logrotate-3.9.1-noasprintf.patch deleted file mode 100644 index 7983943ca89b..000000000000 --- a/app-admin/logrotate/files/logrotate-3.9.1-noasprintf.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -Nuar a/config.c b/config.c ---- a/config.c 2015-06-28 13:56:49.599999885 +0200 -+++ b/config.c 2015-06-28 13:59:34.799999880 +0200 -@@ -49,39 +49,6 @@ - #include "asprintf.c" - #endif - --#if !defined(asprintf) && !defined(_FORTIFY_SOURCE) --#include <stdarg.h> -- --int asprintf(char **string_ptr, const char *format, ...) --{ -- va_list arg; -- char *str; -- int size; -- int rv; -- -- va_start(arg, format); -- size = vsnprintf(NULL, 0, format, arg); -- size++; -- va_start(arg, format); -- str = malloc(size); -- if (str == NULL) { -- va_end(arg); -- /* -- * Strictly speaking, GNU asprintf doesn't do this, -- * but the caller isn't checking the return value. -- */ -- fprintf(stderr, "failed to allocate memory\\n"); -- exit(1); -- } -- rv = vsnprintf(str, size, format, arg); -- va_end(arg); -- -- *string_ptr = str; -- return (rv); --} -- --#endif -- - #if !defined(strndup) - char *strndup(const char *s, size_t n) - { -diff -Nuar a/logrotate.h b/logrotate.h ---- a/logrotate.h 2015-04-03 09:39:35.000000000 +0200 -+++ b/logrotate.h 2015-06-28 13:59:47.429999880 +0200 -@@ -80,8 +80,5 @@ - extern int debug; - - int readAllConfigPaths(const char **paths); --#if !defined(asprintf) && !defined(_FORTIFY_SOURCE) --int asprintf(char **string_ptr, const char *format, ...); --#endif - - #endif diff --git a/app-admin/logrotate/logrotate-3.15.1.ebuild b/app-admin/logrotate/logrotate-3.15.1.ebuild new file mode 100644 index 000000000000..2be55d79dadf --- /dev/null +++ b/app-admin/logrotate/logrotate-3.15.1.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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 -> ${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd" +IUSE="acl +cron selinux" + +CDEPEND=" + >=dev-libs/popt-1.5 + selinux? ( sys-libs/libselinux ) + acl? ( virtual/acl )" + +DEPEND="${CDEPEND} + >=sys-apps/sed-4" + +RDEPEND="${CDEPEND} + 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}" + 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#' "${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.9.1.ebuild b/app-admin/logrotate/logrotate-3.9.1.ebuild deleted file mode 100644 index 060e11be388f..000000000000 --- a/app-admin/logrotate/logrotate-3.9.1.ebuild +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=5 - -inherit autotools eutils toolchain-funcs flag-o-matic - -DESCRIPTION="Rotates, compresses, and mails system logs" -HOMEPAGE="https://github.com/logrotate/logrotate" -SRC_URI="mirror://gentoo/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd" -IUSE="acl +cron selinux" - -CDEPEND=" - >=dev-libs/popt-1.5 - selinux? ( - sys-libs/libselinux - ) - acl? ( virtual/acl )" - -DEPEND="${CDEPEND} - >=sys-apps/sed-4" - -RDEPEND="${CDEPEND} - selinux? ( sec-policy/selinux-logrotate ) - cron? ( virtual/cron )" - -install_cron_file() { - exeinto /etc/cron.daily - newexe "${S}"/examples/logrotate.cron "${PN}" -} - -src_prepare() { - epatch \ - "${FILESDIR}"/${P}-ignore-hidden.patch \ - "${FILESDIR}"/${P}-fbsd.patch \ - "${FILESDIR}"/${P}-noasprintf.patch \ - "${FILESDIR}"/${P}-atomic-create.patch \ - "${FILESDIR}"/${P}-Werror.patch - eautoreconf -} - -src_configure() { - econf $(use_with acl) $(use_with selinux) -} - -src_compile() { - emake ${myconf} RPM_OPT_FLAGS="${CFLAGS}" -} - -src_test() { - emake test -} - -src_install() { - insinto /usr - dosbin logrotate - doman logrotate.8 - dodoc CHANGES examples/logrotate* - - insinto /etc - doins "${FILESDIR}"/logrotate.conf - - use cron && install_cron_file - - keepdir /etc/logrotate.d -} - -pkg_postinst() { - 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 -} |