!11 fix ldap test because openldap was upgraded to 2.6.0
Merge pull request !11 from panxh_purple/openEuler-22.03-LTS-Next
This commit is contained in:
commit
b966917f76
67
fix-ldap-test-because-openldap-was-upgraded.patch
Normal file
67
fix-ldap-test-because-openldap-was-upgraded.patch
Normal file
@ -0,0 +1,67 @@
|
||||
From 85bcf0efc3d3e6453f6e50da877dc7eb1a4d1ae1 Mon Sep 17 00:00:00 2001
|
||||
From: panxiaohe <panxiaohe@huawei.com>
|
||||
Date: Mon, 10 Jan 2022 13:17:22 +0800
|
||||
Subject: [PATCH] fix ldap test because openldap was upgraded to 2.6.0
|
||||
|
||||
The new version of openldap has removed deprecated -h and -p options
|
||||
to client tools. And it has deleted back-bdb, so this patch uses mdb.
|
||||
---
|
||||
tests/default_pw_test | 6 ++++--
|
||||
tests/ldap_test | 3 ++-
|
||||
tests/slapd.conf.in | 2 +-
|
||||
3 files changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tests/default_pw_test b/tests/default_pw_test
|
||||
index 733c85c..932dcb2 100755
|
||||
--- a/tests/default_pw_test
|
||||
+++ b/tests/default_pw_test
|
||||
@@ -69,7 +69,8 @@ get_file_password() # file under $workdir/files, entry name
|
||||
get_ldap_password() # entry filter
|
||||
{
|
||||
echo "Checking $1 ..." >&2
|
||||
- ldapsearch -LLL -h 127.0.0.1 -p "$ldap_port" -x -b 'dc=libuser' "$1" \
|
||||
+ URI="ldap://127.0.0.1:$ldap_port/"
|
||||
+ ldapsearch -LLL -H "$URI" -x -b 'dc=libuser' "$1" \
|
||||
userPassword | sed -n 's/userPassword:: //p'
|
||||
}
|
||||
|
||||
@@ -103,7 +104,8 @@ for modules in \
|
||||
tests/wait_for_slapd_start "$workdir"/slapd.pid "$ldap_port"
|
||||
slapd_pid=$(cat "$workdir"/slapd.pid)
|
||||
trap 'status=$?; kill $slapd_pid; rm -rf "$workdir"; exit $status' 0
|
||||
- ldapadd -h 127.0.0.1 -p "$ldap_port" -f "$srcdir/ldap_skel.ldif" -x \
|
||||
+ URI="ldap://127.0.0.1:$ldap_port/"
|
||||
+ ldapadd -H "$URI" -f "$srcdir/ldap_skel.ldif" -x \
|
||||
-D cn=Manager,dc=libuser -w password
|
||||
;;
|
||||
esac
|
||||
diff --git a/tests/ldap_test b/tests/ldap_test
|
||||
index 54609b1..de9308c 100755
|
||||
--- a/tests/ldap_test
|
||||
+++ b/tests/ldap_test
|
||||
@@ -56,7 +56,8 @@ slapd_pid=$(cat "$workdir"/slapd.pid)
|
||||
trap 'status=$?; kill $slapd_pid
|
||||
tests/wait_for_slapd_exit "$workdir"/slapd.pid "$ldap_port"
|
||||
rm -rf "$workdir"; exit $status' 0
|
||||
-ldapadd -h 127.0.0.1 -p "$ldap_port" -f "$srcdir/ldap_skel.ldif" -x \
|
||||
+URI="ldap://127.0.0.1:$ldap_port/"
|
||||
+ldapadd -H "$URI" -f "$srcdir/ldap_skel.ldif" -x \
|
||||
-D cn=Manager,dc=libuser -w password
|
||||
|
||||
|
||||
diff --git a/tests/slapd.conf.in b/tests/slapd.conf.in
|
||||
index 06ef10d..8e49a36 100644
|
||||
--- a/tests/slapd.conf.in
|
||||
+++ b/tests/slapd.conf.in
|
||||
@@ -10,7 +10,7 @@ pidfile @WORKDIR@/slapd.pid
|
||||
TLSCertificateFile @WORKDIR@/key.pem
|
||||
TLSCertificateKeyFile @WORKDIR@/key.pem
|
||||
|
||||
-database bdb
|
||||
+database mdb
|
||||
suffix "dc=libuser"
|
||||
rootdn "cn=Manager,dc=libuser"
|
||||
rootpw {SSHA}ABgelmLFZQ/OJzVEp3OM5MzWQ9rt3b4F
|
||||
--
|
||||
1.8.3.1
|
||||
|
||||
18
libuser.spec
18
libuser.spec
@ -1,13 +1,14 @@
|
||||
Name: libuser
|
||||
Version: 0.63
|
||||
Release: 1
|
||||
Release: 2
|
||||
Summary: A user and group account administration library
|
||||
License: LGPLv2+
|
||||
URL: https://pagure.io/libuser
|
||||
Source: http://releases.pagure.org/libuser/libuser-%{version}.tar.xz
|
||||
|
||||
Patch0: %{url}/pull-request/49.patch#/libuser-0.63-PR49_add_yescrypt.patch
|
||||
Patch0: libuser-0.63-PR49_add_yescrypt.patch
|
||||
Patch1: libuser-0.63-downstream_test_xcrypt.patch
|
||||
Patch2: fix-ldap-test-because-openldap-was-upgraded.patch
|
||||
|
||||
BuildRequires: cyrus-sasl-devel, nscd, linuxdoc-tools, pam-devel, popt-devel, gcc
|
||||
BuildRequires: libselinux-devel, openldap-devel, python3-devel, glib2-devel
|
||||
@ -46,9 +47,7 @@ Requires: man, info
|
||||
Man pages and other related documents for %{name}
|
||||
|
||||
%prep
|
||||
%setup -qn libuser-%{version}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%autosetup -n libuser-%{version} -p1
|
||||
|
||||
%build
|
||||
./autogen.sh
|
||||
@ -62,12 +61,12 @@ make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' || :
|
||||
%find_lang %{name}
|
||||
|
||||
%check
|
||||
LC_ALL=C.UTF-8 make -C python3 check \
|
||||
|| { cat python3/test-suite.log; false; }
|
||||
%make_build check || { cat test-suite.log; false; }
|
||||
|
||||
LD_LIBRARY_PATH=$RPM_BUILD_ROOT/%{_prefix}/%{_lib}:${LD_LIBRARY_PATH}
|
||||
export LD_LIBRARY_PATH
|
||||
cd $RPM_BUILD_ROOT/%{python3_sitearch}
|
||||
LC_ALL=C.UTF-8 python3 -c "import libuser"
|
||||
python3 -c "import libuser"
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
@ -103,6 +102,9 @@ LC_ALL=C.UTF-8 python3 -c "import libuser"
|
||||
%{_mandir}/man5/*
|
||||
|
||||
%changelog
|
||||
* Mon Jan 10 2022 panxiaohe <panxiaohe@huawei.com> - 0.63-2
|
||||
- fix ldap test because openldap was upgraded to 2.6.0
|
||||
|
||||
* Sat Nov 27 2021 fuanan <fuanan3@huawei.com> - 0.63-1
|
||||
- update version to 0.63
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user