apparmor: update to 3.1.2.

This commit is contained in:
mhmdanas 2022-12-07 22:14:36 +00:00 committed by Michal Vasilek
parent e11c82e2df
commit 4c6d421a5e
4 changed files with 9 additions and 113 deletions

View file

@ -61,15 +61,5 @@ modify logprof.conf for Void Linux
+ /usr/bin/genprof = u
+ /usr/bin/logprof = u
# these ones shouln't have their own profiles
# these ones shouldn't have their own profiles
/bin/awk = icn
@@ -112,6 +113,9 @@
/usr/bin/python3.5 = icn
/usr/bin/python3.6 = icn
/usr/bin/python3.7 = icn
+ /usr/bin/python3.8 = icn
+ /usr/bin/python3.9 = icn
+ /usr/bin/python3.10 = icn
/usr/bin/tr = icn
[required_hats]

View file

@ -1,84 +0,0 @@
From ea7b201ba48b87469297d58751c57b03ceb82320 Mon Sep 17 00:00:00 2001
From: Christian Boltz <apparmor@cboltz.de>
Date: Wed, 11 Aug 2021 21:37:40 +0200
Subject: [PATCH] Update abstractions/python and profiles for python 3.10
Fixes: https://gitlab.com/apparmor/apparmor/-/issues/187
---
profiles/apparmor.d/abstractions/python | 18 +++++++++---------
profiles/apparmor.d/lsb_release | 2 +-
.../profiles/extras/usr.bin.chromium-browser | 4 ++--
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/profiles/apparmor.d/abstractions/python b/profiles/apparmor.d/abstractions/python
index 1b5cc9d0d..727030bdf 100644
--- a/profiles/apparmor.d/abstractions/python
+++ b/profiles/apparmor.d/abstractions/python
@@ -12,18 +12,18 @@
abi <abi/3.0>,
- /usr/lib{,32,64}/python{2.[4-7],3.[0-9]}/**.{pyc,so} mr,
- /usr/lib{,32,64}/python{2.[4-7],3.[0-9]}/**.{egg,py,pth} r,
- /usr/lib{,32,64}/python{2.[4-7],3.[0-9]}/{site,dist}-packages/ r,
+ /usr/lib{,32,64}/python{2.[4-7],3.[0-9],3.1[0-9]}/**.{pyc,so} mr,
+ /usr/lib{,32,64}/python{2.[4-7],3.[0-9],3.1[0-9]}/**.{egg,py,pth} r,
+ /usr/lib{,32,64}/python{2.[4-7],3.[0-9],3.1[0-9]}/{site,dist}-packages/ r,
/usr/lib{,32,64}/python3.[0-9]/lib-dynload/*.so mr,
- /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9]}/**.{pyc,so} mr,
- /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9]}/**.{egg,py,pth} r,
- /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9]}/{site,dist}-packages/ r,
- /usr/local/lib{,32,64}/python3.[0-9]/lib-dynload/*.so mr,
+ /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9],3.1[0-9]}/**.{pyc,so} mr,
+ /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9],3.1[0-9]}/**.{egg,py,pth} r,
+ /usr/local/lib{,32,64}/python{2.[4-7],3,3.[0-9],3.1[0-9]}/{site,dist}-packages/ r,
+ /usr/local/lib{,32,64}/python3.{1,}[0-9]/lib-dynload/*.so mr,
# Site-wide configuration
- /etc/python{2.[4-7],3.[0-9]}/** r,
+ /etc/python{2.[4-7],3.[0-9],3.1[0-9]}/** r,
# shared python paths
/usr/share/{pyshared,pycentral,python-support}/** r,
@@ -36,7 +36,7 @@
/usr/lib/wx/python/*.pth r,
# python build configuration and headers
- /usr/include/python{2.[4-7],3.[0-9]}*/pyconfig.h r,
+ /usr/include/python{2.[4-7],3.[0-9],3.1[0-9]}*/pyconfig.h r,
# Include additions to the abstraction
include if exists <abstractions/python.d>
diff --git a/profiles/apparmor.d/lsb_release b/profiles/apparmor.d/lsb_release
index 33a1c71db..ad8b998fc 100644
--- a/profiles/apparmor.d/lsb_release
+++ b/profiles/apparmor.d/lsb_release
@@ -18,7 +18,7 @@ profile lsb_release {
/dev/tty rw,
/usr/bin/lsb_release r,
- /usr/bin/python3.[0-9] mr,
+ /usr/bin/python3.{1,}[0-9] mr,
/etc/debian_version r,
/etc/default/apport r,
diff --git a/profiles/apparmor/profiles/extras/usr.bin.chromium-browser b/profiles/apparmor/profiles/extras/usr.bin.chromium-browser
index 2df5338db..b47b6f721 100644
--- a/profiles/apparmor/profiles/extras/usr.bin.chromium-browser
+++ b/profiles/apparmor/profiles/extras/usr.bin.chromium-browser
@@ -267,9 +267,9 @@ profile chromium_browser /usr/lib/@{chromium}/@{chromium} flags=(attach_disconne
/usr/share/distro-info/** r,
/var/lib/dpkg/** r,
- /usr/local/lib/python3.[0-9]/dist-packages/ r,
+ /usr/local/lib/python3.{1,}[0-9]/dist-packages/ r,
/usr/bin/ r,
- /usr/bin/python3.[0-9] mr,
+ /usr/bin/python3.{1,}[0-9] mr,
}
profile sandbox {
--
GitLab

View file

@ -1,13 +0,0 @@
distutils is deprecated in python 3.10, which means it imports but prints warnings
--- a/libraries/libapparmor/m4/ac_python_devel.m4
+++ b/libraries/libapparmor/m4/ac_python_devel.m4
@@ -69,7 +69,7 @@
# Check if you have distutils, else fail
#
AC_MSG_CHECKING([for the distutils Python package])
- ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
+ ac_distutils_result=`$PYTHON -W ignore -c "import distutils" 2>&1`
if test -z "$ac_distutils_result"; then
AC_MSG_RESULT([yes])
else

View file

@ -1,15 +1,16 @@
# Template file for 'apparmor'
pkgname=apparmor
version=3.0.3
revision=4
version=3.1.2
revision=1
build_wrksrc=libraries/libapparmor
build_style=gnu-configure
conf_files="/etc/apparmor.d/local/* /etc/apparmor/*"
make_dirs="/etc/apparmor.d/disable 0755 root root"
hostmakedepends="bison flex autoconf automake libtool gettext swig python3 which"
hostmakedepends="bison flex autoconf automake libtool gettext swig python3 which
python3-setuptools"
makedepends="perl python3-devel"
depends="runit-void-apparmor libapparmor-${version}_${revision} python3-notify2
python3-psutil python3-dbus iproute2 which"
python3-psutil python3-dbus iproute2"
checkdepends="dejagnu"
short_desc="Mandatory access control to restrict programs"
maintainer="Michal Vasilek <michal@vasilek.cz>"
@ -17,7 +18,7 @@ license="GPL-2.0-only"
homepage="https://gitlab.com/apparmor/apparmor"
changelog="https://gitlab.com/apparmor/apparmor/-/wikis/Release_Notes_${version}"
distfiles="https://gitlab.com/apparmor/apparmor/-/archive/v${version}/apparmor-v${version}.tar.gz"
checksum=51b1db60e962dd01856a1ec6a9d43b11ed4350dcc5738ef901097c999bcbf50e
checksum=e7c7c4bc3a05a074322f9a19232c925b37e9a23dffa66d764dc27ebb82f0462c
replaces="apparmor-vim>=0"
if [ -z "$CROSS_BUILD" ]; then
@ -63,6 +64,8 @@ post_install() {
# we installed a custom conflicting profile
rm ${DESTDIR}/etc/apparmor.d/{,local/}php-fpm
vinstall utils/aa-notify.desktop 644 usr/share/applications
}
libapparmor_package() {