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
This commit is contained in:
Christian Boltz 2022-09-05 21:07:51 +00:00 committed by Git OBS Bridge
parent 0c205599ae
commit 59cee26703
3 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,39 @@
From e8f3a1b87853da22fa8c23c49ca876b6d6997a41 Mon Sep 17 00:00:00 2001
From: Michal Vasilek <michal.vasilek@nic.cz>
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 <michal.vasilek@nic.cz>
---
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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Sep 4 18:08:28 UTC 2022 - Andreas Stieger <andreas.stieger@gmx.de>
- 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 <suse-beta@cboltz.de>

View File

@ -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