[arch-commits] Commit in apparmor/repos/extra-x86_64 (4 files)
David Runge
dvzrv at archlinux.org
Tue Dec 8 10:25:38 UTC 2020
Date: Tuesday, December 8, 2020 @ 10:25:38
Author: dvzrv
Revision: 403094
archrelease: copy trunk to extra-x86_64
Added:
apparmor/repos/extra-x86_64/PKGBUILD
(from rev 403093, apparmor/trunk/PKGBUILD)
apparmor/repos/extra-x86_64/apparmor-3.0.1-python_ldflags.patch
(from rev 403093, apparmor/trunk/apparmor-3.0.1-python_ldflags.patch)
Deleted:
apparmor/repos/extra-x86_64/PKGBUILD
apparmor/repos/extra-x86_64/apparmor-3.0.0-utils_test.patch
-------------------------------------+
PKGBUILD | 284 +++++++++++++++++-----------------
apparmor-3.0.0-utils_test.patch | 12 -
apparmor-3.0.1-python_ldflags.patch | 12 +
3 files changed, 156 insertions(+), 152 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2020-12-08 10:25:30 UTC (rev 403093)
+++ PKGBUILD 2020-12-08 10:25:38 UTC (rev 403094)
@@ -1,140 +0,0 @@
-# Maintainer: David Runge <dvzrv at archlinux.org>
-
-pkgname=apparmor
-pkgver=3.0.0
-pkgrel=3
-pkgdesc="Mandatory Access Control (MAC) using Linux Security Module (LSM)"
-arch=('x86_64')
-url="https://gitlab.com/apparmor/apparmor"
-license=('GPL2' 'LGPL2.1')
-depends=('audit' 'glibc' 'pam' 'python')
-makedepends=('apache' 'libxcrypt' 'ruby' 'swig')
-checkdepends=('dejagnu' 'perl-locale-gettext' 'python-notify2' 'python-psutil')
-optdepends=('perl: for perl bindings'
- 'python-notify2: for aa-notify'
- 'python-psutil: for aa-notify'
- 'ruby: for ruby bindings')
-provides=('libapparmor.so')
-backup=('etc/apparmor/easyprof.conf'
- 'etc/apparmor/logprof.conf'
- 'etc/apparmor/notify.conf'
- 'etc/apparmor/parser.conf'
- 'etc/apparmor/subdomain.conf'
- 'etc/apparmor/severity.db')
-source=("https://launchpad.net/${pkgname}/${pkgver%.[0-9]}/${pkgver%.[0-9]}/+download/${pkgname}-${pkgver}.tar.gz"{,.asc}
- "${pkgname}-3.0.0-utils_test.patch")
-sha512sums=('2465a8bc400e24e548b0589b7b022fb8325c53858429b9c54204f989d5589d7bd99c9507bde88a48f9965a55edcbac98efeeb6b93aeefe6a27afa0b7e851aea6'
- 'SKIP'
- 'cc2048d9d43a15e7f429e022b352e15a023865f0e5babdec28eec943144ef2838b882d130bee4d40198b9c1b6dbb52f7ed6dc92f5824f8c5b18c3ebe46829149')
-# AppArmor Development Team (AppArmor signing key) <apparmor at lists.ubuntu.com>
-validpgpkeys=('3ECDCBA5FB34D254961CC53F6689E64E3D3664BB')
-_core_perl="/usr/bin/core_perl"
-
-prepare() {
- cd "${pkgname}-${pkgver}"
- # fix issue with test trying to access /var/log/wtmp
- # https://gitlab.com/apparmor/apparmor/-/issues/120
- patch -Np1 -i "../${pkgname}-3.0.0-utils_test.patch"
-
- # fix PYTHONPATH and add LD_LIBRARY_PATH for aa-logprof based check:
- # https://gitlab.com/apparmor/apparmor/issues/39
- local _py3_ver=$(python --version | cut -d " " -f2)
- local path="${PWD}/libraries/libapparmor/swig/python/build/lib.linux-${CARCH}-${_py3_ver%"."*}/LibAppArmor"
- local libs="${PWD}/libraries/libapparmor/src/.libs"
- sed -e "/PYTHONPATH/ s|utils\ |utils:$path\ LD_LIBRARY_PATH=$libs\ |" \
- -i profiles/Makefile
- (
- cd libraries/libapparmor/
- autoreconf -vfi
- )
-}
-
-build() {
- cd "${pkgname}-${pkgver}"
- # export required perl executable locations
- export MAKEFLAGS+=" POD2MAN=${_core_perl}/pod2man"
- export MAKEFLAGS+=" POD2HTML=${_core_perl}/pod2html"
- export MAKEFLAGS+=" PODCHECKER=${_core_perl}/podchecker"
- export MAKEFLAGS+=" PROVE=${_core_perl}/prove"
- (
- cd "libraries/libapparmor/"
- ./configure --prefix=/usr \
- --sbindir=/usr/bin \
- --with-perl \
- --with-python \
- --with-ruby
- make
- )
- make -C binutils
- make -C parser
- make -C profiles
- make -C utils
- make -C changehat/pam_apparmor
- make -C changehat/mod_apparmor
- make -C utils/vim
-}
-
-check() {
- cd "$pkgname-$pkgver"
- echo "INFO: Running check: libraries/libapparmor"
- make -C libraries/libapparmor check
- echo "INFO: Running check binutils"
- make -C binutils check
- echo "INFO: Running check parser"
- make -C parser check
-
- # check-logprof (included in check) fails:
- # https://gitlab.com/apparmor/apparmor/issues/36
- # echo "INFO: Running check-logprof profiles"
- # make -C profiles check-logprof
-
- echo "INFO: Running check-parser profiles"
- make -C profiles check-parser
- echo "INFO: Running check utils"
- # we do not care about linting when running tests
- # https://gitlab.com/apparmor/apparmor/-/issues/121
- make PYFLAKES='/usr/bin/true' -C utils check
-}
-
-package() {
- depends+=('libcrypt.so')
- cd "$pkgname-$pkgver"
- make -C libraries/libapparmor DESTDIR="${pkgdir}" install
- make -C changehat/pam_apparmor DESTDIR="${pkgdir}/usr" install
- make -C changehat/mod_apparmor DESTDIR="${pkgdir}" install
- make -C binutils DESTDIR="${pkgdir}" \
- SBINDIR="${pkgdir}/usr/bin" \
- USR_SBINDIR="${pkgdir}/usr/bin" \
- install
- make -C parser -j1 DESTDIR="${pkgdir}" \
- SBINDIR="${pkgdir}/usr/bin" \
- USR_SBINDIR="${pkgdir}/usr/bin" \
- APPARMOR_BIN_PREFIX="${pkgdir}/usr/lib/apparmor" \
- install install-systemd
- make -C profiles DESTDIR="${pkgdir}" install
- make -C utils DESTDIR="${pkgdir}" \
- SBINDIR="${pkgdir}/usr/bin" \
- USR_SBINDIR="${pkgdir}/usr/bin" \
- BINDIR="${pkgdir}/usr/bin" \
- VIM_INSTALL_PATH="${pkgdir}/usr/share/vim/vimfiles/syntax" \
- install
-
- # set file mode to allow the perl library to be stripped:
- # https://gitlab.com/apparmor/apparmor/issues/34
- find "${pkgdir}/usr/lib/perl5/" \
- -type f -iname "*.so" \
- -exec chmod 755 {} \;
-
- # removing empty core_perl directory:
- # https://gitlab.com/apparmor/apparmor/issues/40
- rm -rv "${pkgdir}"/usr/lib/perl5/*/core_perl
- # move ruby bindings to vendor_ruby:
- # https://gitlab.com/apparmor/apparmor/issues/35
- mv -v "${pkgdir}/usr/lib/ruby/site_ruby/" \
- "${pkgdir}/usr/lib/ruby/vendor_ruby/"
- # adding files below /etc/apparmor.d to backup array
- cd "${pkgdir}"
- # trick extract_function_variable() in makepkg into not detecting the
- # backup array modification and adding remaining configuration files
- [[ /usr/bin/true ]] && backup=( ${backup[@]} $(find "etc/${pkgname}.d/" -type f) )
-}
Copied: apparmor/repos/extra-x86_64/PKGBUILD (from rev 403093, apparmor/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2020-12-08 10:25:38 UTC (rev 403094)
@@ -0,0 +1,144 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+pkgname=apparmor
+pkgver=3.0.1
+pkgrel=1
+pkgdesc="Mandatory Access Control (MAC) using Linux Security Module (LSM)"
+arch=('x86_64')
+url="https://gitlab.com/apparmor/apparmor"
+license=('GPL2' 'LGPL2.1')
+depends=('audit' 'glibc' 'pam' 'python')
+makedepends=('apache' 'libxcrypt' 'ruby' 'swig')
+checkdepends=('dejagnu' 'perl-locale-gettext' 'python-notify2' 'python-psutil')
+optdepends=('perl: for perl bindings'
+ 'python-notify2: for aa-notify'
+ 'python-psutil: for aa-notify'
+ 'ruby: for ruby bindings')
+provides=('libapparmor.so')
+backup=('etc/apparmor/easyprof.conf'
+ 'etc/apparmor/logprof.conf'
+ 'etc/apparmor/notify.conf'
+ 'etc/apparmor/parser.conf'
+ 'etc/apparmor/severity.db')
+source=("https://launchpad.net/${pkgname}/${pkgver%.[0-9]}/${pkgver}/+download/${pkgname}-${pkgver}.tar.gz"{,.asc}
+ "${pkgname}-3.0.1-python_ldflags.patch"
+)
+sha512sums=('e1073e7b2cde7cc4cefcfddce8fa5069845b5873c260b9fbd4bea2ff801708101d813ff30e23a64da36f3c6394cd9339e01a170e9add69deef2d70ecd9ed9687'
+ 'SKIP'
+ '04d313c5fd95e975e1df9313869166d7318560fc83218d8b0ae7c17fed31883d4a5f3334b3ad28d22864a1ac41a3ac846a38fbc6c59fec3bc6b111ddb0015890')
+b2sums=('c530d159a4139de8e59d9d975af866259b56d555e3abe2d1e2a6bfd2db57d8371d643bb93f1cd6ca96172960c09a74cc05c82d34a2e253c4c1f6ecce747f4129'
+ 'SKIP'
+ '0ba81da585d4aca8cf88c08e8350e35d84b2675d53d0f435bb309fc875ddcfd3245740494da24502d5ef77be13e63863d35c04461c4e6dd8ce3ef48e69b4536b')
+validpgpkeys=('3ECDCBA5FB34D254961CC53F6689E64E3D3664BB') # AppArmor Development Team (AppArmor signing key) <apparmor at lists.ubuntu.com>
+_core_perl="/usr/bin/core_perl"
+
+prepare() {
+ cd "${pkgname}-${pkgver}"
+
+ # add missing LDFLAGS for python library
+ # https://gitlab.com/apparmor/apparmor/-/issues/129
+ patch -Np1 -i ../"${pkgname}-3.0.1-python_ldflags.patch"
+
+ # fix PYTHONPATH and add LD_LIBRARY_PATH for aa-logprof based check:
+ # https://gitlab.com/apparmor/apparmor/issues/39
+ local _py3_ver=$(python --version | cut -d " " -f2)
+ local path="${PWD}/libraries/libapparmor/swig/python/build/lib.linux-${CARCH}-${_py3_ver%"."*}/LibAppArmor"
+ local libs="${PWD}/libraries/libapparmor/src/.libs"
+ sed -e "/PYTHONPATH/ s|utils\ |utils:$path\ LD_LIBRARY_PATH=$libs\ |" \
+ -i profiles/Makefile
+ (
+ cd libraries/libapparmor/
+ autoreconf -vfi
+ )
+}
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ # export required perl executable locations
+ export MAKEFLAGS+=" POD2MAN=${_core_perl}/pod2man"
+ export MAKEFLAGS+=" POD2HTML=${_core_perl}/pod2html"
+ export MAKEFLAGS+=" PODCHECKER=${_core_perl}/podchecker"
+ export MAKEFLAGS+=" PROVE=${_core_perl}/prove"
+ (
+ cd "libraries/libapparmor/"
+ ./configure --prefix=/usr \
+ --sbindir=/usr/bin \
+ --with-perl \
+ --with-python \
+ --with-ruby
+ make
+ )
+ make -C binutils
+ make -C parser
+ make -C profiles
+ make -C utils
+ make -C changehat/pam_apparmor
+ make -C changehat/mod_apparmor
+ make -C utils/vim
+}
+
+check() {
+ cd "$pkgname-$pkgver"
+ echo "INFO: Running check: libraries/libapparmor"
+ make -C libraries/libapparmor check
+ echo "INFO: Running check binutils"
+ make -C binutils check
+ echo "INFO: Running check parser"
+ make -C parser check
+ # NOTE: the profiles checks are notoriously broken, so run each separately
+ echo "INFO: Running check-abstractions.d profiles"
+ make -C profiles check-abstractions.d
+# # many hardcoded paths are not accounted for:
+# # https://gitlab.com/apparmor/apparmor/-/issues/137
+# echo "INFO: Running check-logprof profiles"
+# make -C profiles check-logprof
+ echo "INFO: Running check-parser profiles"
+ make -C profiles check-parser
+ echo "INFO: Running check utils"
+ # we do not care about linting when running tests
+ # https://gitlab.com/apparmor/apparmor/-/issues/121
+ make PYFLAKES='/usr/bin/true' -C utils check
+}
+
+package() {
+ depends+=('libcrypt.so')
+ cd "$pkgname-$pkgver"
+ make -C libraries/libapparmor DESTDIR="${pkgdir}" install
+ make -C changehat/pam_apparmor DESTDIR="${pkgdir}/usr" install
+ make -C changehat/mod_apparmor DESTDIR="${pkgdir}" install
+ make -C binutils DESTDIR="${pkgdir}" \
+ SBINDIR="${pkgdir}/usr/bin" \
+ USR_SBINDIR="${pkgdir}/usr/bin" \
+ install
+ make -C parser -j1 DESTDIR="${pkgdir}" \
+ SBINDIR="${pkgdir}/usr/bin" \
+ USR_SBINDIR="${pkgdir}/usr/bin" \
+ APPARMOR_BIN_PREFIX="${pkgdir}/usr/lib/apparmor" \
+ install install-systemd
+ make -C profiles DESTDIR="${pkgdir}" install
+ make -C utils DESTDIR="${pkgdir}" \
+ SBINDIR="${pkgdir}/usr/bin" \
+ USR_SBINDIR="${pkgdir}/usr/bin" \
+ BINDIR="${pkgdir}/usr/bin" \
+ VIM_INSTALL_PATH="${pkgdir}/usr/share/vim/vimfiles/syntax" \
+ install
+
+ # set file mode to allow the perl library to be stripped:
+ # https://gitlab.com/apparmor/apparmor/issues/34
+ find "${pkgdir}/usr/lib/perl5/" \
+ -type f -iname "*.so" \
+ -exec chmod 755 {} \;
+
+ # removing empty core_perl directory:
+ # https://gitlab.com/apparmor/apparmor/issues/40
+ rm -rv "${pkgdir}"/usr/lib/perl5/*/core_perl
+ # move ruby bindings to vendor_ruby:
+ # https://gitlab.com/apparmor/apparmor/issues/35
+ mv -v "${pkgdir}/usr/lib/ruby/site_ruby/" \
+ "${pkgdir}/usr/lib/ruby/vendor_ruby/"
+ # adding files below /etc/apparmor.d to backup array
+ cd "${pkgdir}"
+ # trick extract_function_variable() in makepkg into not detecting the
+ # backup array modification and adding remaining configuration files
+ [[ /usr/bin/true ]] && backup=( ${backup[@]} $(find "etc/${pkgname}.d/" -type f) )
+}
Deleted: apparmor-3.0.0-utils_test.patch
===================================================================
--- apparmor-3.0.0-utils_test.patch 2020-12-08 10:25:30 UTC (rev 403093)
+++ apparmor-3.0.0-utils_test.patch 2020-12-08 10:25:38 UTC (rev 403094)
@@ -1,12 +0,0 @@
-diff --git i/utils/test/test-aa-notify.py w/utils/test/test-aa-notify.py
-index 40dacd96..2484c7f9 100644
---- i/utils/test/test-aa-notify.py
-+++ w/utils/test/test-aa-notify.py
-@@ -189,6 +189,7 @@ optional arguments:
- result = 'Got output "%s", expected "%s"\n' % (output, expected_output_has)
- self.assertIn(expected_output_has, output, result + output)
-
-+ @unittest.skipUnless(os.path.isfile('/var/log/wtmp'), 'Requires wtmp on system')
- def test_entries_since_login(self):
- '''Test showing log entries since last login'''
-
Copied: apparmor/repos/extra-x86_64/apparmor-3.0.1-python_ldflags.patch (from rev 403093, apparmor/trunk/apparmor-3.0.1-python_ldflags.patch)
===================================================================
--- apparmor-3.0.1-python_ldflags.patch (rev 0)
+++ apparmor-3.0.1-python_ldflags.patch 2020-12-08 10:25:38 UTC (rev 403094)
@@ -0,0 +1,12 @@
+diff -ruN a/libraries/libapparmor/swig/python/Makefile.am b/libraries/libapparmor/swig/python/Makefile.am
+--- a/libraries/libapparmor/swig/python/Makefile.am 2020-12-02 12:01:37.000000000 +0100
++++ b/libraries/libapparmor/swig/python/Makefile.am 2020-12-08 10:11:44.473385992 +0100
+@@ -14,7 +14,7 @@
+
+ all-local: libapparmor_wrap.c setup.py
+ if test ! -f libapparmor_wrap.c; then cp $(srcdir)/libapparmor_wrap.c . ; fi
+- CC="$(CC)" CFLAGS="$(PYTHON_CPPFLAGS) $(EXTRA_WARNINGS)" LDSHARED="$(CC) -shared" LDFLAGS="$(PYTHON_LDFLAGS)" $(PYTHON) setup.py build
++ CC="$(CC)" CFLAGS="$(PYTHON_CPPFLAGS) $(EXTRA_WARNINGS)" LDSHARED="$(CC) -shared" LDFLAGS="$(PYTHON_LDFLAGS) $(LDFLAGS)" $(PYTHON) setup.py build
+
+ install-exec-local:
+ $(PYTHON) setup.py install --root="/$(DESTDIR)" --prefix="$(prefix)"
More information about the arch-commits
mailing list