Date: Wed, 16 May 2018 17:26:16 +0000 (UTC) From: Steve Wills <swills@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r470134 - in head/net/syncthing: . files Message-ID: <201805161726.w4GHQGWN013042@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: swills Date: Wed May 16 17:26:15 2018 New Revision: 470134 URL: https://svnweb.freebsd.org/changeset/ports/470134 Log: net/syncthing: update to 0.14.47 While here, install all binaries and update rc scripts Added: head/net/syncthing/files/syncthing-discosrv.in (contents, props changed) head/net/syncthing/files/syncthing-relaypoolsrv.in (contents, props changed) head/net/syncthing/files/syncthing-relaysrv.in (contents, props changed) Modified: head/net/syncthing/Makefile (contents, props changed) head/net/syncthing/distinfo (contents, props changed) head/net/syncthing/files/syncthing.in (contents, props changed) Modified: head/net/syncthing/Makefile ============================================================================== --- head/net/syncthing/Makefile Wed May 16 17:19:18 2018 (r470133) +++ head/net/syncthing/Makefile Wed May 16 17:26:15 2018 (r470134) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= syncthing -PORTVERSION= 0.14.46 +PORTVERSION= 0.14.47 DISTVERSIONPREFIX= v CATEGORIES= net @@ -13,8 +13,15 @@ BUILD_DEPENDS= ${LOCALBASE}/bin/go:lang/go USE_GITHUB= yes GH_SUBDIR= src/github.com/${PORTNAME}/${PORTNAME} -USE_RC_SUBR= syncthing -PLIST_FILES= bin/syncthing +USE_RC_SUBR= syncthing syncthing-discosrv syncthing-relaysrv syncthing-relaypoolsrv +BINS= stbench stcli stcompdirs stdisco stdiscosrv stevents stfileinfo \ + stfinddevice stgenfiles stindex strelaypoolsrv strelaysrv \ + stsigtool sttestutil stvanity stwatchfile syncthing + +.for x in ${BINS} +PLIST_FILES+= bin/${x} +.endfor + PORTDOCS= * USERS= syncthing @@ -22,13 +29,17 @@ GROUPS= syncthing do-build: @cd ${WRKSRC}/src/github.com/${PORTNAME}/${PORTNAME} ; \ - ${SETENV} ${MAKE_ENV} go run build.go -no-upgrade=true -version v${PORTVERSION} + ${SETENV} ${MAKE_ENV} CGO_ENABLED=0 go run build.go -no-upgrade=true -version v${PORTVERSION} + @${MV} ${WRKSRC}/src/github.com/${PORTNAME}/${PORTNAME}/bin/testutil \ + ${WRKSRC}/src/github.com/${PORTNAME}/${PORTNAME}/bin/sttestutil do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${PORTNAME}/${PORTNAME}/bin/syncthing \ +.for x in ${BINS} + ${INSTALL_PROGRAM} ${WRKSRC}/src/github.com/${PORTNAME}/${PORTNAME}/bin/${x} \ ${STAGEDIR}${PREFIX}/bin/ +.endfor ${MKDIR} ${STAGEDIR}${DOCSDIR} -.for x in AUTHORS CONTRIBUTING.md LICENSE README.md +.for x in AUTHORS LICENSE README.md ${INSTALL_DATA} ${WRKSRC}/src/github.com/${PORTNAME}/${PORTNAME}/${x} \ ${STAGEDIR}${DOCSDIR} .endfor Modified: head/net/syncthing/distinfo ============================================================================== --- head/net/syncthing/distinfo Wed May 16 17:19:18 2018 (r470133) +++ head/net/syncthing/distinfo Wed May 16 17:26:15 2018 (r470134) @@ -1,3 +1,3 @@ -TIMESTAMP = 1524505661 -SHA256 (syncthing-syncthing-v0.14.46_GH0.tar.gz) = 2a2d6472935b6b125a6f028a7fbfe27fd30a6bb0fbadc1d920b2314c9fb31ac3 -SIZE (syncthing-syncthing-v0.14.46_GH0.tar.gz) = 10200015 +TIMESTAMP = 1526399696 +SHA256 (syncthing-syncthing-v0.14.47_GH0.tar.gz) = 2c34e711ed0b0eb78f18822adc1621e204c5a6193298ad711934517949ce816d +SIZE (syncthing-syncthing-v0.14.47_GH0.tar.gz) = 10278343 Added: head/net/syncthing/files/syncthing-discosrv.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/syncthing/files/syncthing-discosrv.in Wed May 16 17:26:15 2018 (r470134) @@ -0,0 +1,68 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: syncthingdiscosrv +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# syncthingdiscosrv_enable (bool): Set to NO by default. +# Set it to YES to enable syncthing-discosrv. +# syncthingdiscosrv_user (user): Set user to run syncthing-discosrv. +# Default is "syncthing". +# syncthingdiscosrv_group (group): Set group to run syncthing-discosrv. +# Default is "syncthing". +# syncthingdiscosrv_dir (dir): Set dir to run syncthing-discosrv in. +# Default is "/var/db/syncthing-discosrv". +# syncthingdiscosrv_log_file (path): Syncthing log file +# Default: /var/log/syncthing-discosrv.log +# syncthingdiscosrv_key (file): Set key file to use +# Default is "${syncthingdiscosrv_dir}/syncthing.key". +# syncthingdiscosrv_cert (file): Set cert file to use +# Default is "${syncthingdiscosrv_dir}/syncthing.cert". +# syncthingdiscosrv_args (string): Extra args to pass to syncthing-discosrv +# Default is "" + +. /etc/rc.subr + +name=syncthingdiscosrv +rcvar=syncthingdiscosrv_enable + +load_rc_config $name + +: ${syncthingdiscosrv_enable:="NO"} +: ${syncthingdiscosrv_user:="syncthing"} +: ${syncthingdiscosrv_group:="syncthing"} +: ${syncthingdiscosrv_dir:="/var/db/syncthing-discosrv"} +: ${syncthingdiscosrv_log_file=/var/log/syncthing-discosrv.log} +: ${syncthingdiscosrv_key:="${syncthingdiscosrv_dir}/syncthing.key"} +: ${syncthingdiscosrv_cert:="${syncthingdiscosrv_dir}/syncthing.cert"} + +export STNORESTART=true + +pidfile=/var/run/syncthingdiscosrv.pid +procname="%%PREFIX%%/bin/stdiscosrv" +command="/usr/sbin/daemon" +command_args="-p ${pidfile} ${procname} -key ${syncthingdiscosrv_key} -cert ${syncthingdiscosrv_cert} ${syncthingdiscosrv_args} >> ${syncthingdiscosrv_log_file}" +syncthingdiscosrv_chdir=${syncthingdiscosrv_dir} + +start_precmd=syncthingdiscosrv_startprecmd + +syncthingdiscosrv_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install -o ${syncthingdiscosrv_user} -g ${syncthingdiscosrv_group} /dev/null ${pidfile}; + fi + + if [ ! -d ${syncthingdiscosrv_dir} ]; then + install -d -o ${syncthingdiscosrv_user} -g ${syncthingdiscosrv_group} ${syncthingdiscosrv_dir} + fi + if [ ! -e ${syncthingdiscosrv_log_file} ]; then + install -o ${syncthingdiscosrv_user} -g ${syncthingdiscosrv_group} /dev/null ${syncthingdiscosrv_log_file}; + fi +} + +run_rc_command "$1" Added: head/net/syncthing/files/syncthing-relaypoolsrv.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/syncthing/files/syncthing-relaypoolsrv.in Wed May 16 17:26:15 2018 (r470134) @@ -0,0 +1,61 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: syncthingrelaypoolsrv +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# syncthingrelaypoolsrv_enable (bool): Set to NO by default. +# Set it to YES to enable syncthing-relaypoolsrv. +# syncthingrelaypoolsrv_user (user): Set user to run syncthing-relaypoolsrv. +# Default is "syncthing". +# syncthingrelaypoolsrv_group (group): Set group to run syncthing-relaypoolsrv. +# Default is "syncthing". +# syncthingrelaypoolsrv_dir (dir): Set dir to run syncthing-relaypoolsrv in. +# Default is "/var/db/syncthing-relaypoolsrv". +# syncthingrelaypoolsrv_log_file (path): Syncthing log file +# Default: /var/log/syncthing-relaypoolsrv.log +# syncthingrelaypoolsrv_args (string): Extra args to pass to syncthing-relaypoolsrv +# Default is "" + +. /etc/rc.subr + +name=syncthingrelaypoolsrv +rcvar=syncthingrelaypoolsrv_enable + +load_rc_config $name + +: ${syncthingrelaypoolsrv_enable:="NO"} +: ${syncthingrelaypoolsrv_user:="syncthing"} +: ${syncthingrelaypoolsrv_group:="syncthing"} +: ${syncthingrelaypoolsrv_dir:="/var/db/syncthing-relaypoolsrv"} +: ${syncthingrelaypoolsrv_log_file=/var/log/syncthing-relaypoolsrv.log} + +export STNORESTART=true + +pidfile=/var/run/syncthingrelaypoolsrv.pid +procname="%%PREFIX%%/bin/strelaypoolsrv" +command="/usr/sbin/daemon" +command_args="-c -p ${pidfile} ${procname} -keys ${syncthingrelaypoolsrv_dir} ${syncthingrelaypoolsrv_args} >> ${syncthingrelaypoolsrv_log_file} 2>&1" + +start_precmd=syncthingrelaypoolsrv_startprecmd + +syncthingrelaypoolsrv_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install -o ${syncthingrelaypoolsrv_user} -g ${syncthingrelaypoolsrv_group} /dev/null ${pidfile}; + fi + + if [ ! -d ${syncthingrelaypoolsrv_dir} ]; then + install -d -o ${syncthingrelaypoolsrv_user} -g ${syncthingrelaypoolsrv_group} ${syncthingrelaypoolsrv_dir} + fi + if [ ! -e ${syncthingrelaypoolsrv_log_file} ]; then + install -o ${syncthingrelaypoolsrv_user} -g ${syncthingrelaypoolsrv_group} /dev/null ${syncthingrelaypoolsrv_log_file}; + fi +} + +run_rc_command "$1" Added: head/net/syncthing/files/syncthing-relaysrv.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/syncthing/files/syncthing-relaysrv.in Wed May 16 17:26:15 2018 (r470134) @@ -0,0 +1,65 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: syncthingrelaysrv +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# syncthingrelaysrv_enable (bool): Set to NO by default. +# Set it to YES to enable syncthing-relaysrv. +# syncthingrelaysrv_user (user): Set user to run syncthing-relaysrv. +# Default is "syncthing". +# syncthingrelaysrv_group (group): Set group to run syncthing-relaysrv. +# Default is "syncthing". +# syncthingrelaysrv_dir (dir): Set dir to run syncthing-relaysrv in. +# Default is "/var/db/syncthing-relaysrv". +# syncthingrelaysrv_log_file (path): Syncthing log file +# Default: /var/log/syncthing-relaysrv.log +# syncthingrelaysrv_key (file): Set key file to use +# Default is "${syncthingrelaysrv_dir}/syncthing.key". +# syncthingrelaysrv_cert (file): Set cert file to use +# Default is "${syncthingrelaysrv_dir}/syncthing.cert". +# syncthingrelaysrv_args (string): Extra args to pass to syncthing-relaysrv +# Default is "" + +. /etc/rc.subr + +name=syncthingrelaysrv +rcvar=syncthingrelaysrv_enable + +load_rc_config $name + +: ${syncthingrelaysrv_enable:="NO"} +: ${syncthingrelaysrv_user:="syncthing"} +: ${syncthingrelaysrv_group:="syncthing"} +: ${syncthingrelaysrv_dir:="/var/db/syncthing-relaysrv"} +: ${syncthingrelaysrv_log_file=/var/log/syncthing-relaysrv.log} + +export STNORESTART=true + +pidfile=/var/run/syncthingrelaysrv.pid +procname="%%PREFIX%%/bin/strelaysrv" +command="/usr/sbin/daemon" +command_args="-c -p ${pidfile} ${procname} -keys ${syncthingrelaysrv_dir} ${syncthingrelaysrv_args} >> ${syncthingrelaysrv_log_file} 2>&1" + +start_precmd=syncthingrelaysrv_startprecmd + +syncthingrelaysrv_startprecmd() +{ + if [ ! -e ${pidfile} ]; then + install -o ${syncthingrelaysrv_user} -g ${syncthingrelaysrv_group} /dev/null ${pidfile}; + fi + + if [ ! -d ${syncthingrelaysrv_dir} ]; then + install -d -o ${syncthingrelaysrv_user} -g ${syncthingrelaysrv_group} ${syncthingrelaysrv_dir} + fi + if [ ! -e ${syncthingrelaysrv_log_file} ]; then + install -o ${syncthingrelaysrv_user} -g ${syncthingrelaysrv_group} /dev/null ${syncthingrelaysrv_log_file}; + fi +} + +run_rc_command "$1" Modified: head/net/syncthing/files/syncthing.in ============================================================================== --- head/net/syncthing/files/syncthing.in Wed May 16 17:19:18 2018 (r470133) +++ head/net/syncthing/files/syncthing.in Wed May 16 17:26:15 2018 (r470134) @@ -3,7 +3,7 @@ # $FreeBSD$ # # PROVIDE: syncthing -# REQUIRE: LOGIN +# REQUIRE: DAEMON # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local or /etc/rc.conf @@ -11,12 +11,15 @@ # # syncthing_enable (bool): Set to NO by default. # Set it to YES to enable syncthing. +# syncthing_home (path): Directory where syncthing configuration +# data is stored. +# Default: %%PREFIX%%/etc/syncthing +# syncthing_log_file (path): Syncthing log file +# Default: /var/log/syncthing.log # syncthing_user (user): Set user to run syncthing. # Default is "syncthing". # syncthing_group (group): Set group to run syncthing. # Default is "syncthing". -# syncthing_dir (dir): Set dir to run syncthing in. -# Default is "/var/db/syncthing". . /etc/rc.subr @@ -26,14 +29,15 @@ rcvar=syncthing_enable load_rc_config $name : ${syncthing_enable:="NO"} +: ${syncthing_home=%%PREFIX%%/etc/syncthing} +: ${syncthing_log_file=/var/log/syncthing.log} : ${syncthing_user:="syncthing"} -: ${syncthing_group:="syncthing"} -: ${syncthing_dir:="/var/db/syncthing"} +: ${syncthing_group=${syncthing_group:-$syncthing_user}} pidfile=/var/run/syncthing.pid procname="%%PREFIX%%/bin/syncthing" command="/usr/sbin/daemon" -command_args="-f -p ${pidfile} ${procname} -home=${syncthing_dir} -no-browser ${syncthing_args}" +command_args="-cf -p ${pidfile} ${procname} ${syncthing_home:+-home=${syncthing_home}} ${syncthing_log_file:+-logfile=${syncthing_log_file}} -no-browser ${syncthing_args}" start_precmd=syncthing_startprecmd @@ -43,10 +47,13 @@ syncthing_startprecmd() install -o ${syncthing_user} -g ${syncthing_group} /dev/null ${pidfile}; fi - if [ ! -d ${syncthing_dir} ]; then - install -d -o ${syncthing_user} -g ${syncthing_group} ${syncthing_dir} + if [ ! -d ${syncthing_home} ]; then + install -d -o ${syncthing_user} -g ${syncthing_group} ${syncthing_home} fi + if [ ! -e ${syncthing_log_file} ]; then + install -o ${syncthing_user} -g ${syncthing_group} /dev/null ${syncthing_log_file}; + fi } run_rc_command "$1"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805161726.w4GHQGWN013042>