aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Pirogov <vbnet.ru@gmail.com>2019-11-26 19:05:13 +0300
committerLeo <thinkabit.ukim@gmail.com>2019-11-27 13:41:07 +0100
commit084c083ad2f962b2943a653ca85a73c75bdca367 (patch)
treef96944d75e6d8d8d88094ae67fd21bb049809263
parent3ca3814a177dda5ab4010bd76e07087493495ab3 (diff)
downloadaports-084c083ad2f962b2943a653ca85a73c75bdca367.tar.gz
aports-084c083ad2f962b2943a653ca85a73c75bdca367.tar.bz2
aports-084c083ad2f962b2943a653ca85a73c75bdca367.tar.xz
testing/lynis: new aport
-rw-r--r--testing/lynis/APKBUILD44
-rw-r--r--testing/lynis/lynis.cron3
2 files changed, 47 insertions, 0 deletions
diff --git a/testing/lynis/APKBUILD b/testing/lynis/APKBUILD
new file mode 100644
index 0000000000..e9bc6f01f3
--- /dev/null
+++ b/testing/lynis/APKBUILD
@@ -0,0 +1,44 @@
+# Contributor: Michael Pirogov <vbnet.ru@gmail.com>
+# Maintainer: Michael Pirogov <vbnet.ru@gmail.com>
+pkgname=lynis
+pkgver=2.7.5
+pkgrel=0
+pkgdesc="Security and system auditing tool"
+url="https://cisofy.com/lynis/"
+arch="noarch"
+license="GPL-3.0-or-later"
+depends="bash"
+options="!check" # no testsuit
+subpackages="$pkgname-doc
+ $pkgname-bash-completion:bashcomp:noarch
+ "
+source="$pkgname-$pkgver.tar.gz::https://cisofy.com/files/lynis-$pkgver.tar.gz
+ $pkgname.cron"
+builddir=$srcdir/$pkgname
+
+package() {
+ # stricter default perms - bug 507436
+ mkdir -p -m 0700 "$pkgdir/usr/share/$pkgname" "$pkgdir/etc/$pkgname"
+ cp -r "$builddir/db" "$builddir/include" "$builddir/plugins" "$pkgdir/usr/share/$pkgname"
+
+ install -Dm755 "$builddir/$pkgname" "$pkgdir/usr/sbin/$pkgname"
+ install -Dm600 "$builddir/default.prf" "$pkgdir/etc/$pkgname/default.prf"
+ install -Dm600 "$srcdir/$pkgname.cron" "$pkgdir"/etc/periodic/daily/$pkgname
+
+ # lynis-doc
+ install -Dm644 CHANGELOG.md FAQ README -t "$pkgdir/usr/share/doc/$pkgname/"
+ install -Dm644 "$builddir/lynis.8" "$pkgdir/usr/share/man/man8/lynis.8"
+
+}
+
+bashcomp() {
+ pkgdesc="Bash completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+ mkdir -p "$subpkgdir"/usr/share/bash-completion/completions/
+ install -Dm644 "$builddir/extras/bash_completion.d/lynis" \
+ "$subpkgdir/usr/share/bash-completion/completions/lynis"
+}
+
+sha512sums="0ec814cb65252e3e8a44013ad0902e188a4825c521d47280586c0dd9924dfb7b79cce9797055ab7b7be59dacc111607d114175e0a793844227eadda76f68980b lynis-2.7.5.tar.gz
+1cdaaee433912c2ccdec8ad7c9b88be55fe3f1d68e2fca79cc6e0e10112d465a70cfbe0a049623437f604bfc9793e0d29b709e035cbf710d4d38ba48acc5355f lynis.cron"
diff --git a/testing/lynis/lynis.cron b/testing/lynis/lynis.cron
new file mode 100644
index 0000000000..b5e4b0c236
--- /dev/null
+++ b/testing/lynis/lynis.cron
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+/usr/sbin/lynis audit system --auditor "automated" --cronjob