From owner-svn-ports-head@freebsd.org Thu Apr 23 09:32:08 2020 Return-Path: Delivered-To: svn-ports-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9B5E42AED1B; Thu, 23 Apr 2020 09:32:08 +0000 (UTC) (envelope-from pizzamig@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 497BsN3hZnz4kQL; Thu, 23 Apr 2020 09:32:08 +0000 (UTC) (envelope-from pizzamig@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7943B2224; Thu, 23 Apr 2020 09:32:08 +0000 (UTC) (envelope-from pizzamig@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 03N9W8BT032208; Thu, 23 Apr 2020 09:32:08 GMT (envelope-from pizzamig@FreeBSD.org) Received: (from pizzamig@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 03N9W7Qh032204; Thu, 23 Apr 2020 09:32:07 GMT (envelope-from pizzamig@FreeBSD.org) Message-Id: <202004230932.03N9W7Qh032204@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pizzamig set sender to pizzamig@FreeBSD.org using -f From: Luca Pizzamiglio Date: Thu, 23 Apr 2020 09:32:07 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r532661 - in head/sysutils/pot: . files X-SVN-Group: ports-head X-SVN-Commit-Author: pizzamig X-SVN-Commit-Paths: in head/sysutils/pot: . files X-SVN-Commit-Revision: 532661 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Apr 2020 09:32:08 -0000 Author: pizzamig Date: Thu Apr 23 09:32:07 2020 New Revision: 532661 URL: https://svnweb.freebsd.org/changeset/ports/532661 Log: sysutils/pot: Update to 0.11.1 Changes: https://github.com/pizzamig/pot/releases Added: head/sysutils/pot/files/pot_early.in (contents, props changed) Modified: head/sysutils/pot/Makefile head/sysutils/pot/distinfo head/sysutils/pot/files/pot.in head/sysutils/pot/pkg-plist Modified: head/sysutils/pot/Makefile ============================================================================== --- head/sysutils/pot/Makefile Thu Apr 23 09:23:25 2020 (r532660) +++ head/sysutils/pot/Makefile Thu Apr 23 09:32:07 2020 (r532661) @@ -2,8 +2,8 @@ # $FreeBSD$ PORTNAME= pot -PORTVERSION= 0.10.4 -PORTREVISION= 1 +PORTVERSION= 0.11.1 +PORTREVISION= 0 CATEGORIES= sysutils MAINTAINER= pizzamig@FreeBSD.org @@ -16,7 +16,7 @@ RUN_DEPENDS= potnet:sysutils/potnet \ ncat:security/nmap \ ${LOCALBASE}/share/freebsd/MANIFESTS/amd64-amd64-11.2-RELEASE:misc/freebsd-release-manifests -USE_RC_SUBR= pot +USE_RC_SUBR= pot pot_early USE_GITHUB= yes GH_ACCOUNT= pizzamig Modified: head/sysutils/pot/distinfo ============================================================================== --- head/sysutils/pot/distinfo Thu Apr 23 09:23:25 2020 (r532660) +++ head/sysutils/pot/distinfo Thu Apr 23 09:32:07 2020 (r532661) @@ -1,3 +1,3 @@ -TIMESTAMP = 1582539340 -SHA256 (pizzamig-pot-0.10.4_GH0.tar.gz) = 767abb10f41936487f53e69d7f03b64136733e4570f7ee51202d0813680aca4b -SIZE (pizzamig-pot-0.10.4_GH0.tar.gz) = 150694 +TIMESTAMP = 1587327646 +SHA256 (pizzamig-pot-0.11.1_GH0.tar.gz) = 76b4acd2ac37f35ce533208e6fc51625542adf69e95aa6b02b12a97485eaa106 +SIZE (pizzamig-pot-0.11.1_GH0.tar.gz) = 152172 Modified: head/sysutils/pot/files/pot.in ============================================================================== --- head/sysutils/pot/files/pot.in Thu Apr 23 09:23:25 2020 (r532660) +++ head/sysutils/pot/files/pot.in Thu Apr 23 09:32:07 2020 (r532661) @@ -2,8 +2,8 @@ # $FreeBSD$ # PROVIDE: pot -# REQUIRE: NETWORKING syslogd pf -# BEFORE: ntpdate +# REQUIRE: NETWORKING LOGIN FILESYSTEM +# BEFORE: securelevel # KEYWORD: shutdown nojail . /etc/rc.subr @@ -17,44 +17,49 @@ start_cmd="pot_start" stop_cmd="pot_stop" restart_cmd="pot_restart" status_cmd="pot_status" -start_precmd="pot_deprecated_start" -stop_postcmd="pot_deprecated_stop" load_rc_config $name : ${pot_enable:=NO} -: ${pot_list:=""} -pot_deprecated_start() +pot_start() { - if [ -n "$pot_list" ]; then - echo "pot_list is deprecated! please use pot set-attr to set the start-at-boot attribute to your pot" - fi + local _pname _dyn_pot_list _start + _dyn_pot_list=$(%%PREFIX%%/bin/pot ls -q) + for _pname in $_dyn_pot_list ; do + if [ "$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A start-at-boot -q )" = "YES" ]; then + %%PREFIX%%/bin/pot start "$_pname" + fi + done } -pot_deprecated_stop() +pot_stop() { - if [ -n "$pot_list" ]; then - echo "pot_list is deprecated! please use pot set-attr to set the start-at-boot attribute to your pot" - fi + local _pname _dyn_pot_list _start + _dyn_pot_list=$(%%PREFIX%%/bin/pot ls -q) + for _pname in $_dyn_pot_list ; do + if [ "$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A start-at-boot -q )" = "YES" ]; then + %%PREFIX%%/bin/pot stop "$_pname" + fi + done } -pot_start() +pot_early_start() { local _pname _dyn_pot_list _start _dyn_pot_list=$(%%PREFIX%%/bin/pot ls -q) for _pname in $_dyn_pot_list ; do - if _start=$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A start-at-boot -q ) && [ "$_start" = "YES" ]; then + if [ "$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A early-start-at-boot -q )" = "YES" ]; then %%PREFIX%%/bin/pot start "$_pname" fi done } -pot_stop() +pot_early_stop() { local _pname _dyn_pot_list _start _dyn_pot_list=$(%%PREFIX%%/bin/pot ls -q) for _pname in $_dyn_pot_list ; do - if _start=$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A start-at-boot -q ) && [ "$_start" = "YES" ]; then + if [ "$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A early-start-at-boot -q )" = "YES" ]; then %%PREFIX%%/bin/pot stop "$_pname" fi done @@ -63,17 +68,18 @@ pot_stop() pot_restart() { pot_stop - pot_deprecated_stop + pot_early_stop sleep 5 + pot_early_start pot_start - pot_deprecated_start } pot_status() { - local _pname _dyn_pot_list _start + local _pname _dyn_pot_list for _pname in $_dyn_pot_list ; do - if _start=$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A start-at-boot -q ) && [ "$_start" = "YES" ]; then + if [ "$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A early-start-at-boot -q )" = "YES" ] || + [ "$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A start-at-boot -q )" = "YES" ]; then if %%PREFIX%%/bin/pot info -qrp "$_pname" ; then echo "pot $_pname is up and running" else Added: head/sysutils/pot/files/pot_early.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/pot/files/pot_early.in Thu Apr 23 09:32:07 2020 (r532661) @@ -0,0 +1,44 @@ +#!/bin/sh +# $FreeBSD$ + +# PROVIDE: pot_early +# REQUIRE: NETWORKING syslogd pf +# BEFORE: ntpdate +# KEYWORD: shutdown nojail + +. /etc/rc.subr + +PATH=$PATH:/usr/local/bin +name="pot_early" +desc="Pot containers - early start" +procname="pot" +rcvar=pot_enable +start_cmd="pot_early_start" +stop_cmd="pot_early_stop" + +load_rc_config $name +: ${pot_enable:=NO} + +pot_early_start() +{ + local _pname _dyn_pot_list _start + _dyn_pot_list=$(%%PREFIX%%/bin/pot ls -q) + for _pname in $_dyn_pot_list ; do + if [ "$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A early-start-at-boot -q )" = "YES" ]; then + %%PREFIX%%/bin/pot start "$_pname" + fi + done +} + +pot_early_stop() +{ + local _pname _dyn_pot_list _start + _dyn_pot_list=$(%%PREFIX%%/bin/pot ls -q) + for _pname in $_dyn_pot_list ; do + if [ "$( %%PREFIX%%/bin/pot get-attr -p "$_pname" -A early-start-at-boot -q )" = "YES" ]; then + %%PREFIX%%/bin/pot stop "$_pname" + fi + done +} + +run_rc_command "$1" Modified: head/sysutils/pot/pkg-plist ============================================================================== --- head/sysutils/pot/pkg-plist Thu Apr 23 09:23:25 2020 (r532660) +++ head/sysutils/pot/pkg-plist Thu Apr 23 09:32:07 2020 (r532661) @@ -28,6 +28,7 @@ bin/pot %%DATADIR%%/init.sh %%DATADIR%%/list.sh %%DATADIR%%/mount-in.sh +%%DATADIR%%/network.sh %%DATADIR%%/prepare.sh %%DATADIR%%/prune.sh %%DATADIR%%/ps.sh