From owner-svn-ports-all@freebsd.org Tue Sep 25 16:25:44 2018 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7BEE910B5BF1; Tue, 25 Sep 2018 16:25:44 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2540D783B3; Tue, 25 Sep 2018 16:25:44 +0000 (UTC) (envelope-from fernape@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 1A5582A03; Tue, 25 Sep 2018 16:25:44 +0000 (UTC) (envelope-from fernape@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w8PGPh64029445; Tue, 25 Sep 2018 16:25:43 GMT (envelope-from fernape@FreeBSD.org) Received: (from fernape@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w8PGPh33029441; Tue, 25 Sep 2018 16:25:43 GMT (envelope-from fernape@FreeBSD.org) Message-Id: <201809251625.w8PGPh33029441@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fernape set sender to fernape@FreeBSD.org using -f From: =?UTF-8?Q?Fernando_Apestegu=c3=ada?= Date: Tue, 25 Sep 2018 16:25:43 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r480685 - in head/sysutils/tuptime: . files X-SVN-Group: ports-head X-SVN-Commit-Author: fernape X-SVN-Commit-Paths: in head/sysutils/tuptime: . files X-SVN-Commit-Revision: 480685 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2018 16:25:44 -0000 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 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