Date: Tue, 27 Aug 2019 13:44:18 +0000 (UTC) From: Alex Dupre <ale@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r510014 - in head/net-p2p: litecoin litecoin-daemon litecoin-utils litecoin/files Message-ID: <201908271344.x7RDiIpT064780@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ale Date: Tue Aug 27 13:44:17 2019 New Revision: 510014 URL: https://svnweb.freebsd.org/changeset/ports/510014 Log: Update to 0.17.1 release and add the option (default enabled) to use a newer BDB version (sync with bitcoin port). PR: 240058 Submitted by: ale Approved by: maintainer Added: head/net-p2p/litecoin/files/litecoin-qt.desktop (contents, props changed) head/net-p2p/litecoin/pkg-help (contents, props changed) Deleted: head/net-p2p/litecoin/files/patch-src_leveldb_helpers_memenv_memenv.cc Modified: head/net-p2p/litecoin-daemon/Makefile head/net-p2p/litecoin-utils/Makefile head/net-p2p/litecoin/Makefile head/net-p2p/litecoin/distinfo head/net-p2p/litecoin/files/litecoind.in Modified: head/net-p2p/litecoin-daemon/Makefile ============================================================================== --- head/net-p2p/litecoin-daemon/Makefile Tue Aug 27 13:37:08 2019 (r510013) +++ head/net-p2p/litecoin-daemon/Makefile Tue Aug 27 13:44:17 2019 (r510014) @@ -7,17 +7,19 @@ COMMENT= Virtual Peer-to-Peer Currency (Daemon) SLAVE_PORT= yes -NOT_FOR_ARCHS= powerpc64 sparc64 +NOT_FOR_ARCHS= powerpc powerpc64 sparc64 NOT_FOR_ARCHS_REASON= configure: error: Big Endian not supported +OPTIONS_DEFINE= DEBUG HARDENING TESTS UPNP ZMQ +# WALLET_BDBMODERN is a choice for WALLET, introduced via OPTIONS_RADIO=WALLET +# from ${MASTERDIR}/Makefile +OPTIONS_DEFAULT= HARDENING UPNP WALLET_BDBMODERN ZMQ + USES+= cpe CPE_VENDOR= bitcoin CPE_PRODUCT= bitcoind CPE_VERSION= ${PORTVERSION:R} -OPTIONS_DEFINE= DEBUG HARDENING TESTS UPNP WALLET ZMQ -OPTIONS_DEFAULT= HARDENING WALLET ZMQ - USERS= litecoin GROUPS= litecoin @@ -25,8 +27,7 @@ CONFIGURE_ARGS= --with-daemon \ --without-gui \ --without-libs \ --without-qrencode \ - --without-utils \ - --disable-reduce-exports + --without-utils PLIST_FILES= bin/litecoind PLIST_FILES+= man/man1/litecoind.1.gz @@ -35,6 +36,6 @@ PLIST_FILES+= "@sample etc/litecoin.conf.sample" USE_RC_SUBR= litecoind post-install: - ${INSTALL_DATA} ${WRKSRC}/contrib/debian/examples/bitcoin.conf ${STAGEDIR}${PREFIX}/etc/litecoin.conf.sample + ${INSTALL_DATA} ${WRKSRC}/share/examples/litecoin.conf ${STAGEDIR}${PREFIX}/etc/litecoin.conf.sample .include "${MASTERDIR}/Makefile" Modified: head/net-p2p/litecoin-utils/Makefile ============================================================================== --- head/net-p2p/litecoin-utils/Makefile Tue Aug 27 13:37:08 2019 (r510013) +++ head/net-p2p/litecoin-utils/Makefile Tue Aug 27 13:44:17 2019 (r510014) @@ -4,22 +4,24 @@ MASTERDIR= ${.CURDIR}/../litecoin PKGNAMESUFFIX= -utils COMMENT= Virtual Peer-to-Peer Currency (CLI and Utilities) - SLAVE_PORT= yes -NOT_FOR_ARCHS= powerpc64 sparc64 +NOT_FOR_ARCHS= powerpc powerpc64 sparc64 NOT_FOR_ARCHS_REASON= configure: error: Big Endian not supported OPTIONS_DEFINE= DEBUG HARDENING TESTS +OPTIONS_RADIO= OPTIONS_DEFAULT= HARDENING TESTS +PKGHELP= ${NONEXISTENT} + CONFIGURE_ARGS= --without-daemon \ --without-gui \ --without-libs \ --without-qrencode \ + --without-miniupnpc \ --with-utils \ - --disable-wallet \ - --disable-reduce-exports + --disable-wallet PLIST_FILES= bin/litecoin-cli bin/litecoin-tx \ man/man1/litecoin-cli.1.gz man/man1/litecoin-tx.1.gz Modified: head/net-p2p/litecoin/Makefile ============================================================================== --- head/net-p2p/litecoin/Makefile Tue Aug 27 13:37:08 2019 (r510013) +++ head/net-p2p/litecoin/Makefile Tue Aug 27 13:44:17 2019 (r510014) @@ -1,24 +1,21 @@ # $FreeBSD$ PORTNAME= litecoin -PORTVERSION= 0.16.3 +PORTVERSION= 0.17.1 DISTVERSIONPREFIX= v -PORTREVISION= 12 +PORTREVISION?= 0 CATEGORIES= net-p2p finance MAINTAINER= hsw@bitmark.com COMMENT?= Virtual Peer-to-Peer Currency Client (QT) LICENSE= MIT -LICENSE_FILE= ${WRKSRC}/COPYING -NOT_FOR_ARCHS= powerpc powerpc64 sparc64 -NOT_FOR_ARCHS_REASON= fails to configure: "Big Endian not supported" - LIB_DEPENDS= libboost_date_time.so:devel/boost-libs \ libevent.so:devel/libevent -USES+= autoreconf compiler:c++11-lib gmake libtool pkgconfig qt:5 ssl +USES= autoreconf compiler:c++11-lib gmake libtool pkgconfig qt:5 shebangfix ssl + USE_GITHUB= yes GNU_CONFIGURE= yes @@ -32,24 +29,26 @@ USE_QT= core gui network widgets \ BUILD_DEPENDS+= protoc:devel/protobuf LIB_DEPENDS+= libprotobuf.so:devel/protobuf -TESTS_USES= qt:5 TESTS_USE= QT=testlib TESTS_PLIST_FILES= bin/test_litecoin-qt \ bin/test_litecoin .endif -OPTIONS_DEFINE?= DBUS DEBUG HARDENING QRCODES TESTS UPNP WALLET ZMQ -OPTIONS_DEFAULT?= DBUS HARDENING QRCODES UPNP WALLET ZMQ +OPTIONS_DEFINE?= DBUS DEBUG HARDENING QRCODES TESTS UPNP ZMQ +OPTIONS_RADIO?= WALLET +OPTIONS_RADIO_WALLET?= WALLET_BDB48 WALLET_BDBMODERN +OPTIONS_DEFAULT?= DBUS HARDENING QRCODES UPNP WALLET_BDBMODERN ZMQ OPTIONS_SUB= yes HARDENING_DESC= Attempt to harden binaries (PIE for ASLR, NX Stack) QRCODES_DESC= Display QR Codes TESTS_DESC= Build test binary and unit tests WALLET_DESC= Wallet Management Support +WALLET_BDB48_DESC= Wallet using BDB 4.8 +WALLET_BDBMODERN_DESC= Wallet using modern BDB 5.x or 6.x ZMQ_DESC= Block and transaction broadcasting with ZeroMQ DBUS_CONFIGURE_WITH= dbus -DBUS_USES= qt:5 DBUS_USE= QT=dbus DEBUG_CONFIGURE_ENABLE= debug @@ -71,11 +70,6 @@ UPNP_LIBS= -L${LOCALBASE}/lib QRCODES_CONFIGURE_WITH= qrencode QRCODES_LIB_DEPENDS= libqrencode.so:graphics/libqrencode -WALLET_CONFIGURE_ENABLE= wallet -WALLET_CXXFLAGS= -I${BDB_INCLUDE_DIR} -WALLET_LIBS= -L${BDB_LIB_DIR} -WALLET_USES= bdb:48 - ZMQ_CONFIGURE_ENABLE= zmq ZMQ_BUILD_DEPENDS= libzmq4>0:net/libzmq4 ZMQ_RUN_DEPENDS= libzmq4>0:net/libzmq4 @@ -89,28 +83,38 @@ CONFIGURE_ARGS?= --without-libs \ CONFIGURE_ENV= CRYPTO_CFLAGS="-I${OPENSSLINC}" CRYPTO_LIBS="-L${OPENSSLLIB} -lcrypto" \ SSL_CFLAGS="-I${OPENSSLINC}" SSL_LIBS="-L${OPENSSLLIB} -lssl" \ - OBJCXX="${CXX}" OBJCXXFLAGS="${CXXFLAGS}" V=1 + OBJCXX="${CXX}" OBJCXXFLAGS="${CXXFLAGS}" MAKE_ENV+= V=1 PLIST_FILES?= bin/litecoin-qt man/man1/litecoin-qt.1.gz \ - share/applications/litecoin-qt.desktop share/pixmaps/litecoin128.png + share/applications/litecoin-qt.desktop share/pixmaps/litecoin.png +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MWALLET_BDB48} +CONFIGURE_ARGS+= --enable-wallet +USES+= bdb:48 +.elif ${PORT_OPTIONS:MWALLET_BDBMODERN} +CONFIGURE_ARGS+= --enable-wallet --with-incompatible-bdb +USES+= bdb:5+ +.else +CONFIGURE_ARGS+= --disable-wallet +.endif + .include <bsd.port.pre.mk> +.if ${PORT_OPTIONS:MWALLET_BDB48} || ${PORT_OPTIONS:MWALLET_BDBMODERN} +CPPFLAGS+= -I${BDB_INCLUDE_DIR} +LIBS+= -L${BDB_LIB_DIR} +.endif + .if defined(SLAVE_PORT) && ${SLAVE_PORT} == "no" -post-patch: - @${REINPLACE_CMD} -e 's|bitcoin|litecoin|g' \ - -e 's|Bitcoin|Litecoin|g' \ - ${WRKSRC}/contrib/debian/bitcoin-qt.desktop - post-install: - @${REINPLACE_CMD} -e 's,=/usr,=${PREFIX},' \ - ${WRKSRC}/contrib/debian/bitcoin-qt.desktop - ${INSTALL} ${WRKSRC}/contrib/debian/bitcoin-qt.desktop \ - ${STAGEDIR}${PREFIX}/share/applications/litecoin-qt.desktop + ${INSTALL} ${FILESDIR}/litecoin-qt.desktop \ + ${STAGEDIR}${PREFIX}/share/applications/ ${INSTALL} ${WRKSRC}/share/pixmaps/bitcoin128.png \ - ${STAGEDIR}${PREFIX}/share/pixmaps/litecoin128.png + ${STAGEDIR}${PREFIX}/share/pixmaps/litecoin.png .endif Modified: head/net-p2p/litecoin/distinfo ============================================================================== --- head/net-p2p/litecoin/distinfo Tue Aug 27 13:37:08 2019 (r510013) +++ head/net-p2p/litecoin/distinfo Tue Aug 27 13:44:17 2019 (r510014) @@ -1,3 +1,3 @@ -TIMESTAMP = 1537577883 -SHA256 (litecoin-project-litecoin-v0.16.3_GH0.tar.gz) = 7788800eb4a433696a464563384cbdf83a47eebb8698325c75314171833227c8 -SIZE (litecoin-project-litecoin-v0.16.3_GH0.tar.gz) = 5776885 +TIMESTAMP = 1562572626 +SHA256 (litecoin-project-litecoin-v0.17.1_GH0.tar.gz) = 6e05514a480990f1ff1e7c81b5443d741f4016c03ab5c1ef44bf4b169af88bee +SIZE (litecoin-project-litecoin-v0.17.1_GH0.tar.gz) = 4717718 Added: head/net-p2p/litecoin/files/litecoin-qt.desktop ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-p2p/litecoin/files/litecoin-qt.desktop Tue Aug 27 13:44:17 2019 (r510014) @@ -0,0 +1,14 @@ +[Desktop Entry] +Version=1.0 +Name=Litecoin Core +Comment=Connect to the Litecoin P2P Network +Comment[de]=Verbinde mit dem Litecoin peer-to-peer Netzwerk +Comment[fr]=Litecoin, monnaie virtuelle cryptographique pair à pair +Comment[tr]=Litecoin, esten ese kriptografik sanal para birimi +Exec=litecoin-qt %u +Terminal=false +Type=Application +Icon=litecoin +MimeType=x-scheme-handler/litecoin; +Categories=Office;Finance; +StartupWMClass=Litecoin-qt Modified: head/net-p2p/litecoin/files/litecoind.in ============================================================================== --- head/net-p2p/litecoin/files/litecoind.in Tue Aug 27 13:37:08 2019 (r510013) +++ head/net-p2p/litecoin/files/litecoind.in Tue Aug 27 13:44:17 2019 (r510014) @@ -2,7 +2,7 @@ # $FreeBSD$ # PROVIDE: litecoind -# REQUIRE: DAEMON cleanvar +# REQUIRE: LOGIN cleanvar # KEYWORD: shutdown # @@ -10,53 +10,163 @@ # litecoind_enable (bool): Set to "NO" by default. # Set it to "YES" to enable litecoind # litecoind_user (str) Set to "litecoin" by default. -# Set it to preferred user # litecoind_group (str) Set to "litecoin" by default. -# Set it to preferred group -# litecoind_data_dir (str) Set to "/var/lib/litecoin" by default. -# Set it to preferred data dir -# litecoind_config_file (str) Set to "%%PREFIX%%/etc/litecoind.conf" by default. -# Set it to preferred config file -# litecoind_log_file (str) Set to "/var/log/litecoind.log" by default. -# Set it to preferred log file +# litecoind_conf (str) Set to "%%PREFIX%%/etc/litecoind.conf" by default. +# litecoind_data_dir (str) Set to "/var/db/litecoin" by default. +# litecoindlimits_enable (bool) Set to "NO" by default. +# Set it to "YES" to enable litecoindlimits +# litecoindlimits_args Set to "-e -U ${litecoind_user}" by default + . /etc/rc.subr -name=litecoind -desc="Litecoin Daemon" +name="litecoind" rcvar=litecoind_enable +start_precmd="litecoind_precmd" +start_cmd="litecoind_start" +restart_precmd="litecoind_checkconfig" +reload_precmd="litecoind_checkconfig" +configtest_cmd="litecoind_checkconfig" +status_cmd="litecoind_status" +stop_cmd="litecoind_stop" +stop_postcmd="litecoind_wait" +command="%%PREFIX%%/bin/litecoind" +daemon_command="/usr/sbin/daemon" +#pidfile="/var/run/${name}.pid" +extra_commands="configtest" + + +: ${litecoind_enable:="NO"} +: ${litecoindlimits_enable:="NO"} + load_rc_config ${name} -: ${litecoind_enable:=NO} -: ${litecoind_user:=litecoin} -: ${litecoind_group:=litecoin} -: ${litecoind_data_dir:=/var/db/litecoin} -: ${litecoind_config_file:=%%PREFIX%%/etc/litecoin.conf} -: ${litecoind_log_file:=/var/log/litecoind.log} +: ${litecoind_user:="litecoin"} +: ${litecoind_group:="litecoin"} +: ${litecoind_data_dir:="/var/db/litecoin"} +: ${litecoind_config_file:="%%PREFIX%%/etc/litecoin.conf"} +: ${litecoindlimits_args:="-e -U ${litecoind_user}"} +# set up dependant variables +procname="${command}" +pidfile="${litecoind_data_dir}/litecoind.pid" required_files="${litecoind_config_file}" -litecoind_chdir="${litecoind_data_dir}" -litecoind_env="HOME=${litecoind_data_dir}" -pidfile="/var/run/${name}.pid" -command="%%PREFIX%%/bin/litecoind" -command_args="-daemon -pid=${pidfile} -conf=${litecoind_config_file} -datadir=${litecoind_data_dir} > ${litecoind_log_file} 2>&1" -start_precmd=litecoind_startprecmd -litecoind_startprecmd() +litecoind_checkconfig() { - if [ ! -e ${pidfile} ]; then - install -o ${litecoind_user} -g ${litecoind_group} /dev/null ${pidfile}; - fi + echo "Performing sanity check on litecoind configuration:" + if [ ! -d "${litecoind_data_dir}" ] + then + echo "Missing data directory: ${litecoind_data_dir}" + exit 1 + fi + chown -R "${litecoind_user}:${litecoind_group}" "${litecoind_data_dir}" - if [ ! -e ${litecoind_log_file} ]; then - install -o ${litecoind_user} -g ${litecoind_group} /dev/null ${litecoind_log_file}; - fi + if [ ! -f "${litecoind_config_file}" ] + then + echo "Missing configuration file: ${litecoind_config_file}" + exit 1 + fi + if [ ! -x "${command}" ] + then + echo "Missing executable: ${command}" + exit 1 + fi + return 0 +} - if [ ! -d ${litecoind_data_dir} ]; then - install -d -o ${litecoind_user} -g ${litecoind_group} ${litecoind_data_dir} - fi +litecoind_cleanup() +{ + rm -f "${pidfile}" +} + +litecoind_precmd() +{ + litecoind_checkconfig + + pid=$(check_pidfile "${pidfile}" "${procname}") + if [ -z "${pid}" ] + then + echo "Litecoind is not running" + rm -f "${pidfile}" + fi + + if checkyesno litecoindlimits_enable + then + eval $(/usr/bin/limits ${litecoindlimits_args}) 2>/dev/null + else + return 0 + fi +} + +litecoind_status() +{ + local pid + pid=$(check_pidfile "${pidfile}" "${procname}") + if [ -z "${pid}" ] + then + echo "Litecoind is not running" + return 1 + else + echo "Litecoind running, pid: ${pid}" + fi +} + +litecoind_start() +{ + echo "Starting litecoind:" + cd "${litecoind_data_dir}" || return 1 + ${daemon_command} -u "${litecoind_user}" -p "${pidfile}" -f \ + ${command} \ + -conf="${litecoind_config_file}" \ + -datadir="${litecoind_data_dir}" +} + +litecoind_stop() +{ + echo "Stopping litecoind:" + pid=$(check_pidfile "${pidfile}" "${procname}") + if [ -z "${pid}" ] + then + echo "Litecoind is not running" + return 1 + else + kill ${pid} + fi +} + +litecoind_wait() +{ + local n=60 + echo "Waiting for litecoind shutdown:" + while : + do + printf '.' + pid=$(check_pidfile "${pidfile}" "${procname}") + if [ -z "${pid}" ] + then + printf '\n' + break + fi + sleep 1 + n=$((${n} - 1)) + if [ ${n} -eq 0 -a -f "${pidfile}" ] + then + printf "\nForce shutdown" + kill -9 $(cat "${pidfile}") + for n in 1 2 3 + do + printf '.' + sleep 1 + done + printf '\n' + break + fi + done + rm -f "${pidfile}" + echo "Shutdown complete" } run_rc_command "$1" Added: head/net-p2p/litecoin/pkg-help ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-p2p/litecoin/pkg-help Tue Aug 27 13:44:17 2019 (r510014) @@ -0,0 +1,18 @@ +The wallet is stored in a Berkeley database file (BDB) (usually +~/.litecoin/wallets/wallet.dat). + +Litecoin Core can use either BDB 4.8, 5.x or 6.x to create and access the +wallet file. + +Wallets created using BDB 4.8 are also accessible by BDB 5.x and 6.x. + +Wallets created using BDB 5.x or 6.x are not accessible by BDB 4.8. + +Opening and using a wallet created by 4.8 with a higher major version (5.x +or 6.x) does not change its format, so it will still be accessible to 4.8 +afterwards. But encrypting an unencrypted wallet recreates it, so encrypting +a 4.8 wallet with Litecoin Core linked against BDB 5.x or 6.x will render it +unreadable for Litecoin Core linked against BDB 4.8. + +If you do not plan on copying the wallet file to another machine that uses +BDB 4.8 then it is recommended to use the modern versions of BDB 5.x or 6.x.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201908271344.x7RDiIpT064780>