[packages/nss_ldapd] Rel 3; fix build
arekm
arekm at pld-linux.org
Mon Nov 24 19:14:38 CET 2025
commit 9ce3eab56f90365f506c6de69accfeb09add1a7d
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Mon Nov 24 19:14:34 2025 +0100
Rel 3; fix build
build.patch | 38 ++++++++++++++++
nss_ldapd.spec | 5 ++-
optimize-queries.patch | 119 +++++++++++++++++++++++++------------------------
3 files changed, 102 insertions(+), 60 deletions(-)
---
diff --git a/nss_ldapd.spec b/nss_ldapd.spec
index 1c551af..4aa0995 100644
--- a/nss_ldapd.spec
+++ b/nss_ldapd.spec
@@ -7,7 +7,7 @@ Summary(pl.UTF-8): Moduł NSS LDAP
Summary(pt_BR.UTF-8): Biblioteca NSS para LDAP
Name: nss_ldapd
Version: 0.9.4
-Release: 2
+Release: 3
License: LGPL v2.1+
Group: Base
Source0: http://arthurdejong.org/nss-pam-ldapd/nss-pam-ldapd-%{version}.tar.gz
@@ -20,6 +20,7 @@ Patch1: optimize-queries.patch
Patch2: ntohl-signedness.patch
Patch3: fix-to_date.patch
Patch4: shadowExpire-from-AD.patch
+Patch5: build.patch
URL: http://arthurdejong.org/nss-pam-ldapd/
BuildRequires: autoconf >= 2.61
BuildRequires: automake
@@ -106,11 +107,13 @@ zmianę haseł i obsługę sesji.
# patched upstream
#patch3 -p1
%patch -P4 -p1
+%patch -P5 -p1
%{__sed} -i -e '1s|#!.*|#!%{__python}|' utils/*.py
%build
%configure \
+ CFLAGS="%{rpmcflags} -std=gnu17" \
DOCBOOK2X_MAN=/usr/bin/docbook2X2man \
--with-pam-seclib-dir=/%{_lib}/security \
--with-ldap-lib=openldap
diff --git a/build.patch b/build.patch
new file mode 100644
index 0000000..6e7f0b3
--- /dev/null
+++ b/build.patch
@@ -0,0 +1,38 @@
+--- nss-pam-ldapd-0.9.4/py-compile~ 2014-06-06 20:28:31.000000000 +0200
++++ nss-pam-ldapd-0.9.4/py-compile 2025-11-24 19:13:14.043244411 +0100
+@@ -116,7 +116,7 @@ else
+ fi
+
+ $PYTHON -c "
+-import sys, os, py_compile, imp
++import sys, os, py_compile
+
+ files = '''$files'''
+
+@@ -129,7 +129,7 @@ for file in files.split():
+ continue
+ sys.stdout.write(file)
+ sys.stdout.flush()
+- if hasattr(imp, 'get_tag'):
++ if 0 and hasattr(imp, 'get_tag'):
+ py_compile.compile(filepath, imp.cache_from_source(filepath), path)
+ else:
+ py_compile.compile(filepath, filepath + 'c', path)
+@@ -137,7 +137,7 @@ sys.stdout.write('\n')" || exit $?
+
+ # this will fail for python < 1.5, but that doesn't matter ...
+ $PYTHON -O -c "
+-import sys, os, py_compile, imp
++import sys, os, py_compile
+
+ # pypy does not use .pyo optimization
+ if hasattr(sys, 'pypy_translation_info'):
+@@ -153,7 +153,7 @@ for file in files.split():
+ continue
+ sys.stdout.write(file)
+ sys.stdout.flush()
+- if hasattr(imp, 'get_tag'):
++ if 0 and hasattr(imp, 'get_tag'):
+ py_compile.compile(filepath, imp.cache_from_source(filepath, False), path)
+ else:
+ py_compile.compile(filepath, filepath + 'o', path)
diff --git a/optimize-queries.patch b/optimize-queries.patch
index e898fbc..ce3b969 100644
--- a/optimize-queries.patch
+++ b/optimize-queries.patch
@@ -1,9 +1,9 @@
-diff -ur nss-pam-ldapd-0.9.2/nslcd/alias.c nss-pam-ldapd-0.9.2-opt/nslcd/alias.c
---- nss-pam-ldapd-0.9.2/nslcd/alias.c 2013-05-15 22:55:33.000000000 +0200
-+++ nss-pam-ldapd-0.9.2-opt/nslcd/alias.c 2013-12-11 18:44:59.052879393 +0100
-@@ -69,8 +69,8 @@
- if (myldap_escape(name, safename, sizeof(safename)))
+diff -urNp -x '*.orig' nss-pam-ldapd-0.9.4.org/nslcd/alias.c nss-pam-ldapd-0.9.4/nslcd/alias.c
+--- nss-pam-ldapd-0.9.4.org/nslcd/alias.c 2014-06-06 17:28:40.000000000 +0200
++++ nss-pam-ldapd-0.9.4/nslcd/alias.c 2025-11-24 19:07:39.200021750 +0100
+@@ -72,8 +72,8 @@ static int mkfilter_alias_byname(const c
return -1;
+ }
/* build filter */
- return mysnprintf(buffer, buflen, "(&%s(%s=%s))",
- alias_filter, attmap_alias_cn, safename);
@@ -12,12 +12,12 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/alias.c nss-pam-ldapd-0.9.2-opt/nslcd/alias.c
}
void alias_init(void)
-diff -ur nss-pam-ldapd-0.9.2/nslcd/ether.c nss-pam-ldapd-0.9.2-opt/nslcd/ether.c
---- nss-pam-ldapd-0.9.2/nslcd/ether.c 2013-05-15 22:55:33.000000000 +0200
-+++ nss-pam-ldapd-0.9.2-opt/nslcd/ether.c 2013-12-11 18:46:05.330191524 +0100
-@@ -71,8 +71,8 @@
- if (myldap_escape(name, safename, sizeof(safename)))
+diff -urNp -x '*.orig' nss-pam-ldapd-0.9.4.org/nslcd/ether.c nss-pam-ldapd-0.9.4/nslcd/ether.c
+--- nss-pam-ldapd-0.9.4.org/nslcd/ether.c 2014-06-06 17:28:40.000000000 +0200
++++ nss-pam-ldapd-0.9.4/nslcd/ether.c 2025-11-24 19:07:39.200235492 +0100
+@@ -74,8 +74,8 @@ static int mkfilter_ether_byname(const c
return -1;
+ }
/* build filter */
- return mysnprintf(buffer, buflen, "(&%s(%s=%s))",
- ether_filter, attmap_ether_cn, safename);
@@ -26,7 +26,7 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/ether.c nss-pam-ldapd-0.9.2-opt/nslcd/ether.c
}
static int mkfilter_ether_byether(const char *addrstr,
-@@ -82,8 +82,8 @@
+@@ -85,8 +85,8 @@ static int mkfilter_ether_byether(const
representation (e.g. 1:0:e:...) and not with extra leading zeros
(e.g. 01:00:0e:...) */
/* there should be no characters that need escaping */
@@ -37,8 +37,9 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/ether.c nss-pam-ldapd-0.9.2-opt/nslcd/ether.c
}
void ether_init(void)
---- nss-pam-ldapd-0.9.4/nslcd/group.c.orig 2014-06-06 17:28:40.000000000 +0200
-+++ nss-pam-ldapd-0.9.4/nslcd/group.c 2014-07-11 13:30:43.245939236 +0200
+diff -urNp -x '*.orig' nss-pam-ldapd-0.9.4.org/nslcd/group.c nss-pam-ldapd-0.9.4/nslcd/group.c
+--- nss-pam-ldapd-0.9.4.org/nslcd/group.c 2014-06-06 17:28:40.000000000 +0200
++++ nss-pam-ldapd-0.9.4/nslcd/group.c 2025-11-24 19:07:39.200431833 +0100
@@ -112,19 +112,21 @@ static int mkfilter_group_bygid(gid_t gi
{
/* the given gid is a BUILTIN gid, the SID prefix is not the domain SID */
@@ -105,12 +106,12 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/ether.c nss-pam-ldapd-0.9.2-opt/nslcd/ether.c
}
void group_init(void)
-diff -ur nss-pam-ldapd-0.9.2/nslcd/host.c nss-pam-ldapd-0.9.2-opt/nslcd/host.c
---- nss-pam-ldapd-0.9.2/nslcd/host.c 2013-05-15 22:55:33.000000000 +0200
-+++ nss-pam-ldapd-0.9.2-opt/nslcd/host.c 2013-12-11 18:47:49.927877236 +0100
-@@ -71,8 +71,8 @@
- if (myldap_escape(name, safename, sizeof(safename)))
+diff -urNp -x '*.orig' nss-pam-ldapd-0.9.4.org/nslcd/host.c nss-pam-ldapd-0.9.4/nslcd/host.c
+--- nss-pam-ldapd-0.9.4.org/nslcd/host.c 2014-06-06 17:28:40.000000000 +0200
++++ nss-pam-ldapd-0.9.4/nslcd/host.c 2025-11-24 19:07:39.200616818 +0100
+@@ -74,8 +74,8 @@ static int mkfilter_host_byname(const ch
return -1;
+ }
/* build filter */
- return mysnprintf(buffer, buflen, "(&%s(%s=%s))",
- host_filter, attmap_host_cn, safename);
@@ -119,9 +120,9 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/host.c nss-pam-ldapd-0.9.2-opt/nslcd/host.c
}
static int mkfilter_host_byaddr(const char *addrstr,
-@@ -83,8 +83,8 @@
- if (myldap_escape(addrstr, safeaddr, sizeof(safeaddr)))
+@@ -89,8 +89,8 @@ static int mkfilter_host_byaddr(const ch
return -1;
+ }
/* build filter */
- return mysnprintf(buffer, buflen, "(&%s(%s=%s))",
- host_filter, attmap_host_ipHostNumber, safeaddr);
@@ -130,12 +131,12 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/host.c nss-pam-ldapd-0.9.2-opt/nslcd/host.c
}
void host_init(void)
-diff -ur nss-pam-ldapd-0.9.2/nslcd/netgroup.c nss-pam-ldapd-0.9.2-opt/nslcd/netgroup.c
---- nss-pam-ldapd-0.9.2/nslcd/netgroup.c 2013-05-15 22:55:33.000000000 +0200
-+++ nss-pam-ldapd-0.9.2-opt/nslcd/netgroup.c 2013-12-11 18:48:15.074788966 +0100
-@@ -70,8 +70,8 @@
- if (myldap_escape(name, safename, sizeof(safename)))
+diff -urNp -x '*.orig' nss-pam-ldapd-0.9.4.org/nslcd/netgroup.c nss-pam-ldapd-0.9.4/nslcd/netgroup.c
+--- nss-pam-ldapd-0.9.4.org/nslcd/netgroup.c 2014-06-06 17:28:40.000000000 +0200
++++ nss-pam-ldapd-0.9.4/nslcd/netgroup.c 2025-11-24 19:07:39.200758671 +0100
+@@ -73,8 +73,8 @@ static int mkfilter_netgroup_byname(cons
return -1;
+ }
/* build filter */
- return mysnprintf(buffer, buflen, "(&%s(%s=%s))",
- netgroup_filter, attmap_netgroup_cn, safename);
@@ -144,12 +145,12 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/netgroup.c nss-pam-ldapd-0.9.2-opt/nslcd/netg
}
void netgroup_init(void)
-diff -ur nss-pam-ldapd-0.9.2/nslcd/network.c nss-pam-ldapd-0.9.2-opt/nslcd/network.c
---- nss-pam-ldapd-0.9.2/nslcd/network.c 2013-05-15 22:55:33.000000000 +0200
-+++ nss-pam-ldapd-0.9.2-opt/nslcd/network.c 2013-12-11 18:48:44.405074831 +0100
-@@ -70,8 +70,8 @@
- if (myldap_escape(name, safename, sizeof(safename)))
+diff -urNp -x '*.orig' nss-pam-ldapd-0.9.4.org/nslcd/network.c nss-pam-ldapd-0.9.4/nslcd/network.c
+--- nss-pam-ldapd-0.9.4.org/nslcd/network.c 2014-06-06 17:28:40.000000000 +0200
++++ nss-pam-ldapd-0.9.4/nslcd/network.c 2025-11-24 19:07:39.200912106 +0100
+@@ -73,8 +73,8 @@ static int mkfilter_network_byname(const
return -1;
+ }
/* build filter */
- return mysnprintf(buffer, buflen, "(&%s(%s=%s))",
- network_filter, attmap_network_cn, safename);
@@ -158,9 +159,9 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/network.c nss-pam-ldapd-0.9.2-opt/nslcd/netwo
}
static int mkfilter_network_byaddr(const char *addrstr,
-@@ -82,8 +82,8 @@
- if (myldap_escape(addrstr, safeaddr, sizeof(safeaddr)))
+@@ -88,8 +88,8 @@ static int mkfilter_network_byaddr(const
return -1;
+ }
/* build filter */
- return mysnprintf(buffer, buflen, "(&%s(%s=%s))",
- network_filter, attmap_network_ipNetworkNumber, safeaddr);
@@ -169,12 +170,12 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/network.c nss-pam-ldapd-0.9.2-opt/nslcd/netwo
}
void network_init(void)
-diff -ur nss-pam-ldapd-0.9.2/nslcd/passwd.c nss-pam-ldapd-0.9.2-opt/nslcd/passwd.c
---- nss-pam-ldapd-0.9.2/nslcd/passwd.c 2013-10-29 19:18:20.000000000 +0100
-+++ nss-pam-ldapd-0.9.2-opt/nslcd/passwd.c 2013-12-11 18:44:36.765995722 +0100
-@@ -92,8 +92,8 @@
- if (myldap_escape(name, safename, sizeof(safename)))
+diff -urNp -x '*.orig' nss-pam-ldapd-0.9.4.org/nslcd/passwd.c nss-pam-ldapd-0.9.4/nslcd/passwd.c
+--- nss-pam-ldapd-0.9.4.org/nslcd/passwd.c 2014-06-06 17:28:40.000000000 +0200
++++ nss-pam-ldapd-0.9.4/nslcd/passwd.c 2025-11-24 19:07:39.201084832 +0100
+@@ -95,8 +95,8 @@ static int mkfilter_passwd_byname(const
return -1;
+ }
/* build filter */
- return mysnprintf(buffer, buflen, "(&%s(%s=%s))",
- passwd_filter, attmap_passwd_uid, safename);
@@ -183,7 +184,7 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/passwd.c nss-pam-ldapd-0.9.2-opt/nslcd/passwd
}
/* create a search filter for searching a passwd entry
-@@ -102,15 +102,16 @@
+@@ -105,15 +105,16 @@ static int mkfilter_passwd_byuid(uid_t u
{
if (uidSid != NULL)
{
@@ -205,12 +206,12 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/passwd.c nss-pam-ldapd-0.9.2-opt/nslcd/passwd
}
}
-diff -ur nss-pam-ldapd-0.9.2/nslcd/protocol.c nss-pam-ldapd-0.9.2-opt/nslcd/protocol.c
---- nss-pam-ldapd-0.9.2/nslcd/protocol.c 2013-10-30 00:01:54.000000000 +0100
-+++ nss-pam-ldapd-0.9.2-opt/nslcd/protocol.c 2013-12-11 18:49:25.038804255 +0100
-@@ -70,8 +70,8 @@
- if (myldap_escape(name, safename, sizeof(safename)))
+diff -urNp -x '*.orig' nss-pam-ldapd-0.9.4.org/nslcd/protocol.c nss-pam-ldapd-0.9.4/nslcd/protocol.c
+--- nss-pam-ldapd-0.9.4.org/nslcd/protocol.c 2014-06-06 17:28:40.000000000 +0200
++++ nss-pam-ldapd-0.9.4/nslcd/protocol.c 2025-11-24 19:07:39.201270849 +0100
+@@ -73,8 +73,8 @@ static int mkfilter_protocol_byname(cons
return -1;
+ }
/* build filter */
- return mysnprintf(buffer, buflen, "(&%s(%s=%s))",
- protocol_filter, attmap_protocol_cn, safename);
@@ -219,7 +220,7 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/protocol.c nss-pam-ldapd-0.9.2-opt/nslcd/prot
}
/* create a search filter for searching a protocol entry
-@@ -79,8 +79,8 @@
+@@ -82,8 +82,8 @@ static int mkfilter_protocol_byname(cons
static int mkfilter_protocol_bynumber(int protocol,
char *buffer, size_t buflen)
{
@@ -230,12 +231,12 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/protocol.c nss-pam-ldapd-0.9.2-opt/nslcd/prot
}
void protocol_init(void)
-diff -ur nss-pam-ldapd-0.9.2/nslcd/rpc.c nss-pam-ldapd-0.9.2-opt/nslcd/rpc.c
---- nss-pam-ldapd-0.9.2/nslcd/rpc.c 2013-10-29 23:20:01.000000000 +0100
-+++ nss-pam-ldapd-0.9.2-opt/nslcd/rpc.c 2013-12-11 18:49:49.615710527 +0100
-@@ -71,14 +71,14 @@
- if (myldap_escape(name, safename, sizeof(safename)))
+diff -urNp -x '*.orig' nss-pam-ldapd-0.9.4.org/nslcd/rpc.c nss-pam-ldapd-0.9.4/nslcd/rpc.c
+--- nss-pam-ldapd-0.9.4.org/nslcd/rpc.c 2014-06-06 17:28:40.000000000 +0200
++++ nss-pam-ldapd-0.9.4/nslcd/rpc.c 2025-11-24 19:07:39.201406831 +0100
+@@ -74,14 +74,14 @@ static int mkfilter_rpc_byname(const cha
return -1;
+ }
/* build filter */
- return mysnprintf(buffer, buflen, "(&%s(%s=%s))",
- rpc_filter, attmap_rpc_cn, safename);
@@ -252,10 +253,10 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/rpc.c nss-pam-ldapd-0.9.2-opt/nslcd/rpc.c
}
void rpc_init(void)
-diff -ur nss-pam-ldapd-0.9.2/nslcd/service.c nss-pam-ldapd-0.9.2-opt/nslcd/service.c
---- nss-pam-ldapd-0.9.2/nslcd/service.c 2013-10-30 00:01:54.000000000 +0100
-+++ nss-pam-ldapd-0.9.2-opt/nslcd/service.c 2013-12-11 18:50:43.116232199 +0100
-@@ -77,13 +77,14 @@
+diff -urNp -x '*.orig' nss-pam-ldapd-0.9.4.org/nslcd/service.c nss-pam-ldapd-0.9.4/nslcd/service.c
+--- nss-pam-ldapd-0.9.4.org/nslcd/service.c 2014-06-06 17:28:40.000000000 +0200
++++ nss-pam-ldapd-0.9.4/nslcd/service.c 2025-11-24 19:07:39.201561957 +0100
+@@ -83,13 +83,14 @@ static int mkfilter_service_byname(const
log_log(LOG_ERR, "mkfilter_service_byname(): safeprotocol buffer too small");
return -1;
}
@@ -275,7 +276,7 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/service.c nss-pam-ldapd-0.9.2-opt/nslcd/servi
}
static int mkfilter_service_bynumber(int number, const char *protocol,
-@@ -94,13 +95,14 @@
+@@ -103,13 +104,14 @@ static int mkfilter_service_bynumber(int
log_log(LOG_ERR, "mkfilter_service_bynumber(): safeprotocol buffer too small");
return -1;
}
@@ -295,12 +296,12 @@ diff -ur nss-pam-ldapd-0.9.2/nslcd/service.c nss-pam-ldapd-0.9.2-opt/nslcd/servi
}
void service_init(void)
-diff -ur nss-pam-ldapd-0.9.2/nslcd/shadow.c nss-pam-ldapd-0.9.2-opt/nslcd/shadow.c
---- nss-pam-ldapd-0.9.2/nslcd/shadow.c 2013-10-06 16:59:04.000000000 +0200
-+++ nss-pam-ldapd-0.9.2-opt/nslcd/shadow.c 2013-12-11 18:51:00.719737206 +0100
-@@ -77,8 +77,8 @@
- if (myldap_escape(name, safename, sizeof(safename)))
+diff -urNp -x '*.orig' nss-pam-ldapd-0.9.4.org/nslcd/shadow.c nss-pam-ldapd-0.9.4/nslcd/shadow.c
+--- nss-pam-ldapd-0.9.4.org/nslcd/shadow.c 2014-06-06 17:28:40.000000000 +0200
++++ nss-pam-ldapd-0.9.4/nslcd/shadow.c 2025-11-24 19:07:39.201718743 +0100
+@@ -80,8 +80,8 @@ static int mkfilter_shadow_byname(const
return -1;
+ }
/* build filter */
- return mysnprintf(buffer, buflen, "(&%s(%s=%s))",
- shadow_filter, attmap_shadow_uid, safename);
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nss_ldapd.git/commitdiff/9ce3eab56f90365f506c6de69accfeb09add1a7d
More information about the pld-cvs-commit
mailing list