sysutils/ioc: create port
Jail management CLI using libioc (compatible with iocage/iocell) WWW: https://github.com/bsdci/ioc PR: 234816 Submitted by: gronke <stefan@gronke.net>
This commit is contained in:
parent
9c8e68895a
commit
ccabacd757
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=510801
39
sysutils/ioc/Makefile
Normal file
39
sysutils/ioc/Makefile
Normal file
@ -0,0 +1,39 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= ioc
|
||||
PORTVERSION= 0.8.2
|
||||
CATEGORIES= sysutils
|
||||
|
||||
MAINTAINER= stefan@gronke.net
|
||||
COMMENT= Jail management CLI using libioc
|
||||
|
||||
LICENSE= BSD2CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
|
||||
|
||||
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}click>0:devel/py-click@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}libioc>0:devel/py-libioc@${PY_FLAVOR} \
|
||||
${PYTHON_PKGNAMEPREFIX}texttable>0:textproc/py-texttable@${PY_FLAVOR}
|
||||
|
||||
USES= python:3.6+
|
||||
|
||||
USE_GITHUB= yes
|
||||
GH_ACCOUNT= bsdci
|
||||
GH_PROJECT= ioc
|
||||
|
||||
NO_ARCH= yes
|
||||
NO_BUILD= yes
|
||||
|
||||
USE_RC_SUBR= ioc
|
||||
|
||||
post-patch:
|
||||
@${REINPLACE_CMD} -e "s#LIB_DIR =.*#LIB_DIR = \"${PREFIX}/lib/ioc\"#" ${WRKSRC}/bin/ioc
|
||||
|
||||
pre-install:
|
||||
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/ioc
|
||||
|
||||
do-install:
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/rc.d/ioc ${STAGEDIR}${PREFIX}/etc/rc.d
|
||||
${INSTALL_SCRIPT} ${WRKSRC}/bin/ioc ${STAGEDIR}${PREFIX}/bin
|
||||
(cd ${WRKSRC}/ && ${COPYTREE_SHARE} ioc_cli ${STAGEDIR}${PREFIX}/lib/ioc)
|
||||
|
||||
.include <bsd.port.mk>
|
3
sysutils/ioc/distinfo
Normal file
3
sysutils/ioc/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1565256009
|
||||
SHA256 (bsdci-ioc-0.8.2_GH0.tar.gz) = 75f70f770f8f552bcc9d0dc50a1bbfcc5e8cf0faab4be41f108bdb70b2ea6dd8
|
||||
SIZE (bsdci-ioc-0.8.2_GH0.tar.gz) = 31262
|
65
sysutils/ioc/files/ioc.in
Normal file
65
sysutils/ioc/files/ioc.in
Normal file
@ -0,0 +1,65 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
# PROVIDE: ioc
|
||||
# REQUIRE: LOGIN cleanvar sshd ZFS
|
||||
# BEFORE: securelevel
|
||||
# KEYWORD: shutdown
|
||||
|
||||
# Add the following lines to /etc/rc.conf to enable ioc start on boot:
|
||||
#
|
||||
# ioc_enable="YES"
|
||||
#
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name="ioc"
|
||||
rcvar=ioc_enable
|
||||
|
||||
# read configuration and set defaults
|
||||
load_rc_config "$name"
|
||||
: ${ioc_enable="NO"}
|
||||
: ${ioc_lang="en_US.UTF-8"}
|
||||
|
||||
start_cmd="ioc_start"
|
||||
stop_cmd="ioc_stop"
|
||||
status_cmd="ioc_status"
|
||||
extra_commands="status"
|
||||
export LANG=$ioc_lang
|
||||
|
||||
[ $# -ne 1 ] && rc_usage $_keywords
|
||||
|
||||
ioc_start()
|
||||
{
|
||||
if checkyesno ${rcvar}; then
|
||||
echo "* [ioc] starting jails... "
|
||||
%%PREFIX%%/bin/ioc start --rc
|
||||
fi
|
||||
}
|
||||
|
||||
ioc_stop()
|
||||
{
|
||||
if checkyesno ${rcvar}; then
|
||||
echo "* [ioc] stopping jails... "
|
||||
%%PREFIX%%/bin/ioc stop --rc
|
||||
fi
|
||||
}
|
||||
|
||||
ioc_status()
|
||||
{
|
||||
if checkyesno ${rcvar}; then
|
||||
echo -n "* [ioc] checking jails status..."
|
||||
test -z "$(%%PREFIX%%/bin/ioc list boot=yes running=no template=no,- --no-header --output=name --output-format=list)"
|
||||
status=$?
|
||||
if test ${status} -eq 0; then
|
||||
echo " OK"
|
||||
else
|
||||
echo " Failed!"
|
||||
fi
|
||||
exit $status
|
||||
fi
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
3
sysutils/ioc/pkg-descr
Normal file
3
sysutils/ioc/pkg-descr
Normal file
@ -0,0 +1,3 @@
|
||||
Jail management CLI using libioc (compatible with iocage/iocell)
|
||||
|
||||
WWW: https://github.com/bsdci/ioc
|
30
sysutils/ioc/pkg-plist
Normal file
30
sysutils/ioc/pkg-plist
Normal file
@ -0,0 +1,30 @@
|
||||
bin/ioc
|
||||
lib/ioc/ioc_cli/__init__.py
|
||||
lib/ioc/ioc_cli/activate.py
|
||||
lib/ioc/ioc_cli/clone.py
|
||||
lib/ioc/ioc_cli/console.py
|
||||
lib/ioc/ioc_cli/create.py
|
||||
lib/ioc/ioc_cli/deactivate.py
|
||||
lib/ioc/ioc_cli/destroy.py
|
||||
lib/ioc/ioc_cli/exec.py
|
||||
lib/ioc/ioc_cli/export.py
|
||||
lib/ioc/ioc_cli/fetch.py
|
||||
lib/ioc/ioc_cli/fstab.py
|
||||
lib/ioc/ioc_cli/get.py
|
||||
lib/ioc/ioc_cli/import.py
|
||||
lib/ioc/ioc_cli/list.py
|
||||
lib/ioc/ioc_cli/migrate.py
|
||||
lib/ioc/ioc_cli/pkg.py
|
||||
lib/ioc/ioc_cli/promote.py
|
||||
lib/ioc/ioc_cli/provision.py
|
||||
lib/ioc/ioc_cli/rename.py
|
||||
lib/ioc/ioc_cli/restart.py
|
||||
lib/ioc/ioc_cli/set.py
|
||||
lib/ioc/ioc_cli/shared/__init__.py
|
||||
lib/ioc/ioc_cli/shared/click.py
|
||||
lib/ioc/ioc_cli/shared/jail.py
|
||||
lib/ioc/ioc_cli/shared/output.py
|
||||
lib/ioc/ioc_cli/snapshot.py
|
||||
lib/ioc/ioc_cli/start.py
|
||||
lib/ioc/ioc_cli/stop.py
|
||||
lib/ioc/ioc_cli/update.py
|
Loading…
Reference in New Issue
Block a user