Date: Mon, 2 Sep 2019 15:00:56 +0000 (UTC) From: Steve Wills <swills@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r510801 - in head/sysutils/ioc: . files Message-ID: <201909021500.x82F0u5O015153@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: swills Date: Mon Sep 2 15:00:56 2019 New Revision: 510801 URL: https://svnweb.freebsd.org/changeset/ports/510801 Log: 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> Added: head/sysutils/ioc/ head/sysutils/ioc/Makefile (contents, props changed) head/sysutils/ioc/distinfo (contents, props changed) head/sysutils/ioc/files/ head/sysutils/ioc/files/ioc.in (contents, props changed) head/sysutils/ioc/pkg-descr (contents, props changed) head/sysutils/ioc/pkg-plist (contents, props changed) Added: head/sysutils/ioc/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/ioc/Makefile Mon Sep 2 15:00:56 2019 (r510801) @@ -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> Added: head/sysutils/ioc/distinfo ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/ioc/distinfo Mon Sep 2 15:00:56 2019 (r510801) @@ -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 Added: head/sysutils/ioc/files/ioc.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/ioc/files/ioc.in Mon Sep 2 15:00:56 2019 (r510801) @@ -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" Added: head/sysutils/ioc/pkg-descr ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/ioc/pkg-descr Mon Sep 2 15:00:56 2019 (r510801) @@ -0,0 +1,3 @@ +Jail management CLI using libioc (compatible with iocage/iocell) + +WWW: https://github.com/bsdci/ioc Added: head/sysutils/ioc/pkg-plist ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/ioc/pkg-plist Mon Sep 2 15:00:56 2019 (r510801) @@ -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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909021500.x82F0u5O015153>