summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Buchholz <rbu@gentoo.org>2009-02-25 20:55:25 +0000
committerRobert Buchholz <rbu@gentoo.org>2009-02-25 20:55:25 +0000
commitc5dccee83a85a3a1ab94948e71e7aad9849f379d (patch)
treea14551032e10d77f0d5c2dcf7ee60b99532e4655 /net-misc/dhcdbd
parentamd64 stable, bug #259578 (diff)
downloadgentoo-2-c5dccee83a85a3a1ab94948e71e7aad9849f379d.tar.gz
gentoo-2-c5dccee83a85a3a1ab94948e71e7aad9849f379d.tar.bz2
gentoo-2-c5dccee83a85a3a1ab94948e71e7aad9849f379d.zip
Fix compile bug when using FORTIFY_SOURCE: open with O_CREAT in second argument
needs 3 arguments, bug #232084 (Portage version: 2.1.6.7/cvs/Linux x86_64)
Diffstat (limited to 'net-misc/dhcdbd')
-rw-r--r--net-misc/dhcdbd/ChangeLog10
-rw-r--r--net-misc/dhcdbd/dhcdbd-2.8-r1.ebuild17
-rw-r--r--net-misc/dhcdbd/dhcdbd-2.8.ebuild39
-rw-r--r--net-misc/dhcdbd/dhcdbd-3.0.ebuild17
-rw-r--r--net-misc/dhcdbd/files/dhcdbd-2.8-daemon.patch2
-rw-r--r--net-misc/dhcdbd/files/dhcdbd-3.0-daemon.patch2
6 files changed, 28 insertions, 59 deletions
diff --git a/net-misc/dhcdbd/ChangeLog b/net-misc/dhcdbd/ChangeLog
index c9fa9755f900..1218c7ec9ef9 100644
--- a/net-misc/dhcdbd/ChangeLog
+++ b/net-misc/dhcdbd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-misc/dhcdbd
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcdbd/ChangeLog,v 1.15 2008/02/29 03:12:57 ranger Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcdbd/ChangeLog,v 1.16 2009/02/25 20:55:25 rbu Exp $
+
+ 25 Feb 2009; Robert Buchholz <rbu@gentoo.org>
+ files/dhcdbd-2.8-daemon.patch, files/dhcdbd-3.0-daemon.patch,
+ -dhcdbd-2.8.ebuild, dhcdbd-2.8-r1.ebuild, dhcdbd-3.0.ebuild:
+ Fix compile bug when using FORTIFY_SOURCE: open with O_CREAT in second argument
+ needs 3 arguments, bug #232084
29 Feb 2008; Brent Baude <ranger@gentoo.org> dhcdbd-3.0.ebuild:
keyworded ~arch for ppc64, bug 211783
diff --git a/net-misc/dhcdbd/dhcdbd-2.8-r1.ebuild b/net-misc/dhcdbd/dhcdbd-2.8-r1.ebuild
index 3a207bee5109..6f7855463764 100644
--- a/net-misc/dhcdbd/dhcdbd-2.8-r1.ebuild
+++ b/net-misc/dhcdbd/dhcdbd-2.8-r1.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcdbd/dhcdbd-2.8-r1.ebuild,v 1.5 2007/08/28 14:35:09 nixnut Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcdbd/dhcdbd-2.8-r1.ebuild,v 1.6 2009/02/25 20:55:25 rbu Exp $
inherit eutils
@@ -15,24 +15,25 @@ IUSE=""
DEPEND="sys-apps/dbus
>=net-misc/dhcp-3.0.3-r7"
+RDEPEND=${DEPEND}
src_unpack() {
unpack ${A}
- cd ${S}
- epatch ${FILESDIR}/${PN}-2.5-fixes.patch
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-2.5-fixes.patch
# Commented out for the moment as I need to re-work this to make it cleaner.
- #use debug && epatch ${FILESDIR}/${PN}-2.5-debug.patch
+ #use debug && epatch "${FILESDIR}"/${PN}-2.5-debug.patch
# Create a pidfile immediately after daemonizing so we're more robust
# with baselayout-2
- epatch ${FILESDIR}/${P}-daemon.patch
+ epatch "${FILESDIR}"/${P}-daemon.patch
}
src_install() {
make DESTDIR="${D}" install || die "make install failed"
dodoc README include/dhcp_options.h
- newinitd ${FILESDIR}/dhcdbd.init dhcdbd
- newconfd ${FILESDIR}/dhcdbd.confd dhcdbd
+ newinitd "${FILESDIR}"/dhcdbd.init dhcdbd
+ newconfd "${FILESDIR}"/dhcdbd.confd dhcdbd
}
pkg_postinst() {
diff --git a/net-misc/dhcdbd/dhcdbd-2.8.ebuild b/net-misc/dhcdbd/dhcdbd-2.8.ebuild
deleted file mode 100644
index 87a2649b5205..000000000000
--- a/net-misc/dhcdbd/dhcdbd-2.8.ebuild
+++ /dev/null
@@ -1,39 +0,0 @@
-# Copyright 1999-2007 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcdbd/dhcdbd-2.8.ebuild,v 1.2 2007/07/16 21:44:27 seemant Exp $
-
-inherit eutils
-
-DESCRIPTION="DHCP D-BUS daemon (dhcdbd) controls dhclient sessions with D-BUS, stores and presents DHCP options."
-HOMEPAGE="http://people.redhat.com/dcantrel/dhcdbd"
-SRC_URI="http://people.redhat.com/dcantrel/dhcdbd/${P}.tar.bz2"
-
-LICENSE="public-domain"
-SLOT="0"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
-IUSE=""
-
-DEPEND="sys-apps/dbus
- >=net-misc/dhcp-3.0.3-r7"
-
-src_unpack() {
- unpack ${A}
- cd ${S}
- epatch ${FILESDIR}/${PN}-2.5-fixes.patch
- # Commented out for the moment as I need to re-work this to make it cleaner.
- #use debug && epatch ${FILESDIR}/${PN}-2.5-debug.patch
-}
-
-src_install() {
- make DESTDIR="${D}" install || die "make install failed"
- dodoc README include/dhcp_options.h
- newinitd ${FILESDIR}/dhcdbd.init dhcdbd
- newconfd ${FILESDIR}/dhcdbd.confd dhcdbd
-}
-
-pkg_postinst() {
- einfo "dhcdbd is used by NetworkManager."
- einfo "If you feel you need to use it without that, simply add it to your"
- einfo "runlevel by issuing the following command:"
- einfo "rc-update add dhcdbd default"
-}
diff --git a/net-misc/dhcdbd/dhcdbd-3.0.ebuild b/net-misc/dhcdbd/dhcdbd-3.0.ebuild
index ce5473f8723a..661f79b15490 100644
--- a/net-misc/dhcdbd/dhcdbd-3.0.ebuild
+++ b/net-misc/dhcdbd/dhcdbd-3.0.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2008 Gentoo Foundation
+# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcdbd/dhcdbd-3.0.ebuild,v 1.5 2008/02/29 03:12:57 ranger Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcdbd/dhcdbd-3.0.ebuild,v 1.6 2009/02/25 20:55:25 rbu Exp $
inherit eutils
@@ -16,23 +16,24 @@ IUSE="debug"
DEPEND="sys-apps/dbus
>=net-misc/dhcp-3.0.3-r7"
+RDEPEND=${DEPEND}
src_unpack() {
unpack ${A}
- cd ${S}
- epatch ${FILESDIR}/${PN}-2.5-fixes.patch
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-2.5-fixes.patch
# Create a pidfile immediately after daemonizing so we're more robust
# with baselayout-2.
- epatch ${FILESDIR}/${PN}-3.0-daemon.patch
+ epatch "${FILESDIR}"/${PN}-3.0-daemon.patch
# We don't and won't have dbus snapshots in the tree
- epatch ${FILESDIR}/${PN}-3.0-dbus.patch
+ epatch "${FILESDIR}"/${PN}-3.0-dbus.patch
}
src_install() {
make DESTDIR="${D}" install || die "make install failed"
dodoc README include/dhcp_options.h
- newinitd ${FILESDIR}/dhcdbd.init dhcdbd
- newconfd ${FILESDIR}/dhcdbd.confd dhcdbd
+ newinitd "${FILESDIR}"/dhcdbd.init dhcdbd
+ newconfd "${FILESDIR}"/dhcdbd.confd dhcdbd
}
pkg_postinst() {
diff --git a/net-misc/dhcdbd/files/dhcdbd-2.8-daemon.patch b/net-misc/dhcdbd/files/dhcdbd-2.8-daemon.patch
index 342ce0da8d70..9f65a6e00c33 100644
--- a/net-misc/dhcdbd/files/dhcdbd-2.8-daemon.patch
+++ b/net-misc/dhcdbd/files/dhcdbd-2.8-daemon.patch
@@ -19,7 +19,7 @@ diff -ur a b
+ if (dhcdbd_daemonize && (daemon (0, 0) == -1))
+ return errno;
+ unlink (DHCDBD_PID_FILE);
-+ if ((fd = open (DHCDBD_PID_FILE, O_WRONLY | O_CREAT)) == -1)
++ if ((fd = open (DHCDBD_PID_FILE, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR)) == -1)
+ exit (errno);
+ l = sprintf (path, "%u", getpid ());
+ l = write (fd, path, l);
diff --git a/net-misc/dhcdbd/files/dhcdbd-3.0-daemon.patch b/net-misc/dhcdbd/files/dhcdbd-3.0-daemon.patch
index 23534d386aca..a5730fcbe000 100644
--- a/net-misc/dhcdbd/files/dhcdbd-3.0-daemon.patch
+++ b/net-misc/dhcdbd/files/dhcdbd-3.0-daemon.patch
@@ -19,7 +19,7 @@ diff -ruN dhcdbd-3.0.orig/src/dhcdbd.c dhcdbd-3.0/src/dhcdbd.c
+ if (dhcdbd_daemonize && (daemon (0, 0) == -1))
+ return errno;
+ unlink (DHCDBD_PID_FILE);
-+ if ((fd = open (DHCDBD_PID_FILE, O_WRONLY | O_CREAT)) == -1)
++ if ((fd = open (DHCDBD_PID_FILE, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR)) == -1)
+ exit (errno);
+ l = sprintf (path, "%u", getpid ());
+ l = write (fd, path, l);