summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Klimaszewski <steev@gentoo.org>2007-09-04 18:55:02 +0000
committerStephen Klimaszewski <steev@gentoo.org>2007-09-04 18:55:02 +0000
commit7f5329f4b00aa4e7311a87ea0c06cb14b1c71e46 (patch)
treeca4aff5b9e839d33816dca0952bcb35043da0e56 /net-misc/dhcdbd
parentPunt unused version with hardcoded flac depends. (diff)
downloadgentoo-2-7f5329f4b00aa4e7311a87ea0c06cb14b1c71e46.tar.gz
gentoo-2-7f5329f4b00aa4e7311a87ea0c06cb14b1c71e46.tar.bz2
gentoo-2-7f5329f4b00aa4e7311a87ea0c06cb14b1c71e46.zip
New upstream release, and patches to fix working with baselayout-2 and dbus 1.0.2 since it expects a development version of DBus.
(Portage version: 2.1.3.7)
Diffstat (limited to 'net-misc/dhcdbd')
-rw-r--r--net-misc/dhcdbd/ChangeLog14
-rw-r--r--net-misc/dhcdbd/dhcdbd-3.0.ebuild (renamed from net-misc/dhcdbd/dhcdbd-2.7.ebuild)16
-rw-r--r--net-misc/dhcdbd/files/dhcdbd-3.0-daemon.patch46
-rw-r--r--net-misc/dhcdbd/files/dhcdbd-3.0-dbus.patch82
-rw-r--r--net-misc/dhcdbd/files/digest-dhcdbd-2.73
-rw-r--r--net-misc/dhcdbd/files/digest-dhcdbd-3.03
6 files changed, 154 insertions, 10 deletions
diff --git a/net-misc/dhcdbd/ChangeLog b/net-misc/dhcdbd/ChangeLog
index 8966acc5d8d8..e8b464082403 100644
--- a/net-misc/dhcdbd/ChangeLog
+++ b/net-misc/dhcdbd/ChangeLog
@@ -1,6 +1,18 @@
# 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.9 2007/08/28 14:35:09 nixnut Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcdbd/ChangeLog,v 1.10 2007/09/04 18:55:01 steev Exp $
+
+ 04 Sep 2007; Steev Klimaszewski <steev@gentoo.org>
+ +files/dhcdbd-3.0-daemon.patch, +files/dhcdbd-3.0-dbus.patch,
+ -dhcdbd-2.7.ebuild, +dhcdbd-3.0.ebuild:
+ Add patch so that 3.0 works with dbus 1.0.2, reported by rbu while testing.
+
+*dhcdbd-3.0 (04 Sep 2007)
+
+ 04 Sep 2007; Steev Klimaszewski <steev@gentoo.org>
+ +files/dhcdbd-3.0-daemon.patch, -dhcdbd-2.7.ebuild, +dhcdbd-3.0.ebuild:
+ New upstream release, works with dhcp 3.1+ as well as lower. This should fix
+ stable from being broken once we stablize it
28 Aug 2007; nixnut <nixnut@gentoo.org> dhcdbd-2.8-r1.ebuild:
Stable on ppc wrt bug 189781
diff --git a/net-misc/dhcdbd/dhcdbd-2.7.ebuild b/net-misc/dhcdbd/dhcdbd-3.0.ebuild
index 85f6fedd17cb..75600f6ee595 100644
--- a/net-misc/dhcdbd/dhcdbd-2.7.ebuild
+++ b/net-misc/dhcdbd/dhcdbd-3.0.ebuild
@@ -1,17 +1,18 @@
# 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.7.ebuild,v 1.1 2007/05/14 16:53:56 steev Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcdbd/dhcdbd-3.0.ebuild,v 1.1 2007/09/04 18:55:01 steev 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"
+HOMEPAGE="http://dcantrel.fedorapeople.org/dhcdbd"
+SRC_URI="http://dcantrel.fedorapeople.org/dhcdbd/${P}.tar.bz2"
LICENSE="public-domain"
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~ppc64 ~x86"
-IUSE=""
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug"
DEPEND="sys-apps/dbus
>=net-misc/dhcp-3.0.3-r7"
@@ -20,8 +21,11 @@ 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}/${PN}-3.0-daemon.patch
+ # We don't and won't have dbus snapshots in the tree
+ epatch ${FILESDIR}/${PN}-3.0-dbus.patch
}
src_install() {
diff --git a/net-misc/dhcdbd/files/dhcdbd-3.0-daemon.patch b/net-misc/dhcdbd/files/dhcdbd-3.0-daemon.patch
new file mode 100644
index 000000000000..23534d386aca
--- /dev/null
+++ b/net-misc/dhcdbd/files/dhcdbd-3.0-daemon.patch
@@ -0,0 +1,46 @@
+diff -ruN dhcdbd-3.0.orig/src/dhcdbd.c dhcdbd-3.0/src/dhcdbd.c
+--- dhcdbd-3.0.orig/src/dhcdbd.c 2007-09-04 10:31:45.000000000 -0500
++++ dhcdbd-3.0/src/dhcdbd.c 2007-09-04 10:35:52.000000000 -0500
+@@ -2769,9 +2769,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);
+@@ -2812,6 +2809,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 */
+@@ -2819,13 +2827,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, 0644)) == -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/dhcdbd-3.0-dbus.patch b/net-misc/dhcdbd/files/dhcdbd-3.0-dbus.patch
new file mode 100644
index 000000000000..3c96d457e9c5
--- /dev/null
+++ b/net-misc/dhcdbd/files/dhcdbd-3.0-dbus.patch
@@ -0,0 +1,82 @@
+diff -ruN dhcdbd-3.0.orig/src/dbus_service.c dhcdbd-3.0/src/dbus_service.c
+--- dhcdbd-3.0.orig/src/dbus_service.c 2007-09-04 11:08:45.000000000 -0500
++++ dhcdbd-3.0/src/dbus_service.c 2007-09-04 12:00:38.000000000 -0500
+@@ -1024,7 +1024,11 @@
+
+ static void set_watch_fds(DBusWatch * watch, DBusConnectionState * cs) {
+ uint8_t flags = dbus_watch_get_flags(watch);
++#if (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MINOR == 1 && DBUS_VERSION_MICRO >= 1) || (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MAJOR > 1) || (DBUS_VERSION_MAJOR > 1)
+ int fd = dbus_watch_get_unix_fd(watch);
++#else
++ int fd = dbus_watch_get_fd(watch);
++#endif
+
+ if (cs->n <= fd)
+ cs->n = fd + 1;
+@@ -1057,7 +1061,11 @@
+ dbus_watch_set_data(watch, cs, no_free);
+
+ if (cs->dh != 0L)
++#if (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MINOR == 1 && DBUS_VERSION_MICRO >= 1) || (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MAJOR > 1) || (DBUS_VERSION_MAJOR > 1)
+ (*(cs->dh)) ("add_watch: %d", dbus_watch_get_unix_fd (watch));
++#else
++ (*(cs->dh)) ("add_watch: %d", dbus_watch_get_fd(watch));
++#endif
+
+ if (tsearch((const void *) watch, &(cs->watches), ptr_key_comparator) == 0L) {
+ if (cs->eh != 0L)
+@@ -1074,14 +1082,22 @@
+ static void remove_watch(DBusWatch * watch, void *csp)
+ {
+ DBusConnectionState *cs = csp;
++#if (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MINOR == 1 && DBUS_VERSION_MICRO >= 1) || (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MAJOR > 1) || (DBUS_VERSION_MAJOR > 1)
+ int fd = dbus_watch_get_unix_fd(watch);
++#else
++ int fd = dbus_watch_get_fd(watch);
++#endif
+
+ if (tdelete((const void *) watch, &(cs->watches), ptr_key_comparator) == 0L)
+ if (cs->eh != 0L)
+ (*(cs->eh)) ("remove_watch: can't happen?!?: watch not found");
+
+ if (cs->dh != 0L)
++#if (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MINOR == 1 && DBUS_VERSION_MICRO >= 1) || (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MAJOR > 1) || (DBUS_VERSION_MAJOR > 1)
+ (*(cs->dh)) ("remove_watch: %d", dbus_watch_get_unix_fd(watch));
++#else
++ (*(cs->dh)) ("remove_watch: %d", dbus_watch_get_fd(watch));
++#endif
+
+ FD_CLR(fd, &(cs->r_fds));
+ FD_CLR(fd, &(cs->w_fds));
+@@ -1092,7 +1108,11 @@
+ DBusConnectionState *cs = csp;
+
+ if (cs->dh != 0L)
++#if (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MINOR == 1 && DBUS_VERSION_MICRO >= 1) || (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MAJOR > 1) || (DBUS_VERSION_MAJOR > 1)
+ (*(cs->dh)) ("toggle_watch: %d", dbus_watch_get_unix_fd(watch));
++#else
++ (*(cs->dh)) ("toggle_watch: %d", dbus_watch_get_fd(watch));
++#endif
+
+ set_watch_fds(watch, cs);
+ }
+@@ -1114,11 +1134,19 @@
+ if (!dbus_watch_get_enabled(w))
+ return;
+
++#if (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MINOR == 1 && DBUS_VERSION_MICRO >= 1) || (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MAJOR > 1) || (DBUS_VERSION_MAJOR > 1)
+ fd = dbus_watch_get_unix_fd(w);
++#else
++ fd = dbus_watch_get_fd(w);
++#endif
+ flags = dbus_watch_get_flags(w);
+
+ if (cs->dh != 0L)
++#if (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MINOR == 1 && DBUS_VERSION_MICRO >= 1) || (DBUS_VERSION_MAJOR == 1 && DBUS_VERSION_MAJOR > 1) || (DBUS_VERSION_MAJOR > 1)
+ (*(cs->dh)) ("handle_watch: %d", dbus_watch_get_unix_fd(w));
++#else
++ (*(cs->dh)) ("handle_watch: %d", dbus_watch_get_fd(w));
++#endif
+
+ if ((flags & DBUS_WATCH_READABLE) && (FD_ISSET(fd, &(cs->s_r_fds))))
+ dbus_watch_handle(w, DBUS_WATCH_READABLE);
diff --git a/net-misc/dhcdbd/files/digest-dhcdbd-2.7 b/net-misc/dhcdbd/files/digest-dhcdbd-2.7
deleted file mode 100644
index 0cbb866609ca..000000000000
--- a/net-misc/dhcdbd/files/digest-dhcdbd-2.7
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 9edf3eabe05487e7ee5f0b685683d7fb dhcdbd-2.7.tar.bz2 56720
-RMD160 ef5bd47fde825e923f10411c69d1d507719554c5 dhcdbd-2.7.tar.bz2 56720
-SHA256 3f3b77132c40198cdf8b86a09c93449f5e204bb6d39f4dbebde9264e73ec621d dhcdbd-2.7.tar.bz2 56720
diff --git a/net-misc/dhcdbd/files/digest-dhcdbd-3.0 b/net-misc/dhcdbd/files/digest-dhcdbd-3.0
new file mode 100644
index 000000000000..d0d95e258ee1
--- /dev/null
+++ b/net-misc/dhcdbd/files/digest-dhcdbd-3.0
@@ -0,0 +1,3 @@
+MD5 5316b1a0b3a3d53e972374627546d0bf dhcdbd-3.0.tar.bz2 56867
+RMD160 f86abdeb5cc4f9cf2b9666057289d11cb453baae dhcdbd-3.0.tar.bz2 56867
+SHA256 c62d5916dbd4d3148bd4deff355c3dfcb8092c2d9918d62dd24030e01c28361a dhcdbd-3.0.tar.bz2 56867