From nobody Fri Nov 03 07:34:59 2023 X-Original-To: dev-commits-ports-all@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 4SMCFH6CgBz50GS9; Fri, 3 Nov 2023 07:34: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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SMCFH5yYWz3Lst; Fri, 3 Nov 2023 07:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698996899; 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=p6ZxdhgJCDo7kRMClJpQsE35d0GN4msvj+e9ZOXHHKU=; b=xkwUa1Wm4vhJjkFm67e+q5xzK8m++Ms/8n3Lr70D8bnJkkuUKSaHaqJXzNtfrkzwTk6bkl OKKd5iwEmrb7IDx0cS83dpuVwB0kb6FhXfmjz5XcKXIGrllM5J4MAk4HhvPmOLwAUQd2ww ZVl7sC1kMnbjuqSg2xrCdaW7RTurgrmmI/m4BgKXRqUJlr/+KXRJVQKpPSkLppFaET203I mfdxKoQ8Yk0C/Wr701OJ5woV+eIprS7FyVfUtM9+Vwz99Vj8l3ZoQf4nAsFiRxqZ08O1J3 ycgYQrou5dqJw52lLTbgEylT6OouZHxHxx/kFtdYXM3LFeofbZI8+8HUXMXPbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698996899; 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=p6ZxdhgJCDo7kRMClJpQsE35d0GN4msvj+e9ZOXHHKU=; b=i2Er5z2pfPoSeUw0NEktILkFeeCB4+CWCoWCv0AgBRfSqtGbZtD5MfgpjTkLJLiRR+ntAT JYT+liFtmyrqi8GTgPkHxNYIYVTVjkGqDBof4nrVMc2TlYEgIIYEEDjUoL4+wbCcoSgKdj scnheUYlTYC45WZWmM4xvke5pZNR2jbYGGqdBPcMfTY6eGScFI+D3w9iIylIV58QAzaz56 CWWzlTwYDBm/IDRAgNNyxzRek8oQBQwfS8gWI6+3QDj1KxTLSOdUlsjq1riUWM/D52KQ/p Pkxj4t71s1ZmQurumg6pkVSMCSmS23wugW+aRrL5kaGiVzBPEZhhX8FLfkwwEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698996899; a=rsa-sha256; cv=none; b=HC3XFgnkbhYgi5yvDENa9xEIBD+Dm+hwhLAbQ0ZNl8VDyRlyA6PPemm6//tJksj4UY3gjt mVw46eAamqDz6OEZ8ZCEPij4o2L2X4I6MvonAgO/yRArkN8PwaXdmz7rmn6iSEeQRTG33C natnk5+RmyWbJIg5RUGera1MD7k8VuxTUn52vgA7v8TIOgqxmQJkSG+VrEZAhUeZsq47jK 0RKFKrnsTNRx4DPWZViMWqPwFHoZyzT8H+Bcs8RSONxkQwImvYjy6LrnXmmHZRR0HVkkvj M5lIct0m2DsjAtcy5n7/uuP6NoL+nAhujNt/CoaCOGoygdVIs8hxjFfDwuTXQw== 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 4SMCFH4mNJz138t; Fri, 3 Nov 2023 07:34:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3A37YxWF030042; Fri, 3 Nov 2023 07:34:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3A37Yxh0030039; Fri, 3 Nov 2023 07:34:59 GMT (envelope-from git) Date: Fri, 3 Nov 2023 07:34:59 GMT Message-Id: <202311030734.3A37Yxh0030039@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Xin LI Subject: git: d273a68655c3 - main - www/remark42: Restore List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: delphij X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d273a68655c3cfa7c64c25aa071676ba2954563c Auto-Submitted: auto-generated The branch main has been updated by delphij: URL: https://cgit.FreeBSD.org/ports/commit/?id=d273a68655c3cfa7c64c25aa071676ba2954563c commit d273a68655c3cfa7c64c25aa071676ba2954563c Author: Xin LI AuthorDate: 2023-11-03 07:34:52 +0000 Commit: Xin LI CommitDate: 2023-11-03 07:34:52 +0000 www/remark42: Restore This reverts commit 6ef618cbb791a5542bbb8a8f85c7a94231e51ddf and changes the dependency to use node20. --- MOVED | 1 - www/Makefile | 1 + www/remark42/Makefile | 139 +++++++++++++++++++++ www/remark42/distinfo | 143 +++++++++++++++++++++ www/remark42/files/remark.in | 287 +++++++++++++++++++++++++++++++++++++++++++ www/remark42/pkg-descr | 3 + 6 files changed, 573 insertions(+), 1 deletion(-) diff --git a/MOVED b/MOVED index 4400fc56d79b..4a14070b3dd8 100644 --- a/MOVED +++ b/MOVED @@ -7960,5 +7960,4 @@ net/ceph14||2023-11-02|Has expired: End of life upstream since 2021-06-30 www/sfnt2woff||2023-11-02|Has expired: Superseded by WOFF 2.0, please consider using devel/woff2 textproc/kibana7||2023-11-02|Has expired: Depends on EOL NodeJS 16 devel/electron22|devel/electron24|2023-11-02|Has expired: Depends on EOL NodeJS 16 -www/remark42||2023-11-02|Has expired: Depends on EOL NodeJS 16 www/hedgedoc||2023-11-02|Has expired: Depends on EOL NodeJS 16 diff --git a/www/Makefile b/www/Makefile index f70d87a431fd..4b669890cd65 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1907,6 +1907,7 @@ SUBDIR += reddsaver SUBDIR += redmine50 SUBDIR += rejik + SUBDIR += remark42 SUBDIR += reportmagic SUBDIR += repos-style SUBDIR += reproxy diff --git a/www/remark42/Makefile b/www/remark42/Makefile new file mode 100644 index 000000000000..d1fd39b8644c --- /dev/null +++ b/www/remark42/Makefile @@ -0,0 +1,139 @@ +PORTNAME= remark42 +DISTVERSIONPREFIX= v +DISTVERSION= 1.12.1 +PORTREVISION= 2 +CATEGORIES= www +MASTER_SITES= LOCAL/delphij:npmcache +DISTFILES= ${PORTNAME}-npm-cache-${DISTVERSION}${EXTRACT_SUFX}:npmcache + +MAINTAINER= delphij@FreeBSD.org +COMMENT= Privacy-focused lightweight commenting engine +WWW= https://remark42.com/ + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS+= npm-node20>0:www/npm-node20 + +USES= cpe go:modules tar:xz + +GO_BUILDFLAGS= -ldflags "-s -w -X main.revision=${DISTVERSION}" +GO_TARGET= app:${PREFIX}/libexec/${PORTNAME} +GO_PKGNAME= github.com/${GH_ACCOUNT}/${PORTNAME}/backend +LD_FLAG_X_PREFIX= -X ${GO_PKGNAME}/version + +MAKE_ENV+= npm_config_offline=true + +USE_RC_SUBR= ${PORTNAME} + +USE_GITHUB= yes +GH_ACCOUNT= umputun + +PLIST_FILES= libexec/${PORTNAME} + +GH_TUPLE= \ + Depado:bfchroma:v2.0.0:depado_bfchroma_v2/vendor/github.com/Depado/bfchroma/v2 \ + PuerkitoBio:goquery:v1.8.1:puerkitobio_goquery/vendor/github.com/PuerkitoBio/goquery \ + ajg:form:v1.5.1:ajg_form/vendor/github.com/ajg/form \ + alecthomas:chroma:v2.8.0:alecthomas_chroma_v2/vendor/github.com/alecthomas/chroma/v2 \ + andybalholm:cascadia:v1.3.2:andybalholm_cascadia/vendor/github.com/andybalholm/cascadia \ + aymerick:douceur:v0.2.0:aymerick_douceur/vendor/github.com/aymerick/douceur \ + cespare:xxhash:v2.2.0:cespare_xxhash_v2/vendor/github.com/cespare/xxhash/v2 \ + davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \ + dghubble:oauth1:v0.7.2:dghubble_oauth1/vendor/github.com/dghubble/oauth1 \ + dgryski:go-rendezvous:9f7001d12a5f:dgryski_go_rendezvous/vendor/github.com/dgryski/go-rendezvous \ + didip:tollbooth:v7.0.1:didip_tollbooth_v7/vendor/github.com/didip/tollbooth/v7 \ + didip:tollbooth_chi:d662a7f6928f:didip_tollbooth_chi/vendor/github.com/didip/tollbooth_chi \ + dlclark:regexp2:v1.10.0:dlclark_regexp2/vendor/github.com/dlclark/regexp2 \ + etcd-io:bbolt:v1.3.7:etcd_io_bbolt/vendor/go.etcd.io/bbolt \ + go-chi:chi:v5.0.10:go_chi_chi_v5/vendor/github.com/go-chi/chi/v5 \ + go-chi:cors:v1.2.1:go_chi_cors/vendor/github.com/go-chi/cors \ + go-chi:render:v1.0.3:go_chi_render/vendor/github.com/go-chi/render \ + go-oauth2:oauth2:v4.5.2:go_oauth2_oauth2_v4/vendor/github.com/go-oauth2/oauth2/v4 \ + go-pkgz:auth:v1.22.0:go_pkgz_auth/vendor/github.com/go-pkgz/auth \ + go-pkgz:email:v0.4.1:go_pkgz_email/vendor/github.com/go-pkgz/email \ + go-pkgz:expirable-cache:v1.0.0:go_pkgz_expirable_cache/vendor/github.com/go-pkgz/expirable-cache \ + go-pkgz:jrpc:v0.3.0:go_pkgz_jrpc/vendor/github.com/go-pkgz/jrpc \ + go-pkgz:lcw:v1.0.2:go_pkgz_lcw/vendor/github.com/go-pkgz/lcw \ + go-pkgz:lgr:v0.11.0:go_pkgz_lgr/vendor/github.com/go-pkgz/lgr \ + go-pkgz:notify:v0.2.0:go_pkgz_notify/vendor/github.com/go-pkgz/notify \ + go-pkgz:repeater:v1.1.3:go_pkgz_repeater/vendor/github.com/go-pkgz/repeater \ + go-pkgz:rest:v1.17.0:go_pkgz_rest/vendor/github.com/go-pkgz/rest \ + go-pkgz:syncs:v1.3.2:go_pkgz_syncs/vendor/github.com/go-pkgz/syncs \ + go-redis:redis:v8.11.5:go_redis_redis_v8/vendor/github.com/go-redis/redis/v8 \ + go-yaml:yaml:v3.0.1:go_yaml_yaml/vendor/gopkg.in/yaml.v3 \ + golang-jwt:jwt:v3.2.2:golang_jwt_jwt/vendor/github.com/golang-jwt/jwt \ + golang:appengine:v1.6.7:golang_appengine/vendor/google.golang.org/appengine \ + golang:crypto:v0.12.0:golang_crypto/vendor/golang.org/x/crypto \ + golang:image:v0.11.0:golang_image/vendor/golang.org/x/image \ + golang:net:v0.14.0:golang_net/vendor/golang.org/x/net \ + golang:oauth2:v0.11.0:golang_oauth2/vendor/golang.org/x/oauth2 \ + golang:protobuf:v1.5.3:golang_protobuf/vendor/github.com/golang/protobuf \ + golang:snappy:v0.0.4:golang_snappy/vendor/github.com/golang/snappy \ + golang:sync:v0.3.0:golang_sync/vendor/golang.org/x/sync \ + golang:sys:v0.11.0:golang_sys/vendor/golang.org/x/sys \ + golang:text:v0.12.0:golang_text/vendor/golang.org/x/text \ + google:uuid:v1.3.0:google_uuid/vendor/github.com/google/uuid \ + googleapis:google-cloud-go:compute/v1.23.0:googleapis_google_cloud_go_compute/vendor/cloud.google.com/go \ + googleapis:google-cloud-go:compute/metadata/v0.2.3:googleapis_google_cloud_go/vendor/cloud.google.com/go/compute/metadata \ + gorilla:css:v1.0.0:gorilla_css/vendor/github.com/gorilla/css \ + gorilla:feeds:v1.1.1:gorilla_feeds/vendor/github.com/gorilla/feeds \ + gorilla:websocket:v1.5.0:gorilla_websocket/vendor/github.com/gorilla/websocket \ + hashicorp:errwrap:v1.1.0:hashicorp_errwrap/vendor/github.com/hashicorp/errwrap \ + hashicorp:go-multierror:v1.1.1:hashicorp_go_multierror/vendor/github.com/hashicorp/go-multierror \ + hashicorp:golang-lru:v0.5.4:hashicorp_golang_lru/vendor/github.com/hashicorp/golang-lru \ + jessevdk:go-flags:v1.5.0:jessevdk_go_flags/vendor/github.com/jessevdk/go-flags \ + klauspost:compress:v1.16.7:klauspost_compress/vendor/github.com/klauspost/compress \ + kyokomi:emoji:v2.2.12:kyokomi_emoji_v2/vendor/github.com/kyokomi/emoji/v2 \ + microcosm-cc:bluemonday:v1.0.25:microcosm_cc_bluemonday/vendor/github.com/microcosm-cc/bluemonday \ + mongodb:mongo-go-driver:v1.12.1:mongodb_mongo_go_driver/vendor/go.mongodb.org/mongo-driver \ + montanaflynn:stats:v0.7.1:montanaflynn_stats/vendor/github.com/montanaflynn/stats \ + nullrocks:identicon:7875f45b0022:nullrocks_identicon/vendor/github.com/nullrocks/identicon \ + pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \ + protocolbuffers:protobuf-go:v1.31.0:protocolbuffers_protobuf_go/vendor/google.golang.org/protobuf \ + rs:xid:v1.5.0:rs_xid/vendor/github.com/rs/xid \ + russross:blackfriday:v2.1.0:russross_blackfriday_v2/vendor/github.com/russross/blackfriday/v2 \ + skip2:go-qrcode:da1b6568686e:skip2_go_qrcode/vendor/github.com/skip2/go-qrcode \ + slack-go:slack:v0.12.2:slack_go_slack/vendor/github.com/slack-go/slack \ + stretchr:testify:v1.8.4:stretchr_testify/vendor/github.com/stretchr/testify \ + uber-go:goleak:v1.2.1:uber_go_goleak/vendor/go.uber.org/goleak \ + xdg-go:pbkdf2:v1.0.0:xdg_go_pbkdf2/vendor/github.com/xdg-go/pbkdf2 \ + xdg-go:scram:v1.1.2:xdg_go_scram/vendor/github.com/xdg-go/scram \ + xdg-go:stringprep:v1.0.4:xdg_go_stringprep/vendor/github.com/xdg-go/stringprep \ + youmark:pkcs8:1326539a0a0a:youmark_pkcs8/vendor/github.com/youmark/pkcs8 + +REMARK_PIDDIR= /var/run/${PORTNAME}/ +REMARK_USER?= www +REMARK_DATADIR?=/var/db/${PORTNAME} + +REMARK_URL?= http://127.0.0.1:8080 + +USE_RC_SUBR= remark + +SUB_LIST+= REMARK_PIDDIR=${REMARK_PIDDIR} \ + REMARK_USER=${REMARK_USER} \ + REMARK_DATADIR=${REMARK_DATADIR} + +# (for maintainer) helper target to generate node_modules tarball +make-npm-cache: extract + @cd ${WRKDIR} && ${RM} -r .npm + @cd ${WRKSRC}/frontend/apps/${PORTNAME} \ + && ${SETENV} HOME=${WRKDIR} npm install --force + @cd ${WRKDIR} \ + && ${TAR} -cJf ${PORTNAME}-npm-cache-${DISTVERSION}${EXTRACT_SUFX} .npm \ + ${PORTNAME}-${DISTVERSION}/frontend/apps/remark42/package-lock.json \ + && ${ECHO} "Please upload the file ${WRKDIR}/${PORTNAME}-npm-cache-${DISTVERSION}${EXTRACT_SUFX}" + +pre-build: + cd ${WRKSRC}/frontend/apps/${PORTNAME} && ${SETENV} HOME=${WRKDIR} npm install --force + cd ${WRKSRC}/frontend/apps/${PORTNAME} && ${SETENV} HOME=${WRKDIR} npm run build + ${RM} -r ${WRKSRC}/backend/app/cmd/web/ + ${MV} ${WRKSRC}/frontend/apps/remark42/public ${WRKSRC}/backend/app/cmd/web + ${FIND} ${WRKSRC}/backend/app/cmd/web -type f \( -name '*.html' -or -name '*.js' -or -name '*.mjs' \) \ + -print -exec ${REINPLACE_CMD} -e "s|{% REMARK_URL %}|${REMARK_URL}|g" {} + + +do-build: + cd ${WRKSRC}/backend && ${SETENV} ${MAKE_ENV} ${GO_ENV} GOPROXY=off ${GO_CMD} build ${GO_BUILDFLAGS} \ + -o ${GO_WRKDIR_BIN}/${PORTNAME} ./app + +.include diff --git a/www/remark42/distinfo b/www/remark42/distinfo new file mode 100644 index 000000000000..c430d8745ce7 --- /dev/null +++ b/www/remark42/distinfo @@ -0,0 +1,143 @@ +TIMESTAMP = 1693379504 +SHA256 (remark42-npm-cache-1.12.1.tar.xz) = 2ab686cebbd31523e5592f457c8430ed7fd741250ff35063ed875820827faa9c +SIZE (remark42-npm-cache-1.12.1.tar.xz) = 113414220 +SHA256 (umputun-remark42-v1.12.1_GH0.tar.gz) = 5c1f74eb44e3aeba5c7bff68ff3bb6eec5a64f82a1be75ee67e074fe4963de2e +SIZE (umputun-remark42-v1.12.1_GH0.tar.gz) = 6357410 +SHA256 (Depado-bfchroma-v2.0.0_GH0.tar.gz) = d999d4cf56554c15fe8d1651e4b5e87dbd5b399a0d4c7af7bc7b682e93da4f18 +SIZE (Depado-bfchroma-v2.0.0_GH0.tar.gz) = 7451 +SHA256 (PuerkitoBio-goquery-v1.8.1_GH0.tar.gz) = d6e72ac1c5bb92e1106dab9a03bb29cdabd7b1ef8b915e7a6fbcfedb8e2b9388 +SIZE (PuerkitoBio-goquery-v1.8.1_GH0.tar.gz) = 106563 +SHA256 (ajg-form-v1.5.1_GH0.tar.gz) = 085e8e98cf63d39241c6ba815b9a71d38808c3fadb6b522feb7fab6d123c44c7 +SIZE (ajg-form-v1.5.1_GH0.tar.gz) = 14946 +SHA256 (alecthomas-chroma-v2.8.0_GH0.tar.gz) = d6ddb56fd3cf0d7ae2c592f834aced1be4494f21338a79636743c25305a65a00 +SIZE (alecthomas-chroma-v2.8.0_GH0.tar.gz) = 971055 +SHA256 (andybalholm-cascadia-v1.3.2_GH0.tar.gz) = f30ebb75a9f43a30478c870dd6e372ac7ef64549f621eceb3b13fd91bfde80cb +SIZE (andybalholm-cascadia-v1.3.2_GH0.tar.gz) = 35370 +SHA256 (aymerick-douceur-v0.2.0_GH0.tar.gz) = ceed015cddc99b600ccbbd6aa0ebe39063554049f70153887d3df7c21fefedbb +SIZE (aymerick-douceur-v0.2.0_GH0.tar.gz) = 20914 +SHA256 (cespare-xxhash-v2.2.0_GH0.tar.gz) = b8c684b9e5e136510913727e6a845b28f8176e55db827b11f17769fba970fe13 +SIZE (cespare-xxhash-v2.2.0_GH0.tar.gz) = 12334 +SHA256 (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 7d82b9bb7291adbe7498fe946920ab3e7fc9e6cbfc3b2294693fad00bf0dd17e +SIZE (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 42152 +SHA256 (dghubble-oauth1-v0.7.2_GH0.tar.gz) = e89bc3df198e368667e28c15e93a6f5dee3e04fde790ced3c49e98b4c0349b24 +SIZE (dghubble-oauth1-v0.7.2_GH0.tar.gz) = 22692 +SHA256 (dgryski-go-rendezvous-9f7001d12a5f_GH0.tar.gz) = 29584550745fd4b8fce2e2f3def7b9d9ffe2b86cf9b6596b53a660c9bbfe27b6 +SIZE (dgryski-go-rendezvous-9f7001d12a5f_GH0.tar.gz) = 1699 +SHA256 (didip-tollbooth-v7.0.1_GH0.tar.gz) = fc8258f324a0232ee6fbbc327b3d5ead417349ef4c179fd04a9281fa9363fb99 +SIZE (didip-tollbooth-v7.0.1_GH0.tar.gz) = 26431 +SHA256 (didip-tollbooth_chi-d662a7f6928f_GH0.tar.gz) = a64242f72a7c7274ce3ba6416fe3028c9c9c13edbfd633a0c2748f8641cbf60a +SIZE (didip-tollbooth_chi-d662a7f6928f_GH0.tar.gz) = 1830 +SHA256 (dlclark-regexp2-v1.10.0_GH0.tar.gz) = 3e22a8bc42531c263954350a7ad4620319a77122c991c758883e43339cd5ae48 +SIZE (dlclark-regexp2-v1.10.0_GH0.tar.gz) = 212212 +SHA256 (etcd-io-bbolt-v1.3.7_GH0.tar.gz) = a99c0371bd041a3ca45bd314428976f3f13408ea53dbf2f8aa74b0288889acb2 +SIZE (etcd-io-bbolt-v1.3.7_GH0.tar.gz) = 116699 +SHA256 (go-chi-chi-v5.0.10_GH0.tar.gz) = 60da5049ef0fbe21611b49602afacb8bd0dbf82699e18c02954b8215701fbdd9 +SIZE (go-chi-chi-v5.0.10_GH0.tar.gz) = 83652 +SHA256 (go-chi-cors-v1.2.1_GH0.tar.gz) = d3fa42948b4b365db19c9a6639090c6869b968fa8c5ecb9635dce1a9bf4cf8d8 +SIZE (go-chi-cors-v1.2.1_GH0.tar.gz) = 8827 +SHA256 (go-chi-render-v1.0.3_GH0.tar.gz) = 4458232c0a5b600bd64d2b48bc90a8469fcd520e070bd390bbe5e43431999495 +SIZE (go-chi-render-v1.0.3_GH0.tar.gz) = 6165 +SHA256 (go-oauth2-oauth2-v4.5.2_GH0.tar.gz) = 199234a61701d288d379a37d12af32a9bfb9470a8f5f6c714b258405177f06de +SIZE (go-oauth2-oauth2-v4.5.2_GH0.tar.gz) = 579318 +SHA256 (go-pkgz-auth-v1.22.0_GH0.tar.gz) = 4da05ea6c19cb3d674a30b5638ecadbb02caae192f059acf0262a4bd587e15b1 +SIZE (go-pkgz-auth-v1.22.0_GH0.tar.gz) = 155767 +SHA256 (go-pkgz-email-v0.4.1_GH0.tar.gz) = e169a0e8d91030f3cce123c4a65719f51d9ac0b45e35152b3569816cbbc171fc +SIZE (go-pkgz-email-v0.4.1_GH0.tar.gz) = 100857 +SHA256 (go-pkgz-expirable-cache-v1.0.0_GH0.tar.gz) = 631e621c87bc8900a2181fe1b4285a5cd852a4e91145031327cb416b3081547e +SIZE (go-pkgz-expirable-cache-v1.0.0_GH0.tar.gz) = 8212 +SHA256 (go-pkgz-jrpc-v0.3.0_GH0.tar.gz) = 158ec6a2c711cee4608f5c55ecc0692c3e38b0c6c4f2af01aea008a64822d988 +SIZE (go-pkgz-jrpc-v0.3.0_GH0.tar.gz) = 15188 +SHA256 (go-pkgz-lcw-v1.0.2_GH0.tar.gz) = c47096e773a7689be2bbe4c64a888187bafe601991cfcc194b48dfcddee52ec1 +SIZE (go-pkgz-lcw-v1.0.2_GH0.tar.gz) = 28973 +SHA256 (go-pkgz-lgr-v0.11.0_GH0.tar.gz) = f69d505f01b8b2866aaa4575cda30b0296274c4d14794c8bc612967294758d82 +SIZE (go-pkgz-lgr-v0.11.0_GH0.tar.gz) = 15052 +SHA256 (go-pkgz-notify-v0.2.0_GH0.tar.gz) = 558eecf2a17c45b1c66fbf88f7647c17f06450867e92f3dffeb55c59700f7077 +SIZE (go-pkgz-notify-v0.2.0_GH0.tar.gz) = 18854 +SHA256 (go-pkgz-repeater-v1.1.3_GH0.tar.gz) = d3c6bdece4cd305e33efc64369aaab9ebf0452dffb7bd841b9e5a8e861607f43 +SIZE (go-pkgz-repeater-v1.1.3_GH0.tar.gz) = 6059 +SHA256 (go-pkgz-rest-v1.17.0_GH0.tar.gz) = d53111732ede3abd0d0e02d274a057495af85f3e4cca547e69b1b850687397fe +SIZE (go-pkgz-rest-v1.17.0_GH0.tar.gz) = 30508 +SHA256 (go-pkgz-syncs-v1.3.2_GH0.tar.gz) = 78c90265f7617a9eda774c39deb5f17cd87dfdf161402b3e4dc6e5dac48c0c68 +SIZE (go-pkgz-syncs-v1.3.2_GH0.tar.gz) = 9087 +SHA256 (go-redis-redis-v8.11.5_GH0.tar.gz) = 49f307ad85960c25d98bea3b2d155c893e43f41831c1bb4891e1eb867ead1245 +SIZE (go-redis-redis-v8.11.5_GH0.tar.gz) = 168188 +SHA256 (go-yaml-yaml-v3.0.1_GH0.tar.gz) = cf05411540d3e6ef8f1fd88434b34f94cedaceb540329031d80e23b74540c4e5 +SIZE (go-yaml-yaml-v3.0.1_GH0.tar.gz) = 91173 +SHA256 (golang-jwt-jwt-v3.2.2_GH0.tar.gz) = 4cd18a4bb5d949244f137fed0884f93695ff268cb9efaba71ddcf4c50b17efe0 +SIZE (golang-jwt-jwt-v3.2.2_GH0.tar.gz) = 39887 +SHA256 (golang-appengine-v1.6.7_GH0.tar.gz) = c623d81235f7c9699e299b328191d813337dd57dcc800d7afdb5130e8c321a8f +SIZE (golang-appengine-v1.6.7_GH0.tar.gz) = 333007 +SHA256 (golang-crypto-v0.12.0_GH0.tar.gz) = f2e422baedd3a599471bfe6adb8e4b337a80bb8a9665d283a8d0810edadbd31c +SIZE (golang-crypto-v0.12.0_GH0.tar.gz) = 1792261 +SHA256 (golang-image-v0.11.0_GH0.tar.gz) = f3f2478f08274fabf49f4947ba98bdda9de35e811a0e28cc76144ae33c816680 +SIZE (golang-image-v0.11.0_GH0.tar.gz) = 5091140 +SHA256 (golang-net-v0.14.0_GH0.tar.gz) = 4e1e28fced7e751f6e91462463bbd5c291601807a7cc2ead1fcc7373bcc93828 +SIZE (golang-net-v0.14.0_GH0.tar.gz) = 1421533 +SHA256 (golang-oauth2-v0.11.0_GH0.tar.gz) = 8cb6f05e8bf107a1b99fe05450eac7b115d1eccb2aaa115cc3212447058c68b6 +SIZE (golang-oauth2-v0.11.0_GH0.tar.gz) = 87085 +SHA256 (golang-protobuf-v1.5.3_GH0.tar.gz) = 48457a6a9e8c78a7556ff5ff4a4c77d7df9bf70e882491ee0f3f1ff06db2bfaa +SIZE (golang-protobuf-v1.5.3_GH0.tar.gz) = 171822 +SHA256 (golang-snappy-v0.0.4_GH0.tar.gz) = 77df678795596f9dfecb5744deb984633d780460a7e9a59e0c7ecfe2052b644f +SIZE (golang-snappy-v0.0.4_GH0.tar.gz) = 66129 +SHA256 (golang-sync-v0.3.0_GH0.tar.gz) = 0be463c5e9198caec11b59795c780db96d9136df65451196629d74f737ef457a +SIZE (golang-sync-v0.3.0_GH0.tar.gz) = 20003 +SHA256 (golang-sys-v0.11.0_GH0.tar.gz) = 907778fbdf5a900ee51fc45e0a3f2cc7bc693af8a9c972c00679b194b61ea24c +SIZE (golang-sys-v0.11.0_GH0.tar.gz) = 1445078 +SHA256 (golang-text-v0.12.0_GH0.tar.gz) = 223318d6bd0b76fe5cdff3499a0ad0b3bfe573336951b0b141af6cde704252da +SIZE (golang-text-v0.12.0_GH0.tar.gz) = 8967035 +SHA256 (google-uuid-v1.3.0_GH0.tar.gz) = 7f7f37c47980e0afcc178a9ffc390bec29ed2371919b4c07658eb01791a7f921 +SIZE (google-uuid-v1.3.0_GH0.tar.gz) = 16210 +SHA256 (googleapis-google-cloud-go-compute-v1.23.0_GH0.tar.gz) = 3d3378dbc0be74c941caafbd53fdd4a75c277d22599669a97da282e7f6c1aee0 +SIZE (googleapis-google-cloud-go-compute-v1.23.0_GH0.tar.gz) = 21906397 +SHA256 (googleapis-google-cloud-go-compute-metadata-v0.2.3_GH0.tar.gz) = c83b666324b7ae4997298d55efde8b1a3890d02fb1b86395e305e7f8ad0bfa51 +SIZE (googleapis-google-cloud-go-compute-metadata-v0.2.3_GH0.tar.gz) = 18575574 +SHA256 (gorilla-css-v1.0.0_GH0.tar.gz) = 9decf83063b85bcd5392f645fac322e986b5fc596b3e44c3be02ee5939106f4c +SIZE (gorilla-css-v1.0.0_GH0.tar.gz) = 6443 +SHA256 (gorilla-feeds-v1.1.1_GH0.tar.gz) = 361482738014da53e03d0be5b22d39f3a4d9a8f258cf7e09faf3694ee63e091f +SIZE (gorilla-feeds-v1.1.1_GH0.tar.gz) = 14733 +SHA256 (gorilla-websocket-v1.5.0_GH0.tar.gz) = 5d86f9e1c76ff7ceca0747f78b79864fbaec9d440f4fdb03197466e5102a86b0 +SIZE (gorilla-websocket-v1.5.0_GH0.tar.gz) = 54155 +SHA256 (hashicorp-errwrap-v1.1.0_GH0.tar.gz) = 0d73891a7a179e50a142ac8832db97b17c792d29ae205b0e6aeedde4c43d51a4 +SIZE (hashicorp-errwrap-v1.1.0_GH0.tar.gz) = 8581 +SHA256 (hashicorp-go-multierror-v1.1.1_GH0.tar.gz) = 8d1bb3377310e8ffe4c7b5672c5de1eaed153402aebd15d6e5b9673c356a065f +SIZE (hashicorp-go-multierror-v1.1.1_GH0.tar.gz) = 13803 +SHA256 (hashicorp-golang-lru-v0.5.4_GH0.tar.gz) = d50c188af0cc8b22e7e4b79e9071694fa06428a9964b22d68dc997fa787a177a +SIZE (hashicorp-golang-lru-v0.5.4_GH0.tar.gz) = 13428 +SHA256 (jessevdk-go-flags-v1.5.0_GH0.tar.gz) = d4bf30f729cbc16d2aa0095ac10ca4fadc8f092b9a28990c0cfca2345c3e7ffd +SIZE (jessevdk-go-flags-v1.5.0_GH0.tar.gz) = 59316 +SHA256 (klauspost-compress-v1.16.7_GH0.tar.gz) = 0f68d194c726a9cc36bcd011e2f4498d15dad5f040382c3dbfffd7bf7d2bca28 +SIZE (klauspost-compress-v1.16.7_GH0.tar.gz) = 37939325 +SHA256 (kyokomi-emoji-v2.2.12_GH0.tar.gz) = 27d4c16399eee1d4a5d83696f9b7bfbdbee4f0a4d4083bfc9132774b367401d7 +SIZE (kyokomi-emoji-v2.2.12_GH0.tar.gz) = 103875 +SHA256 (microcosm-cc-bluemonday-v1.0.25_GH0.tar.gz) = 6a101391e443fb87f50b13b6bd8f5b12b99e1a091aa57b5073f0272823a82a93 +SIZE (microcosm-cc-bluemonday-v1.0.25_GH0.tar.gz) = 172782 +SHA256 (mongodb-mongo-go-driver-v1.12.1_GH0.tar.gz) = 9231b130e0e5accc1c9282b76c7707e315cb91229f4ea947a4151a73006a0951 +SIZE (mongodb-mongo-go-driver-v1.12.1_GH0.tar.gz) = 5181577 +SHA256 (montanaflynn-stats-v0.7.1_GH0.tar.gz) = 97e9258173992d3caee6f7d7ac175d559dfc086388ad6c65fde439b808e1b725 +SIZE (montanaflynn-stats-v0.7.1_GH0.tar.gz) = 52136 +SHA256 (nullrocks-identicon-7875f45b0022_GH0.tar.gz) = d1e5a569e2314748c2523ec8aa6603a9db09d128c408148add8630b7b0b44580 +SIZE (nullrocks-identicon-7875f45b0022_GH0.tar.gz) = 24819 +SHA256 (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 28f3dc1b5c0efd61203ab07233f774740d3bf08da4d8153fb5310db6cea0ebda +SIZE (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 11398 +SHA256 (protocolbuffers-protobuf-go-v1.31.0_GH0.tar.gz) = 96d670e9bae145ff2dd0f48a3693edb1f45ec3ee56d5f50a5f01cc7e060314bc +SIZE (protocolbuffers-protobuf-go-v1.31.0_GH0.tar.gz) = 1311732 +SHA256 (rs-xid-v1.5.0_GH0.tar.gz) = 105fc29a13c39f558a5ccf70bd27eded738628328bad682e24e04c3a798d3196 +SIZE (rs-xid-v1.5.0_GH0.tar.gz) = 11534 +SHA256 (russross-blackfriday-v2.1.0_GH0.tar.gz) = a13af0fc5305713f5154693feaf654d024689efea76390091a5e8c757335b4f4 +SIZE (russross-blackfriday-v2.1.0_GH0.tar.gz) = 92896 +SHA256 (skip2-go-qrcode-da1b6568686e_GH0.tar.gz) = af179c37da861a43242fb4383186724b34866d7b5bd3e54ca44031a2b9f92046 +SIZE (skip2-go-qrcode-da1b6568686e_GH0.tar.gz) = 36693 +SHA256 (slack-go-slack-v0.12.2_GH0.tar.gz) = aab173a7dd82b928abe9e1f18be3a0ad4e3d11cd4625aaf324b182a95988212c +SIZE (slack-go-slack-v0.12.2_GH0.tar.gz) = 371950 +SHA256 (stretchr-testify-v1.8.4_GH0.tar.gz) = 0d3e82b04a05d9428a2a2aec8776bd0a07f14f5d1b4fa0a3676526ca8259fd62 +SIZE (stretchr-testify-v1.8.4_GH0.tar.gz) = 104427 +SHA256 (uber-go-goleak-v1.2.1_GH0.tar.gz) = e66f27ce9d738486df5fe133af6c425119d21776e0e85c07ffcaeb6ba043604b +SIZE (uber-go-goleak-v1.2.1_GH0.tar.gz) = 15403 +SHA256 (xdg-go-pbkdf2-v1.0.0_GH0.tar.gz) = 2eec55146447215eb58190e04c546c93cad7f369ac9b5aacd9dc11330d756757 +SIZE (xdg-go-pbkdf2-v1.0.0_GH0.tar.gz) = 7758 +SHA256 (xdg-go-scram-v1.1.2_GH0.tar.gz) = 66e8e73966d87b7266957dbe421313b335c455907a36b0115ea81bdf7d1c9d19 +SIZE (xdg-go-scram-v1.1.2_GH0.tar.gz) = 19334 +SHA256 (xdg-go-stringprep-v1.0.4_GH0.tar.gz) = dc2abbf4f868d71e035d96986bc5c25921046d0e34c7675b6c1d555589611cf0 +SIZE (xdg-go-stringprep-v1.0.4_GH0.tar.gz) = 31008 +SHA256 (youmark-pkcs8-1326539a0a0a_GH0.tar.gz) = fa6a73620cb59309acec57b0c8743cf19322c09da3aaa66e9dd55b5bbf57c309 +SIZE (youmark-pkcs8-1326539a0a0a_GH0.tar.gz) = 14322 diff --git a/www/remark42/files/remark.in b/www/remark42/files/remark.in new file mode 100644 index 000000000000..705b68a0066e --- /dev/null +++ b/www/remark42/files/remark.in @@ -0,0 +1,287 @@ +#!/bin/sh + +# PROVIDE: remark +# REQUIRE: LOGIN +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable remark +# remark_enable="YES" +# +# Required settings: +# remark_enable (bool): Set to YES to enable remark +# Default: NO +# remark_url (str): URL to Remark42 server, required +# +# Options: +# remark_secret (str): 256-bit shared key used to sign JWT. +# Default: random string +# remark_site (str): site name(s), multi +# Default: remark +# remark_store_type (str): type of storage, bolt or rpc +# Default: bolt +# remark_store_bolt_path (str): parent directory for the bolt files +# Default: %%REMARK42_DATADIR%% +# remark_backup_path (str): backups location +# Default: %%REMARK_DATADIR%%/backup +# remark_avatar_fs_path (str): avatars location for fs store +# Default: %%REMARK_DATADIR%%/avatars +# remark_avatar_bolt_file (str): +# avatars bolt file location +# Default: %%REMARK_DATADIR%%/avatars.db +# remark_avatar_uri (str): avatars store URI +# Default: %%REMARK_DATADIR%%/avatars +# remark_image_fs_path (str): permanent location of images +# Default: %%REMARK_DATADIR%%/pictures +# remark_image_fs_staging (str): +# staging location of images +# Default: %%REMARK_DATADIR%%/pictures.staging +# remark_image_bolt_file (str): images bolt file location +# Default: %%REMARK_DATADIR%%/pictures.db +# +# Additional configuration variables available at https://remark42.com/docs/configuration/parameters/ +# are exposed with similar naming convention. + +. /etc/rc.subr + +name=remark +rcvar=remark_enable +load_rc_config ${name} + +: ${remark_enable:="NO"} +: ${remark_secret:="$(head -c32 /dev/urandom| uuencode -r -m -)"} +: ${remark_url:=""} +: ${remark_site:="remark"} +: ${remark_store_type:="bolt"} +: ${remark_store_bolt_path:="%%REMARK_DATADIR%%"} +: ${remark_store_bolt_timeout:="30s"} +: ${remark_store_rpc_api:=""} +: ${remark_store_rpc_timeout:=""} +: ${remark_store_rpc_auth_user:=""} +: ${remark_store_rpc_auth_passwd:=""} +: ${remark_admin_type:="shared"} +: ${remark_admin_rpc_api:=""} +: ${remark_admin_rpc_timeout:="5s"} +: ${remark_admin_shared_id:=""} +: ${remark_admin_shared_email:=""} +: ${remark_backup_path:="%%REMARK_DATADIR%%/backup"} +: ${remark_backup_max:="10"} +: ${remark_cache_type:="mem"} +: ${remark_avatar_type:="fs"} +: ${remark_avatar_fs_path:="%%REMARK_DATADIR%%/avatars"} +: ${remark_avatar_bolt_file:="%%REMARK_DATADIR%%/avatars.db"} +: ${remark_avatar_uri:=""} +: ${remark_avatar_resize_limit:="0"} +: ${remark_image_type:="fs"} +: ${remark_image_fs_path:="%%REMARK_DATADIR%%/pictures"} +: ${remark_image_fs_staging:="%%REMARK_DATADIR%%/pictures.staging"} +: ${remark_image_fs_partitions:="100"} +: ${remark_image_bolt_file:="%%REMARK_DATADIR%%/pictures.db"} +: ${remark_image_rpc_api:=""} +: ${remark_image_rpc_timeout:="5s"} +: ${remark_image_rpc_auth_user:=""} +: ${remark_image_rpc_auth_passwd:=""} +: ${remark_image_max_size:="5000000"} +: ${remark_image_resize_width:="2400"} +: ${remark_image_resize_height:="900"} +: ${remark_auth_same_site:="default"} +: ${remark_auth_google_cid:=""} +: ${remark_auth_google_csec:=""} +: ${remark_auth_facebook_cid:=""} +: ${remark_auth_facebook_csec:=""} +: ${remark_auth_microsoft_cid:=""} +: ${remark_auth_microsoft_csec:=""} +: ${remark_auth_github_cid:=""} +: ${remark_auth_github_csec:=""} +: ${remark_auth_twitter_cid:=""} +: ${remark_auth_twitter_csec:=""} +: ${remark_auth_patreon_cid:=""} +: ${remark_auth_patreon_csec:=""} +: ${remark_auth_yandex_cid:=""} +: ${remark_auth_yandex_csec:=""} +: ${remark_auth_telegram:=""} +: ${remark_user:="%%REMARK_USER%%"} +: ${remark_auth_anon:="false"} +: ${remark_auth_enable:="false"} +: ${remark_auth_email_from:=""} +: ${remark_auth_email_subject:="remark42 confirmation"} +: ${remark_auth_email_content_type:="text/html"} +: ${remark_notify_users:=""} +: ${remark_notify_admins:=""} +: ${remark_notify_queue:=""} +: ${remark_notify_telegram_chan:=""} +: ${remark_notify_slack_token:=""} +: ${remark_notify_slack_chan:=""} +: ${remark_notify_webhook_url:=""} +: ${remark_notify_webhook_template:=""} +: ${remark_notify_webhook_headers:=""} +: ${remark_notify_webhook_timeout:=""} +: ${remark_notify_email_from:=""} +: ${remark_notify_email_verification_subj:=""} +: ${remark_telegram_token:=""} +: ${remark_telegram_timeout:=""} +: ${remark_smtp_host:=""} +: ${remark_smtp_port:=""} +: ${remark_smtp_username:=""} +: ${remark_smtp_password:=""} +: ${remark_smtp_login_auth:=""} +: ${remark_smtp_tls:=""} +: ${remark_smtp_starttls:=""} +: ${remark_smtp_timeout:=""} +: ${remark_ssl_type:=""} +: ${remark_ssl_port:=""} +: ${remark_ssl_cert:=""} +: ${remark_ssl_key:=""} +: ${remark_ssl_acme_location:=""} +: ${remark_ssl_acme_email:=""} +: ${remark_max_comment_size:=""} +: ${remark_max_votes:=""} +: ${remark_votes_ip:=""} +: ${remark_anon_vote:=""} +: ${remark_votes_ip_time:=""} +: ${remark_low_score:=""} +: ${remark_critical_score:=""} +: ${remark_positive_score:=""} +: ${remark_restricted_words:=""} +: ${remark_restricted_names:=""} +: ${remark_edit_time:=""} +: ${remark_admin_edit:=""} +: ${remark_readonly_age:=""} +: ${remark_image_proxy_http2https:=""} +: ${remark_image_proxy_cache_external:=""} +: ${remark_emoji:=""} +: ${remark_simple_view:=""} +: ${remark_proxy_cors:=""} +: ${remark_allowed_hosts:=""} +: ${remark_remark_address:=""} +: ${remark_remark_port:=""} +: ${remark_remark_web_root:=""} +: ${remark_update_limit:=""} +: ${remark_subscribers_only:=""} +: ${remark_disable_signature:=""} +: ${remark_admin_passwd:=""} +: ${remark_debug:=""} + +export_variable() +{ + _var="remark_$(echo $1 | tr A-Z a-z)" + eval _val="\$${_var}" + [ -z "${_val}" ] || export "${1}"="${_val}" +} + +export_variables() +{ + for _v in $@; do + export_variable "${_v}" + done +} + +remark_precmd() +{ + install -d -o ${remark_user} %%REMARK_PIDDIR%% + install -d -o ${remark_user} ${remark_store_bolt_path} + + if [ -z "${remark_url}" ]; then + err 1 "remark_url must be set" + fi + export REMARK_URL="${remark_url}" + export REMARK_SITE="${remark_site}" + export_variables SECRET SITE STORE_TYPE + case "${STORE_TYPE}" in + bolt) + export_variables STORE_BOLT_PATH STORE_BOLT_TIMEOUT + ;; + rpc) + export_variables STORE_RPC_API STORE_RPC_TIMEOUT STORE_RPC_AUTH_USER STORE_RPC_AUTH_PASSWD + ;; + *) + err 1 "remark_store_type has to be either 'bolt' or 'rpc'" + ;; + esac + export_variable ADMIN_TYPE + case "${ADMIN_TYPE}" in + shared) + ;; + rpc) + export_variables ADMIN_RPC_API ADMIN_RPC_TIMEOUT ADMIN_RPC_AUTH_USER ADMIN_RPC_AUTH_PASSWD + ;; + *) + err 1 "remark_admin_type has to be either 'shared' or 'rpc'" + ;; + esac + export_variables ADMIN_SHARED_ID ADMIN_SHARED_EMAIL BACKUP_PATH + export MAX_BACKUP_FILES="${remark_backup_max}" + export_variables CACHE_TYPE AVATAR_TYPE + case "${AVATAR_TYPE}" in + fs) + export_variable AVATAR_FS_PATH + ;; + bolt) + export_variable AVATAR_BOLT_FILE + ;; + uri) + export_variable AVATAR_URI + ;; + *) + err 1 "remark_avatar_path has to be 'fs', 'bolt' or 'uri'" + ;; + esac + export AVATAR_RESIZE="${remark_avatar_resize_limit}" + export_variable IMAGE_TYPE + case "${remark_image_type}" in + fs) + export_variables IMAGE_FS_PATH IMAGE_FS_STAGING IMAGE_FS_PARTITIONS + ;; + bolt) + export_variable IMAGE_BOLT_FILE + ;; + rpc) + export_variables IMAGE_RPC_API IMAGE_RPC_TIMEOUT IMAGE_RPC_AUTH_USER IMAGE_RPC_AUTH_PASSWD + ;; + *) + err 1 "remark_image_type has to be 'fs', 'bolt' or 'rpc'" + ;; + esac + export_variables IMAGE_MAX_SIZE IMAGE_RESIZE_WIDTH IMAGE_RESIZE_HEIGHT AUTH_SAME_SITE AUTH_TELEGRAM + for _provider in google facebook microsoft github twitter patreon yandex; do + _provider_upper="$(echo ${_provider} | tr a-z A-Z)" + export_variables "AUTH_${_provider_upper}_CID" "AUTH_${_provider_upper}_CSEC" + done + export_variables AUTH_ANON AUTH_EMAIL_ENABLE AUTH_EMAIL_FROM AUTH_EMAIL_SUBJ AUTH_EMAIL_CONTENT_TYPE + export_variables NOTIFY_USERS NOTIFY_ADMINS NOTIFY_QUEUE NOTIFY_TELEGRAM_CHAN NOTIFY_SLACK_TOKEN NOTIFY_SLACK_CHAN + export_variables NOTIFY_WEBHOOK_URL NOTIFY_WEBHOOK_TEMPLATE NOTIFY_WEBHOOK_HEADERS NOTIFY_WEBHOOK_TIMEOUT + export_variables NOTIFY_EMAIL_FROM NOTIFY_EMAIL_VERIFICATION_SUBJ TELEGRAM_TOKEN TELEGRAM_TIMEOUT + export_variables SMTP_HOST SMTP_PORT SMTP_USERNAME SMTP_PASSWORD SMTP_LOGIN_AUTH SMTP_TLS + export_variables SMTP_STARTTLS SMTP_TIMEOUT SSL_TYPE SSL_PORT SSL_CERT SSL_KEY SSL_ACME_LOCATION + export_variables SSL_ACME_EMAIL MAX_COMMENT_SIZE MAX_VOTES VOTES_IP ANON_VOTE VOTES_IP_TIME + export_variables LOW_SCORE CRITICAL_SCORE POSITIVE_SCORE RESTRICTED_WORDS RESTRICTED_NAMES + export_variables EDIT_TIME ADMIN_EDIT READONLY_AGE IMAGE_PROXY_HTTP2HTTPS IMAGE_PROXY_CACHE_EXTERNAL + export_variables EMOJI SIMPLE_VIEW PROXY_CORS ALLOWED_HOSTS REMARK_ADDRESS REMARK_PORT REMARK_WEB_ROOT + export_variables UPDATE_LIMIT SUBSCRIBERS_ONLY DISABLE_SIGNATURE ADMIN_PASSWD DEBUG +} + +pidfile="%%REMARK_PIDDIR%%${name}.pid" +procname="%%PREFIX%%/libexec/remark42" +command=/usr/sbin/daemon +command_args="-c -p ${pidfile} -T ${name} ${procname} server ${remark_options}" +start_precmd="remark_precmd" +extra_commands="backup restore cleanup" +cleanup_cmd="cleanup" +cleanup_precmd="remark_precmd" +backup_cmd="backup" +backup_precmd="remark_precmd" +restore_cmd="restore" +restore_precmd="remark_precmd" + +cleanup() { + su -m ${remark_user} -c "${procname} cleanup $@" +} + +backup() { + su -m ${remark_user} -c "${procname} backup $@" +} + +restore() { + su -m ${remark_user} -c "${procname} restore $@" +} + +run_rc_command $@ diff --git a/www/remark42/pkg-descr b/www/remark42/pkg-descr new file mode 100644 index 000000000000..15e079d727a5 --- /dev/null +++ b/www/remark42/pkg-descr @@ -0,0 +1,3 @@ +Remark42 allows you to have a self-hosted, lightweight, and simple (yet +functional) comment engine, which doesn't spy on users. It can be embedded +into blogs, articles or any other place where readers add comments.