firehol: move patches into files

authored by Ben Siraphob and committed by Jonathan Ringer 863054f9 0eb369d9

+53 -58
+8 -58
pkgs/applications/networking/firehol/default.nix
··· 20 patches = [ 21 # configure tries to determine if `ping6` or the newer, combined 22 # `ping` is installed by using `ping -6` which would fail. 23 - (pkgs.writeText "firehol-ping6.patch" 24 - '' 25 - --- a/m4/ax_check_ping_ipv6.m4 26 - +++ b/m4/ax_check_ping_ipv6.m4 27 - @@ -42,16 +42,16 @@ AC_DEFUN([AX_CHECK_PING_IPV6], 28 - 29 - AC_CACHE_CHECK([whether ]PING[ has working -6 option], [ac_cv_ping_6_opt], 30 - [ 31 - - ac_cv_ping_6_opt=no 32 - - if test -n "$PING"; then 33 - - echo "Trying '$PING -6 -c 1 ::1'" >&AS_MESSAGE_LOG_FD 34 - - $PING -6 -c 1 ::1 > conftest.out 2>&1 35 - - if test "$?" = 0; then 36 - - ac_cv_ping_6_opt=yes 37 - - fi 38 - - cat conftest.out >&AS_MESSAGE_LOG_FD 39 - - rm -f conftest.out 40 - - fi 41 - + ac_cv_ping_6_opt=yes 42 - + #if test -n "$PING"; then 43 - + # echo "Trying '$PING -6 -c 1 ::1'" >&AS_MESSAGE_LOG_FD 44 - + # $PING -6 -c 1 ::1 > conftest.out 2>&1 45 - + # if test "$?" = 0; then 46 - + # ac_cv_ping_6_opt=yes 47 - + # fi 48 - + # cat conftest.out >&AS_MESSAGE_LOG_FD 49 - + # rm -f conftest.out 50 - + #fi 51 - ]) 52 - 53 - AS_IF([test "x$ac_cv_ping_6_opt" = "xyes"],[ 54 - '') 55 56 # put firehol config files in /etc/firehol (not $out/etc/firehol) 57 # to avoid error on startup, see #35114 58 - (pkgs.writeText "firehol-sysconfdir.patch" 59 - '' 60 - --- a/sbin/install.config.in.in 61 - +++ b/sbin/install.config.in.in 62 - @@ -4 +4 @@ 63 - -SYSCONFDIR="@sysconfdir_POST@" 64 - +SYSCONFDIR="/etc" 65 - '') 66 67 - # we must quote "$UNAME_CMD", or the dash in /nix/store/...-coreutils-.../bin/uname 68 - # will be interpreted as IFS -> error. this might be considered an upstream bug 69 - # but only appears when there are dashes in the command path 70 - (pkgs.writeText "firehol-uname-command.patch" 71 - '' 72 - --- a/sbin/firehol 73 - +++ b/sbin/firehol 74 - @@ -10295,7 +10295,7 @@ 75 - kmaj=$1 76 - kmin=$2 77 - 78 - - set -- $($UNAME_CMD -r) 79 - + set -- $("$UNAME_CMD" -r) 80 - eval $kmaj=\$1 $kmin=\$2 81 - } 82 - kernel_maj_min KERNELMAJ KERNELMIN 83 - '') 84 ]; 85 - 86 nativeBuildInputs = [ autoconf automake ]; 87 buildInputs = [ 88 curl iprange iproute ipset iptables iputils kmod
··· 20 patches = [ 21 # configure tries to determine if `ping6` or the newer, combined 22 # `ping` is installed by using `ping -6` which would fail. 23 + ./firehol-ping6.patch 24 25 # put firehol config files in /etc/firehol (not $out/etc/firehol) 26 # to avoid error on startup, see #35114 27 + ./firehol-sysconfdir.patch 28 29 + # we must quote "$UNAME_CMD", or the dash in 30 + # /nix/store/...-coreutils-.../bin/uname will be interpreted as 31 + # IFS -> error. this might be considered an upstream bug but only 32 + # appears when there are dashes in the command path 33 + ./firehol-uname-command.patch 34 ]; 35 + 36 nativeBuildInputs = [ autoconf automake ]; 37 buildInputs = [ 38 curl iprange iproute ipset iptables iputils kmod
+29
pkgs/applications/networking/firehol/firehol-ping6.patch
···
··· 1 + --- a/m4/ax_check_ping_ipv6.m4 2 + +++ b/m4/ax_check_ping_ipv6.m4 3 + @@ -42,16 +42,16 @@ AC_DEFUN([AX_CHECK_PING_IPV6], 4 + 5 + AC_CACHE_CHECK([whether ]PING[ has working -6 option], [ac_cv_ping_6_opt], 6 + [ 7 + - ac_cv_ping_6_opt=no 8 + - if test -n "$PING"; then 9 + - echo "Trying '$PING -6 -c 1 ::1'" >&AS_MESSAGE_LOG_FD 10 + - $PING -6 -c 1 ::1 > conftest.out 2>&1 11 + - if test "$?" = 0; then 12 + - ac_cv_ping_6_opt=yes 13 + - fi 14 + - cat conftest.out >&AS_MESSAGE_LOG_FD 15 + - rm -f conftest.out 16 + - fi 17 + + ac_cv_ping_6_opt=yes 18 + + #if test -n "$PING"; then 19 + + # echo "Trying '$PING -6 -c 1 ::1'" >&AS_MESSAGE_LOG_FD 20 + + # $PING -6 -c 1 ::1 > conftest.out 2>&1 21 + + # if test "$?" = 0; then 22 + + # ac_cv_ping_6_opt=yes 23 + + # fi 24 + + # cat conftest.out >&AS_MESSAGE_LOG_FD 25 + + # rm -f conftest.out 26 + + #fi 27 + ]) 28 + 29 + AS_IF([test "x$ac_cv_ping_6_opt" = "xyes"],[
+5
pkgs/applications/networking/firehol/firehol-sysconfdir.patch
···
··· 1 + --- a/sbin/install.config.in.in 2 + +++ b/sbin/install.config.in.in 3 + @@ -4,1 +4,1 @@ 4 + -SYSCONFDIR="@sysconfdir_POST@" 5 + +SYSCONFDIR="/etc"
+11
pkgs/applications/networking/firehol/firehol-uname-command.patch
···
··· 1 + --- a/sbin/firehol 2 + +++ b/sbin/firehol 3 + @@ -10295,7 +10295,7 @@ 4 + kmaj=$1 5 + kmin=$2 6 + 7 + - set -- $($UNAME_CMD -r) 8 + + set -- $("$UNAME_CMD" -r) 9 + eval $kmaj=\$1 $kmin=\$2 10 + } 11 + kernel_maj_min KERNELMAJ KERNELMIN