From d147a35d9d2dc3a81575e0f9b37a6b832197f370c79311beda942b42c379cd06 Mon Sep 17 00:00:00 2001 From: Tom de Vries Date: Thu, 8 Sep 2022 19:30:16 +0000 Subject: [PATCH] Accepting request 1002174 from home:marxin:branches:devel:tools:compiler - Add dwz-use-grep-E-instead-of-egrep.patch in order to fix build with latest grep package. OBS-URL: https://build.opensuse.org/request/show/1002174 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/dwz?expand=0&rev=42 --- dwz-use-grep-E-instead-of-egrep.patch | 32 +++++++++++++++++++++++++++ dwz.changes | 6 +++++ dwz.spec | 2 ++ 3 files changed, 40 insertions(+) create mode 100644 dwz-use-grep-E-instead-of-egrep.patch diff --git a/dwz-use-grep-E-instead-of-egrep.patch b/dwz-use-grep-E-instead-of-egrep.patch new file mode 100644 index 0000000..3c9400c --- /dev/null +++ b/dwz-use-grep-E-instead-of-egrep.patch @@ -0,0 +1,32 @@ +From a57177980a05f0f84bf290ab7b68f73c0f78053f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Martin=20Li=C5=A1ka?= +Date: Wed, 7 Sep 2022 21:55:03 +0200 +Subject: [PATCH] Use grep -E instead of egrep. + +egrep is obsoleted starting with GNU Grep 3.8. +diff --git a/contrib/bytes-per-die.sh b/contrib/bytes-per-die.sh +index 969f733..fda8998 100755 +--- a/contrib/bytes-per-die.sh ++++ b/contrib/bytes-per-die.sh +@@ -3,7 +3,7 @@ + f="$1" + + size=$(readelf -WS "$f" \ +- | egrep "[ \t]\.debug_info" \ ++ | grep -E "[ \t]\.debug_info" \ + | sed 's/.*\.debug_info//' \ + | awk '{print $4}') + size=$((16#$size)) +diff --git a/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh b/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh +index 7f1e174..71d8518 100644 +--- a/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh ++++ b/testsuite/dwz.tests/two-files-low-mem-die-limit-0.sh +@@ -7,7 +7,7 @@ $execs/dwz-for-test \ + 1 2 \ + 2> dwz.err + +-if egrep -q "Compressing (1|2)$" dwz.err; then ++if grep -Eq "Compressing (1|2)$" dwz.err; then + exit 1 + fi + diff --git a/dwz.changes b/dwz.changes index 145c0ea..7533ed5 100644 --- a/dwz.changes +++ b/dwz.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Sep 8 17:53:27 UTC 2022 - Martin Liška + +- Add dwz-use-grep-E-instead-of-egrep.patch in order + to fix build with latest grep package. + ------------------------------------------------------------------- Thu Apr 28 10:08:03 UTC 2022 - Martin Liška diff --git a/dwz.spec b/dwz.spec index 9f394f9..ecbf5e3 100644 --- a/dwz.spec +++ b/dwz.spec @@ -83,6 +83,7 @@ Patch2: dwz-handle-reordered-dup-chains-in-create-import-tree.patch Patch3: dwz-enable-odr-by-default.patch Patch4: dwz-testsuite-fix-pr27463.sh-on-riscv64.patch Patch5: dwz-remove-odr-struct-multifile.sh.patch +Patch6: dwz-use-grep-E-instead-of-egrep.patch %if %{build_main} %description @@ -116,6 +117,7 @@ This package contains the testsuite results from DWZ. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 cp ../../SOURCES/tramp3d-v4.cpp.xz . xz -d tramp3d-v4.cpp.xz