Fixing ldap tests
New version of openldap utils in Fedora require tests adjustments.
This commit is contained in:
parent
681b6a8aaa
commit
4e11043382
68
libuser-0.63-test-ldif-backend.patch
Normal file
68
libuser-0.63-test-ldif-backend.patch
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
From b854e3da65dbf264511579b93c0e001d9ef03371 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Halman <thalman@redhat.com>
|
||||||
|
Date: Wed, 23 Feb 2022 15:18:57 +0100
|
||||||
|
Subject: [PATCH] tests: fix ldap test for new Fedora
|
||||||
|
|
||||||
|
Openldap has changed in fedora and command line option -h is
|
||||||
|
no longer available in utilities like ldapadd. Solution here is
|
||||||
|
to switch to URI (-H)
|
||||||
|
|
||||||
|
Support for bdb backend is dropped, test are using mdb backend since
|
||||||
|
this update
|
||||||
|
---
|
||||||
|
tests/default_pw_test | 4 ++--
|
||||||
|
tests/ldap_test | 2 +-
|
||||||
|
tests/slapd.conf.in | 2 +-
|
||||||
|
3 files changed, 4 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/tests/default_pw_test b/tests/default_pw_test
|
||||||
|
index 733c85c..9c76b95 100755
|
||||||
|
--- a/tests/default_pw_test
|
||||||
|
+++ b/tests/default_pw_test
|
||||||
|
@@ -69,7 +69,7 @@ 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" \
|
||||||
|
+ ldapsearch -LLL -H ldap://127.0.0.1:$ldap_port -x -b 'dc=libuser' "$1" \
|
||||||
|
userPassword | sed -n 's/userPassword:: //p'
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -103,7 +103,7 @@ 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 \
|
||||||
|
+ ldapadd -H ldap://127.0.0.1:$ldap_port -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..c7ac377 100755
|
||||||
|
--- a/tests/ldap_test
|
||||||
|
+++ b/tests/ldap_test
|
||||||
|
@@ -56,7 +56,7 @@ 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 \
|
||||||
|
+ldapadd -H "ldap://127.0.0.1:$ldap_port" -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
|
||||||
|
--
|
||||||
|
2.35.1
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
Name: libuser
|
Name: libuser
|
||||||
Version: 0.63
|
Version: 0.63
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: https://pagure.io/libuser
|
URL: https://pagure.io/libuser
|
||||||
Source: https://releases.pagure.org/libuser/libuser-%{version}.tar.xz
|
Source: https://releases.pagure.org/libuser/libuser-%{version}.tar.xz
|
||||||
@ -30,6 +30,7 @@ Summary: A user and group account administration library
|
|||||||
|
|
||||||
Patch0: %{url}/pull-request/49.patch#/libuser-0.63-PR49_add_yescrypt.patch
|
Patch0: %{url}/pull-request/49.patch#/libuser-0.63-PR49_add_yescrypt.patch
|
||||||
Patch1: libuser-0.63-downstream_test_xcrypt.patch
|
Patch1: libuser-0.63-downstream_test_xcrypt.patch
|
||||||
|
Patch2: libuser-0.63-test-ldif-backend.patch
|
||||||
|
|
||||||
%global __provides_exclude_from ^(%{_libdir}/%{name}|%{python3_sitearch})/.*$
|
%global __provides_exclude_from ^(%{_libdir}/%{name}|%{python3_sitearch})/.*$
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user