diff options
-rw-r--r-- | GIDs | 1 | ||||
-rw-r--r-- | UIDs | 1 | ||||
-rw-r--r-- | UPDATING | 13 | ||||
-rw-r--r-- | net-p2p/zetacoin/Makefile | 17 | ||||
-rw-r--r-- | net-p2p/zetacoin/distinfo | 4 | ||||
-rw-r--r-- | net-p2p/zetacoin/files/patch-src__rpcdump.cpp | 11 | ||||
-rw-r--r-- | net-p2p/zetacoin/files/patch-src__serialize.h | 22 | ||||
-rw-r--r-- | net-p2p/zetacoin/files/pkg-message.in | 6 | ||||
-rw-r--r-- | net-p2p/zetacoin/files/zetacoin.in | 64 | ||||
-rw-r--r-- | net-p2p/zetacoin/pkg-plist | 10 |
10 files changed, 70 insertions, 79 deletions
@@ -204,6 +204,7 @@ riak:*:667: bnetd:*:700: bopm:*:717: openxpki:*:777: +zetacoin:*:780: foreman_proxy:*:812: puppet:*:814: jenkins:*:818: @@ -208,6 +208,7 @@ riak:*:667:667::0:0:Riak user:/usr/local/lib/riak:/bin/sh 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 @@ -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 diff --git a/net-p2p/zetacoin/Makefile b/net-p2p/zetacoin/Makefile index 3a92eb38aa0b..9123e89b60ff 100644 --- a/net-p2p/zetacoin/Makefile +++ b/net-p2p/zetacoin/Makefile @@ -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} diff --git a/net-p2p/zetacoin/distinfo b/net-p2p/zetacoin/distinfo index 4e5b34ff85de..9e91f5bf61ad 100644 --- a/net-p2p/zetacoin/distinfo +++ b/net-p2p/zetacoin/distinfo @@ -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 diff --git a/net-p2p/zetacoin/files/patch-src__rpcdump.cpp b/net-p2p/zetacoin/files/patch-src__rpcdump.cpp deleted file mode 100644 index 2fe96672be95..000000000000 --- a/net-p2p/zetacoin/files/patch-src__rpcdump.cpp +++ /dev/null @@ -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); diff --git a/net-p2p/zetacoin/files/patch-src__serialize.h b/net-p2p/zetacoin/files/patch-src__serialize.h deleted file mode 100644 index e13520bf9f7d..000000000000 --- a/net-p2p/zetacoin/files/patch-src__serialize.h +++ /dev/null @@ -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<char>::const_iterator first, std::vector<char>::const_iterator last) - { - assert(last - first >= 0); diff --git a/net-p2p/zetacoin/files/pkg-message.in b/net-p2p/zetacoin/files/pkg-message.in index e529a6950db7..4700f3ce54dd 100644 --- a/net-p2p/zetacoin/files/pkg-message.in +++ b/net-p2p/zetacoin/files/pkg-message.in @@ -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" ******************************************************************* diff --git a/net-p2p/zetacoin/files/zetacoin.in b/net-p2p/zetacoin/files/zetacoin.in index c59cd402f4ed..bff4595ef1b2 100644 --- a/net-p2p/zetacoin/files/zetacoin.in +++ b/net-p2p/zetacoin/files/zetacoin.in @@ -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 @@ 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 diff --git a/net-p2p/zetacoin/pkg-plist b/net-p2p/zetacoin/pkg-plist index cd22c67d3eda..cf8ce5147b65 100644 --- a/net-p2p/zetacoin/pkg-plist +++ b/net-p2p/zetacoin/pkg-plist @@ -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 |