diff options
author | José María Alonso <nimiux@gentoo.org> | 2013-08-13 15:33:06 +0000 |
---|---|---|
committer | José María Alonso <nimiux@gentoo.org> | 2013-08-13 15:33:06 +0000 |
commit | 0f851cbf8e0ad3e5b287fb4afa44971873a46315 (patch) | |
tree | 05f8c8cb77d84f4382a372554c55e9c7ef80f59a /app-admin/logrotate | |
parent | Stable for amd64 wrt bug #479732 (diff) | |
download | gentoo-2-0f851cbf8e0ad3e5b287fb4afa44971873a46315.tar.gz gentoo-2-0f851cbf8e0ad3e5b287fb4afa44971873a46315.tar.bz2 gentoo-2-0f851cbf8e0ad3e5b287fb4afa44971873a46315.zip |
Drop old
(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key D628E536)
Diffstat (limited to 'app-admin/logrotate')
8 files changed, 9 insertions, 352 deletions
diff --git a/app-admin/logrotate/ChangeLog b/app-admin/logrotate/ChangeLog index 473a227080ff..cb812ed8fc8b 100644 --- a/app-admin/logrotate/ChangeLog +++ b/app-admin/logrotate/ChangeLog @@ -1,6 +1,14 @@ # 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.154 2013/08/13 14:01:21 nimiux Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/ChangeLog,v 1.155 2013/08/13 15:33:05 nimiux Exp $ + + 13 Aug 2013; Chema Alonso <nimiux@gentoo.org> -logrotate-3.8.3.ebuild, + -files/logrotate-3.8.3-atomic-create.patch, + -files/logrotate-3.8.3-datehack.patch, -files/logrotate-3.8.3-fbsd.patch, + -files/logrotate-3.8.3-fix-acl-tests.patch, + -files/logrotate-3.8.3-ignore-hidden.patch, + -files/logrotate-3.8.3-noasprintf.patch: + Drop old *logrotate-3.8.6 (13 Aug 2013) diff --git a/app-admin/logrotate/files/logrotate-3.8.3-atomic-create.patch b/app-admin/logrotate/files/logrotate-3.8.3-atomic-create.patch deleted file mode 100644 index 4603728a9fbc..000000000000 --- a/app-admin/logrotate/files/logrotate-3.8.3-atomic-create.patch +++ /dev/null @@ -1,46 +0,0 @@ -diff -Nur a/logrotate.c b/logrotate.c ---- a/logrotate.c 2012-10-04 09:59:14.000000000 +0200 -+++ b/logrotate.c 2012-11-11 12:04:19.530008151 +0100 -@@ -296,16 +296,22 @@ - 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)) { - message(MESS_ERROR, "error setting mode of %s: %s\n", - fileName, strerror(errno)); -@@ -347,6 +353,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.3-datehack.patch b/app-admin/logrotate/files/logrotate-3.8.3-datehack.patch deleted file mode 100644 index 9d6e5f015d84..000000000000 --- a/app-admin/logrotate/files/logrotate-3.8.3-datehack.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nur a/logrotate.c b/logrotate.c ---- a/logrotate.c 2012-10-04 09:59:14.000000000 +0200 -+++ b/logrotate.c 2012-11-09 20:50:01.659874980 +0100 -@@ -1832,7 +1832,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.3-fbsd.patch b/app-admin/logrotate/files/logrotate-3.8.3-fbsd.patch deleted file mode 100644 index ab5e7c478456..000000000000 --- a/app-admin/logrotate/files/logrotate-3.8.3-fbsd.patch +++ /dev/null @@ -1,61 +0,0 @@ -Fix compilation on Gentoo/FreeBSD, no alloca.h here and PATH_MAX -is defined elsewhere. - -See bug 254795 - -diff -Nur a/config.c b/config.c ---- a/config.c 2012-10-04 09:59:14.000000000 +0200 -+++ b/config.c 2012-11-09 21:23:50.439863583 +0100 -@@ -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,9 @@ - #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 2012-10-04 09:59:14.000000000 +0200 -+++ b/logrotate.c 2012-11-09 21:24:37.349863321 +0100 -@@ -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,9 @@ - - 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 -Nur a/Makefile b/Makefile ---- a/Makefile 2012-10-04 09:59:14.000000000 +0200 -+++ b/Makefile 2012-11-09 21:25:24.569863057 +0100 -@@ -17,8 +17,10 @@ - - ifeq ($(WITH_ACL),yes) - CFLAGS += -DWITH_ACL -+ifneq ($(OS_NAME),FreeBSD) - LOADLIBES += -lacl - endif -+endif - - # HP-UX using GCC - ifeq ($(OS_NAME),HP-UX) diff --git a/app-admin/logrotate/files/logrotate-3.8.3-fix-acl-tests.patch b/app-admin/logrotate/files/logrotate-3.8.3-fix-acl-tests.patch deleted file mode 100644 index 1dcc18bc6505..000000000000 --- a/app-admin/logrotate/files/logrotate-3.8.3-fix-acl-tests.patch +++ /dev/null @@ -1,84 +0,0 @@ -diff -Nur a/Makefile b/Makefile ---- a/Makefile 2012-10-04 09:59:14.000000000 +0200 -+++ b/Makefile 2012-12-19 23:31:28.269943187 +0100 -@@ -116,7 +116,7 @@ - - .PHONY : test - test: $(TARGET) -- (cd test; ./test) -+ (cd test; ./test $(WITH_ACL)) - - install: - [ -d $(PREFIX)$(BINDIR) ] || mkdir -p $(PREFIX)$(BINDIR) -diff -Nur a/test/test b/test/test ---- a/test/test 2012-10-04 09:59:14.000000000 +0200 -+++ b/test/test 2012-12-19 23:46:19.449938180 +0100 -@@ -4,6 +4,14 @@ - M="-m ./mailer" - S=-"s state" - RLR="$LOGROTATE $M $S" -+TEST_ACL="$1" -+ -+# Check if setfacl command works -+ACL_TEST_FILE="test-`date +%Y-%m-%d-%H-%M-%S`" -+touch ${ACL_TEST_FILE} -+setfacl -m u:nobody:rwx ${ACL_TEST_FILE} > /dev/null 2>&1 -+ACL_OK="$?" -+rm ${ACL_TEST_FILE} - - cleanup() { - rm -f test*.log* anothertest*.log* state test-config. scriptout mail-out compress-args -@@ -686,6 +694,8 @@ - test.log.1 0 zero - EOF - -+if [[ "${TEST_ACL}" = "acl" && ${ACL_OK} -eq 0 ]] ; then -+ - cleanup 32 - - # ------------------------------- Test 32 ------------------------------------ -@@ -713,6 +723,13 @@ - test.log.1 0 zero - EOF - -+else -+ echo "Skipping test 32" -+ -+fi -+ -+if [[ "${TEST_ACL}" = "acl" && ${ACL_OK} -eq 0 ]] ; then -+ - cleanup 33 - - # ------------------------------- Test 33 ------------------------------------ -@@ -740,6 +757,11 @@ - test.log.1 0 zero - EOF - -+else -+ echo "Skipping test 33" -+ -+fi -+ - cleanup 34 - - # ------------------------------- Test 34 ------------------------------------ -@@ -759,6 +781,8 @@ - test.log 0 zero - EOF - -+if [[ "${TEST_ACL}" = "acl" && ${ACL_OK} -eq 0 ]] ; then -+ - cleanup 35 - - # ------------------------------- Test 35 ------------------------------------ -@@ -786,4 +810,9 @@ - test.log.1 0 zero - EOF - -+else -+ echo "Skipping test 35" -+ -+fi -+ - cleanup diff --git a/app-admin/logrotate/files/logrotate-3.8.3-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.8.3-ignore-hidden.patch deleted file mode 100644 index 13bf52873c91..000000000000 --- a/app-admin/logrotate/files/logrotate-3.8.3-ignore-hidden.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -Nur a/config.c b/config.c ---- a/config.c 2012-10-04 09:59:14.000000000 +0200 -+++ b/config.c 2012-11-09 20:57:07.139872584 +0100 -@@ -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.3-noasprintf.patch b/app-admin/logrotate/files/logrotate-3.8.3-noasprintf.patch deleted file mode 100644 index f810278a4892..000000000000 --- a/app-admin/logrotate/files/logrotate-3.8.3-noasprintf.patch +++ /dev/null @@ -1,55 +0,0 @@ -diff -Nur a/config.c b/config.c ---- a/config.c 2012-10-04 09:59:14.000000000 +0200 -+++ b/config.c 2012-11-09 21:08:09.099868866 +0100 -@@ -45,39 +45,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 2012-10-04 09:59:14.000000000 +0200 -+++ b/logrotate.h 2012-11-09 21:08:29.829868750 +0100 -@@ -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/logrotate-3.8.3.ebuild b/app-admin/logrotate/logrotate-3.8.3.ebuild deleted file mode 100644 index 4ffd2f5fddb3..000000000000 --- a/app-admin/logrotate/logrotate-3.8.3.ebuild +++ /dev/null @@ -1,79 +0,0 @@ -# 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.3.ebuild,v 1.12 2013/06/18 17:25:26 nimiux Exp $ - -EAPI=4 - -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 ~amd64-fbsd ~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 \ - "${FILESDIR}"/${P}-fix-acl-tests.patch -} - -src_configure() { - return -} - -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_test() { - WITH_ACL="$(usev acl)" default_src_test -} - -src_install() { - insinto /usr - dosbin logrotate - doman logrotate.8 - dodoc CHANGES examples/logrotate* - - exeinto /etc/cron.daily - doexe "${FILESDIR}"/logrotate.cron - - 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 -} |