Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jun 2019 08:02:18 +0000 (UTC)
From:      Luca Pizzamiglio <pizzamig@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r505011 - in head/sysutils/pot: . files
Message-ID:  <201906240802.x5O82IGv064301@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pizzamig
Date: Mon Jun 24 08:02:18 2019
New Revision: 505011
URL: https://svnweb.freebsd.org/changeset/ports/505011

Log:
  sysutils/pot: Update to 0.6.0
  
  Changes: https://github.com/pizzamig/pot/releases/tag/0.6.0

Modified:
  head/sysutils/pot/Makefile
  head/sysutils/pot/distinfo
  head/sysutils/pot/files/pkg-message.in
  head/sysutils/pot/files/pot.in
  head/sysutils/pot/pkg-plist

Modified: head/sysutils/pot/Makefile
==============================================================================
--- head/sysutils/pot/Makefile	Mon Jun 24 07:24:28 2019	(r505010)
+++ head/sysutils/pot/Makefile	Mon Jun 24 08:02:18 2019	(r505011)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	pot
-PORTVERSION=	0.5.11
+PORTVERSION=	0.6.0
 CATEGORIES=	sysutils
 
 MAINTAINER=	pizzamig@FreeBSD.org

Modified: head/sysutils/pot/distinfo
==============================================================================
--- head/sysutils/pot/distinfo	Mon Jun 24 07:24:28 2019	(r505010)
+++ head/sysutils/pot/distinfo	Mon Jun 24 08:02:18 2019	(r505011)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1553877138
-SHA256 (pizzamig-pot-0.5.11_GH0.tar.gz) = 754e867773ce7a1dd67fb526897d11f8b1b912843ee551e217127d0b7aeb9402
-SIZE (pizzamig-pot-0.5.11_GH0.tar.gz) = 116316
+TIMESTAMP = 1561300420
+SHA256 (pizzamig-pot-0.6.0_GH0.tar.gz) = 507d777c81d6d214fe522c9c914fb325138957c2a02bedd9e0becf755cc224e1
+SIZE (pizzamig-pot-0.6.0_GH0.tar.gz) = 122515

Modified: head/sysutils/pot/files/pkg-message.in
==============================================================================
--- head/sysutils/pot/files/pkg-message.in	Mon Jun 24 07:24:28 2019	(r505010)
+++ head/sysutils/pot/files/pkg-message.in	Mon Jun 24 08:02:18 2019	(r505011)
@@ -3,3 +3,10 @@ Now, before to run 'pot init', it would be wise to edi
 Do not edit pot.default.conf, but pot.conf instead.
 Configuration files are stored in %%ETCDIR%%/
 
+To upgrade from prevoius versions of pot (<0.6.0) to 0.6.0+ the following steps are suggested:
+* stop all your pots
+* re-run `pot init`
+* if needed, restart pf
+
+The variable `pot_list` in the rc.conf file is deprecated.
+Use `pot set-attr` to enable the attribute start-at-boot to your pot

Modified: head/sysutils/pot/files/pot.in
==============================================================================
--- head/sysutils/pot/files/pot.in	Mon Jun 24 07:24:28 2019	(r505010)
+++ head/sysutils/pot/files/pot.in	Mon Jun 24 08:02:18 2019	(r505011)
@@ -2,7 +2,8 @@
 # $FreeBSD$
 
 # PROVIDE: pot
-# REQUIRE: LOGIN
+# REQUIRE: NETWORKING syslogd pf
+# BEFORE: ntpdate
 # KEYWORD: shutdown nojail
 
 . /etc/rc.subr
@@ -15,31 +16,45 @@ 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()
+{
+	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
+}
+
+pot_deprecated_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
+}
+
 pot_start()
 {
-	local _pname
-	for _pname in $pot_list ; do
-		if %%PREFIX%%/bin/${name} info -qp $_pname ; then
-			%%PREFIX%%/bin/${name} start $_pname
-		else
-			echo "pot start: pot $_pnmame not found"
+	local _pname _dyn_pot_list _start
+	_dyn_pot_list=$(/usr/local/bin/pot ls -q)
+	for _pname in $_dyn_pot_list ; do
+		if _start=$( /usr/local/bin/pot get-attr -p "$_pname" -A start-at-boot -q ) && [ "$_start" = "YES" ]; then
+			/usr/local/bin/pot start "$_pname"
 		fi
 	done
 }
 
 pot_stop()
 {
-	local _pname
-	for _pname in $pot_list ; do
-		if %%PREFIX%%/bin/${name} info -qp $_pname ; then
-			%%PREFIX%%/bin/${name} stop $_pname
-		else
-			echo "pot stop: pot $_pname not found"
+	local _pname _dyn_pot_list _start
+	_dyn_pot_list=$(/usr/local/bin/pot ls -q)
+	for _pname in $_dyn_pot_list ; do
+		if _start=$( /usr/local/bin/pot get-attr -p "$_pname" -A start-at-boot -q ) && [ "$_start" = "YES" ]; then
+			/usr/local/bin/pot stop "$_pname"
 		fi
 	done
 }
@@ -47,18 +62,22 @@ pot_stop()
 pot_restart()
 {
 	pot_stop
+	pot_deprecated_stop
 	sleep 5
 	pot_start
+	pot_deprecated_start
 }
 
 pot_status()
 {
-	local _p
-	for _p in $pot_list ; do
-		if %%PREFIX%%/bin/${name} info -qrp $_p ; then
-			echo "pot $_p is up and running"
-		else
-			echo "pot $_p is not running"
+	local _pname _dyn_pot_list _start
+	for _pname in $_dyn_pot_list ; do
+		if _start=$( /usr/local/bin/pot get-attr -p "$_pname" -A start-at-boot -q ) && [ "$_start" = "YES" ]; then
+			if /usr/local/bin/pot info -qrp "$_pname" ; then
+				echo "pot $_pname is up and running"
+			else
+				echo "pot $_pname is not running"
+			fi
 		fi
 	done
 }

Modified: head/sysutils/pot/pkg-plist
==============================================================================
--- head/sysutils/pot/pkg-plist	Mon Jun 24 07:24:28 2019	(r505010)
+++ head/sysutils/pot/pkg-plist	Mon Jun 24 08:02:18 2019	(r505011)
@@ -3,6 +3,7 @@ bin/pot
 @sample %%ETCDIR%%/pot.conf.sample
 %%ETCDIR%%/pot.default.conf
 %%DATADIR%%/add-dep.sh
+%%DATADIR%%/add-file.sh
 %%DATADIR%%/add-fscomp.sh
 %%DATADIR%%/clone-fscomp.sh
 %%DATADIR%%/clone.sh
@@ -14,8 +15,10 @@ bin/pot
 %%DATADIR%%/create.sh
 %%DATADIR%%/de-init.sh
 %%DATADIR%%/destroy.sh
+%%DATADIR%%/execute.sh
 %%DATADIR%%/export.sh
 %%DATADIR%%/export-ports.sh
+%%DATADIR%%/get-attribute.sh
 %%DATADIR%%/help.sh
 %%DATADIR%%/import.sh
 %%DATADIR%%/info.sh
@@ -26,6 +29,7 @@ bin/pot
 %%DATADIR%%/purge-snapshots.sh
 %%DATADIR%%/rename.sh
 %%DATADIR%%/revert.sh
+%%DATADIR%%/set-attribute.sh
 %%DATADIR%%/set-cmd.sh
 %%DATADIR%%/set-rss.sh
 %%DATADIR%%/show.sh



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906240802.x5O82IGv064301>