Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Sep 2018 16:25:43 +0000 (UTC)
From:      =?UTF-8?Q?Fernando_Apestegu=c3=ada?= <fernape@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r480685 - in head/sysutils/tuptime: . files
Message-ID:  <201809251625.w8PGPh33029441@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: fernape
Date: Tue Sep 25 16:25:43 2018
New Revision: 480685
URL: https://svnweb.freebsd.org/changeset/ports/480685

Log:
  sysutils/tuptime: update to 3.4.0
  
  PR:	231632
  Submitted by:	rfraile@rfraile.eu
  Approved by:	tcberner (mentor, implicit), jeremy@smart-serv.net (maintainer)

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

Modified: head/sysutils/tuptime/Makefile
==============================================================================
--- head/sysutils/tuptime/Makefile	Tue Sep 25 16:13:04 2018	(r480684)
+++ head/sysutils/tuptime/Makefile	Tue Sep 25 16:25:43 2018	(r480685)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	tuptime
-DISTVERSION=	3.3.3
+DISTVERSION=	3.4.0
 CATEGORIES=	sysutils
 
 MAINTAINER=	jeremy@smart-serv.net
@@ -13,22 +13,20 @@ LICENSE=	GPLv2
 RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sqlite3>=2.7:databases/py-sqlite3@${PY_FLAVOR}
 
 USES=		python:run shebangfix
+SHEBANG_FILES=	${WRKSRC}/src/tuptime
 USE_GITHUB=	yes
 GH_ACCOUNT=	rfrail3
+USE_RC_SUBR=	${PORTNAME}
+
 NO_BUILD=	yes
 NO_ARCH=	yes
-USE_RC_SUBR=	${PORTNAME}
-SHEBANG_FILES=	${WRKSRC}/src/tuptime ${WRKSRC}/scripts/*
 SUB_FILES=	pkg-message
 
 PLIST_FILES=	bin/tuptime \
-		${EXAMPLESDIR}/db-tuptime-migrate.sh \
-		${EXAMPLESDIR}/db-tuptime-migrate-3.0-to-3.1.sh
+		man/man1/tuptime.1.gz
 
 do-install:
-	@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
 	${INSTALL_SCRIPT} ${WRKSRC}/src/tuptime ${STAGEDIR}${PREFIX}/bin/tuptime
-	${INSTALL_SCRIPT} ${WRKSRC}/scripts/db-tuptime-migrate.sh ${STAGEDIR}${EXAMPLESDIR}/db-tuptime-migrate.sh
-	${INSTALL_SCRIPT} ${WRKSRC}/scripts/db-tuptime-migrate-3.0-to-3.1.sh ${STAGEDIR}${EXAMPLESDIR}/db-tuptime-migrate-3.0-to-3.1.sh
+	${INSTALL_MAN} ${WRKSRC}/src/man/tuptime.1 ${STAGEDIR}${MANPREFIX}/man/man1
 
 .include <bsd.port.mk>

Modified: head/sysutils/tuptime/distinfo
==============================================================================
--- head/sysutils/tuptime/distinfo	Tue Sep 25 16:13:04 2018	(r480684)
+++ head/sysutils/tuptime/distinfo	Tue Sep 25 16:25:43 2018	(r480685)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1519352885
-SHA256 (rfrail3-tuptime-3.3.3_GH0.tar.gz) = be4dc5207859eeb0e6cfef206db5dd62b553e69ac0641c7203278cdd61c95bea
-SIZE (rfrail3-tuptime-3.3.3_GH0.tar.gz) = 35348
+TIMESTAMP = 1537724492
+SHA256 (rfrail3-tuptime-3.4.0_GH0.tar.gz) = 9f917daed6d3a6f592072a3165d99c7b41fc4e8ed6e2e4fbc4ab670fb0c1c82b
+SIZE (rfrail3-tuptime-3.4.0_GH0.tar.gz) = 43003

Modified: head/sysutils/tuptime/files/pkg-message.in
==============================================================================
--- head/sysutils/tuptime/files/pkg-message.in	Tue Sep 25 16:13:04 2018	(r480684)
+++ head/sysutils/tuptime/files/pkg-message.in	Tue Sep 25 16:25:43 2018	(r480685)
@@ -1,12 +1,13 @@
 ======================================================================
 
-tuptime requires the following be added to /etc/crontab:
+tuptime requires execution at startup and shutdown on rc.d, please
+add to /etc/rc.conf:
 
-	*/5 * * * * root %%PREFIX%%/bin/tuptime -x > /dev/null
+	tuptime_enable="YES"
 
-If you are upgrading from an older version you need to run the following scripts:
+tuptime requires a scheduled execution on cron, please add to
+/etc/crontab:
 
-	%%EXAMPLESDIR%%/db-tuptime-migrate.sh
-	%%EXAMPLESDIR%%/db-tuptime-migrate-3.0-to-3.1.sh
+	*/5 * * * * root %%PREFIX%%/bin/tuptime -x > /dev/null
 
 ======================================================================

Modified: head/sysutils/tuptime/files/tuptime.in
==============================================================================
--- head/sysutils/tuptime/files/tuptime.in	Tue Sep 25 16:13:04 2018	(r480684)
+++ head/sysutils/tuptime/files/tuptime.in	Tue Sep 25 16:25:43 2018	(r480685)
@@ -1,32 +1,39 @@
+# $FreeBSD$
 #!/bin/sh
 #
-# $FreeBSD$
-#
 # PROVIDE: tuptime
+# REQUIRE: DAEMON
 # KEYWORD: nojail shutdown
 
 . /etc/rc.subr
 
 name="tuptime"
 rcvar=tuptime_enable
+tuptime_user="tuptime"
 
-command="%%PREFIX%%/bin/tuptime"
-
 start_cmd="${name}_start"
 stop_cmd="${name}_stop"
 
+export PATH=$PATH:/usr/local/bin/
+
 tuptime_start()
 {
 	command_args="-x"
-
-	$command $command_args
+	if /usr/sbin/pw usershow "${tuptime_user}" >/dev/null 2>&1; then
+		su -m ${tuptime_user} -c "$name $command_args"
+	else
+		$name $command_args
+	fi
 }
 
 tuptime_stop()
 {
 	command_args="-xg"
-
-	$command $command_args
+	if /usr/sbin/pw usershow "${tuptime_user}" >/dev/null 2>&1; then
+		su -m ${tuptime_user} -c "$name $command_args"
+	else
+		$name $command_args
+	fi
 }
 
 load_rc_config $name



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