From 1598de563bc4102d8d51b264638b986cdef49eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20DESBRI=C3=88RES?= Date: Thu, 9 Oct 2014 18:06:36 +0200 Subject: Security and system auditing tool to harden Unix/Linux systems --- pcr/lynis/PKGBUILD | 36 ++++++++++++++++-------------------- pcr/lynis/lynis.install | 14 ++++++++------ 2 files changed, 24 insertions(+), 26 deletions(-) diff --git a/pcr/lynis/PKGBUILD b/pcr/lynis/PKGBUILD index 24be95c25..c6b6cca03 100644 --- a/pcr/lynis/PKGBUILD +++ b/pcr/lynis/PKGBUILD @@ -1,47 +1,43 @@ -# Contributor (Arch) : Levente Polyak -# Contributor (Arch) : Sébastien Luttringer -# Maintainer (Parabola) : Aurélien DESBRIÈRES +# Maintainer : Aurélien DESBRIÈRES +# Contributor: Levente Polyak +# Contributor: Sébastien Luttringer pkgname=lynis -pkgver=1.5.6 -pkgrel=1 +pkgver=1.6.2 +pkgrel=2 pkgdesc='Security and system auditing tool to harden Unix/Linux systems' url='http://cisofy.com/lynis/' license=('GPL3') arch=('any') backup=('etc/lynis/default.prf') depends=('sh') -optdepends=('net-tools: networking tests') +optdepends=('net-tools: networking tests' + 'bash-completion: completion for bash') install=lynis.install source=(http://cisofy.com/files/${pkgname}-${pkgver}.tar.gz) -prepare() { - cd ${pkgname}-${pkgver} - # fix non-test includes to let lynis run as user but complain gracefully - chmod o+rx include - chmod o+r include/* - chmod o-r include/tests_* -} - package() { - cd ${pkgname}-${pkgver} + cd ${pkgname} - # install profile + # profile install -Dm 644 default.prf "${pkgdir}/etc/${pkgname}/default.prf" - # install binary + # binary install -Dm 755 "${pkgname}" "${pkgdir}/usr/bin/${pkgname}" - # install plugins, include, db + # plugins, include, db install -d "${pkgdir}/usr/share/${pkgname}" cp -a db include plugins "${pkgdir}/usr/share/${pkgname}" - # install doc files + # doc files install -d "${pkgdir}/usr/share/doc/${pkgname}" install -m 644 -t "${pkgdir}/usr/share/doc/${pkgname}" README INSTALL CHANGELOG FAQ - # install manpage + # manpage install -Dm 644 "${pkgname}.8" "${pkgdir}/usr/share/man/man8/${pkgname}.8" + + # completion + install -Dm 644 dev/bash_completion.d/${pkgname} "${pkgdir}/usr/share/bash-completion/completions/${pkgname}" } # vim:set ts=2 sw=2 ft=sh et: diff --git a/pcr/lynis/lynis.install b/pcr/lynis/lynis.install index abdb081f1..1b104f01e 100644 --- a/pcr/lynis/lynis.install +++ b/pcr/lynis/lynis.install @@ -1,8 +1,10 @@ pre_upgrade() { - chmod -R o= /usr/share/lynis - chmod 0755 /usr/share/lynis - # fix non-test includes to let lynis run as user but complain gracefully - chmod o+rx /usr/share/lynis/include - chmod o+r /usr/share/lynis/include/* - chmod o-r /usr/share/lynis/include/tests_* + # fix local old umask + chmod o+rx,g+rx /usr/share/lynis/{include,db,plugins} +} + +post_upgrade() { + chmod o+r,g+r /usr/share/lynis/include/* + chmod o+r,g+r /usr/share/lynis/db/* + chmod o+r,g+r /usr/share/lynis/plugins/* } -- cgit v1.2.3-2-g168b