1 |
commit: 8d19cfdd58a312a671a7c89c7189584b4b6b4b2a |
2 |
Author: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Sep 1 20:18:02 2022 +0000 |
4 |
Commit: Mike Pagano <mpagano <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 1 20:18:02 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8d19cfdd |
7 |
|
8 |
app-forensics/lynis: update EAPI 7 -> 8, fix -cron |
9 |
|
10 |
Make sure when -cron is present, we don't depend on |
11 |
virtual/cron. |
12 |
|
13 |
Closes: https://bugs.gentoo.org/867049 |
14 |
|
15 |
Signed-off-by: Mike Pagano <mpagano <AT> gentoo.org> |
16 |
|
17 |
app-forensics/lynis/lynis-3.0.8-r1.ebuild | 72 +++++++++++++++++++++++++++++++ |
18 |
1 file changed, 72 insertions(+) |
19 |
|
20 |
diff --git a/app-forensics/lynis/lynis-3.0.8-r1.ebuild b/app-forensics/lynis/lynis-3.0.8-r1.ebuild |
21 |
new file mode 100644 |
22 |
index 000000000000..b7df6561856b |
23 |
--- /dev/null |
24 |
+++ b/app-forensics/lynis/lynis-3.0.8-r1.ebuild |
25 |
@@ -0,0 +1,72 @@ |
26 |
+# Copyright 1999-2022 Gentoo Authors |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+ |
29 |
+EAPI="8" |
30 |
+ |
31 |
+inherit bash-completion-r1 systemd |
32 |
+ |
33 |
+DESCRIPTION="Security and system auditing tool" |
34 |
+HOMEPAGE="https://cisofy.com/lynis/" |
35 |
+SRC_URI="https://cisofy.com/files/${P}.tar.gz" |
36 |
+ |
37 |
+LICENSE="GPL-3" |
38 |
+SLOT="0" |
39 |
+KEYWORDS="~amd64 ~x86" |
40 |
+IUSE="+cron systemd" |
41 |
+ |
42 |
+DEPEND="" |
43 |
+RDEPEND=" |
44 |
+ app-shells/bash |
45 |
+ cron? ( !systemd? ( virtual/cron ) )" |
46 |
+ |
47 |
+S="${WORKDIR}/${PN}" |
48 |
+ |
49 |
+src_install() { |
50 |
+ doman lynis.8 |
51 |
+ dodoc FAQ README |
52 |
+ newdoc CHANGELOG.md CHANGELOG |
53 |
+ |
54 |
+ # Remove the old one during the next stabilize progress |
55 |
+ exeinto /etc/cron.daily |
56 |
+ newexe "${FILESDIR}"/lynis.cron-new lynis |
57 |
+ |
58 |
+ dobashcomp extras/bash_completion.d/lynis |
59 |
+ |
60 |
+ # stricter default perms - bug 507436 |
61 |
+ diropts -m0700 |
62 |
+ insopts -m0600 |
63 |
+ |
64 |
+ insinto /usr/share/${PN} |
65 |
+ doins -r db/ include/ plugins/ |
66 |
+ |
67 |
+ dosbin lynis |
68 |
+ |
69 |
+ insinto /etc/${PN} |
70 |
+ doins default.prf |
71 |
+ sed -i -e 's/\/path\/to\///' "${S}/extras/systemd/${PN}.service" || die "Sed Failed!" |
72 |
+ systemd_dounit "${S}/extras/systemd/${PN}.service" || die "Sed Failed!" |
73 |
+ systemd_dounit "${S}/extras/systemd/${PN}.timer" |
74 |
+ |
75 |
+ if ! use cron; then |
76 |
+ ebegin "removing cron files from installation image" |
77 |
+ rm -rfv "${ED}/etc/cron.daily" || die |
78 |
+ eend "$?" |
79 |
+ fi |
80 |
+} |
81 |
+ |
82 |
+pkg_postinst() { |
83 |
+ if use cron; then |
84 |
+ if systemd_is_booted || has_version sys-apps/systemd; then |
85 |
+ echo |
86 |
+ ewarn "Both 'cron' and 'systemd' flags are enabled." |
87 |
+ ewarn "So both ${PN}.target and cron files were installed." |
88 |
+ ewarn "Please don't use 2 implementations at the same time." |
89 |
+ ewarn "Cronjobs are usually enabled by default via /etc/cron.* jobs" |
90 |
+ ewarn "If you want to use systemd ${PN}.target timers" |
91 |
+ ewarn "disable 'cron' flag and reinstall ${PN}" |
92 |
+ echo |
93 |
+ else |
94 |
+ einfo "A cron script has been installed to ${ROOT}/etc/cron.daily/lynis." |
95 |
+ fi |
96 |
+ fi |
97 |
+} |