]> TLD Linux GIT Repositories - packages/shorewall.git/commitdiff
- replaced obsolete fgrep/egrep with grep -F/-E master
authorMarcin Krol <hawk@tld-linux.org>
Sat, 25 May 2024 15:53:03 +0000 (17:53 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Sat, 25 May 2024 15:53:03 +0000 (17:53 +0200)
grep.patch [new file with mode: 0644]
shorewall.spec

diff --git a/grep.patch b/grep.patch
new file mode 100644 (file)
index 0000000..dafa633
--- /dev/null
@@ -0,0 +1,427 @@
+diff -ur shorewall-5.2.8.orig/shorewall/configure shorewall-5.2.8/shorewall/configure
+--- shorewall-5.2.8.orig/shorewall/configure   2020-09-25 00:02:15.000000000 +0200
++++ shorewall-5.2.8/shorewall/configure        2024-05-25 17:49:28.409051456 +0200
+@@ -134,7 +134,7 @@
+       *)
+           if [ -f /etc/debian_version ]; then
+               params[HOST]=debian
+-              ls -l /sbin/init | fgrep -q systemd &&  rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
++              ls -l /sbin/init | grep -F -q systemd &&  rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
+           elif [ -f /etc/altlinux-release ] ; then
+               params[HOST]=alt
+           elif [ -f /etc/redhat-release ]; then
+@@ -163,7 +163,7 @@
+     if [ $vendor = linux ]; then
+       rcfile=shorewallrc.default;
+     elif [ $vendor = debian -a -f /etc/debian_version ]; then
+-      ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
++      ls -l /sbin/init | grep -F -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
+     else
+       rcfile=shorewallrc.$vendor
+     fi
+diff -ur shorewall-5.2.8.orig/shorewall/lib.cli-std shorewall-5.2.8/shorewall/lib.cli-std
+--- shorewall-5.2.8.orig/shorewall/lib.cli-std 2024-05-25 14:52:30.564705737 +0200
++++ shorewall-5.2.8/shorewall/lib.cli-std      2024-05-25 17:50:39.342091463 +0200
+@@ -1157,7 +1157,7 @@
+                           ;;
+                       t)
+                           [ $# -eq 1 ] && fatal_error "The -t option requires a timeout value"
+-                          echo $2 | egrep -q '[[:digit:]]+[smh]' || fatal_error "The timeout value must be numeric, optionally followed by a suffix (s, m or h)"
++                          echo $2 | grep -E -q '[[:digit:]]+[smh]' || fatal_error "The timeout value must be numeric, optionally followed by a suffix (s, m or h)"
+                           timeout=$2
+                           option=
+                           shift;
+@@ -1331,7 +1331,7 @@
+           ;;
+       2)
+           handle_directory $1
+-          echo $2 | egrep -q '[[:digit:]]+[smh]' || fatal_error "The timeout value must be numeric, optionally followed by a suffix (s, m or h)"
++          echo $2 | grep -E -q '[[:digit:]]+[smh]' || fatal_error "The timeout value must be numeric, optionally followed by a suffix (s, m or h)"
+           timeout=$2
+           ;;
+       *)
+diff -ur shorewall-5.2.8.orig/shorewall/Perl/lib.runtime shorewall-5.2.8/shorewall/Perl/lib.runtime
+--- shorewall-5.2.8.orig/shorewall/Perl/lib.runtime    2024-05-25 14:52:30.564705737 +0200
++++ shorewall-5.2.8/shorewall/Perl/lib.runtime 2024-05-25 17:50:43.246148702 +0200
+@@ -116,14 +116,14 @@
+ # Generate a list of all network interfaces on the system
+ #
+ find_all_interfaces() {
+-    ${IP:-ip} link list | egrep '^[[:digit:]]+:' | cut -d ' ' -f2 | sed -r 's/(@.*)?:$//'
++    ${IP:-ip} link list | grep -E '^[[:digit:]]+:' | cut -d ' ' -f2 | sed -r 's/(@.*)?:$//'
+ }
+ #
+ # Generate a list of all network interfaces on the system that have an ipvX address
+ #
+ find_all_interfaces1() {
+-    ${IP:-ip} -$g_family addr list | egrep '^[[:digit:]]+:' | cut -d ' ' -f2 | sed -r 's/(@.*)?:$//'
++    ${IP:-ip} -$g_family addr list | grep -E '^[[:digit:]]+:' | cut -d ' ' -f2 | sed -r 's/(@.*)?:$//'
+ }
+ #
+@@ -679,7 +679,7 @@
+     status=0
+     if ! loopback_interface $1; then
+-      if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != 0.0.0.0 ] && [ -z "$($IP -$g_family link list dev $1 2> /dev/null | fgrep 'state DOWN')" ]; then
++      if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != 0.0.0.0 ] && [ -z "$($IP -$g_family link list dev $1 2> /dev/null | grep -F 'state DOWN')" ]; then
+           if [ "$COMMAND" != enable ]; then
+               [ ! -f ${VARDIR}/${1}_disabled ] && run_isusable_exit $1
+               status=$?
+@@ -1016,7 +1016,7 @@
+               gateway="nexthop $gateway dead"
+           fi
+-          if eval echo $route \| fgrep -q \'$gateway\'; then
++          if eval echo $route \| grep -F -q \'$gateway\'; then
+               eval route=\`echo $route \| sed \'s/$gateway/ /\'\`
+               run_ip route replace table $2 $route
+           fi
+diff -ur shorewall-5.2.8.orig/shorewall/Perl/prog.footer shorewall-5.2.8/shorewall/Perl/prog.footer
+--- shorewall-5.2.8.orig/shorewall/Perl/prog.footer    2020-09-24 23:46:24.000000000 +0200
++++ shorewall-5.2.8/shorewall/Perl/prog.footer 2024-05-25 17:49:42.813262647 +0200
+@@ -483,7 +483,7 @@
+           #
+           # See what it is
+           #
+-          if type $1 2> /dev/null | fgrep -q 'is a function'; then
++          if type $1 2> /dev/null | grep -F -q 'is a function'; then
+               #
+               # It's a shell function -- call it
+               #
+diff -ur shorewall-5.2.8.orig/shorewall/Perl/Shorewall/Chains.pm shorewall-5.2.8/shorewall/Perl/Shorewall/Chains.pm
+--- shorewall-5.2.8.orig/shorewall/Perl/Shorewall/Chains.pm    2020-09-25 00:02:15.000000000 +0200
++++ shorewall-5.2.8/shorewall/Perl/Shorewall/Chains.pm 2024-05-25 17:50:54.430312682 +0200
+@@ -8762,8 +8762,8 @@
+     emit( qq(if [ -n "\$g_docker" ]; then),
+         qq(    $tool -t nat -S DOCKER | tail -n +2 > \${VARDIR}/.nat_DOCKER),
+-        qq(    $tool -t nat -S OUTPUT | tail -n +2 | fgrep DOCKER > \${VARDIR}/.nat_OUTPUT),
+-        qq(    $tool -t nat -S POSTROUTING | tail -n +2 | fgrep -v SHOREWALL | fgrep -v LIBVIRT > \${VARDIR}/.nat_POSTROUTING),
++        qq(    $tool -t nat -S OUTPUT | tail -n +2 | grep -F DOCKER > \${VARDIR}/.nat_OUTPUT),
++        qq(    $tool -t nat -S POSTROUTING | tail -n +2 | grep -F -v SHOREWALL | grep -F -v LIBVIRT > \${VARDIR}/.nat_POSTROUTING),
+         qq(    $tool -t filter -S DOCKER | tail -n +2 > \${VARDIR}/.filter_DOCKER),
+         qq(    rm -f \${VARDIR}/.filter_DOCKER-*),
+         qq(    [ -n "\$g_dockeringress"  ] && $tool -t filter -S DOCKER-INGRESS   | tail -n +2 > \${VARDIR}/.filter_DOCKER-INGRESS),
+@@ -8780,7 +8780,7 @@
+     if ( known_interface( $bridge ) ) {
+       emit( qq(    $tool -t filter -S FORWARD | grep '^-A FORWARD.*[io] br-[a-z0-9]\\{12\\}' > \${VARDIR}/.filter_FORWARD) );
+     } else {
+-      emit( qq(    $tool -t filter -S FORWARD | egrep '^-A FORWARD.*[io] ($bridge|br-[a-z0-9]{12})' > \${VARDIR}/.filter_FORWARD) );
++      emit( qq(    $tool -t filter -S FORWARD | grep -E '^-A FORWARD.*[io] ($bridge|br-[a-z0-9]{12})' > \${VARDIR}/.filter_FORWARD) );
+     }
+     emit( q(    [ -s ${VARDIR}/.filter_FORWARD ] || rm -f ${VARDIR}/.filter_FORWARD),
+@@ -8825,7 +8825,7 @@
+ fi
+ if chain_exists dynamic; then
+-    $tool -S dynamic | tail -n +2 | fgrep -v -- '-j ACCEPT' > \${VARDIR}/.dynamic
++    $tool -S dynamic | tail -n +2 | grep -F -v -- '-j ACCEPT' > \${VARDIR}/.dynamic
+ else
+     rm -f \${VARDIR}/.dynamic
+ fi
+diff -ur shorewall-5.2.8.orig/shorewall/Perl/Shorewall/Config.pm shorewall-5.2.8/shorewall/Perl/Shorewall/Config.pm
+--- shorewall-5.2.8.orig/shorewall/Perl/Shorewall/Config.pm    2024-05-25 14:52:30.560705678 +0200
++++ shorewall-5.2.8/shorewall/Perl/Shorewall/Config.pm 2024-05-25 17:50:46.862201722 +0200
+@@ -5059,7 +5059,7 @@
+ }
+ sub Basic_Ematch() {
+-    $tc && have_capability( 'BASIC_FILTER' ) && system( "$tc filter add basic help 2>&1 | egrep -q match" ) == 0;
++    $tc && have_capability( 'BASIC_FILTER' ) && system( "$tc filter add basic help 2>&1 | grep -E -q match" ) == 0;
+ }
+ sub Fwmark_Rt_Mask() {
+diff -ur shorewall-5.2.8.orig/shorewall/Perl/Shorewall/Misc.pm shorewall-5.2.8/shorewall/Perl/Shorewall/Misc.pm
+--- shorewall-5.2.8.orig/shorewall/Perl/Shorewall/Misc.pm      2020-09-25 00:02:15.000000000 +0200
++++ shorewall-5.2.8/shorewall/Perl/Shorewall/Misc.pm   2024-05-25 17:50:08.705642277 +0200
+@@ -2559,7 +2559,7 @@
+     case $COMMAND in
+         stop|clear|restore)
+             if chain_exists dynamic; then
+-                ${IPTABLES}-save -t filter | grep '^-A dynamic' | fgrep -v -- '-j ACCEPT' > ${VARDIR}/.dynamic
++                ${IPTABLES}-save -t filter | grep '^-A dynamic' | grep -F -v -- '-j ACCEPT' > ${VARDIR}/.dynamic
+             fi
+             ;;
+         *)
+@@ -2574,7 +2574,7 @@
+     case $COMMAND in
+         stop|clear|restore)
+             if chain_exists dynamic; then
+-                ${IP6TABLES}-save -t filter | grep '^-A dynamic' | fgrep -v -- '-j ACCEPT' > ${VARDIR}/.dynamic
++                ${IP6TABLES}-save -t filter | grep '^-A dynamic' | grep -F -v -- '-j ACCEPT' > ${VARDIR}/.dynamic
+             fi
+             ;;
+         *)
+diff -ur shorewall-5.2.8.orig/shorewall/Perl/Shorewall/Proc.pm shorewall-5.2.8/shorewall/Perl/Shorewall/Proc.pm
+--- shorewall-5.2.8.orig/shorewall/Perl/Shorewall/Proc.pm      2020-09-25 00:02:15.000000000 +0200
++++ shorewall-5.2.8/shorewall/Perl/Shorewall/Proc.pm   2024-05-25 17:49:51.965396834 +0200
+@@ -364,7 +364,7 @@
+           emit( "    setting=$setting",
+                 '',
+-                "    fgrep -q $setting /proc/net/netfilter/nf_log || setting=$alternative",
++                "    grep -F -q $setting /proc/net/netfilter/nf_log || setting=$alternative",
+                 '',
+                 "    if echo \$setting > $file; then",
+                 '       progress_message "Log Backend set to $setting"',
+diff -ur shorewall-5.2.8.orig/shorewall/Perl/Shorewall/Providers.pm shorewall-5.2.8/shorewall/Perl/Shorewall/Providers.pm
+--- shorewall-5.2.8.orig/shorewall/Perl/Shorewall/Providers.pm 2020-09-25 00:02:15.000000000 +0200
++++ shorewall-5.2.8/shorewall/Perl/Shorewall/Providers.pm      2024-05-25 17:50:51.250266058 +0200
+@@ -1061,7 +1061,7 @@
+     }
+     emit( qq(\n) ,
+-        qq(if ! \$IP -6 rule ls | egrep -q "32767:[[:space:]]+from all lookup (default|253)"; then) ,
++        qq(if ! \$IP -6 rule ls | grep -E -q "32767:[[:space:]]+from all lookup (default|253)"; then) ,
+         qq(    qt \$IP -6 rule add from all table $providers{default}->{id} prio 32767\n) ,
+         qq(fi) ) if $family == F_IPV6;
+@@ -1078,7 +1078,7 @@
+       } elsif ( ! $noautosrc ) {
+           if ( $shared ) {
+               if ( $persistent ) {
+-                  emit( qq(if ! egrep -q "^20000:[[:space:]]+from $address lookup $id"; then),
++                  emit( qq(if ! grep -E -q "^20000:[[:space:]]+from $address lookup $id"; then),
+                         qq(    qt \$IP -$family rule del from $address pref 20000),
+                         qq(    run_ip rule add from $address pref 20000 table $id),
+                         qq(    echo "\$IP -$family rule del from $address pref 20000> /dev/null 2>&1" >> \${VARDIR}/undo_${table}_routing ),
+diff -ur shorewall-5.2.8.orig/shorewall6/configure shorewall-5.2.8/shorewall6/configure
+--- shorewall-5.2.8.orig/shorewall6/configure  2020-09-25 00:02:16.000000000 +0200
++++ shorewall-5.2.8/shorewall6/configure       2024-05-25 17:48:41.736367147 +0200
+@@ -134,7 +134,7 @@
+       *)
+           if [ -f /etc/debian_version ]; then
+               params[HOST]=debian
+-              ls -l /sbin/init | fgrep -q systemd &&  rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
++              ls -l /sbin/init | grep -F -q systemd &&  rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
+           elif [ -f /etc/altlinux-release ] ; then
+               params[HOST]=alt
+           elif [ -f /etc/redhat-release ]; then
+@@ -163,7 +163,7 @@
+     if [ $vendor = linux ]; then
+       rcfile=shorewallrc.default;
+     elif [ $vendor = debian -a -f /etc/debian_version ]; then
+-      ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
++      ls -l /sbin/init | grep -F -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
+     else
+       rcfile=shorewallrc.$vendor
+     fi
+diff -ur shorewall-5.2.8.orig/shorewall6-lite/configure shorewall-5.2.8/shorewall6-lite/configure
+--- shorewall-5.2.8.orig/shorewall6-lite/configure     2020-09-25 00:02:16.000000000 +0200
++++ shorewall-5.2.8/shorewall6-lite/configure  2024-05-25 17:49:23.932985828 +0200
+@@ -134,7 +134,7 @@
+       *)
+           if [ -f /etc/debian_version ]; then
+               params[HOST]=debian
+-              ls -l /sbin/init | fgrep -q systemd &&  rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
++              ls -l /sbin/init | grep -F -q systemd &&  rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
+           elif [ -f /etc/altlinux-release ] ; then
+               params[HOST]=alt
+           elif [ -f /etc/redhat-release ]; then
+@@ -163,7 +163,7 @@
+     if [ $vendor = linux ]; then
+       rcfile=shorewallrc.default;
+     elif [ $vendor = debian -a -f /etc/debian_version ]; then
+-      ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
++      ls -l /sbin/init | grep -F -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
+     else
+       rcfile=shorewallrc.$vendor
+     fi
+diff -ur shorewall-5.2.8.orig/shorewall-core/configure shorewall-5.2.8/shorewall-core/configure
+--- shorewall-5.2.8.orig/shorewall-core/configure      2020-09-25 00:02:15.000000000 +0200
++++ shorewall-5.2.8/shorewall-core/configure   2024-05-25 17:49:13.276829586 +0200
+@@ -134,7 +134,7 @@
+       *)
+           if [ -f /etc/debian_version ]; then
+               params[HOST]=debian
+-              ls -l /sbin/init | fgrep -q systemd &&  rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
++              ls -l /sbin/init | grep -F -q systemd &&  rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
+           elif [ -f /etc/altlinux-release ] ; then
+               params[HOST]=alt
+           elif [ -f /etc/redhat-release ]; then
+@@ -163,7 +163,7 @@
+     if [ $vendor = linux ]; then
+       rcfile=shorewallrc.default;
+     elif [ $vendor = debian -a -f /etc/debian_version ]; then
+-      ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
++      ls -l /sbin/init | grep -F -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
+     else
+       rcfile=shorewallrc.$vendor
+     fi
+diff -ur shorewall-5.2.8.orig/shorewall-core/lib.cli shorewall-5.2.8/shorewall-core/lib.cli
+--- shorewall-5.2.8.orig/shorewall-core/lib.cli        2024-05-25 14:52:30.564705737 +0200
++++ shorewall-5.2.8/shorewall-core/lib.cli     2024-05-25 17:50:34.890026189 +0200
+@@ -252,7 +252,7 @@
+     qt tc -s filter ls root dev $1 && tc -s filter ls root dev $device | grep -v '^$'
+     tc filter show dev $1
+-    tc class show dev $1 | fgrep 'leaf ' | fgrep -v ' hfsc' | sed 's/^.*leaf //;s/ .*//' | while read class; do
++    tc class show dev $1 | grep -F 'leaf ' | grep -F -v ' hfsc' | sed 's/^.*leaf //;s/ .*//' | while read class; do
+       if [ -n "$class" ]; then
+           echo
+           echo Node $class
+@@ -426,7 +426,7 @@
+ savesets() {
+     local supported
+-    supported=$(run_it $g_firewall help | fgrep savesets )
++    supported=$(run_it $g_firewall help | grep -F savesets )
+     [ -n "$supported" ] && run_it $g_firewall savesets ${g_restorepath}-ipsets 
+ }
+@@ -437,7 +437,7 @@
+ savesets1() {
+     local supported
+-    supported=$(run_it $g_firewall help | fgrep savesets )
++    supported=$(run_it $g_firewall help | grep -F savesets )
+     [ -n "$supported" ] && run_it $g_firewall savesets ${VARDIR}/ipsets.save && progress_message3 "The ipsets have been saved to ${VARDIR}/ipsets.save"
+ }
+@@ -696,7 +696,7 @@
+     local junk
+     local setname
+-    $IPSETN -L | egrep "^Name: ${1}(_.+)?$" | while read junk setname; do echo $setname; done
++    $IPSETN -L | grep -E "^Name: ${1}(_.+)?$" | while read junk setname; do echo $setname; done
+ }
+ list_zone() {
+@@ -707,9 +707,9 @@
+     determine_ipset_version
+     if [ $g_family -eq 4 ]; then
+-      sets=$($IPSETN -L | egrep "^$1(_.+)?");
++      sets=$($IPSETN -L | grep -E "^$1(_.+)?");
+      else
+-      sets=$($IPSETN -L | egrep "^6_$1(_.+)?")
++      sets=$($IPSETN -L | grep -E "^6_$1(_.+)?")
+     fi
+     [ -n "$sets" ] || sets=$(find_sets $1)
+@@ -1207,7 +1207,7 @@
+     $IP -s -$g_family xfrm policy | spd_filter
+     heading "PFKEY SAD"
+-    $IP -s -$g_family xfrm state | egrep -v '[[:space:]]+(auth-trunc|enc )' # Don't divulge the keys
++    $IP -s -$g_family xfrm state | grep -E -v '[[:space:]]+(auth-trunc|enc )' # Don't divulge the keys
+ }
+ show_ipsec_command() {
+@@ -1533,7 +1533,7 @@
+           if chain_exists dynamic; then
+               g_ipt_options="$g_ipt_options --line-numbers"
+               $g_tool -t filter -L dynamic $g_ipt_options  | head -n2
+-              $g_tool -t filter -L dynamic $g_ipt_options  | fgrep ACCEPT | $output_filter
++              $g_tool -t filter -L dynamic $g_ipt_options  | grep -F ACCEPT | $output_filter
+           fi
+           ;;
+       ipsec)
+@@ -1625,7 +1625,7 @@
+       if [ -n "$hnames" ]; then
+           for hname in $hnames; do
+-              iptaccount -l $hname | egrep '^IP:|^Show'
++              iptaccount -l $hname | grep -E '^IP:|^Show'
+               echo
+           done
+       else
+@@ -3253,7 +3253,7 @@
+       if $TC filter add basic help 2>&1 | grep -q ^Usage; then
+           BASIC_FILTER=Yes
+-          $TC filter add basic help 2>&1 | egrep -q match && BASIC_EMATCH=Yes
++          $TC filter add basic help 2>&1 | grep -E -q match && BASIC_EMATCH=Yes
+       fi
+       if $TC action add connmark help 2>&1 | grep -q ^Usage; then
+@@ -3674,7 +3674,7 @@
+     if [ $COMMAND = 'blacklist!' ]; then
+       timeout='timeout 0'
+     else
+-      echo "$@" | fgrep -q ' timeout ' || timeout="timeout $g_dbltimeout"
++      echo "$@" | grep -F -q ' timeout ' || timeout="timeout $g_dbltimeout"
+     fi
+     if $IPSET -A $g_blacklistipset $@ $timeout -exist; then
+@@ -4932,12 +4932,12 @@
+               #
+               # First look for it here
+               #
+-              if type $1 2> /dev/null | fgrep -q 'is a function'; then
++              if type $1 2> /dev/null | grep -F -q 'is a function'; then
+                   #
+                   # It's a shell function -- call it
+                   #
+                   $@
+-              elif type $1 2> /dev/null | fgrep -q 'is a shell function'; then
++              elif type $1 2> /dev/null | grep -F -q 'is a shell function'; then
+                   #
+                   # It's a shell function -- call it
+                   #
+diff -ur shorewall-5.2.8.orig/shorewall-core/lib.common shorewall-5.2.8/shorewall-core/lib.common
+--- shorewall-5.2.8.orig/shorewall-core/lib.common     2024-05-25 14:52:30.564705737 +0200
++++ shorewall-5.2.8/shorewall-core/lib.common  2024-05-25 17:49:09.004766950 +0200
+@@ -639,7 +639,7 @@
+ #Determines if the passed interface is a loopback interface
+ #
+ loopback_interface() { #$1 = Interface name
+-    [ "$1" = lo ] || $IP link show $1 | fgrep -q LOOPBACK
++    [ "$1" = lo ] || $IP link show $1 | grep -F -q LOOPBACK
+ }
+ #
+@@ -648,7 +648,7 @@
+ find_loopback_interfaces() {
+     local interfaces
+-    [ -x "$IP" ] && interfaces=$($IP link show | fgrep LOOPBACK | sed 's/://g' | cut -d ' ' -f 2)
++    [ -x "$IP" ] && interfaces=$($IP link show | grep -F LOOPBACK | sed 's/://g' | cut -d ' ' -f 2)
+     [ -n "$interfaces" ] && echo $interfaces || echo lo
+ }
+diff -ur shorewall-5.2.8.orig/shorewall-init/configure shorewall-5.2.8/shorewall-init/configure
+--- shorewall-5.2.8.orig/shorewall-init/configure      2020-09-25 00:02:16.000000000 +0200
++++ shorewall-5.2.8/shorewall-init/configure   2024-05-25 17:48:10.515909400 +0200
+@@ -134,7 +134,7 @@
+       *)
+           if [ -f /etc/debian_version ]; then
+               params[HOST]=debian
+-              ls -l /sbin/init | fgrep -q systemd &&  rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
++              ls -l /sbin/init | grep -F -q systemd &&  rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
+           elif [ -f /etc/altlinux-release ] ; then
+               params[HOST]=alt
+           elif [ -f /etc/redhat-release ]; then
+@@ -163,7 +163,7 @@
+     if [ $vendor = linux ]; then
+       rcfile=shorewallrc.default;
+     elif [ $vendor = debian -a -f /etc/debian_version ]; then
+-      ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
++      ls -l /sbin/init | grep -F -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
+     else
+       rcfile=shorewallrc.$vendor
+     fi
+diff -ur shorewall-5.2.8.orig/shorewall-lite/configure shorewall-5.2.8/shorewall-lite/configure
+--- shorewall-5.2.8.orig/shorewall-lite/configure      2020-09-25 00:02:16.000000000 +0200
++++ shorewall-5.2.8/shorewall-lite/configure   2024-05-25 17:49:17.420890348 +0200
+@@ -134,7 +134,7 @@
+       *)
+           if [ -f /etc/debian_version ]; then
+               params[HOST]=debian
+-              ls -l /sbin/init | fgrep -q systemd &&  rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
++              ls -l /sbin/init | grep -F -q systemd &&  rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
+           elif [ -f /etc/altlinux-release ] ; then
+               params[HOST]=alt
+           elif [ -f /etc/redhat-release ]; then
+@@ -163,7 +163,7 @@
+     if [ $vendor = linux ]; then
+       rcfile=shorewallrc.default;
+     elif [ $vendor = debian -a -f /etc/debian_version ]; then
+-      ls -l /sbin/init | fgrep -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
++      ls -l /sbin/init | grep -F -q systemd && rcfile=shorewallrc.debian.systemd || rcfile=shorewallrc.debian.sysvinit
+     else
+       rcfile=shorewallrc.$vendor
+     fi
index 1a678c62704df5955c4aa2f18405500eb3522c94..34ce646843624dc6c5edd5f5ae6ac599e866d12b 100644 (file)
@@ -9,7 +9,7 @@ Summary:        Shoreline Firewall - an iptables-based firewall for Linux systems
 Summary(pl.UTF-8):     Shoreline Firewall - zapora sieciowa oparta na iptables
 Name:          shorewall
 Version:       %{ver}%{rel}
 Summary(pl.UTF-8):     Shoreline Firewall - zapora sieciowa oparta na iptables
 Name:          shorewall
 Version:       %{ver}%{rel}
-Release:       2
+Release:       3
 License:       GPL
 Group:         Networking/Utilities
 Source0:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-%{ver}/%{name}-%{version}.tar.bz2
 License:       GPL
 Group:         Networking/Utilities
 Source0:       http://www.shorewall.net/pub/shorewall/5.2/shorewall-%{ver}/%{name}-%{version}.tar.bz2
@@ -32,6 +32,7 @@ Patch2:               tld.patch
 Patch3:                man.patch
 Patch4:                init.patch
 Patch5:                shell-fix.patch
 Patch3:                man.patch
 Patch4:                init.patch
 Patch5:                shell-fix.patch
+Patch6:                grep.patch
 URL:           http://www.shorewall.net/
 BuildRequires: perl
 BuildRequires: perl(Digest::SHA)
 URL:           http://www.shorewall.net/
 BuildRequires: perl
 BuildRequires: perl(Digest::SHA)
@@ -150,6 +151,7 @@ done
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 
 # Remove hash-bang from files which are not directly executed as shell
 # scripts. This silences some rpmlint errors.
 
 # Remove hash-bang from files which are not directly executed as shell
 # scripts. This silences some rpmlint errors.