summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pcr/apparmor/PKGBUILD64
1 files changed, 33 insertions, 31 deletions
diff --git a/pcr/apparmor/PKGBUILD b/pcr/apparmor/PKGBUILD
index 8f81b952f..6bad6a5a0 100644
--- a/pcr/apparmor/PKGBUILD
+++ b/pcr/apparmor/PKGBUILD
@@ -1,5 +1,5 @@
# Maintainer: David P. <megver83@parabola.nu>
-# Contributor: Gordian Edenhofer <gordian.edenhofer@gmail.com>
+# Maintainer (AUR): Gordian Edenhofer <gordian.edenhofer@gmail.com>
# Contributor: Marcin Wieczorek <marcin@marcin.co>
# Contributor: Thomas Kuther <archlinux@kuther.net>
# Contributor: Gianni Vialetto <gianni at rootcube dot net>
@@ -9,23 +9,23 @@
pkgbase=apparmor
pkgname=("${pkgbase}" 'apparmor-parser' 'apparmor-libapparmor' 'apparmor-utils' 'apparmor-profiles' 'apparmor-pam' 'apparmor-vim')
-_pkgbasever=2.11
-pkgver="${_pkgbasever}.1"
+pkgver=2.12.0
+_majorver="$(expr "${pkgver}" : '\([0-9]*\.[0-9]*\)\.')"
pkgrel=1
pkgdesc='Linux application security framework - mandatory access control for programs'
arch=('i686' 'x86_64')
-url='http://wiki.apparmor.net/index.php/Main_Page'
+url='https://launchpad.net/apparmor'
license=('GPL')
makedepends=('flex' 'swig' 'perl' 'python' 'perl-locale-gettext' 'perl-rpc-xml' 'audit')
-source=("https://launchpad.net/${pkgbase}/${_pkgbasever}/${pkgver}/+download/${pkgbase}-${pkgver}.tar.gz"{,.asc}
- "apparmor_load.sh"
- "apparmor_unload.sh"
- "apparmor.service")
-sha512sums=('f088157cc116987e56c0e02127497b1ec6241f3d761ec3b53211fa188f5f02c9408d6b903f2d275328ede88ebfd1393e00aad9f68cbe78fa9ab3711ba0f9c00c'
+source=("https://launchpad.net/${pkgbase}/${_majorver}/${pkgver}/+download/${pkgbase}-${_majorver}.tar.gz"{,.asc}
+ "apparmor.systemd"
+ "aa-teardown"
+ "apparmor.service")
+sha512sums=('d85fd47c66333fe5658ee5e977b32142697f6e36c575550712ee2ace2ad0fbf2aa59c8fd3b82ad8821c0190adf8cc150cf623ea09a84d5b32bde050a03dd6e9a'
'SKIP'
- 'ae9598c2f7c7e04697ef542ef09b816eff0cdb32182a133769760d0669cdceb7ebf896f7c0523d6499394d2ac20d2d3ddec2189ead7ea3d98534c7b9fccdae25'
- '9f729a2d838cc48065ba3758b4c021e9ab57210a351724cc1a96819169d3f08efba13469483227f5bb482e5f4ea6a48f8cb682996716137e0c1fd0876b2b9a2d'
- 'a288614318b35ac5ed50897d6064ee4c81f3f1628e171c6b5229261045d4b31aa977795584f7ed2753170ae8ce023ef7dafeb38fd12f07ab35ba78d020972b5b')
+ '5fc5135ffae07c4cfa125c819b67ea812626e13201fde70d15c0d7b09bceadbd4cea9383b8af07c871173fb4d273edb4bbe926871d674565a19958cc08ac9d3a'
+ '47666085482c899d64f73109d50eacd704db33b1726f985edfed0319326e147df177d9cc4cd7d3f45bb7bed348f8fedd03374fc53dde2a42a12c899b88d5ce6b'
+ 'e7bfb69d6f98842caba1da9790b14b9368b1e5c65fc726e8226e776c8d42f06c0c051329e048a994d06908a365ad3c078745b7d09376d29639e9175b2c2b4c0d')
validpgpkeys=(
'3ECDCBA5FB34D254961CC53F6689E64E3D3664BB' # AppArmor Development Team
)
@@ -39,11 +39,11 @@ export MAKEFLAGS+=" PROVE=${_core_perl_dir}/prove"
export MAKEFLAGS+=" PYTHON=python3"
prepare() {
- cd "${srcdir}/${pkgbase}-${pkgver}/parser"
+ cd "${srcdir}/${pkgbase}-${_majorver}/parser"
# Skip compiling LaTex documents and hence avoid an additional dependency on texlive-latex
sed -i -e 's/pdflatex/true/g' Makefile
- cd "${srcdir}/${pkgbase}-${pkgver}/utils"
+ cd "${srcdir}/${pkgbase}-${_majorver}/utils"
# Adapt logprof paths to Arch Linux defaults
sed -e '/logfiles/ s/syslog /syslog.log /g' \
-e '/logfiles/ s/messages/messages.log/g' \
@@ -53,7 +53,7 @@ prepare() {
# becuase of false references to $srcdir and non-default file locations
sed -i '/vim/d' Makefile
- cd "${srcdir}/${pkgbase}-${pkgver}/profiles/apparmor.d"
+ cd "${srcdir}/${pkgbase}-${_majorver}/profiles/apparmor.d"
# Adapt profile names to Arch linux defaults
find . -name "*sbin*" -print0 | while read -r -d $'\0' i; do
sed -i -e 's@sbin@bin@g' "${i}"
@@ -68,7 +68,7 @@ prepare() {
}
build() {
- cd "${srcdir}/${pkgbase}-${pkgver}/libraries/libapparmor"
+ cd "${srcdir}/${pkgbase}-${_majorver}/libraries/libapparmor"
unset PERL_MM_OPT
NOCONFIGURE=1 ./autogen.sh
./configure \
@@ -78,7 +78,7 @@ build() {
--with-python
make
- cd "${srcdir}/${pkgbase}-${pkgver}"
+ cd "${srcdir}/${pkgbase}-${_majorver}"
make -C parser
@@ -94,17 +94,18 @@ build() {
package_apparmor() {
pkgdesc='Linux application security framework - mandatory access control for programs (metapackage)'
depends=('apparmor-parser' 'apparmor-libapparmor' 'apparmor-utils' 'apparmor-profiles' 'apparmor-pam' 'apparmor-vim')
- optdepends=('linux-libre-lts-apparmor: a LTS kernel with AppArmor enabled'
- 'linux-libre-xtreme: a mainline kernel with AppArmor enabled'
+ optdepends=('linux-libre-lts-xtreme: an LTS kernel with AppArmor enabled'
+ 'linux-libre-xtreme: a stable kernel with AppArmor enabled'
'apparmor-openrc: OpenRC init script')
- install='apparmor.install'
+ install='apparmor.install'
}
package_apparmor-parser() {
pkgdesc='AppArmor parser - loads AA profiles to kernel module'
depends=('apparmor-libapparmor')
+ backup=('etc/apparmor/parser.conf' 'etc/apparmor/subdomain.conf')
- cd "${srcdir}/${pkgbase}-${pkgver}"
+ cd "${srcdir}/${pkgbase}-${_majorver}"
make -C parser DESTDIR="${pkgdir}" install
mv "${pkgdir}/lib" "${pkgdir}/usr/lib"
mv "${pkgdir}/sbin" "${pkgdir}/usr/bin"
@@ -115,7 +116,7 @@ package_apparmor-libapparmor() {
makedepends=('swig' 'perl' 'python')
depends=('python')
- cd "${srcdir}/${pkgbase}-${pkgver}"
+ cd "${srcdir}/${pkgbase}-${_majorver}"
make -C libraries/libapparmor DESTDIR="${pkgdir}" install
install -D -m644 "libraries/libapparmor/swig/perl/LibAppArmor.pm" "${pkgdir}/${_vendorarch_perl_dir}"
}
@@ -123,24 +124,25 @@ package_apparmor-libapparmor() {
package_apparmor-utils() {
pkgdesc='AppArmor userspace utilities'
depends=('perl' 'perl-locale-gettext' 'perl-term-readkey' 'perl-file-tail' 'perl-rpc-xml' 'python')
+ backup=('etc/apparmor/easyprof.conf' 'etc/apparmor/logprof.conf' 'etc/apparmor/notify.conf' 'etc/apparmor/severity.db')
- cd "${srcdir}/${pkgbase}-${pkgver}"
+ cd "${srcdir}/${pkgbase}-${_majorver}"
make -C utils DESTDIR="${pkgdir}" BINDIR="${pkgdir}/usr/bin" install
- install -D -m755 "${srcdir}/apparmor_load.sh" "${pkgdir}/usr/bin/apparmor_load.sh"
- install -D -m755 "${srcdir}/apparmor_unload.sh" "${pkgdir}/usr/bin/apparmor_unload.sh"
+ install -D -m755 "${srcdir}/apparmor.systemd" "${pkgdir}/usr/lib/apparmor/apparmor.systemd"
+ install -D -m755 "${srcdir}/aa-teardown" "${pkgdir}/usr/bin/aa-teardown"
install -D -m644 "${srcdir}/apparmor.service" "${pkgdir}/usr/lib/systemd/system/apparmor.service"
}
package_apparmor-profiles() {
- pkgdesc='AppArmor sample pre-made profiles'
+ pkgdesc='AppArmor sample pre-made profiles, without profiles for nonfree software'
depends=('apparmor-parser')
# Add default profiles to the backup array
- cd "${srcdir}/${pkgbase}-${pkgver}/profiles/apparmor.d"
+ cd "${srcdir}/${pkgbase}-${_majorver}/profiles/apparmor.d"
# Without the PKGBUILD check the following command would confuse `makepkg --printsrcinfo`
[[ -f "./PKGBUILD" ]] || backup=($(find . -type f | sed 's@./@etc/apparmor.d/@'))
- cd "${srcdir}/${pkgbase}-${pkgver}"
+ cd "${srcdir}/${pkgbase}-${_majorver}"
make -C profiles DESTDIR="${pkgdir}" install
# Remove profiles for non-FSDG software
@@ -151,7 +153,7 @@ package_apparmor-profiles() {
${pkgdir}/usr/share/apparmor/extra-profiles/usr.bin.{opera,skype}
# Adapt firefox profiles for iceweasel
- # Do this really works? Many files and dirs that I don't see . . .
+ # Does this really works? Many files and dirs that I don't see . . .
cd ${pkgdir}/usr/share/apparmor/extra-profiles/
mv usr.lib.firefox.firefox usr.lib.iceweasel.iceweasel
mv usr.lib.firefox.firefox.sh usr.lib.iceweasel.iceweasel.sh
@@ -162,7 +164,7 @@ package_apparmor-pam() {
pkgdesc='AppArmor PAM library'
depends=('apparmor-libapparmor' 'pam')
- cd "${srcdir}/${pkgbase}-${pkgver}"
+ cd "${srcdir}/${pkgbase}-${_majorver}"
make -C changehat/pam_apparmor DESTDIR="${pkgdir}/usr" install
install -D -m644 changehat/pam_apparmor/README "${pkgdir}/usr/share/doc/apparmor/README.pam_apparmor"
}
@@ -171,6 +173,6 @@ package_apparmor-vim() {
pkgdesc='AppArmor VIM support'
depends=('vim')
- cd "${srcdir}/${pkgbase}-${pkgver}/utils/vim"
+ cd "${srcdir}/${pkgbase}-${_majorver}/utils/vim"
install -D -m644 apparmor.vim "${pkgdir}/usr/share/vim/vimfiles/syntax/apparmor.vim"
}