On Fri, Apr 06, 2018 at 03:11:45AM -0500, Aaron Poffenberger wrote: > The following patch updates kcaldav to 0.1.6, making it compatible > with kcgi-0.10.2. > > In addition to make kcaldav compatible with kcgi, Krtisaps accepted > many of patches from the 0.1.4 port, and updated build to use gmake > like kcgi. > > As a result, you'll find a lot of patch files were deleted. I'd recommend > applying this patch with -E. > > --Aaron
Doesn't build for me. The kcgi package ships no shared library, but this kcaldav ports seems to be trying to link to kcgi as a shared library: cc -o kcaldav -static delete.o dynamic.o get.o kcaldav.o options.o propfind.o property.o proppatch.o put.o util.o db.o kcaldav-sql.o principal.o resource.o libkcaldav.a -lkcgi -lkcgixml -lkcgijson -lz -lexpat -lsqlite3 -lm -lpthread /usr/bin/ld: cannot find -lkcgi > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/www/kcaldav/Makefile,v > retrieving revision 1.9 > diff -u -p -u -r1.9 Makefile > --- Makefile 25 Jan 2018 14:04:18 -0000 1.9 > +++ Makefile 6 Apr 2018 05:00:14 -0000 > @@ -1,10 +1,8 @@ > # $OpenBSD: Makefile,v 1.9 2018/01/25 14:04:18 jturner Exp $ > > -BROKEN = no longer works with recent kcgi > COMMENT = a simple, safe, and minimal CalDAV server > > -DISTNAME = kcaldav-0.1.4 > -REVISION = 6 > +DISTNAME = kcaldav-0.1.6 > CATEGORIES = www > > HOMEPAGE = https://kristaps.bsd.lv/kcaldav/ > @@ -14,7 +12,7 @@ MAINTAINER = Aaron Poffenberger <akp@hy > PERMIT_PACKAGE_CDROM = Yes > > # "make port-lib-depends-check" can help > -WANTLIB += c expat m sqlite3 > +WANTLIB += c expat m sqlite3 pthread > > MASTER_SITES = https://kristaps.bsd.lv/kcaldav/snapshots/ > EXTRACT_SUFX = .tgz > @@ -22,7 +20,12 @@ EXTRACT_SUFX = .tgz > BUILD_DEPENDS = www/kcgi > LIB_DEPENDS = databases/sqlite3 > > -FAKE_FLAGS = PREFIX=${WRKINST}${TRUEPREFIX} > WWWPREFIX=${WRKINST}/${VARBASE}/www > +CONFIGURE_STYLE = simple > +USE_GMAKE = Yes > +CFLAGS += -I/usr/local/include > + > +FAKE_FLAGS = PREFIX=${WRKINST}${TRUEPREFIX} > HTDOCSPREFIX=${WRKINST}/${VARBASE}/www/htdocs/kcaldav > +FAKE_FLAGS += CGIPREFIX=${WRKINST}/${VARBASE}/www/cgi-bin > CALPREFIX=${WRKINST}/${VARBASE}/www/caldav > > # no doc on how to run tests > NO_TEST = Yes > Index: distinfo > =================================================================== > RCS file: /cvs/ports/www/kcaldav/distinfo,v > retrieving revision 1.2 > diff -u -p -u -r1.2 distinfo > --- distinfo 20 Apr 2016 15:12:18 -0000 1.2 > +++ distinfo 6 Apr 2018 02:24:53 -0000 > @@ -1,2 +1,2 @@ > -SHA256 (kcaldav-0.1.4.tgz) = wSuIlLajZD4k4in74derfsDo0wHrpUEBgOUH/IsMQ8A= > -SIZE (kcaldav-0.1.4.tgz) = 72877 > +SHA256 (kcaldav-0.1.6.tgz) = dZ6USl4bFFyBq0kP0UWm+s2+8xRzpeAbo4kXO7FB/1s= > +SIZE (kcaldav-0.1.6.tgz) = 81944 > Index: patches/patch-Makefile > =================================================================== > RCS file: /cvs/ports/www/kcaldav/patches/patch-Makefile,v > retrieving revision 1.3 > diff -u -p -u -r1.3 patch-Makefile > --- patches/patch-Makefile 24 Aug 2017 06:05:27 -0000 1.3 > +++ patches/patch-Makefile 6 Apr 2018 04:58:17 -0000 > @@ -1,65 +1,16 @@ > -$OpenBSD: patch-Makefile,v 1.3 2017/08/24 06:05:27 ajacoutot Exp $ > ---- Makefile.orig Thu Mar 3 12:22:28 2016 > -+++ Makefile Tue Sep 20 09:41:08 2016 > -@@ -4,6 +4,9 @@ > - # I have added defaults for all of the systems that I use. > - # Good luck! > +$OpenBSD$ > + > +Index: Makefile > +--- Makefile.orig > ++++ Makefile > +@@ -27,8 +27,8 @@ HTDOCS = /kcaldav > > -+# This is the file-system root for the CGI and web > -+# programs and files. > -+#WWWPREFIX = /var/www/ > - # This is the directory prepended to all calendar requests. > - # It is relative to the CGI process's file-system root. > - # It contains the database. > -@@ -34,12 +37,13 @@ > - > - # ...and this for deployment on BSD.lv, which has its static files in a > - # virtual host and runs within a chroot(2). > -+WWWPREFIX = /var/www > - CALDIR = /caldav > --CALPREFIX = /var/www/caldav > -+CALPREFIX = $(WWWPREFIX)/caldav > - 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 = $(WWWPREFIX)/htdocs/kcaldav > - CGIURI = /cgi-bin/kcaldav.cgi > --CGIPREFIX = /var/www/cgi-bin > -+CGIPREFIX = $(WWWPREFIX)/cgi-bin > - PREFIX = /usr/local > - > - # Add any special dependency directives here. > -@@ -50,20 +54,23 @@ PREFIX = /usr/local > - # The -D DEBUG=2 directive LOTS of debugging information. > - > - #### For OpenBSD: > --LIBS = -lexpat -lm -lsqlite3 > -+LIBS = -L/usr/local/lib -lexpat -lsqlite3 -lm > - STATIC = -static > --CPPFLAGS += -I/usr/local/include -DLOGTIMESTAMP=1 -DDEBUG=1 > -+STATICLIBS = -lpthread > -+CPPFLAGS += -I/usr/local/include -DLOGTIMESTAMP=1 -DDEBUG=0 > - BINLDFLAGS = -L/usr/local/lib > - > - #### For Mac OS X: > - #LIBS = -lexpat -lsqlite3 > - #STATIC = > -+#STATICLIBS = > - #CPPFLAGS += -I/usr/local/opt/sqlite/include -I/usr/local/include > - #BINLDFLAGS = -L/usr/local/opt/sqlite/lib -L/usr/local/lib > +-#HTDOCSPREFIX = /var/www/htdocs > ++#HTDOCSPREFIX = /var/www/vhosts/www.bsd.lv/htdocs/kcaldav > ++HTDOCSPREFIX = /var/www/htdocs/kcaldav > > - #### For Linux: > - #LIBS = -lexpat -lbsd -lm -lsqlite3 > - #STATIC = > -+#STATICLIBS = > - #CPPFLAGS += -I/usr/local/include > - #BINLDFLAGS = -L/usr/local/lib > - > -@@ -251,7 +258,7 @@ libkcaldav.a: $(LIBOBJS) > - $(AR) -rs $@ $(LIBOBJS) > - > - kcaldav: $(BINOBJS) $(OBJS) libkcaldav.a > -- $(CC) $(BINCFLAGS) -o $@ $(STATIC) $(BINOBJS) $(OBJS) libkcaldav.a > $(BINLDFLAGS) $(BINLIBS) > -+ $(CC) $(BINCFLAGS) -o $@ $(STATIC) $(BINOBJS) $(OBJS) libkcaldav.a > $(BINLDFLAGS) $(BINLIBS) $(STATICLIBS) > - > - kcaldav.passwd: kcaldav.passwd.o md5.o $(OBJS) libkcaldav.a > - $(CC) -o $@ kcaldav.passwd.o md5.o $(OBJS) libkcaldav.a $(LIBS) > + # This is the relative URI of the server executable. > + CGIURI = /cgi-bin/kcaldav.cgi > Index: patches/patch-delete_c > =================================================================== > RCS file: patches/patch-delete_c > diff -N patches/patch-delete_c > --- patches/patch-delete_c 20 Oct 2016 20:25:19 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,11 +0,0 @@ > -$OpenBSD: patch-delete_c,v 1.1 2016/10/20 20:25:19 jturner Exp $ > ---- delete.c.orig Thu Oct 20 16:18:40 2016 > -+++ delete.c Thu Oct 20 16:18:53 2016 > -@@ -19,6 +19,7 @@ > - #include <assert.h> > - #include <errno.h> > - #include <limits.h> > -+#include <stdarg.h> > - #include <stdio.h> > - #include <stdint.h> > - #include <stdlib.h> > Index: patches/patch-dynamic_c > =================================================================== > RCS file: patches/patch-dynamic_c > diff -N patches/patch-dynamic_c > --- patches/patch-dynamic_c 20 Oct 2016 20:25:19 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,11 +0,0 @@ > -$OpenBSD: patch-dynamic_c,v 1.1 2016/10/20 20:25:19 jturner Exp $ > ---- dynamic.c.orig Thu Oct 20 16:19:09 2016 > -+++ dynamic.c Thu Oct 20 16:19:18 2016 > -@@ -19,6 +19,7 @@ > - #include <assert.h> > - #include <inttypes.h> > - #include <limits.h> > -+#include <stdarg.h> > - #include <stdio.h> > - #include <stdint.h> > - #include <stdlib.h> > Index: patches/patch-get_c > =================================================================== > RCS file: patches/patch-get_c > diff -N patches/patch-get_c > --- patches/patch-get_c 20 Oct 2016 20:25:19 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,11 +0,0 @@ > -$OpenBSD: patch-get_c,v 1.1 2016/10/20 20:25:19 jturner Exp $ > ---- get.c.orig Thu Oct 20 16:19:41 2016 > -+++ get.c Thu Oct 20 16:19:49 2016 > -@@ -20,6 +20,7 @@ > - #include <errno.h> > - #include <inttypes.h> > - #include <limits.h> > -+#include <stdarg.h> > - #include <stdio.h> > - #include <stdint.h> > - #include <stdlib.h> > Index: patches/patch-kcaldav_passwd_in_1 > =================================================================== > RCS file: /cvs/ports/www/kcaldav/patches/patch-kcaldav_passwd_in_1,v > retrieving revision 1.1.1.1 > diff -u -p -u -r1.1.1.1 patch-kcaldav_passwd_in_1 > --- patches/patch-kcaldav_passwd_in_1 20 Apr 2016 15:06:08 -0000 1.1.1.1 > +++ patches/patch-kcaldav_passwd_in_1 6 Apr 2018 07:33:42 -0000 > @@ -1,12 +1,14 @@ > -$OpenBSD: patch-kcaldav_passwd_in_1,v 1.1.1.1 2016/04/20 15:06:08 jturner > Exp $ > ---- kcaldav.passwd.in.1.orig Thu Apr 14 22:35:31 2016 > -+++ kcaldav.passwd.in.1 Thu Apr 14 22:35:57 2016 > -@@ -125,7 +125,7 @@ binary, you might use a dummy > - user owning the file. > +$OpenBSD$ > + > +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 > -+# chmod u+s @PREFIX@/bin/kcaldav.passwd > - # sudo -u kcaldav kcaldav.passwd -C -u <user> > + # 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 > Index: patches/patch-kcaldav_sql > =================================================================== > RCS file: /cvs/ports/www/kcaldav/patches/patch-kcaldav_sql,v > retrieving revision 1.1.1.1 > diff -u -p -u -r1.1.1.1 patch-kcaldav_sql > --- patches/patch-kcaldav_sql 20 Apr 2016 15:06:08 -0000 1.1.1.1 > +++ patches/patch-kcaldav_sql 6 Apr 2018 07:31:44 -0000 > @@ -1,8 +1,10 @@ > -$OpenBSD: patch-kcaldav_sql,v 1.1.1.1 2016/04/20 15:06:08 jturner Exp $ > ---- kcaldav.sql.orig Thu Mar 3 13:22:28 2016 > -+++ kcaldav.sql Wed Apr 20 08:04:55 2016 > +$OpenBSD$ > + > +Index: kcaldav.sql > +--- kcaldav.sql.orig > ++++ kcaldav.sql > @@ -1,4 +1,3 @@ > -PRAGMA journal_mode = WAL; > - CREATE TABLE resource ( > - collection INTEGER NOT NULL, > - url TEXT NOT NULL, > + PRAGMA foreign_keys=ON; > + > + -- A resource is a ``file'' managed by the CalDAV server. > Index: patches/patch-options_c > =================================================================== > RCS file: patches/patch-options_c > diff -N patches/patch-options_c > --- patches/patch-options_c 20 Oct 2016 20:25:19 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,11 +0,0 @@ > -$OpenBSD: patch-options_c,v 1.1 2016/10/20 20:25:19 jturner Exp $ > ---- options.c.orig Thu Oct 20 16:20:06 2016 > -+++ options.c Thu Oct 20 16:20:17 2016 > -@@ -20,6 +20,7 @@ > - #include <errno.h> > - #include <fcntl.h> > - #include <limits.h> > -+#include <stdarg.h> > - #include <stdio.h> > - #include <stdint.h> > - #include <stdlib.h> > Index: patches/patch-principal_c > =================================================================== > RCS file: patches/patch-principal_c > diff -N patches/patch-principal_c > --- patches/patch-principal_c 20 Oct 2016 20:25:19 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,11 +0,0 @@ > -$OpenBSD: patch-principal_c,v 1.1 2016/10/20 20:25:19 jturner Exp $ > ---- principal.c.orig Thu Oct 20 16:22:37 2016 > -+++ principal.c Thu Oct 20 16:22:45 2016 > -@@ -17,6 +17,7 @@ > - #include "config.h" > - > - #include <assert.h> > -+#include <stdarg.h> > - #include <stdint.h> > - #include <stdlib.h> > - > Index: patches/patch-property_c > =================================================================== > RCS file: patches/patch-property_c > diff -N patches/patch-property_c > --- patches/patch-property_c 20 Oct 2016 20:25:19 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,11 +0,0 @@ > -$OpenBSD: patch-property_c,v 1.1 2016/10/20 20:25:19 jturner Exp $ > ---- property.c.orig Thu Oct 20 16:21:00 2016 > -+++ property.c Thu Oct 20 16:21:10 2016 > -@@ -21,6 +21,7 @@ > - #include <assert.h> > - #include <inttypes.h> > - #include <limits.h> > -+#include <stdarg.h> > - #include <stdio.h> > - #include <stdint.h> > - #include <stdlib.h> > Index: patches/patch-propfind_c > =================================================================== > RCS file: patches/patch-propfind_c > diff -N patches/patch-propfind_c > --- patches/patch-propfind_c 20 Oct 2016 20:25:19 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,11 +0,0 @@ > -$OpenBSD: patch-propfind_c,v 1.1 2016/10/20 20:25:19 jturner Exp $ > ---- propfind.c.orig Thu Oct 20 16:20:33 2016 > -+++ propfind.c Thu Oct 20 16:20:44 2016 > -@@ -21,6 +21,7 @@ > - #include <fcntl.h> > - #include <inttypes.h> > - #include <limits.h> > -+#include <stdarg.h> > - #include <stdio.h> > - #include <stdint.h> > - #include <stdlib.h> > Index: patches/patch-proppatch_c > =================================================================== > RCS file: patches/patch-proppatch_c > diff -N patches/patch-proppatch_c > --- patches/patch-proppatch_c 20 Oct 2016 20:25:19 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,11 +0,0 @@ > -$OpenBSD: patch-proppatch_c,v 1.1 2016/10/20 20:25:19 jturner Exp $ > ---- proppatch.c.orig Thu Oct 20 16:21:29 2016 > -+++ proppatch.c Thu Oct 20 16:21:40 2016 > -@@ -20,6 +20,7 @@ > - #include <errno.h> > - #include <fcntl.h> > - #include <limits.h> > -+#include <stdarg.h> > - #include <stdio.h> > - #include <stdint.h> > - #include <stdlib.h> > Index: patches/patch-put_c > =================================================================== > RCS file: patches/patch-put_c > diff -N patches/patch-put_c > --- patches/patch-put_c 20 Oct 2016 20:25:19 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,11 +0,0 @@ > -$OpenBSD: patch-put_c,v 1.1 2016/10/20 20:25:19 jturner Exp $ > ---- put.c.orig Thu Oct 20 16:21:50 2016 > -+++ put.c Thu Oct 20 16:22:02 2016 > -@@ -20,6 +20,7 @@ > - #include <errno.h> > - #include <fcntl.h> > - #include <limits.h> > -+#include <stdarg.h> > - #include <stdio.h> > - #include <stdint.h> > - #include <stdlib.h> > Index: patches/patch-resource_c > =================================================================== > RCS file: patches/patch-resource_c > diff -N patches/patch-resource_c > --- patches/patch-resource_c 20 Oct 2016 20:25:19 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,11 +0,0 @@ > -$OpenBSD: patch-resource_c,v 1.1 2016/10/20 20:25:19 jturner Exp $ > ---- resource.c.orig Thu Oct 20 16:22:57 2016 > -+++ resource.c Thu Oct 20 16:23:06 2016 > -@@ -18,6 +18,7 @@ > - > - #include <assert.h> > - #include <limits.h> > -+#include <stdarg.h> > - #include <stdio.h> > - #include <stdint.h> > - #include <stdlib.h> > Index: patches/patch-util_c > =================================================================== > RCS file: patches/patch-util_c > diff -N patches/patch-util_c > --- patches/patch-util_c 20 Oct 2016 20:25:19 -0000 1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,11 +0,0 @@ > -$OpenBSD: patch-util_c,v 1.1 2016/10/20 20:25:19 jturner Exp $ > ---- util.c.orig Thu Oct 20 16:22:14 2016 > -+++ util.c Thu Oct 20 16:22:22 2016 > -@@ -19,6 +19,7 @@ > - #include <assert.h> > - #include <ctype.h> > - #include <limits.h> > -+#include <stdarg.h> > - #include <stdio.h> > - #include <stdint.h> > - #include <stdlib.h> > Index: pkg/PLIST > =================================================================== > RCS file: /cvs/ports/www/kcaldav/pkg/PLIST,v > retrieving revision 1.1.1.1 > diff -u -p -u -r1.1.1.1 PLIST > --- pkg/PLIST 20 Apr 2016 15:06:08 -0000 1.1.1.1 > +++ pkg/PLIST 6 Apr 2018 07:01:08 -0000 > @@ -7,7 +7,13 @@ lib/libkcaldav.a > @man man/man8/kcaldav.8 > share/doc/pkg-readmes/${FULLPKGNAME} > @cwd /var/www > -caldav/ > +@owner www > +@group www > +@mode 775 > +@dir caldav/ > +@owner > +@group > +@mode > @bin cgi-bin/kcaldav > @bin cgi-bin/kcaldav.cgi > htdocs/kcaldav/ > Index: pkg/README > =================================================================== > RCS file: /cvs/ports/www/kcaldav/pkg/README,v > retrieving revision 1.3 > diff -u -p -u -r1.3 README > --- pkg/README 6 May 2017 19:08:52 -0000 1.3 > +++ pkg/README 6 Apr 2018 07:02:51 -0000 > @@ -6,7 +6,12 @@ $OpenBSD: README,v 1.3 2017/05/06 19:08: > > Administrator Quick Start > ========================= > - Create users by running "kcaldav.passwd -C -u <user>". > + 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 > + > Read kcaldav.passwd(1) for more details about creating > new calenders for users, changing email address and other > options. > @@ -34,7 +39,7 @@ User Quick Start > ================ > Users can manage their account settings, create calendars > and find the URL for use with their calendar application > - by browsing to: http://localhost/kcaldav/home.html > + by browsing to: https://localhost/kcaldav/home.html > > Porting Notes: Write Ahead Logging > ================================== > >