From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Apr 13 19:20:00 2014 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.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 8FC8D2A8 for ; Sun, 13 Apr 2014 19:20:00 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (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 6B2661BFE for ; Sun, 13 Apr 2014 19:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DJK00V065645 for ; Sun, 13 Apr 2014 19:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.8/8.14.8/Submit) id s3DJK0jT065644; Sun, 13 Apr 2014 19:20:00 GMT (envelope-from gnats) Resent-Date: Sun, 13 Apr 2014 19:20:00 GMT Resent-Message-Id: <201404131920.s3DJK0jT065644@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Daniel Morante Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 68200FD8 for ; Sun, 13 Apr 2014 19:15:03 +0000 (UTC) Received: from cgiserv.freebsd.org (cgiserv.freebsd.org [IPv6:2001:1900:2254:206a::50:4]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 53E021BC0 for ; Sun, 13 Apr 2014 19:15:03 +0000 (UTC) Received: from cgiserv.freebsd.org ([127.0.1.6]) by cgiserv.freebsd.org (8.14.8/8.14.8) with ESMTP id s3DJF2Fp071964 for ; Sun, 13 Apr 2014 19:15:02 GMT (envelope-from nobody@cgiserv.freebsd.org) Received: (from nobody@localhost) by cgiserv.freebsd.org (8.14.8/8.14.8/Submit) id s3DJF2d4071963; Sun, 13 Apr 2014 19:15:02 GMT (envelope-from nobody) Message-Id: <201404131915.s3DJF2d4071963@cgiserv.freebsd.org> Date: Sun, 13 Apr 2014 19:15:02 GMT From: Daniel Morante To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: ports/188567: [maintainer update] [patch] net-p2p/zetacoin: update to 0.8.99.16 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Apr 2014 19:20:00 -0000 >Number: 188567 >Category: ports >Synopsis: [maintainer update] [patch] net-p2p/zetacoin: update to 0.8.99.16 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sun Apr 13 19:20:00 UTC 2014 >Closed-Date: >Last-Modified: >Originator: Daniel Morante >Release: 9.2-RELEASE >Organization: The Daniel Morante Company, Inc. >Environment: FreeBSD saturn.morante.com 9.1-RELEASE-p10 FreeBSD 9.1-RELEASE-p10 #0: Sun Jan 12 10:32:09 UTC 2014 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC i386 >Description: - 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 Apply the included patch to /usr/ports instead of the net-p2p/zetacoin directory. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: GIDs =================================================================== --- GIDs (revision 351235) +++ GIDs (working copy) @@ -202,6 +202,7 @@ bnetd:*:700: bopm:*:717: openxpki:*:777: +zetacoin:*:780: foreman_proxy:*:812: puppet:*:814: jenkins:*:818: Index: UIDs =================================================================== --- UIDs (revision 351235) +++ UIDs (working copy) @@ -206,6 +206,7 @@ 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 Index: UPDATING =================================================================== --- UPDATING (revision 351235) +++ UPDATING (working copy) @@ -6,6 +6,19 @@ you update your ports collection, before attempting any port upgrades. 20140413: + 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 + +20140413: AFFECTS: Users of Python and pkg >= 1.2.7_1 AUTHOR: koobs@FreeBSD.org Index: net-p2p/zetacoin/Makefile =================================================================== --- net-p2p/zetacoin/Makefile (revision 351235) +++ net-p2p/zetacoin/Makefile (working copy) @@ -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 @@ 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 @@ .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=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 @@ -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} Index: net-p2p/zetacoin/distinfo =================================================================== --- net-p2p/zetacoin/distinfo (revision 351235) +++ net-p2p/zetacoin/distinfo (working copy) @@ -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 Index: net-p2p/zetacoin/files/patch-src__rpcdump.cpp =================================================================== --- net-p2p/zetacoin/files/patch-src__rpcdump.cpp (revision 351235) +++ net-p2p/zetacoin/files/patch-src__rpcdump.cpp (working copy) @@ -1,11 +0,0 @@ ---- src/rpcdump.cpp.orig 2014-01-16 19:35:10.000000000 +0000 -+++ src/rpcdump.cpp 2014-01-16 19:35:24.000000000 +0000 -@@ -27,7 +27,7 @@ - } - - int64 static DecodeDumpTime(const std::string &str) { -- static const boost::posix_time::time_input_facet facet("%Y-%m-%dT%H:%M:%SZ"); -+ static boost::posix_time::time_input_facet facet("%Y-%m-%dT%H:%M:%SZ"); - static const boost::posix_time::ptime epoch = boost::posix_time::from_time_t(0); - const std::locale loc(std::locale::classic(), &facet); - std::istringstream iss(str); Index: net-p2p/zetacoin/files/patch-src__serialize.h =================================================================== --- net-p2p/zetacoin/files/patch-src__serialize.h (revision 351235) +++ net-p2p/zetacoin/files/patch-src__serialize.h (working copy) @@ -1,22 +0,0 @@ ---- ./src/serialize.h.orig 2013-09-24 01:50:35.661706153 +0000 -+++ ./src/serialize.h 2013-09-24 01:50:52.913703572 +0000 -@@ -895,19 +895,6 @@ - iterator insert(iterator it, const char& x=char()) { return vch.insert(it, x); } - void insert(iterator it, size_type n, const char& x) { vch.insert(it, n, x); } - -- void insert(iterator it, const_iterator first, const_iterator last) -- { -- assert(last - first >= 0); -- if (it == vch.begin() + nReadPos && (unsigned int)(last - first) <= nReadPos) -- { -- // special case for inserting at the front when there's room -- nReadPos -= (last - first); -- memcpy(&vch[nReadPos], &first[0], last - first); -- } -- else -- vch.insert(it, first, last); -- } -- - void insert(iterator it, std::vector::const_iterator first, std::vector::const_iterator last) - { - assert(last - first >= 0); Index: net-p2p/zetacoin/files/pkg-message.in =================================================================== --- net-p2p/zetacoin/files/pkg-message.in (revision 351235) +++ net-p2p/zetacoin/files/pkg-message.in (working copy) @@ -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" ******************************************************************* Index: net-p2p/zetacoin/files/zetacoin.in =================================================================== --- net-p2p/zetacoin/files/zetacoin.in (revision 351235) +++ net-p2p/zetacoin/files/zetacoin.in (working copy) @@ -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} +: ${%%PORTNAME%%_enable:=NO} +: ${%%PORTNAME%%_config=%%PREFIX%%/etc/%%PORTNAME%%.conf} +: ${%%PORTNAME%%_datadir=/var/db/%%PORTNAME%%} +: ${%%PORTNAME%%_user="%%PORTNAME%%"} +: ${%%PORTNAME%%_group="%%PORTNAME%%"} -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}" +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 @@ 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 Index: net-p2p/zetacoin/pkg-plist =================================================================== --- net-p2p/zetacoin/pkg-plist (revision 351235) +++ net-p2p/zetacoin/pkg-plist (working copy) @@ -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 >Release-Note: >Audit-Trail: >Unformatted: