git: 08ed7d01655c - main - sysutils/bastille: update to 0.10.20231125

From: Fernando Apesteguía <fernape_at_FreeBSD.org>
Date: Thu, 07 Dec 2023 19:26:02 UTC
The branch main has been updated by fernape:

URL: https://cgit.FreeBSD.org/ports/commit/?id=08ed7d01655c4150a96e1c49bdab87711a952df4

commit 08ed7d01655c4150a96e1c49bdab87711a952df4
Author:     Fernando Apesteguía <fernape@FreeBSD.org>
AuthorDate: 2023-12-06 18:54:08 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-12-07 19:25:47 +0000

    sysutils/bastille: update to 0.10.20231125
    
    While here do not override upstream rc script
    
    PR:             274993
    Reported by:    dsh@bamus.cz
    Approved by:    christer.edwards@gmail.com (maintainer)
---
 sysutils/bastille/Makefile          | 22 ++++++++-----
 sysutils/bastille/distinfo          |  6 ++--
 sysutils/bastille/files/bastille.in | 61 -------------------------------------
 sysutils/bastille/pkg-plist         |  2 ++
 4 files changed, 20 insertions(+), 71 deletions(-)

diff --git a/sysutils/bastille/Makefile b/sysutils/bastille/Makefile
index 5f6ad80611d0..db5cce1ae02f 100644
--- a/sysutils/bastille/Makefile
+++ b/sysutils/bastille/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	bastille
-DISTVERSION=	0.10.20231013
+DISTVERSION=	0.10.20231125
 CATEGORIES=	sysutils
 
 MAINTAINER=	christer.edwards@gmail.com
@@ -15,17 +15,25 @@ GH_ACCOUNT=	bastillebsd
 NO_BUILD=	yes
 NO_ARCH=	yes
 
-USE_RC_SUBR=	bastille
+post-patch:
+	@${REINPLACE_CMD} \
+		-e 's|/usr/local/etc/bastille|${ETCDIR}|g' \
+		-e 's|/usr/local|${PREFIX}|g' \
+		${WRKSRC}/usr/local/etc/rc.d/bastille
 
 do-install:
-	${INSTALL_SCRIPT} ${WRKSRC}/${PREFIX}/bin/bastille ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_SCRIPT} ${WRKSRC}/usr/local/bin/bastille ${STAGEDIR}${PREFIX}/bin
+	${INSTALL_SCRIPT} ${WRKSRC}/usr/local/etc/rc.d/bastille \
+		${STAGEDIR}${PREFIX}/etc/rc.d
 
 post-install:
 	${MKDIR} ${STAGEDIR}${ETCDIR}
 	${MKDIR} ${STAGEDIR}${DATADIR}
-	(cd ${WRKSRC}/${DATADIR} && ${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
-	${INSTALL_MAN} ${WRKSRC}/${PREFIX}/man/man8/bastille.8.gz \
-		${STAGEDIR}${PREFIX}/man/man8/bastille.8.gz
-	${INSTALL_DATA} ${WRKSRC}/${ETCDIR}/bastille.conf.sample ${STAGEDIR}${ETCDIR}/bastille.conf.sample
+	(cd ${WRKSRC}/usr/local/share/bastille && \
+		${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR})
+	${INSTALL_MAN} ${WRKSRC}/usr/local/man/man8/bastille.8.gz \
+		${STAGEDIR}${PREFIX}/man/man8/${PORTNAME}.8.gz
+	${INSTALL_DATA} ${WRKSRC}/usr/local/etc/bastille/bastille.conf.sample \
+		${STAGEDIR}${ETCDIR}/${PORTNAME}.conf.sample
 
 .include <bsd.port.mk>
diff --git a/sysutils/bastille/distinfo b/sysutils/bastille/distinfo
index 664e880cdb3b..34613e6c4577 100644
--- a/sysutils/bastille/distinfo
+++ b/sysutils/bastille/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1697592468
-SHA256 (bastillebsd-bastille-0.10.20231013_GH0.tar.gz) = 46b431dccbf36363b9f396f5ea32fb6899c8b210973c6683acef401cd25414df
-SIZE (bastillebsd-bastille-0.10.20231013_GH0.tar.gz) = 622679
+TIMESTAMP = 1701531665
+SHA256 (bastillebsd-bastille-0.10.20231125_GH0.tar.gz) = 10ff52d33278d15af573173a3985381edb020add99c44d14942c3288f65c36e8
+SIZE (bastillebsd-bastille-0.10.20231125_GH0.tar.gz) = 625906
diff --git a/sysutils/bastille/files/bastille.in b/sysutils/bastille/files/bastille.in
deleted file mode 100644
index 17cf0df34948..000000000000
--- a/sysutils/bastille/files/bastille.in
+++ /dev/null
@@ -1,61 +0,0 @@
-#!/bin/sh
-
-# Bastille jail startup script
-
-# PROVIDE: bastille
-# REQUIRE: LOGIN
-# KEYWORD: shutdown
-
-# Add the following to /etc/rc.conf[.local] to enable this service
-#
-# bastille_enable (bool):          Set to NO by default.
-#               Set it to YES to enable bastille.
-# bastille_list (string):        Set to "ALL" by default.
-#               Space separated list of jails to start.
-#
-
-. /etc/rc.subr
-
-name=bastille
-rcvar=${name}_enable
-
-: ${bastille_enable:=NO}
-: ${bastille_list:="ALL"}
-
-command=%%PREFIX%%/bin/${name}
-start_cmd="bastille_start"
-stop_cmd="bastille_stop"
-restart_cmd="bastille_stop && bastille_start"
-
-bastille_start()
-{
-    if [ ! -n "${bastille_list}" ]; then
-        echo "${bastille_list} is undefined"
-        return 1
-    fi
-
-    local _jail
-
-    for _jail in ${bastille_list}; do
-        echo "Starting Bastille Jail: ${_jail}"
-        ${command} start ${_jail}
-    done
-}
-
-bastille_stop()
-{
-    if [ ! -n "${bastille_list}" ]; then
-        echo "${bastille_list} is undefined"
-        return 1
-    fi
-
-    local _jail
-
-    for _jail in ${bastille_list}; do
-        echo "Stopping Bastille Jail: ${_jail}"
-        ${command} stop ${_jail}
-    done
-}
-
-load_rc_config ${name}
-run_rc_command "$1"
diff --git a/sysutils/bastille/pkg-plist b/sysutils/bastille/pkg-plist
index 5333941b4ce1..5b18f11da79b 100644
--- a/sysutils/bastille/pkg-plist
+++ b/sysutils/bastille/pkg-plist
@@ -1,5 +1,6 @@
 @sample %%ETCDIR%%/bastille.conf.sample
 bin/bastille
+etc/rc.d/bastille
 %%DATADIR%%/bootstrap.sh
 %%DATADIR%%/clone.sh
 %%DATADIR%%/cmd.sh
@@ -19,6 +20,7 @@ bin/bastille
 %%DATADIR%%/list.sh
 %%DATADIR%%/mount.sh
 %%DATADIR%%/pkg.sh
+%%DATADIR%%/rcp.sh
 %%DATADIR%%/rdr.sh
 %%DATADIR%%/rename.sh
 %%DATADIR%%/restart.sh