diff options
author | Timothée Ravier | 2013-11-03 19:42:41 +0100 |
---|---|---|
committer | Timothée Ravier | 2013-11-03 19:42:41 +0100 |
commit | f8d30c6378877a9ea071e64647bdb74f8845d2a8 (patch) | |
tree | 0e0a2b6ff0a7ed4525fcb17c79ce09578ef7f34f | |
download | aur-f8d30c6378877a9ea071e64647bdb74f8845d2a8.tar.gz |
General update: SELinux userspace & pkg renaming
-rw-r--r-- | .SRCINFO | 24 | ||||
-rw-r--r-- | PKGBUILD | 62 | ||||
-rw-r--r-- | restorecond.service | 12 |
3 files changed, 98 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ffdbf197d8af --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,24 @@ +pkgbase = policycoreutils + pkgdesc = SELinux policy core utilities + pkgver = 2.2.1 + pkgrel = 1 + url = http://userspace.selinuxproject.org + arch = i686 + arch = x86_64 + groups = selinux + license = GPL + depends = libsemanage>=2.2 + depends = libcgroup + depends = dbus-glib + depends = python2-ipy + depends = setools + depends = sepolgen + optdepends = hicolor-icon-theme: needed for graphical tools + options = !emptydirs + source = http://userspace.selinuxproject.org/releases/20131030/policycoreutils-2.2.1.tar.gz + source = restorecond.service + sha256sums = 102dbddcb1daaba7d55cbbb0843f7a9f1727d63a83e43e15edb77116115bf646 + sha256sums = 20572c2cc09c8af5239f26cfea3eb2648d87d9927e55791f13572ea2184e857e + +pkgname = policycoreutils + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..67562f8ec9b2 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,62 @@ +# Maintainer: Timothée Ravier <tim@siosm.fr> +# Contributor: Nicky726 (Nicky726 <at> gmail <dot> com) +# Contributor: Sergej Pupykin (pupykin <dot> s+arch <at> gmail <dot> com) +# Contributor: angelux/xangelux (xangelux <at> gmail <dot> com) + +pkgname=policycoreutils +pkgver=2.2.1 +pkgrel=1 +pkgdesc="SELinux policy core utilities" +arch=('i686' 'x86_64') +url='http://userspace.selinuxproject.org' +license=('GPL') +groups=('selinux') +depends=('libsemanage>=2.2' 'libcgroup' 'dbus-glib' 'python2-ipy' 'setools' + 'sepolgen') +optdepends=('hicolor-icon-theme: needed for graphical tools') +options=(!emptydirs) +source=("http://userspace.selinuxproject.org/releases/20131030/${pkgname}-${pkgver}.tar.gz" + 'restorecond.service') +sha256sums=('102dbddcb1daaba7d55cbbb0843f7a9f1727d63a83e43e15edb77116115bf646' + '20572c2cc09c8af5239f26cfea3eb2648d87d9927e55791f13572ea2184e857e') + +prepare() { + cd ${pkgname}-${pkgver} + +# sed -i -e "s/-Werror -Wall -W/-Werror -Wall -W ${CFLAGS}/" setfiles/Makefile +# sed -i -e "s/-Werror -Wall -W/-Werror -Wall -W ${CFLAGS}/" sestatus/Makefile + + # python2 fix + sed -i -e "s/shell python -c/shell python2 -c/" semanage/Makefile + sed -i -e "s/\/usr\/bin\/python/\/usr\/bin\/python2/" sepolicy/Makefile + + # /usr merge fix + sed -i -e "s/\$(PREFIX)\/sbin/\$(PREFIX)\/bin/g" */Makefile + sed -i -e "s/\$(DESTDIR)\/sbin/\$(PREFIX)\/bin/g" */Makefile + sed -i -e "s/\$(PREFIX)\/sbin/\$(PREFIX)\/bin/g" mcstrans/*/Makefile + sed -i -e "s/\$(DESTDIR)\/sbin/\$(PREFIX)\/bin/g" mcstrans/*/Makefile +} + +build() { + cd ${pkgname}-${pkgver} + + make PYTHON=python2 LSPP_PRIV=y SEMODULE_PATH="/usr/sbin" all +} + +package(){ + cd ${pkgname}-${pkgver} + + make PYTHON=python2 DESTDIR="${pkgdir}" LIBDIR="${pkgdir}"/usr/lib SHLIBDIR="${pkgdir}"/usr/lib SEMODULE_PATH="/usr/sbin" install + + install -Dm644 "${srcdir}"/restorecond.service "${pkgdir}/usr/lib/systemd/system/restorecond.service" + + # Fix python2 scripts + sed -i -e "s/python -E/python2 -E/" "${pkgdir}/usr/bin/audit2allow" + sed -i -e "s/python -E/python2 -E/" "${pkgdir}/usr/bin/audit2why" + sed -i -e "s/python -E/python2 -E/" "${pkgdir}/usr/bin/chcat" + sed -i -e "s/python -E/python2 -E/" "${pkgdir}/usr/bin/sepolgen" + sed -i -e "s/python -E/python2 -E/" "${pkgdir}/usr/bin/sepolgen-ifgen" + sed -i -e "s/python -E/python2 -E/" "${pkgdir}/usr/bin/semanage" + sed -i -e "s/python -E/python2 -E/" "${pkgdir}/usr/lib/python2.7/site-packages/seobject.py" +} + diff --git a/restorecond.service b/restorecond.service new file mode 100644 index 000000000000..59f28fba9052 --- /dev/null +++ b/restorecond.service @@ -0,0 +1,12 @@ +[Unit] +Description=Restorecon maintaining path file context +After=syslog.target +ConditionPathExists=/etc/selinux/restorecond.conf + +[Service] +Type=oneshot +ExecStart=/usr/bin/restorecond +RemainAfterExit=yes + +[Install] +WantedBy=multi-user.target |