From acf35470c19c8326e6fc40e8b0d423a76b299a66 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 --- .../nss-pam-ldapd-0.9.12-netdb-defines.patch | 26 +++++++++++++++++++ srcpkgs/nss-pam-ldapd/template | 4 +-- 2 files changed, 28 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..61ae3f09daf4bb 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,7 +16,7 @@ checksum=829b2371be42c040108165d2ea422eb6f6cacba6a01083f67025752a574a685b system_accounts="nslcd" case "$XBPS_TARGET_MACHINE" in - *musl) configure_args+=" --disable-nss";; + *musl) makedepends+=" musl-nscd-devel" ;; esac pre_configure() { From f721ff188db23588410a46e79730ebfa72311427 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 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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