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>
|
# Maintainer: Eric Torres <erictorres4@protonmail.com>
|
||||||
pkgname=packaging-scripts
|
pkgname=packaging-scripts
|
||||||
pkgver=1.1
|
pkgver=1.1.1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="A set of helper scripts for handling Arch Linux packages"
|
pkgdesc="A set of helper scripts for handling Arch Linux packages"
|
||||||
arch=('any')
|
arch=('any')
|
||||||
@ -10,6 +10,7 @@ depends=('pacman' 'python')
|
|||||||
makedepends=('git' 'python-setuptools')
|
makedepends=('git' 'python-setuptools')
|
||||||
optdepends=('fzf: for the fqo script'
|
optdepends=('fzf: for the fqo script'
|
||||||
'mlocate: 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")
|
source=("git+file:///home/etorres/Projects/packaging-scripts")
|
||||||
sha256sums=('SKIP')
|
sha256sums=('SKIP')
|
||||||
sha512sums=('SKIP')
|
sha512sums=('SKIP')
|
||||||
@ -27,6 +28,11 @@ package() {
|
|||||||
# install README
|
# install README
|
||||||
install -Dm644 README.rst "${pkgdir}/usr/share/doc/${pkgname}/README.rst"
|
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 zsh completions
|
||||||
install -d "${pkgdir}/usr/share/zsh/site-functions"
|
install -d "${pkgdir}/usr/share/zsh/site-functions"
|
||||||
for completion in packaging_scripts/zsh-completions/*; do
|
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,
|
||||||
|
}
|
2
setup.py
2
setup.py
@ -5,7 +5,7 @@ with open("README.rst", "r") as fh:
|
|||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name="packaging_scripts",
|
name="packaging_scripts",
|
||||||
version="1.1",
|
version="1.1.1",
|
||||||
author="Eric Russel Torres",
|
author="Eric Russel Torres",
|
||||||
author_email="erictorres4@protonmail.com",
|
author_email="erictorres4@protonmail.com",
|
||||||
description="A set of helpers for automating borg interaction",
|
description="A set of helpers for automating borg interaction",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user