diff options
Diffstat (limited to 'gnu/packages')
-rw-r--r-- | gnu/packages/admin.scm | 40 | ||||
-rw-r--r-- | gnu/packages/patches/isc-dhcp-4.4.1-fixes-for-newer-bind.patch | 100 |
2 files changed, 131 insertions, 9 deletions
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 7ffdf18609..bd3c14033e 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com> -;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2014, 2015, 2016, 2018, 2019 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2014, 2015, 2016, 2017, 2018 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2015, 2016 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> ;;; Copyright © 2015 Alex Sassmannshausen <alex.sassmannshausen@gmail.com> @@ -684,9 +684,9 @@ connection alive.") (define-public isc-dhcp (let* ((bind-major-version "9") (bind-minor-version "11") - (bind-patch-version "4") - (bind-release-type "-P") ; for patch release, use "-P" - (bind-release-version "2") ; for patch release, e.g. "6" + (bind-patch-version "9") + (bind-release-type "") ; for patch release, use "-P" + (bind-release-version "") ; for patch release, e.g. "6" (bind-version (string-append bind-major-version "." bind-minor-version @@ -710,7 +710,18 @@ connection alive.") #:phases (modify-phases %standard-phases (add-after 'unpack 'replace-bundled-bind - (lambda* (#:key inputs #:allow-other-keys) + (lambda* (#:key inputs native-inputs #:allow-other-keys) + ;; XXX TODO: Remove the following invocation of 'patch' when + ;; isc-dhcp is updated. It should be needed only for 4.4.1. + (let ((patch (string-append (assoc-ref (or native-inputs inputs) + "patch") + "/bin/patch")) + (the-patch (assoc-ref (or native-inputs inputs) + "fixes-for-newer-bind.patch"))) + (format #t "applying '~a'...~%" the-patch) + (invoke patch "--force" "--no-backup-if-mismatch" + "-p1" "--input" the-patch)) + (delete-file "bind/bind.tar.gz") (copy-file (assoc-ref inputs "bind-source-tarball") "bind/bind.tar.gz") @@ -743,15 +754,18 @@ connection alive.") ;; shell is used. (with-directory-excursion "bind" (substitute* "Makefile" - (("\\./configure") + (("\\./configure ") (let ((sh (which "sh"))) (string-append "./configure CONFIG_SHELL=" - sh " SHELL=" sh)))) + sh " SHELL=" sh " ")))) (let ((bind-directory (string-append "bind-" ,bind-version))) (invoke "tar" "xf" "bind.tar.gz") (for-each patch-shebang (find-files bind-directory ".*")) + (substitute* (string-append bind-directory "/configure") + (("/usr/bin/file") + (which "file"))) (invoke "tar" "cf" "bind.tar.gz" bind-directory ;; avoid non-determinism in the archive @@ -787,7 +801,15 @@ connection alive.") (list inetutils net-tools coreutils sed)))) #t)))))) - (native-inputs `(("perl" ,perl))) + (native-inputs + `(("perl" ,perl) + ("file" ,file) + + ;; XXX TODO: Remove the following patch, and also the 'patch' + ;; program, when isc-dhcp is updated. + ("fixes-for-newer-bind.patch" + ,(search-patch "isc-dhcp-4.4.1-fixes-for-newer-bind.patch")) + ("patch" ,patch))) (inputs `(("inetutils" ,inetutils) ("net-tools" ,net-tools) @@ -803,7 +825,7 @@ connection alive.") "/bind-" bind-version ".tar.gz")) (sha256 (base32 - "04fq17zksd2b3w6w6padps5n7b6s2lasxpksbhl4378h56vgfnm8")))) + "03n57as73ygw6g3lqsmq2idkykajpbskzgixixdvi5a76m4g0fwn")))) ;; When cross-compiling, we need the cross Coreutils and sed. ;; Otherwise just use those from %FINAL-INPUTS. diff --git a/gnu/packages/patches/isc-dhcp-4.4.1-fixes-for-newer-bind.patch b/gnu/packages/patches/isc-dhcp-4.4.1-fixes-for-newer-bind.patch new file mode 100644 index 0000000000..53e681ea31 --- /dev/null +++ b/gnu/packages/patches/isc-dhcp-4.4.1-fixes-for-newer-bind.patch @@ -0,0 +1,100 @@ +These fixes are needed to adapt isc-dhcp-4.4.1 to build +successfully after its bundled copy of bind has been updated. + +It is derived from the following upstream commits: + +commit 8194daabfd590f17825f0c61e9534bee5c99cc86 +Author: Thomas Markwalder <tmark@isc.org> +Date: Fri Sep 14 13:41:14 2018 -0400 + + [master] Added includes of new BIND9 compatibility headers, updated util/bind.sh + + Merges in rt48072. + +commit cc35f84943df44dac2499f3e16e8aaba7d54191d +Author: Thomas Markwalder <tmark@isc.org> +Date: Tue Mar 19 08:36:23 2019 -0400 + + [master] Avoid Bind9 python dependency + + merges [#3,!1] Avoid Bind9 python dependency + +--- a/bind/Makefile.in ++++ b/bind/Makefile.in +@@ -23,7 +23,7 @@ exec_prefix = @exec_prefix@ + + bindconfig = --without-openssl --without-libxml2 --without-libjson \ + --without-gssapi --disable-threads --without-lmdb \ +- --includedir=@includedir@ --libdir=@libdir@ \ ++ --includedir=@includedir@ --libdir=@libdir@ --without-python\ + @BINDLT@ @BINDIOMUX@ @BINDCONFIG@ --enable-full-report + + @BIND_ATF_FALSE@cleandirs = ./lib ./include +diff --git a/includes/omapip/isclib.h b/includes/omapip/isclib.h +index 75a87ff6..538b927f 100644 +--- a/includes/omapip/isclib.h ++++ b/includes/omapip/isclib.h +@@ -48,6 +48,9 @@ + #include <string.h> + #include <netdb.h> + ++#include <isc/boolean.h> ++#include <isc/int.h> ++ + #include <isc/buffer.h> + #include <isc/lex.h> + #include <isc/lib.h> +diff --git a/includes/omapip/result.h b/includes/omapip/result.h +index 91243e1b..860298f6 100644 +--- a/includes/omapip/result.h ++++ b/includes/omapip/result.h +@@ -26,6 +26,7 @@ + #ifndef DHCP_RESULT_H + #define DHCP_RESULT_H 1 + ++#include <isc/boolean.h> + #include <isc/lang.h> + #include <isc/resultclass.h> + #include <isc/types.h> +diff --git a/server/dhcpv6.c b/server/dhcpv6.c +index a7110f98..cde4f617 100644 +--- a/server/dhcpv6.c ++++ b/server/dhcpv6.c +@@ -1034,7 +1034,8 @@ void check_pool6_threshold(struct reply_state *reply, + shared_name, + inet_ntop(AF_INET6, &lease->addr, + tmp_addr, sizeof(tmp_addr)), +- used, count); ++ (long long unsigned)(used), ++ (long long unsigned)(count)); + } + return; + } +@@ -1066,7 +1067,8 @@ void check_pool6_threshold(struct reply_state *reply, + "address: %s; high threshold %d%% %llu/%llu.", + shared_name, + inet_ntop(AF_INET6, &lease->addr, tmp_addr, sizeof(tmp_addr)), +- poolhigh, used, count); ++ poolhigh, (long long unsigned)(used), ++ (long long unsigned)(count)); + + /* handle the low threshold now, if we don't + * have one we default to 0. */ +@@ -1436,12 +1438,15 @@ pick_v6_address(struct reply_state *reply) + log_debug("Unable to pick client address: " + "no addresses available - shared network %s: " + " 2^64-1 < total, %llu active, %llu abandoned", +- shared_name, active - abandoned, abandoned); ++ shared_name, (long long unsigned)(active - abandoned), ++ (long long unsigned)(abandoned)); + } else { + log_debug("Unable to pick client address: " + "no addresses available - shared network %s: " + "%llu total, %llu active, %llu abandoned", +- shared_name, total, active - abandoned, abandoned); ++ shared_name, (long long unsigned)(total), ++ (long long unsigned)(active - abandoned), ++ (long long unsigned)(abandoned)); + } + + return ISC_R_NORESOURCES; |