Add AppArmor profiles for addpkg and delpkg scripts
This commit is contained in:
parent
5dca985412
commit
d5a79a00ec
8
PKGBUILD
8
PKGBUILD
@ -1,6 +1,6 @@
|
||||
# Maintainer: Eric Torres <erictorres4@protonmail.com>
|
||||
pkgname=packaging-scripts
|
||||
pkgver=1.1
|
||||
pkgver=1.1.1
|
||||
pkgrel=1
|
||||
pkgdesc="A set of helper scripts for handling Arch Linux packages"
|
||||
arch=('any')
|
||||
@ -10,6 +10,7 @@ depends=('pacman' 'python')
|
||||
makedepends=('git' 'python-setuptools')
|
||||
optdepends=('fzf: for the fqo script'
|
||||
'mlocate: for the fqo script')
|
||||
backup=(etc/apparmor.d/usr.bin.{addpkg,delpkg})
|
||||
source=("git+file:///home/etorres/Projects/packaging-scripts")
|
||||
sha256sums=('SKIP')
|
||||
sha512sums=('SKIP')
|
||||
@ -27,6 +28,11 @@ package() {
|
||||
# install README
|
||||
install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst"
|
||||
|
||||
# install AppArmor profiles
|
||||
for profile in misc/apparmor/*; do
|
||||
install -Dm644 "${profile}" "${pkgdir}/etc/apparmor.d/${profile##*/}"
|
||||
done
|
||||
|
||||
# install zsh completions
|
||||
install -d "${pkgdir}/usr/share/zsh/site-functions"
|
||||
for completion in packaging_scripts/zsh-completions/*; do
|
||||
|
17
misc/apparmor/usr.bin.addpkg
Normal file
17
misc/apparmor/usr.bin.addpkg
Normal file
@ -0,0 +1,17 @@
|
||||
#include <tunables/global>
|
||||
|
||||
/usr/bin/addpkg {
|
||||
#include <abstractions/base>
|
||||
#include <abstractions/bash>
|
||||
#include <abstractions/python>
|
||||
|
||||
/usr/bin/repo-add Ux,
|
||||
|
||||
/etc/pacman.conf r,
|
||||
/etc/pacman.d/ r,
|
||||
/etc/pacman.d/** r,
|
||||
/home/*/{Packages,Projects} r,
|
||||
/home/*/{Packages,Projects}/** rw,
|
||||
/var/cache/pacman/ r,
|
||||
/var/cache/pacman/** rw,
|
||||
}
|
17
misc/apparmor/usr.bin.delpkg
Normal file
17
misc/apparmor/usr.bin.delpkg
Normal file
@ -0,0 +1,17 @@
|
||||
#include <tunables/global>
|
||||
|
||||
/usr/bin/delpkg {
|
||||
#include <abstractions/base>
|
||||
#include <abstractions/bash>
|
||||
#include <abstractions/python>
|
||||
|
||||
/usr/bin/repo-remove Ux,
|
||||
|
||||
/etc/pacman.conf r,
|
||||
/etc/pacman.d/ r,
|
||||
/etc/pacman.d/** r,
|
||||
/home/*/{Packages,Projects} r,
|
||||
/home/*/{Packages,Projects}/** rw,
|
||||
/var/cache/pacman/ r,
|
||||
/var/cache/pacman/** rw,
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user