From nobody Sun Nov 13 12:02:41 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4N9B012gjnz4dG5q; Sun, 13 Nov 2022 12:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4N9B011Tpdz4NPx; Sun, 13 Nov 2022 12:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668340961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rOnvOZSa+Zx+dnkshm+EgTLylVLId2nT9ASA72Kx/7s=; b=mZDgM+azh4SOURqawDw4/Pzhcg+nwcxt32c8WHzWF2xI1In8sCIZc//ilyrjrsLUaT5B9S Fty+D83fmdzCjt3ieVxB7ayLOASDjGpbDuduzUdF2Fw4L17sja2YfzGl94O2JZfEiPMybc ouLlEqPy6qPK1Ty+b5bDUgpZYQZJULNmfki7CwebNSs1EhMIry5mUmmAfT0D4ed9N30BYU OWUtHmcAoXAXWmk4MR6FbzKf3UFnmuh3xCNIAW2u76KQVm9+D2Xdd+6ljJfUUy90cOVa4d abr0XH0lXQGQCAyQdNQYhqwJRkS/1G+v7zL6rp6u4KC6ZRcJr+IU0mbuusKHrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668340961; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rOnvOZSa+Zx+dnkshm+EgTLylVLId2nT9ASA72Kx/7s=; b=hRtZpusDH8gFfNkgEB9//COYp4Si1KzqGl+7fXPP6VB4sMOOdE6tQydTWHmhmWYj+jXHXL NYVDrmzitKQOAAhgeWWD6eb0/gOFsJcmDpyqElKUXrrMfouRzzpx/gq8d+TkytbZ4qoj/N xyj88DLR6wD/6Iwi2u5QxkO8xjK9dFTJsPLL+OJC0xReMOVk8JK6cKOvD02G0zEeLwGa2A /Qn4WWrYfn8bKcFe5ZwIX2sijT8+z2EhCxb5NT8N+/CPMvy1H29HpqrpgFzQe9boY3RqX/ 6PrwpwKokViC3O33mm/RchQGTk6SB22yHJwiW6x1xbdknQhPVZ+Ohnscl++COg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668340961; a=rsa-sha256; cv=none; b=IxW1a51U26oVAGQQX8LLTBDlg5TiVPlNeKuc0h3tteYm+EpxMKbSI1sDRUVxlG6aDXLqWP F1MeQURf5pE+xWj1PR/pmK0FfQY4MI0LXoBBx/PXcnTrmD/OcfkMVSmVQxxvMEKrwR5YQK DyYj1JBxE0CmT7egSs3BjJW33bAqXkXcwShEUAuqUvdTRKLtKpcYWaxNX2N3ajS1k6ltom ppzkF03aWMQQIHqhqF0J0KSsQgo7GpSPGw91NrxVNROvUQbuS4xUvdB2dsNe/hzsZQzDnh Bo3snrjrOk+oVJjpYmJAfWPofgF1jrkjJuk5IFiZZE4fge0/NB0htyfeXT+6gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4N9B010Y8zz125Z; Sun, 13 Nov 2022 12:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2ADC2fHG051016; Sun, 13 Nov 2022 12:02:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2ADC2fHe051015; Sun, 13 Nov 2022 12:02:41 GMT (envelope-from git) Date: Sun, 13 Nov 2022 12:02:41 GMT Message-Id: <202211131202.2ADC2fHe051015@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Dave Cottlehuber Subject: git: 8bb719ffa3c9 - main - net/seaweedfs: update to 3.26, pet port List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dch X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8bb719ffa3c9e643c5048b046a1e0843195c8e49 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dch: URL: https://cgit.FreeBSD.org/ports/commit/?id=8bb719ffa3c9e643c5048b046a1e0843195c8e49 commit 8bb719ffa3c9e643c5048b046a1e0843195c8e49 Author: Dave Cottlehuber AuthorDate: 2022-11-13 12:02:38 +0000 Commit: Dave Cottlehuber CommitDate: 2022-11-13 12:02:38 +0000 net/seaweedfs: update to 3.26, pet port PR: 259527 Sponsored by: SkunkWerks, GmbH --- net/seaweedfs/Makefile | 29 ++++++++-- net/seaweedfs/distinfo | 10 ++-- net/seaweedfs/files/pkg-message.in | 21 +++++++ net/seaweedfs/files/seaweedfs.in | 113 ++++++++++++++++++------------------- net/seaweedfs/pkg-plist | 2 - 5 files changed, 105 insertions(+), 70 deletions(-) diff --git a/net/seaweedfs/Makefile b/net/seaweedfs/Makefile index f19b166fe7a5..fd0c6284f444 100644 --- a/net/seaweedfs/Makefile +++ b/net/seaweedfs/Makefile @@ -33,19 +33,38 @@ SUB_LIST= 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..61e515117a65 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 = 1662714159 +SHA256 (go/net_seaweedfs/seaweedfs-seaweedfs-3.26_GH0/go.mod) = bda5d80fad3ccd26c08bdd1fee554be2501e09b087bc079bd54bea4dab01feea +SIZE (go/net_seaweedfs/seaweedfs-seaweedfs-3.26_GH0/go.mod) = 11431 +SHA256 (go/net_seaweedfs/seaweedfs-seaweedfs-3.26_GH0/seaweedfs-seaweedfs-3.26_GH0.tar.gz) = a2798c587aa4193923e0ee9eae6c008b43f4b17dea3136f1c67e4acee45468c7 +SIZE (go/net_seaweedfs/seaweedfs-seaweedfs-3.26_GH0/seaweedfs-seaweedfs-3.26_GH0.tar.gz) = 28883805 diff --git a/net/seaweedfs/files/pkg-message.in b/net/seaweedfs/files/pkg-message.in index a54e166d0a70..a6c2683314a9 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.26" + 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-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