Index: head/sysutils/ipfs-go/Makefile =================================================================== --- head/sysutils/ipfs-go/Makefile (revision 491651) +++ head/sysutils/ipfs-go/Makefile (revision 491652) @@ -1,53 +1,50 @@ # $FreeBSD$ PORTNAME= ipfs DISTVERSIONPREFIX= v DISTVERSION= 0.4.18 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= sysutils MASTER_SITES= https://github.com/ipfs/go-ipfs/releases/download/v${DISTVERSION}/ PKGNAMESUFFIX= -go DISTNAME= go-ipfs-source MAINTAINER= jhixson@FreeBSD.org COMMENT= IPFS implementation in Go LICENSE= MIT LICENSE_FILE= ${WRKSRC}/LICENSE ONLY_FOR_ARCHS= amd64 i386 USES= go GO_PKGNAME= github.com/ipfs/go-ipfs GO_TARGET= ./cmd/ipfs NO_WRKSUBDIR= yes USE_RC_SUBR= ${PORTNAME}${PKGNAMESUFFIX} SUB_FILES= ${FULLNAME} SUB_LIST= IPFS_USER=${IPFS_USER} \ IPFS_GROUP=${IPFS_GROUP} \ - IPFS_LOGDIR=${IPFS_LOGDIR} + IPFS_HOME=${IPFS_HOME} PLIST_SUB= IPFS_USER=${IPFS_USER} \ IPFS_GROUP=${IPFS_GROUP} \ - IPFS_HOME=${IPFS_HOME} \ - IPFS_LOGDIR=${IPFS_LOGDIR} + IPFS_HOME=${IPFS_HOME} -IPFS_USER= ${FULLNAME} -IPFS_GROUP= ${FULLNAME} -IPFS_HOME= /var/db/${PORTNAME}${PKGNAMESUFFIX} -IPFS_LOGDIR= /var/log/${PORTNAME}${PKGNAMESUFFIX} +IPFS_USER?= ${FULLNAME} +IPFS_GROUP?= ${FULLNAME} +IPFS_HOME?= /var/db/${FULLNAME} USERS= ${IPFS_USER} GROUPS= ${IPFS_GROUP} FULLNAME= ${PORTNAME}${PKGNAMESUFFIX} do-install: @${MKDIR} ${STAGEDIR}${IPFS_HOME} - @${MKDIR} ${STAGEDIR}${IPFS_LOGDIR} ${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/ipfs ${STAGEDIR}${PREFIX}/bin/${PORTNAME}${PKGNAMESUFFIX} .include Index: head/sysutils/ipfs-go/files/ipfs-go.in =================================================================== --- head/sysutils/ipfs-go/files/ipfs-go.in (revision 491651) +++ head/sysutils/ipfs-go/files/ipfs-go.in (revision 491652) @@ -1,54 +1,53 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: ipfs_go # REQUIRE: DAEMON NETWORKING -# BEFORE: LOGIN # KEYWORD: shutdown -# Add the following lines to /etc/rc.conf to enable ipfs_go: -# ipfs_go_enable="YES" -# -# ipfs_go_enable (bool): Set to YES to enable ipfs_go -# Default: NO -# ipfs_go_user (str): ipfs_go daemon user -# Default: %%IPFS_USER%% -# ipfs_go_group (str): ipfs_go daemon group -# Default: %%IPFS_GROUP%% -# ipfs_go_path (str): ipfs_go ipfs repo path -# Default: %%IPFS_HOME%% +# ipfs_go_enable (bool): Set to NO by default +# Set to YES to enable ipfs_go +# ipfs_go_user (str): Set to %%IPFS_USER%% by default +# Set it to ipfs_go daemon user +# ipfs_go_group (str): Set to %%IPFS_GROUP%% by default +# Set it to ipfs_go daemon group +# ipfs_go_path (str): Set to %%IPFS_HOME%%/.ipfs by default +# Set it to ipfs repo path +# ipfs_go_syslog_priority (str): Set to "info" by default. +# Set it to priority to be used by syslog +# ipfs_go_syslog_facility (str): Set to "daemon" by default. +# Set it to facility to be used by syslog +# ipfs_go_syslog_tag (str): Set to "ipfs-go" by default. +# Set it to tag to be used by syslog - . /etc/rc.subr name=ipfs_go rcvar=ipfs_go_enable load_rc_config $name : ${ipfs_go_enable:="NO"} : ${ipfs_go_user:="%%IPFS_USER%%"} : ${ipfs_go_group:="%%IPFS_GROUP%%"} -: ${ipfs_go_path:="%%IPFS_HOME%%"} +: ${ipfs_go_path:="%%IPFS_HOME%%/.ipfs"} +: ${ipfs_go_syslog_priority:="info"} +: ${ipfs_go_syslog_facility:="daemon"} +: ${ipfs_go_syslog_tag:="ipfs-go"} -logfile="%%IPFS_LOGDIR%%/${name}.log" pidfile="/var/run/${name}.pid" -command="%%PREFIX%%/bin/ipfs-go" -start_precmd="ipfs_go_prestart" -start_cmd="ipfs_go_start" -ipfs_go_prestart() { - install -d -o ${ipfs_go_user} -g ${ipfs_go_group} -m750 %%IPFS_LOGDIR%% - [ -d ${ipfs_go_path} ] || /usr/bin/su - ${ipfs_go_user} -c "env IPFS_PATH=${ipfs_go_path} ${command} init" -} +command="/usr/sbin/daemon" +command_args="-S -m 3 -s ${ipfs_go_syslog_priority} -l ${ipfs_go_syslog_facility} -T ${ipfs_go_syslog_tag} -p ${pidfile} /usr/bin/env IPFS_PATH=${ipfs_go_path} ${ipfs_go_env} %%PREFIX%%/bin/ipfs-go daemon --init --init-profile=server --migrate=true ${ipfs_go_args}" +procname="%%PREFIX%%/bin/ipfs-go" -ipfs_go_start() { - echo running ${command} daemon - export USER=${ipfs_go_user} - export HOME=$(echo ~%%IPFS_USER%%) - export IPFS_PATH=${ipfs_go_path} - /usr/sbin/daemon -p ${pidfile} -u ${ipfs_go_user} ${command} daemon >> ${logfile} 2>&1 +start_precmd="ipfs_go_startprecmd" + +ipfs_go_startprecmd() { + if [ ! -e "${pidfile}" ]; then + install -g ${ipfs_go_group} -o ${ipfs_go_user} -- /dev/null "${pidfile}" + fi } run_rc_command "$1" Index: head/sysutils/ipfs-go/files/patch-version.go =================================================================== --- head/sysutils/ipfs-go/files/patch-version.go (nonexistent) +++ head/sysutils/ipfs-go/files/patch-version.go (revision 491652) @@ -0,0 +1,10 @@ +--- version.go.orig 2019-01-26 18:22:10 UTC ++++ version.go +@@ -4,6 +4,6 @@ package ipfs + var CurrentCommit string + + // CurrentVersionNumber is the current application's version literal +-const CurrentVersionNumber = "0.4.19-dev" ++const CurrentVersionNumber = "0.4.18" + + const ApiVersion = "/go-ipfs/" + CurrentVersionNumber + "/" Property changes on: head/sysutils/ipfs-go/files/patch-version.go ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/sysutils/ipfs-go/pkg-plist =================================================================== --- head/sysutils/ipfs-go/pkg-plist (revision 491651) +++ head/sysutils/ipfs-go/pkg-plist (revision 491652) @@ -1,5 +1,4 @@ bin/ipfs-go @owner %%IPFS_USER%% @group %%IPFS_GROUP%% @dir %%IPFS_HOME%% -@dir %%IPFS_LOGDIR%%