Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] nss-pam-ldapd: build libnss_ldap.so.2 for musl
@ 2024-03-03 23:52 klarasm
  2024-03-04  0:21 ` [PR PATCH] [Updated] " klarasm
  2024-06-02  1:50 ` github-actions
  0 siblings, 2 replies; 3+ messages in thread
From: klarasm @ 2024-03-03 23:52 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 882 bytes --]

There is a new pull request by klarasm against master on the void-packages repository

https://github.com/klarasm/void-packages nss-pam-ldapd/musl
https://github.com/void-linux/void-packages/pull/49070

nss-pam-ldapd: build libnss_ldap.so.2 for musl
Don't disable nss in configure. Grab patch from Gentoo for defines missing in musl netdb.h
Also remove -F flag in runit script for musl-nscd as it's not recognized.

Tested against my ldap servers and can confirm that it fetches the data defined by nsswitch.conf.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64-musl)
- I built this PR locally for these architectures:
  - aarch64-musl
  - armv7l
  - armv6l-musl


A patch file from https://github.com/void-linux/void-packages/pull/49070.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-nss-pam-ldapd/musl-49070.patch --]
[-- Type: text/x-diff, Size: 3154 bytes --]

From acf35470c19c8326e6fc40e8b0d423a76b299a66 Mon Sep 17 00:00:00 2001
From: Klara Modin <klarasmodin@gmail.com>
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 <klarasmodin@gmail.com>
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-02  1:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-03 23:52 [PR PATCH] nss-pam-ldapd: build libnss_ldap.so.2 for musl klarasm
2024-03-04  0:21 ` [PR PATCH] [Updated] " klarasm
2024-06-02  1:50 ` github-actions

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).