tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CA bundle for cadaver/neon [PATCH]



On Thu, Oct 20, 2022 at 12:21:24PM +0100, Jonathan Perkin wrote:
> I would suggest using @PKG_SYSCONFDIR@/openssl/certs/ca-certificates.crt as
> we do in lang/go*.

I came to the following patch for neon/cadaver

--- www/neon/MESSAGE.orig
+++ www/neon/MESSAGE
@@ -0,0 +1,7 @@
+===========================================================================
+$NetBSD$
+
+neon will look for a trusted certificarte bundle at
+        ${SSLCERTS}/ca-certificates.crt
+
+===========================================================================
--- www/neon/Makefile.orig
+++ www/neon/Makefile
@@ -1,7 +1,8 @@
 # $NetBSD: Makefile,v 1.89 2022/09/18 11:47:54 wiz Exp $
 
 DISTNAME=	neon-0.32.4
+PKGREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	https://notroj.github.io/neon/
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
@@ -15,14 +16,28 @@
 USE_TOOLS+=		pkg-config msgfmt
 GNU_CONFIGURE=		yes
 CONFIGURE_ARGS+=	--enable-shared
 CONFIGURE_ARGS+=	--with-expat
+CONFIGURE_ARGS+=	--with-ca-bundle=${SSLCERTS:Q}/ca-certificates.crt
 
 PKGCONFIG_OVERRIDE=	neon.pc.in
 TEST_TARGET=		check
 #selftest needs perl
 USE_TOOLS+=		perl
 
+# Logic borrowed from security/mozilla-rootcerts
+CHECK_BUILTIN.openssl=	yes
+.include "../../security/openssl/builtin.mk"
+CHECK_BUILTIN.openssl=	no
+.if !empty(USE_BUILTIN.openssl:M[yY][eE][sS])
+SSLDIR=		/etc/openssl
+.else
+SSLDIR=		${PKG_SYSCONFDIR}/openssl
+.endif
+
+SSLCERTS=	${SSLDIR}/certs
+MESSAGE_SUBST+=		SSLCERTS=${SSLCERTS:Q}
+
 .include "options.mk"
 
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../devel/zlib/buildlink3.mk"
--- www/cadaver/Makefile.orig
+++ www/cadaver/Makefile
@@ -1,8 +1,8 @@
 # $NetBSD: Makefile,v 1.57 2021/12/08 16:06:55 adam Exp $
 
 DISTNAME=		cadaver-0.23.3
-PKGREVISION=		10
+PKGREVISION=		11
 CATEGORIES=		www
 MASTER_SITES=		http://www.webdav.org/cadaver/
 
 MAINTAINER=		pkgsrc-users%NetBSD.org@localhost
@@ -23,5 +23,6 @@
 .include "../../mk/readline.buildlink3.mk"
 .include "../../textproc/expat/buildlink3.mk"
 .include "../../devel/gettext-lib/buildlink3.mk"
 .include "../../security/gnutls/buildlink3.mk"
+.include "../../www/neon/buildlink3.mk"
 .include "../../mk/bsd.pkg.mk"
-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index