From owner-svn-ports-all@FreeBSD.ORG Tue Jun 3 18:33:50 2014 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD0CF68B; Tue, 3 Jun 2014 18:33:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCA1428F2; Tue, 3 Jun 2014 18:33:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s53IXoDx014005; Tue, 3 Jun 2014 18:33:50 GMT (envelope-from cs@svn.freebsd.org) Received: (from cs@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s53IXnT5013994; Tue, 3 Jun 2014 18:33:49 GMT (envelope-from cs@svn.freebsd.org) Message-Id: <201406031833.s53IXnT5013994@svn.freebsd.org> From: Carlo Strub Date: Tue, 3 Jun 2014 18:33:49 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r356387 - in head: . net-p2p/zetacoin net-p2p/zetacoin/files X-SVN-Group: ports-head 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.18 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, 03 Jun 2014 18:33:51 -0000 Author: cs Date: Tue Jun 3 18:33:48 2014 New Revision: 356387 URL: http://svnweb.freebsd.org/changeset/ports/356387 QAT: https://qat.redports.org/buildarchive/r356387/ Log: - Update Zetacoin to 0.8.99.16 - zetacoind now runs as the zetacoin user - Fixed stop function in rc.d script - Minor changes to pkg-message.in, pkg-plist, and rc.d script to use the PORTNAME variable - Remove patch files: patch-src__serialize.h and patch-src__rpcdump.cpp since they are no longer needed. - Added user and group "zetacoin" to ports/UIDs and ports/GIDs - Added update instructions to ports/UPDATING PR: 188567 Submitted by: daniel@morante.net (maintainer) Deleted: head/net-p2p/zetacoin/files/patch-src__rpcdump.cpp head/net-p2p/zetacoin/files/patch-src__serialize.h Modified: head/GIDs head/UIDs head/UPDATING head/net-p2p/zetacoin/Makefile head/net-p2p/zetacoin/distinfo head/net-p2p/zetacoin/files/pkg-message.in head/net-p2p/zetacoin/files/zetacoin.in head/net-p2p/zetacoin/pkg-plist Modified: head/GIDs ============================================================================== --- head/GIDs Tue Jun 3 18:21:21 2014 (r356386) +++ head/GIDs Tue Jun 3 18:33:48 2014 (r356387) @@ -204,6 +204,7 @@ riak:*:667: bnetd:*:700: bopm:*:717: openxpki:*:777: +zetacoin:*:780: foreman_proxy:*:812: puppet:*:814: jenkins:*:818: Modified: head/UIDs ============================================================================== --- head/UIDs Tue Jun 3 18:21:21 2014 (r356386) +++ head/UIDs Tue Jun 3 18:33:48 2014 (r356387) @@ -208,6 +208,7 @@ riak:*:667:667::0:0:Riak user:/usr/local bnetd:*:700:700::0:0:Bnetd user:/nonexistent:/usr/sbin/nologin bopm:*:717:717::0:0:Blitzed Open Proxy Monitor:/nonexistent:/bin/sh openxpki:*:777:777::0:0:OpenXPKI Owner:/nonexistent:/usr/sbin/nologin +zetacoin:*:780:780::0:0:ZetaCoin Daemon:/nonexistent:/usr/sbin/nologin foreman_proxy:*:812:812::0:0:Foreman Smart Proxy:/usr/local/share/foreman-proxy:/usr/sbin/nologin puppet:*:814:814::0:0:Puppet Daemon:/nonexistent:/usr/sbin/nologin jenkins:*:818:818::0:0:Jenkins CI:/usr/local/jenkins:/bin/sh Modified: head/UPDATING ============================================================================== --- head/UPDATING Tue Jun 3 18:21:21 2014 (r356386) +++ head/UPDATING Tue Jun 3 18:33:48 2014 (r356387) @@ -5,6 +5,19 @@ they are unavoidable. You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20140603 + AFFECTS: users of net-p2p/zetacoin + AUTHOR: daniel@morante.net + + The zetacoind process now runs as the zetacoin user. Please make sure that + this user has appropriate permissions to the blockchain database and wallet + directory. + + If you are using the default path, run: + + # chown -R zetacoin:zetacoin /var/db/zetacoin + # chown -R zetacoin:zetacoin /.zetacoin + 20140529 AFFECTS: users of databases/postgresql??-(server|client) AUTHOR: mat@FreeBSD.org Modified: head/net-p2p/zetacoin/Makefile ============================================================================== --- head/net-p2p/zetacoin/Makefile Tue Jun 3 18:21:21 2014 (r356386) +++ head/net-p2p/zetacoin/Makefile Tue Jun 3 18:33:48 2014 (r356387) @@ -2,8 +2,7 @@ # $FreeBSD$ PORTNAME= zetacoin -PORTVERSION= 0.8.99.6 -PORTREVISION= 1 +PORTVERSION= 0.8.99.16 CATEGORIES= net-p2p finance MASTER_SITES= GH @@ -22,8 +21,8 @@ QRCODES_DESC= Build with QR code display USE_GITHUB= yes GH_ACCOUNT= ${PORTNAME} GH_PROJECT= ${PORTNAME} -GH_COMMIT= e804194 -GH_TAGNAME= e804194 +GH_COMMIT= 9a52761 +GH_TAGNAME= 9a52761 USES= gmake USE_OPENSSL= yes @@ -39,9 +38,12 @@ CXXFLAGS+= -Wno-invalid-offsetof .if ${PORT_OPTIONS:MX11} PLIST_SUB+= X11="" .else +SUB_LIST+= PORTNAME=${PORTNAME} USE_RC_SUBR= ${PORTNAME} SUB_FILES= pkg-message PLIST_SUB+= X11="@comment " +USERS= ${PORTNAME} +GROUPS= ${PORTNAME} .endif .if ${PORT_OPTIONS:MX11} @@ -61,7 +63,8 @@ QMAKE_USE_QRCODE=1 QMAKE_USE_QRCODE=0 .endif -PLIST_SUB+= EXECUTABLE="bin/${BINARY}" +PLIST_SUB+= EXECUTABLE="bin/${BINARY}" \ + PORTNAME=${PORTNAME} .if ${PORT_OPTIONS:MUPNP} LIB_DEPENDS+= libminiupnpc.so:${PORTSDIR}/net/miniupnpc @@ -98,8 +101,8 @@ do-install: -e 's,bitcoin,zetacoin,g' \ -e 's,Bitcoin,Zetacoin,g' \ -e 's,128,,g' ${WRKSRC}/contrib/debian/bitcoin-qt.desktop - ${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop ${STAGEDIR}${PREFIX}/share/applications/zetacoin-qt.desktop - ${INSTALL} ${WRKSRC}/src/qt/res/icons/bitcoin.png ${STAGEDIR}${PREFIX}/share/pixmaps/zetacoin.png + ${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}-qt.desktop + ${INSTALL} ${WRKSRC}/src/qt/res/icons/bitcoin.png ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png .else ${INSTALL_PROGRAM} -s ${WRKSRC}/src/${BINARY} ${STAGEDIR}${PREFIX}/bin/${BINARY} Modified: head/net-p2p/zetacoin/distinfo ============================================================================== --- head/net-p2p/zetacoin/distinfo Tue Jun 3 18:21:21 2014 (r356386) +++ head/net-p2p/zetacoin/distinfo Tue Jun 3 18:33:48 2014 (r356387) @@ -1,2 +1,2 @@ -SHA256 (zetacoin-0.8.99.6.tar.gz) = c1c105330e997b2604cc8ecdef50897b79c4395915d67fdbb773c2d3b63be585 -SIZE (zetacoin-0.8.99.6.tar.gz) = 2184876 +SHA256 (zetacoin-0.8.99.16.tar.gz) = e8e15cf23eb9498f9de61591755c2bd5673ee759ea82e6dd349397b72556d210 +SIZE (zetacoin-0.8.99.16.tar.gz) = 2186180 Modified: head/net-p2p/zetacoin/files/pkg-message.in ============================================================================== --- head/net-p2p/zetacoin/files/pkg-message.in Tue Jun 3 18:21:21 2014 (r356386) +++ head/net-p2p/zetacoin/files/pkg-message.in Tue Jun 3 18:33:48 2014 (r356387) @@ -1,12 +1,12 @@ ******************************************************************* To configure the Zetacoin server please edit: -%%PREFIX%%/etc/zetacoin.conf +%%PREFIX%%/etc/%%PORTNAME%%.conf You must at least set a "rpcpassword" in the configuration file above. -To run the zetacoind server at startup, add the following +To run the %%PORTNAME%%d server at startup, add the following settings to your /etc/rc.conf -zetacoin_enable="YES" +%%PORTNAME%%_enable="YES" ******************************************************************* Modified: head/net-p2p/zetacoin/files/zetacoin.in ============================================================================== --- head/net-p2p/zetacoin/files/zetacoin.in Tue Jun 3 18:21:21 2014 (r356386) +++ head/net-p2p/zetacoin/files/zetacoin.in Tue Jun 3 18:33:48 2014 (r356387) @@ -3,7 +3,7 @@ # $FreeBSD$ # -# PROVIDE: zetacoin +# PROVIDE: %%PORTNAME%% # REQUIRE: LOGIN # KEYWORD: shutdown @@ -11,44 +11,52 @@ # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # -# zetacoin_enable (bool): Set to NO by default. -# Set it to YES to enable zetacoin. -# zetacoin_config (path): Set to %%PREFIX%%/etc/zetacoin.conf +# %%PORTNAME%%_enable (bool): Set to NO by default. +# Set it to YES to enable %%PORTNAME%%. +# %%PORTNAME%%_config (path): Set to %%PREFIX%%/etc/%%PORTNAME%%.conf # by default. -# zetacoin_datadir (str): Default to "/var/db/zetacoin" +# %%PORTNAME%%_user: The user account %%PORTNAME%% daemon runs as +# It uses '%%PORTNAME%%' user by default. +# %%PORTNAME%%_group: The group account %%PORTNAME%% daemon runs as +# It uses '%%PORTNAME%%' group by default. +# %%PORTNAME%%_datadir (str): Default to "/var/db/%%PORTNAME%%" # Base data directory. . /etc/rc.subr -name=zetacoin -rcvar=zetacoin_enable +name=%%PORTNAME%% +rcvar=%%PORTNAME%%_enable -: ${zetacoin_enable:=NO} -: ${zetacoin_config=%%PREFIX%%/etc/zetacoin.conf} -: ${zetacoin_datadir=/var/db/zetacoin} - -required_files=${zetacoin_config} -command=%%PREFIX%%/bin/zetacoind -zetacoin_chdir=${zetacoin_datadir} -pidfile="${zetacoin_datadir}/zetacoind.pid" -stop_cmd=zetacoin_stop -command_args="-conf=${zetacoin_config} -datadir=${zetacoin_datadir} -noupnp -daemon -pid=${pidfile}" +: ${%%PORTNAME%%_enable:=NO} +: ${%%PORTNAME%%_config=%%PREFIX%%/etc/%%PORTNAME%%.conf} +: ${%%PORTNAME%%_datadir=/var/db/%%PORTNAME%%} +: ${%%PORTNAME%%_user="%%PORTNAME%%"} +: ${%%PORTNAME%%_group="%%PORTNAME%%"} + +required_files=${%%PORTNAME%%_config} +command=%%PREFIX%%/bin/%%PORTNAME%%d +%%PORTNAME%%_chdir=${%%PORTNAME%%_datadir} +pidfile="${%%PORTNAME%%_datadir}/%%PORTNAME%%d.pid" +stop_cmd=%%PORTNAME%%_stop +command_args="-conf=${%%PORTNAME%%_config} -datadir=${%%PORTNAME%%_datadir} -noupnp -daemon -pid=${pidfile}" start_precmd="${name}_prestart" -zetacoin_create_datadir() +%%PORTNAME%%_create_datadir() { echo "Creating data directory" - eval mkdir -p ${zetacoin_datadir} + eval mkdir -p ${%%PORTNAME%%_datadir} + [ $? -eq 0 ] && chown -R ${%%PORTNAME%%_user}:${%%PORTNAME%%_group} ${%%PORTNAME%%_datadir} + ln -s ${%%PORTNAME%%_datadir} /.%%PORTNAME%% } -zetacoin_prestart() +%%PORTNAME%%_prestart() { - if [ ! -d "${zetacoin_datadir}/." ]; then - zetacoin_create_datadir || return 1 + if [ ! -d "${%%PORTNAME%%_datadir}/." ]; then + %%PORTNAME%%_create_datadir || return 1 fi } -zetacoin_requirepidfile() +%%PORTNAME%%_requirepidfile() { if [ ! "0`check_pidfile ${pidfile} ${command}`" -gt 1 ]; then echo "${name} not running? (check $pidfile)." @@ -56,15 +64,13 @@ zetacoin_requirepidfile() fi } -zetacoin_stop() +%%PORTNAME%%_stop() { - zetacoin_requirepidfile + %%PORTNAME%%_requirepidfile - if checkyesno ${rcvar}; then - echo "Stopping ${name}." - eval ${command} -conf=${zetacoin_config} -datadir=${zetacoin_datadir} stop - wait_for_pids ${pidfile} - fi + echo "Stopping ${name}." + eval ${command} -conf=${%%PORTNAME%%_config} -datadir=${%%PORTNAME%%_datadir} stop + wait_for_pids ${rc_pid} } load_rc_config $name Modified: head/net-p2p/zetacoin/pkg-plist ============================================================================== --- head/net-p2p/zetacoin/pkg-plist Tue Jun 3 18:21:21 2014 (r356386) +++ head/net-p2p/zetacoin/pkg-plist Tue Jun 3 18:33:48 2014 (r356387) @@ -1,6 +1,6 @@ %%EXECUTABLE%% -%%X11%%share/applications/zetacoin-qt.desktop -%%X11%%share/pixmaps/zetacoin.png -%%HEADLESS%%@unexec if cmp -s %D/etc/zetacoin.conf.sample %D/etc/zetacoin.conf; then rm -f %D/etc/zetacoin.conf; fi -%%HEADLESS%%etc/zetacoin.conf.sample -%%HEADLESS%%@exec if [ ! -f %D/etc/zetacoin.conf ] ; then cp -p %D/%F %B/zetacoin.conf; fi +%%X11%%share/applications/%%PORTNAME%%-qt.desktop +%%X11%%share/pixmaps/%%PORTNAME%%.png +%%HEADLESS%%@unexec if cmp -s %D/etc/%%PORTNAME%%.conf.sample %D/etc/%%PORTNAME%%.conf; then rm -f %D/etc/%%PORTNAME%%.conf; fi +%%HEADLESS%%etc/%%PORTNAME%%.conf.sample +%%HEADLESS%%@exec if [ ! -f %D/etc/%%PORTNAME%%.conf ] ; then cp -p %D/%F %B/%%PORTNAME%%.conf; fi