diff --git a/srcpkgs/dhcp/patches/dhcp-3.0-fix-perms.patch b/srcpkgs/dhcp/patches/dhcp-3.0-fix-perms.patch new file mode 100644 index 00000000000..13debb20ed0 --- /dev/null +++ b/srcpkgs/dhcp/patches/dhcp-3.0-fix-perms.patch @@ -0,0 +1,15 @@ +--- server/dhcpd.c 2003-11-05 14:08:09.000000000 -0800 ++++ server/dhcpd.c 2003-11-05 14:15:32.000000000 -0800 +@@ -602,6 +602,12 @@ + if (lftest) + exit (0); + ++#if defined (PARANOIA) ++ /* Set proper permissions... */ ++ if (lchown (path_dhcpd_db, set_uid, set_gid)) ++ log_fatal ("lchown(%s, %d, %d): %m", path_dhcpd_db, (int) set_uid, (int) set_gid); ++#endif /* PARANOIA */ ++ + /* Discover all the network interfaces and initialize them. */ + discover_interfaces (DISCOVER_SERVER); + diff --git a/srcpkgs/dhcp/patches/fix-includes.patch b/srcpkgs/dhcp/patches/fix-includes.patch new file mode 100644 index 00000000000..160ff24dd49 --- /dev/null +++ b/srcpkgs/dhcp/patches/fix-includes.patch @@ -0,0 +1,21 @@ +--- dst/dst_internal.h ++++ dst/dst_internal.h +@@ -20,6 +20,7 @@ + */ + #include + #include ++#include + + #ifndef PATH_MAX + # ifdef POSIX_PATH_MAX +--- includes/arpa/nameser.h ++++ includes/arpa/nameser.h +@@ -61,6 +61,8 @@ + #ifndef _ARPA_NAMESER_H_ + #define _ARPA_NAMESER_H_ + ++#include ++ + /* + * Revision information. This is the release date in YYYYMMDD format. + * It can change every day so the right thing to do with it is use it diff --git a/srcpkgs/dhcp/template b/srcpkgs/dhcp/template index 636a475d022..aefb1d25a05 100644 --- a/srcpkgs/dhcp/template +++ b/srcpkgs/dhcp/template @@ -1,31 +1,33 @@ # Template file for 'dhcp' pkgname=dhcp -version=4.2.3 -revision=4 +version=4.3.2 +revision=1 build_style=gnu-configure hostmakedepends="perl" +conf_files="/etc/dhcpd.conf" short_desc="Server from the Internet Software Consortium's implementation of DHCP" maintainer="Enno Boland " license="ISC" homepage="https://www.isc.org/software/dhcp" -distfiles="ftp://ftp.isc.org/isc/${pkgname}/${pkgname}-${version}/${pkgname}-${version}.tar.gz" -checksum=505c5754526ba92669bfd64daa8b529c6694c4528b45c3f35743c6fd4bd72897 -conf_files="/etc/dhcpd.conf" -_configure_args+=" --enable-paranoia - --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases - --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases - --with-cli-lease-file=/var/lib/dhclient/dhclient.leases - --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases" +distfiles="http://ftp.isc.org/isc/dhcp/${version}/dhcp-${version}.tar.gz" +checksum=6246c9b358759f6cdcc45104caaf76e732a211dbbbbf64a21f499c8db1298165 pre_configure() { + local _args=" --enable-paranoia + --with-srv-lease-file=/var/lib/dhcp/dhcpd.leases + --with-srv6-lease-file=/var/lib/dhcp/dhcpd6.leases + --with-cli-lease-file=/var/lib/dhclient/dhclient.leases + --with-cli6-lease-file=/var/lib/dhclient/dhclient6.leases" + # patching bind Makefile to patch with a cross fix while building (WTF?!) - sed -i "s#./configure#patch -p0 < $FILESDIR/003_cross_fix.patch \&\& ac_cv_file__dev_random=yes ./configure $configure_args#" bind/Makefile + sed -i "s#./configure#patch -p0 < $FILESDIR/003_cross_fix.patch \&\& ./configure --with-randomdev=/dev/urandom $configure_args#" bind/Makefile # set real configure_args - configure_args+="$_configure_args" + export configure_args+="${_args}" } - post_install() { + mv ${DESTDIR}/etc/dhclient.conf.example ${DESTDIR}/etc/dhclient.conf + mv ${DESTDIR}/etc/dhcpd.conf.example ${DESTDIR}/etc/dhcpd.conf sed -i "s/^/#/" $DESTDIR/etc/dhclient.conf $DESTDIR/etc/dhcpd.conf vsv dhcpd4 vsv dhcpd6