summaryrefslogtreecommitdiff
path: root/pcr/tomoyo-tools
diff options
context:
space:
mode:
Diffstat (limited to 'pcr/tomoyo-tools')
-rw-r--r--pcr/tomoyo-tools/PKGBUILD55
-rw-r--r--pcr/tomoyo-tools/tomoyo-auditd.service15
-rw-r--r--pcr/tomoyo-tools/tomoyo-tools.install14
3 files changed, 58 insertions, 26 deletions
diff --git a/pcr/tomoyo-tools/PKGBUILD b/pcr/tomoyo-tools/PKGBUILD
index 3ba53522d..e429ba0d1 100644
--- a/pcr/tomoyo-tools/PKGBUILD
+++ b/pcr/tomoyo-tools/PKGBUILD
@@ -1,28 +1,49 @@
-# Maintainer (Arch): Jamie Nguyen <jamie AT tomoyolinux.co.uk>
+# Maintainer (AUR): Steven Allen <steven@stebalien.com>
+# Contributor (AUR): Sergej Pupykin <pupykin.s+arch@gmail.com>
+# Contributor (AUR): Jamie Nguyen <jamie AT tomoyolinux.co.uk>
+
+# parabola changes and rationale:
+# - removed from depends: linux-tomoyo
pkgname=tomoyo-tools
-_basever=2.3.0
-_timestamp=20110211
+_file=53357
+_basever=2.5.0
+_timestamp=20170102
pkgver=${_basever}.${_timestamp}
-pkgrel=4
-pkgdesc='TOMOYO Linux 2.3.x userspace tools for Linux kernel 2.6.36 and later'
-arch=('i686' 'x86_64')
-url='http://tomoyo.sourceforge.jp'
+pkgrel=1
+pkgdesc='TOMOYO Linux userspace tools for Linux kernels >=3.2'
+arch=('i686' 'x86_64' 'armv7h')
+url='http://tomoyo.osdn.jp'
+#url='http://sourceforge.jp/projects/tomoyo/releases/?package_id=9818'
license=('GPL')
-depends=('ncurses')
-makedepends=('help2man')
-conflicts=('ccs-tools')
+depends=('ncurses>=6.0')
install=tomoyo-tools.install
-source=("http://sourceforge.jp/frs/redir.php?f=/tomoyo/48663/${pkgname}-${_basever}-${_timestamp}.tar.gz")
+source=("http://osdn.jp/frs/redir.php?f=/tomoyo/${_file}/${pkgname}-${_basever}-${_timestamp}.tar.gz"{,.asc} 'tomoyo-tools.install' 'tomoyo-auditd.service')
+sha256sums=('00fedfac5e514321250bbe69eaccc732c8a8158596f77a785c2e3ae9f9968283'
+ 'SKIP'
+ '8236b6f3f268e3991d1f677dbf0ae5f520b900540f44f23ad547f6a1c75254f5'
+ '7c3c01a8ba34af9dc3601d470afdd0d3a2b01a1ca1951e3479cfd1fb4dfdafa3')
+validpgpkeys=('43C83369623D7AD3A96C2FC7425F128D0C64F52A')
+
+prepare() {
+ cd "${srcdir}/${pkgname}"
+ sed -i \
+ -e 's|usr/sbin|usr/bin|g' \
+ -e 's|sbin|usr/bin|g' \
+ usr_lib_tomoyo/init_policy.c
+}
build() {
- cd "${srcdir}/${pkgname}"
- make -j1 || return 1
+ cd "${srcdir}/${pkgname}"
+ make USRSBINDIR=/usr/bin SBINDIR=/usr/bin
}
package() {
- cd "${srcdir}/${pkgname}"
- make INSTALLDIR="${pkgdir}" install || return 1
-}
+ cd "${srcdir}/${pkgname}"
+
+ _unitdir="$(pkg-config --variable=systemdsystemunitdir systemd)"
-sha256sums=('3144bbd6056528c85f63889c8b977b994d5596611b74afdc9a3924162cf94db0')
+ make USRSBINDIR=/usr/bin SBINDIR=/usr/bin INSTALLDIR="${pkgdir}" install
+ install -Dm644 "${srcdir}/tomoyo-auditd.service" \
+ "${pkgdir}/${_unitdir}/tomoyo-auditd.service"
+}
diff --git a/pcr/tomoyo-tools/tomoyo-auditd.service b/pcr/tomoyo-tools/tomoyo-auditd.service
new file mode 100644
index 000000000..a9cce01df
--- /dev/null
+++ b/pcr/tomoyo-tools/tomoyo-auditd.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Tomoyo Auditing
+
+[Service]
+Type=forking
+ExecStart=/usr/bin/tomoyo-auditd
+ExecReload=/usr/bin/kill -HUP $MAINPID
+ProtectSystem=full
+ProtectHome=true
+PrivateNetwork=true
+PrivateDevices=true
+PrivateTmp=true
+
+[Install]
+WantedBy=multi-user.target
diff --git a/pcr/tomoyo-tools/tomoyo-tools.install b/pcr/tomoyo-tools/tomoyo-tools.install
index 6fb5e16d2..09d974751 100644
--- a/pcr/tomoyo-tools/tomoyo-tools.install
+++ b/pcr/tomoyo-tools/tomoyo-tools.install
@@ -1,11 +1,7 @@
post_install () {
- echo
- echo " * To enable TOMOYO Linux, append 'security=tomoyo' to the kernel"
- echo " boot options and initialize policy with this command:"
- echo " /usr/lib/tomoyo/init_policy"
- echo
-}
-
-post_upgrade () {
- post_install $1
+ echo " * To enable TOMOYO Linux, append 'security=tomoyo' to the kernel"
+ echo " boot options and initialize policy with this command:"
+ echo " /usr/lib/tomoyo/init_policy"
+ echo " Also you may pass TOMOYO_trigger parameter if CONFIG_SECURITY_TOMOYO_ACTIVATION_TRIGGER"
+ echo " kernel option has wrong value"
}