From nobody Mon Apr 04 12:51:14 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 7CD2B1A8D186; Mon, 4 Apr 2022 12:51:14 +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 4KX9cy353Wz4RJq; Mon, 4 Apr 2022 12:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649076674; 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=NNm+QhxoJHCzai5qHn8aNKEwQhHE8nZvJtTC4ZkE68s=; b=OKzZSE3SHTSVSseGW+tYBzJdz84m+Hirl4xqzJ617wA7QhM3MkenSJn3pmNTEJ8cdhNFnk /D8rxdrT6lJ+YyV+OEUEXWC2ksRXs4N7CCTyj16J2tBDvxbISuPtCClBQm4l6EdXFOVTqk 12xJcJBu3Kd/WoOM+3vlazWT1h6jgOgs2wChXL5kvkacIPSCA5cGI5O759RI1IbBIYekU2 g+UoWZPUx/+OyJ7pEVv3tpy/6yO2OtcbFQ8quJ6gZZbeNzFYQ3GPrq13a4ui8jW1pjXhJ0 rwVo4GMT+oOunFGGF5AtwYLRsh+QRMsNeCd8XoP4NIP1YVXLhKSDqM9ZhNgdCw== 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 4A57D12787; Mon, 4 Apr 2022 12:51:14 +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 234CpEPC035046; Mon, 4 Apr 2022 12:51:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 234CpEIY035045; Mon, 4 Apr 2022 12:51:14 GMT (envelope-from git) Date: Mon, 4 Apr 2022 12:51:14 GMT Message-Id: <202204041251.234CpEIY035045@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: 73ee63cede81 - main - net-im/gotosocial: new 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: 73ee63cede813ed4e756c1880648649fa4f1b5f6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649076674; 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=NNm+QhxoJHCzai5qHn8aNKEwQhHE8nZvJtTC4ZkE68s=; b=jBhAUQmXHmvRGxEL5RdBxMc5On9RFVmn4MN6crh8jApgS/OX1A5/yVccQzxEXmhuA2Af9D x/fvXdtXspq53sETLfBoOlBUDRtFkjG4oSkwissTeJAO3ED/PgltBbWt46o0fboAZBWVVc L1CvICinD2BimlMPaHWBBq/SWLp05CIF0t2Nee1SDnqXPQNUHfgeMeZPzlLHK4q0CJ+FEn oLqlJcyS0tz1E+jrvhepWFjNYTMziC7wyQhqQMoiaeQTltxUbLT5cYMWUN+kj+siz5kHus Ju09EzUeNt/nf8q5yK5C5OawKxdhqDp4lF3Hi5ivRXN3Bp4aYfsU5lQQEJCsDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649076674; a=rsa-sha256; cv=none; b=GdzhQBopfZE35SuVZHmLwbiA9QxYnGc+tPwC2lzkrMXIV0kseXqQQei+FTrcrW/UYZLNGm 1Y2AMiOrm/6t//tjmYA2NG391RHGOHeNSwn31QNIyuT9lDV+etQkDXO9LcXByIz9LnpPjq EvVKbt8Zu35obkcLA+cA2sUIBz9b4sCuafu0Au7TaAk4CXzMcunzCU5G1asga7G7IKlf2L lDSlK/x7cDXIT8kCIjxKcjNHEKFlxjdF51K9I14ZCPfQ4/qJQ0CbpMrRYG6RFH2pOfORbm xr4MLv6JPaWPgJNeDuqjhG7YlgME25bRY/8+sIzh2p19PqGF7n0bnbk8a8gpEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by dch: URL: https://cgit.FreeBSD.org/ports/commit/?id=73ee63cede813ed4e756c1880648649fa4f1b5f6 commit 73ee63cede813ed4e756c1880648649fa4f1b5f6 Author: Mina Galić AuthorDate: 2022-04-04 12:50:50 +0000 Commit: Dave Cottlehuber CommitDate: 2022-04-04 12:50:50 +0000 net-im/gotosocial: new port With GoToSocial, you can keep in touch with your friends, post, read, and share images and articles. All without being tracked or advertised to! GoToSocial provides a lightweight, customizable, and safety-focused entryway into the Fediverse, and is comparable to (but distinct from) existing projects such as Mastodon, Pleroma, Friendica, and PixelFed. WWW: https://docs.gotosocial.org/en/latest/ --- GIDs | 1 + UIDs | 1 + net-im/Makefile | 1 + net-im/gotosocial/Makefile | 58 +++++++++++++++++++++++ net-im/gotosocial/distinfo | 3 ++ net-im/gotosocial/files/gotosocial.in | 49 +++++++++++++++++++ net-im/gotosocial/files/patch-example_config.yaml | 35 ++++++++++++++ net-im/gotosocial/pkg-descr | 11 +++++ net-im/gotosocial/pkg-plist | 36 ++++++++++++++ 9 files changed, 195 insertions(+) diff --git a/GIDs b/GIDs index f4ed4eb473b6..120c8a098fe0 100644 --- a/GIDs +++ b/GIDs @@ -149,6 +149,7 @@ gnugk:*:205: gini:*:206: _mixminion:*:207: _dnsdist:*:208: +gotosocial:*:209: shoutcast:*:210: git:*:211: hg:*:212: diff --git a/UIDs b/UIDs index 8aec0c1580f9..e6fe80da3c93 100644 --- a/UIDs +++ b/UIDs @@ -154,6 +154,7 @@ gnugk:*:205:205::0:0:GNU GateKeeper pseudo-user:/nonexistent:/usr/sbin/nologin gini:*:206:206::0:0:& streaming server:/var/log/gini:/usr/sbin/nologin _mixminion:*:207:207::0:0:Mixminion server:/nonexistent:/usr/sbin/nologin _dnsdist:*:208:208::0:0:dnsdist user:/nonexistent:/usr/sbin/nologin +gotosocial:*:209:209::0:0:Gotosocial user:/nonexistent:/usr/sbin/nologin shoutcast:*:210:210::0:0:Shoutcast sandbox:/nonexistent:/bin/sh git:*:211:211::0:0:git user:/usr/local/git:/bin/sh hg:*:212:212::0:0:mercurial-server user:/usr/local/hg:/bin/sh diff --git a/net-im/Makefile b/net-im/Makefile index 8c3bdeaebefa..def6a62fbcfe 100644 --- a/net-im/Makefile +++ b/net-im/Makefile @@ -25,6 +25,7 @@ SUBDIR += gitterdone SUBDIR += gloox SUBDIR += gomuks + SUBDIR += gotosocial SUBDIR += icmpchat SUBDIR += icqlib SUBDIR += jabber.el diff --git a/net-im/gotosocial/Makefile b/net-im/gotosocial/Makefile new file mode 100644 index 000000000000..bf4341b2f800 --- /dev/null +++ b/net-im/gotosocial/Makefile @@ -0,0 +1,58 @@ +PORTNAME= gotosocial +DISTVERSIONPREFIX= v +DISTVERSION= 0.2.0 +CATEGORIES= net-im + +MAINTAINER= me+freebsd@igalic.co +COMMENT= Golang fediverse server + +LICENSE= AGPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +ONLY_FOR_ARCHS= amd64 + +# Note: we don't use go:modules, because this project vendors all deps +USES= go +USE_RC_SUBR= ${PORTNAME} +USE_GITHUB= yes +GH_ACCOUNT= superseriousbusiness +# When rebuilding yourself, please set this: +#GH_TAGNAME= 40be88ec609c9b5352cbb7d38fd70ff7c6a233a5 + +USERS= gotosocial +GROUPS= gotosocial + +DBDIR= /var/db/${PORTNAME} + +SUB_LIST= DBDIR="${DBDIR}" \ + GROUP="${GROUPS}" \ + USER="${USERS}" \ + WWWDIR="${WWWDIR}" +PLIST_SUB= WWWDIR="${WWWDIR}" + +# patch sample config for people who set a custom prefix +.if "${PREFIX}" != "${LOCALBASE}" +post-patch: + @${REINPLACE_CMD} -e 's|/usr/local|${PREFIX}|g' \ + ${WRKSRC}/example/config.yaml +.endif + +do-build: + @(cd ${WRKSRC} && ${SETENV} \ + VERSION=${DISTVERSION} COMMIT=${GH_TAGNAME} scripts/build.sh ) + +do-install: + ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} \ + ${STAGEDIR}${PREFIX}/bin/ + ${MKDIR} ${STAGEDIR}${DOCSDIR} +.for x in LICENSE README.md + ${INSTALL_DATA} ${WRKSRC}/${x} \ + ${STAGEDIR}${DOCSDIR} +.endfor + ${MKDIR} ${STAGEDIR}${ETCDIR} + ${INSTALL_DATA} ${WRKSRC}/example/config.yaml \ + ${STAGEDIR}${ETCDIR}/config.yaml.sample + (cd ${WRKSRC}/web && ${COPYTREE_SHARE} . ${STAGEDIR}${WWWDIR}/ \ + "! ( -path */gotosocial-styling* )") + +.include diff --git a/net-im/gotosocial/distinfo b/net-im/gotosocial/distinfo new file mode 100644 index 000000000000..45d441d62ca1 --- /dev/null +++ b/net-im/gotosocial/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1644694134 +SHA256 (superseriousbusiness-gotosocial-v0.2.0_GH0.tar.gz) = 0e0ddd2e98cf7b9246200e9c86b5d6b1b777b386e0bbd460ea0fe412a6f2d679 +SIZE (superseriousbusiness-gotosocial-v0.2.0_GH0.tar.gz) = 36850939 diff --git a/net-im/gotosocial/files/gotosocial.in b/net-im/gotosocial/files/gotosocial.in new file mode 100755 index 000000000000..8e768672c3d3 --- /dev/null +++ b/net-im/gotosocial/files/gotosocial.in @@ -0,0 +1,49 @@ +#!/bin/sh + +# PROVIDE: gotosocial +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# +# Add the following lines to /etc/rc.conf to enable GotoSocial +# +# gotosocial_enable (bool): Set it to YES to enable gotosocial. +# Default is "NO". +# gotosocial_user (user): Set user to run gotosocial. +# Default is "gotosocial". +# gotosocial_group (group): Set group to run gotosocial. +# Default is "gotosocial". +# gotosocial_config (file): Set gotosocial config file. +# Default is "%%PREFIX%%/etc/gotosocial/config.yaml". +# gotosocial_dir (dir): Set DB and certificate storage dir +# Default is "/var/db/gotosocial/". + +. /etc/rc.subr + +name=gotosocial +rcvar=gotosocial_enable +desc="Golang fediverse server" + +load_rc_config "$name" + +: ${gotosocial_enable:=NO} +: ${gotosocial_config:=%%PREFIX%%/etc/gotosocial/config.yaml} +: ${gotosocial_user=%%USER%%} +: ${gotosocial_group=%%GROUP%%} +: ${gotosocial_dir=%%DBDIR%%} + +procname="%%PREFIX%%/bin/${name}" +command=/usr/sbin/daemon +command_args="-c -T ${name} ${procname} --config-path ${gotosocial_config} server start" + +start_precmd="${name}_prestart" + +gotosocial_prestart() +{ + if [ ! -d ${gotosocial_dir} ]; then + install -d -m 0750 -o ${gotosocial_user} -g ${gotosocial_group} \ + ${gotosocial_dir} ${gotosocial_dir}/certs + fi +} + +run_rc_command "$1" diff --git a/net-im/gotosocial/files/patch-example_config.yaml b/net-im/gotosocial/files/patch-example_config.yaml new file mode 100644 index 000000000000..c82827ad9d16 --- /dev/null +++ b/net-im/gotosocial/files/patch-example_config.yaml @@ -0,0 +1,35 @@ +--- example/config.yaml.orig 2022-02-03 11:30:06 UTC ++++ example/config.yaml +@@ -151,12 +151,12 @@ db-tls-ca-cert: "" + # String. Directory from which gotosocial will attempt to load html templates (.tmpl files). + # Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"] + # Default: "./web/template/" +-web-template-base-dir: "./web/template/" ++web-template-base-dir: "/usr/local/www/gotosocial/template/" + + # String. Directory from which gotosocial will attempt to serve static web assets (images, scripts). + # Examples: ["/some/absolute/path/", "./relative/path/", "../../some/weird/path/"] + # Default: "./web/assets/" +-web-asset-base-dir: "./web/assets/" ++web-asset-base-dir: "/usr/local/www/gotosocial/assets/" + + ########################### + ##### ACCOUNTS CONFIG ##### +@@ -222,7 +222,7 @@ storage-backend: "local" + # this directory, and create new subdirectories and files within it. + # Examples: ["/home/gotosocial/storage", "/opt/gotosocial/datastorage"] + # Default: "/gotosocial/storage" +-storage-local-base-path: "/gotosocial/storage" ++storage-local-base-path: "/var/db/gotosocial/storage" + + ########################### + ##### STATUSES CONFIG ##### +@@ -288,7 +288,7 @@ letsencrypt-port: 80 + # In any case, make sure GoToSocial has permissions to write to / read from this directory. + # Examples: ["/home/gotosocial/storage/certs", "/acmecerts"] + # Default: "/gotosocial/storage/certs" +-letsencrypt-cert-dir: "/gotosocial/storage/certs" ++letsencrypt-cert-dir: "/var/db/gotosocial/storage/certs" + + # String. Email address to use when registering LetsEncrypt certs. + # Most likely, this will be the email address of the instance administrator. diff --git a/net-im/gotosocial/pkg-descr b/net-im/gotosocial/pkg-descr new file mode 100644 index 000000000000..85703284c629 --- /dev/null +++ b/net-im/gotosocial/pkg-descr @@ -0,0 +1,11 @@ +GoToSocial is an ActivityPub social network server, written in Golang. + +With GoToSocial, you can keep in touch with your friends, post, read, +and share images and articles. All without being tracked or advertised +to! + +GoToSocial provides a lightweight, customizable, and safety-focused +entryway into the Fediverse, and is comparable to (but distinct from) +existing projects such as Mastodon, Pleroma, Friendica, and PixelFed. + +WWW: https://docs.gotosocial.org/en/latest/ diff --git a/net-im/gotosocial/pkg-plist b/net-im/gotosocial/pkg-plist new file mode 100644 index 000000000000..1196663d0ef5 --- /dev/null +++ b/net-im/gotosocial/pkg-plist @@ -0,0 +1,36 @@ +@sample etc/gotosocial/config.yaml.sample +%%WWWDIR%%/assets/base.css +%%WWWDIR%%/assets/colors.css +%%WWWDIR%%/assets/Fork-Awesome/CONTRIBUTORS.md +%%WWWDIR%%/assets/Fork-Awesome/css/fork-awesome.css +%%WWWDIR%%/assets/Fork-Awesome/css/fork-awesome.min.css +%%WWWDIR%%/assets/Fork-Awesome/css/fork-awesome.min.css.map +%%WWWDIR%%/assets/Fork-Awesome/css/v5-compat.css +%%WWWDIR%%/assets/Fork-Awesome/css/v5-compat.min.css +%%WWWDIR%%/assets/Fork-Awesome/css/v5-compat.min.css.map +%%WWWDIR%%/assets/Fork-Awesome/fonts/forkawesome-webfont.eot +%%WWWDIR%%/assets/Fork-Awesome/fonts/forkawesome-webfont.svg +%%WWWDIR%%/assets/Fork-Awesome/fonts/forkawesome-webfont.ttf +%%WWWDIR%%/assets/Fork-Awesome/fonts/forkawesome-webfont.woff +%%WWWDIR%%/assets/Fork-Awesome/fonts/forkawesome-webfont.woff2 +%%WWWDIR%%/assets/Fork-Awesome/LICENSES +%%WWWDIR%%/assets/logo.png +%%WWWDIR%%/assets/status.css +%%WWWDIR%%/assets/tusky.svg +%%WWWDIR%%/template/404.tmpl +%%WWWDIR%%/template/authorize.tmpl +%%WWWDIR%%/template/confirmed.tmpl +%%WWWDIR%%/template/email_confirm_html.tmpl +%%WWWDIR%%/template/email_confirm_text.tmpl +%%WWWDIR%%/template/email_reset_html.tmpl +%%WWWDIR%%/template/email_reset_text.tmpl +%%WWWDIR%%/template/error.tmpl +%%WWWDIR%%/template/footer.tmpl +%%WWWDIR%%/template/header.tmpl +%%WWWDIR%%/template/index.tmpl +%%WWWDIR%%/template/sign-in.tmpl +%%WWWDIR%%/template/status.tmpl +%%WWWDIR%%/template/thread.tmpl +bin/gotosocial +share/doc/gotosocial/LICENSE +share/doc/gotosocial/README.md