From 585c90a43ebf61f6018fa70ddf31668c2adaa570 Mon Sep 17 00:00:00 2001 From: Klara Modin Date: Mon, 4 Mar 2024 00:28:30 +0100 Subject: [PATCH 1/2] nss-pam-ldapd: build libnss_ldap.so for musl Use patch from gentoo for missing define in netdb.h. Disable lookup_netgroup test for musl which fails otherwise. --- .../nss-pam-ldapd-0.9.12-netdb-defines.patch | 26 +++++++++++++++++++ srcpkgs/nss-pam-ldapd/template | 9 +++++-- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 srcpkgs/nss-pam-ldapd/patches/nss-pam-ldapd-0.9.12-netdb-defines.patch diff --git a/srcpkgs/nss-pam-ldapd/patches/nss-pam-ldapd-0.9.12-netdb-defines.patch b/srcpkgs/nss-pam-ldapd/patches/nss-pam-ldapd-0.9.12-netdb-defines.patch new file mode 100644 index 00000000000000..1b43686c28e73e --- /dev/null +++ b/srcpkgs/nss-pam-ldapd/patches/nss-pam-ldapd-0.9.12-netdb-defines.patch @@ -0,0 +1,26 @@ +Bug: https://bugs.gentoo.org/716272 + +--- a/nss/hosts.c ++++ b/nss/hosts.c +@@ -49,6 +49,9 @@ + *h_errnop = NO_RECOVERY; \ + return NSS_STATUS_UNAVAIL; + ++#ifndef NETDB_INTERNAL ++#define NETDB_INTERNAL -1 ++#endif + #undef ERROR_OUT_BUFERROR + #define ERROR_OUT_BUFERROR(fp) \ + *errnop = ERANGE; \ +--- a/nss/networks.c ++++ b/nss/networks.c +@@ -49,6 +49,9 @@ + *h_errnop = NO_RECOVERY; \ + return NSS_STATUS_UNAVAIL; + ++#ifndef NETDB_INTERNAL ++#define NETDB_INTERNAL -1 ++#endif + #undef ERROR_OUT_BUFERROR + #define ERROR_OUT_BUFERROR(fp) \ + *errnop = ERANGE; \ diff --git a/srcpkgs/nss-pam-ldapd/template b/srcpkgs/nss-pam-ldapd/template index 2b3a35ae85a334..83944593610ef4 100644 --- a/srcpkgs/nss-pam-ldapd/template +++ b/srcpkgs/nss-pam-ldapd/template @@ -1,7 +1,7 @@ # Template file for 'nss-pam-ldapd' pkgname=nss-pam-ldapd version=0.9.12 -revision=2 +revision=3 build_style=gnu-configure configure_args="--enable-sasl --enable-kerberos --with-pam-seclib-dir=/usr/lib/security/" conf_files="/etc/nslcd.conf" @@ -16,10 +16,15 @@ checksum=829b2371be42c040108165d2ea422eb6f6cacba6a01083f67025752a574a685b system_accounts="nslcd" case "$XBPS_TARGET_MACHINE" in - *musl) configure_args+=" --disable-nss";; + *musl) makedepends+=" musl-nscd-devel" ;; esac pre_configure() { + case "$XBPS_TARGET_MACHINE" in + *musl) + vsed -i 's/ lookup_netgroup / /' tests/Makefile.am + ;; + esac ./autogen.sh } From d7ce3eb674c0df6deaf430206da6a9e0e5a62a1b Mon Sep 17 00:00:00 2001 From: Klara Modin Date: Mon, 4 Mar 2024 00:34:35 +0100 Subject: [PATCH 2/2] musl-nscd: remove -F option in run file, not recognized --- srcpkgs/musl-nscd/files/nscd/run | 2 +- srcpkgs/musl-nscd/template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/srcpkgs/musl-nscd/files/nscd/run b/srcpkgs/musl-nscd/files/nscd/run index 53127524af2b10..f1a5684daeb3fd 100755 --- a/srcpkgs/musl-nscd/files/nscd/run +++ b/srcpkgs/musl-nscd/files/nscd/run @@ -2,4 +2,4 @@ exec 2>&1 [ -r conf ] && . ./conf mkdir -p /var/run/nscd /var/db/nscd -exec nscd -F ${OPTS} >/dev/null +exec nscd ${OPTS} >/dev/null diff --git a/srcpkgs/musl-nscd/template b/srcpkgs/musl-nscd/template index 39a66105b222b2..f3bcbf9a8ac88d 100644 --- a/srcpkgs/musl-nscd/template +++ b/srcpkgs/musl-nscd/template @@ -1,7 +1,7 @@ # Template file for 'musl-nscd' pkgname=musl-nscd version=1.1.1 -revision=1 +revision=2 archs="*-musl" build_style=gnu-configure hostmakedepends="bison flex"