summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosé María Alonso <nimiux@gentoo.org>2014-07-09 07:35:03 +0000
committerJosé María Alonso <nimiux@gentoo.org>2014-07-09 07:35:03 +0000
commitfde4c638a1515e7fa4d4c344c7ec7145290bd9cf (patch)
tree733974548c466a709b24a408ebf59fee1ad4edc1 /app-admin/logrotate
parentversion bump (diff)
downloadgentoo-2-fde4c638a1515e7fa4d4c344c7ec7145290bd9cf.tar.gz
gentoo-2-fde4c638a1515e7fa4d4c344c7ec7145290bd9cf.tar.bz2
gentoo-2-fde4c638a1515e7fa4d4c344c7ec7145290bd9cf.zip
Drop old
(Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key D628E536)
Diffstat (limited to 'app-admin/logrotate')
-rw-r--r--app-admin/logrotate/ChangeLog13
-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-3.8.6-atomic-create.patch45
-rw-r--r--app-admin/logrotate/files/logrotate-3.8.6-datehack.patch12
-rw-r--r--app-admin/logrotate/files/logrotate-3.8.6-fbsd.patch57
-rw-r--r--app-admin/logrotate/files/logrotate-3.8.6-ignore-hidden.patch14
-rw-r--r--app-admin/logrotate/files/logrotate-3.8.6-noasprintf.patch55
-rw-r--r--app-admin/logrotate/logrotate-3.8.4.ebuild70
-rw-r--r--app-admin/logrotate/logrotate-3.8.6.ebuild70
13 files changed, 12 insertions, 505 deletions
diff --git a/app-admin/logrotate/ChangeLog b/app-admin/logrotate/ChangeLog
index 1eed5108a068..fe48481a95fe 100644
--- a/app-admin/logrotate/ChangeLog
+++ b/app-admin/logrotate/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for app-admin/logrotate
# Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/ChangeLog,v 1.178 2014/07/07 09:55:32 nimiux Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/ChangeLog,v 1.179 2014/07/09 07:35:03 nimiux Exp $
+
+ 09 Jul 2014; Chema Alonso <nimiux@gentoo.org> -logrotate-3.8.4.ebuild,
+ -logrotate-3.8.6.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-3.8.6-atomic-create.patch,
+ -files/logrotate-3.8.6-datehack.patch, -files/logrotate-3.8.6-fbsd.patch,
+ -files/logrotate-3.8.6-ignore-hidden.patch,
+ -files/logrotate-3.8.6-noasprintf.patch:
+ Drop old
07 Jul 2014; Chema Alonso <nimiux@gentoo.org> files/logrotate.conf:
Fix tabs and enhance comments. Thanks to Consus via email.
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
deleted file mode 100644
index 28fd0375ac32..000000000000
--- a/app-admin/logrotate/files/logrotate-3.8.4-atomic-create.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-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
deleted file mode 100644
index d320666d3631..000000000000
--- a/app-admin/logrotate/files/logrotate-3.8.4-datehack.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-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
deleted file mode 100644
index e0d06d8d53ee..000000000000
--- a/app-admin/logrotate/files/logrotate-3.8.4-fbsd.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-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
deleted file mode 100644
index a76937fd8bfb..000000000000
--- a/app-admin/logrotate/files/logrotate-3.8.4-ignore-hidden.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-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
deleted file mode 100644
index e4d9f87e501d..000000000000
--- a/app-admin/logrotate/files/logrotate-3.8.4-noasprintf.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-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-3.8.6-atomic-create.patch b/app-admin/logrotate/files/logrotate-3.8.6-atomic-create.patch
deleted file mode 100644
index b5a6aeae38e6..000000000000
--- a/app-admin/logrotate/files/logrotate-3.8.6-atomic-create.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-diff -Nuar a/logrotate.c b/logrotate.c
---- a/logrotate.c 2013-08-13 12:47:53.659942291 +0200
-+++ b/logrotate.c 2013-08-13 12:58:12.789938813 +0200
-@@ -304,15 +304,21 @@
- 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;
-+ int acl_set = 0;
-+ 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);
-
-- fd = open(fileName, (flags | O_EXCL | O_NOFOLLOW),
-- (S_IRUSR | S_IWUSR) & sb->st_mode);
-
- 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)) {
-@@ -363,6 +369,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.8.6-datehack.patch b/app-admin/logrotate/files/logrotate-3.8.6-datehack.patch
deleted file mode 100644
index 0184439bb375..000000000000
--- a/app-admin/logrotate/files/logrotate-3.8.6-datehack.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff -Nuar a/logrotate.c b/logrotate.c
---- a/logrotate.c 2013-07-31 13:46:23.000000000 +0200
-+++ b/logrotate.c 2013-08-13 12:41:39.019944395 +0200
-@@ -2045,7 +2045,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.6-fbsd.patch b/app-admin/logrotate/files/logrotate-3.8.6-fbsd.patch
deleted file mode 100644
index a9ea216112dd..000000000000
--- a/app-admin/logrotate/files/logrotate-3.8.6-fbsd.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-diff -Nuar a/Makefile b/Makefile
---- a/Makefile 2013-07-31 13:46:23.000000000 +0200
-+++ b/Makefile 2013-08-13 12:46:27.859942773 +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 -Nuar a/config.c b/config.c
---- a/config.c 2013-08-13 12:43:57.679943616 +0200
-+++ b/config.c 2013-08-13 12:47:11.169942530 +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 -Nuar a/logrotate.c b/logrotate.c
---- a/logrotate.c 2013-08-13 12:41:39.019944395 +0200
-+++ b/logrotate.c 2013-08-13 12:47:53.659942291 +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>
-@@ -43,6 +43,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.6-ignore-hidden.patch b/app-admin/logrotate/files/logrotate-3.8.6-ignore-hidden.patch
deleted file mode 100644
index a3779aa8e5cc..000000000000
--- a/app-admin/logrotate/files/logrotate-3.8.6-ignore-hidden.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c 2013-07-31 13:46:23.000000000 +0200
-+++ b/config.c 2013-08-13 12:43:57.679943616 +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.6-noasprintf.patch b/app-admin/logrotate/files/logrotate-3.8.6-noasprintf.patch
deleted file mode 100644
index 889e98342da6..000000000000
--- a/app-admin/logrotate/files/logrotate-3.8.6-noasprintf.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-diff -Nuar a/config.c b/config.c
---- a/config.c 2013-08-13 12:47:11.169942530 +0200
-+++ b/config.c 2013-08-13 12:53:39.019940351 +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 2013-07-31 13:46:23.000000000 +0200
-+++ b/logrotate.h 2013-08-13 12:53:55.649940258 +0200
-@@ -67,8 +67,5 @@
- extern int debug;
-
- int readAllConfigPaths(const char **paths);
--#if !defined(asprintf) && !defined(_FORTIFY_SOURCE)
--int asprintf(char **string_ptr, const char *format, ...);
--#endif
-
- #endif
diff --git a/app-admin/logrotate/logrotate-3.8.4.ebuild b/app-admin/logrotate/logrotate-3.8.4.ebuild
deleted file mode 100644
index 51f361e9d829..000000000000
--- a/app-admin/logrotate/logrotate-3.8.4.ebuild
+++ /dev/null
@@ -1,70 +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.4.ebuild,v 1.12 2013/07/02 07:45:01 ago 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 ~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
-}
-
-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
-}
diff --git a/app-admin/logrotate/logrotate-3.8.6.ebuild b/app-admin/logrotate/logrotate-3.8.6.ebuild
deleted file mode 100644
index f1273402b571..000000000000
--- a/app-admin/logrotate/logrotate-3.8.6.ebuild
+++ /dev/null
@@ -1,70 +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.6.ebuild,v 1.8 2013/12/22 13:24:59 ago 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 ~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
-}
-
-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
-}