From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-admin/logrotate/Manifest | 17 ++++ .../logrotate/files/logrotate-3.13.0-fbsd.patch | 36 ++++++++ .../files/logrotate-3.13.0-ignore-hidden.patch | 14 +++ .../files/logrotate-3.14.0-ignore-hidden.patch | 14 +++ .../logrotate/files/logrotate-3.9.1-Werror.patch | 12 +++ .../files/logrotate-3.9.1-atomic-create.patch | 43 ++++++++++ .../logrotate/files/logrotate-3.9.1-fbsd.patch | 57 +++++++++++++ .../files/logrotate-3.9.1-ignore-hidden.patch | 15 ++++ .../files/logrotate-3.9.1-noasprintf.patch | 55 ++++++++++++ app-admin/logrotate/files/logrotate.conf | 42 +++++++++ app-admin/logrotate/files/logrotate.tmpfiles | 1 + app-admin/logrotate/logrotate-3.13.0.ebuild | 99 ++++++++++++++++++++++ app-admin/logrotate/logrotate-3.14.0.ebuild | 98 +++++++++++++++++++++ app-admin/logrotate/logrotate-3.9.1.ebuild | 81 ++++++++++++++++++ app-admin/logrotate/metadata.xml | 29 +++++++ 15 files changed, 613 insertions(+) create mode 100644 app-admin/logrotate/Manifest create mode 100644 app-admin/logrotate/files/logrotate-3.13.0-fbsd.patch create mode 100644 app-admin/logrotate/files/logrotate-3.13.0-ignore-hidden.patch create mode 100644 app-admin/logrotate/files/logrotate-3.14.0-ignore-hidden.patch create mode 100644 app-admin/logrotate/files/logrotate-3.9.1-Werror.patch create mode 100644 app-admin/logrotate/files/logrotate-3.9.1-atomic-create.patch create mode 100644 app-admin/logrotate/files/logrotate-3.9.1-fbsd.patch create mode 100644 app-admin/logrotate/files/logrotate-3.9.1-ignore-hidden.patch create mode 100644 app-admin/logrotate/files/logrotate-3.9.1-noasprintf.patch create mode 100644 app-admin/logrotate/files/logrotate.conf create mode 100644 app-admin/logrotate/files/logrotate.tmpfiles create mode 100644 app-admin/logrotate/logrotate-3.13.0.ebuild create mode 100644 app-admin/logrotate/logrotate-3.14.0.ebuild create mode 100644 app-admin/logrotate/logrotate-3.9.1.ebuild create mode 100644 app-admin/logrotate/metadata.xml (limited to 'app-admin/logrotate') diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest new file mode 100644 index 000000000000..c682ad8e6823 --- /dev/null +++ b/app-admin/logrotate/Manifest @@ -0,0 +1,17 @@ +AUX logrotate-3.13.0-fbsd.patch 855 BLAKE2B 48494caecc49d7b819f889bc7acf6bd29e71583625a0638b39c1f2d535396a88c205534353430d70fbb577093ab43bee4bec0325443cf3c233f5f28dcb20cb12 SHA512 5343814545554392f1ee1be5b35866ebce0d8f2f580cb7807940e3a5b2092025f1b9619fa0ff3bdf4b99aada4c46a602d6c34c6e3c1e42b15ce51cf9d879a3ed +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.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.9.1.tar.gz 79061 BLAKE2B b07f8fd8eb59cc4d6c80441a3b5a8aab090bc13eb8fa5e35b111feb2203fb2c3092daa469e6fec02a29b1d377bca33fbbf5859bcd351a1f4a0d82343c5f65d3d SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28 +EBUILD logrotate-3.13.0.ebuild 2543 BLAKE2B d79fec2304b6b52ec1cc064fc40aed2054edecf4abeb8dbd0d5df7f8bbb27e1a17a384cf4d44042197eac0c8ac7d5e6e888ef689fe2794ae206d946661b6196a SHA512 2f6b6caef77088ff1aee15f8a289f1b3559180034b5f2bfa5520b2c3627bb0f92e0f5555cbe914f4877b50729f84e3ca3f0353c6e1b63442e156b530819294a4 +EBUILD logrotate-3.14.0.ebuild 2512 BLAKE2B e4dad0f671460525797eb9ebcecb1cbd7bd45a9b7bb3032060a27ac4721893e06202a1e2d4708e1d6634e1b04133a929681b932ea1b9e437aecca4155f5a24d5 SHA512 7bc2005fa2562cb5e1dc722ce8ffb3067c2eefc26992bd46f2466d894dc8e245da645e98fccae4998c1cc390df5677f7e4999c7652a0d2289f1e4a42b17299cc +EBUILD logrotate-3.9.1.ebuild 1767 BLAKE2B a59f23a8a0a24b416f23a087c60fe046260cc24521f68f2551bb2a2821d12e94307e2d620ec4b625cd1b6be21cafa3d2c0f044468dbc2760897e5bb7854ac7af SHA512 ed808392727749efb6d20a410810f6eb9cb364db2e11460f4c2940abd0fb1d7430b75102f2fcabcaf64e8818da39323010d2a5d223df49c705a6171acf541a03 +MISC metadata.xml 1119 BLAKE2B ddb2266925506c260c4b3f67e4dd906d9446a17a54b5a0ffce547d3c942750ead45dd1cfdcbae548a096d87ee1e247fcda9bcb81e83b829f0526d4bfd7b4a01d SHA512 99725d54d1cf68b257446ef8afc43d4bfe05cc789c818222d603012ae1e636624962c23a845f8858f4fc7aaf5a7e7f8085a7b173185ba66d7e390012dbceef79 diff --git a/app-admin/logrotate/files/logrotate-3.13.0-fbsd.patch b/app-admin/logrotate/files/logrotate-3.13.0-fbsd.patch new file mode 100644 index 000000000000..028dc0551f17 --- /dev/null +++ b/app-admin/logrotate/files/logrotate-3.13.0-fbsd.patch @@ -0,0 +1,36 @@ +diff -Nuar a/config.c b/config.c +--- a/config.c 2017-10-14 18:52:56.829467653 +0200 ++++ b/config.c 2017-10-14 18:54:57.049467139 +0200 +@@ -25,6 +25,10 @@ + #include + #include + ++#if !defined(PATH_MAX) && defined(__FreeBSD__) ++#include ++#endif ++ + #include "log.h" + #include "logrotate.h" + +diff -Nuar a/logrotate.c b/logrotate.c +--- a/logrotate.c 2017-10-12 17:19:41.000000000 +0200 ++++ b/logrotate.c 2017-10-14 18:56:23.419466769 +0200 +@@ -1,6 +1,6 @@ + #include "queue.h" + /* alloca() is defined in stdlib.h in NetBSD */ +-#ifndef __NetBSD__ ++#if !defined(__NetBSD__) && !defined(__FreeBSD__) + #include + #endif + #include +@@ -27,6 +27,10 @@ + #include + #endif + ++#if !defined(PATH_MAX) && defined(__FreeBSD__) ++#include ++#endif ++ + #include "log.h" + #include "logrotate.h" + diff --git a/app-admin/logrotate/files/logrotate-3.13.0-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.13.0-ignore-hidden.patch new file mode 100644 index 000000000000..f3ade248d38c --- /dev/null +++ b/app-admin/logrotate/files/logrotate-3.13.0-ignore-hidden.patch @@ -0,0 +1,14 @@ +diff -Nuar a/config.c b/config.c +--- a/config.c 2017-10-12 16:05:41.000000000 +0200 ++++ b/config.c 2017-10-14 18:52:56.829467653 +0200 +@@ -432,7 +432,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.14.0-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.14.0-ignore-hidden.patch new file mode 100644 index 000000000000..6745126259be --- /dev/null +++ b/app-admin/logrotate/files/logrotate-3.14.0-ignore-hidden.patch @@ -0,0 +1,14 @@ +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.9.1-Werror.patch b/app-admin/logrotate/files/logrotate-3.9.1-Werror.patch new file mode 100644 index 000000000000..b8cecc4ebfb2 --- /dev/null +++ b/app-admin/logrotate/files/logrotate-3.9.1-Werror.patch @@ -0,0 +1,12 @@ +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 new file mode 100644 index 000000000000..fdad8b6ea002 --- /dev/null +++ b/app-admin/logrotate/files/logrotate-3.9.1-atomic-create.patch @@ -0,0 +1,43 @@ +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 new file mode 100644 index 000000000000..6e329d6149f3 --- /dev/null +++ b/app-admin/logrotate/files/logrotate-3.9.1-fbsd.patch @@ -0,0 +1,57 @@ +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 + #endif + #include +@@ -24,6 +24,10 @@ + #include + #include + ++#if !defined(PATH_MAX) && defined(__FreeBSD__) ++#include ++#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 + #endif + #include +@@ -26,6 +26,10 @@ + #include + #endif + ++#if !defined(PATH_MAX) && defined(__FreeBSD__) ++#include ++#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 new file mode 100644 index 000000000000..31d9298779c2 --- /dev/null +++ b/app-admin/logrotate/files/logrotate-3.9.1-ignore-hidden.patch @@ -0,0 +1,15 @@ +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 new file mode 100644 index 000000000000..7983943ca89b --- /dev/null +++ b/app-admin/logrotate/files/logrotate-3.9.1-noasprintf.patch @@ -0,0 +1,55 @@ +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 +- +-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/files/logrotate.conf b/app-admin/logrotate/files/logrotate.conf new file mode 100644 index 000000000000..ff3319fd8351 --- /dev/null +++ b/app-admin/logrotate/files/logrotate.conf @@ -0,0 +1,42 @@ +# +# Default logrotate(8) configuration file for Gentoo Linux. +# See "man logrotate" for details. + +# rotate log files weekly. +weekly +#daily + +# keep 4 weeks worth of backlogs. +rotate 4 + +# create new (empty) log files after rotating old ones. +create + +# use date as a suffix of the rotated file. +dateext + +# compress rotated log files. +compress + +notifempty +nomail +noolddir + +# packages can drop log rotation information into this directory. +include /etc/logrotate.d + +# no packages own wtmp and btmp -- we'll rotate them here. +/var/log/wtmp { + monthly + create 0664 root utmp + minsize 1M + rotate 1 +} +/var/log/btmp { + missingok + monthly + create 0600 root utmp + rotate 1 +} + +# system-specific logs may be also be configured here. diff --git a/app-admin/logrotate/files/logrotate.tmpfiles b/app-admin/logrotate/files/logrotate.tmpfiles new file mode 100644 index 000000000000..dfb4ab66c132 --- /dev/null +++ b/app-admin/logrotate/files/logrotate.tmpfiles @@ -0,0 +1 @@ +d /var/lib/misc diff --git a/app-admin/logrotate/logrotate-3.13.0.ebuild b/app-admin/logrotate/logrotate-3.13.0.ebuild new file mode 100644 index 000000000000..3e708af36c72 --- /dev/null +++ b/app-admin/logrotate/logrotate-3.13.0.ebuild @@ -0,0 +1,99 @@ +# Copyright 1999-2018 Gentoo Foundation +# 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}/${P}-ignore-hidden.patch" + "${FILESDIR}/${P}-fbsd.patch" +) + +src_prepare() { + default + sed -i -e 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.{cron,service} || die +} + +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 examples/logrotate-default + + 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.14.0.ebuild b/app-admin/logrotate/logrotate-3.14.0.ebuild new file mode 100644 index 000000000000..2a41a2fa759d --- /dev/null +++ b/app-admin/logrotate/logrotate-3.14.0.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2018 Gentoo Foundation +# 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}/${P}-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 examples/logrotate-default + + 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 new file mode 100644 index 000000000000..060e11be388f --- /dev/null +++ b/app-admin/logrotate/logrotate-3.9.1.ebuild @@ -0,0 +1,81 @@ +# 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 +} diff --git a/app-admin/logrotate/metadata.xml b/app-admin/logrotate/metadata.xml new file mode 100644 index 000000000000..e5648d41d70a --- /dev/null +++ b/app-admin/logrotate/metadata.xml @@ -0,0 +1,29 @@ + + + + + nimiux@gentoo.org + Chema Alonso + + + Logrotate allows for the automatic rotation compression, removal + and mailing of log files. Logrotate can be set to handle a log + file daily, weekly, monthly or when the log file gets to a certain + size. + + + Logrotate permite la rotación, compresión, eliminación y + notificación por correo electrónico de forma automática de ficheros + de registro (logs). Logrotate se puede configurar para gestionar + estos ficheros diariamente, semanalmente, mensualmente o cuando + su tamaño alcanza cierto valor. + + + Installs acl support + Installs cron file + Installs Security Enhanced Linux support + + + logrotate/logrotate + + -- cgit v1.2.3