summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Gryniewicz <dang@gentoo.org>2011-04-29 00:03:00 +0000
committerDaniel Gryniewicz <dang@gentoo.org>2011-04-29 00:03:00 +0000
commitd3046dd7a8e66286d84c37a1b937e0b303713e94 (patch)
tree19bf1dab4c7ed72db12b6f281b588bbc21488eeb /app-admin/logrotate
parentVersion bump to get a change made to the gcc-config bash script (diff)
downloadgentoo-2-d3046dd7a8e66286d84c37a1b937e0b303713e94.tar.gz
gentoo-2-d3046dd7a8e66286d84c37a1b937e0b303713e94.tar.bz2
gentoo-2-d3046dd7a8e66286d84c37a1b937e0b303713e94.zip
Fix bug #365137: allow to build on systems without O_CLOEXEC
(Portage version: 2.2.0_alpha30/cvs/Linux x86_64)
Diffstat (limited to 'app-admin/logrotate')
-rw-r--r--app-admin/logrotate/ChangeLog6
-rw-r--r--app-admin/logrotate/files/logrotate-3.7.9-no-cloexec.patch24
-rw-r--r--app-admin/logrotate/logrotate-3.7.9-r1.ebuild5
-rw-r--r--app-admin/logrotate/logrotate-3.7.9-r2.ebuild3
4 files changed, 34 insertions, 4 deletions
diff --git a/app-admin/logrotate/ChangeLog b/app-admin/logrotate/ChangeLog
index dbb783723220..11d0ed518d88 100644
--- a/app-admin/logrotate/ChangeLog
+++ b/app-admin/logrotate/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for app-admin/logrotate
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/ChangeLog,v 1.98 2011/04/17 15:01:06 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/ChangeLog,v 1.99 2011/04/29 00:03:00 dang Exp $
+
+ 29 Apr 2011; Daniel Gryniewicz <dang@gentoo.org> logrotate-3.7.9-r1.ebuild,
+ logrotate-3.7.9-r2.ebuild, +files/logrotate-3.7.9-no-cloexec.patch:
+ Fix bug #365137: allow to build on systems without O_CLOEXEC
*logrotate-3.7.9-r2 (17 Apr 2011)
diff --git a/app-admin/logrotate/files/logrotate-3.7.9-no-cloexec.patch b/app-admin/logrotate/files/logrotate-3.7.9-no-cloexec.patch
new file mode 100644
index 000000000000..367f396d0734
--- /dev/null
+++ b/app-admin/logrotate/files/logrotate-3.7.9-no-cloexec.patch
@@ -0,0 +1,24 @@
+diff '--exclude-from=/home/dang/.scripts/diffrc' -up -ruN logrotate-3.7.9.orig//config.c logrotate-3.7.9/config.c
+--- logrotate-3.7.9.orig//config.c 2010-06-28 04:04:56.000000000 -0400
++++ logrotate-3.7.9/config.c 2011-04-28 19:16:55.422051174 -0400
+@@ -514,12 +514,19 @@ static int readConfigFile(const char *co
+ .l_whence = SEEK_SET,
+ .l_type = F_RDLCK
+ };
++ int flags;
+
+ /* FIXME: createOwner and createGroup probably shouldn't be fixed
+ length arrays -- of course, if we aren't run setuid it doesn't
+ matter much */
+
+- fd = open(configFile, O_RDONLY | O_CLOEXEC);
++#ifdef O_CLOEXEC
++ flags = O_RDONLY | O_CLOEXEC;
++#else
++ flags = O_RDONLY;
++#endif
++
++ fd = open(configFile, flags);
+ if (fd < 0) {
+ message(MESS_ERROR, "failed to open config file %s: %s\n",
+ configFile, strerror(errno));
diff --git a/app-admin/logrotate/logrotate-3.7.9-r1.ebuild b/app-admin/logrotate/logrotate-3.7.9-r1.ebuild
index 6bf5ea10da07..e6c2cf6d1328 100644
--- a/app-admin/logrotate/logrotate-3.7.9-r1.ebuild
+++ b/app-admin/logrotate/logrotate-3.7.9-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/logrotate-3.7.9-r1.ebuild,v 1.7 2011/04/16 15:52:45 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/logrotate-3.7.9-r1.ebuild,v 1.8 2011/04/29 00:03:00 dang Exp $
EAPI="2"
@@ -35,7 +35,8 @@ src_prepare() {
"${FILESDIR}"/${PN}-3.7.7-fbsd.patch \
"${FILESDIR}"/${PN}-3.7.9-atomic-create.patch \
"${FILESDIR}"/${PN}-3.7.9-shred.patch \
- "${FILESDIR}"/${PN}-3.7.9-statefile.patch
+ "${FILESDIR}"/${PN}-3.7.9-statefile.patch \
+ "${FILESDIR}"/${PN}-3.7.9-no-cloexec.patch
}
src_configure() {
diff --git a/app-admin/logrotate/logrotate-3.7.9-r2.ebuild b/app-admin/logrotate/logrotate-3.7.9-r2.ebuild
index 2810782672e6..1d83615f6123 100644
--- a/app-admin/logrotate/logrotate-3.7.9-r2.ebuild
+++ b/app-admin/logrotate/logrotate-3.7.9-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/logrotate-3.7.9-r2.ebuild,v 1.1 2011/04/17 15:01:06 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/logrotate/logrotate-3.7.9-r2.ebuild,v 1.2 2011/04/29 00:03:00 dang Exp $
EAPI="2"
@@ -35,6 +35,7 @@ src_prepare() {
"${FILESDIR}"/${PN}-3.7.9-atomic-create.patch \
"${FILESDIR}"/${PN}-3.7.9-shred.patch \
"${FILESDIR}"/${PN}-3.7.9-statefile.patch \
+ "${FILESDIR}"/${PN}-3.7.9-no-cloexec.patch \
"${FILESDIR}"/${PN}-3.7.9-skip-empty-files.patch
}