From 59cee26703a17750e9be788d416b95d65d2710de7a04c19cf2e7a947c8325873 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Mon, 5 Sep 2022 21:07:51 +0000 Subject: [PATCH] Accepting request 1001150 from home:AndreasStieger:branches:security:apparmor - aa-decode: use grep -E instead of deprecated egrep (boo#1203092) OBS-URL: https://build.opensuse.org/request/show/1001150 OBS-URL: https://build.opensuse.org/package/show/security:apparmor/apparmor?expand=0&rev=352 --- apparmor-3.0.7-egrep.patch | 39 ++++++++++++++++++++++++++++++++++++++ apparmor.changes | 6 ++++++ apparmor.spec | 4 ++++ 3 files changed, 49 insertions(+) create mode 100644 apparmor-3.0.7-egrep.patch diff --git a/apparmor-3.0.7-egrep.patch b/apparmor-3.0.7-egrep.patch new file mode 100644 index 0000000..15d5bc0 --- /dev/null +++ b/apparmor-3.0.7-egrep.patch @@ -0,0 +1,39 @@ +From e8f3a1b87853da22fa8c23c49ca876b6d6997a41 Mon Sep 17 00:00:00 2001 +From: Michal Vasilek +Date: Tue, 24 Aug 2021 09:44:07 +0200 +Subject: [PATCH] aa-decode: use grep -E instead of egrep + +egrep and fgrep are deprecated and will print a warning in the next grep +release (3.8) + +https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1 +Signed-off-by: Michal Vasilek +--- + utils/aa-decode | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/utils/aa-decode b/utils/aa-decode +index 16f23b55b..35e426aff 100755 +--- a/utils/aa-decode ++++ b/utils/aa-decode +@@ -37,7 +37,7 @@ EOM + } + + decode() { +- if echo "$1" | egrep -q "^[0-9A-Fa-f]+$" ; then ++ if echo "$1" | grep -E -q "^[0-9A-Fa-f]+$" ; then + python3 -c "import binascii; print(bytes.decode(binascii.unhexlify('$1'), errors='strict'));" + else + echo "" +@@ -53,7 +53,7 @@ fi + # if have an argument, then use it, otherwise process stdin + if [ -n "$1" ]; then + e="$1" +- if ! echo "$e" | egrep -q "^[0-9A-Fa-f]+$" ; then ++ if ! echo "$e" | grep -E -q "^[0-9A-Fa-f]+$" ; then + echo "String should only contain hex characters (0-9, a-f, A-F)" + exit 1 + fi +-- +GitLab + diff --git a/apparmor.changes b/apparmor.changes index fff735b..d777a48 100644 --- a/apparmor.changes +++ b/apparmor.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Sep 4 18:08:28 UTC 2022 - Andreas Stieger + +- aa-decode: use grep -E instead of deprecated egrep (boo#1203092) + add apparmor-3.0.7-egrep.patch + ------------------------------------------------------------------- Sun Aug 28 10:41:29 UTC 2022 - Christian Boltz diff --git a/apparmor.spec b/apparmor.spec index 8a32bce..2d87707 100644 --- a/apparmor.spec +++ b/apparmor.spec @@ -92,6 +92,9 @@ Patch11: profiles-permit-php-fpm-pid-files-directly-under-run.patch # allow reading /sys/devices/system/cpu/possible in dnsmasc//libvirt-leaseshelper (boo#1202849, submitted upstream 2022-08-28 https://gitlab.com/apparmor/apparmor/-/merge_requests/917) Patch12: dnsmasq-cpu-possible.diff +# avoid warnings with GNU grep 3.8 (boo#1203092, from upstream) +Patch13: apparmor-3.0.7-egrep.patch + PreReq: sed BuildRoot: %{_tmppath}/%{name}-%{version}-build %define apparmor_bin_prefix %{?usrmerged:/usr}/lib/apparmor @@ -361,6 +364,7 @@ mv -v profiles/apparmor.d/usr.lib.apache2.mpm-prefork.apache2 profiles/apparmor/ %patch10 -p1 %patch11 -p1 %patch12 -p1 +%patch13 -p1 %build export SUSE_ASNEEDED=0