From 9edb877588f01566225a289e63dc0f5667ae730b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Mon, 28 Oct 2013 13:41:31 +0000 Subject: main/dhcp: fix musl build --- main/dhcp/APKBUILD | 15 ++++++----- main/dhcp/fix-includes.patch | 36 ++++++++++++++++++++++++++ main/dhcp/linux_ipv6_discover.patch | 50 ------------------------------------- 3 files changed, 45 insertions(+), 56 deletions(-) create mode 100644 main/dhcp/fix-includes.patch delete mode 100644 main/dhcp/linux_ipv6_discover.patch diff --git a/main/dhcp/APKBUILD b/main/dhcp/APKBUILD index 4b2cb90984..e99dc18116 100644 --- a/main/dhcp/APKBUILD +++ b/main/dhcp/APKBUILD @@ -14,8 +14,8 @@ makedepends="perl" install="dhcp.pre-install dhcp.pre-upgrade dhcp.post-upgrade" subpackages="$pkgname-doc $pkgname-dev dhclient dhcrelay" source="http://ftp.isc.org/isc/dhcp/${_realver}/$pkgname-$_realver.tar.gz - linux_ipv6_discover.patch dhcp-3.0-fix-perms.patch + fix-includes.patch dhcrelay.initd dhcrelay.confd dhcpd.confd @@ -23,8 +23,11 @@ source="http://ftp.isc.org/isc/dhcp/${_realver}/$pkgname-$_realver.tar.gz prepare() { cd "$srcdir/$pkgname-$_realver" - patch -p1 -i "$srcdir"/dhcp-3.0-fix-perms.patch || return 1 - # patch -p1 -i ../linux_ipv6_discover.patch || return 1 + for i in $source; do + case $i in + *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; + esac + done } build() { @@ -82,22 +85,22 @@ dhcrelay() { } md5sums="f68e3c1f00a9af5742bc5e71d567cf93 dhcp-4.2.5-P1.tar.gz -37abf1fb047a353e91b022fafdabf39a linux_ipv6_discover.patch a9eaf182dae3984670da52f20ae10fba dhcp-3.0-fix-perms.patch +f4c72603a4772b68bc26c311472ad2eb fix-includes.patch 1597c012bb1a2c0828254c87f0a904ad dhcrelay.initd db84514fe15fd7d81136afbaae738f55 dhcrelay.confd 026570f93fe76d2cdb0bbe6782b3ea5a dhcpd.confd 215f9e4f8643d7356342ebc624bfc56d dhcpd.initd" sha256sums="59b06c9f5d775e46999b422c45b9229402c462b114ce1685617bfb2b8b028250 dhcp-4.2.5-P1.tar.gz -f22fc0f5801ab65c31dfdb38c0b93737a24fc2ac189a409ea27d136d1e7b8ffe linux_ipv6_discover.patch 7482f93ec9140aa86b20d3fcc8cf336f1f2babf6217a909522c30a7947b0327d dhcp-3.0-fix-perms.patch +a3490fdb267f88c2b5de77620cc866c873d8994f02d1dda0fa2ce8ab936740ed fix-includes.patch d97fe25d5e20851a7ca7e0b77bc7256c91f6592b1bd186d152d5c3e621570a36 dhcrelay.initd 409b895ed489e75c1a08f72961b45d641b93fd9357f528abc78b1fd036b7f730 dhcrelay.confd e8a413e9102948b336f60041fc3cade33125faf56d8319ee65d9f3c63199a8e7 dhcpd.confd 7046c70408ae59648a2aafa9bb864581f6b0162bab25cadc36abed57bb680038 dhcpd.initd" sha512sums="02a811b6e88ce013f7ecff6abf81d4b2aff82fff584521ae03fc3242b6036d0d0ad3afc6283fe8b97d18b8fffd4b6d2253386897ae2297c165240017f5f219ec dhcp-4.2.5-P1.tar.gz -180fdfee2ddb9718c7e99c75e2dba7fea1bbf1b6dfaa31930406864aa1db6b83dc6be6a75f9faed7a252074addae5b262816357528809a44020baa6d974dc308 linux_ipv6_discover.patch d5697a56fbbff25199962608986e7ffb533ed4afd3e344e3c79d2010dda73cc0b088f06c454e9f0c69eb054e09a374455fa71d3f73306e0c98fa76df4dd321b7 dhcp-3.0-fix-perms.patch +88693958b752c5f9ccd7cb4faa677debdf71ce51e75cf4b2c303f2df16798c25da0bb24ead66ece1ac029ddc731cf36bc6a81ce56d5f75e142e1eacf1e8eb20f fix-includes.patch cc1d569fe3d826507b697f5749a468af9381416e19657a4239ab174e21d3dc281093f05a6ef6d21fb81f4c74d9aea1de98c76cb4b892224a16e9a173860006d6 dhcrelay.initd fd15dbaa4c61c3c26f407bf13dde859470a1adba134da064b653ccc152ce42635ee8de2fe113ae21ba8470e97e3caad8c1a47b69eb25e5e92b40e26790b96f6d dhcrelay.confd 7b7a77b7826b475a4113ebeee54501ce417cc56e85754301a82a185d88b4713d198f615a366e63e0e2b0aef988c8137dcd1e18c4036d993378257079da17693d dhcpd.confd diff --git a/main/dhcp/fix-includes.patch b/main/dhcp/fix-includes.patch new file mode 100644 index 0000000000..ecfb678485 --- /dev/null +++ b/main/dhcp/fix-includes.patch @@ -0,0 +1,36 @@ +Only in dhcp-4.2.5-P1.orig: bind/build.log +Only in dhcp-4.2.5-P1.orig: bind/configure.log +Only in dhcp-4.2.5-P1.orig: bind/install.log +--- dhcp-4.2.5-P1.orig/common/lpf.c ++++ dhcp-4.2.5-P1/common/lpf.c +@@ -36,8 +36,8 @@ + #include + #include + #include ++#include + #include +-#include + #include "includes/netinet/ip.h" + #include "includes/netinet/udp.h" + #include "includes/netinet/if_ether.h" +--- dhcp-4.2.5-P1.orig/dst/dst_internal.h ++++ dhcp-4.2.5-P1/dst/dst_internal.h +@@ -20,6 +20,7 @@ + */ + #include + #include ++#include + + #ifndef PATH_MAX + # ifdef POSIX_PATH_MAX +--- dhcp-4.2.5-P1.orig/includes/arpa/nameser.h ++++ dhcp-4.2.5-P1/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/main/dhcp/linux_ipv6_discover.patch b/main/dhcp/linux_ipv6_discover.patch deleted file mode 100644 index ebf3865e6a..0000000000 --- a/main/dhcp/linux_ipv6_discover.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -Naur dhcp-4.1.0a2/common/discover.c dhcp-4.1.0a2-mcn/common/discover.c ---- dhcp-4.1.0a2/common/discover.c 2008-08-29 18:48:57.000000000 +0100 -+++ dhcp-4.1.0a2-mcn/common/discover.c 2008-10-02 13:02:06.000000000 +0100 -@@ -443,15 +443,17 @@ - } - - #ifdef DHCPv6 -- ifaces->fp6 = fopen("/proc/net/if_inet6", "r"); -- if (ifaces->fp6 == NULL) { -- log_error("Error opening '/proc/net/if_inet6' to " -- "list IPv6 interfaces; %m"); -- close(ifaces->sock); -- ifaces->sock = -1; -- fclose(ifaces->fp); -- ifaces->fp = NULL; -- return 0; -+ if (local_family == AF_INET6) { -+ ifaces->fp6 = fopen("/proc/net/if_inet6", "r"); -+ if (ifaces->fp6 == NULL) { -+ log_error("Error opening '/proc/net/if_inet6' to " -+ "list IPv6 interfaces; %m"); -+ close(ifaces->sock); -+ ifaces->sock = -1; -+ fclose(ifaces->fp); -+ ifaces->fp = NULL; -+ return 0; -+ } - } - #endif - -@@ -720,7 +722,8 @@ - } - #ifdef DHCPv6 - if (!(*err)) { -- return next_iface6(info, err, ifaces); -+ if (local_family == AF_INET6) -+ return next_iface6(info, err, ifaces); - } - #endif - return 0; -@@ -736,7 +739,8 @@ - close(ifaces->sock); - ifaces->sock = -1; - #ifdef DHCPv6 -- fclose(ifaces->fp6); -+ if (local_family == AF_INET6) -+ fclose(ifaces->fp6); - ifaces->fp6 = NULL; - #endif - } -- cgit v1.2.3