update to kcaldav-0.2.0, from maintainer Aaron Poffenberger, a couple

of typo fixes from me
This commit is contained in:
sthen 2020-11-12 17:21:35 +00:00
parent f0bc6feb66
commit 20489de8fe
7 changed files with 77 additions and 65 deletions

View File

@ -1,9 +1,8 @@
# $OpenBSD: Makefile,v 1.17 2020/02/01 20:44:16 jung Exp $
# $OpenBSD: Makefile,v 1.18 2020/11/12 17:21:35 sthen Exp $
COMMENT = a simple, safe, and minimal CalDAV server
DISTNAME = kcaldav-0.1.11
REVISION = 0
DISTNAME = kcaldav-0.2.0
CATEGORIES = www
HOMEPAGE = https://kristaps.bsd.lv/kcaldav/
@ -13,7 +12,7 @@ MAINTAINER = Aaron Poffenberger <akp@hypernote.com>
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
@ -21,21 +20,18 @@ EXTRACT_SUFX = .tgz
BUILD_DEPENDS = www/kcgi
LIB_DEPENDS = databases/sqlite3
CONFIGURE_STYLE = simple
USE_GMAKE = Yes
CONFIGURE_ARGS = CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
FAKE_FLAGS = PREFIX=${WRKINST}${TRUEPREFIX} \
HTDOCSPREFIX=${VARBASE}/www/htdocs/kcaldav \
CGIPREFIX=${VARBASE}/www/cgi-bin \
CALPREFIX=${VARBASE}/www/caldav
# no doc on how to run tests
NO_TEST = Yes
CONFIGURE_STYLE = simple
CONFIGURE_ARGS = CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
ALL_TARGET = all libkcaldav.a
INSTALL_TARGET = install installcgi
TEST_TARGET = regress
post-install:
ln -s kcaldav ${WRKINST}${VARBASE}/www/cgi-bin/kcaldav.cgi

View File

@ -1,2 +1,2 @@
SHA256 (kcaldav-0.1.11.tgz) = kdhMkW/oZWZemKDP+eSmDzqYB5nH9Pj2Rj2bhLeVerk=
SIZE (kcaldav-0.1.11.tgz) = 91960
SHA256 (kcaldav-0.2.0.tgz) = ajCsg1iuhu33r7YG1dXXKFzVsQYxTbtz8zqLmChTyvQ=
SIZE (kcaldav-0.2.0.tgz) = 291932

View File

@ -1,25 +1,14 @@
$OpenBSD: patch-Makefile,v 1.6 2020/02/01 20:44:16 jung Exp $
$OpenBSD: patch-Makefile,v 1.7 2020/11/12 17:21:35 sthen Exp $
Index: Makefile
--- Makefile.orig
+++ Makefile
@@ -27,8 +27,8 @@ HTDOCS = /kcaldav
# This is the file-system directory of HTDOCS.
# I'm pretty sure you want to override this...
-HTDOCSPREFIX = /var/www/vhosts/www.bsd.lv/htdocs/kcaldav
-#HTDOCSPREFIX = /var/www/htdocs
+#HTDOCSPREFIX = /var/www/vhosts/www.bsd.lv/htdocs/kcaldav
+HTDOCSPREFIX = /var/www/htdocs/kcaldav
# File-system directory where "installwww" installs.
# You probably aren't going to use that!
@@ -150,7 +150,7 @@ VERSION = 0.1.11
@@ -144,7 +144,7 @@ VERSION = 0.2.0
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\"" \

View File

@ -1,14 +0,0 @@
$OpenBSD: patch-kcaldav_passwd_in_1,v 1.2 2018/04/08 08:29:22 stsp Exp $
Index: kcaldav.passwd.in.1
--- kcaldav.passwd.in.1.orig
+++ kcaldav.passwd.in.1
@@ -126,7 +126,7 @@ user owning the file.
.Bd -literal -offset indent
# chown kcaldav @PREFIX@/bin/kcaldav.passwd
# chmod u+s @PREFIX@/bin/kcaldav.passwd
-# sudo -u kcaldav kcaldav.passwd -C -u <user>
+# doas -u kcaldav kcaldav.passwd -C -u <user>
.Ed
.Pp
System users may then run

View File

@ -1,10 +1,10 @@
$OpenBSD: patch-kcaldav_sql,v 1.2 2018/04/08 08:29:22 stsp Exp $
$OpenBSD: patch-kcaldav_sql,v 1.3 2020/11/12 17:21:35 sthen Exp $
Index: kcaldav.sql
--- kcaldav.sql.orig
+++ kcaldav.sql
@@ -1,4 +1,3 @@
-PRAGMA journal_mode = WAL;
-PRAGMA journal_mode=WAL;
PRAGMA foreign_keys=ON;
-- A resource is a ``file'' managed by the CalDAV server.

View File

@ -1,9 +1,13 @@
@comment $OpenBSD: PLIST,v 1.5 2020/02/01 20:44:16 jung Exp $
@comment $OpenBSD: PLIST,v 1.6 2020/11/12 17:21:35 sthen Exp $
@bin bin/kcaldav.passwd
include/libkcaldav.h
@static-lib lib/libkcaldav.a
@man man/man1/kcaldav.passwd.1
@man man/man3/libkcaldav.3
@man man/man3/caldav_free.3
@man man/man3/caldav_parse.3
@man man/man3/ical_free.3
@man man/man3/ical_parse.3
@man man/man3/ical_print.3
@man man/man8/kcaldav.8
share/doc/pkg-readmes/${PKGSTEM}
@cwd /var/www
@ -21,6 +25,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

View File

@ -1,4 +1,5 @@
$OpenBSD: README,v 1.5 2018/09/04 12:46:24 espie Exp $
$OpenBSD: README,v 1.6 2020/11/12 17:21:35 sthen Exp $
+-----------------------------------------------------------------------
| Running ${PKGSTEM} on OpenBSD
@ -12,9 +13,8 @@ Administrator Quick Start
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
options.
Read kcaldav.passwd(1) for more details about creating new
calenders for users, changing email address and other options.
With httpd(8) the kcaldav CGI can be run through slowcgi(8)
using a configuration snippet like the following:
@ -32,14 +32,28 @@ Administrator Quick Start
}
}
kcaldav.cgi uses http authentication for user security.
Install a tls certificate to ensure privacy of connection.
Remember to enable and start slowcgi(8):
rcctl enable slowcgi
rcttl start slowcgi
Also, kcaldav.cgi uses http authentication for user security.
Make sure your web server is configured to use https to ensure
privacy of connection.
User Quick Start
================
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
Users can manage their account settings, create calendars,
and find the URL for use with their calendar application by
browsing to:
https://example.org/kcaldav/home.html
The URL will look like:
https://example.org/cgi-bin/kcaldav/<username>/
Porting Notes: Write Ahead Logging
==================================
@ -53,26 +67,51 @@ 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:
To disable WAL, 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
create a /tmp directory in the chroot dir and make it 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: Debug and Logging
================================
Logging in kcaldav is controlled by the LOGFILE and DEBUG
variables in the Makefile. LOGFILE sets the name and location
of the file to write to, DEBUG controls the amount of logging.
The DEBUG level can only be set at build time. There are four
DEBUG levels in ascending order of verbosity: 0 - 3, where 0
disables all debugging. This port disables logging by commenting
out the Makefile line:
CFLAGS += -DLOGFILE=\"$(LOGFILE)\".
When sending error reports upstream, re-enable the line above,
set DEBUG=3, and rebuild.
LOGFILE defaults to /var/www/logs/kcaldav-system.log. This file
must be created by the user and permissions set:
touch /var/www/logs/kcaldav-system.log
chown www:www /var/www/logs/kcaldav-system.log
chmod 644 /var/www/logs/kcaldav-system.log