Index | Thread | Search

From:
Sebastien Marie <semarie@kapouay.eu.org>
Subject:
Re: Update: PowerDNS Recursor 5.0.1
To:
Otto Moerbeek <otto@drijf.net>, ports@openbsd.org
Date:
Wed, 10 Jan 2024 12:00:08 +0100

Download raw body.

Thread
Otto Moerbeek <otto@drijf.net> writes:

> Hi,
>
> this is a somewhat large update as PowerDNS Recursor 5 uses Rust code
> (in addition to C++)
>
> So I would like some extra eyes and OK.

just few small nits:
- removing of patches/patch-mtasker_fcontext_cc is missing from your
  diff (but I assume it is present in your tree).

- you want to add MAKE_ENV+= ${MODCARGO_ENV}
  to have several options properly passed to underline cargo (mainly
  make cargo to respect MAKE_JOBS).

- you want to specify MODCARGO_TARGET_DIR=   ${WRKSRC}/settings/rust/target
  as the default value for the port (passed via MODCARGO_ENV) makes the
  build to fail: settings/rust/Makefile expect the target directory
  to be at a know place (so set the target directory to it).

Diff of that below.

else, I am fine with it. ok semarie@

Thanks.
-- 
Sebastien Marie


diff /data/semarie/repos/openbsd/ports
commit - 3717ead760d2f470ed61b94fb9be46e8d9067f38
path + /data/semarie/repos/openbsd/ports
blob - 94553e4d9b9e123b32a832c030c6108690bc40d3
file + net/powerdns_recursor/Makefile
--- net/powerdns_recursor/Makefile
+++ net/powerdns_recursor/Makefile
@@ -1,8 +1,8 @@
 COMMENT=		recursive nameserver
 
-V=			4.9.2
+V=			5.0.1
 DISTNAME=		pdns-recursor-${V}
-EXTRACT_SUFX =		.tar.bz2
+EXTRACT_SUFX=		.tar.bz2
 PKGNAME=		powerdns-recursor-${V}
 
 CATEGORIES=		net
@@ -29,6 +29,13 @@ LIB_DEPENDS=		devel/boost \
 			net/libfstrm \
 			security/libsodium
 
+MODULES+=		devel/cargo
+MODCARGO_CARGOTOML=	${WRKSRC}/settings/rust/Cargo.toml
+MODCARGO_TARGET_DIR=	${WRKSRC}/settings/rust/target
+MODCARGO_BUILD=		No
+MODCARGO_INSTALL=	No
+MODCARGO_TEST=		No
+
 MODULES+=		lang/lua
 MODLUA_VERSION=		5.3
 MODLUA_SA=		Yes
@@ -37,8 +44,8 @@ WANTLIB+=		${MODLUA_WANTLIB}
 
 SYSCONFDIR=		${BASESYSCONFDIR}/pdns
 
-CONFIGURE_STYLE=	autoreconf
-AUTOCONF_VERSION=	2.69
+CONFIGURE_STYLE=	cargo autoreconf
+AUTOCONF_VERSION=	2.71
 AUTOMAKE_VERSION=	1.16
 USE_GMAKE=		Yes
 
@@ -54,6 +61,8 @@ CONFIGURE_ARGS+=	--disable-hardening \
 CONFIGURE_ENV+=		CPPFLAGS="-I${LOCALBASE}/include" \
 			LDFLAGS="-L${LOCALBASE}/lib"
 
+MAKE_ENV+=		${MODCARGO_ENV}
+
 EXAMPLE_DIR=            ${PREFIX}/share/examples/pdns/
 
 post-install:
@@ -63,4 +72,6 @@ post-install:
 	${INSTALL_DATA} ${WRKSRC}/recursor.conf ${EXAMPLE_DIR}
 	rm ${WRKINST}${SYSCONFDIR}/recursor.conf-dist
 
+.include "crates.inc"
+
 .include <bsd.port.mk>