Index: Makefile
===================================================================
RCS file: /cvs/ports/www/honk/Makefile,v
retrieving revision 1.19
diff -u -p -r1.19 Makefile
--- Makefile 11 Mar 2022 20:09:55 -0000 1.19
+++ Makefile 23 Sep 2022 16:17:47 -0000
@@ -1,6 +1,6 @@
COMMENT = federated status conveyance
-DISTNAME = honk-0.9.7
+DISTNAME = honk-0.9.8
CATEGORIES = www
HOMEPAGE = https://humungus.tedunangst.com/r/honk
@@ -13,6 +13,8 @@ PERMIT_PACKAGE = Yes
WANTLIB += c pthread sqlite3
MASTER_SITES = ${HOMEPAGE}/d/
+DISTFILES = ${EXTRACT_ONLY} honk-{../v/tip/d/views/}icon.png
+EXTRACT_ONLY = ${DISTNAME}${EXTRACT_SUFX}
EXTRACT_SUFX = .tgz
MODULES = lang/go
@@ -21,8 +23,7 @@ LIB_DEPENDS = databases/sqlite3
NO_TEST = Yes
ALL_TARGET = humungus.tedunangst.com/r/honk
-SUBST_VARS += VARBASE \
- SYSCONFDIR
+SUBST_VARS += SYSCONFDIR
DOCDIR ?= ${PREFIX}/share/doc/honk
EXAMPLESDIR = ${PREFIX}/share/examples/honk
@@ -53,5 +54,7 @@ post-install:
${EXAMPLESDIR}/views/
${INSTALL_DATA} ${MODGO_WORKSPACE}/src/${ALL_TARGET}/schema.sql \
${EXAMPLESDIR}/
+ ${INSTALL_DATA} ${DISTDIR}/honk-icon.png ${EXAMPLESDIR}/views/favicon.ico
+ ${INSTALL_DATA} ${DISTDIR}/honk-icon.png ${EXAMPLESDIR}/views/icon.png
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/www/honk/distinfo,v
retrieving revision 1.11
diff -u -p -r1.11 distinfo
--- distinfo 2 Mar 2022 07:31:01 -0000 1.11
+++ distinfo 23 Sep 2022 16:17:47 -0000
@@ -1,2 +1,4 @@
-SHA256 (honk-0.9.7.tgz) = t6EM5E98qvlnq6Y6vd21MvPBrWpkmo4qXdgNEUAeF7M=
-SIZE (honk-0.9.7.tgz) = 522993
+SHA256 (honk-0.9.8.tgz) = BmZgMvN7fFrft+W0+V2j3tezI5kRLl/7Fx5wIVXwCG4=
+SHA256 (honk-icon.png) = 92RJuF2onJ/1OYs4E4TYDm9KbzmNKISl+1+MSdhpzUQ=
+SIZE (honk-0.9.8.tgz) = 511957
+SIZE (honk-icon.png) = 912
Index: pkg/MESSAGE
===================================================================
RCS file: pkg/MESSAGE
diff -N pkg/MESSAGE
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ pkg/MESSAGE 23 Sep 2022 16:17:47 -0000
@@ -0,0 +1,15 @@
+The database has changed since version 0.9.7
+
+Stop the old honk process.
+honk# rcctl stop honk
+
+Backup the database.
+honk# doas -su _honk
+honk$ umask 077; cd ${LOCALSTATEDIR}/honk && honk backup `date +backup-%F`
+
+Perform the upgrade with the upgrade command.
+honk$ honk upgrade
+honk$ exit
+
+Restart.
+honk# rcctl start honk
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/www/honk/pkg/PLIST,v
retrieving revision 1.9
diff -u -p -r1.9 PLIST
--- pkg/PLIST 11 Mar 2022 20:09:55 -0000 1.9
+++ pkg/PLIST 23 Sep 2022 16:17:47 -0000
@@ -1,5 +1,5 @@
@newgroup _honk:833
-@newuser _honk:833:_honk:daemon:Honk User:${VARBASE}/honk:/sbin/nologin
+@newuser _honk:833:_honk:daemon:Honk User:${LOCALSTATEDIR}/honk:/sbin/nologin
@rcscript ${RCDIR}/honk
@bin bin/autobonker
@bin bin/gettoken
@@ -19,11 +19,11 @@
@mode 750
@owner _honk
@group _honk
-@sample ${VARBASE}/honk/
-@sample ${VARBASE}/honk/docs/
-@sample ${VARBASE}/honk/emus/
-@sample ${VARBASE}/honk/memes/
-@sample ${VARBASE}/honk/views/
+@sample ${LOCALSTATEDIR}/honk/
+@sample ${LOCALSTATEDIR}/honk/docs/
+@sample ${LOCALSTATEDIR}/honk/emus/
+@sample ${LOCALSTATEDIR}/honk/memes/
+@sample ${LOCALSTATEDIR}/honk/views/
@mode
@owner
@group
@@ -31,75 +31,79 @@ share/doc/honk/
share/doc/honk/LICENSE
share/doc/honk/README
share/doc/honk/activitypub.7.html
-@sample ${VARBASE}/honk/docs/activitypub.7.html
+@sample ${LOCALSTATEDIR}/honk/docs/activitypub.7.html
share/doc/honk/changelog.txt
share/doc/honk/hfcs.1.html
-@sample ${VARBASE}/honk/docs/hfcs.1.html
+@sample ${LOCALSTATEDIR}/honk/docs/hfcs.1.html
share/doc/honk/honk.1.html
-@sample ${VARBASE}/honk/docs/honk.1.html
+@sample ${LOCALSTATEDIR}/honk/docs/honk.1.html
share/doc/honk/honk.3.html
-@sample ${VARBASE}/honk/docs/honk.3.html
+@sample ${LOCALSTATEDIR}/honk/docs/honk.3.html
share/doc/honk/honk.5.html
-@sample ${VARBASE}/honk/docs/honk.5.html
+@sample ${LOCALSTATEDIR}/honk/docs/honk.5.html
share/doc/honk/honk.8.html
-@sample ${VARBASE}/honk/docs/honk.8.html
+@sample ${LOCALSTATEDIR}/honk/docs/honk.8.html
share/doc/honk/intro.1.html
-@sample ${VARBASE}/honk/docs/intro.1.html
+@sample ${LOCALSTATEDIR}/honk/docs/intro.1.html
share/doc/honk/mandoc.css
-@sample ${VARBASE}/honk/docs/mandoc.css
+@sample ${LOCALSTATEDIR}/honk/docs/mandoc.css
share/doc/honk/ping.txt
share/doc/honk/screenshot-afterpost.jpg
-@sample ${VARBASE}/honk/docs/screenshot-afterpost.jpg
+@sample ${LOCALSTATEDIR}/honk/docs/screenshot-afterpost.jpg
share/doc/honk/screenshot-compose.png
-@sample ${VARBASE}/honk/docs/screenshot-compose.png
+@sample ${LOCALSTATEDIR}/honk/docs/screenshot-compose.png
share/doc/honk/screenshot-honk.png
-@sample ${VARBASE}/honk/docs/screenshot-honk.png
+@sample ${LOCALSTATEDIR}/honk/docs/screenshot-honk.png
share/doc/honk/toys/
share/doc/honk/toys/README
share/doc/honk/vim.3.html
-@sample ${VARBASE}/honk/docs/vim.3.html
+@sample ${LOCALSTATEDIR}/honk/docs/vim.3.html
share/doc/pkg-readmes/${PKGSTEM}
share/examples/honk/
share/examples/honk/schema.sql
-@sample ${VARBASE}/honk/schema.sql
+@sample ${LOCALSTATEDIR}/honk/schema.sql
share/examples/honk/views/
share/examples/honk/views/about.html
-@sample ${VARBASE}/honk/views/about.html
+@sample ${LOCALSTATEDIR}/honk/views/about.html
share/examples/honk/views/account.html
-@sample ${VARBASE}/honk/views/account.html
+@sample ${LOCALSTATEDIR}/honk/views/account.html
share/examples/honk/views/chatter.html
-@sample ${VARBASE}/honk/views/chatter.html
+@sample ${LOCALSTATEDIR}/honk/views/chatter.html
share/examples/honk/views/combos.html
-@sample ${VARBASE}/honk/views/combos.html
+@sample ${LOCALSTATEDIR}/honk/views/combos.html
+share/examples/honk/views/favicon.ico
+@sample ${LOCALSTATEDIR}/honk/views/favicon.ico
share/examples/honk/views/funzone.html
-@sample ${VARBASE}/honk/views/funzone.html
+@sample ${LOCALSTATEDIR}/honk/views/funzone.html
share/examples/honk/views/header.html
-@sample ${VARBASE}/honk/views/header.html
+@sample ${LOCALSTATEDIR}/honk/views/header.html
share/examples/honk/views/hfcs.html
-@sample ${VARBASE}/honk/views/hfcs.html
+@sample ${LOCALSTATEDIR}/honk/views/hfcs.html
share/examples/honk/views/honk.html
-@sample ${VARBASE}/honk/views/honk.html
+@sample ${LOCALSTATEDIR}/honk/views/honk.html
share/examples/honk/views/honkers.html
-@sample ${VARBASE}/honk/views/honkers.html
+@sample ${LOCALSTATEDIR}/honk/views/honkers.html
share/examples/honk/views/honkform.html
-@sample ${VARBASE}/honk/views/honkform.html
+@sample ${LOCALSTATEDIR}/honk/views/honkform.html
share/examples/honk/views/honkfrags.html
-@sample ${VARBASE}/honk/views/honkfrags.html
+@sample ${LOCALSTATEDIR}/honk/views/honkfrags.html
share/examples/honk/views/honkpage.html
-@sample ${VARBASE}/honk/views/honkpage.html
+@sample ${LOCALSTATEDIR}/honk/views/honkpage.html
share/examples/honk/views/honkpage.js
-@sample ${VARBASE}/honk/views/honkpage.js
+@sample ${LOCALSTATEDIR}/honk/views/honkpage.js
+share/examples/honk/views/icon.png
+@sample ${LOCALSTATEDIR}/honk/views/icon.png
share/examples/honk/views/login.html
-@sample ${VARBASE}/honk/views/login.html
+@sample ${LOCALSTATEDIR}/honk/views/login.html
share/examples/honk/views/msg.html
-@sample ${VARBASE}/honk/views/msg.html
+@sample ${LOCALSTATEDIR}/honk/views/msg.html
share/examples/honk/views/onts.html
-@sample ${VARBASE}/honk/views/onts.html
+@sample ${LOCALSTATEDIR}/honk/views/onts.html
share/examples/honk/views/pleroma.css
-@sample ${VARBASE}/honk/views/pleroma.css
+@sample ${LOCALSTATEDIR}/honk/views/pleroma.css
share/examples/honk/views/style.css
-@sample ${VARBASE}/honk/views/style.css
+@sample ${LOCALSTATEDIR}/honk/views/style.css
share/examples/honk/views/wonk.js
-@sample ${VARBASE}/honk/views/wonk.js
+@sample ${LOCALSTATEDIR}/honk/views/wonk.js
share/examples/honk/views/xzone.html
-@sample ${VARBASE}/honk/views/xzone.html
+@sample ${LOCALSTATEDIR}/honk/views/xzone.html
Index: pkg/README
===================================================================
RCS file: /cvs/ports/www/honk/pkg/README,v
retrieving revision 1.5
diff -u -p -r1.5 README
--- pkg/README 11 Mar 2022 20:09:55 -0000 1.5
+++ pkg/README 23 Sep 2022 16:17:47 -0000
@@ -9,108 +9,53 @@ honk expects to be fronted by a TLS term
Make sure to pass the Host header for nginx(8)
proxy_set_header Host $http_host;
-Icon and favicon
-----------------
-
-honk# mkdir ${VARBASE}/www/htdocs/honk
-honk# ftp -o ${VARBASE}/www/htdocs/honk/icon.png \
- https://honk.tedunangst.com/icon.png
-honk# ftp -o ${VARBASE}/www/htdocs/honk/favicon.ico \
- https://honk.tedunangst.com/favicon.ico
-
-httpd(8)
---------
-
-# httpd.conf(5)
-server "honk.example.com" {
- listen on * port http
- location "/.well-known/acme-challenge/*" {
- root "/acme"
- request strip 2
- }
- location "/*icon.*" {
- root "/htdocs/honk"
- }
- location "*" {
- block return 302 "https://$HTTP_HOST$REQUEST_URI"
- }
-}
-
-honk# rcctl enable httpd
-honk# rcctl start httpd
-
-acme-client(1)
---------------
-
-# acme-client.conf(5)
-domain honk.example.com {
- domain key "${SYSCONFDIR}/ssl/private/honk.example.com.key"
- domain full chain certificate "${SYSCONFDIR}/ssl/honk.example.com.crt"
- sign with letsencrypt
-}
-
-honk# acme-client -v honk.example.com
-honk# ocspcheck -vNo /etc/ssl/honk.example.com.{ocsp,crt}
-
-relayd(8)
----------
-
-# relayd.conf(5)
-ext_ip="203.0.113.4"
-ext_ip2="2001:0db8::4"
-honk_port="31337"
-table <honk> { 127.0.0.1 ::1 }
-table <localhost> { 127.0.0.1 ::1 }
-
-http protocol "https" {
- match request header append "X-Forwarded-For" value "$REMOTE_ADDR"
- match request header append "X-Forwarded-By" \
- value "$SERVER_ADDR:$SERVER_PORT"
- match request header set "Connection" value "close"
-
- match request header "Host" value "honk.*" forward to <honk>
- match request path "/*icon.*" forward to <localhost>
-
- tcp { sack, backlog 128 }
- tls keypair honk.example.com
-}
-relay "https" {
- listen on $ext_ip port https tls
- protocol "https"
- forward to <localhost> port http check http "/icon.png" code 200
- forward to <honk> port $honk_port check tcp
-}
-relay "https2" {
- listen on $ext_ip2 port https tls
- protocol "https"
- forward to <localhost> port http check http "/icon.png" code 200
- forward to <honk> port $honk_port check tcp
-}
-
-honk# rcctl enable relayd
-honk# rcctl start relayd
-
-pf(4)
------
-
-# pf.conf(5)
-anchor "relayd/*"
-
-honk# pfctl -f ${SYSCONFDIR}/pf.conf
-
Setup
=====
Please see ${LOCALBASE}/share/doc/honk
+honk(8)
+-------
+
honk# doas -su _honk
-honk$ umask 077; cd ${VARBASE}/honk && honk init
+honk$ umask 077; cd ${LOCALSTATEDIR}/honk && honk init
listenaddr: localhost:31337
servername: honk.example.com
-honk$ touch ${VARBASE}/honk/savedinbox.json
+honk$ touch ${LOCALSTATEDIR}/honk/savedinbox.json
honk$ exit
honk# rcctl enable honk
honk# rcctl start honk
Honk at https://honk.example.com
+
+Customization
+=============
+
+Site CSS may be overridden by creating a views/local.css file in the
+${LOCALSTATEDIR}/honk directory. Site JS may similarly be included by creating
+views/local.js. A restart is required after changes.
+
+e.g. add this snippet to open all links in honks in new tabs.
+
+function adjusttargets() {
+ var els = document.querySelectorAll("p.content a")
+ for (var i = 0; i < els.length; i++) {
+ var e = els[i]
+ e.target = "_blank"
+ }
+}
+document.addEventListener('DOMContentLoaded', adjusttargets, false);
+
+Maintenance
+===========
+
+The cleanup [days] command exists to purge old external data, by default 30
+days. This removes unreferenced, unsaved posts and attachments. It does not
+remove any original content.
+
+honk# crontab -eu _honk
+
+# crontab(5)
+MAILTO=root
+@daily ${LOCALBASE}/bin/honk cleanup
Index: pkg/honk.rc
===================================================================
RCS file: /cvs/ports/www/honk/pkg/honk.rc,v
retrieving revision 1.8
diff -u -p -r1.8 honk.rc
--- pkg/honk.rc 11 Mar 2022 20:09:55 -0000 1.8
+++ pkg/honk.rc 23 Sep 2022 16:17:47 -0000
@@ -1,7 +1,7 @@
#!/bin/ksh
daemon="${TRUEPREFIX}/bin/honk"
-daemon_flags="-datadir ${VARBASE}/honk -viewdir ${VARBASE}/honk"
+daemon_flags="-datadir ${LOCALSTATEDIR}/honk -viewdir ${LOCALSTATEDIR}/honk"
daemon_logger="daemon.info"
daemon_user="_honk"
- Removed non-honk configuration from README
On 9/22/22, Christoph R. Winter <me@the.floof.rocks> wrote:
> I would appricate it if Honk 0.9.8 makes it in the 7.2 ports -release but I
> think it will not as it is now. As we Honked today, I try to explain how I
> would change the diff.
>
> Basically, I find it good that you care of not experienced users but this
> information is not required that the port works or is useable and it makes
> more work to have informations on various places (that means not, that you
> should remove it, I just would implement it in another way).
>
> I would write it in the following way.
>
> Honk requires relayd(8) (because it is already in the base system) as TLS
> endpoint. That means you need a SSL certificate which you can obtain using
> acme-client(1) and a server section in httpd.conf(8) (maybe including a 302
> redirect from HTTP to HTTPS).
>
> - for experienced users you have nothing more to explain and it keeps
> discussions about how to make this and that away from the mailing list. If
> someone uses software x they have to self find out how (thats why the
> information that relayd is in the base system).
>
> If you are new to running your own web services or to Honk, there is a
> detailed writeup at the maintainer blog ...
>
> - your URL, there you can explain all details (from DNS - to cron) and also
> show how to setup the dev version of Honk to help tedu test things. In your
> blog you could spread the word about the OS, Honk and the fedi.
>
> Beside of that, in the examples directory of Honk you find example
> configuration files.
>
> - just ask tedu to add your acme-client.conf, httpd.conf and relayd.conf
> file which you also could use to decument / explain things.
>
> - then you could add the 4 lines of the relayd.conf file which are related
> to Honk, the init and the upgrade section.
>
> Just a idea and just my 2 cents, the committers decide.
> BTW the diff still works as it should, I setup Honk again on a clean install
> using 7.2 GENERIC.MP#734 amd64 from monday this week.
>
> Regards,
>
>
> Christoph
>
> P. S. sorry if the format is not as it should be, I try to use Mutt.
>
>
No comments:
Post a Comment