summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app-admin/logrotate/ChangeLog9
-rw-r--r--app-admin/logrotate/Manifest13
-rw-r--r--app-admin/logrotate/files/digest-logrotate-3.7.1-r11
-rw-r--r--app-admin/logrotate/files/logrotate-3.7.1-no-tmpdir.patch54
-rw-r--r--app-admin/logrotate/logrotate-3.7.1-r1.ebuild71
5 files changed, 137 insertions, 11 deletions
diff --git a/app-admin/logrotate/ChangeLog b/app-admin/logrotate/ChangeLog
index 33c7ca7b676c..ea1880789802 100644
--- a/app-admin/logrotate/ChangeLog
+++ b/app-admin/logrotate/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for app-admin/logrotate
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/ChangeLog,v 1.34 2005/05/24 21:08:00 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/ChangeLog,v 1.35 2005/05/26 17:59:10 dang Exp $
+
+*logrotate-3.7.1-r1 (26 May 2005)
+
+ 26 May 2005; <dang@gentoo.org> +files/logrotate-3.7.1-no-tmpdir.patch,
+ +logrotate-3.7.1-r1.ebuild:
+ Bump to include no-tmpdir patch. This patch makes scripts execute by
+ directly calling /bin/sh, rather than by writing out a tmp file.
*logrotate-3.7.1 (24 May 2005)
diff --git a/app-admin/logrotate/Manifest b/app-admin/logrotate/Manifest
index 96d4ca026f95..7d9d2fe1fc31 100644
--- a/app-admin/logrotate/Manifest
+++ b/app-admin/logrotate/Manifest
@@ -1,26 +1,19 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 ce6cc3c8473d2b7a00b4078d1cf02e91 logrotate-3.7.1.ebuild 1726
+MD5 ad46cee7e9db9a84cba8aa2710f4eeb1 logrotate-3.7.1-r1.ebuild 1767
MD5 098cc168fade54d752abb4316bf4860f logrotate-3.7.ebuild 1679
MD5 67f6426c285df9fc96384c47d68ae3a6 logrotate-3.6.5-r1.ebuild 1730
MD5 e0045388b2875ed4503ed3206191a40c ChangeLog 5572
MD5 c7533062993ae53a9a32d0a58416cd84 metadata.xml 216
MD5 81c68aeb06c91c02ebbea3c42123fb38 files/logrotate-3.7.1-manpage-fixes.patch 15470
MD5 d268cc741e71398dc2a14bcdc0bcfeb2 files/logrotate-3.7.1-ignore-hidden.patch 517
+MD5 721a9af5171ca27c48c51ba338db3036 files/logrotate-3.7.1-no-tmpdir.patch 1266
MD5 b6b2dec981e0b573366f5d0e74783b5b files/logrotate-3.7.1-taboo-to-debug.patch 517
MD5 8d4271dd12289c4da96b3e4f1fbd0868 files/logrotate-3.7.1-datehack.patch 516
MD5 ef1405c48d23249f97330709d1d2a093 files/logrotate-3.6.5-selinux.diff.bz2 1440
MD5 4942e4ea3f05b91d9d24504c4ddbc776 files/digest-logrotate-3.7 69
MD5 bdf48119e016d4ee8b829da9e83959bf files/digest-logrotate-3.6.5-r1 71
+MD5 746e982f984139e917c7d7ee39af40fa files/digest-logrotate-3.7.1-r1 67
MD5 8259bf9cd3b5bc37dd4cdda62cc9c2de files/logrotate-3.7.1-dateext-maxage.patch 14282
MD5 5692e613153f372df5b7510b39ba9c5c files/logrotate.conf 731
MD5 cf1ca2cfa810abaefc504a76ca38b52a files/logrotate.cron 52
MD5 746e982f984139e917c7d7ee39af40fa files/digest-logrotate-3.7.1 67
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.1 (GNU/Linux)
-
-iD8DBQFCk5e/omPajV0RnrERAmykAJ9nk9rm6zHHEfHg8SpJZ1UiP1HlGQCfUm0v
-Mf/3XgUz30j//QqbhAuBXSs=
-=T/WR
------END PGP SIGNATURE-----
diff --git a/app-admin/logrotate/files/digest-logrotate-3.7.1-r1 b/app-admin/logrotate/files/digest-logrotate-3.7.1-r1
new file mode 100644
index 000000000000..8b29cfeb69d0
--- /dev/null
+++ b/app-admin/logrotate/files/digest-logrotate-3.7.1-r1
@@ -0,0 +1 @@
+MD5 1fc20d457b35bbfb0c5bc2e2b47759df logrotate-3.7.1.tar.bz2 31953
diff --git a/app-admin/logrotate/files/logrotate-3.7.1-no-tmpdir.patch b/app-admin/logrotate/files/logrotate-3.7.1-no-tmpdir.patch
new file mode 100644
index 000000000000..fb95f1ee3e8f
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.7.1-no-tmpdir.patch
@@ -0,0 +1,54 @@
+diff -u -ruN logrotate-3.7.1-cur/logrotate.c logrotate-3.7.1/logrotate.c
+--- logrotate-3.7.1-cur/logrotate.c 2005-05-25 18:20:41.000000000 -0400
++++ logrotate-3.7.1/logrotate.c 2005-05-25 18:21:10.000000000 -0400
+@@ -90,10 +90,7 @@
+ }
+
+ static int runScript(char * logfn, char * script) {
+- int fd;
+- char *filespec;
+ int rc;
+- char buf[256];
+
+ if (debug) {
+ message(MESS_DEBUG, "running script with arg %s: \"%s\"\n",
+@@ -101,38 +98,12 @@
+ return 0;
+ }
+
+- filespec = buf;
+- snprintf(buf, sizeof(buf), "%s/logrotate.XXXXXX", getenv("TMPDIR") ?: "/tmp");
+- fd = -1;
+- if (!filespec || (fd = mkstemp(filespec)) < 0 || fchmod(fd, 0700)) {
+- message(MESS_DEBUG, "error creating %s: %s\n", filespec,
+- strerror(errno));
+- if (fd >= 0) {
+- close(fd);
+- unlink(filespec);
+- }
+- return -1;
+- }
+-
+- if (write(fd, "#!/bin/sh\n\n", 11) != 11 ||
+- write(fd, script, strlen(script)) != strlen(script)) {
+- message(MESS_DEBUG, "error writing %s\n", filespec);
+- close(fd);
+- unlink(filespec);
+- return -1;
+- }
+-
+- close(fd);
+-
+ if (!fork()) {
+- execlp(filespec, filespec, logfn, NULL);
++ execl("/bin/sh", "sh", "-c", script, NULL);
+ exit(1);
+ }
+
+ wait(&rc);
+-
+- unlink(filespec);
+-
+ return rc;
+ }
+
diff --git a/app-admin/logrotate/logrotate-3.7.1-r1.ebuild b/app-admin/logrotate/logrotate-3.7.1-r1.ebuild
new file mode 100644
index 000000000000..62f2fc41f1cb
--- /dev/null
+++ b/app-admin/logrotate/logrotate-3.7.1-r1.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/logrotate-3.7.1-r1.ebuild,v 1.1 2005/05/26 17:59:10 dang Exp $
+
+inherit eutils
+
+DESCRIPTION="Rotates, compresses, and mails system logs"
+HOMEPAGE="http://www.gentoo.org"
+SRC_URI="mirror://gentoo/${PN}-${PV}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~x86 ~ppc ~sparc ~alpha ~ia64 ~amd64 ~ppc64 ~s390 ~hppa"
+IUSE="selinux"
+
+RDEPEND="
+ >=dev-libs/popt-1.5
+ selinux? ( sys-libs/libselinux )"
+
+DEPEND="${DEPEND}
+ >=sys-apps/portage-2.0.47-r10
+ >=sys-apps/sed-4
+ selinux? ( sec-policy/selinux-logrotate )"
+
+src_unpack() {
+ unpack ${P}.tar.bz2
+
+ cd ${S}
+
+ sed -i \
+ -e "s:CFLAGS += -g:CFLAGS += -g ${CFLAGS}:" \
+ -e "/CVSROOT =/d" \
+ Makefile || die "sed failed"
+
+ epatch ${FILESDIR}/${P}-dateext-maxage.patch
+ epatch ${FILESDIR}/${P}-datehack.patch
+ epatch ${FILESDIR}/${P}-ignore-hidden.patch
+ epatch ${FILESDIR}/${P}-manpage-fixes.patch
+ epatch ${FILESDIR}/${P}-taboo-to-debug.patch
+ epatch ${FILESDIR}/${P}-no-tmpdir.patch
+}
+
+src_compile() {
+ local myconf
+ useq selinux && myconf='WITH_SELINUX=yes'
+ emake ${myconf} || die "emake failed"
+}
+
+src_install() {
+ insinto /usr
+ dosbin logrotate
+ doman logrotate.8
+ dodoc examples/logrotate*
+
+ exeinto /etc/cron.daily
+ doexe ${FILESDIR}/logrotate.cron
+
+ insinto /etc
+ doins ${FILESDIR}/logrotate.conf
+
+ keepdir /etc/logrotate.d
+}
+
+pkg_postinst() {
+ einfo "If you wish to have logrotate e-mail you updates, please"
+ einfo "emerge mail-client/mailx and configure logrotate in"
+ einfo "/etc/logrotate.conf appropriately"
+ einfo
+ einfo "Additionally, /etc/logrotate.conf may need to be modified"
+ einfo "for your particular needs. See man logrotate for details."
+}