Sandboxing Haskell Port Builds: ghc.port.mk diff + example converters/pandoc

2016-06-14 Thread Aaron Poffenberger
Hello ports@,
Below is a patch to add cabal-sandbox support to ghc.port.mk, to build
Haskell package-dependencies in a sandbox.

The patch adds two new variables, a MODGHC_BUILD option "sandbox" and
modifies MODCABAL_configure and MODGHC_BUILD_TARGET.

Most of the diff should be obvious. I had to add MODGHC_SETUP_PROG and
update MODGHC_BUILD_TARGET to use it when registering and unregistering
because cabal doesn't have the unregister command.

The motivation is to make porting packages with large, unmet
dependency-lists easier. converters/pandoc is an example of such a
package. I've included the port as an example of building a port using
dependencies from ports where available and sandboxing for the rest.

Sandboxing dependency builds is also helpful in cases of version conflicts.

If there's no interest or significant concerns with sandboxing, I'll
work on a regular port of pandoc by first porting it's dependencies.

--Aaron

Index: ghc.port.mk
===
RCS file: /home/cvs/ports/lang/ghc/ghc.port.mk,v
retrieving revision 1.38
diff -u -p -u -r1.38 ghc.port.mk
--- ghc.port.mk 20 Jan 2016 16:08:29 -  1.38
+++ ghc.port.mk 15 Jun 2016 01:36:51 -
@@ -1,3 +1,4 @@
+#-*- mode: Makefile; tab-width: 4; -*-
 # $OpenBSD: ghc.port.mk,v 1.38 2016/01/20 16:08:29 kili Exp $
 # Module for Glasgow Haskell Compiler

@@ -55,7 +56,19 @@ DIST_SUBDIR ?=   ghc

 . if ${MODGHC_BUILD:L:Mcabal}
 MODGHC_SETUP_SCRIPT ?= Setup.lhs Setup.hs
+.  if ${MODGHC_BUILD:L:Msandbox}
+BUILD_DEPENDS +=   devel/cabal-install
+# Set MODGHC_SANDBOX to system-wide value to reuse packages
+# across builds. Be sure to initialize it first.
+# mkdir -p ${MODGHC_SANDBOX}
+# cd ${MODGHC_SANDBOX} && cabal sandbox init --sandbox .
+MODGHC_SANDBOX ?=  ${WRKSRC}/.cabal-sandbox
+MODGHC_SETUP_PROG ?=   ${LOCALBASE}/bin/cabal
+MODGHC_REGISTER_PROG ?=${WRKSRC}/Setup
+.  else
 MODGHC_SETUP_PROG ?=   ${WRKSRC}/Setup
+MODGHC_REGISTER_PROG ?=${MODGHC_SETUP_PROG}
+.  endif
 MODGHC_SETUP_CONF_ARGS ?=
 MODGHC_SETUP_CONF_ENV ?=

@@ -76,6 +89,23 @@ MODGHC_SETUP_CONF_ARGS +=--docdir=\$$da
 # Little hack to let ports still add CONFIGURE_STYLE = autoconf and go
 # without a do-configure: target (some Haskell ports are built with
 # Cabal but use autohell for the documentation):
+.  if ${MODGHC_BUILD:L:Msandbox}
+MODCABAL_configure = \
+   cd ${WRKSRC} && \
+   ${MODGHC_SETUP_PROG} sandbox init --sandbox=${MODGHC_SANDBOX} && \
+   ${MODGHC_SETUP_PROG} update && \
+   ${MODGHC_SETUP_PROG} install --only-dependencies
${MODGHC_SETUP_CONF_ARGS} && \
+   for s in ${MODGHC_SETUP_SCRIPT}; do \
+   test -f "$$s" && \
+   ${MODGHC_BIN} --make \
+   -o ${MODGHC_REGISTER_PROG} "$$s" && \
+   break; \
+   done && \
+   cd ${WRKBUILD} && exec ${SETENV} ${MAKE_ENV} ${MODGHC_SETUP_CONF_ENV} \
+   ${MODGHC_SETUP_PROG} \
+   configure -v -g -O --prefix=${PREFIX} \
+   ${MODGHC_SETUP_CONF_ARGS}
+.  else
 MODCABAL_configure = \
cd ${WRKSRC} && \
for s in ${MODGHC_SETUP_SCRIPT}; do \
@@ -88,6 +118,7 @@ MODCABAL_configure = \
${MODGHC_SETUP_PROG} \
configure -v -g -O --prefix=${PREFIX} \
${MODGHC_SETUP_CONF_ARGS}
+.  endif

 CONFIGURE_STYLE += CABAL

@@ -102,9 +133,9 @@ MODGHC_BUILD_TARGET += \
 .  if ${MODGHC_BUILD:L:Mregister}
 MODGHC_BUILD_TARGET += \
;cd ${WRKBUILD} && ${SETENV} ${MAKE_ENV} \
-   ${MODGHC_SETUP_PROG} register --gen-script; \
+   ${MODGHC_REGISTER_PROG} register --gen-script; \
cd ${WRKBUILD} && ${SETENV} ${MAKE_ENV} \
-   ${MODGHC_SETUP_PROG} unregister --gen-script
+   ${MODGHC_REGISTER_PROG} unregister --gen-script
 .  endif

 MODGHC_INSTALL_TARGET = \


pandoc-1.17.1.tgz
Description: Binary data


Re: Sandboxing Haskell Port Builds: ghc.port.mk diff + example converters/pandoc

2016-06-15 Thread Aaron Poffenberger
Hi Stuart,

On 06/15/16 06:56, Stuart Henderson wrote:
> Hi Aaron,
> 
> On 2016/06/14 21:08, Aaron Poffenberger wrote:
>> Below is a patch to add cabal-sandbox support to ghc.port.mk, to build
>> Haskell package-dependencies in a sandbox.
> 
> The patch got word-wrapped (you can send attachments to ports@
> if that's easiest).

Attached.

> 
>> The motivation is to make porting packages with large, unmet
>> dependency-lists easier.
> 
> This suggests that it's downloading during build. If I'm right then
> sorry for the bad news but unfortunately it won't work out that way,
> the only network access we permit during bulk builds is controlled
> by DPB during the fetch stage so it must be done as standard distfiles
> fetched by http/ftp and with checksums in the distinfo file. 
> 
>> If there's no interest or significant concerns with sandboxing, I'll
>> work on a regular port of pandoc by first porting it's dependencies.
> 
> I wonder if this might be something that would be reasonable to
> handle via portgen..
> 

You are right. cabal can install from a local path. Is it possible to
feed a bunch of files into the process by adding them to distinfo?

Alternatively, I had been thinking to make a portgen for Haskell. I'll
look at the code to see what's required.


Index: ghc.port.mk
===
RCS file: /home/cvs/ports/lang/ghc/ghc.port.mk,v
retrieving revision 1.38
diff -u -p -u -r1.38 ghc.port.mk
--- ghc.port.mk	20 Jan 2016 16:08:29 -	1.38
+++ ghc.port.mk	15 Jun 2016 01:36:51 -
@@ -1,3 +1,4 @@
+#-*- mode: Makefile; tab-width: 4; -*-
 # $OpenBSD: ghc.port.mk,v 1.38 2016/01/20 16:08:29 kili Exp $
 # Module for Glasgow Haskell Compiler
 
@@ -55,7 +56,19 @@ DIST_SUBDIR ?=			ghc
 
 . if ${MODGHC_BUILD:L:Mcabal}
 MODGHC_SETUP_SCRIPT ?=		Setup.lhs Setup.hs
+.  if ${MODGHC_BUILD:L:Msandbox}
+BUILD_DEPENDS +=			devel/cabal-install
+# Set MODGHC_SANDBOX to system-wide value to reuse packages
+# across builds. Be sure to initialize it first.
+# mkdir -p ${MODGHC_SANDBOX}
+# cd ${MODGHC_SANDBOX} && cabal sandbox init --sandbox .
+MODGHC_SANDBOX ?=			${WRKSRC}/.cabal-sandbox
+MODGHC_SETUP_PROG ?=		${LOCALBASE}/bin/cabal
+MODGHC_REGISTER_PROG ?=		${WRKSRC}/Setup
+.  else
 MODGHC_SETUP_PROG ?=		${WRKSRC}/Setup
+MODGHC_REGISTER_PROG ?=		${MODGHC_SETUP_PROG}
+.  endif
 MODGHC_SETUP_CONF_ARGS ?=
 MODGHC_SETUP_CONF_ENV ?=
 
@@ -76,6 +89,23 @@ MODGHC_SETUP_CONF_ARGS +=	--docdir=\$$da
 # Little hack to let ports still add CONFIGURE_STYLE = autoconf and go
 # without a do-configure: target (some Haskell ports are built with
 # Cabal but use autohell for the documentation):
+.  if ${MODGHC_BUILD:L:Msandbox}
+MODCABAL_configure = \
+	cd ${WRKSRC} && \
+	${MODGHC_SETUP_PROG} sandbox init --sandbox=${MODGHC_SANDBOX} && \
+	${MODGHC_SETUP_PROG} update && \
+	${MODGHC_SETUP_PROG} install --only-dependencies ${MODGHC_SETUP_CONF_ARGS} && \
+	for s in ${MODGHC_SETUP_SCRIPT}; do \
+		test -f "$$s" && \
+		${MODGHC_BIN} --make \
+			-o ${MODGHC_REGISTER_PROG} "$$s" && \
+		break; \
+	done && \
+	cd ${WRKBUILD} && exec ${SETENV} ${MAKE_ENV} ${MODGHC_SETUP_CONF_ENV} \
+		${MODGHC_SETUP_PROG} \
+			configure -v -g -O --prefix=${PREFIX} \
+			${MODGHC_SETUP_CONF_ARGS}
+.  else
 MODCABAL_configure = \
 	cd ${WRKSRC} && \
 	for s in ${MODGHC_SETUP_SCRIPT}; do \
@@ -88,6 +118,7 @@ MODCABAL_configure = \
 		${MODGHC_SETUP_PROG} \
 			configure -v -g -O --prefix=${PREFIX} \
 			${MODGHC_SETUP_CONF_ARGS}
+.  endif
 
 CONFIGURE_STYLE +=		CABAL
 
@@ -102,9 +133,9 @@ MODGHC_BUILD_TARGET += \
 .  if ${MODGHC_BUILD:L:Mregister}
 MODGHC_BUILD_TARGET += \
 	;cd ${WRKBUILD} && ${SETENV} ${MAKE_ENV} \
-		${MODGHC_SETUP_PROG} register --gen-script; \
+		${MODGHC_REGISTER_PROG} register --gen-script; \
 	cd ${WRKBUILD} && ${SETENV} ${MAKE_ENV} \
-		${MODGHC_SETUP_PROG} unregister --gen-script
+		${MODGHC_REGISTER_PROG} unregister --gen-script
 .  endif
 
 MODGHC_INSTALL_TARGET = \


Re: Sandboxing Haskell Port Builds: ghc.port.mk diff + example converters/pandoc

2016-06-16 Thread Aaron Poffenberger
On 06/15/16 07:46, Stuart Henderson wrote:
> On 2016/06/15 07:12, Aaron Poffenberger wrote:
>> You are right. cabal can install from a local path. Is it possible to
>> feed a bunch of files into the process by adding them to distinfo?
> 
> Aha: if you can list the distfiles in DISTFILES and point cabal at them
> locally that should work.
> 
> Fetching will be a little messy if the files are in separate subdirs
> as I think they are on hackage, but it can be handled by using the
> filename{url}sufx syntax in DISTFILES for them, e.g.
> {path/to/}filename-$V.tar.gz which would be somewhat similar to what
> devel/cargo is doing (peril-sensitive glasses advised before looking
> at the regexp there ;)
> 
> You can use EXTRACT_ONLY to stop ports infra from trying to unpack
> them itself, and ${FULLDISTDIR} to get the path.
> 
Hi Stuart,
Thanks to your suggestion and a pointer to the Java "maven" thread by
Ian Darwin, I've updated the patches to ghc.port.mk to include fetching
the cabal dependencies using DISTFILES.

I tested building pandoc with networking disabled. It works.

I forgot that cabal expects package repos to have a specific structure
and manifest describing the repo. I've implemented the necessary code to
build it. Any comments on improving that section would be welcome.

I'm using symlinks between the tarballs in ${FULLDISTDIR} and the local
cabal repo (MODGHC_CABAL_REPO).

The cabal sandbox is also a local directory (MODGHC_CABAL_SANDBOX) by
default.

Of the two, MODGHC_CABAL_SANDBOX is a good candidate for sharing between
sandboxed builds. You could create a shared repo (MODGHC_CABAL_REPO) but
since it's just symlinks and a manifest there's not much value.

N.B. to anyone who uses a shared MODGHC_CABAL_SANDBOX, read the comment
in ghc.port.mk for instructions on proper initialization.

Attached are the revised patch and example port of pandoc for testing with.

--Aaron



pandoc-1.17.1.tgz
Description: Binary data
Index: ghc.port.mk
===
RCS file: /home/cvs/ports/lang/ghc/ghc.port.mk,v
retrieving revision 1.38
diff -u -p -u -r1.38 ghc.port.mk
--- ghc.port.mk	20 Jan 2016 16:08:29 -	1.38
+++ ghc.port.mk	16 Jun 2016 22:22:35 -
@@ -1,3 +1,4 @@
+#-*- mode: Makefile; tab-width: 4; -*-
 # $OpenBSD: ghc.port.mk,v 1.38 2016/01/20 16:08:29 kili Exp $
 # Module for Glasgow Haskell Compiler
 
@@ -55,7 +56,21 @@ DIST_SUBDIR ?=			ghc
 
 . if ${MODGHC_BUILD:L:Mcabal}
 MODGHC_SETUP_SCRIPT ?=		Setup.lhs Setup.hs
+.  if ${MODGHC_BUILD:L:Msandbox}
+BUILD_DEPENDS +=			devel/cabal-install
+# Set MODGHC_CABAL_SANDBOX to system-wide value to reuse packages
+# across builds. Be sure to initialize it first.
+# mkdir -p ${MODGHC_CABAL_SANDBOX}
+# cd ${MODGHC_CABAL_SANDBOX} && cabal sandbox init --sandbox .
+MODGHC_CABAL_PKGS ?=
+MODGHC_CABAL_REPO ?=		${WRKSRC}/.local-repo
+MODGHC_CABAL_SANDBOX ?=		${WRKSRC}/.cabal-sandbox
+MODGHC_SETUP_PROG ?=		${LOCALBASE}/bin/cabal
+MODGHC_REGISTER_PROG ?=		${WRKSRC}/Setup
+.  else
 MODGHC_SETUP_PROG ?=		${WRKSRC}/Setup
+MODGHC_REGISTER_PROG ?=		${MODGHC_SETUP_PROG}
+.  endif
 MODGHC_SETUP_CONF_ARGS ?=
 MODGHC_SETUP_CONF_ENV ?=
 
@@ -76,6 +91,56 @@ MODGHC_SETUP_CONF_ARGS +=	--docdir=\$$da
 # Little hack to let ports still add CONFIGURE_STYLE = autoconf and go
 # without a do-configure: target (some Haskell ports are built with
 # Cabal but use autohell for the documentation):
+.  if ${MODGHC_BUILD:L:Msandbox}
+# Build a cabal repo from downloaded packages
+.   for _pkg in ${MODGHC_CABAL_PKGS}
+_ver :=		${_pkg:C,.*-([0-9.]*)$,\1,}
+_name :=	${_pkg:C,-[0-9.]*$,,}
+_path :=	${_ver}/${_name}
+_tgz :=		${_pkg}.tar.gz
+MODGHC_CABAL_PATHS +:=		${_path}
+MODGHC_CABAL_LINK_CMDS +:=	"ln -sf ${FULLDISTDIR}/${_pkg}/${_tgz} ${_path}"
+MODGHC_CABAL_EXTRACT_CMDS +:="tar xzf ${_path}/${_tgz} ${_pkg}/${_name}.cabal"
+MODGHC_CABAL_MOVE_CMDS +:=	"mv ${_pkg}/${_name}.cabal ${_path}"
+MODGHC_CABAL_RMDIR_CMDS +:=	"rmdir ${_pkg}"
+.   endfor
+
+MODCABAL_configure = \
+	mkdir -p ${MODGHC_CABAL_REPO}/packages && \
+	cd ${MODGHC_CABAL_REPO}/packages && \
+	for s in ${MODGHC_CABAL_PATHS}; do \
+		mkdir -p "$$s"; \
+	done && \
+	for s in ${MODGHC_CABAL_LINK_CMDS}; do \
+		$$s; \
+	done && \
+	for s in ${MODGHC_CABAL_EXTRACT_CMDS}; do \
+		$$s; \
+	done && \
+	for s in ${MODGHC_CABAL_MOVE_CMDS}; do \
+		$$s; \
+	done && \
+	for s in ${MODGHC_CABAL_RMDIR_CMDS}; do \
+		$$s; \
+	done && \
+	find . -type f -name '*.cabal' >> files && \
+	tar -cf 00-index.tar -I files && \
+	rm -f files && \
+	cd ${WRKSRC} && \
+	${MODGHC_SETUP_PROG} sandbox init --sandbox=${MODGHC_CABAL_SANDBOX} && \
+	echo "local-repo: ${MODGHC_CABAL_REPO}/packages" > cabal.config && \
+	${MODGHC_SETUP_PROG} install --onl

Re: Sandboxing Haskell Port Builds: ghc.port.mk diff + example converters/pandoc

2016-06-16 Thread Aaron Poffenberger
On 06/16/16 17:34, Aaron Poffenberger wrote:
> On 06/15/16 07:46, Stuart Henderson wrote:
>> On 2016/06/15 07:12, Aaron Poffenberger wrote:
>>> You are right. cabal can install from a local path. Is it possible to
>>> feed a bunch of files into the process by adding them to distinfo?
>>
>> Aha: if you can list the distfiles in DISTFILES and point cabal at them
>> locally that should work.
>>
>> Fetching will be a little messy if the files are in separate subdirs
>> as I think they are on hackage, but it can be handled by using the
>> filename{url}sufx syntax in DISTFILES for them, e.g.
>> {path/to/}filename-$V.tar.gz which would be somewhat similar to what
>> devel/cargo is doing (peril-sensitive glasses advised before looking
>> at the regexp there ;)
>>
>> You can use EXTRACT_ONLY to stop ports infra from trying to unpack
>> them itself, and ${FULLDISTDIR} to get the path.
>>
> Hi Stuart,
> Thanks to your suggestion and a pointer to the Java "maven" thread by
> Ian Darwin, I've updated the patches to ghc.port.mk to include fetching
> the cabal dependencies using DISTFILES.
> 
> I tested building pandoc with networking disabled. It works.
> 
> I forgot that cabal expects package repos to have a specific structure
> and manifest describing the repo. I've implemented the necessary code to
> build it. Any comments on improving that section would be welcome.
> 
> I'm using symlinks between the tarballs in ${FULLDISTDIR} and the local
> cabal repo (MODGHC_CABAL_REPO).
> 
> The cabal sandbox is also a local directory (MODGHC_CABAL_SANDBOX) by
> default.
> 
> Of the two, MODGHC_CABAL_SANDBOX is a good candidate for sharing between
> sandboxed builds. You could create a shared repo (MODGHC_CABAL_REPO) but
> since it's just symlinks and a manifest there's not much value.
> 
> N.B. to anyone who uses a shared MODGHC_CABAL_SANDBOX, read the comment
> in ghc.port.mk for instructions on proper initialization.
> 
> Attached are the revised patch and example port of pandoc for testing with.
> 
> --Aaron
> 
Realized on the way home I'll need to modify port-modules(5) for this to
be a complete solution. I'll start on that next.

--Aaron



Re: Sandboxing Haskell Port Builds: ghc.port.mk diff + example converters/pandoc

2016-06-17 Thread Aaron Poffenberger
Hi Kili,

On 06/17/16 01:32, Matthias Kilian wrote:
> Hi,
> 
> On Thu, Jun 16, 2016 at 05:34:09PM -0500, Aaron Poffenberger wrote:
>> Thanks to your suggestion and a pointer to the Java "maven" thread by
>> Ian Darwin, I've updated the patches to ghc.port.mk to include fetching
>> the cabal dependencies using DISTFILES.
>>
>> I tested building pandoc with networking disabled. It works.
> 
> I don't think this cabal sandbox model is suitable for ports in any
> way.  What will happen if we enable shared libraries for ghc (which,
> according to some mails from Karel Gardas, should be possible with
> ghc-8)? Where will those libraries be end up in ${LOCALBASE}?

For the most part, the value of sandboxing the build will be to build
stand-alone executables like pandoc. Once built, the bits from
MODGHC_CABAL_SANDBOX aren't further referenced and may be safely deleted.

> 
> And do you think it's useful to have several different versions of
> the same haskell library sprinkled over the system?
> 
> In the pandoc port, MODGHC_CABAL_PKGS even contains library/version
> combinations we already have as separate ports.

The point of specifying the versions is those are the exact combination
of pkgs the cabal resolver determined will work together based on the
constraints from the pandoc.cabal file *and* the libraries I required in
RUN_DEPENDS-lib.

The versions are also required since BULK(8) builds don't allow network
access. As I understand it, everything has to be downloaded into
FULLDISTDIR before configure begins.

> 
> Sorry, but I'm not a big fan of this concept.
> 
> BTW, the pandoc-lib subpackage doesn't make any sense unless it
> does not depend on any of the cabal packages listed in MODGHC_CABAL_PKGS,
> because the libraries provided by those packages would be missing
> (they aren't installed). It also wouldn't install properly because
> PLIST-lib is wrong.

You're right about the -lib pkg. It won't work as currently ported. The
chief aim of sandboxing was to make standalone binaries possible without
a recursive porting effort for all the dependencies.

There are three possible resolutions: 1) don't include the -lib in the
package, 2) install the dependencies in
${LOCALBASE}/lib/ghc/pandoc-1.17.1 and update register.sh, or 3) scrap
the sandboxing idea altogether.

I don't like the last idea: scrapping sandboxing. pandoc has huge, unmet
dependency lists. And even if one were to recursively port every missing
dependency we still might have conflicts with existing ports due to
version-requirement conflicts. This would lead to having the same pkg
ported twice but for different versions.

I'm sure you know this is why Haskell-LTS was started: to create a
stable list of pkgs that work together. Unless we're following a
specific LTS release, we will run into version conflicts at some point.

(I think following a specific LTS release would be a good idea, but
that's a conversation for another email.)

Sandboxing solves this problem, certainly for binaries. And could
resolve library conflicts if libs can have their unmet dependencies
installed in their ${LOCALBASE}/lib/pkg dir.

Cheers,

--Aaron



Re: Sandboxing Haskell Port Builds: ghc.port.mk diff + example converters/pandoc

2016-06-16 Thread Aaron Poffenberger
On 06/16/16 17:34, Aaron Poffenberger wrote:
> On 06/15/16 07:46, Stuart Henderson wrote:
>> On 2016/06/15 07:12, Aaron Poffenberger wrote:
>>> You are right. cabal can install from a local path. Is it possible to
>>> feed a bunch of files into the process by adding them to distinfo?
>>
>> Aha: if you can list the distfiles in DISTFILES and point cabal at them
>> locally that should work.
>>
>> Fetching will be a little messy if the files are in separate subdirs
>> as I think they are on hackage, but it can be handled by using the
>> filename{url}sufx syntax in DISTFILES for them, e.g.
>> {path/to/}filename-$V.tar.gz which would be somewhat similar to what
>> devel/cargo is doing (peril-sensitive glasses advised before looking
>> at the regexp there ;)
>>
>> You can use EXTRACT_ONLY to stop ports infra from trying to unpack
>> them itself, and ${FULLDISTDIR} to get the path.
>>
> Hi Stuart,
> Thanks to your suggestion and a pointer to the Java "maven" thread by
> Ian Darwin, I've updated the patches to ghc.port.mk to include fetching
> the cabal dependencies using DISTFILES.
> 
> I tested building pandoc with networking disabled. It works.
> 
> I forgot that cabal expects package repos to have a specific structure
> and manifest describing the repo. I've implemented the necessary code to
> build it. Any comments on improving that section would be welcome.
> 
> I'm using symlinks between the tarballs in ${FULLDISTDIR} and the local
> cabal repo (MODGHC_CABAL_REPO).
> 
> The cabal sandbox is also a local directory (MODGHC_CABAL_SANDBOX) by
> default.
> 
> Of the two, MODGHC_CABAL_SANDBOX is a good candidate for sharing between
> sandboxed builds. You could create a shared repo (MODGHC_CABAL_REPO) but
> since it's just symlinks and a manifest there's not much value.
> 
> N.B. to anyone who uses a shared MODGHC_CABAL_SANDBOX, read the comment
> in ghc.port.mk for instructions on proper initialization.
> 
> Attached are the revised patch and example port of pandoc for testing with.
> 
> --Aaron
> 

Attached are the same files as before plus a patch for port-modules.5.

I documented the *sandbox* build action and added a "Defines" section to
document use of three variables that porters will need to know about to
sandbox.

I also moved the explanation of the two variables MODGHC_SETUP_CONF_ARGS
and MODGHC_SETUP_CONF_ENV from what was the final paragraph into the
"Defines" section for consistency.

--Aaron



pandoc-1.17.1.tgz
Description: Binary data
Index: ghc.port.mk
===
RCS file: /home/cvs/ports/lang/ghc/ghc.port.mk,v
retrieving revision 1.38
diff -u -p -u -r1.38 ghc.port.mk
--- ghc.port.mk	20 Jan 2016 16:08:29 -	1.38
+++ ghc.port.mk	16 Jun 2016 22:22:35 -
@@ -1,3 +1,4 @@
+#-*- mode: Makefile; tab-width: 4; -*-
 # $OpenBSD: ghc.port.mk,v 1.38 2016/01/20 16:08:29 kili Exp $
 # Module for Glasgow Haskell Compiler
 
@@ -55,7 +56,21 @@ DIST_SUBDIR ?=			ghc
 
 . if ${MODGHC_BUILD:L:Mcabal}
 MODGHC_SETUP_SCRIPT ?=		Setup.lhs Setup.hs
+.  if ${MODGHC_BUILD:L:Msandbox}
+BUILD_DEPENDS +=			devel/cabal-install
+# Set MODGHC_CABAL_SANDBOX to system-wide value to reuse packages
+# across builds. Be sure to initialize it first.
+# mkdir -p ${MODGHC_CABAL_SANDBOX}
+# cd ${MODGHC_CABAL_SANDBOX} && cabal sandbox init --sandbox .
+MODGHC_CABAL_PKGS ?=
+MODGHC_CABAL_REPO ?=		${WRKSRC}/.local-repo
+MODGHC_CABAL_SANDBOX ?=		${WRKSRC}/.cabal-sandbox
+MODGHC_SETUP_PROG ?=		${LOCALBASE}/bin/cabal
+MODGHC_REGISTER_PROG ?=		${WRKSRC}/Setup
+.  else
 MODGHC_SETUP_PROG ?=		${WRKSRC}/Setup
+MODGHC_REGISTER_PROG ?=		${MODGHC_SETUP_PROG}
+.  endif
 MODGHC_SETUP_CONF_ARGS ?=
 MODGHC_SETUP_CONF_ENV ?=
 
@@ -76,6 +91,56 @@ MODGHC_SETUP_CONF_ARGS +=	--docdir=\$$da
 # Little hack to let ports still add CONFIGURE_STYLE = autoconf and go
 # without a do-configure: target (some Haskell ports are built with
 # Cabal but use autohell for the documentation):
+.  if ${MODGHC_BUILD:L:Msandbox}
+# Build a cabal repo from downloaded packages
+.   for _pkg in ${MODGHC_CABAL_PKGS}
+_ver :=		${_pkg:C,.*-([0-9.]*)$,\1,}
+_name :=	${_pkg:C,-[0-9.]*$,,}
+_path :=	${_ver}/${_name}
+_tgz :=		${_pkg}.tar.gz
+MODGHC_CABAL_PATHS +:=		${_path}
+MODGHC_CABAL_LINK_CMDS +:=	"ln -sf ${FULLDISTDIR}/${_pkg}/${_tgz} ${_path}"
+MODGHC_CABAL_EXTRACT_CMDS +:="tar xzf ${_path}/${_tgz} ${_pkg}/${_name}.cabal"
+MODGHC_CABAL_MOVE_CMDS +:=	"mv ${_pkg}/${_name}.cabal ${_path}"
+MODGHC_CABAL_RMDIR_CMDS +:=	"rmdir ${_pkg}"
+.   endfor
+
+MODCABAL_configure = \
+	mkdir -p ${MODGHC_CABAL_REPO}/packages && \
+	cd ${MODGHC_CABAL_REPO}/packages && \
+	for s in ${MODGHC_CABAL_PATHS}; do \
+		mkdir -p "$$s"; \

NEW: misc/sword

2016-03-11 Thread Aaron Poffenberger
Hello ports@,

Here is a new port : misc/sword

Tested on: amd64.

>From DESCR:

The SWORD Engine is a software framework that allows research
manipulation of Biblical texts. There are a number of projects that use
The SWORD Engine, including Bibletime, Xiphos, PocketSword and many
others. Many of these projects already include The SWORD Engine in their
distribution, so only download if you were instructed to do so, or are a
software developer wishing to develop Bible software.

Also includes the command line utility diatheke for working with texts.



I'm working on porting one of the GUIs to use library but since this is
my first port I'm sending it now for review.

Cheers,
Aaron


sword.tar.gz
Description: application/gzip


Re: NEW: misc/sword

2016-03-13 Thread Aaron Poffenberger
On 03/13/16 16:55, Dmitrij D. Czarkoff wrote:
> Aaron Poffenberger said:
>> I thought the LIB_DEPENDS and WANT_LIB were suspiciously empty. I must
>> have had several of the dependencies already installed. What’s the
>> best way to find them in such cases?
> 
> As you might have noticed "port-lib-depends-check" target in
> bsd.port.mk(5) and inside a comment in Makefile.template.  When called
> with this target ("make port-lib-depends-check") make will walk through
> dependencies of the port and through port's WANTLIB, informing user of
> its findings.  Note, this only works with binaries.
> 

Ah, right. I remember that step now that you mention it. I forgot to run
it when making the port.

Thanks!

--Aaron



Re: NEW: misc/sword

2016-03-12 Thread Aaron Poffenberger
> 
> On Mar 12, 2016, at 4:36 AM, Dmitrij D. Czarkoff <czark...@gmail.com> wrote:
> 
> Aaron Poffenberger said:
>> Here is a new port : misc/sword
> [...]
>> I'm working on porting one of the GUIs to use library but since this is
>> my first port I'm sending it now for review.
> 
> You've left out dependency management (LIB_DEPENDS, WANTLIB).  Also, we
> normally start SHARED_LIBS from 0.0 for new ports;  values are not
> supposed to correspond to upstream's library versioning.  See attached
> tarball for the fixes.
> 
> There is also issue with configuration file.  It is installed to
> ${PREFIX}/etc by default, which is not what we normally do.  I've set
> runtime config file location to ${SYSCONFDIR}, but more work is
> required:  default configuration file should be installed to
> "${PREFIX}/share/examples/sword/" and @sampled to ${SYSCONFDIR} from
> there.  I don't have time to finish it, so it is left for homework.  :)
> 
> Overall, I'd say not a bad job for the first port.
> 
> -- 
> Dmitrij D. Czarkoff
> 

Thanks, Dmitrij. Best kind of homework.

I thought the LIB_DEPENDS and WANT_LIB were suspiciously empty. I must have had 
several of the dependencies already installed. What’s the best way to find them 
in such cases?

Cheers,

—Aaron


NEW: www/kcaldav

2016-04-19 Thread Aaron Poffenberger
Hello ports@,

Here is a new port : www/kcaldav

Tested on: amd64.

>From DESCR:

kCalDAV is a simple, safe, and minimal CalDAV server depending only on
kcgi(3), SQLite, and expat(3). The ISO C source code is ISC licensed.
For the time being, it works only for simple setups, for example, a
calendar collection shared between Mozilla Lightning, Mac OS X iCal,
and iOS7 (iPhone4) clients.



I tested the port with Thunderbird Lightning on -current and
iCal/Calendar.app on Mac OS 10 (Yosemite 10.10.5) and on iOS
9.3.1.

The port builds and compiles the userland utils and the /var/www cgi
binaries and user web pages.

Cheers,
Aaron



kcaldav-0.1.4.tgz
Description: Binary data


Re: NEW: www/kcaldav

2016-04-19 Thread Aaron Poffenberger
On 04/19/16 19:28, James Turner wrote:
> On Tue, Apr 19, 2016 at 04:44:09PM -0500, Aaron Poffenberger wrote:
>> On 04/19/16 15:12, James Turner wrote:
>>> On Tue, Apr 19, 2016 at 01:44:31PM -0500, Aaron Poffenberger wrote:
>>>> Hello ports@,
>>>>
>>>> Here is a new port : www/kcaldav
>>>>
>>>> Tested on: amd64.
>>>
>>> I always meant to make a port of this. ok jturner@
>>>
>>
>> Hi James,
>> From the headers it looks like you may have replied just to me.
>>
>> Cheers,
>>
>> --Aaron
>>
> 
> My bad for some reaaon I was thinking you were a developer. In that case
> if someone else wanta to import they have my ok or i'd br happy to
> import with theirs.
> 

New version based on offline comments from jturner.

--Aaron



kcaldav-0.1.4.tgz
Description: Binary data


Re: NEW: www/kcaldav

2016-04-20 Thread Aaron Poffenberger
On 04/20/16 06:51, Joerg Jung wrote:
> On Tue, Apr 19, 2016 at 09:50:47PM -0500, Aaron Poffenberger wrote:
>> On 04/19/16 19:28, James Turner wrote:
>>> On Tue, Apr 19, 2016 at 04:44:09PM -0500, Aaron Poffenberger wrote:
>>>> On 04/19/16 15:12, James Turner wrote:
>>>>> On Tue, Apr 19, 2016 at 01:44:31PM -0500, Aaron Poffenberger wrote:
>>>>>> Hello ports@,
>>>>>>
>>>>>> Here is a new port : www/kcaldav
>>>>>>
>>>>>> Tested on: amd64.
>>>>>
>>>>> I always meant to make a port of this. ok jturner@
>>>>>
>>>>
>>>> Hi James,
>>>> From the headers it looks like you may have replied just to me.
>>>>
>>>> Cheers,
>>>>
>>>> --Aaron
>>>>
>>>
>>> My bad for some reaaon I was thinking you were a developer. In that case
>>> if someone else wanta to import they have my ok or i'd br happy to
>>> import with theirs.
> 
> slightly tested looks, good to me.  ok jung@
> 
>> New version based on offline comments from jturner.
> 

Another new version removing WAL PRAGMA from sqlite(3) db-create script.
WAL requires write access to /tmp which might not exist in a chroot.

Removed /var/www/tmp create from PLIST.

Documented how to re-enable WAL in README for those who want it.

--Aaron



kcaldav-0.1.4.tgz
Description: Binary data


NEW: www/kore

2016-07-12 Thread Aaron Poffenberger
Hello ports@,

Here is a new port : www/kore

Tested on: amd64.

>From DESCR:

Kore is an easy to use web application framework for writing scalable
web APIs in C.

Its main goals are security, scalability and allowing rapid
development and deployment of such APIs.

Because of this Kore is an ideal candidate for building robust,
scalable and secure web things.

---

I know ports are locked down. Submitting for when they open again.

And for anyone looking for to play with kore now, it has very few
dependencies. It's quick to build and start coding with.

Cheers,
Aaron


kore-1.2.3.tgz
Description: Binary data


NEW: audio/kid3

2016-06-28 Thread Aaron Poffenberger
Hello ports@,

Here is a new port : audio/kid3

Tested on: amd64.

>From DESCR:

Kid3 is an application to edit the ID3v1 and ID3v2 tags in MP3 files
in an efficient way. Also tags in Ogg/Vorbis, Opus, DSF, FLAC, MPC,
APE, MP4/AAC, MP2, Speex, TrueAudio, WavPack, WMA, WAV, AIFF files and
tracker modules (MOD, S3M, IT, XM) are supported. It is easy to set
tags of multiple files to the same values (e.g. album, artist, year
and genre in all files of the same album) and generate the tags from
the file name or vice versa.

---
Port Notes:

The app compiles under qt4, qt5 and KDE. It also has a cli version. I
ported it for qt4 and cli only.

The description doesn't mention it, but the app can also playback many
formats (ALAC being the notable exception). I ported it *with* the
playback features enabled.

Cheers,
Aaron



kid3-3.4.1.tgz
Description: Binary data


Re: [update] eduke32/5775

2016-07-06 Thread Aaron Poffenberger
On 07/06/16 18:27, Ryan Freeman wrote:
> On Sun, Jun 26, 2016 at 01:35:44PM -0700, Ryan Freeman wrote:
>> On Sat, Jun 18, 2016 at 11:50:55PM -0700, Ryan Freeman wrote:
>>> On Sat, Jun 18, 2016 at 03:54:45PM -0400, Daniel Wilkins wrote:
 The old version was something like 3 years old and 2000 weeklies behind.
 I've talked to the dev and it now builds cleanly without patches(or rather,
 I made the changes needed and got it merged into the project.)

 Now it'll actually run the official expansions properly, as well as all the
 other additions since 2013.
>>>
>>> Here is a patch against current ports cvs triggered by Daniel's update.
>>> WANTLIB and LIB_DEPENDS have been regenerated.  the do-install paths have
>>> been corrected, I removed the dos2unix stuff as I don't think it is that
>>> big a deal in the end, and it matches upstream.
>>>
>>> The datafile path substitutions have been reduced to one file (yay), and
>>> perl has been switched out in lieu of sed.
>>>
>>> Unfortunately the Makefile.common has some mean tricks to really break our
>>> ability to feed CC/CXX, so I did some hack'n'slash patching of it.  I am
>>> not sure that this is best, I have employed their recommended
>>> PACKAGE_REPOSITORY=1 setting to 'not completely gut all their 
>>> optimizations'..
>>> but I'd love it if anyone can confirm its okay :-) looks to just use -O2.
>>>
>>> Turning on aggressive debugging things like DEBUGANYWAY kinda broke mouse
>>> input making it really hard to play, so avoiding that path.
>>>
>>> Lastly I think we need to use ports gcc now.
>>>
>>> works good here on current amd64
>>
>> ping?
> 
> Anyone?  I saw the mail go out about pending ports lock, this definitely
> isn't something terribly important, but if there is opportunity to squeeze
> it in before lock, why not?
> 
>>> Cheers!
>>> -ryan
>>>
>>>
>>> ? eduke32.diff
>>> Index: Makefile
>>> ===
>>> RCS file: /cvs/ports/games/eduke32/Makefile,v
>>> retrieving revision 1.7
>>> diff -u -p -r1.7 Makefile
>>> --- Makefile22 Oct 2014 13:55:07 -  1.7
>>> +++ Makefile19 Jun 2016 06:43:09 -
>>> @@ -1,12 +1,11 @@
>>>  # $OpenBSD: Makefile,v 1.7 2014/10/22 13:55:07 jasper Exp $
>>>  
>>>  COMMENT =  Enhanced Duke Nukem 3D engine
>>> -RDATE =20120301
>>> -RTAG = 2394
>>> +RDATE =20160610
>>> +RTAG = 5775
>>>  DISTNAME = eduke32_src_${RDATE}-${RTAG}
>>>  PKGNAME =  eduke32-2.0.0.${RTAG}
>>> -REVISION = 2
>>> -EXTRACT_SUFX = .tar.bz2
>>> +EXTRACT_SUFX = .tar.xz
>>>  CATEGORIES =   games x11
>>>  
>>>  HOMEPAGE = http://www.eduke32.com/
>>> @@ -25,12 +24,15 @@ BUILD_DEPENDS = archivers/unzip \
>>>  BUILD_DEPENDS += devel/nasm
>>>  .endif
>>>  
>>> -WANTLIB =  SDL c m pthread stdc++ SDL_mixer>=3 vorbisfile vpx
>>> +WANTLIB += c m ogg png pthread vorbis vorbisfile vpx z
>>> +WANTLIB += SDL2 SDL2_mixer FLAC execinfo
>>>  
>>>  LIB_DEPENDS =  audio/libvorbis \
>>> -   multimedia/libvpx \
>>> -   devel/sdl \
>>> -   devel/sdl-mixer
>>> +   audio/flac \
>>> +   devel/sdl2 \
>>> +   devel/sdl2-mixer \
>>> +   devel/libexecinfo \
>>> +   multimedia/libvpx
>>>  
>>>  # dlopen()'d; shows as Extra in check-lib-depends but it is used
>>>  LIB_DEPENDS += x11/gtk+2
>>> @@ -38,31 +40,23 @@ WANTLIB +=  gtk-x11-2.0
>>>  
>>>  RUN_DEPENDS =  games/duke3ddata
>>>  
>>> -MASTER_SITES = 
>>> http://dukeworld.duke4.net/eduke32/synthesis/old/${RDATE}-${RTAG}/ \
>>> -   http://dukeworld.duke4.net/eduke32/synthesis/${RDATE}-${RTAG}/
>>> +MASTER_SITES = 
>>> http://dukeworld.duke4.net/eduke32/synthesis/${RDATE}-${RTAG}/
>>> +
>>> +MODULES =  gcc4
>>> +MODGCC4_LANGS =c c++ 
>>> +MODGCC4_ARCHS =*
>>>  
>>>  # make sure we can see compilation output, respect CC/CXX, don't strip!
>>> -MAKE_FLAGS =   PRETTY_OUTPUT=0 CC="${CC}" CXX="${CXX}" DEBUGANYWAY=1
>>> +MAKE_ENV = CC="${CC}" CXX="${CXX}" PRETTY_OUTPUT=0 PACKAGE_REPOSITORY=1
>>>  USE_GMAKE =Yes
>>>  NO_TEST =  Yes
>>>  
>>> -WRKDIST =  ${WRKDIR}/eduke32_${RDATE}-${RTAG}/
>>> +WRKDIST =  ${WRKDIR}/eduke32_${RDATE}-${RTAG}
>>>  
>>>  post-extract:
>>> # check for data files in correct location
>>> -   @perl -pi -e "s,/usr/share/games/eduke32,${TRUEPREFIX}/share/duke3d," \
>>> -   ${WRKSRC}/source/astub.c
>>> -   @perl -pi -e "s,/usr/share/games/eduke32,${TRUEPREFIX}/share/duke3d," \
>>> -   ${WRKSRC}/source/game.c
>>> -   @perl -pi -e "s,./eduke32,eduke32," ${WRKSRC}/build/include/editor.h
>>> -   # make plaintext files less annoying to read...
>>> -   @perl -MExtUtils::Command -e dos2unix \
>>> -   ${WRKSRC}/tiles.cfg \
>>> -   ${WRKSRC}/names.h \
>>> -   ${WRKSRC}/GNU.TXT \
>>> -   ${WRKSRC}/buildlic.txt \
>>> -   ${WRKSRC}/samples/*.sample \
>>> -   ${WRKSRC}/samples/*.txt
>>> +   @sed 

Re: [NEW] audio/svmidi

2016-07-06 Thread Aaron Poffenberger
On 06/27/16 17:41, Henrique N. Lengler wrote:
> On Tue, Jun 28, 2016 at 01:26:10AM +0300, li...@wrant.com wrote:
>> Mon, 27 Jun 2016 18:50:01 -0300 "Henrique N. Lengler"
>> 
>>> On Tue, Jun 28, 2016 at 12:09:10AM +0300, li...@wrant.com wrote:
 Mon, 27 Jun 2016 17:10:21 -0300 "Henrique N. Lengler"
   
> On Sun, Jun 26, 2016 at 09:45:23PM -0500, Edgar Pettijohn wrote:  
>> Sorry deleted the original email before I noticed this.
>>
>> svmidi needs fonts/terminus
>> -- 
>> Edgar Pettijohn
>
> Changed to '-misc-fixed-medium-*-*-*-14-*-*-*-*-*-*-*', this font is on 
> base
> right?  

 Was this not 13 as seen here in file 
 /usr/X11R6/share/X11/app-defaults/XTerm

 141:*VT100.utf8Fonts.font:  
 -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1

 Try with this:

 '-misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-*'

 You could test around with xfontsel(1)

 xfontsel - point and click selection of X11 font names
 [http://man.openbsd.org/xfontsel]

 $ xfontsel

 NB: I may be completely wrong, please don't take it verbatim, verify.  
>>>
>>> Why not 14? I got it from xfontsel
>>
>> It's up to you mostly, if you choose to follow that just for consistency
>> given the following statements are not completely off the chart or wrong.
>>
>> While there may be very few reasons for the *-13-* I'll try to add some:
>>
>> + XTerm 'probably' uses *-13-* by default on a fresh install
>> + 'maybe' some of the sizes cover more from the UTF-8 demo sample
>>
>> http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-demo.txt
>>
>> And then again, it's a matter of personal preferences, for my eyes, I
>> just stick to fonts that draw the letter with 1 pixel line width only.
>>
>> Experiment a bit with various settings and pick the one you like best.
> 
> Ok I got it,
> 
> changed to '-misc-fixed-medium-r-semicondensed-*-13-*-*-*-*-*-iso10646-*'
> 
> Attached updated archive.
> 
> Regards;
> 
> Henrique N. Lengler  
> 
I didn't find an attached archive to this message. Did I miss it?

--Aaron



Re: NEW: audio/kid3

2016-07-06 Thread Aaron Poffenberger
On 07/05/16 11:10, Aaron Poffenberger wrote:
> On 06/30/16 11:23, Adam Wolk wrote:
>> On Tue, 28 Jun 2016 19:27:33 -0500
>> Aaron Poffenberger <a...@hypernote.com> wrote:
>>
>>> Hello ports@,
>>>
>>> Here is a new port : audio/kid3
>>>
>>> Tested on: amd64.
>>>
>>> From DESCR:
>>>
>>> Kid3 is an application to edit the ID3v1 and ID3v2 tags in MP3 files
>>> in an efficient way. Also tags in Ogg/Vorbis, Opus, DSF, FLAC, MPC,
>>> APE, MP4/AAC, MP2, Speex, TrueAudio, WavPack, WMA, WAV, AIFF files and
>>> tracker modules (MOD, S3M, IT, XM) are supported. It is easy to set
>>> tags of multiple files to the same values (e.g. album, artist, year
>>> and genre in all files of the same album) and generate the tags from
>>> the file name or vice versa.
>>>
>>> ---
>>> Port Notes:
>>>
>>> The app compiles under qt4, qt5 and KDE. It also has a cli version. I
>>> ported it for qt4 and cli only.
>>>
>>> The description doesn't mention it, but the app can also playback many
>>> formats (ALAC being the notable exception). I ported it *with* the
>>> playback features enabled.
>>>
>>> Cheers,
>>> Aaron
>>>
>>
>> Tested on amd64. I had two issues:
>>
>> Error: Your GStreamer installation is missing a plug-in.
>> Error: GStreamer encountered a general stream error.
>> Error: GStreamer encountered a general stream error.
>> Error: GStreamer encountered a general stream error.
>> Error: Your GStreamer installation is missing a plug-in.
>> Error: GStreamer encountered a general stream error.
>> Error: Your GStreamer installation is missing a plug-in.
>> Error: GStreamer encountered a general stream error.
>>
>> When trying to use File -> Import from Musicbrainz Fingerprint...
>>
>> and a HUGE performance lock on my box (maxed CPU's, swapping) when
>> trying:
>>
>> File -> Automatic import...
>>
>> Everything else seem fine.
>>
>> Regards,
>> Adam
>>
> Hi Adam,
> Here's the new version we tested offline.
> 
> Cheers,
> 
> --Aaron
> 
Here's a new tar ball. The last one included git files.

This one's clean.

--Aaron




kid3-3.4.1.tgz
Description: Binary data


Re: NEW: audio/kid3

2016-07-09 Thread Aaron Poffenberger
On 07/06/16 08:53, Aaron Poffenberger wrote:
> On 07/05/16 11:10, Aaron Poffenberger wrote:
>> On 06/30/16 11:23, Adam Wolk wrote:
>>> On Tue, 28 Jun 2016 19:27:33 -0500
>>> Aaron Poffenberger <a...@hypernote.com> wrote:
>>>
>>>> Hello ports@,
>>>>
>>>> Here is a new port : audio/kid3
>>>>
>>>> Tested on: amd64.
>>>>
>>>> From DESCR:
>>>>
>>>> Kid3 is an application to edit the ID3v1 and ID3v2 tags in MP3 files
>>>> in an efficient way. Also tags in Ogg/Vorbis, Opus, DSF, FLAC, MPC,
>>>> APE, MP4/AAC, MP2, Speex, TrueAudio, WavPack, WMA, WAV, AIFF files and
>>>> tracker modules (MOD, S3M, IT, XM) are supported. It is easy to set
>>>> tags of multiple files to the same values (e.g. album, artist, year
>>>> and genre in all files of the same album) and generate the tags from
>>>> the file name or vice versa.
>>>>
>>>> ---
>>>> Port Notes:
>>>>
>>>> The app compiles under qt4, qt5 and KDE. It also has a cli version. I
>>>> ported it for qt4 and cli only.
>>>>
>>>> The description doesn't mention it, but the app can also playback many
>>>> formats (ALAC being the notable exception). I ported it *with* the
>>>> playback features enabled.
>>>>
>>>> Cheers,
>>>> Aaron
>>>>
>>>
>>> Tested on amd64. I had two issues:
>>>
>>> Error: Your GStreamer installation is missing a plug-in.
>>> Error: GStreamer encountered a general stream error.
>>> Error: GStreamer encountered a general stream error.
>>> Error: GStreamer encountered a general stream error.
>>> Error: Your GStreamer installation is missing a plug-in.
>>> Error: GStreamer encountered a general stream error.
>>> Error: Your GStreamer installation is missing a plug-in.
>>> Error: GStreamer encountered a general stream error.
>>>
>>> When trying to use File -> Import from Musicbrainz Fingerprint...
>>>
>>> and a HUGE performance lock on my box (maxed CPU's, swapping) when
>>> trying:
>>>
>>> File -> Automatic import...
>>>
>>> Everything else seem fine.
>>>
>>> Regards,
>>> Adam
>>>
>> Hi Adam,
>> Here's the new version we tested offline.
>>
>> Cheers,
>>
>> --Aaron
>>
> Here's a new tar ball. The last one included git files.
> 
> This one's clean.
> 
> --Aaron
> 
> 
ping

Anyone have time to test this?

--Aaron



Re: [NEW] graphics/fotowall 0.9

2016-07-10 Thread Aaron Poffenberger
On 07/10/16 16:57, Adam Wolk wrote:
> Hi ports@,
> 
> New port attached. Looking for feedback and OK's. I do assume if at all
> that it will be imported post ports freeze.
> 
> The port has a single 3rd party patch reported upstream:
>  - https://github.com/enricoros/fotowall/pull/11
> 
> there is also small @sed foo in the Makefile to account for install paths.
> I didn't report that as upstream seems to be moving towards CMake.
> 
> $ cat pkg/DESCR
> Fotowall is an opensource creative tool that lets you play with your pixels as
> you've always wanted! Make the perfect arrangement with your photos, add text,
> live video from your webcam and the best internet pictures.
> 
> With fotowall you can:
> * create original pictures, wallpapers, postcards and covers
> * print superbig posters with a small printer
> * play with live video, internet content, text and picture
> 
> Regards,
> Adam
> 
Hi Adam,
Builds and installs cleanly for me. Runs and imports images.

--Aaron



/etc/pkg.conf vs PKG_PATH in `make depends`

2016-07-11 Thread Aaron Poffenberger
I added "FETCH_PACKAGES=yes" to /etc/mk.conf, executed `make depends`
and several dependencies began building rather than installing via pkg_add.

After further digging around I discovered that while I had "installpath"
defined in /etc/pkg.conf I had no PKG_PATH defined.

If I export PKG_PATH, then the dependencies are installed as packages.

Is this expected behavior or should the ports-make system pick-up the
value of "installpath"?

Also, the error that's reported when the ports-make system can't find a
package locally is a bit misleading. I kept getting:


$ make depends
===> dovecot-2.2.24p0 depends on: mariadb-client-* - not found
===>  Verifying install for mariadb-client-* in databases/mariadb
install: /home/usr/packages/amd64/all: Operation not permitted
install: /home/usr/packages/amd64/tmp/: Operation not permitted
install: /home/usr/packages/amd64/cache/: Operation not permitted
===>  Looking for mariadb-client-10.0.25v1.tgz in $PKG_PATH - not found
*** Error 1 in /usr/ports/databases/mariadb
(/usr/ports/infrastructure/mk/bsd.port.mk:1881
'/home/usr/packages/amd64/cache//mariadb-client-10.0.25v1.tgz')
install: /home/usr/packages/amd64/all: Operation not permitted
install: /home/usr/packages/amd64/tmp/: Operation not permitted


All the error go away when I export PKG_PATH so I don't think it's
anything to do with permissions.

Cheers,

--Aaron




Re: NEW: audio/kid3

2016-07-05 Thread Aaron Poffenberger
On 06/30/16 11:23, Adam Wolk wrote:
> On Tue, 28 Jun 2016 19:27:33 -0500
> Aaron Poffenberger <a...@hypernote.com> wrote:
> 
>> Hello ports@,
>>
>> Here is a new port : audio/kid3
>>
>> Tested on: amd64.
>>
>> From DESCR:
>>
>> Kid3 is an application to edit the ID3v1 and ID3v2 tags in MP3 files
>> in an efficient way. Also tags in Ogg/Vorbis, Opus, DSF, FLAC, MPC,
>> APE, MP4/AAC, MP2, Speex, TrueAudio, WavPack, WMA, WAV, AIFF files and
>> tracker modules (MOD, S3M, IT, XM) are supported. It is easy to set
>> tags of multiple files to the same values (e.g. album, artist, year
>> and genre in all files of the same album) and generate the tags from
>> the file name or vice versa.
>>
>> ---
>> Port Notes:
>>
>> The app compiles under qt4, qt5 and KDE. It also has a cli version. I
>> ported it for qt4 and cli only.
>>
>> The description doesn't mention it, but the app can also playback many
>> formats (ALAC being the notable exception). I ported it *with* the
>> playback features enabled.
>>
>> Cheers,
>> Aaron
>>
> 
> Tested on amd64. I had two issues:
> 
> Error: Your GStreamer installation is missing a plug-in.
> Error: GStreamer encountered a general stream error.
> Error: GStreamer encountered a general stream error.
> Error: GStreamer encountered a general stream error.
> Error: Your GStreamer installation is missing a plug-in.
> Error: GStreamer encountered a general stream error.
> Error: Your GStreamer installation is missing a plug-in.
> Error: GStreamer encountered a general stream error.
> 
> When trying to use File -> Import from Musicbrainz Fingerprint...
> 
> and a HUGE performance lock on my box (maxed CPU's, swapping) when
> trying:
> 
> File -> Automatic import...
> 
> Everything else seem fine.
> 
> Regards,
> Adam
> 
Hi Adam,
Here's the new version we tested offline.

Cheers,

--Aaron



kid3-3.4.1.tgz
Description: Binary data


Re: NEW: audio/kid3

2016-07-05 Thread Aaron Poffenberger
On 07/05/16 11:16, Adam Wolk wrote:
> On Tue, 5 Jul 2016 11:10:46 -0500
> Aaron Poffenberger <a...@hypernote.com> wrote:
> 
>> On 06/30/16 11:23, Adam Wolk wrote:
>>> On Tue, 28 Jun 2016 19:27:33 -0500
>>> Aaron Poffenberger <a...@hypernote.com> wrote:
>>>   
>>>> Hello ports@,
>>>>
>>>> Here is a new port : audio/kid3
>>>>
>>>> Tested on: amd64.
>>>>
>>>> From DESCR:
>>>>
>>>> Kid3 is an application to edit the ID3v1 and ID3v2 tags in MP3
>>>> files in an efficient way. Also tags in Ogg/Vorbis, Opus, DSF,
>>>> FLAC, MPC, APE, MP4/AAC, MP2, Speex, TrueAudio, WavPack, WMA, WAV,
>>>> AIFF files and tracker modules (MOD, S3M, IT, XM) are supported.
>>>> It is easy to set tags of multiple files to the same values (e.g.
>>>> album, artist, year and genre in all files of the same album) and
>>>> generate the tags from the file name or vice versa.
>>>>
>>>> ---
>>>> Port Notes:
>>>>
>>>> The app compiles under qt4, qt5 and KDE. It also has a cli
>>>> version. I ported it for qt4 and cli only.
>>>>
>>>> The description doesn't mention it, but the app can also playback
>>>> many formats (ALAC being the notable exception). I ported it
>>>> *with* the playback features enabled.
>>>>
>>>> Cheers,
>>>> Aaron
>>>>  
>>>
>>> Tested on amd64. I had two issues:
>>>
>>> Error: Your GStreamer installation is missing a plug-in.
>>> Error: GStreamer encountered a general stream error.
>>> Error: GStreamer encountered a general stream error.
>>> Error: GStreamer encountered a general stream error.
>>> Error: Your GStreamer installation is missing a plug-in.
>>> Error: GStreamer encountered a general stream error.
>>> Error: Your GStreamer installation is missing a plug-in.
>>> Error: GStreamer encountered a general stream error.
>>>
>>> When trying to use File -> Import from Musicbrainz Fingerprint...
>>>
>>> and a HUGE performance lock on my box (maxed CPU's, swapping) when
>>> trying:
>>>
>>> File -> Automatic import...
>>>
>>> Everything else seem fine.
>>>
>>> Regards,
>>> Adam
>>>   
>> Hi Adam,
>> Here's the new version we tested offline.
>>
>> Cheers,
>>
>> --Aaron
>>
> 
> That's OK awolk@ to import.
> 
> No longer locks up my machine, I still get gstreamer warnings and can't
> play back audio but the main functionality of tag editing and
> auto importing works. Tested on a Jul 3 amd64 snapshot.
> 
> Regards,
> Adam
> 
Thanks Adam!

For anyone else who has time to test, Adam and I iterated over some
ideas and known issue. I rebuilt the project multiple times trying to
recreate the gstreamer issues. Assuming the project builds against
gstreamer-0.10, then it always works for me.

If someone else has time to try it, I'd appreciate the feedback. Two
machine builds just aren't enough to determine whether it's an issue
with the port.

That said, if we can't sort out the gstreamer issues I can always
disable playback altogether. Editing id3 tags is the key feature I'm after.

--Aaron



Re: [NEW] security/routersploit

2016-06-30 Thread Aaron Poffenberger
On 06/30/16 15:24, Adam Wolk wrote:
> On Wed, 29 Jun 2016 22:40:10 +0200
> Adam Wolk  wrote:
> 
>> Hi ports@,
>>
>> $ cat
>> pkg/DESCR The RouterSploit Framework is an open-source exploitation
>> framework dedicated for embedded devices.
>>
>> It consists of various modules that aid penetration testing
>> operations:
>>
>> * exploits - modules that take advantage of identified vulnerabilities
>> * creds - modules designed to test credentials against network
>> services
>> * scanners - modules that check if target is vulnerable to any exploit
>>
>> Feedback? OK's?
>>
>> Regards,
>> Adam
> 
> Apparently this diff builds for me but breaks for many people. I
> believe something is wrong with my local snapshot but I am right before
> a conference so don't want to bump just yet.
> 
> If anyone still wants to test the port you are highly advised to test a
> patch from sthen@ first http://ix.io/YS3. If you can wait a bit, I
> should be tackling this issue around Monday.
> 
> Regards,
> Adam
> 
Hi Adam,
I was seeing the build issues you mention during `make package`. With
the patch from sthen@, `make package` and `make install` work. rsy.py
installs and works.

--Aaron



Re: www/otter-browser 0.9.10 beta 10 => 0.9.11-dev128 move to weekly releases

2016-06-20 Thread Aaron Poffenberger
On 06/16/16 18:54, Brandon Mercer wrote:
> On Thu, Jun 16, 2016 at 06:44:09PM +0200, Adam Wolk wrote:
>> Hi ports@
>>
>> I have been talking with bmercer@ about moving our otter packaging from
>> the beta release (which appears every 6 months) to a weekly package.
>> This move is also applauded by the lead otter-browser developer
>> (stating that weeklies rarely have any regressions). Reasoning for the
>> change in case of OpenBSD.
>>
>> 1. We release every 6 months and it doesn't always align with a new
>> otter beta. Meaning that users have to wait for 6 months or more for a
>> new beta with potential security fixes. Going with weekly snapshots
>> regardless of when the tree is frozen should lead to a quite recent
>> otter browser release.
>>
>> 2. Doing a release every 6 months means that upstream doesn't get it's
>> code tested on OpenBSD until it's too late/almost too late. Having
>> weekly packages would expose problem on OpenBSD earlier.
>>
>> 3. Testing the package will get easier as weekly releases will add
>> functionality in incremental updates versus a code dump every 6 months.
>>
>> Notable changes since previous port:
>>  - re-ordered one entry in the PLIST
>>
>> Notable changes since version 0.9.10 (app wise):
>>  * F12 menu now exposes all modes for Images visibility (including
>>newly added option to show cached images only) and Plugins,
>>  * QtWebEngine backend is now capable of saving pages in MIME HTML
>>format and as complete set of files,
>>  * new toolbar visibility settings for full screen mode.
> 
> I'm in favor of this change. The diff seems good to me but since I'm
> biased it's best if we wait on others for oks. 
> 
> It was brought up that perhaps there should be a stable and weekly port.
> The dialogue was essentially that people would use the stable and never
> test the weeklies so there would be a lot of duplicate work for a rather
> counterproductive outcome. The weekly releases are the best path to
> track at this time and until it makes sense to do otherwise, I think
> this is the best route because of the reasons mentioned above by Adam.
> 
> Cheers
> 
Otter's a fairly new browser and being updated quickly. I'm more likely
to stick with it and treat it like a serious tool if I can see it
progress and mature more regularly. Otherwise it'll just be a novelty.

--Aaron



UPDATE: comms/rtl-sdr

2016-09-09 Thread Aaron Poffenberger
Hello ports@,

Here is an upate to: comms/rtl-sdr

Tested on: amd64 and bog-standard rtl-sdr device.



To build gr-osmosdr we need the newer version of rtl-sdr (mostly
definitions for newer devices). Upstream have not released a new
version since 2014. I've changed the Makefile to pull from a specific
github commit.

Cheers,
Aaron

Index: Makefile
===
RCS file: /cvs/ports/comms/rtl-sdr/Makefile,v
retrieving revision 1.4
diff -u -p -u -r1.4 Makefile
--- Makefile4 Mar 2016 10:11:21 -   1.4
+++ Makefile17 Aug 2016 19:11:39 -
@@ -2,8 +2,12 @@
 
 COMMENT=   software to turn RTL2832U into an SDR
 
-DISTNAME=  rtl-sdr-0.20130412
-REVISION=  1
+DISTNAME=  rtl-sdr-0.20150516
+REVISION=  0
+
+GH_ACCOUNT =   steve-m
+GH_PROJECT =   librtlsdr
+GH_COMMIT =8b4d755ba1b889510fba30f627ee08736203070d
 
 SHARED_LIBS=   rtlsdr 0.0
 
@@ -17,9 +21,6 @@ MAINTAINER=   Stuart Henderson devh);
if (r < 0) {
libusb_free_device_list(list, 1);
Index: pkg/PLIST
===
RCS file: /cvs/ports/comms/rtl-sdr/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -u -r1.3 PLIST
--- pkg/PLIST   22 May 2015 11:31:11 -  1.3
+++ pkg/PLIST   17 Aug 2016 19:08:59 -
@@ -1,6 +1,7 @@
 @comment $OpenBSD: PLIST,v 1.3 2015/05/22 11:31:11 ajacoutot Exp $
 @bin bin/rtl_eeprom
 @bin bin/rtl_fm
+@bin bin/rtl_power
 @bin bin/rtl_sdr
 @bin bin/rtl_test
 include/rtl-sdr.h



NEW: comms/gnuradio

2016-09-09 Thread Aaron Poffenberger
Hello ports@,

Here is a new port : comms/gnuradio

Tested on: amd64.

>From DESCR:

GNU Radio is a software development toolkit that provides signal processing
blocks to implement software radios. It can be used with readily-available
low-cost external RF hardware to create software-defined radios, or
without hardware in a simulation-like environment. It is widely used in
hobbyist, academic and commercial environments to support both wireless
communications research and real-world radio systems.



This port is based on commits to openbsd-wip by sthen@, bentley@ and
Aaron Bieber.

I've updated the port to the latest from gnuradio (3.7.10.1).

This port of gnuradio is first in a series of ports and updates to get
the key SDR projects working on OpenBSD. I have an update for rtl-sdr
I'll send shortly. gr-osmosdr is almost ready. I'll follow that with
gqrx.

If anyone is already working on those, please let me know.

N.B., SDR on OpenBSD may require more work to be fully functional.
sthen@ pointed out to me that our libusb doesn't support async yet.
Still, having the software and drivers available may help in that
regard.

Cheers,
Aaron


gnuradio-3.7.10.1.tgz
Description: application/tar-gz


Re: NEW: comms/gnuradio

2016-09-13 Thread Aaron Poffenberger
Has anyone tried this? Any feedback?

--Aaron

* Aaron Poffenberger <a...@hypernote.com> [2016-09-09 09:53:10 -0500]:

> Hello ports@,
> 
> Here is a new port : comms/gnuradio
> 
> Tested on: amd64.
> 
> From DESCR:
> 
> GNU Radio is a software development toolkit that provides signal processing
> blocks to implement software radios. It can be used with readily-available
> low-cost external RF hardware to create software-defined radios, or
> without hardware in a simulation-like environment. It is widely used in
> hobbyist, academic and commercial environments to support both wireless
> communications research and real-world radio systems.
> 
> 
> 
> This port is based on commits to openbsd-wip by sthen@, bentley@ and
> Aaron Bieber.
> 
> I've updated the port to the latest from gnuradio (3.7.10.1).
> 
> This port of gnuradio is first in a series of ports and updates to get
> the key SDR projects working on OpenBSD. I have an update for rtl-sdr
> I'll send shortly. gr-osmosdr is almost ready. I'll follow that with
> gqrx.
> 
> If anyone is already working on those, please let me know.
> 
> N.B., SDR on OpenBSD may require more work to be fully functional.
> sthen@ pointed out to me that our libusb doesn't support async yet.
> Still, having the software and drivers available may help in that
> regard.
> 
> Cheers,
> Aaron




Re: NEW: comms/gnuradio

2016-09-20 Thread Aaron Poffenberger
Hi Stuart,

Fixed.

Crashing problem, not yet.

Cheers,

--Aaron

* Stuart Henderson  [2016-09-16 09:29:00 +0100]:

> On 2016/09/15 23:59, Anthony J. Bentley wrote:
> > From pkg/PLIST:
> > 
> > share/doc/${FULLPKGNAME}/
> > ...
> > 
> > FULLPKGNAME incorporates REVISION and EPOCH, so this will break as soon
> > as the package is bumped.
> 
> Please adjust the build to use a directory name without the version
> number, e.g. share/doc/gnuradio.
> 
> > Aside from that, something weird is going on:
> > 
> > $ gnuradio-companion
> > Warning: restarting the docstring loader (crashed while loading 
> > 'analog_agc2_xx')
> > RuntimeError('boost::filesystem::status: File name too long: 
> > "\xdf\xdf\xdf\xdf
> > \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> 
> When you see a bunch of 0xdf like this (also sometimes shows up as
> ß), it's often a use-after-free or code not zeroing newly malloc()ed
> memory.
> 



Re: NEW: comms/gnuradio

2016-09-20 Thread Aaron Poffenberger
Thanks for trying the port and the feedback.

It's very odd. I sometimes get this error. Sometimes I don't. It
appears to be happening in some of the SWIG integration between C++
and Python. I'm still sorting it out.

Cheers,

--Aaron

* Anthony J. Bentley <anth...@anjbe.name> [2016-09-15 23:59:56 -0600]:

> Aaron Poffenberger writes:
> > * Aaron Poffenberger <a...@hypernote.com> [2016-09-09 09:53:10 -0500]:
> > 
> > > Hello ports@,
> > > 
> > > Here is a new port : comms/gnuradio
> > > 
> > > Tested on: amd64.
> > > 
> > > From DESCR:
> > > 
> > > GNU Radio is a software development toolkit that provides signal 
> > > processing
> > > blocks to implement software radios. It can be used with readily-available
> > > low-cost external RF hardware to create software-defined radios, or
> > > without hardware in a simulation-like environment. It is widely used in
> > > hobbyist, academic and commercial environments to support both wireless
> > > communications research and real-world radio systems.
> 
> From pkg/PLIST:
> 
> share/doc/${FULLPKGNAME}/
> ...
> 
> FULLPKGNAME incorporates REVISION and EPOCH, so this will break as soon
> as the package is bumped.
> 
> 
> Aside from that, something weird is going on:
> 
> $ gnuradio-companion
> Warning: restarting the docstring loader (crashed while loading 
> 'analog_agc2_xx')
> RuntimeError('boost::filesystem::status: File name too long: "\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf\xdf
> \xdf\xdf\x18\x0f\xcf\xeb\xdb\x19/config.conf"',)
> 
> -- 
> Anthony J. Bentley
> 



UPDATE ports/plan9/plan9port MAP_STACK patch

2018-03-09 Thread Aaron Poffenberger
This patch updates libthread in plan9port to be MAP_STACK compliant,
replacing calls to malloc/free with mmap and munmap when allocating
thread stacks.

The most obvious effect  was sam(1), acme(1), and 9term(1) would
core when executed. All three run now with seemingly no issues.

There maybe other problems I haven't noticed yet.

--Aaron

Index: patches/patch-src_libthread_thread_c
===
RCS file: patches/patch-src_libthread_thread_c
diff -N patches/patch-src_libthread_thread_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_libthread_thread_c9 Mar 2018 22:14:13 -
@@ -0,0 +1,26 @@
+$OpenBSD$
+
+Index: src/libthread/thread.c
+--- src/libthread/thread.c.orig
 src/libthread/thread.c
+@@ -108,8 +108,9 @@ threadalloc(void (*fn)(void*), void *arg, uint stack)
+   ulong z;
+ 
+   /* allocate the task and stack together */
+-  t = malloc(sizeof *t+stack);
+-  if(t == nil)
++  t = mmap(0, sizeof *t+stack, PROT_READ|PROT_WRITE,
++  MAP_PRIVATE|MAP_ANON|MAP_STACK, -1, 0);
++  if(t == MAP_FAILED)
+   sysfatal("threadalloc malloc: %r");
+   memset(t, 0, sizeof *t);
+   t->stk = (uchar*)(t+1);
+@@ -364,7 +365,7 @@ procscheduler(Proc *p)
+   delthreadinproc(p, t);
+   p->nthread--;
+ /*print("nthread %d\n", p->nthread); */
+-  free(t);
++  munmap(t, t->stksize);
+   }
+   }
+ 
Index: patches/patch-src_libthread_threadimpl_h
===
RCS file: patches/patch-src_libthread_threadimpl_h
diff -N patches/patch-src_libthread_threadimpl_h
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_libthread_threadimpl_h9 Mar 2018 21:41:25 -
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/libthread/threadimpl.h
+--- src/libthread/threadimpl.h.orig
 src/libthread/threadimpl.h
+@@ -10,6 +10,8 @@
+ # define _XOPEN_SOURCE/* for Snow Leopard */
+ # endif
+ # include 
++#elif defined(__OpenBSD__)
++# include 
+ #endif
+ #include 
+ #include "libc.h"



Re: UPDATE ports/plan9/plan9port MAP_STACK patch

2018-03-10 Thread Aaron Poffenberger
* Gleydson Soares <gsoa...@gmail.com> [2018-03-10 13:45:08 -0300]:

> On Fri, Mar 09, 2018 at 06:42:25PM -0600, Aaron Poffenberger wrote:
> > This patch updates libthread in plan9port to be MAP_STACK compliant,
> > replacing calls to malloc/free with mmap and munmap when allocating
> > thread stacks.
> > 
> > The most obvious effect  was sam(1), acme(1), and 9term(1) would
> > core when executed. All three run now with seemingly no issues.
> > 
> > There maybe other problems I haven't noticed yet.
> 
> it's missing a revision bump, apart from that, your diff looks good for
> me. thanks for looking into this,

Looks like I implemented a memory leak. I meant to put sizeof *t, but
left it off.

Thanks to Bryan for pinging me on it.

Revised patch follows.

--Aaron

Index: Makefile
===
RCS file: /cvs/ports/plan9/plan9port/Makefile,v
retrieving revision 1.24
diff -u -p -r1.24 Makefile
--- Makefile20 Jan 2018 03:29:56 -  1.24
+++ Makefile10 Mar 2018 16:34:49 -
@@ -6,6 +6,7 @@ BROKEN-powerpc =threading issues
 COMMENT =  Plan 9 from user space
 
 DISTNAME = plan9port-20180117
+REVISION = 0
 
 GH_ACCOUNT =   9fans
 GH_PROJECT =   plan9port
Index: patches/patch-src_libthread_thread_c
===
RCS file: patches/patch-src_libthread_thread_c
diff -N patches/patch-src_libthread_thread_c
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_libthread_thread_c10 Mar 2018 16:34:49 -
@@ -0,0 +1,26 @@
+$OpenBSD$
+
+Index: src/libthread/thread.c
+--- src/libthread/thread.c.orig
 src/libthread/thread.c
+@@ -108,8 +108,9 @@ threadalloc(void (*fn)(void*), void *arg, uint stack)
+   ulong z;
+ 
+   /* allocate the task and stack together */
+-  t = malloc(sizeof *t+stack);
+-  if(t == nil)
++  t = mmap(0, sizeof *t+stack, PROT_READ|PROT_WRITE,
++  MAP_PRIVATE|MAP_ANON|MAP_STACK, -1, 0);
++  if(t == MAP_FAILED)
+   sysfatal("threadalloc malloc: %r");
+   memset(t, 0, sizeof *t);
+   t->stk = (uchar*)(t+1);
+@@ -364,7 +365,7 @@ procscheduler(Proc *p)
+   delthreadinproc(p, t);
+   p->nthread--;
+ /*print("nthread %d\n", p->nthread); */
+-  free(t);
++  munmap(t, sizeof *t+t->stksize);
+   }
+   }
+ 
Index: patches/patch-src_libthread_threadimpl_h
===
RCS file: patches/patch-src_libthread_threadimpl_h
diff -N patches/patch-src_libthread_threadimpl_h
--- /dev/null   1 Jan 1970 00:00:00 -
+++ patches/patch-src_libthread_threadimpl_h10 Mar 2018 16:34:49 -
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: src/libthread/threadimpl.h
+--- src/libthread/threadimpl.h.orig
 src/libthread/threadimpl.h
+@@ -10,6 +10,8 @@
+ # define _XOPEN_SOURCE/* for Snow Leopard */
+ # endif
+ # include 
++#elif defined(__OpenBSD__)
++# include 
+ #endif
+ #include 
+ #include "libc.h"


Re: UPDATE www/kcaldav

2018-04-06 Thread Aaron Poffenberger
On 2018/04/06 06:44, Stuart Henderson wrote:
> On 2018/04/06 10:42, Stefan Sperling wrote:
>> 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
> 
> There's a static library though, it should probably find it if the right
> -L path is used.

Sorry about that. The replacement patch below fixes the issue.

It also fixes a small issue I reported to upstream.

--Aaron

Index: Makefile
===
RCS file: /cvs/ports/www/kcaldav/Makefile,v
retrieving revision 1.9
diff -u -p -u -r1.9 Makefile
--- Makefile25 Jan 2018 14:04:18 -  1.9
+++ Makefile6 Apr 2018 16:39:43 -
@@ -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,13 @@ 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
+CONFIGURE_ARGS =   CPPFLAGS="-I${LOCALBASE}/include" \
+   LDFLAGS="-L${LOCALBASE}/lib"
+
+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
--- distinfo20 Apr 2016 15:12:18 -  1.2
+++ distinfo6 Apr 2018 02:24:53 -
@@ -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 -  1.3
+++ patches/patch-Makefile  6 Apr 2018 19:10:42 -
@@ -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

UPDATE www/kcaldav

2018-04-06 Thread Aaron Poffenberger
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

Index: Makefile
===
RCS file: /cvs/ports/www/kcaldav/Makefile,v
retrieving revision 1.9
diff -u -p -u -r1.9 Makefile
--- Makefile25 Jan 2018 14:04:18 -  1.9
+++ Makefile6 Apr 2018 05:00:14 -
@@ -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
--- distinfo20 Apr 2016 15:12:18 -  1.2
+++ distinfo6 Apr 2018 02:24:53 -
@@ -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 -  1.3
+++ patches/patch-Makefile  6 Apr 2018 04:58:17 -
@@ -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/vhos

update: www/kcaldav to 0.1.15

2020-10-07 Thread Aaron Poffenberger
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
--- Makefile1 Feb 2020 20:44:16 -   1.17
+++ Makefile6 Oct 2020 22:03:04 -
@@ -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 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
--- distinfo17 Nov 2019 09:28:23 -  1.6
+++ distinfo6 Oct 2020 22:39:25 -
@@ -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 -   1.6
+++ patches/patch-Makefile  6 Oct 2020 22:00:54 -
@@ -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 -   1.5
+++ pkg/PLIST   4 Oct 2020 02:27:21 -
@@ -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 -   1.5
+++ pkg/README  7 Oct 2020 01:44:39 -
@@ -8,9 +8,9 @@ Administrator Quick Start
 =
   Create users by running:
 
-doas kcaldav.passwd -C -u  -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  -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 

Re: update: www/kcaldav to 0.1.15

2020-10-07 Thread Aaron Poffenberger
Corrections to the Makefile. Full diff for port included below.

Failed to mention in the original email that upstream improved testing so I
added the TEST_TARGET to the Makefile as well.

--Aaron

On 2020-07-10 10:02 -0500, Aaron Poffenberger  wrote:
> This updates kcaldav to 0.1.15.
> 
> I also updated the README with additional details about calendar URLs,
> and notes about building logging versions.
> 
> (Re-posting due to DMARC mangling.)
> 
> --Aaron
> 

Index: Makefile
===
RCS file: /cvs/ports/www/kcaldav/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile1 Feb 2020 20:44:16 -   1.17
+++ Makefile7 Oct 2020 14:56:42 -
@@ -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 https://kristaps.bsd.lv/kcaldav/snapshots/
 EXTRACT_SUFX = .tgz
@@ -21,21 +20,19 @@ 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
+USE_GMAKE =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
Index: distinfo
===
RCS file: /cvs/ports/www/kcaldav/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo17 Nov 2019 09:28:23 -  1.6
+++ distinfo6 Oct 2020 22:39:25 -
@@ -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 -   1.6
+++ patches/patch-Makefile  6 Oct 2020 22:00:54 -
@@ -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 -   1.5
+++ pkg/PLIST   4 Oct 2020 02:27:21 -
@@ -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 -   1.5
+++ pkg/README  7 Oct 2020 14:59:13 -
@@ -8,9 +8,9 @@ Administrator Quick Start
 =
   Create users by running:
 

update: www/kcaldav to 0.1.15

2020-10-07 Thread Aaron Poffenberger
This updates kcaldav to 0.1.15.

I also updated the README with additional details about calendar URLs,
and notes about building logging versions.

(Re-posting due to DMARC mangling.)

--Aaron

Index: Makefile
===
RCS file: /cvs/ports/www/kcaldav/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile1 Feb 2020 20:44:16 -   1.17
+++ Makefile7 Oct 2020 14:56:42 -
@@ -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 https://kristaps.bsd.lv/kcaldav/snapshots/
 EXTRACT_SUFX = .tgz
@@ -21,21 +20,19 @@ 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
+USE_GMAKE =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
Index: distinfo
===
RCS file: /cvs/ports/www/kcaldav/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo17 Nov 2019 09:28:23 -  1.6
+++ distinfo6 Oct 2020 22:39:25 -
@@ -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 -   1.6
+++ patches/patch-Makefile  6 Oct 2020 22:00:54 -
@@ -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 -   1.5
+++ pkg/PLIST   4 Oct 2020 02:27:21 -
@@ -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 -   1.5
+++ pkg/README  7 Oct 2020 14:59:13 -
@@ -8,9 +8,9 @@ Administrator Quick Start
 =
   Create users by running:
 
-doas kcaldav.passwd -C -u  -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  -e email -f /var/www/caldav
+$ doas chown www:www /var/www/caldav/kcaldav.db
+$ doas chmod 640 /var/ww

Re: update: www/kcaldav 0.2.0

2020-10-14 Thread Aaron Poffenberger
Attached is a revised version that removes USE_GMAKE.

--Aaron

On 2020-14-10 13:12 -0500, Aaron Poffenberger  wrote:
> Update kcaldav to 0.2.0.
> 
> In addition to bugfixes from upstream, I've cleaned up the port a bit and
> made the following changes:
> 
> - Update WANTLIB and switch to USE_GMAKE in Makefile
> - Create TEST target in Makefile
> - Clean-up code examples in README
> - Add details about calendar URLs in README
> - Enabled errror logging
> - Create /var/www/logs/kcaldav-system.log file
> 
> --Aaron
> 

Index: Makefile
===
RCS file: /cvs/ports/www/kcaldav/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile1 Feb 2020 20:44:16 -   1.17
+++ Makefile14 Oct 2020 19:34:19 -
@@ -2,8 +2,7 @@
 
 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 https://kristaps.bsd.lv/kcaldav/snapshots/
 EXTRACT_SUFX = .tgz
@@ -21,23 +20,23 @@ 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
+   mkdir -p ${WRKINST}${VARBASE}/www/logs/
+   touch ${WRKINST}${VARBASE}/www/logs/kcaldav-system.log
+   chown www:www ${WRKINST}${VARBASE}/www/logs/kcaldav-system.log
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/www/kcaldav/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo17 Nov 2019 09:28:23 -  1.6
+++ distinfo14 Oct 2020 16:59:33 -
@@ -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
Index: patches/patch-kcaldav_sql
===
RCS file: /cvs/ports/www/kcaldav/patches/patch-kcaldav_sql,v
retrieving revision 1.2
diff -u -p -r1.2 patch-kcaldav_sql
--- patches/patch-kcaldav_sql   8 Apr 2018 08:29:22 -   1.2
+++ patches/patch-kcaldav_sql   14 Oct 2020 17:04:10 -
@@ -4,7 +4,7 @@ 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.
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 -   1.5
+++ pkg/PLIST   14 Oct 2020 18:00:50 -
@@ -3,7 +3,11 @@
 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,8 @@ 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
+@mode 775
+@owner www
+@group www
+logs/kcaldav-system.log
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 -   1.5
+++ pkg/README  14 Oct 2020 17:54:14 -
@@ -8,9 +8,9 @@ Administrator Quick Start
 =
   Create users by running:
 
-doas kcaldav.passwd -C -u  -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.p

Re: update: www/kcaldav 0.2.0

2020-10-14 Thread Aaron Poffenberger
Revisions based on feedback from Stuart:

- Revert logging (DEBUG=1 isn't useful for upstream anyhow)
- Revise README to make commands easier to copy/paste, and other fixes
- Add section on rebuilding with effective debugging levels and notes
  on creating the log file

--Aaron

On 2020-14-10 22:07 +0100, Stuart Henderson  wrote:
> On 2020/10/14 14:38, Aaron Poffenberger wrote:
> > +   chown www:www ${WRKINST}${VARBASE}/www/logs/kcaldav-system.log
> 
> chown is a noop here (builds are done as non-root)
> 
> or, seeing as users need to follow the pkg-readme for setup anyway,
> tell them to do it there.

Removed, commented in README.

> > +$ doas chmod 640 /var/www/caldav/kcaldav.db
> 
> pkg-readmes are mixed, but for something like this which is
> likely to be largely copy-and-pasted it's easier without the prefix

Fixed throughout.

> > +  Remember to enable and start slowcgi(8). See rcctl(8).
> 
> might as well show the rcctl commands?

Done

> > +
> >kcaldav.cgi uses http authentication for user security.
> >Install a tls certificate to ensure privacy of connection.
> > +  See ssl(8) for details.
> 
> "tls certificate" nitpicking that should X.509 certificate,
> and ssl(8) is not really helpful for the common case where somebody
> just uses a letsencrypt client - might be better to say something
> like this and leave it at that? needs more than just a certificate
> installing, and the exact details depends on the type of webserver.
> 
> kcaldav.cgi uses http authentication for user security.
> Make sure your web server is configured to use https to ensure
> privacy of connection.

Done

> >  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
> > +
> > +  The URL will look like:
> > +
> > +https://example.org:/cgi-bin/kcaldav//
> > +
> 
> stray : ?  probably breaks some client or other ;)

This one perplexed me also. The kcaldav user page has that syntax.
My client normalized the url to remove the colon, so I removed it 
from the example as well.

--Aaron


Index: Makefile
===
RCS file: /cvs/ports/www/kcaldav/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile1 Feb 2020 20:44:16 -   1.17
+++ Makefile14 Oct 2020 22:14:11 -
@@ -2,8 +2,7 @@
 
 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 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
Index: distinfo
===
RCS file: /cvs/ports/www/kcaldav/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo17 Nov 2019 09:28:23 -  1.6
+++ distinfo14 Oct 2020 16:59:33 -
@@ -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
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

update: www/kcaldav 0.2.0

2020-10-14 Thread Aaron Poffenberger
Update kcaldav to 0.2.0.

In addition to bugfixes from upstream, I've cleaned up the port a bit and
made the following changes:

- Update WANTLIB and switch to USE_GMAKE in Makefile
- Create TEST target in Makefile
- Clean-up code examples in README
- Add details about calendar URLs in README
- Enabled errror logging
- Create /var/www/logs/kcaldav-system.log file

--Aaron

Index: Makefile
===
RCS file: /cvs/ports/www/kcaldav/Makefile,v
retrieving revision 1.17
diff -u -p -r1.17 Makefile
--- Makefile1 Feb 2020 20:44:16 -   1.17
+++ Makefile14 Oct 2020 17:51:59 -
@@ -2,8 +2,7 @@
 
 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 https://kristaps.bsd.lv/kcaldav/snapshots/
 EXTRACT_SUFX = .tgz
@@ -21,23 +20,24 @@ 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
+USE_GMAKE =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
+   mkdir -p ${WRKINST}${VARBASE}/www/logs/
+   touch ${WRKINST}${VARBASE}/www/logs/kcaldav-system.log
+   chown www:www ${WRKINST}${VARBASE}/www/logs/kcaldav-system.log
 
 .include 
Index: distinfo
===
RCS file: /cvs/ports/www/kcaldav/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo17 Nov 2019 09:28:23 -  1.6
+++ distinfo14 Oct 2020 16:59:33 -
@@ -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
Index: patches/patch-kcaldav_sql
===
RCS file: /cvs/ports/www/kcaldav/patches/patch-kcaldav_sql,v
retrieving revision 1.2
diff -u -p -r1.2 patch-kcaldav_sql
--- patches/patch-kcaldav_sql   8 Apr 2018 08:29:22 -   1.2
+++ patches/patch-kcaldav_sql   14 Oct 2020 17:04:10 -
@@ -4,7 +4,7 @@ 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.
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 -   1.5
+++ pkg/PLIST   14 Oct 2020 18:00:50 -
@@ -3,7 +3,11 @@
 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,8 @@ 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
+@mode 775
+@owner www
+@group www
+logs/kcaldav-system.log
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 -   1.5
+++ pkg/README  14 Oct 2020 17:54:14 -
@@ -8,9 +8,9 @@ Administrator Quick Start
 =
   Create users by running:
 
-doas kcaldav.passwd -C -u  -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  -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.p

Re: SWORD project port status

2020-12-09 Thread Aaron Poffenberger
I recently started working on my SWORD port again. It's building quite
nicely. My plan was to look at Xiphos or BibleTime after that, but I'm not
in a big hurry for a GUI. If your initial work is making progress, I'm
happy to help test.

I'll post the updated SWORD port this weekend.

Cheers,

--Aaron

On 2020-12-09 14:33 -0800, Johnpaul Humphrey  wrote:
> Hi All,
> Reading through your mailing list archives, I see that two people
> submitted ports of the SWORD project, which is a Bible study framework
> that can be found at https://crosswire.org/sword/index.jsp
> Looking through your ports tree, I do not see misc/sword and looking
> through your mailling list, I do not see any mention of it's removal,
> so I can only conclude it was never added to begin with.
> 
> I have successfully built sword and bibletime on my computer, and am
> setting up a machine for porting software, so I would be willing to
> port them if no-one is actively doing so.
> 
> Therefore:
> Is anyone porting the SWORD project, BibleTime, or Xiphos?
> 
> -- 
> jth
> 



[NEW] misc/sword

2020-12-10 Thread Aaron Poffenberger
SWORD is a cli app from the CrossWire project for viewing Biblical
texts from the command line. It also includes the library used by GUI
apps.

Homepage:


portcheck and port-lib-depends-check: ok

Cheers,

--Aaron


sword-1.9.0.tgz
Description: application/tar-gz


Re: [NEW] misc/sword

2020-12-14 Thread Aaron Poffenberger
Hi Anthony,

Thanks for the feedback. I've attached the revised port. I made a
couple of changes:

- Two new patch files. Thanks to sthen@ for helping me track down the
  lines to fix SHARED_LIB versioning.

- I added more detail to pkg/README about ~/.sword.conf, modules, and
  the other cli utilities.

--Aaron

On 2020-12-14 03:04 -0700, Anthony J. Bentley  wrote:
> Hi Aaron,
> 
> Aaron Poffenberger writes:
> > SWORD is a cli app from the CrossWire project for viewing Biblical
> > texts from the command line. It also includes the library used by GUI
> > apps.
> 
> Thanks, good program to have in-tree. A few things need to be fixed:
> 
> - according to Makefile.template COMPILER should be
>   "base-clang ports-gcc base-gcc"
> - libsword.so needs to end in a version number (specifically
>   ${LIBsword_VERSION} which is 0.0). ditto for libsword-1.9.0.so
> - license comment should be "GPLv2 only"
> - AUTORECONF doesn't appear to be necessary
> - COMMENT should not end in a period
> - is -DU_USING_ICU_NAMESPACE=1 still needed? if not it should be removed,
>   if so it should have a comment explaining why it's there
> - remove NO_TEST, "make test" succeeds (even though it runs zero tests,
>   they may add more in the future)
> 
> And some not very important things, to make it look more like other ports:
> 
> - please reorder lines to match Makefile.template
> - don't indent WANTLIB, most people copy and paste port-lib-depends-check
>   output there
> - one LIB_DEPENDS per line, using = and backslashes instead of +=
> - switch homepage and master_sites to https
> 
> -- 
> Anthony J. Bentley
> 


sword-1.9.0.tgz
Description: application/tar-gz


Re: update: www/kcaldav 0.2.0

2020-11-12 Thread Aaron Poffenberger
Thanks for the fixes and commit.

On 2020-12-11 17:23 +, Stuart Henderson  wrote:
> On 2020/11/12 09:07, Aaron Poffenberger wrote:
> > Any further feedback, or is this ready for commit?
> 
> committed, I fixed these:
> 
> > > @@ -1,5 +1,6 @@
> > >  $OpenBSD: README,v 1.5 2018/09/04 12:46:24 espie Exp $
> > >  
> > > +
> 
> extra linefeed
> 
> ..
> > > +  Logging in kcaldav is controlled by the LOGFILE and DEBUG
> > > +  variables in the Makeile. 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 vebosity: 0 - 3, where 0
> 
> typos, Makeile/vebosity
> 
> and a patch needed cvs rm.
> 



Re: update: www/kcaldav 0.2.0

2020-11-12 Thread Aaron Poffenberger
Any further feedback, or is this ready for commit?

--Aaron

On 2020-14-10 19:35 -0500, Aaron Poffenberger  wrote:
> Revisions based on feedback from Stuart:
> 
> - Revert logging (DEBUG=1 isn't useful for upstream anyhow)
> - Revise README to make commands easier to copy/paste, and other fixes
> - Add section on rebuilding with effective debugging levels and notes
>   on creating the log file
> 
> --Aaron
> 
> On 2020-14-10 22:07 +0100, Stuart Henderson  wrote:
> > On 2020/10/14 14:38, Aaron Poffenberger wrote:
> > > + chown www:www ${WRKINST}${VARBASE}/www/logs/kcaldav-system.log
> > 
> > chown is a noop here (builds are done as non-root)
> > 
> > or, seeing as users need to follow the pkg-readme for setup anyway,
> > tell them to do it there.
> 
> Removed, commented in README.
> 
> > > +$ doas chmod 640 /var/www/caldav/kcaldav.db
> > 
> > pkg-readmes are mixed, but for something like this which is
> > likely to be largely copy-and-pasted it's easier without the prefix
> 
> Fixed throughout.
> 
> > > +  Remember to enable and start slowcgi(8). See rcctl(8).
> > 
> > might as well show the rcctl commands?
> 
> Done
> 
> > > +
> > >kcaldav.cgi uses http authentication for user security.
> > >Install a tls certificate to ensure privacy of connection.
> > > +  See ssl(8) for details.
> > 
> > "tls certificate" nitpicking that should X.509 certificate,
> > and ssl(8) is not really helpful for the common case where somebody
> > just uses a letsencrypt client - might be better to say something
> > like this and leave it at that? needs more than just a certificate
> > installing, and the exact details depends on the type of webserver.
> > 
> > kcaldav.cgi uses http authentication for user security.
> > Make sure your web server is configured to use https to ensure
> > privacy of connection.
> 
> Done
> 
> > >  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
> > > +
> > > +  The URL will look like:
> > > +
> > > +https://example.org:/cgi-bin/kcaldav//
> > > +
> > 
> > stray : ?  probably breaks some client or other ;)
> 
> This one perplexed me also. The kcaldav user page has that syntax.
> My client normalized the url to remove the colon, so I removed it 
> from the example as well.
> 
> --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 -   1.17
> +++ Makefile  14 Oct 2020 22:14:11 -
> @@ -2,8 +2,7 @@
>  
>  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   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
&

Re: [jtur...@openbsd.org: Re: CVS: cvs.openbsd.org: ports]

2018-04-05 Thread Aaron Poffenberger
I apologize for the delay. Kristaps refactored kcaldav to work with the latest
kcgi.

I'm updating the port. I'll post it shortly.

--Aaron

> - Forwarded message from James Turner  -
> 
> Date: Thu, 25 Jan 2018 09:00:27 -0500
> From: James Turner 
> To: Antoine Jacoutot 
> Cc: ports-changes@openbsd.org, a...@hypernode.com
> Subject: Re: CVS: cvs.openbsd.org: ports
> 
> On Thu, Jan 25, 2018 at 11:08:41AM +0100, Antoine Jacoutot wrote:
>> On Mon, Jan 22, 2018 at 09:58:29PM +, James Turner wrote:
>> > CVSROOT:   /cvs
>> > Module name:   ports
>> > Changes by:jtur...@cvs.openbsd.org 2018/01/22 14:58:29
>> > 
>> > Modified files:
>> >www/kcgi   : Makefile distinfo 
>> >www/kcgi/pkg   : PLIST 
>> > 
>> > Log message:
>> > Update kcgi to 0.10.0.
>> > 
>> > Lot's of improvements and fixes, many implemented or suggested by 
>> > schwarze@!
>> > 
>> > https://kristaps.bsd.lv/kcgi/archive.html
>> 
>> This broke www/kcaldav.
> 
> Yup, kcaldav is going to need to a refactor to work with the new changes
> from kcgi, I think we should mark this port as broken for now. Cc'd
> MAINTAINER to get his input.
> 
>> 
>> 
>> >>> Building on exopi-7 under www/kcaldav
>>   BDEPENDS = [www/kcgi;databases/sqlite3]
>>   DIST = [www/kcaldav:kcaldav-0.1.4.tgz]
>>   FULLPKGNAME = kcaldav-0.1.4p5
>>   RDEPENDS = [databases/sqlite3]
>> (Junk lock obtained for exopi-7 at 1516842912)
>> >>> Running depends in www/kcaldav at 1516842912
>>last junk was in devel/pylint,python3
>> /usr/sbin/pkg_add -aI -Dunsigned -Drepair kcgi-0.10.0 sqlite3-3.21.0
>> was: /usr/sbin/pkg_add -aI -Dunsigned -Drepair kcgi-0.10.0 sqlite3-3.21.0
>> /usr/sbin/pkg_add -aI -Dunsigned -Drepair kcgi-0.10.0 sqlite3-3.21.0
>> >>> Running show-prepare-results in www/kcaldav at 1516842915
>> ===> www/kcaldav
>> ===> kcaldav-0.1.4p5 depends on: kcgi-* -> kcgi-0.10.0
>> ===> kcaldav-0.1.4p5 depends on: sqlite3-* -> sqlite3-3.21.0
>> ===>  Verifying specs:  c expat m sqlite3
>> ===>  found c.92.3 expat.12.0 m.10.0 sqlite3.37.1
>> kcgi-0.10.0
>> sqlite3-3.21.0
>> (Junk lock released for exopi-7 at 1516842916)
>> distfiles size=72877
>> >>> Running build in www/kcaldav at 1516842916
>> ===> www/kcaldav
>> ===>  Checking files for kcaldav-0.1.4p5
>> `/exopi-cvs/ports/distfiles/kcaldav-0.1.4.tgz' is up to date.
>> >> (SHA256) kcaldav-0.1.4.tgz: OK
>> ===>  Extracting for kcaldav-0.1.4p5
>> ===>  Patching for kcaldav-0.1.4p5
>> ===>   Applying OpenBSD patch patch-Makefile
>> Hmm...  Looks like a unified diff to me...
>> The text leading up to this was:
>> --
>> |$OpenBSD: patch-Makefile,v 1.3 2017/08/24 06:05:27 ajacoutot Exp $
>> |--- Makefile.orig   Thu Mar  3 12:22:28 2016
>> |+++ MakefileTue Sep 20 09:41:08 2016
>> --
>> Patching file Makefile using Plan A...
>> Hunk #1 succeeded at 4.
>> Hunk #2 succeeded at 37.
>> Hunk #3 succeeded at 54.
>> Hunk #4 succeeded at 258.
>> done
>> ===>   Applying OpenBSD patch patch-delete_c
>> Hmm...  Looks like a unified diff to me...
>> The text leading up to this was:
>> --
>> |$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.cThu Oct 20 16:18:53 2016
>> --
>> Patching file delete.c using Plan A...
>> Hunk #1 succeeded at 19.
>> done
>> ===>   Applying OpenBSD patch patch-dynamic_c
>> Hmm...  Looks like a unified diff to me...
>> The text leading up to this was:
>> --
>> |$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
>> --
>> Patching file dynamic.c using Plan A...
>> Hunk #1 succeeded at 19.
>> done
>> ===>   Applying OpenBSD patch patch-get_c
>> Hmm...  Looks like a unified diff to me...
>> The text leading up to this was:
>> --
>> |$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
>> --
>> Patching file get.c using Plan A...
>> Hunk #1 succeeded at 20.
>> done
>> ===>   Applying OpenBSD patch patch-kcaldav_passwd_in_1
>> Hmm...  Looks like a unified diff to me...
>> The text leading up to this was:
>> --
>> |$OpenBSD: patch-kcaldav_passwd_in_1,v 1.1.1.1 2016/04/20 15:06:08 jturner 
>> Exp $
>> |--- kcaldav.passwd.in.1.origThu Apr 14 22:35:31 2016
>> |+++ kcaldav.passwd.in.1 Thu Apr 14 22:35:57 2016
>> --
>> Patching file kcaldav.passwd.in.1 using Plan A...
>> Hunk #1 succeeded at 125.
>> done
>> ===>   Applying OpenBSD patch patch-kcaldav_sql
>> Hmm...  Looks like a unified diff to me...
>> The text leading up to this was:
>> --
>>