This updates kcaldav to 0.1.15. I also updated the README with additional details about calendar URLs, and notes about building logging versions.
--Aaron Index: Makefile =================================================================== RCS file: /cvs/ports/www/kcaldav/Makefile,v retrieving revision 1.17 diff -u -p -r1.17 Makefile --- Makefile 1 Feb 2020 20:44:16 -0000 1.17 +++ Makefile 6 Oct 2020 22:03:04 -0000 @@ -2,8 +2,7 @@ COMMENT = a simple, safe, and minimal CalDAV server -DISTNAME = kcaldav-0.1.11 -REVISION = 0 +DISTNAME = kcaldav-0.1.15 CATEGORIES = www HOMEPAGE = https://kristaps.bsd.lv/kcaldav/ @@ -13,7 +12,7 @@ MAINTAINER = Aaron Poffenberger <akp@hy PERMIT_PACKAGE = Yes # "make port-lib-depends-check" can help -WANTLIB += c expat m sqlite3 pthread +WANTLIB += c expat m sqlite3 MASTER_SITES = https://kristaps.bsd.lv/kcaldav/snapshots/ EXTRACT_SUFX = .tgz @@ -31,11 +30,9 @@ FAKE_FLAGS = PREFIX=${WRKINST}${TRUEPRE CGIPREFIX=${VARBASE}/www/cgi-bin \ CALPREFIX=${VARBASE}/www/caldav -# no doc on how to run tests -NO_TEST = Yes - ALL_TARGET = all libkcaldav.a INSTALL_TARGET = install installcgi +TEST_TARGET = regress post-install: ln -s kcaldav ${WRKINST}${VARBASE}/www/cgi-bin/kcaldav.cgi Index: distinfo =================================================================== RCS file: /cvs/ports/www/kcaldav/distinfo,v retrieving revision 1.6 diff -u -p -r1.6 distinfo --- distinfo 17 Nov 2019 09:28:23 -0000 1.6 +++ distinfo 6 Oct 2020 22:39:25 -0000 @@ -1,2 +1,2 @@ -SHA256 (kcaldav-0.1.11.tgz) = kdhMkW/oZWZemKDP+eSmDzqYB5nH9Pj2Rj2bhLeVerk= -SIZE (kcaldav-0.1.11.tgz) = 91960 +SHA256 (kcaldav-0.1.15.tgz) = BbUH9jw7MyY4UI8KjWq/pYiDYJIZXT+t/sbNdcrd0io= +SIZE (kcaldav-0.1.15.tgz) = 287253 Index: patches/patch-Makefile =================================================================== RCS file: /cvs/ports/www/kcaldav/patches/patch-Makefile,v retrieving revision 1.6 diff -u -p -r1.6 patch-Makefile --- patches/patch-Makefile 1 Feb 2020 20:44:16 -0000 1.6 +++ patches/patch-Makefile 6 Oct 2020 22:00:54 -0000 @@ -3,7 +3,7 @@ $OpenBSD: patch-Makefile,v 1.6 2020/02/0 Index: Makefile --- Makefile.orig +++ Makefile -@@ -27,8 +27,8 @@ HTDOCS = /kcaldav +@@ -28,8 +28,8 @@ HTDOCS = /kcaldav # This is the file-system directory of HTDOCS. # I'm pretty sure you want to override this... @@ -14,12 +14,12 @@ Index: Makefile # File-system directory where "installwww" installs. # You probably aren't going to use that! -@@ -150,7 +150,7 @@ VERSION = 0.1.11 +@@ -162,7 +162,7 @@ VERSION = 0.1.15 CFLAGS += -DCALDIR=\"$(CALDIR)\" - CFLAGS += -DHTDOCS=\"$(HTDOCS)\" + CFLAGS += -DCALPREFIX=\"$(CALPREFIX)\" CFLAGS += -DVERSION=\"$(VERSION)\" -CFLAGS += -DLOGFILE=\"$(LOGFILE)\" +#CFLAGS += -DLOGFILE=\"$(LOGFILE)\" BHTMLS = collection.html \ home.html - DOTFLAGS = -h "BGCOLOR=\"red\"" \ + Index: pkg/PLIST =================================================================== RCS file: /cvs/ports/www/kcaldav/pkg/PLIST,v retrieving revision 1.5 diff -u -p -r1.5 PLIST --- pkg/PLIST 1 Feb 2020 20:44:16 -0000 1.5 +++ pkg/PLIST 4 Oct 2020 02:27:21 -0000 @@ -21,6 +21,4 @@ htdocs/kcaldav/collection.html htdocs/kcaldav/collection.min.js htdocs/kcaldav/home.html htdocs/kcaldav/home.min.js -htdocs/kcaldav/md5.min.js -htdocs/kcaldav/script.min.js htdocs/kcaldav/style.css Index: pkg/README =================================================================== RCS file: /cvs/ports/www/kcaldav/pkg/README,v retrieving revision 1.5 diff -u -p -r1.5 README --- pkg/README 4 Sep 2018 12:46:24 -0000 1.5 +++ pkg/README 7 Oct 2020 01:44:39 -0000 @@ -8,9 +8,9 @@ Administrator Quick Start ========================= Create users by running: - doas kcaldav.passwd -C -u <user> -e email -f /var/www/caldav - doas chown www:www /var/www/caldav/kcaldav.db - doas chmod 640 /var/www/caldav/kcaldav.db + $ doas kcaldav.passwd -C -u <user> -e email -f /var/www/caldav + $ doas chown www:www /var/www/caldav/kcaldav.db + $ doas chmod 640 /var/www/caldav/kcaldav.db Read kcaldav.passwd(1) for more details about creating new calenders for users, changing email address and other @@ -32,14 +32,25 @@ Administrator Quick Start } } + Remember to enable and start slowcgi(8). See rcctl(8). + kcaldav.cgi uses http authentication for user security. Install a tls certificate to ensure privacy of connection. + See ssl(8) for details. + User Quick Start ================ - Users can manage their account settings, create calendars + Users can manage their account settings, create calendars, and find the URL for use with their calendar application - by browsing to: https://localhost/kcaldav/home.html + by browsing to: + + https://example.org/kcaldav/home.html + + On MacOS and iPhone add the user's name to the calendar address: + + https://example.org/cgi-bin/kcaldav/username + Porting Notes: Write Ahead Logging ================================== @@ -53,26 +64,37 @@ Porting Notes: Write Ahead Logging Open the kcaldav.db: - % doas sqlite3 caldav/kcaldav.db + $ doas sqlite3 caldav/kcaldav.db Type: - sqlite> PRAGMA journal_mode=WAL; + sqlite> PRAGMA journal_mode=WAL; To disable WAL later open the kcaldav db and type: - sqlite> PRAGMA journal_mode=DELETE; + sqlite> PRAGMA journal_mode=DELETE; If you plan to run kcaldav in a chroot environment you must create a /tmp directory in the chroot and it must be writable by the httpd daemon account: - % doas mkdir /var/www/tmp - % doas chown www:daemon /var/www/tmp - % doas chmod 755 /var/www/tmp + $ doas mkdir /var/www/tmp + $ doas chown www:daemon /var/www/tmp + $ doas chmod 755 /var/www/tmp For more details about WAL and temp directory requirements see: https://www.sqlite.org/wal.html https://www.sqlite.org/c3ref/temp_directory.html + + +Porting Notes: LOGFILE +===================== + The default build from upstream includes logging at DEBUG=1. This port + disables logging. To build a logging version, the Makefile patches should + be updated, and then the logfile in the chroot environment created and + the chroot user (www) given access: + + $ doas touch /var/www/logs/kcaldav-system.log + $ doas chown www /var/www/logs/kcaldav-system.log