diff --git a/net/seaweedfs/Makefile b/net/seaweedfs/Makefile index c80bf8cf5598..e73a7f67007c 100644 --- a/net/seaweedfs/Makefile +++ b/net/seaweedfs/Makefile @@ -1,72 +1,79 @@ PORTNAME= seaweedfs -DISTVERSION= 4.12 -PORTREVISION= 5 +DISTVERSION= 4.41 CATEGORIES= net sysutils MAINTAINER= drtr0jan@yandex.ru COMMENT= Distributed Object Store and Filesystem WWW= https://seaweedfs.com/ LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE USES= go:modules USE_RC_SUBR= seaweedfs -GO_MODULE= github.com/seaweedfs/seaweedfs@v0.0.0-20260210021559-0b80f055c285 +GO_MODULE= github.com/seaweedfs/seaweedfs@v0.0.0-20260806073920-de34a1a87c02 GO_TARGET= ./weed GO_BUILDFLAGS= -ldflags "-s -w -X github.com/seaweedfs/seaweedfs/weed/util/version.COMMIT=${GO_MODULE:C/.*-//}" CGO_CFLAGS= -I. SEAWEEDFS_DIR?= /var/db/${PORTNAME} -SEAWEEDFS_USER?= seaweedfs -SEAWEEDFS_GROUP?= seaweedfs +SEAWEEDFS_USER?= ${PORTNAME} +SEAWEEDFS_GROUP?= ${PORTNAME} SUB_FILES= pkg-message SUB_LIST= GROUP=${SEAWEEDFS_GROUP} \ SEAWEEDFS_DIR=${SEAWEEDFS_DIR} \ USER=${SEAWEEDFS_USER} +.if ${SEAWEEDFS_USER} == ${PORTNAME} USERS= ${SEAWEEDFS_USER} +.endif +.if ${SEAWEEDFS_GROUP} == ${PORTNAME} GROUPS= ${SEAWEEDFS_GROUP} +.endif -OPTIONS_DEFINE= GOCDK RCLONE +OPTIONS_DEFINE= COMMANDS GOCDK RCLONE OPTIONS_DEFAULT= ELASTIC GOCDK RCLONE SQLITE OPTIONS_GROUP= FILERS OPTIONS_GROUP_FILERS= ELASTIC SQLITE TARANTOOL TIKV YDB +OPTIONS_SUB= yes +COMMANDS_DESC= SQL engine and PostgreSQL server (weed-db and weed-sql) ELASTIC_DESC= Elasticsearch support FILERS_DESC= Filer store engines GOCDK_DESC= Go CDK PubSub API support RCLONE_DESC= rsync for cloud storage backend TARANTOOL_DESC= Tarantool support TIKV_DESC= TiKV database support YDB_DESC= YDB support +COMMANDS_VARS= GO_TARGET+="./cmd/weed-db ./cmd/weed-sql" ELASTIC_VARS= GO_TAGS+=elastic GOCDK_VARS= GO_TAGS+=gocdk RCLONE_VARS= GO_TAGS+=rclone SQLITE_VARS= GO_TAGS+=sqlite TARANTOOL_VARS= GO_TAGS+=tarantool TIKV_VARS= GO_TAGS+=tikv YDB_VARS= GO_TAGS+=ydb -.include +.include + .if !empty (GO_TAGS) GO_BUILDFLAGS+= -tags "${GO_TAGS}" .endif post-build: .for cfg in master filer security replication notification ${WRKDIR}/bin/weed scaffold -config ${cfg} -output ${WRKDIR}/ .endfor post-install: ${MKDIR} ${STAGEDIR}${ETCDIR} .for cfg in filer master notification replication security ${INSTALL_DATA} ${WRKDIR}/${cfg}.toml \ ${STAGEDIR}${ETCDIR}/${cfg}.toml.sample .endfor -.include +.include diff --git a/net/seaweedfs/distinfo b/net/seaweedfs/distinfo index 6cba7507789e..52b785ac20ea 100644 --- a/net/seaweedfs/distinfo +++ b/net/seaweedfs/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1770969506 -SHA256 (go/net_seaweedfs/seaweedfs-4.12/v0.0.0-20260210021559-0b80f055c285.mod) = ae2291d68cd510097c13a1d1d1797a7fc7c8f118ed16fd2ca6d4aebc38abd65f -SIZE (go/net_seaweedfs/seaweedfs-4.12/v0.0.0-20260210021559-0b80f055c285.mod) = 27088 -SHA256 (go/net_seaweedfs/seaweedfs-4.12/v0.0.0-20260210021559-0b80f055c285.zip) = 95965ffabdfafacde019b0aa12477b9ae6d4966a72d18a4563722b5d55ee8dd1 -SIZE (go/net_seaweedfs/seaweedfs-4.12/v0.0.0-20260210021559-0b80f055c285.zip) = 49934618 +TIMESTAMP = 1786300000 +SHA256 (go/net_seaweedfs/seaweedfs-4.41/v0.0.0-20260806073920-de34a1a87c02.mod) = 30a0dede7e38c7f5a7ceb2f7063dd588da618e1ff84eddff1df6b9c6550e3b71 +SIZE (go/net_seaweedfs/seaweedfs-4.41/v0.0.0-20260806073920-de34a1a87c02.mod) = 27211 +SHA256 (go/net_seaweedfs/seaweedfs-4.41/v0.0.0-20260806073920-de34a1a87c02.zip) = 2cc93f43a71d657711aa42111791ff9291ae79f649c0dd790f273fb925154bfe +SIZE (go/net_seaweedfs/seaweedfs-4.41/v0.0.0-20260806073920-de34a1a87c02.zip) = 42368101 diff --git a/net/seaweedfs/files/seaweedfs.in b/net/seaweedfs/files/seaweedfs.in index fb34a3690092..0049d1fec782 100644 --- a/net/seaweedfs/files/seaweedfs.in +++ b/net/seaweedfs/files/seaweedfs.in @@ -1,89 +1,89 @@ #!/bin/sh # PROVIDE: seaweedfs # REQUIRE: DAEMON LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # # seaweedfs_enable (bool): Set it to YES to enable seaweedfs. # Default is "NO". # seaweedfs_user (user): Set user to run seaweedfs. # Default is "seaweedfs". # seaweedfs_group (group): Set group to run seaweedfs. # Default is "seaweedfs". # seaweedfs_dir (directory): Set directory to store database files. # Default is "/var/db/seaweedfs". -# seaweedfs_options (string): Set default parameters. +# seaweedfs_options (str): Set default parameters. # Default is "server -dir=/var/db/seaweedfs". # seaweedfs_syslog_output_enable (bool): Set to enable syslog output. # Default is "NO". See daemon(8). # seaweedfs_syslog_output_tag (str): Set syslog tag if syslog enabled. # Default: "seaweedfs". # seaweedfs_syslog_output_priority (str): Set syslog priority if syslog enabled. # Default is "notice". See daemon(8). # seaweedfs_syslog_output_facility (str): Set syslog facility if syslog enabled. # Default is "daemon". See daemon(8). . /etc/rc.subr name=seaweedfs rcvar=seaweedfs_enable load_rc_config $name : ${seaweedfs_enable:="NO"} : ${seaweedfs_user:="%%USER%%"} : ${seaweedfs_group:="%%GROUP%%"} : ${seaweedfs_dir:="%%SEAWEEDFS_DIR%%"} : ${seaweedfs_options:="server -dir=${seaweedfs_dir}"} : ${seaweedfs_pidfile:=/var/run/seaweedfs.pid} : ${seaweedfs_syslog_output_enable:="NO"} # backwards compatibility if [ -d "${seaweedfs_dir}/data" -a \( "${seaweedfs_options}" = "server -dir=${seaweedfs_dir}" \) ]; then seaweedfs_dir="${seaweedfs_dir}/data" seaweedfs_options="server -dir=${seaweedfs_dir}" fi if [ -n "${seaweedfs_syslog_enable}" ]; then seaweedfs_syslog_output_enable="YES" seaweedfs_syslog_output_priority="${seaweedfs_syslog_priority}" seaweedfs_syslog_output_facility="${seaweedfs_syslog_facility}" fi if checkyesno seaweedfs_syslog_output_enable; then if [ -n "${seaweedfs_syslog_output_tag}" ]; then seaweedfs_syslog_output_flags="-T ${seaweedfs_syslog_output_tag}" else seaweedfs_syslog_output_flags="-T ${name}" fi if [ -n "${seaweedfs_syslog_output_priority}" ]; then seaweedfs_syslog_output_flags="${seaweedfs_syslog_output_flags} -s ${seaweedfs_syslog_output_priority}" fi if [ -n "${seaweedfs_syslog_output_facility}" ]; then seaweedfs_syslog_output_flags="${seaweedfs_syslog_output_flags} -l ${seaweedfs_syslog_output_facility}" fi fi pidfile=${seaweedfs_pidfile} procname="%%PREFIX%%/bin/weed" command="/usr/sbin/daemon" command_args="-f -t ${name} ${seaweedfs_syslog_output_flags} -p ${pidfile} ${procname} ${seaweedfs_options}" start_precmd=seaweedfs_startprecmd seaweedfs_startprecmd() { if [ ! -e "${pidfile}" ]; then install -m 0600 -o "${seaweedfs_user}" -g "${seaweedfs_group}" /dev/null "${pidfile}"; fi if [ ! -d "${seaweedfs_dir}" ]; then install -d -m 0750 -o "${seaweedfs_user}" -g "${seaweedfs_group}" "${seaweedfs_dir}" fi } run_rc_command "$1" diff --git a/net/seaweedfs/pkg-plist b/net/seaweedfs/pkg-plist index 034ae7900cf5..85c6649f5b19 100644 --- a/net/seaweedfs/pkg-plist +++ b/net/seaweedfs/pkg-plist @@ -1,8 +1,10 @@ @comment normally these would auto-populate your etc dir but these generated @comment files contain conflicting options; users must read the wiki first! %%ETCDIR%%/filer.toml.sample %%ETCDIR%%/master.toml.sample %%ETCDIR%%/notification.toml.sample %%ETCDIR%%/replication.toml.sample %%ETCDIR%%/security.toml.sample bin/weed +%%COMMANDS%%bin/weed-db +%%COMMANDS%%bin/weed-sql