File libreoffice-7.4.1.2-grep.patch of Package libreoffice.27130

From fd42cea5f301a10cdeaa29959f04b111de534132 Mon Sep 17 00:00:00 2001
From: Rene Engelhard <rene@debian.org>
Date: Wed, 7 Sep 2022 21:34:42 +0200
Subject: [PATCH] replace egrep/fgrep calls with grep -E/grep -F

as egrep/fgrep is deprecated since long amd grep 3.8+ now actually warns
(e.g. "egrep: warning: egrep is obsolescent; using grep -E")

Change-Id: I5b10f05dffdd09081deb05cef974e3cdb2907315
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139614
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
---
 .git-hooks/commit-msg          | 4 ++--
 android/source/gradlew         | 4 ++--
 bin/find-german-comments       | 2 +-
 configure.ac                   | 6 +++---
 odk/config/configure.pl        | 4 ++--
 slideshow/qa/debug/nodetree.sh | 2 +-
 6 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/.git-hooks/commit-msg b/.git-hooks/commit-msg
index eebca62cb6f7a..950a6b709d9a8 100755
--- a/.git-hooks/commit-msg
+++ b/.git-hooks/commit-msg
@@ -49,8 +49,8 @@ if [ "$len" -gt 79 ] ; then
 fi
 
 fdo_regex='fdo#[0-9]+'
-if egrep -q "$fdo_regex" $1; then
-    for bugid in `head -n 1 $1 |egrep -o "$fdo_regex" |sed 's/fdo#//'`
+if grep -E -q "$fdo_regex" $1; then
+    for bugid in `head -n 1 $1 | grep -E -o "$fdo_regex" |sed 's/fdo#//'`
     do
         if [ "`echo $bugid |sed 's/fdo#//'`" -gt 88775 ]; then
             abort "$1" "The first line contains a suspicious fdo# rereference: 'fdo#$bugid', did you mean tdf#?"
diff --git a/android/source/gradlew b/android/source/gradlew
index 91a7e269e19df..b7029853b09f2 100755
--- a/android/source/gradlew
+++ b/android/source/gradlew
@@ -130,8 +130,8 @@ if $cygwin ; then
     # Now convert the arguments - kludge to limit ourselves to /bin/sh
     i=0
     for arg in "$@" ; do
-        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
-        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+        CHECK=`echo "$arg"|grep -E -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|grep -E -c "^-"`                                 ### Determine if an option
 
         if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
             eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
diff --git a/bin/find-german-comments b/bin/find-german-comments
index a38b435ce8708..175af6f22420d 100755
--- a/bin/find-german-comments
+++ b/bin/find-german-comments
@@ -235,7 +235,7 @@ class Parser:
         # Change into the given dir, so "git ls-tree" does work.
         os.chdir(directory)
 
-        sock = os.popen(r"git ls-tree -r HEAD --name-only |egrep '\.(c|cc|cpp|cxx|h|hxx|mm)$'")
+        sock = os.popen(r"git ls-tree -r HEAD --name-only | grep -E '\.(c|cc|cpp|cxx|h|hxx|mm)$'")
         lines = sock.readlines()
         sock.close()
 
diff --git a/configure.ac b/configure.ac
index 7b03df8ee0aae..7c82578933cba 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2945,7 +2945,7 @@ AC_SUBST(GNUPARALLEL)
 
 AC_MSG_CHECKING([for GNU or BSD tar])
 for a in $GNUTAR gtar gnutar tar bsdtar /usr/sfw/bin/gtar; do
-    $a --version 2> /dev/null | egrep "GNU|bsdtar"  2>&1 > /dev/null
+    $a --version 2> /dev/null | grep -E "GNU|bsdtar"  2>&1 > /dev/null
     if test $? -eq 0;  then
         GNUTAR=$a
         break
@@ -2958,11 +2958,11 @@ fi
 AC_SUBST(GNUTAR)
 
 AC_MSG_CHECKING([for tar's option to strip components])
-$GNUTAR --help 2> /dev/null | egrep "bsdtar|strip-components" 2>&1 >/dev/null
+$GNUTAR --help 2> /dev/null | grep -E "bsdtar|strip-components" 2>&1 >/dev/null
 if test $? -eq 0; then
     STRIP_COMPONENTS="--strip-components"
 else
-    $GNUTAR --help 2> /dev/null | egrep "strip-path" 2>&1 >/dev/null
+    $GNUTAR --help 2> /dev/null | grep -E "strip-path" 2>&1 >/dev/null
     if test $? -eq 0; then
         STRIP_COMPONENTS="--strip-path"
     else
diff --git a/odk/config/configure.pl b/odk/config/configure.pl
index f3d0e08b3440f..756db5a3c76b5 100755
--- a/odk/config/configure.pl
+++ b/odk/config/configure.pl
@@ -242,7 +242,7 @@
     } else
     {
         #check version
-        my $testVersion = `$OO_SDK_ZIP_HOME/zip -h 2>&1 | egrep Zip | head -n 1`;
+        my $testVersion = `$OO_SDK_ZIP_HOME/zip -h 2>&1 | grep -E Zip | head -n 1`;
         $testVersion =~ s#Zip ([\d.]+) .*#$1#go;
         if ( $testVersion eq "")
         {
@@ -414,7 +414,7 @@
         } else
         {
             #check version
-            my $testVersion = `$main::OO_SDK_JAVA_HOME/bin/java -version 2>&1 | egrep "java version" | head -n 1 | sed -e 's#.*version "##' | sed -e 's#".*##'`;
+            my $testVersion = `$main::OO_SDK_JAVA_HOME/bin/java -version 2>&1 | grep -E "java version" | head -n 1 | sed -e 's#.*version "##' | sed -e 's#".*##'`;
             $testVersion =~ s#([^\n]+)\n#$1#go;
 
             $main::correctVersion = testVersion($main::javaVersion, $testVersion, "$main::OO_SDK_JAVA_HOME/bin/java", 1);
diff --git a/slideshow/qa/debug/nodetree.sh b/slideshow/qa/debug/nodetree.sh
index 7105ff181d818..78546cb8ce0b2 100644
--- a/slideshow/qa/debug/nodetree.sh
+++ b/slideshow/qa/debug/nodetree.sh
@@ -34,7 +34,7 @@
 #
 ###################################################
 
-egrep "Node connection|Node state" $1 |                                         \
+grep -E "Node connection|Node state" $1 |                                         \
     sed -e '/Node state/ s/.*Node state.*: \(.*\)/\1/'                          \
         -e '/Node connection/ s/.*Node connection.*: \(n.*\)/\1/' |             \
                                                                                 \
openSUSE Build Service is sponsored by