From nobody Mon Oct 28 19:20:59 2024 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 4Xcjsl3z7Bz5bgVH; Mon, 28 Oct 2024 19:20:59 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Xcjsl3LZZz4Rhf; Mon, 28 Oct 2024 19:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730143259; 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=K3a+2a5whlzswXVaFxPtrFzfXHoyGpWeSNAyduv9Iu4=; b=PpDFMuPnBYF3EkRde4rGiw/Bki6FLp+3VHvt/mru7/oCI85VjEyTFeaUAROpMGPcu1dx/a Lrfz7VD/wRUowgtAI2CTITS+MGBCp4NEhwQL7DrWJu+K8oCCGKFiumDnZ7/Q3sttlZsKop VnO2NP2dRl52RBjKAIDn99cuzNYDNC4OJgacYoSWYV/4TfK+RZ45gUyk3GIiLRP/WWgQNW VUtlXD7dgSP9/a9luxpjpHsoMedgHJgk8ZQV3ecxp1q36CpBtlUkEGcYD0KwoIAiymJ+gf FsqnxLX9bb66qblP5luOGc+cKIk7ZlNlPd8e4sVdZwo+vzTBbb15V5NBQoRiEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730143259; 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=K3a+2a5whlzswXVaFxPtrFzfXHoyGpWeSNAyduv9Iu4=; b=V3+jbrbea0M9h5Qz6ywiZzMPXXde8jfyLsU1g9iFvjJrpsicq0eW054Nw5v2jF0Cf/y2UK lv1rGguzjZw6uvf6Mi4rT7Xh5umBmO5I2RtktjSYvTyO0x/v/aybds+GG5e7qDZjRBruWa zZRKHhCwgYxe/iHaLvpL29W7Ehg6A2eemazsZR0dgboxRu78hA/lPdp0zcWyUR+UEJmblb +IwaAkuaHAQ/o6T3ZLnvNCEBCOHXYv7kF1c07KMiDByZ6IeE9lnwy7jmJNcEKWFpcy7Tfc /GmrS51WNBDsp7eZfaVLikbxsq8dt8PuaOZojuQusH3m1o6b5s0OHuxfae1mog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730143259; a=rsa-sha256; cv=none; b=kdzyr1YaiehmjzFqZKYwFWI39s8fNSr1xKiWqH6aDN+zH0NKpM+eVtUR64JrSOMR+vkSYT jeFm2gcFRwhEmTkflpY6tas1uqN4SZKWR5XBIackIGhkuBL5fa//cgWFTpVW33+WO2maNU 3Q/m8+iH50kWPcBPW1IcDkOIiEbSHiCtmwyCmGzgqpT6jR9RFANM4wMuTEPL6RxSzAR2Rm DGgmF9jEHC+rQbrXQzXxRdznQeOoZgYK6ajGMU5hzwm+kOBDLcmhZpqSH1M+j7OWs/NYWf wcPHhUQuU/3ptAHV4mjzUJwAYlH3gHedEBwhn7cKXshr0ejLS9miUMDRZdZoqQ== 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 4Xcjsl2rXlzrXN; Mon, 28 Oct 2024 19:20:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49SJKxxV009417; Mon, 28 Oct 2024 19:20:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49SJKxnY009414; Mon, 28 Oct 2024 19:20:59 GMT (envelope-from git) Date: Mon, 28 Oct 2024 19:20:59 GMT Message-Id: <202410281920.49SJKxnY009414@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Kurt Jaeger Subject: git: c39afa6d9312 - main - net-im/snac: 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: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pi X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c39afa6d93121276520e56609de8fa02c393fa80 Auto-Submitted: auto-generated The branch main has been updated by pi: URL: https://cgit.FreeBSD.org/ports/commit/?id=c39afa6d93121276520e56609de8fa02c393fa80 commit c39afa6d93121276520e56609de8fa02c393fa80 Author: Matthew Phillips AuthorDate: 2024-10-28 19:18:54 +0000 Commit: Kurt Jaeger CommitDate: 2024-10-28 19:20:36 +0000 net-im/snac: new port Snac is a simple, minimalistic ActivityPub instance. It features: - Lightweight, minimal dependencies - Extensive support of ActivityPub operations. - Multiuser - Mastodon API support, so Mastodon-compatible apps can be used - Simple but effective web interface - Easily-accessed MUTE button - Tested interoperability with related software - No database needed - Totally JavaScript-free PR: 278385 Reviewed by: bofh --- GIDs | 2 +- UIDs | 1 + net-im/Makefile | 1 + net-im/snac/Makefile | 40 ++++++++++++++++++++++++++ net-im/snac/distinfo | 3 ++ net-im/snac/files/patch-Makefile | 33 +++++++++++++++++++++ net-im/snac/files/pkg-message.in | 27 +++++++++++++++++ net-im/snac/files/snac.in | 62 ++++++++++++++++++++++++++++++++++++++++ net-im/snac/pkg-descr | 13 +++++++++ 9 files changed, 181 insertions(+), 1 deletion(-) diff --git a/GIDs b/GIDs index 11a30a83f8d9..31b9594c7217 100644 --- a/GIDs +++ b/GIDs @@ -276,7 +276,7 @@ keycloak:*:332: honeytrap:*:333: percona:*:334: benthos:*:335: -# free: 336 +snac:*:336: daapd:*:337: murmur:*:338: mumble-server:*:339: diff --git a/UIDs b/UIDs index 18cad1c4c511..b0da39669ba4 100644 --- a/UIDs +++ b/UIDs @@ -281,6 +281,7 @@ keycloak:*:332:332::0:0:keycloak server:/nonexistent:/usr/sbin/nologin honeytrap:*:333:333::0:0:HoneyTrap Daemon:/nonexistent:/usr/sbin/nologin percona:*:334:334::0:0:Percona Daemons:/nonexistent:/usr/sbin/nologin benthos:*:335:335::0:0:Benthos Daemon:/nonexistent:/usr/sbin/nologin +snac:*:336:336::0:0:Snac Daemon:/nonexistent:/usr/sbin/nologin _pma:*:336:80::0:0:phpMyAdmin Owner:/nonexistent:/usr/sbin/nologin daapd:*:337:337::0:0:daapd User:/nonexistent:/usr/sbin/nologin murmur:*:338:338::0:0:& User:/nonexistent:/usr/sbin/nologin diff --git a/net-im/Makefile b/net-im/Makefile index f511d41bba5b..4078aac2565a 100644 --- a/net-im/Makefile +++ b/net-im/Makefile @@ -141,6 +141,7 @@ SUBDIR += signal-desktop SUBDIR += signald SUBDIR += slack-term + SUBDIR += snac SUBDIR += spectral SUBDIR += ssh-chat SUBDIR += sshout diff --git a/net-im/snac/Makefile b/net-im/snac/Makefile new file mode 100644 index 000000000000..c03d0ff8d652 --- /dev/null +++ b/net-im/snac/Makefile @@ -0,0 +1,40 @@ +PORTNAME= snac +DISTVERSION= 2.57 +CATEGORIES= net-im www +MASTER_SITES= https://codeberg.org/grunfink/snac2/archive/${DISTVERSIONFULL}${EXTRACT_SUFX}?dummy=/ + +MAINTAINER= matthew@matthewphillips.info +COMMENT= Simple, minimalistic ActivityPub instance written in portable C +WWW= https://codeberg.org/grunfink/snac2 + +LICENSE= MIT + +LIB_DEPENDS= libcurl.so:ftp/curl + +USES= ssl +USE_RC_SUBR= snac + +SUB_FILES= pkg-message \ + snac +SUB_LIST= SNACDATADIR="${SNACDATADIR}" \ + GROUP="${GROUPS}" \ + USER="${USERS}" + +SNACDATADIR= /var/db/snac + +WRKSRC= ${WRKDIR}/snac2 + +USERS= snac +GROUPS= snac + +PKGMESSAGE= ${FILESDIR}/pkg-message + +PLIST_FILES= bin/snac \ + share/man/man1/snac.1.gz \ + share/man/man5/snac.5.gz \ + share/man/man8/snac.8.gz + +post-install: + ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/snac + +.include diff --git a/net-im/snac/distinfo b/net-im/snac/distinfo new file mode 100644 index 000000000000..a23a446b8b06 --- /dev/null +++ b/net-im/snac/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1724244538 +SHA256 (snac-2.57.tar.gz) = 16e25990391b04079caadeea6a5c24656a0df5ed5e7500516402c1cca21e831e +SIZE (snac-2.57.tar.gz) = 180441 diff --git a/net-im/snac/files/patch-Makefile b/net-im/snac/files/patch-Makefile new file mode 100644 index 000000000000..ba602c012f66 --- /dev/null +++ b/net-im/snac/files/patch-Makefile @@ -0,0 +1,33 @@ +--- Makefile.orig 2024-04-04 08:13:06 UTC ++++ Makefile +@@ -1,5 +1,5 @@ +-PREFIX=/usr/local +-PREFIX_MAN=$(PREFIX)/man ++PREFIX:=$(PREFIX) ++PREFIX_MAN=$(PREFIX)/share/man + CFLAGS?=-g -Wall -Wextra + + all: snac +@@ -18,14 +18,14 @@ install: + $(CC) -I/usr/local/include -MM *.c > makefile.depend + + install: +- mkdir -p -m 755 $(PREFIX)/bin +- install -m 755 snac $(PREFIX)/bin/snac +- mkdir -p -m 755 $(PREFIX_MAN)/man1 +- install -m 644 doc/snac.1 $(PREFIX_MAN)/man1/snac.1 +- mkdir -p -m 755 $(PREFIX_MAN)/man5 +- install -m 644 doc/snac.5 $(PREFIX_MAN)/man5/snac.5 +- mkdir -p -m 755 $(PREFIX_MAN)/man8 +- install -m 644 doc/snac.8 $(PREFIX_MAN)/man8/snac.8 ++ mkdir -p -m 755 $(DESTDIR)$(PREFIX)/bin ++ install -m 755 snac $(DESTDIR)$(PREFIX)/bin/snac ++ mkdir -p -m 755 $(DESTDIR)$(PREFIX_MAN)/man1 ++ install -m 644 doc/snac.1 $(DESTDIR)$(PREFIX_MAN)/man1/snac.1 ++ mkdir -p -m 755 $(DESTDIR)$(PREFIX_MAN)/man5 ++ install -m 644 doc/snac.5 $(DESTDIR)$(PREFIX_MAN)/man5/snac.5 ++ mkdir -p -m 755 $(DESTDIR)$(PREFIX_MAN)/man8 ++ install -m 644 doc/snac.8 $(DESTDIR)$(PREFIX_MAN)/man8/snac.8 + + uninstall: + rm $(PREFIX)/bin/snac diff --git a/net-im/snac/files/pkg-message.in b/net-im/snac/files/pkg-message.in new file mode 100644 index 000000000000..fca59f2128c1 --- /dev/null +++ b/net-im/snac/files/pkg-message.in @@ -0,0 +1,27 @@ +[ +{ type: install + message: < + +Data is stored at %%SNACDATADIR%%/data. For convenience the service includes +a `run` command for executing snac commands against this directory, such as +the `adduser` command shown above. See `snac --help` for a full list of +commands. +EOM +} +] diff --git a/net-im/snac/files/snac.in b/net-im/snac/files/snac.in new file mode 100644 index 000000000000..8e4078220597 --- /dev/null +++ b/net-im/snac/files/snac.in @@ -0,0 +1,62 @@ +#!/bin/sh + +# PROVIDE: snac +# REQUIRE: DAEMON +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# snac_enable (bool): Set to NO by default. +# Set it to YES to enable snac. +# snac_user (user): Set user to run snac. +# Default is "snac". +# snac_group (group): Set group to run snac. +# Default is "snac". +# snac_dir (dir): Set data storage dir. +# Default is /var/db/snac/". + +. /etc/rc.subr + +name=snac +rcvar=snac_enable +desc="Simple fediverse server" + +start_precmd="${name}_prestart" +extra_commands="init run" +init_cmd="snac_init" +run_cmd="snac_run" + +load_rc_config $name + +: ${snac_enable:=NO} +: ${snac_user=%%USER%%} +: ${snac_group=%%GROUP%%} +: ${snac_dir=%%SNACDATADIR%%} + +procname="%%PREFIX%%/bin/${name}" +command=/usr/sbin/daemon +command_args="-c -S -T ${name} ${procname} httpd ${snac_dir}/data" + +snac_prestart() +{ + if [ ! -d "${snac_dir}/data" ]; then + echo "The snac data directory does not exist. Please run: service snac init" + fi +} + +snac_init() +{ + mkdir -p "${snac_dir}" + ${procname} init "${snac_dir}/data" + chown -R ${snac_user}:${snac_group} "${snac_dir}/data" +} + +snac_run() +{ + snaccmd="$1" + shift + ${procname} $snaccmd "${snac_dir}/data" $@ +} + +run_rc_command "$@" diff --git a/net-im/snac/pkg-descr b/net-im/snac/pkg-descr new file mode 100644 index 000000000000..5d6e845abf75 --- /dev/null +++ b/net-im/snac/pkg-descr @@ -0,0 +1,13 @@ +Snac is a simple, minimalistic ActivityPub instance. + +It features: + +- Lightweight, minimal dependencies +- Extensive support of ActivityPub operations. +- Multiuser +- Mastodon API support, so Mastodon-compatible apps can be used +- Simple but effective web interface +- Easily-accessed MUTE button +- Tested interoperability with related software +- No database needed +- Totally JavaScript-free