summaryrefslogtreecommitdiff
path: root/app-admin/logrotate
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/logrotate')
-rw-r--r--app-admin/logrotate/Manifest29
-rw-r--r--app-admin/logrotate/files/logrotate-3.11.0-Werror.patch12
-rw-r--r--app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch57
-rw-r--r--app-admin/logrotate/files/logrotate-3.11.0-ignore-hidden.patch14
-rw-r--r--app-admin/logrotate/files/logrotate-3.11.0-lfs.patch11
-rw-r--r--app-admin/logrotate/files/logrotate-3.11.0-noasprintf.patch55
-rw-r--r--app-admin/logrotate/files/logrotate-3.12.2-fbsd.patch36
-rw-r--r--app-admin/logrotate/files/logrotate-3.12.2-ignore-hidden.patch14
-rw-r--r--app-admin/logrotate/files/logrotate-3.12.3-fbsd.patch36
-rw-r--r--app-admin/logrotate/files/logrotate-3.12.3-ignore-hidden.patch14
-rw-r--r--app-admin/logrotate/files/logrotate-3.9.1-Werror.patch12
-rw-r--r--app-admin/logrotate/files/logrotate-3.9.1-atomic-create.patch43
-rw-r--r--app-admin/logrotate/files/logrotate-3.9.1-fbsd.patch57
-rw-r--r--app-admin/logrotate/files/logrotate-3.9.1-ignore-hidden.patch15
-rw-r--r--app-admin/logrotate/files/logrotate-3.9.1-noasprintf.patch55
-rw-r--r--app-admin/logrotate/files/logrotate.conf42
-rw-r--r--app-admin/logrotate/files/logrotate.tmpfiles1
-rw-r--r--app-admin/logrotate/logrotate-3.11.0.ebuild88
-rw-r--r--app-admin/logrotate/logrotate-3.12.2.ebuild83
-rw-r--r--app-admin/logrotate/logrotate-3.12.3-r1.ebuild99
-rw-r--r--app-admin/logrotate/logrotate-3.12.3-r2.ebuild99
-rw-r--r--app-admin/logrotate/logrotate-3.12.3.ebuild98
-rw-r--r--app-admin/logrotate/logrotate-3.9.1.ebuild81
-rw-r--r--app-admin/logrotate/metadata.xml29
24 files changed, 1080 insertions, 0 deletions
diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
new file mode 100644
index 000000000000..8cbeb931bd04
--- /dev/null
+++ b/app-admin/logrotate/Manifest
@@ -0,0 +1,29 @@
+AUX logrotate-3.11.0-Werror.patch 468 SHA256 633ec5e7d0d44e490d4fc2f71ccb7742ee44087143f2a175077c5ea71c3bf3e8 SHA512 a846e9d3778a33622d7daccbd5880cadf2201ec3914c9f47c0c67c1786edd720a33c140f18f7259024e13e1f5cedcd447deb9cfb0d70882fb52332bfffe3c42e WHIRLPOOL ed64892d93334eeaee8ad244227f396a23c8d005177d32952b2575cef5efc6c52ef23d6e0d3ce889c5a652e4b511df11857a7fd717efb54ee9240da117b6c6e6
+AUX logrotate-3.11.0-fbsd.patch 1421 SHA256 04bd0e7a2fd75d41a424d35b31dbbcc3e25ed44c3cac7bc5b2ae5db643a06b27 SHA512 dd552c5879cc9cc120a7ff953d1934278a9976a46e84c010bb135e1988dd12cadfe7cb5e2f5067d5b882dc521713fb2a024cb61ad0216cdb33297f356bc0307e WHIRLPOOL 4d6556b6f72e7843e910ba8519c6e8f0986fbb516e8d7700e4feac337cc6e8cb1f802302e0bb228c5597aaefd41a752174871cc027da740bc775f51d5339c1c0
+AUX logrotate-3.11.0-ignore-hidden.patch 548 SHA256 56fca1f490e9a9f13f110297a8988e59800b10b9d06b4f284f76dbaba4ad717e SHA512 a86caa30b787abc1328652e590dd73633a38830739ff6c6c9f5d43fb2919e53383ec8091f5e0d6af475d13fd68bd1e636cd43cd5adf377c22ff2ea694ba32cf1 WHIRLPOOL 5164d9048e9f147197077e73933a219d8074bd57bd2835e997cba12ba7e815f87495d46bc6c6bf9f54957f4f501fb24284a75aef9bac0d1c84cee9c94e5beb1e
+AUX logrotate-3.11.0-lfs.patch 346 SHA256 ad8cfab537560d663afa954e654592c9f139aefc9848f08619212ee46ab074f4 SHA512 cdffb9f1481bb8777319423c9617898b50712129a80d721fef8c243a030248a70540d2db0d421e8e974bc6623d8739d1a50da8b65894cdc385dd8d741c2710e1 WHIRLPOOL 82fec61a2bd484cbcc18cea898197923ea8cfea86039bdb2bef7effa9635f6287d06e879bccf11b22f770cb1b93542756e2f11d9f8564f35966f69e6fea9f3d4
+AUX logrotate-3.11.0-noasprintf.patch 1274 SHA256 8a84f7c46b117f0c9705333e50c9a2c3173b62b6fb2a86b3752d9cb597a84c8d SHA512 d673aa820cd95b744deb24b1c5ccbc82f22d5f6220028a0b96c7abc3190cfc5f85fed1f8bba7fd98b8b3ff458fccb08c2adb80046151088bc0797f814de2a9f5 WHIRLPOOL 573505eea80a433d47d83cde1e252d704a1e543b149816a75854de7042dd417af31d2848c04e0a225e16b6d00cae3d6b673a336cf018ee2438bb3102a1244705
+AUX logrotate-3.12.2-fbsd.patch 855 SHA256 127c90627ba4dc79d0120d3a86b8e7696b89546cb164230f12466113d874141b SHA512 3e54314ce32735bd70fe46792c073fd5eb345a77e40eae4b9c899671cc8b7dd8d6f1042a28f05364431fc730a3dbe924d19d6eacbb387c6384268a397dd9ac85 WHIRLPOOL b734147fad23c8a0d16aaee33910995ce11310497616a390c74415d66e74ab6508b65e144e5c692fba635f5c0882106d8dd72b99ec941439e589e2712efdf155
+AUX logrotate-3.12.2-ignore-hidden.patch 542 SHA256 35488583344d963ea1c19a798bc9f8d9c174395f299d1a81a65680e47c36362b SHA512 86d7335dda9b913928eb14dc39a120e14f3796fc30516fbfb5424c575520802edb84224bf5673084be7e983f9e2d856d80d58fa4200a0a43a9624d41dc20a206 WHIRLPOOL a711fbb2fe8ee74123ecbca4202ff8cac60bdb8c0fc197aa8dc96e101cad32d8e1b85bc378bfd8d0fd831753e39f7c9a177db194d9d2450bee2e29f09af37f86
+AUX logrotate-3.12.3-fbsd.patch 855 SHA256 127c90627ba4dc79d0120d3a86b8e7696b89546cb164230f12466113d874141b SHA512 3e54314ce32735bd70fe46792c073fd5eb345a77e40eae4b9c899671cc8b7dd8d6f1042a28f05364431fc730a3dbe924d19d6eacbb387c6384268a397dd9ac85 WHIRLPOOL b734147fad23c8a0d16aaee33910995ce11310497616a390c74415d66e74ab6508b65e144e5c692fba635f5c0882106d8dd72b99ec941439e589e2712efdf155
+AUX logrotate-3.12.3-ignore-hidden.patch 542 SHA256 35488583344d963ea1c19a798bc9f8d9c174395f299d1a81a65680e47c36362b SHA512 86d7335dda9b913928eb14dc39a120e14f3796fc30516fbfb5424c575520802edb84224bf5673084be7e983f9e2d856d80d58fa4200a0a43a9624d41dc20a206 WHIRLPOOL a711fbb2fe8ee74123ecbca4202ff8cac60bdb8c0fc197aa8dc96e101cad32d8e1b85bc378bfd8d0fd831753e39f7c9a177db194d9d2450bee2e29f09af37f86
+AUX logrotate-3.9.1-Werror.patch 344 SHA256 63ce419252a8e2ed52c78b018bb1b2247e02f5c2c322168a5772d3faa957bd88 SHA512 6ae8b49d1f29ce1c32603716555085b7fa2d865177558abe92c84867c69ca84b8174563db07537801ad01572717670478b273acb34b5885b9170354d1cc02493 WHIRLPOOL 808769d911f49ed40c572e6f21d42e578aba056b3815017f25bb66d5d14a9fd78c16a92f30874346324ab1e0e7af57f6fa678707d88e8b3f69055c25b4b9a81a
+AUX logrotate-3.9.1-atomic-create.patch 1253 SHA256 f5a93032a0d7f48b4eb295fd40400d527a66804e3f959d391f895cebd86ef7ad SHA512 92fa8e04522f9bf06840befcb019a498d465f2d8afa3475f97e953b4e8abf2cf63f2fa27d8c89c5620da59468f753d94720f5f3a604376d7e51b86c9eb156c99 WHIRLPOOL 29b74ceae23035e4423753042375f1fc713fc780b3ea31d166034746c0d4c89ec1be7979c570f13437902ba7c155299eb870510742fa73656517f5accd43d100
+AUX logrotate-3.9.1-fbsd.patch 1393 SHA256 543a7e7118f66cda16446d5bfd7abdae1c72e786f49f701c515ea595e72fe7ef SHA512 dd8bc024eb280e5bcb2869682bedaf5c8db6d18976e412de3283f32bc5d9ad370fdda27194eae11fa3da53339d83ff20fe541e99eb8ed183997ecb85a606f822 WHIRLPOOL dd34fb0f8070e297a6f760d9d77ed3191ff3e91b152710ac6acaaada70236b12e6cc192259c06e15ef0d54f75a28de23dd3052a3c37d20b888c8069b77794a07
+AUX logrotate-3.9.1-ignore-hidden.patch 551 SHA256 3f04aa2ff9ff85cf0486c40f6a81c28ed3eed8c4d31c30de1d86100db4564a9f SHA512 8a2060b4f3a92f7920090b4d02b4f66b7320c068936028f07dfefc0411b0f78b1477565cef627ce131d2cd5e98ead04b7d0289c4961e68da36a69a81d8b40acb WHIRLPOOL 56fe4edda60adf4d1dd106ab45d8e2aa79c941384cc44fde928314a772be58f3204573f6c3f8ee0cfdcbf2ec08c3dc2c99bd2a90822d903f1f492a118d722f88
+AUX logrotate-3.9.1-noasprintf.patch 1263 SHA256 edc5f3db12c27c3353cfe1764c10d3b97581f249096e61f875440e429afc778a SHA512 c84be7ef011fe09a2fae67fa918080c1b0c098f0000e6cacdfcc34311f17c0131e68bc1e337559391ae7272fd326ac7ba6ba1cca20f99a9cc51367ac35a924e6 WHIRLPOOL 0d702f6c92483791e9fe2b5128e324fcda7c5ee825c46fab4405b5752f836bce00aaaf8ec9a284a5214aa2e10a4818bfb2e8cd9a4e2bce6f0836ec1c543dd3ea
+AUX logrotate.conf 743 SHA256 9144148139ab9aaaaa5b02d3f88e44b6dfd23b8ddd6c86d2f543eb5ad566f775 SHA512 c0357a432a4619392895d8180db3c593239a96f62aba7cfd981c76e9d1dfd9d93d63860655025b1e9473374c2a51068028c3a3f316cb5cbb71562ca4a61d8d24 WHIRLPOOL b2cd43773242adc78b2b322679db16946a5db95d56591a6e53316660937f7696f51b66fb8c106f7e2b98fc119070397f986ecfd1563409749801a5331c058357
+AUX logrotate.tmpfiles 16 SHA256 5624b71671928b2d5a076c32172b65b679b8502aae66b2840fc252fb09504209 SHA512 f51852b1d5708a8fc48c6fcfd2fc4f34f3cd88d9119c607c0cb47f0cc0dc7370bd3399a9ebf781943cdd16a25bb4db0d81337140fc179faa72e18a848f3d8c36 WHIRLPOOL 6fc46fb539199e992112081a3d8d24bd6bf50597b268a08b36eb86158f513ead488cdcec23eec88750c79767f6a7f8024d17909e5d14888f9b1634eaaece00b7
+DIST logrotate-3.11.0.tar.gz 176488 SHA256 7dcb440ed2f1937459e1e06f841c6af1e564b77b2df8009147b56c8649197910 SHA512 67ceb2e18c175a5935c81e7699af7a5e6625cef50a3f52e993d49d6c10d9c433f6c7354a8dd05cb35ab28e4393d1db198f2e46e5f6eafd3e6f040b6518438cc1 WHIRLPOOL 0a581aa5922386b84a7c40a9490364287f4e162f7180fd0e15bf191694294168b663947c7081e92755406fe4f0b3b8792b6f0c5f0e646afa5505a17995a86858
+DIST logrotate-3.12.2.tar.gz 202700 SHA256 754777ada2ef2f34378e8f6025cdb0c0725e212f12195d59971c42df0ae0597f SHA512 ba8c3d7c7134b9ab5968c0dc8a1c5d24d7287a3204e1c6eed080b537d6a0ed7765a47c69b3067493304994e3f4238dc0173b593e4628316bfadf3decd002da16 WHIRLPOOL a299bc2bd50ab36acdd4ab747a479c5b94e84ac92bf55b71a8a8a7d4e1b55eb909dce94c22a5fdadda946dc783376923de5f46729084e21b54811489ce97c482
+DIST logrotate-3.12.3.tar.gz 202991 SHA256 435a3f9a534a37e11657532a090f6bf521d8696bdf9cb799a360c1750ba3aea9 SHA512 ab700a50736c7ce8a6e5b9dc2504919c6d3e6ae48a7f112f6980253df5c6bab7fc507c82a0cd961d73ed1312c930da46d96d9f27046996644e0759c84c6a1ae9 WHIRLPOOL ceadd2a748850f0035702156b9a566bf3a38749edf823062f1c867e60cac1c7b40d770d6c923eed79972ce58394b3220e16e40e97e192a6a7046cf09c5fcbf77
+DIST logrotate-3.9.1.tar.gz 79061 SHA256 022769e3288c80981559a8421703c88e8438b447235e36dd3c8e97cd94c52545 SHA512 e6da7c7f067befaf2441e9c6ce77e53cf5ddb4f56cc3304c3e50873b6f20c68520f4a0e50ec466cbebcbed20bfd77bf6dfc489975a8131e9573fb19856c0fe28 WHIRLPOOL 9b3558bb03c6c95f8f386ea75ca09bfda802ae4c45b9ef8408692e3aa7a2ee57447cf15ce04d0289946b9cae2266acb5509d8151d15ac6ea0ad9113aeb32dc17
+EBUILD logrotate-3.11.0.ebuild 2005 SHA256 101653a12e2243dd4253abbc24becfeef0d2bae5037ae848a1f4848bec4a163e SHA512 eb0392730a076565c459a2645b6497b86d3a86d0096661eb468b00cbb909ffbed7db762adb866a9cbfca40ff339d90ce0c970404b718b8f8a4d084dbf51a1ddf WHIRLPOOL 0317478d7fc84c7d1716d2b449298b382a2349a5ed746c458a9e47a129fdbe9d4e7ec330bc36c07e9be0ae2ca041518424f1ce7ef3333e547667947eec5f6c12
+EBUILD logrotate-3.12.2.ebuild 1903 SHA256 d909fdef412279a0147a2f9d02986cafea2c4bd63936ab0fa0538ecad797483e SHA512 78ae7250c4c26ff7f702746535bace0f34b68d2ceb9d6cc3744975d1842781bb2037fa520b873806659db2e5acb8b58ec14996865be82e62d1d892acdae3b134 WHIRLPOOL 728c71c61e3ac0830ea100d891bcaf7fa8c9cf75e7c8f455862442d31a0f83b459d50ef54101a31745c84d6f491473404ded5c9372cf551a8499eff60893a49a
+EBUILD logrotate-3.12.3-r1.ebuild 2487 SHA256 e1871fe019ac5de8ef40c4e4b33e6e2a2b14ff52f39fd7969b3e547551dba63c SHA512 b085e9bbc3a21814f7d12bdbd37b38094527e04253bd64e5a90ecf366b58b1a9aae98752508f0f59a2fcf09f548bfa5c7e65436c4ce80918eee78df978ad34cc WHIRLPOOL 90c109fdf4396b723ecee00ebb676b0d8718d7fe9f72bdb5a87782355c411cfe72af86994c7564cd16c6f26397f2724eb63bcd04e3f767c5e318e59340681416
+EBUILD logrotate-3.12.3-r2.ebuild 2552 SHA256 55c7d7cd58624e29f040d575fe0d695bf66af60dfa735efd24416e2306e07140 SHA512 b3f3b5d0264bb75c717608be706eccf33d97996f38c5ca152e1797f9dfbdfc40add7065fa614a715d0a30d431dd484e34a8b48138b80d99bcdd546b597264436 WHIRLPOOL db532413f8a7aa375b952c7451a482f362ff2aa93316f62dacbc75274e692e6be19088b28305973b610eaed3bae4578998720213c8e33bd252f529cdbc02c754
+EBUILD logrotate-3.12.3.ebuild 2479 SHA256 f5bc883c099160493f924e3b72aa304eac5d23248f21137876b1f774a24539e8 SHA512 4e0b4b99277ee692318a6d6f4358a5463f11c339cc1e610040a9a436b412d5f8ba22ededee3453a4dc6dccd66067ee04931a39d3b27f08189592c2366f0c0365 WHIRLPOOL 9d71a14ec8ba93fa742d20d1275e757236b37413947248614fdbcf723a49dbaf700e20145e6523ac759d637a795355af1f636227db0803b04f994bbbedaafaf3
+EBUILD logrotate-3.9.1.ebuild 1767 SHA256 72213fbfa0a0f182e8ac774e29a8763a17b394c1b4e33e7cac664c7bccbcc96a SHA512 ed808392727749efb6d20a410810f6eb9cb364db2e11460f4c2940abd0fb1d7430b75102f2fcabcaf64e8818da39323010d2a5d223df49c705a6171acf541a03 WHIRLPOOL 245d8f38775b0a9296cc41c0af04e6aca66a7722c2eafbe6814b2a865cc4bd1237f5ef1aa146089882112144db8292d1e706323ec63d2b018ba9bac06147cb37
+MISC ChangeLog 11318 SHA256 38d98af46e97c9519c8e99cf7bf71b7c27b1814b35870579057d068c54fc14c7 SHA512 d2992032a405e2c185966f44f50a1a92c0138f8e847b55402a620f144ecedf58a23381c0ae42b12d344cf18eeab833a786ed35401a29c0c45aa2b67664ba8c51 WHIRLPOOL 66cb04fb922ba81fc9bcf4cd200c6d236d5a758f872da2e55bb09981571b914adca5c40e2597b4dea1ef994ce36782aac590adc5d6aa149b1adc08f36b1ea5dc
+MISC ChangeLog-2015 31549 SHA256 9a573fb1c828c7902f5b51a4f331a7df387a331c49509396799505c3e7c5c323 SHA512 13817496f0b30b421db6c36d2f044b7165a8282420d5124c52a6e5220cddc30ac774b63a43b395f0c0392339e67bcf6a855e16c666de34ad13004ec1d0f056fa WHIRLPOOL 4a957803bf090890dcb9ad77152e87bba98952493f97e75a00718ff024e5b774baca23c554e7ae2995d499d3791a38eb4b83f8126ab295fd2ed7c97652ed8687
+MISC metadata.xml 1119 SHA256 b7371408e490b8daaa817a32cca5415613c41b1810498fc74423cb1446d90444 SHA512 99725d54d1cf68b257446ef8afc43d4bfe05cc789c818222d603012ae1e636624962c23a845f8858f4fc7aaf5a7e7f8085a7b173185ba66d7e390012dbceef79 WHIRLPOOL 483f4c22f62575c599cd687b1b5303c1c084b35723090041e72418d5b8086f5c44fd14a0f96960b91a355eeef01bb1c1f7220031720f2cfd27c77b3904ef9911
diff --git a/app-admin/logrotate/files/logrotate-3.11.0-Werror.patch b/app-admin/logrotate/files/logrotate-3.11.0-Werror.patch
new file mode 100644
index 000000000000..43c0ebaeb189
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.11.0-Werror.patch
@@ -0,0 +1,12 @@
+diff -Nuar a/Makefile.am b/Makefile.am
+--- a/Makefile.am 2016-11-30 13:05:55.000000000 +0100
++++ b/Makefile.am 2016-12-02 23:46:15.288908073 +0100
+@@ -8,7 +8,7 @@
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ # GNU General Public License for more details.
+ #
+-AM_CFLAGS = -Wall -Werror
++AM_CFLAGS = -Wall
+ sbin_PROGRAMS = logrotate
+ logrotate_SOURCES = basenames.c config.c log.c logrotate.c \
+ basenames.h config.h log.h logrotate.h queue.h
diff --git a/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch b/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch
new file mode 100644
index 000000000000..f5aa65272b88
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.11.0-fbsd.patch
@@ -0,0 +1,57 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c 2016-12-02 23:33:36.768905615 +0100
++++ b/config.c 2016-12-02 23:36:15.568906130 +0100
+@@ -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 2016-11-30 14:07:15.000000000 +0100
++++ b/logrotate.c 2016-12-02 23:36:44.218906223 +0100
+@@ -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.legacy b/Makefile.legacy
+--- a/Makefile.legacy 2016-11-30 13:05:55.000000000 +0100
++++ b/Makefile.legacy 2016-12-02 23:37:33.938906384 +0100
+@@ -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.11.0-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.11.0-ignore-hidden.patch
new file mode 100644
index 000000000000..104f202efd27
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.11.0-ignore-hidden.patch
@@ -0,0 +1,14 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c 2016-11-30 13:05:55.000000000 +0100
++++ b/config.c 2016-12-02 23:33:36.768905615 +0100
+@@ -383,7 +383,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.11.0-lfs.patch b/app-admin/logrotate/files/logrotate-3.11.0-lfs.patch
new file mode 100644
index 000000000000..9cd5745e846a
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.11.0-lfs.patch
@@ -0,0 +1,11 @@
+diff -Nuar a/configure.ac b/configure.ac
+--- a/configure.ac 2016-12-02 14:08:40.000000000 +0100
++++ b/configure.ac 2016-12-02 23:48:03.878908425 +0100
+@@ -12,6 +12,7 @@
+ AC_PROG_CC_STDC
+ AC_STRUCT_ST_BLKSIZE
+ AC_STRUCT_ST_BLOCKS
++AC_SYS_LARGEFILE
+
+ dnl Use 64-bit file offsets on 32-bit systems (defines C macros if necessary)
+ AC_SYS_LARGEFILE
diff --git a/app-admin/logrotate/files/logrotate-3.11.0-noasprintf.patch b/app-admin/logrotate/files/logrotate-3.11.0-noasprintf.patch
new file mode 100644
index 000000000000..36733a25d03b
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.11.0-noasprintf.patch
@@ -0,0 +1,55 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c 2016-12-02 23:36:15.568906130 +0100
++++ b/config.c 2016-12-02 23:41:17.438907108 +0100
+@@ -49,39 +49,6 @@
+ #include "asprintf.c"
+ #endif
+
+-#if !defined(HAVE_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(HAVE_STRNDUP)
+ char *strndup(const char *s, size_t n)
+ {
+diff -Nuar a/logrotate.h b/logrotate.h
+--- a/logrotate.h 2016-11-30 13:05:55.000000000 +0100
++++ b/logrotate.h 2016-12-02 23:40:54.518907034 +0100
+@@ -82,8 +82,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-3.12.2-fbsd.patch b/app-admin/logrotate/files/logrotate-3.12.2-fbsd.patch
new file mode 100644
index 000000000000..67a60e3af177
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.12.2-fbsd.patch
@@ -0,0 +1,36 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c 2017-04-22 23:46:08.201991730 +0200
++++ b/config.c 2017-04-22 23:49:43.021996055 +0200
+@@ -25,6 +25,10 @@
+ #include <sys/mman.h>
+ #include <libgen.h>
+
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "log.h"
+ #include "logrotate.h"
+
+diff -Nuar a/logrotate.c b/logrotate.c
+--- a/logrotate.c 2017-04-21 10:52:10.000000000 +0200
++++ b/logrotate.c 2017-04-22 23:50:20.691996814 +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>
+@@ -27,6 +27,10 @@
+ #include <limits.h>
+ #endif
+
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "log.h"
+ #include "logrotate.h"
+
diff --git a/app-admin/logrotate/files/logrotate-3.12.2-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.12.2-ignore-hidden.patch
new file mode 100644
index 000000000000..0bbb91dcb4fc
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.12.2-ignore-hidden.patch
@@ -0,0 +1,14 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c 2017-04-18 14:57:02.000000000 +0200
++++ b/config.c 2017-04-22 23:46:08.201991730 +0200
+@@ -389,7 +389,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.12.3-fbsd.patch b/app-admin/logrotate/files/logrotate-3.12.3-fbsd.patch
new file mode 100644
index 000000000000..67a60e3af177
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.12.3-fbsd.patch
@@ -0,0 +1,36 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c 2017-04-22 23:46:08.201991730 +0200
++++ b/config.c 2017-04-22 23:49:43.021996055 +0200
+@@ -25,6 +25,10 @@
+ #include <sys/mman.h>
+ #include <libgen.h>
+
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "log.h"
+ #include "logrotate.h"
+
+diff -Nuar a/logrotate.c b/logrotate.c
+--- a/logrotate.c 2017-04-21 10:52:10.000000000 +0200
++++ b/logrotate.c 2017-04-22 23:50:20.691996814 +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>
+@@ -27,6 +27,10 @@
+ #include <limits.h>
+ #endif
+
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "log.h"
+ #include "logrotate.h"
+
diff --git a/app-admin/logrotate/files/logrotate-3.12.3-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.12.3-ignore-hidden.patch
new file mode 100644
index 000000000000..0bbb91dcb4fc
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.12.3-ignore-hidden.patch
@@ -0,0 +1,14 @@
+diff -Nuar a/config.c b/config.c
+--- a/config.c 2017-04-18 14:57:02.000000000 +0200
++++ b/config.c 2017-04-22 23:46:08.201991730 +0200
+@@ -389,7 +389,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 <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
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 <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/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.11.0.ebuild b/app-admin/logrotate/logrotate-3.11.0.ebuild
new file mode 100644
index 000000000000..2570ecbb1bf9
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.11.0.ebuild
@@ -0,0 +1,88 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils toolchain-funcs flag-o-matic
+
+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 )"
+
+install_cron_file() {
+ sed -i 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.cron || die
+ exeinto /etc/cron.daily
+ newexe "${S}"/examples/logrotate.cron "${PN}"
+}
+
+PATCHES=(
+ "${FILESDIR}/${P}-ignore-hidden.patch"
+ "${FILESDIR}/${P}-fbsd.patch"
+ "${FILESDIR}/${P}-noasprintf.patch"
+ "${FILESDIR}/${P}-Werror.patch"
+ "${FILESDIR}/${P}-lfs.patch"
+)
+
+src_prepare() {
+ default
+ 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
+ dobin logrotate
+ doman logrotate.8
+ dodoc ChangeLog.md examples/logrotate*
+
+ insinto /etc
+ doins "${FILESDIR}"/logrotate.conf
+
+ use cron && install_cron_file
+
+ keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+ elog "The ${PN} binary is now installed under /usr/bin. Please"
+ elog "update your links"
+ 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.12.2.ebuild b/app-admin/logrotate/logrotate-3.12.2.ebuild
new file mode 100644
index 000000000000..15b0107f6562
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.12.2.ebuild
@@ -0,0 +1,83 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools eutils toolchain-funcs flag-o-matic
+
+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 )"
+
+install_cron_file() {
+ sed -i 's#/usr/sbin/logrotate#/usr/bin/logrotate#' "${S}"/examples/logrotate.cron || die
+ exeinto /etc/cron.daily
+ newexe "${S}"/examples/logrotate.cron "${PN}"
+}
+
+PATCHES=(
+ "${FILESDIR}/${P}-ignore-hidden.patch"
+ "${FILESDIR}/${P}-fbsd.patch"
+)
+
+src_prepare() {
+ default
+ 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
+ dobin logrotate
+ doman logrotate.8
+ dodoc ChangeLog.md examples/logrotate*
+
+ insinto /etc
+ doins "${FILESDIR}"/logrotate.conf
+
+ use cron && install_cron_file
+
+ keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+ elog "The ${PN} binary is now installed under /usr/bin. Please"
+ elog "update your links"
+ 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.12.3-r1.ebuild b/app-admin/logrotate/logrotate-3.12.3-r1.ebuild
new file mode 100644
index 000000000000..b5f5d4e95d90
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.12.3-r1.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2017 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}
+
+ 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
+ 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.12.3-r2.ebuild b/app-admin/logrotate/logrotate-3.12.3-r2.ebuild
new file mode 100644
index 000000000000..f0661a39594e
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.12.3-r2.ebuild
@@ -0,0 +1,99 @@
+# Copyright 1999-2017 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.12.3.ebuild b/app-admin/logrotate/logrotate-3.12.3.ebuild
new file mode 100644
index 000000000000..34807c80e888
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.12.3.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2017 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 bzip2"
+
+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 )
+ bzip2? ( app-arch/bzip2 )"
+
+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() {
+ if use bzip2 ; then
+ compressconf="--with-compress-command=/bin/bzip2 --with-uncompress-command=/bin/bunzip2 --with-compress-extension=.bz2"
+ fi
+ econf $(use_with acl) $(use_with selinux) ${compressconf} --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}
+
+ keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+ elog "The ${PN} binary is now installed under /usr/bin. Please"
+ elog "update your links"
+ elog
+ move_old_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 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>nimiux@gentoo.org</email>
+ <name>Chema Alonso</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
+ file daily, weekly, monthly or when the log file gets to a certain
+ size.
+ </longdescription>
+ <longdescription lang="es">
+ 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.
+ </longdescription>
+ <use>
+ <flag name="acl">Installs acl support</flag>
+ <flag name="cron">Installs cron file</flag>
+ <flag name="selinux">Installs Security Enhanced Linux support</flag>
+ </use>
+ <upstream>
+ <remote-id type="github">logrotate/logrotate</remote-id>
+ </upstream>
+</pkgmetadata>