summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé María Alonso <nimiux@gentoo.org>2013-05-10 19:46:05 +0000
committerJosé María Alonso <nimiux@gentoo.org>2013-05-10 19:46:05 +0000
commit6b56b9567c8259af9e56487f9a2a2c2d6f9d3095 (patch)
tree6739e4526c9f6a1dbf83f7cbdd7403c1fe0da747 /app-admin/logrotate
parentsplit out valgrind part for USE=debug as proposed on bug 468984 (diff)
downloadhistorical-6b56b9567c8259af9e56487f9a2a2c2d6f9d3095.tar.gz
historical-6b56b9567c8259af9e56487f9a2a2c2d6f9d3095.tar.bz2
historical-6b56b9567c8259af9e56487f9a2a2c2d6f9d3095.zip
Revision bump
Package-Manager: portage-2.1.11.62/cvs/Linux x86_64 Manifest-Sign-Key: 0xD628E536
Diffstat (limited to 'app-admin/logrotate')
-rw-r--r--app-admin/logrotate/ChangeLog11
-rw-r--r--app-admin/logrotate/Manifest21
-rw-r--r--app-admin/logrotate/files/logrotate-3.8.4-atomic-create.patch43
-rw-r--r--app-admin/logrotate/files/logrotate-3.8.4-datehack.patch12
-rw-r--r--app-admin/logrotate/files/logrotate-3.8.4-fbsd.patch57
-rw-r--r--app-admin/logrotate/files/logrotate-3.8.4-ignore-hidden.patch14
-rw-r--r--app-admin/logrotate/files/logrotate-3.8.4-noasprintf.patch55
-rw-r--r--app-admin/logrotate/files/logrotate.conf5
-rw-r--r--app-admin/logrotate/logrotate-3.8.4.ebuild70
9 files changed, 280 insertions, 8 deletions
diff --git a/app-admin/logrotate/ChangeLog b/app-admin/logrotate/ChangeLog
index aef6acf4d127..6ab2ee2137dd 100644
--- a/app-admin/logrotate/ChangeLog
+++ b/app-admin/logrotate/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-admin/logrotate
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/ChangeLog,v 1.138 2013/01/01 19:29:18 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/ChangeLog,v 1.139 2013/05/10 19:45:40 nimiux Exp $
+
+*logrotate-3.8.4 (10 May 2013)
+
+ 10 May 2013; Chema Alonso <nimiux@gentoo.org> +logrotate-3.8.4.ebuild,
+ +files/logrotate-3.8.4-atomic-create.patch,
+ +files/logrotate-3.8.4-datehack.patch, +files/logrotate-3.8.4-fbsd.patch,
+ +files/logrotate-3.8.4-ignore-hidden.patch,
+ +files/logrotate-3.8.4-noasprintf.patch, files/logrotate.conf:
+ Revision bump
01 Jan 2013; Raúl Porcel <armin76@gentoo.org> logrotate-3.8.3.ebuild:
s390/sh stable wrt #447510
diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index ea06b97eaa41..16090dda7491 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -14,20 +14,31 @@ AUX logrotate-3.8.3-fbsd.patch 1524 SHA256 b0857af2e8d35c9e388fd997fbaba0cc26607
AUX logrotate-3.8.3-fix-acl-tests.patch 1759 SHA256 2e29e4bd978ec07ef173b9ca7655dcc58a162ec4c354fcf84570e80614d0fb2d SHA512 9140bb887118f98466c9dcd08c58ebb8a1891baff1563284d78789a7e01b8f747200344595f7d529591391d91f37ce26a62d4c1aa43b23dd4ac3f0ff2d3a6d7f WHIRLPOOL 0d5e11b34f0b24b4dffeee735b6494514bd584aa68e305226406c47c67b63ce96c8dd9b88f0f661d939fe472fcee9e513090b4fec0cb9b4951417f73562b4eb7
AUX logrotate-3.8.3-ignore-hidden.patch 547 SHA256 be387f0971b1236b241f2f42114cde4fd5eb8582df9cce6a9acf2ed636222b19 SHA512 7faa49f831c93b149218bd5142f226fbb7627500ba20ea97054cae30f63f6f56dfb868959e01e8a1e1e814460065e3e9235a101ff25ebbdcd57fd54035f14266 WHIRLPOOL 5401107d61827a81dbd05a605e6208170dfbd755c8e08da4ebf63fffd2e8a4fd05cd889714257693ccdd0c30cdde9f1e5b6cac15e55c059db3bcbe71269eb242
AUX logrotate-3.8.3-noasprintf.patch 1204 SHA256 dba104967ed370eca3b56cce6e4a20175422072b40700372eca1931e725014a7 SHA512 c3fa4a3b7ad9ff308996f85a92ca96c3ce0f357c45a2bda76d0e3ad6b0fde4cee07b2b7c31d4c06bc50d5b40866342e288f0ba4ed9934457c94714468423f6e9 WHIRLPOOL e578d011bfa5c09d4c9d7904febb0cc8b010981bf5f82e6da82d2ffa5147836cb1615e28a144d643f48f250600669fbd89d625ddf2f8ad88c14cd6f249787bc7
-AUX logrotate.conf 860 SHA256 5a0d6a2f331af0df8e0b87904ba522b64bfebc13f47b0a5717e03257d3f29ad7 SHA512 ada7ad4efc4d9ff0b8067db80af6c7be0f44f12f7bb705949cc76dd9f2818ec368be1dfc8432cf5ee2955c72d137fb609b7886a3d982045c18d4a809ef72c480 WHIRLPOOL ce50276ffd0a0ff8e347e724b08576c622112bcc535b0ce584fbcb4ea2f496d2ee09a1020f895a7b6d75f83b7b9df803d8db8b28c93c50eab9706588d5e3789f
+AUX logrotate-3.8.4-atomic-create.patch 1311 SHA256 39982ff6e7d17f70b2361366d773f0c7233c5ea373f7d4f73ffb8b5fac855143 SHA512 49f8b06807f612b48e92c70892545c9a97ffd0f1c7e2e2292c926789cc0582a6481779907f9d105a7d46fb3b7ae529a55d4c59c3e2380103c9ca80b5a7b82289 WHIRLPOOL 8c54c11c5c36cee80c89a480b1cd5067656a85663714f77c5aeb454a8c9defd4f64e853afb6f94603e17ce451d3239ae09b7fbae46562ded4febbfc54f1e299c
+AUX logrotate-3.8.4-datehack.patch 436 SHA256 4e06899d6c341bb4e7c01ebcca8faa99fa9f4d4a12324be0a9af42e57f105894 SHA512 63e69ba1708b2a5c3c56287503f19852f19f6db1d38597a7bab8f358f992455eade3edeedfce39593ef2e6d17340f5a9fc30a768a1e1d68a69c10607b21f2f54 WHIRLPOOL e2f052a2365a7cee8fabc53b4b358f7d518c2fea9b52f0c6031654a6841522714d360e8f965a167534a66c11ebc8026688723e2f2370bb93afaf8c6964c633cf
+AUX logrotate-3.8.4-fbsd.patch 1405 SHA256 410248cc639b6d669bcef610fbb78adcfbf8c0f0b472450457bdb044397d71aa SHA512 f10c59342b1c0e5a5f1c38ffc554c65128380fd377e8deb507f304f36d9d4a50c0db213d20e31621741cc6f82152f8a26a4097295b035ecc144c88aca7fdde4c WHIRLPOOL 17438ccf7a653f92ecede8ee8b491cf8378e16a39576b119d1e1ba1c9d0447316ddb5e933b28eef120e8a1f7d7f621b7f933768e1d2964b34b36c14895c1c4d5
+AUX logrotate-3.8.4-ignore-hidden.patch 547 SHA256 9acc7d88058d93a3f9c718292ff313d6b12000e78c82cd1855f22adaf1f5af6d SHA512 a6acba8d73b60f66ce5e6e053b07de4fd6225edf2216069592b9c95426377c5cd143685140c76349924699427db56cf83e8c7828af6748be9ce2b3445dbf20f8 WHIRLPOOL 76a7378b53826603685ef38820f7393dfa44792374a89c005ae4af3913e6722a7f5ed5251b62855f00e64225cdd56388df8ec17fd212d079d8860635186de9ec
+AUX logrotate-3.8.4-noasprintf.patch 1204 SHA256 fc9f549b5069bec5b59af125bbfd1852c71ee0e81dba489d24cc3f9219b948b1 SHA512 6485643cfb0852dc81d9496bea89b0479fc65135c1ef99a680b57186d7188e7365ce9b64f0dd45f3405591ce3f1a1dd4bf07aafcb8a4889a34ac7a0f49ae6648 WHIRLPOOL 42fa66747304f6d6586b9fbd44136756aecfcab3edc98df2327a03076cc52bcec7065cde09496f9f28cbf6692b4d555c614be4df0385a3598b9951e8cc27c360
+AUX logrotate.conf 872 SHA256 4ea141e6d9003c267295b75652732a80af300df170424a5cc8587126ef48696f SHA512 e275c0d4a1e078d049f8269745bc9ac8296378e44d2424f8b5107f3cfdb20ad94d17874cd80057fc8f71ae0ed44c993dd74cd9cb2d83644fd7ce2809eae55eea WHIRLPOOL a4cb1b3feaf51a63643c40a54ce8ace0cead1b7df22d7cf5f9b102029edcd4491353f305e075997156b0f048e4da5c009574af992b9198c6659949d91e6e29cf
AUX logrotate.cron 52 SHA256 5eeae7dfbd54f74108d49cda8285211898d29ab7d547dee267803299e7339560 SHA512 5d5797b0f4490ff39b48319165db2cb4e821d9930a45d0550de8dc541ce899eb1e7cab7b9dc3d7a350835ddb8f6702246f1b50e0930037f3c52c82ee129f1acf WHIRLPOOL a9537ebcfd51d911f4f8ffbc430618d6bf510b6f442414f61e6f4c203f9c268d939aaec9b151c29bbd6a292348f386cdd0a1685d324749b110ef14d59439d647
DIST logrotate-3.8.1.tar.gz 48827 SHA256 c12471e70ae8bc923bd5c4f25e8fd6483b68c6301f3cd79f7cfe37bc5b370169 SHA512 d1467f0c894f44edf46a3049d61ef09e4ae4cc361f3a88e38b2126ebe0650604c6a2b4e1c751ca35538ddb13b25dcee52fa4c21ccefbd040ae1e50c4bb126b09 WHIRLPOOL decd2d6be262c0ab1efc1d0b1b2639f50d16238ab8e781e31008b67e9917a670cd7ff7dfe98ec879b7d1fbb7f12d9f018a1173f44e574737931ab5f81cc221c0
DIST logrotate-3.8.2.tar.gz 51213 SHA256 1cb9496e48fc4b8fe63d85d27be8567e9131541fe11e4d4d5993730afc578cab SHA512 ccf21a06a8af5535f0e6de05dc5b02c3e7efdfe6117cb0fc3f4d8d41e8c579bddad3aeba7dfa63cea0bcf78f5cfbe010ff9c7b580ea868229bf3069f29906162 WHIRLPOOL bcc9a27ca1afa29e56ea366cc6ed034ecbc93995d3bda63e24e0b593cbe181091b4f525726130becdbd9bda8d136f36da40105316c80d4576613948b5f3a7fe7
DIST logrotate-3.8.3.tar.gz 52210 SHA256 0776bf491171edbcc3ba577751fc912e721e99b834c14251df8109fd3bfa1977 SHA512 34bd24a4740191f8a2e3941fbebcade308becc60cb7aca6ccde93662afe8341dbf7d9177dfe1bd4c124b3aa2829d0ad999fa4bba9101e479f077c55b26fe7119 WHIRLPOOL a9bdec35bf6bc6bedf6ecc0245e6b1780fb2a2910b67ba0704d41f4939c12e2aac948e9f4fb43c5ccbd7d5a54c30f12229fff35b4ca884fc0d3f725b62dbf208
+DIST logrotate-3.8.4.tar.gz 55610 SHA256 d363e9212527ada6e566ad04e18d21eb7d70a3bfd0710671c7b75a2c0dd96e29 SHA512 c3a509d8d9140b4a584c9ca731df10d8df17abfd38fc1263d19b2d25560cd047cf2036c7a5ffa738036599f55616b3c73456af63c40ec087672a263e8895aee0 WHIRLPOOL af914183c0f1358f3e9ce06509b922af43bd5a0e9a942a8b3d546b0966540fb27920cf8d61141d50d99f7157ee35e8f90b42fb4765bc5c4bc3400a9c17b1c156
EBUILD logrotate-3.8.1.ebuild 1832 SHA256 f2f6f3f864751dc71f941431a695a6ce9199984f50df359b6d3d4b598afb0002 SHA512 6e894773740d5c05813279ddd0529ea80e87d2bb471d9b4cab1e6e685b8f20d9b819de604d37965e774bba1c5ecc5484d207f45753cdd2e319c09cc2cfb292b8 WHIRLPOOL 7a49d8568b57b13ad1194de86f50a221487c5f9fbc07583e65f75e7a79a5cd43335a713a597893fa438754418f2d1f0357dd8b0ae9b098a9a2cb40c715458dbc
EBUILD logrotate-3.8.2.ebuild 1810 SHA256 f2b413ea1d384dce708462f83e01f5f1b0d5065ecc2a85c0b1f303c71992756e SHA512 3f0517fb3b14f268a220e3c10b4722a79ad545964019038511a340749a151f95f5f0976d03f56059f68e64596a7557d0b5037b19de3908a75d282354dfddf2c5 WHIRLPOOL 89f5408b75b9908b0fed23a4411a3ded26033dfefef64590b698248890e09783b93a744a9489dfc940c6b28afe327e59fbe9c834626a7e5dbcd21da97223ba6e
EBUILD logrotate-3.8.3.ebuild 1906 SHA256 59eea1e2bebe91e077ece6598219d7faca98236d3cb61c07ade8313e3b2e1514 SHA512 306014eacdd00e26d9b2fee2e02dbf1c330aebaa9d1f43def8e636f116a7f69e396261c217c9b8561203c3651b679a2f13477283cde3ce252970ff287d27db8e WHIRLPOOL 85e90b52b92a097a211c0d09e43e83fb720a7b35043819d69039383af1efab33b50b18bb88f47f6d242618fc84023fd60c4914b2ffbe65e6be8adbeda082690d
-MISC ChangeLog 20001 SHA256 d9332bfd9a84cd2a05501edd6c324abfa3b8c69aa43128100a59cabbd27686f0 SHA512 ae40b476abb4e3c21ec197eca30bdc6fb4319aefe1f9d283efddea424c3d337599123aa0da733d95407f72d5e88bc5ad8be26f963bda8b3667a71b45a198c183 WHIRLPOOL 6b1fdb3073ea3adb474d0a2e66779451e0ee2a2d2f46c6e0842d64926ffbfcbab49a96e6d7569afdac94209a1a7c93b6b1c90e0d4fc5c6e364d0ba6f8202394a
+EBUILD logrotate-3.8.4.ebuild 1797 SHA256 3b43cc49c01a329e8ccca6e8a4389d4d1397b24ca024554895b625b21c595bf5 SHA512 a0e32d91b634d236815cae834d8f479b9b4b405c65b498d00a303999aa1ca1bdc7cb6f226332741d3d4bf1993e285f1d0be94ccad6695311f536ee186786093f WHIRLPOOL 5ba008baffe6643fcbb78b21cb18af4e1fe6333a866a777a0ddd1f32ff2a2717eabc0550939e29be30d2d72282b00f84b57419226a146221130a87679cb78a5e
+MISC ChangeLog 20355 SHA256 7ea18a824fc13d82c83ed0775daa1978a08a83a0fb58386a5157e3393f610add SHA512 1aaf75df6ba06a5e868c5899ff2db1a92a870717a2cb6cf9f8c97217f7f694bf6fc0df8f8007fea2bcf2cf71821b3b5d69e1d451c2028042fa3f6b5ee968126a WHIRLPOOL 61dc946dd1eca8d89f32fcadb60176c71b54ab1578e3361ae3f4fb1eea74e7b406234a17d05a15c655e5983903579ae8ede3b0708a5a4456a3740ce2e75d95ab
MISC metadata.xml 975 SHA256 a329700a1e76593184907198fff2f678e429294226461ac1a913fe58cbb28c8d SHA512 c7736be8ad13e6e31c6561ff0fdbc2e3df7f59069eafdc5b655f780d96d277795201b9db747bc3da24c932aaaad16d40aebf18b8fc679f7ae8fa528088828d4f WHIRLPOOL 931ab959ebfb43aaac9c8926f26e17750c38f155ed15905117e2c8ca3374db427db763c6b724db9eb7f05fcf600dac54ed8008c222410073d82e17e38b0a45be
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEAREIAAYFAlDjOQ8ACgkQuQc30/atMkC5GgCfQlUV0uplR97Gg4fp7nuZNwDa
-Kc8An0q18nIiID/usr4Flqemz9A4WYmX
-=Jo7m
+iQEcBAEBCAAGBQJRjU58AAoJEA2sAkrWKOU2sbsH/iRx/eKUM4IldXM1M4ECzFwp
+8lMkhcCbLp7eg37J4OD5g3/rqrVpWeqXzGKlThpRFo5gIJPxKpydpdLPOQRYp/ma
+GRGHEZBcw/lYH2TLhHshUIEA09OqZhIDidmHJ+h8wRoOY66gfBYuAZX80B4y3QMm
+9nMOJh7aBG1s5snaesXa11SQSB3e+FcrLDgCdioZHqfnaLdnmmWu14WT8hy/P8uD
+EIW2VJptMUabV63v+DnkTe2mLEz8yWiY2PGHjdz+GbrhSoi8ndRPapMs3KqgT7F7
+Fm4iqGik3Y90m3lQQkxMscsptRV5uyNNhqTlu+lj6ixTWro73V45mHXsxov2fWY=
+=HUN4
-----END PGP SIGNATURE-----
diff --git a/app-admin/logrotate/files/logrotate-3.8.4-atomic-create.patch b/app-admin/logrotate/files/logrotate-3.8.4-atomic-create.patch
new file mode 100644
index 000000000000..28fd0375ac32
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.8.4-atomic-create.patch
@@ -0,0 +1,43 @@
+diff -Nur a/logrotate.c b/logrotate.c
+--- a/logrotate.c 2013-05-10 21:06:07.459903230 +0200
++++ b/logrotate.c 2013-05-10 21:15:15.849900150 +0200
+@@ -300,14 +300,20 @@
+ int createOutputFile(char *fileName, int flags, struct stat *sb, acl_type acl, int force_mode)
+ {
+ int fd;
+- struct stat sb_create;
+
+- fd = open(fileName, (flags | O_EXCL | O_NOFOLLOW),
+- (S_IRUSR | S_IWUSR) & sb->st_mode);
++ struct stat sb_create;
++ char template[PATH_MAX + 1];
++ char *fname;
++ mode_t umask_value;
++ snprintf(template, PATH_MAX, "%s/logrotate_temp.XXXXXX", ourDirName(fileName));
++ umask_value = umask(0000);
++ fname = mktemp(template);
++ fd = open(fname, (flags | O_EXCL | O_NOFOLLOW), (S_IRUSR | S_IWUSR) & sb->st_mode);
++ 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)) {
+@@ -352,6 +358,13 @@
+ }
+ #endif
+
++ 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.8.4-datehack.patch b/app-admin/logrotate/files/logrotate-3.8.4-datehack.patch
new file mode 100644
index 000000000000..d320666d3631
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.8.4-datehack.patch
@@ -0,0 +1,12 @@
+diff -Nur a/logrotate.c b/logrotate.c
+--- a/logrotate.c 2013-04-30 10:29:31.000000000 +0200
++++ b/logrotate.c 2013-05-10 20:58:58.229905641 +0200
+@@ -1851,7 +1851,7 @@
+ }
+
+ /* Hack to hide earlier bug */
+- if ((year != 1900) && (year < 1996 || year > 2100)) {
++ if ((year != 1900) && (year < 1970 || year > 2100)) {
+ message(MESS_ERROR,
+ "bad year %d for file %s in state file %s\n", year,
+ argv[0], stateFilename);
diff --git a/app-admin/logrotate/files/logrotate-3.8.4-fbsd.patch b/app-admin/logrotate/files/logrotate-3.8.4-fbsd.patch
new file mode 100644
index 000000000000..e0d06d8d53ee
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.8.4-fbsd.patch
@@ -0,0 +1,57 @@
+diff -Nur a/Makefile b/Makefile
+--- a/Makefile 2013-04-30 10:29:31.000000000 +0200
++++ b/Makefile 2013-05-10 21:07:51.189902648 +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 -Nur a/config.c b/config.c
+--- a/config.c 2013-05-10 21:03:29.309904119 +0200
++++ b/config.c 2013-05-10 21:05:13.989903531 +0200
+@@ -1,6 +1,6 @@
+ #include <sys/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 -Nur a/logrotate.c b/logrotate.c
+--- a/logrotate.c 2013-05-10 20:58:58.229905641 +0200
++++ b/logrotate.c 2013-05-10 21:06:07.459903230 +0200
+@@ -1,6 +1,6 @@
+ #include <sys/queue.h>
+ /* alloca() is defined in stdlib.h in NetBSD */
+-#ifndef __NetBSD__
++#if !defined(__NetBSD__) && !defined(__FreeBSD__)
+ #include <alloca.h>
+ #endif
+ #include <limits.h>
+@@ -41,6 +41,10 @@
+
+ static acl_type prev_acl = NULL;
+
++#if !defined(PATH_MAX) && defined(__FreeBSD__)
++#include <sys/param.h>
++#endif
++
+ #include "basenames.h"
+ #include "log.h"
+ #include "logrotate.h"
diff --git a/app-admin/logrotate/files/logrotate-3.8.4-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.8.4-ignore-hidden.patch
new file mode 100644
index 000000000000..a76937fd8bfb
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.8.4-ignore-hidden.patch
@@ -0,0 +1,14 @@
+diff -Nur a/config.c b/config.c
+--- a/config.c 2013-04-30 10:29:31.000000000 +0200
++++ b/config.c 2013-05-10 21:03:29.309904119 +0200
+@@ -255,7 +255,9 @@
+ 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.8.4-noasprintf.patch b/app-admin/logrotate/files/logrotate-3.8.4-noasprintf.patch
new file mode 100644
index 000000000000..e4d9f87e501d
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.8.4-noasprintf.patch
@@ -0,0 +1,55 @@
+diff -Nur a/config.c b/config.c
+--- a/config.c 2013-05-10 21:05:13.989903531 +0200
++++ b/config.c 2013-05-10 21:12:05.859901217 +0200
+@@ -49,39 +49,6 @@
+ #include "asprintf.c"
+ #endif
+
+-#if !defined(asprintf)
+-#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 -Nur a/logrotate.h b/logrotate.h
+--- a/logrotate.h 2013-04-30 10:29:31.000000000 +0200
++++ b/logrotate.h 2013-05-10 21:12:25.139901109 +0200
+@@ -67,8 +67,5 @@
+ extern int debug;
+
+ int readAllConfigPaths(const char **paths);
+-#if !defined(asprintf)
+-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
index 25dd13495e13..690a5f7fe078 100644
--- a/app-admin/logrotate/files/logrotate.conf
+++ b/app-admin/logrotate/files/logrotate.conf
@@ -1,4 +1,4 @@
-# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v 1.3 2008/12/24 20:49:10 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/files/logrotate.conf,v 1.4 2013/05/10 19:45:39 nimiux Exp $
#
# Logrotate default configuration file for Gentoo Linux
#
@@ -27,10 +27,11 @@ notifempty
nomail
noolddir
-# no packages own lastlog or wtmp -- we'll rotate them here
+# no packages own wtmp and btmp -- we'll rotate them here
/var/log/wtmp {
monthly
create 0664 root utmp
+ minsize 1M
rotate 1
}
diff --git a/app-admin/logrotate/logrotate-3.8.4.ebuild b/app-admin/logrotate/logrotate-3.8.4.ebuild
new file mode 100644
index 000000000000..87f74cc55b46
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.8.4.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/logrotate-3.8.4.ebuild,v 1.1 2013/05/10 19:45:40 nimiux Exp $
+
+EAPI=5
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Rotates, compresses, and mails system logs"
+HOMEPAGE="https://fedorahosted.org/logrotate/"
+SRC_URI="https://fedorahosted.org/releases/l/o/logrotate/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~x86-fbsd"
+IUSE="acl selinux"
+
+RDEPEND="
+ >=dev-libs/popt-1.5
+ selinux? (
+ sys-libs/libselinux
+ sec-policy/selinux-logrotate
+ )
+ acl? ( virtual/acl )"
+
+DEPEND="${RDEPEND}
+ >=sys-apps/sed-4"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-datehack.patch \
+ "${FILESDIR}"/${P}-ignore-hidden.patch \
+ "${FILESDIR}"/${P}-fbsd.patch \
+ "${FILESDIR}"/${P}-noasprintf.patch \
+ "${FILESDIR}"/${P}-atomic-create.patch
+}
+
+src_compile() {
+ local myconf
+ myconf="CC=$(tc-getCC)"
+ use selinux && myconf="${myconf} WITH_SELINUX=yes"
+ use acl && myconf="${myconf} WITH_ACL=yes"
+ emake ${myconf} RPM_OPT_FLAGS="${CFLAGS}"
+}
+
+src_install() {
+ insinto /usr
+ dosbin logrotate
+ doman logrotate.8
+ dodoc CHANGES examples/logrotate*
+
+ exeinto /etc/cron.daily
+ newexe "${S}"/examples/logrotate.cron "${PN}"
+
+ insinto /etc
+ doins "${FILESDIR}"/logrotate.conf
+
+ 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
+}