summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <uberlord@gentoo.org>2007-07-16 13:40:13 +0000
committerRoy Marples <uberlord@gentoo.org>2007-07-16 13:40:13 +0000
commitc41ecdd9d3b2d892389955ddc2e78dadb8b9d565 (patch)
tree9f4f86162864d83f27b5b73ab5cf81a2c3d83076 /net-misc
parentBetter link provided by gabrielp@simnet.is (diff)
downloadhistorical-c41ecdd9d3b2d892389955ddc2e78dadb8b9d565.tar.gz
historical-c41ecdd9d3b2d892389955ddc2e78dadb8b9d565.tar.bz2
historical-c41ecdd9d3b2d892389955ddc2e78dadb8b9d565.zip
Create a pidfile immediately after daemonizing so we're more robust
with baselayout-2 Package-Manager: portage-2.1.3_rc8
Diffstat (limited to 'net-misc')
-rw-r--r--net-misc/dhcdbd/ChangeLog9
-rw-r--r--net-misc/dhcdbd/Manifest19
-rw-r--r--net-misc/dhcdbd/dhcdbd-2.8-r1.ebuild42
-rw-r--r--net-misc/dhcdbd/files/dhcdbd-2.8-daemon.patch46
-rw-r--r--net-misc/dhcdbd/files/digest-dhcdbd-2.8-r13
5 files changed, 114 insertions, 5 deletions
diff --git a/net-misc/dhcdbd/ChangeLog b/net-misc/dhcdbd/ChangeLog
index 111b88e353be..73bc3c5e459a 100644
--- a/net-misc/dhcdbd/ChangeLog
+++ b/net-misc/dhcdbd/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for net-misc/dhcdbd
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcdbd/ChangeLog,v 1.5 2007/06/14 17:51:24 steev Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcdbd/ChangeLog,v 1.6 2007/07/16 13:40:13 uberlord Exp $
+
+*dhcdbd-2.8-r1 (16 Jul 2007)
+
+ 16 Jul 2007; Roy Marples <uberlord@gentoo.org>
+ +files/dhcdbd-2.8-daemon.patch, +dhcdbd-2.8-r1.ebuild:
+ Create a pidfile immediately after daemonizing so we're more robust
+ with baselayout-2
*dhcdbd-2.8 (14 Jun 2007)
diff --git a/net-misc/dhcdbd/Manifest b/net-misc/dhcdbd/Manifest
index 7fe8cdeef4a4..eb7a528053cb 100644
--- a/net-misc/dhcdbd/Manifest
+++ b/net-misc/dhcdbd/Manifest
@@ -2,6 +2,10 @@ AUX dhcdbd-2.5-fixes.patch 2069 RMD160 f886dee19510300b9c8df97dd81cc3e83a4b9cad
MD5 c2e5654818d5329f1c78590336f8b4fa files/dhcdbd-2.5-fixes.patch 2069
RMD160 f886dee19510300b9c8df97dd81cc3e83a4b9cad files/dhcdbd-2.5-fixes.patch 2069
SHA256 e4640f549140668d8966eae365cb332d42ac340ae27a0e85eeb1e53b06ed7fe8 files/dhcdbd-2.5-fixes.patch 2069
+AUX dhcdbd-2.8-daemon.patch 1666 RMD160 d37f5ba845809c971183e0aac0946ad3225007d2 SHA1 8353185f011683166c8bb118182447505d8d299b SHA256 c69fc989e973265f7cdb227933964c1edb0573bfa3d4c6ef953b575d6ed86383
+MD5 5fa3e8dbb0b1e6214137ed41cce8549e files/dhcdbd-2.8-daemon.patch 1666
+RMD160 d37f5ba845809c971183e0aac0946ad3225007d2 files/dhcdbd-2.8-daemon.patch 1666
+SHA256 c69fc989e973265f7cdb227933964c1edb0573bfa3d4c6ef953b575d6ed86383 files/dhcdbd-2.8-daemon.patch 1666
AUX dhcdbd.confd 99 RMD160 fa656c5ee4a3a90d61cff8d7bc2141c00a76b441 SHA1 2809224bb0615804a00047622e30fa95baa5912a SHA256 5e74188e4984eb83ded996fbe9ac61364ca925386754365549a314d8b8d656a5
MD5 adb3e35233944179b7859d6dfda9bca9 files/dhcdbd.confd 99
RMD160 fa656c5ee4a3a90d61cff8d7bc2141c00a76b441 files/dhcdbd.confd 99
@@ -16,14 +20,18 @@ EBUILD dhcdbd-2.7.ebuild 1185 RMD160 db6073fefcbadfe9b306ad41c7fad1b06da0f132 SH
MD5 712b4cdda5996fd552644c2d7a4399c9 dhcdbd-2.7.ebuild 1185
RMD160 db6073fefcbadfe9b306ad41c7fad1b06da0f132 dhcdbd-2.7.ebuild 1185
SHA256 1941a8db9709d0602c7da14be6c42731179e2dea9db617c1b9103137ef2821e9 dhcdbd-2.7.ebuild 1185
+EBUILD dhcdbd-2.8-r1.ebuild 1322 RMD160 aa5a80717fb1d00a6d947cc05f41bda9e30b888d SHA1 26332bd97de014273b7ff5ba74b8007145238a3a SHA256 7a8f52c1a1aaaea4aeb4764b08ce4baa8fab40441ab5025237a196ff223fe0f4
+MD5 3c309b296a07d56342cb7365d678d031 dhcdbd-2.8-r1.ebuild 1322
+RMD160 aa5a80717fb1d00a6d947cc05f41bda9e30b888d dhcdbd-2.8-r1.ebuild 1322
+SHA256 7a8f52c1a1aaaea4aeb4764b08ce4baa8fab40441ab5025237a196ff223fe0f4 dhcdbd-2.8-r1.ebuild 1322
EBUILD dhcdbd-2.8.ebuild 1185 RMD160 107118dc7c45911ef0c51675a59fd0825aa5fd69 SHA1 76b7074b3bb1cc4d98251b14c2b51a905aca9e61 SHA256 d616402ee53fd5296e14ecc57646161c30e501224f7751526267aa91a41069e4
MD5 b1c1887d762ecbb3f5402ea1e5fa6de2 dhcdbd-2.8.ebuild 1185
RMD160 107118dc7c45911ef0c51675a59fd0825aa5fd69 dhcdbd-2.8.ebuild 1185
SHA256 d616402ee53fd5296e14ecc57646161c30e501224f7751526267aa91a41069e4 dhcdbd-2.8.ebuild 1185
-MISC ChangeLog 1310 RMD160 d45b5fb4d23ad3c06aaa3ff9ad10e8b589d604d8 SHA1 1198dfed92f07b8ab7f8ba860735e00b408e9f95 SHA256 1788496c2ee088b8c2eae86a7a5b834b97b90983ccfdd32150d6829fd2b89555
-MD5 2771301c70bb83688df0c6a93c2e20d4 ChangeLog 1310
-RMD160 d45b5fb4d23ad3c06aaa3ff9ad10e8b589d604d8 ChangeLog 1310
-SHA256 1788496c2ee088b8c2eae86a7a5b834b97b90983ccfdd32150d6829fd2b89555 ChangeLog 1310
+MISC ChangeLog 1540 RMD160 933aa7555c07962eeb91f07c5f1f10b4e0018daa SHA1 4b6f43c3a5ddfaf13d4d60a297ec4f85f61a6ba6 SHA256 ca1928027f3755eec7ec7c82ee75dc30baf10363ad69b4c2d6788300bde4dc36
+MD5 9b33a4c8d7f1986d0d98a4e4ae8f9e2a ChangeLog 1540
+RMD160 933aa7555c07962eeb91f07c5f1f10b4e0018daa ChangeLog 1540
+SHA256 ca1928027f3755eec7ec7c82ee75dc30baf10363ad69b4c2d6788300bde4dc36 ChangeLog 1540
MISC metadata.xml 389 RMD160 be5b3f627e233d624f922bd95998e739bead5917 SHA1 8ad2361b71ab3181d0f8a1792fbc1859d6aa76ea SHA256 88f3f82bc0739b8d3e927fd033688807ca862e541f623f51f062656bf9e74173
MD5 7b00393d0bb7793bf7f4a7fec2247cb1 metadata.xml 389
RMD160 be5b3f627e233d624f922bd95998e739bead5917 metadata.xml 389
@@ -34,3 +42,6 @@ SHA256 72655b840e3757254936031464eabae43c63d54b4292b4418902b6b38b6c4a81 files/di
MD5 8d2968e8ae89cb963cef433a9cb1a803 files/digest-dhcdbd-2.8 232
RMD160 8bc74bd33dced9824e221bc9886baf979c2fc0d7 files/digest-dhcdbd-2.8 232
SHA256 139ba928d254de984ea8d442451d2794c465db764a5813e7c32f49a0e9d62144 files/digest-dhcdbd-2.8 232
+MD5 8d2968e8ae89cb963cef433a9cb1a803 files/digest-dhcdbd-2.8-r1 232
+RMD160 8bc74bd33dced9824e221bc9886baf979c2fc0d7 files/digest-dhcdbd-2.8-r1 232
+SHA256 139ba928d254de984ea8d442451d2794c465db764a5813e7c32f49a0e9d62144 files/digest-dhcdbd-2.8-r1 232
diff --git a/net-misc/dhcdbd/dhcdbd-2.8-r1.ebuild b/net-misc/dhcdbd/dhcdbd-2.8-r1.ebuild
new file mode 100644
index 000000000000..d4f993b21da0
--- /dev/null
+++ b/net-misc/dhcdbd/dhcdbd-2.8-r1.ebuild
@@ -0,0 +1,42 @@
+# 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-r1.ebuild,v 1.1 2007/07/16 13:40:13 uberlord 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
+
+ # Create a pidfile immediately after daemonizing so we're more robust
+ # with baselayout-2
+ 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
+}
+
+pkg_postinst() {
+ einfo "dhcdbd is used by NetworkManager in order to use it"
+ einfo "you can add it to runlevels by writing on your terminal"
+ einfo "rc-update add dhcdbd default"
+}
diff --git a/net-misc/dhcdbd/files/dhcdbd-2.8-daemon.patch b/net-misc/dhcdbd/files/dhcdbd-2.8-daemon.patch
new file mode 100644
index 000000000000..342ce0da8d70
--- /dev/null
+++ b/net-misc/dhcdbd/files/dhcdbd-2.8-daemon.patch
@@ -0,0 +1,46 @@
+diff -ur a b
+--- a/src/dhcdbd.c 2007-07-08 17:31:50.000000000 +0100
++++ b/src/dhcdbd.c 2007-07-08 17:38:39.000000000 +0100
+@@ -2778,9 +2778,6 @@
+ char path[1024];
+ int fd, l;
+
+- if (dhcdbd_daemonize && (daemon (0, 0) == -1))
+- return errno;
+-
+ openlog ("dhcdbd", LOG_NDELAY | LOG_CONS, LOG_USER);
+
+ dbus = dbus_svc_init (bus, dhcdbd_destination, dhcdbd_log, 0L);
+@@ -2821,6 +2818,17 @@
+ (dbus, dhcdbd_object_path, path, dhcdbd_if_subscribe, dhco))
+ return (1);
+
++ /* Daemonize and write the pidfile write away, to avoid races */
++ if (dhcdbd_daemonize && (daemon (0, 0) == -1))
++ return errno;
++ unlink (DHCDBD_PID_FILE);
++ if ((fd = open (DHCDBD_PID_FILE, O_WRONLY | O_CREAT)) == -1)
++ exit (errno);
++ l = sprintf (path, "%u", getpid ());
++ l = write (fd, path, l);
++ fsync (fd);
++ close (fd);
++
+ memset (&sa, '\0', sizeof (struct sigaction));
+ sa.sa_sigaction = dhc_reaper;
+ sa.sa_flags = SA_SIGINFO; /* NO RESTART, NO DEFER, CLDSTOP */
+@@ -2828,13 +2836,7 @@
+ dhcdbd_log ("sigaction failed: %s\n", strerror (errno));
+ return (1);
+ }
+- unlink (DHCDBD_PID_FILE);
+- if ((fd = open (DHCDBD_PID_FILE, O_WRONLY | O_CREAT)) == -1)
+- exit (errno);
+- l = sprintf (path, "%u", getpid ());
+- l = write (fd, path, l);
+- fsync (fd);
+- close (fd);
++
+ dhcdbd_log ("Started up.");
+ dbus_svc_main_loop (dbus, dhcdbd_work);
+ dhcdbd_debug ("Main Loop Exited.");
diff --git a/net-misc/dhcdbd/files/digest-dhcdbd-2.8-r1 b/net-misc/dhcdbd/files/digest-dhcdbd-2.8-r1
new file mode 100644
index 000000000000..2c7a83e05381
--- /dev/null
+++ b/net-misc/dhcdbd/files/digest-dhcdbd-2.8-r1
@@ -0,0 +1,3 @@
+MD5 c2c5a5c72182c3e88ae62eadb4874fc1 dhcdbd-2.8.tar.bz2 56792
+RMD160 e200683739f8f3f23fed64441231b99d72d48440 dhcdbd-2.8.tar.bz2 56792
+SHA256 eb4c566509ea98f393e3488d1861f3a74f97438fb24551703fe6b2d00593f2b4 dhcdbd-2.8.tar.bz2 56792