diff --git a/net/seaweedfs/Makefile b/net/seaweedfs/Makefile index 8f351c3cba3a..9aa92d593ab2 100644 --- a/net/seaweedfs/Makefile +++ b/net/seaweedfs/Makefile @@ -1,5 +1,5 @@ PORTNAME= seaweedfs -DISTVERSION= 3.20 +DISTVERSION= 3.24 CATEGORIES= net sysutils MASTER_SITES= https://raw.githubusercontent.com/${PORTNAME}/${PORTNAME}/${DISTVERSIONFULL}/:gomod DISTFILES= go.mod:gomod @@ -24,26 +24,45 @@ SEAWEEDFS_USER?= seaweedfs SEAWEEDFS_GROUP?= seaweedfs SUB_FILES= pkg-message -SUB_LIST= GROUP=${SEAWEEDFS_GROUP} \ - SEAWEEDFS_DIR=${SEAWEEDFS_DIR} \ - USER=${SEAWEEDFS_USER} +SUB_LIST= SEAWEEDFS_DIR=${SEAWEEDFS_DIR} \ + USER=${SEAWEEDFS_USER} \ + GROUP=${SEAWEEDFS_GROUP} USERS= ${SEAWEEDFS_USER} GROUPS= ${SEAWEEDFS_GROUP} +OPTIONS_DEFINE= GOCDK +OPTIONS_DEFAULT= ELASTIC GOCDK SQLITE +OPTIONS_GROUP= FILERS +OPTIONS_GROUP_FILERS= ELASTIC SQLITE TIKV YDB + +ELASTIC_DESC= Elasticsearch support +FILERS_DESC= Filer store engines +GOCDK_DESC= Go CDK PubSub API support +TIKV_DESC= TiKV database support +YDB_DESC= YDB support + +ELASTIC_VARS= GO_TAGS+=elastic +GOCDK_VARS= GO_TAGS+=gocdk +SQLITE_VARS= GO_TAGS+=sqlite +TIKV_VARS= GO_TAGS+=tikv +YDB_VARS= GO_TAGS+=ydb + +.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}/var/db/${PORTNAME} \ - ${STAGEDIR}/var/log/${PORTNAME} \ - ${STAGEDIR}${ETCDIR} + ${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 18adbc339ea8..986c735d5903 100644 --- a/net/seaweedfs/distinfo +++ b/net/seaweedfs/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1659960872 -SHA256 (go/net_seaweedfs/seaweedfs-seaweedfs-3.20_GH0/go.mod) = 29ab0345461593560ee5712730c89c63f63637b136aa2d63dbc57a3b351c9e4d -SIZE (go/net_seaweedfs/seaweedfs-seaweedfs-3.20_GH0/go.mod) = 11375 -SHA256 (go/net_seaweedfs/seaweedfs-seaweedfs-3.20_GH0/seaweedfs-seaweedfs-3.20_GH0.tar.gz) = ed5f3eb0abe4216504192646bcda1ed7e5d21c1478f9b23ca26597b04044963e -SIZE (go/net_seaweedfs/seaweedfs-seaweedfs-3.20_GH0/seaweedfs-seaweedfs-3.20_GH0.tar.gz) = 28872299 +TIMESTAMP = 1661764220 +SHA256 (go/net_seaweedfs/seaweedfs-seaweedfs-3.24_GH0/go.mod) = 9daacf47d1b75a6ce3fc66bd326d47c2f0001b0d35c41657ec4a55cd69cc0a5f +SIZE (go/net_seaweedfs/seaweedfs-seaweedfs-3.24_GH0/go.mod) = 11414 +SHA256 (go/net_seaweedfs/seaweedfs-seaweedfs-3.24_GH0/seaweedfs-seaweedfs-3.24_GH0.tar.gz) = b506563bd871fdc7a280c9eaeced1c536a6fbbec82ef802c922200fa3087963e +SIZE (go/net_seaweedfs/seaweedfs-seaweedfs-3.24_GH0/seaweedfs-seaweedfs-3.24_GH0.tar.gz) = 28881321 diff --git a/net/seaweedfs/files/pkg-message.in b/net/seaweedfs/files/pkg-message.in index a54e166d0a70..0e67c12a9401 100644 --- a/net/seaweedfs/files/pkg-message.in +++ b/net/seaweedfs/files/pkg-message.in @@ -19,6 +19,27 @@ Please read the documentation carefully, particularly around data replication, and running redundant masters. Prime numbers of servers are your friend, choose them wisely. +EOM +} +{ type: upgrade + maximum_version: "3.24" + message: <&1 | grep -q syslog ; echo $?) -if [ ${DAEMON} -eq 0 ]; then - : ${seaweedfs_syslog_enable:="NO"} - : ${seaweedfs_syslog_priority:="info"} - : ${seaweedfs_syslog_facility:="daemon"} - if checkyesno seaweedfs_syslog_enable; then - seaweedfs_syslog_flags="-T ${name}" +# 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_priority}" ]; then - seaweedfs_syslog_flags="${seaweedfs_syslog_flags} -s ${seaweedfs_syslog_priority}" - 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_facility}" ]; then - seaweedfs_syslog_flags="${seaweedfs_syslog_flags} -l ${seaweedfs_syslog_facility}" - fi - fi -else - seaweedfs_syslog_enable="NO" - seaweedfs_syslog_flags="" + if [ -n "${seaweedfs_syslog_output_facility}" ]; then + seaweedfs_syslog_output_flags="${seaweedfs_syslog_output_flags} -l ${seaweedfs_syslog_output_facility}" + fi fi -pidfile=/var/run/seaweedfs.pid +pidfile=${seaweedfs_pidfile} procname="%%PREFIX%%/bin/weed" command="/usr/sbin/daemon" -command_args="-f -t ${name} ${seaweedfs_syslog_flags} -p ${pidfile} ${procname} ${seaweedfs_options}" +command_args="-f -t ${name} ${seaweedfs_syslog_output_flags} -p ${pidfile} ${procname} ${seaweedfs_options}" -extra_commands="reload monitor" -monitor_cmd=seaweedfs_monitor start_precmd=seaweedfs_startprecmd -required_files="${seaweedfs_dir}" - -seaweedfs_monitor() -{ - sig_reload=USR1 - run_rc_command "reload" -} seaweedfs_startprecmd() { - if [ ! -e ${pidfile} ]; then - install -o ${seaweedfs_user} -g ${seaweedfs_group} /dev/null ${pidfile}; - fi + if [ ! -e "${pidfile}" ]; then + install -m 0600 -o "${seaweedfs_user}" -g "${seaweedfs_group}" /dev/null "${pidfile}"; + fi - if [ ! -d ${seaweedfs_dir}/data ]; then - install -d -m 0750 -o ${seaweedfs_user} -g ${seaweedfs_group} ${seaweedfs_dir}/data - fi - if [ ! -d ${seaweedfs_dir}/metadata ]; then - install -d -m 0750 -o ${seaweedfs_user} -g ${seaweedfs_group} ${seaweedfs_dir}/metadata - fi - chdir ${seaweedfs_dir} + 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-descr b/net/seaweedfs/pkg-descr index 589c2822e384..b145e3a7c033 100644 --- a/net/seaweedfs/pkg-descr +++ b/net/seaweedfs/pkg-descr @@ -4,4 +4,4 @@ and transparent cloud integration. The Filer supports cross-cluster active-active replication, Kubernetes, POSIX, S3 API, encryption, Erasure Coding for warm storage, FUSE mount, Hadoop, and WebDAV. -WWW: https://github.com/chrislusf/seaweedfs/wiki +WWW: https://github.com/seaweedfs/seaweedfs/wiki diff --git a/net/seaweedfs/pkg-plist b/net/seaweedfs/pkg-plist index 815b7c1e006e..034ae7900cf5 100644 --- a/net/seaweedfs/pkg-plist +++ b/net/seaweedfs/pkg-plist @@ -1,5 +1,3 @@ -@dir(seaweedfs,seaweedfs,750) /var/db/seaweedfs -@dir(seaweedfs,seaweedfs,750) /var/log/seaweedfs @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