svn commit: r550138 - in head/security/samhain: . files
Kurt Jaeger
pi at FreeBSD.org
Sat Sep 26 09:02:14 UTC 2020
Author: pi
Date: Sat Sep 26 09:02:13 2020
New Revision: 550138
URL: https://svnweb.freebsd.org/changeset/ports/550138
Log:
security/samhain: housekeeping
- The port comes in three flavors, standalone, -server, and -client.
All three use one or more files under /var/lib. Remove the logic
that only includes that dir in plist for some of those flavors,
and include it for all.
- Get rid of .sh extensions on rc scripts.
- Use INSTALL_SCRIPT instead of CP to ensure the rc scripts have
useful permissions.
- Patch the rc script source so they properly respect settings in rc.conf.
- Use @postunexec in plist instead of the deprecated @unexec.
PR: 249433
Submitted by: Greg Veldman <freebsd at gregv.net> (maintainer)
Added:
head/security/samhain/files/patch-init_samhain.startFreeBSD.in (contents, props changed)
Modified:
head/security/samhain/Makefile
head/security/samhain/pkg-plist
Modified: head/security/samhain/Makefile
==============================================================================
--- head/security/samhain/Makefile Sat Sep 26 08:36:54 2020 (r550137)
+++ head/security/samhain/Makefile Sat Sep 26 09:02:13 2020 (r550138)
@@ -3,6 +3,7 @@
PORTNAME= samhain
PORTVERSION= 4.4.2
+PORTREVISION= 1
CATEGORIES= security
MASTER_SITES= http://la-samhna.de/archive/
DISTNAME= samhain_signed-${PORTVERSION}
@@ -169,12 +170,12 @@ post-extract:
post-install:
.if !defined(WITH_SERVER)
- @${CP} ${WRKSRC}/init/samhain.startFreeBSD ${STAGEDIR}${PREFIX}/etc/rc.d/samhain.sh
+ ${INSTALL_SCRIPT} ${WRKSRC}/init/samhain.startFreeBSD ${STAGEDIR}${PREFIX}/etc/rc.d/samhain
@${CP} ${WRKSRC}/samhainrc ${STAGEDIR}${PREFIX}/etc/samhainrc.sample
@${CHGRP} wheel ${STAGEDIR}${PREFIX}/etc/samhainrc.sample
${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/samhain
.else
- @${CP} ${WRKSRC}/init/samhain.startFreeBSD ${STAGEDIR}${PREFIX}/etc/rc.d/yule.sh
+ ${INSTALL_SCRIPT} ${WRKSRC}/init/samhain.startFreeBSD ${STAGEDIR}${PREFIX}/etc/rc.d/yule
@${CP} ${WRKSRC}/yulerc ${STAGEDIR}${PREFIX}/etc/yulerc.sample
${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/yule
${STRIP_CMD} ${STAGEDIR}${PREFIX}/sbin/yulectl
Added: head/security/samhain/files/patch-init_samhain.startFreeBSD.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/security/samhain/files/patch-init_samhain.startFreeBSD.in Sat Sep 26 09:02:13 2020 (r550138)
@@ -0,0 +1,11 @@
+--- init/samhain.startFreeBSD.in.orig 2015-11-01 00:03:11 UTC
++++ init/samhain.startFreeBSD.in
+@@ -37,7 +37,7 @@
+ load_rc_config "$name"
+
+ if ! is_set ${rcvar}; then
+- eval "${rcvar}=YES"
++ eval "${rcvar}=NO"
+ fi
+
+ run_rc_command "$1"
Modified: head/security/samhain/pkg-plist
==============================================================================
--- head/security/samhain/pkg-plist Sat Sep 26 08:36:54 2020 (r550137)
+++ head/security/samhain/pkg-plist Sat Sep 26 09:02:13 2020 (r550138)
@@ -1,3 +1,4 @@
+ at dir /var/lib
%%PORTDOCS%%%%DOCSDIR%%/BUGS
%%PORTDOCS%%%%DOCSDIR%%/FAQ.html
%%PORTDOCS%%%%DOCSDIR%%/HOWTO-client+server-troubleshooting.html
@@ -10,10 +11,9 @@
%%PORTDOCS%%%%DOCSDIR%%/sh_mounts.txt
%%PORTDOCS%%%%DOCSDIR%%/sh_userfiles.txt
%%PORTDOCS%%@dir %%DOCSDIR%%
-%%SAMHAIN%%@dir /var/lib
%%SAMHAIN%%@dir /var/lib/samhain
%%SAMHAIN%%@sample etc/samhainrc.sample
-%%SAMHAIN%%etc/rc.d/samhain.sh
+%%SAMHAIN%%etc/rc.d/samhain
%%SAMHAIN%%man/man5/samhainrc.5.gz
%%SAMHAIN%%man/man8/samhain.8.gz
%%SAMHAIN%%sbin/samhain
@@ -22,8 +22,8 @@
%%YULE%%@dir /var/lib/yule
%%YULE%%@dir /var/log/yule
%%YULE%%@sample etc/yulerc.sample
-%%YULE%%@unexec echo "To delete the yule user permanently, use 'pw userdel yule'"
-%%YULE%%etc/rc.d/yule.sh
+%%YULE%%@postunexec echo "To delete the yule user permanently, use 'pw userdel yule'"
+%%YULE%%etc/rc.d/yule
%%YULE%%man/man5/yulerc.5.gz
%%YULE%%man/man8/yule.8.gz
%%YULE%%sbin/yule
More information about the svn-ports-all
mailing list