diff --git a/.fmf/version b/.fmf/version deleted file mode 100644 index d00491f..0000000 --- a/.fmf/version +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/.gitignore b/.gitignore index 50fa4b0..3feae2b 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,3 @@ /openldap-2.6.5.tgz /openldap-2.6.6.tgz /openldap-2.6.7.tgz -/openldap-2.6.8.tgz -/openldap-2.6.9.tgz -/openldap-2.6.10.tgz diff --git a/libexec-check-config.sh b/libexec-check-config.sh index 16f43ea..de6f3a8 100755 --- a/libexec-check-config.sh +++ b/libexec-check-config.sh @@ -52,6 +52,16 @@ function check_db_perms() return $retcode } +function check_major_upgrade() +{ + retcode=0 + if [ -f "/usr/share/openldap-servers/UPGRADE_INSTRUCTIONS" ]; then + error "You have upgraded your openldap-servers package. There are actions that need to be performed. Please, read the /usr/share/openldap-servers/UPGRADE_INSTRUCTIONS file" + retcode=1 + fi + return $retcode +} + function check_everything() { retcode=0 @@ -66,6 +76,8 @@ if [ `id -u` -ne 0 ]; then exit 4 fi +check_major_upgrade || return 1 + load_sysconfig if [ -n "$SLAPD_CONFIG_DIR" ]; then diff --git a/openldap-ITS-10297-Defer-hostname-resolution-til-first-use.patch b/openldap-ITS-10297-Defer-hostname-resolution-til-first-use.patch deleted file mode 100644 index 62f85f4..0000000 --- a/openldap-ITS-10297-Defer-hostname-resolution-til-first-use.patch +++ /dev/null @@ -1,120 +0,0 @@ -From 606349836109cfb201bc5b5b424dffb749150a68 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ond=C5=99ej=20Kuzn=C3=ADk?= -Date: Mon, 28 Apr 2025 14:36:24 +0100 -Subject: [PATCH] ITS#10297 Defer hostname resolution til first use - ---- - libraries/libldap/init.c | 33 +++++++++++++++++++-------------- - libraries/libldap/ldap-int.h | 1 + - libraries/libldap/os-ip.c | 2 ++ - libraries/libldap/tls_g.c | 3 +++ - libraries/libldap/tls_o.c | 3 +++ - 6 files changed, 28 insertions(+), 14 deletions(-) - -diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c -index 213276b4b5..90fc34c5a6 100644 ---- a/libraries/libldap/init.c -+++ b/libraries/libldap/init.c -@@ -631,6 +631,25 @@ void ldap_int_initialize_global_options( struct ldapoptions *gopts, int *dbglvl - - #if defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL) - char * ldap_int_hostname = NULL; -+ -+void -+ldap_int_resolve_hostname(void) -+{ -+ static int resolved = 0; -+ -+ LDAP_MUTEX_LOCK( &ldap_int_hostname_mutex ); -+ if ( !resolved ) { -+ char *name = ldap_int_hostname; -+ -+ ldap_int_hostname = ldap_pvt_get_fqdn( name ); -+ -+ if ( name != NULL && name != ldap_int_hostname ) { -+ LDAP_FREE( name ); -+ } -+ resolved = 1; -+ } -+ LDAP_MUTEX_UNLOCK( &ldap_int_hostname_mutex ); -+} - #endif - - #ifdef LDAP_R_COMPILE -@@ -688,20 +707,6 @@ void ldap_int_initialize( struct ldapoptions *gopts, int *dbglvl ) - } - #endif - --#if defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL) -- LDAP_MUTEX_LOCK( &ldap_int_hostname_mutex ); -- { -- char *name = ldap_int_hostname; -- -- ldap_int_hostname = ldap_pvt_get_fqdn( name ); -- -- if ( name != NULL && name != ldap_int_hostname ) { -- LDAP_FREE( name ); -- } -- } -- LDAP_MUTEX_UNLOCK( &ldap_int_hostname_mutex ); --#endif -- - #ifndef HAVE_POLL - if ( ldap_int_tblsize == 0 ) ldap_int_ip_init(); - #endif -diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h -index 7e754775e8..435b859066 100644 ---- a/libraries/libldap/ldap-int.h -+++ b/libraries/libldap/ldap-int.h -@@ -743,6 +743,7 @@ LDAP_F (int) ldap_int_poll( LDAP *ld, ber_socket_t s, - - #if defined(HAVE_TLS) || defined(HAVE_CYRUS_SASL) - LDAP_V (char *) ldap_int_hostname; -+LDAP_F (void) ldap_int_resolve_hostname(void); - LDAP_F (char *) ldap_host_connected_to( Sockbuf *sb, - const char *host ); - #endif -diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c -index 6c86edd055..629b540352 100644 ---- a/libraries/libldap/os-ip.c -+++ b/libraries/libldap/os-ip.c -@@ -890,6 +890,8 @@ ldap_host_connected_to( Sockbuf *sb, const char *host ) - * this is necessary for kerberos to work right, since the official - * hostname is used as the kerberos instance. - */ -+ if ( !ldap_int_hostname ) -+ ldap_int_resolve_hostname(); - - switch (sa->sa_family) { - #ifdef LDAP_PF_LOCAL -diff --git a/libraries/libldap/tls_g.c b/libraries/libldap/tls_g.c -index de5b7f7c84..d4e7ee0bf7 100644 ---- a/libraries/libldap/tls_g.c -+++ b/libraries/libldap/tls_g.c -@@ -597,6 +597,9 @@ tlsg_session_chkhost( LDAP *ld, tls_session *session, const char *name_in ) - int len1 = 0, len2 = 0; - int ntype = IS_DNS; - -+ if ( !ldap_int_hostname ) -+ ldap_int_resolve_hostname(); -+ - if( ldap_int_hostname && - ( !name_in || !strcasecmp( name_in, "localhost" ) ) ) - { -diff --git a/libraries/libldap/tls_o.c b/libraries/libldap/tls_o.c -index 71677847a9..155f685c99 100644 ---- a/libraries/libldap/tls_o.c -+++ b/libraries/libldap/tls_o.c -@@ -830,6 +830,9 @@ tlso_session_chkhost( LDAP *ld, tls_session *sess, const char *name_in ) - struct in_addr addr; - #endif - -+ if ( !ldap_int_hostname ) -+ ldap_int_resolve_hostname(); -+ - if( ldap_int_hostname && - ( !name_in || !strcasecmp( name_in, "localhost" ) ) ) - { --- -GitLab - diff --git a/openldap-libldap-avoid-SSL-context-cleanup-during-library-des.patch b/openldap-libldap-avoid-SSL-context-cleanup-during-library-des.patch deleted file mode 100644 index 3663f3f..0000000 --- a/openldap-libldap-avoid-SSL-context-cleanup-during-library-des.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 5f4569f0605a73eb1a282ee5251ead073ed3b26e Mon Sep 17 00:00:00 2001 -From: Simon Pichugin -Date: Tue, 26 Nov 2024 12:32:07 -0800 -Subject: [PATCH] libldap: avoid SSL context cleanup during library destruction - -Given that libldap can be pulled into random applications and applications -are allowed to call OPENSSL_cleanup() before exiting, the only sane thing -to do is to avoid trying to touch SSL context in ldap destructors, and just -let them leak if the application does not explicitly free the ldap context. - -Add ldap_int_tls_destroy_safe() which skips SSL context cleanup while -maintaining all other cleanup operations, and use it in the library -destructor path. - -Fixes: https://bugs.openldap.org/show_bug.cgi?id=9952 ---- - libraries/libldap/init.c | 2 +- - libraries/libldap/ldap-int.h | 1 + - libraries/libldap/tls2.c | 25 +++++++++++++++++++++---- - 3 files changed, 23 insertions(+), 5 deletions(-) - -diff --git a/libraries/libldap/init.c b/libraries/libldap/init.c -index 213276b4b5..aa017f4128 100644 ---- a/libraries/libldap/init.c -+++ b/libraries/libldap/init.c -@@ -545,7 +545,7 @@ ldap_int_destroy_global_options(void) - } - #endif - #ifdef HAVE_TLS -- ldap_int_tls_destroy( gopts ); -+ ldap_int_tls_destroy_safe( gopts ); - #endif - } - -diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h -index 7e754775e8..b73097ccc7 100644 ---- a/libraries/libldap/ldap-int.h -+++ b/libraries/libldap/ldap-int.h -@@ -914,6 +914,7 @@ LDAP_F (int) ldap_int_tls_start LDAP_P(( LDAP *ld, - LDAPConn *conn, LDAPURLDesc *srv )); - - LDAP_F (void) ldap_int_tls_destroy LDAP_P(( struct ldapoptions *lo )); -+LDAP_F (void) ldap_int_tls_destroy_safe LDAP_P(( struct ldapoptions *lo )); - - /* - * in getvalues.c -diff --git a/libraries/libldap/tls2.c b/libraries/libldap/tls2.c -index 0841005a59..82f8573602 100644 ---- a/libraries/libldap/tls2.c -+++ b/libraries/libldap/tls2.c -@@ -97,10 +97,14 @@ tls_ctx_ref( tls_ctx *ctx ) - static ldap_pvt_thread_mutex_t tls_def_ctx_mutex; - #endif - --void --ldap_int_tls_destroy( struct ldapoptions *lo ) --{ -- if ( lo->ldo_tls_ctx ) { -+/* -+ * Implementation function that handles all cleanup. -+ * skip_ctx_cleanup: 1 when called from destructor, 0 for normal operation -+ */ -+static void -+ldap_int_tls_destroy_impl( struct ldapoptions *lo, int skip_ctx_cleanup ) -+ { -+ if ( lo->ldo_tls_ctx && !skip_ctx_cleanup ) { - ldap_pvt_tls_ctx_free( lo->ldo_tls_ctx ); - lo->ldo_tls_ctx = NULL; - } -@@ -147,6 +151,19 @@ ldap_int_tls_destroy( struct ldapoptions *lo ) - BER_BVZERO( &lo->ldo_tls_pin ); - } - -+ -+void -+ldap_int_tls_destroy( struct ldapoptions *lo ) -+{ -+ ldap_int_tls_destroy_impl(lo, 0); -+} -+ -+/* Safe version for destructor use */ -+void ldap_int_tls_destroy_safe( struct ldapoptions *lo ) -+{ -+ ldap_int_tls_destroy_impl(lo, 1); -+} -+ - /* - * Tear down the TLS subsystem. Should only be called once. - */ --- -2.47.0 - diff --git a/openldap-manpages.patch b/openldap-manpages.patch index 2303570..df0d879 100644 --- a/openldap-manpages.patch +++ b/openldap-manpages.patch @@ -1,20 +1,35 @@ Various manual pages changes: * removes LIBEXECDIR from slapd.8 +* removes references to non-existing manpages (bz 624616) +diff --git a/doc/man/man1/ldapmodify.1 b/doc/man/man1/ldapmodify.1 +index 353b075..cf37856 100644 +--- a/doc/man/man1/ldapmodify.1 ++++ b/doc/man/man1/ldapmodify.1 +@@ -382,8 +382,7 @@ exit status and a diagnostic message being written to standard error. + .BR ldap_add_ext (3), + .BR ldap_delete_ext (3), + .BR ldap_modify_ext (3), +-.BR ldap_modrdn_ext (3), +-.BR ldif (5). ++.BR ldif (5) + .SH AUTHOR + The OpenLDAP Project + .SH ACKNOWLEDGEMENTS diff --git a/doc/man/man5/ldap.conf.5 b/doc/man/man5/ldap.conf.5 -index d47481d6ed..ff86fc52ca 100644 +index 17b7154..6084298 100644 --- a/doc/man/man5/ldap.conf.5 +++ b/doc/man/man5/ldap.conf.5 -@@ -341,6 +341,7 @@ be specified, separated by a semi-colon. The +@@ -338,6 +338,7 @@ certificates in separate individual files. The .B TLS_CACERT is always used before - .BR TLS_CACERTDIR . + .B TLS_CACERTDIR. +The specified directory must be managed with the OpenSSL c_rehash utility. .TP .B TLS_CERT Specifies the file that contains the client certificate. diff --git a/doc/man/man8/slapd.8 b/doc/man/man8/slapd.8 -index 807634e52d..a06110687b 100644 +index 8504b37..f02f1fa 100644 --- a/doc/man/man8/slapd.8 +++ b/doc/man/man8/slapd.8 @@ -5,7 +5,7 @@ @@ -26,16 +41,16 @@ index 807634e52d..a06110687b 100644 [\c .BR \-V [ V [ V ]] [\c -@@ -333,7 +333,7 @@ the LDAP databases defined in the default config file, just type: +@@ -332,7 +332,7 @@ the LDAP databases defined in the default config file, just type: .LP .nf .ft tt - LIBEXECDIR/slapd -+ slapd ++ slapd .ft .fi .LP -@@ -344,7 +344,7 @@ on voluminous debugging which will be printed on standard error, type: +@@ -343,7 +343,7 @@ on voluminous debugging which will be printed on standard error, type: .LP .nf .ft tt @@ -44,7 +59,7 @@ index 807634e52d..a06110687b 100644 .ft .fi .LP -@@ -352,7 +352,7 @@ To test whether the configuration file is correct or not, type: +@@ -351,7 +351,7 @@ To test whether the configuration file is correct or not, type: .LP .nf .ft tt diff --git a/openldap.spec b/openldap.spec index b8d3d66..2832cad 100644 --- a/openldap.spec +++ b/openldap.spec @@ -6,12 +6,6 @@ %global so_ver 2 %global so_ver_compat 2 -# Build openldap-servers package and its libslapi in openldap-devel and openldap-compat -%bcond servers 1 - -# Build with argon2 support -%bcond argon2 %{undefined rhel} - # When you change "Version: " to the new major version, remember to change this value too %global major_version 2.6 @@ -19,8 +13,8 @@ %global __brp_remove_la_files %nil Name: openldap -Version: 2.6.10 -Release: 6%{?dist} +Version: 2.6.7 +Release: 1%{?dist} Summary: LDAP support libraries License: OLDAP-2.8 URL: http://www.openldap.org/ @@ -30,6 +24,7 @@ Source1: slapd.service Source2: slapd.tmpfiles Source3: slapd.ldif Source4: ldap.conf +Source5: UPGRADE_INSTRUCTIONS Source6: openldap.sysusers Source10: https://github.com/ltb-project/openldap-ppolicy-check-password/archive/v%{check_password_version}/openldap-ppolicy-check-password-%{check_password_version}.tar.gz Source50: libexec-functions @@ -52,8 +47,8 @@ Patch6: openldap-switch-to-lt_dlopenadvise-to-get-RTLD_GLOBAL-set.patch # System-wide default for CA certs Patch7: openldap-openssl-manpage-defaultCA.patch Patch8: openldap-add-export-symbols-LDAP_CONNECTIONLESS.patch -Patch9: openldap-libldap-avoid-SSL-context-cleanup-during-library-des.patch -Patch10: openldap-ITS-10297-Defer-hostname-resolution-til-first-use.patch +Patch9: openldap-slapi-fix-plugin-plugin_pblock_new-usage.patch +Patch10: openldap-explicitly-cast-private-values.patch # check-password module specific patches Patch90: check-password-makefile.patch @@ -66,7 +61,6 @@ BuildRequires: groff BuildRequires: krb5-devel BuildRequires: libtool-ltdl-devel BuildRequires: libevent-devel -BuildRequires: libxcrypt-devel BuildRequires: make BuildRequires: openssl-devel BuildRequires: perl(ExtUtils::Embed) @@ -74,12 +68,6 @@ BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: unixODBC-devel -BuildRequires: cracklib-devel -BuildRequires: systemd -BuildRequires: systemd-rpm-macros -%if %{with argon2} -BuildRequires: libsodium-devel -%endif %description OpenLDAP is an open source suite of LDAP (Lightweight Directory Access @@ -111,35 +99,32 @@ Requires: openldap%{?_isa} = %{version}-%{release} Provides: libldap-2.4.so.%{so_ver_compat} Provides: libldap_r-2.4.so.%{so_ver_compat} Provides: liblber-2.4.so.%{so_ver_compat} -%if %{with servers} Provides: libslapi-2.4.so.%{so_ver_compat} -%endif %else Provides: libldap-2.4.so.%{so_ver_compat}()(%{__isa_bits}bit) Provides: libldap_r-2.4.so.%{so_ver_compat}()(%{__isa_bits}bit) Provides: liblber-2.4.so.%{so_ver_compat}()(%{__isa_bits}bit) -%if %{with servers} Provides: libslapi-2.4.so.%{so_ver_compat}()(%{__isa_bits}bit) %endif -%endif %description compat The openldap-compat package contains shared libraries named as libldap-2.4.so, -%if %{with servers} libldap_r-2.4.so, liblber-2.4.so and libslapi-2.4.so. -%else -libldap_r-2.4.so and liblber-2.4.so -%endif The libraries are just links to the current version shared libraries, and are available for compatibility reasons. -%if %{with servers} %package servers Summary: LDAP server +License: OpenLDAP Requires: openldap%{?_isa} = %{version}-%{release} -%{?systemd_requires} +Requires(pre): shadow-utils +BuildRequires: systemd +BuildRequires: systemd-rpm-macros +%{?sysusers_requires_compat} +BuildRequires: cracklib-devel # migrationtools (slapadd functionality): Provides: ldif2ldbm +%{?systemd_requires} %description servers OpenLDAP is an open-source suite of LDAP (Lightweight Directory Access @@ -148,8 +133,6 @@ protocols for accessing directory services (usually phone book style information, but other information is possible) over the Internet, similar to the way DNS (Domain Name System) information is propagated over the Internet. This package contains the slapd server and related files. -# endif servers -%endif %package clients Summary: LDAP client utilities @@ -206,9 +189,7 @@ popd %set_build_flags # enable experimental support for LDAP over UDP (LDAP_CONNECTIONLESS) -export CFLAGS="${CFLAGS} ${LDFLAGS} -Wl,--as-needed -Wl,-z,now -DLDAP_CONNECTIONLESS" -# disable legacy hash algorithm -export CFLAGS="${CFLAGS} -DOPENSSL_NO_MD2" +export CFLAGS="${CFLAGS} ${LDFLAGS} -Wl,--as-needed -DLDAP_CONNECTIONLESS" pushd openldap-%{version} %configure \ @@ -225,12 +206,7 @@ pushd openldap-%{version} --enable-perl \ --enable-rewrite \ --enable-rlookups \ -%if %{with servers} --enable-slapi \ -%if %{with argon2} - --enable-argon2 \ -%endif -%endif --disable-slp \ \ --enable-backends=mod \ @@ -268,9 +244,7 @@ popd %install mkdir -p %{buildroot}%{_libdir}/ -%if %{with servers} install -p -D -m 0644 %{SOURCE6} %{buildroot}%{_sysusersdir}/openldap.conf -%endif pushd openldap-%{version} %make_install STRIP_OPTS="" @@ -343,7 +317,7 @@ done pushd %{buildroot}%{_libdir} v=%{version} version=$(echo ${v%.[0-9]*}) -for lib in liblber libldap %{?with_servers:libslapi}; do +for lib in liblber libldap libslapi; do rm -f ${lib}.so ln -s ${lib}.so.%{so_ver} ${lib}.so done @@ -362,21 +336,19 @@ for lib in $(ls | grep libldap); do done # Provide only libldap and copy it to libldap_r for both 2.4 and 2.6+ versions, make a versioned lib link -# We increase it by 2 because libldap-2.4 has the 'so.2' major version on 2.4.59 (one of the last versions which is EOL) +# We increase it by 2 because libldap-2.4 has the 'so.2' major version on 2.4.59 (one of the last versions which is EOF) gcc -shared -o "%{buildroot}%{_libdir}/libldap-2.4.so.${so_ver_short_2_4}" -Wl,--no-as-needed \ - -Wl,-soname -Wl,libldap-2.4.so.${so_ver_short_2_4} -L "%{buildroot}%{_libdir}" -Wl,-z,now -lldap + -Wl,-soname -Wl,libldap-2.4.so.${so_ver_short_2_4} -L "%{buildroot}%{_libdir}" -lldap gcc -shared -o "%{buildroot}%{_libdir}/libldap_r-2.4.so.${so_ver_short_2_4}" -Wl,--no-as-needed \ - -Wl,-soname -Wl,libldap_r-2.4.so.${so_ver_short_2_4} -L "%{buildroot}%{_libdir}" -Wl,-z,now -lldap + -Wl,-soname -Wl,libldap_r-2.4.so.${so_ver_short_2_4} -L "%{buildroot}%{_libdir}" -lldap gcc -shared -o "%{buildroot}%{_libdir}/liblber-2.4.so.${so_ver_short_2_4}" -Wl,--no-as-needed \ - -Wl,-soname -Wl,liblber-2.4.so.${so_ver_short_2_4} -L "%{buildroot}%{_libdir}" -Wl,-z,now -llber -%if %{with servers} + -Wl,-soname -Wl,liblber-2.4.so.${so_ver_short_2_4} -L "%{buildroot}%{_libdir}" -llber gcc -shared -o "%{buildroot}%{_libdir}/libslapi-2.4.so.${so_ver_short_2_4}" -Wl,--no-as-needed \ - -Wl,-soname -Wl,libslapi-2.4.so.${so_ver_short_2_4} -L "%{buildroot}%{_libdir}" -Wl,-z,now -lslapi -ln -s libslapi-2.4.so.{${so_ver_short_2_4},${so_ver_full_2_4}} -%endif + -Wl,-soname -Wl,libslapi-2.4.so.${so_ver_short_2_4} -L "%{buildroot}%{_libdir}" -lslapi ln -s libldap-2.4.so.{${so_ver_short_2_4},${so_ver_full_2_4}} ln -s libldap_r-2.4.so.{${so_ver_short_2_4},${so_ver_full_2_4}} ln -s liblber-2.4.so.{${so_ver_short_2_4},${so_ver_full_2_4}} +ln -s libslapi-2.4.so.{${so_ver_short_2_4},${so_ver_full_2_4}} popd @@ -389,6 +361,7 @@ chmod 0644 %{buildroot}%{_libdir}/openldap/*.la mkdir -p %{buildroot}%{_datadir} install -m 0755 -d %{buildroot}%{_datadir}/openldap-servers install -m 0644 %SOURCE3 %{buildroot}%{_datadir}/openldap-servers/slapd.ldif +install -m 0644 %SOURCE5 %{buildroot}%{_datadir}/openldap-servers/UPGRADE_INSTRUCTIONS install -m 0700 -d %{buildroot}%{_sysconfdir}/openldap/slapd.d rm %{buildroot}%{_sysconfdir}/openldap/slapd.conf rm %{buildroot}%{_sysconfdir}/openldap/slapd.ldif @@ -401,11 +374,23 @@ rm %{buildroot}%{_libdir}/*.la # because we do not want files in %{_libdir}/ope %ldconfig_scriptlets -%if %{with servers} +%pre servers +# create ldap user and group +# sysusers.d format https://fedoraproject.org/wiki/Changes/Adopting_sysusers.d_format +%sysusers_create_compat %{SOURCE6} + +getent group ldap &>/dev/null || groupadd -r -g 55 ldap +getent passwd ldap &>/dev/null || \ + useradd -r -g ldap -u 55 -d %{_sharedstatedir}/ldap -s /sbin/nologin -c "OpenLDAP server" ldap +exit 0 %post servers %systemd_post slapd.service +# If it's not upgrade - we remove the UPGRADE_INSTRUCTIONS +if [ $1 -lt 2 ] ; then + rm %{_datadir}/openldap-servers/UPGRADE_INSTRUCTIONS +fi # generate configuration if necessary if [[ ! -f %{_sysconfdir}/openldap/slapd.d/cn=config.ldif && \ ! -f %{_sysconfdir}/openldap/slapd.conf @@ -429,8 +414,6 @@ exit 0 %postun servers %systemd_postun_with_restart slapd.service -%endif -# endif servers %files %doc openldap-%{version}/ANNOUNCEMENT @@ -444,13 +427,10 @@ exit 0 %dir %{_libexecdir}/openldap/ %{_libdir}/liblber.so.* %{_libdir}/libldap.so.* -%if %{with servers} %{_libdir}/libslapi.so.* -%endif %{_mandir}/man5/ldif.5* %{_mandir}/man5/ldap.conf.5* -%if %{with servers} %files servers %doc openldap-%{version}/contrib/slapd-modules/smbk5pwd/README.smbk5pwd %doc openldap-%{version}/doc/guide/admin/*.html @@ -469,12 +449,6 @@ exit 0 %{_datadir}/openldap-servers/ %{_libdir}/openldap/accesslog* %{_libdir}/openldap/allop* -%if %{with argon2} -%{_libdir}/openldap/argon2* -%{_mandir}/man5/slappw-argon2.5* -%else -%exclude %{_mandir}/man5/slappw-argon2.5* -%endif %{_libdir}/openldap/auditlog* %{_libdir}/openldap/autoca* %{_libdir}/openldap/back_asyncmeta* @@ -495,7 +469,6 @@ exit 0 %{_libdir}/openldap/home* %{_libdir}/openldap/lloadd* %{_libdir}/openldap/memberof* -%{_libdir}/openldap/nestgroup* %{_libdir}/openldap/otp* %{_libdir}/openldap/pcache* %{_libdir}/openldap/ppolicy* @@ -512,45 +485,25 @@ exit 0 %{_libdir}/openldap/valsort* %{_libexecdir}/openldap/functions %{_libexecdir}/openldap/check-config.sh -%{_sbindir}/slap* +%{_sbindir}/sl* +%{_mandir}/man8/* %{_mandir}/man5/lloadd.conf.5* -%{_mandir}/man8/lloadd.8* %{_mandir}/man5/slapd*.5* %{_mandir}/man5/slapo-*.5* -%{_mandir}/man8/slap*.8* +%{_mandir}/man5/slappw-argon2.5* %{_sysusersdir}/openldap.conf # obsolete configuration %ghost %config(noreplace,missingok) %attr(0640,ldap,ldap) %{_sysconfdir}/openldap/slapd.conf -%else -%exclude %{_datadir}/openldap-servers/ -%exclude %{_libdir}/openldap/ -%exclude %{_libexecdir}/openldap/check-config.sh -%exclude %{_libexecdir}/openldap/functions -%exclude %{_mandir}/man5/slapd*.5* -%exclude %{_mandir}/man5/slapo-*.5* -%exclude %{_mandir}/man5/lloadd.conf.5* -%exclude %{_mandir}/man5/slappw-argon2.5* -%exclude %{_mandir}/man8/* -%exclude %{_sbindir}/slap* -%exclude %{_sysconfdir}/openldap/check_password.conf -%exclude %{_sysconfdir}/openldap/schema -%exclude %{_tmpfilesdir}/slapd.conf -%exclude %{_unitdir}/slapd.service -%endif -# endif servers - %files clients -%{_bindir}/ldap* -%{_mandir}/man1/ldap*.1* +%{_bindir}/* +%{_mandir}/man1/* %files devel %doc openldap-%{version}/doc/drafts openldap-%{version}/doc/rfc %{_libdir}/liblber.so %{_libdir}/libldap.so -%if %{with servers} %{_libdir}/libslapi.so -%endif %{_includedir}/* %{_libdir}/pkgconfig/lber.pc %{_libdir}/pkgconfig/ldap.pc @@ -560,77 +513,15 @@ exit 0 %{_libdir}/libldap-2.4*.so.* %{_libdir}/libldap_r-2.4*.so.* %{_libdir}/liblber-2.4*.so.* -%if %{with servers} %{_libdir}/libslapi-2.4*.so.* -%endif %changelog -* Wed Jan 14 2026 Yaakov Selkowitz - 2.6.10-6 -- Enable argon2 only in Fedora - -* Tue Jan 13 2026 Simon Pichugin - 2.6.10-5 -- Add support for argon2 (rhbz#2229405) -- Bump version 2.6.10-5 - -* Fri Aug 29 2025 Simon Pichugin - 2.6.10-4 -- Fix LDAP initialization does unnecessary resolution of hostname (rhbz#2331728) -- Convert STI tests to FMF (rhbz#2382998) - -* Thu Jul 24 2025 Fedora Release Engineering - 2.6.10-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Mon Jul 07 2025 Jitka Plesnikova - 2.6.10-2 -- Perl 5.42 rebuild - -* Tue Jun 10 2025 Simon Pichugin - 2.6.10-1 -- Rebase to version 2.6.10 (rhbz#2368103) - -* Tue Feb 11 2025 Zbigniew Jędrzejewski-Szmek - 2.6.9-5 -- Drop call to %sysusers_create_compat - -* Sat Feb 01 2025 Björn Esser - 2.6.9-4 -- Add explicit BR: libxcrypt-devel - -* Fri Jan 24 2025 Zbigniew Jędrzejewski-Szmek - 2.6.9-3 -- Adjust file patterns for the sbin merge - -* Thu Jan 16 2025 Simon Pichugin - 2.6.9-2 -- Disable MD2 hash algorithm (rhbz#2338556) - -* Thu Jan 9 2025 Simon Pichugin - 2.6.9-1 -- Rebase to version 2.6.9 (rhbz#2329002) - -* Tue Dec 3 2024 Simon Pichugin - 2.6.8-6 -- Avoid SSL context cleanup during library destruction - -* Tue Jul 23 2024 Simon Pichugin - 2.6.8-5 -- Clean up spec file so it's aligned with c10s -- Remove UPGRADE_INSTRUCTIONS for openldap-server upgrade (rhbz#2133526) - -* Thu Jul 18 2024 Fedora Release Engineering - 2.6.8-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Mon Jun 24 2024 Yaakov Selkowitz - 2.6.8-3 -- Disable libslapi and servers in RHEL builds - -* Tue Jun 11 2024 Jitka Plesnikova - 2.6.8-2 -- Perl 5.40 rebuild - -* Wed May 22 2024 Simon Pichugin - 2.6.8-1 -- Rebase to version 2.6.8 (rhbz#2282258) - -* Fri Feb 9 2024 Simon Pichugin - 2.6.7-1 -- Rebase to version 2.6.7 (rhbz#2261163) -- Use systemd-sysusers for ldap user and group (rhbz#2173965) -- Fix compiler errors (rhbz#2261427) +* Wed May 22 2024 Simon Pichugin - 2.6.7-1 +- Rebase to version 2.6.7 (rhbz#2282799) +- Use systemd-sysusers for ldap user and group +- Fix compiler errors - Replace License with SPDX identifier -* Thu Jan 25 2024 Fedora Release Engineering - 2.6.6-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Sun Jan 21 2024 Fedora Release Engineering - 2.6.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - * Mon Jul 31 2023 Simon Pichugin - 2.6.6-1 - Rebase to version 2.6.6 Related: rhbz#2227948 diff --git a/plans/gating.fmf b/plans/gating.fmf deleted file mode 100644 index 387b7bf..0000000 --- a/plans/gating.fmf +++ /dev/null @@ -1,8 +0,0 @@ -summary: Test plan for openldap - -discover: - how: fmf - -execute: - how: tmt - diff --git a/sources b/sources index 0b0bd67..d27ec13 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ SHA512 (openldap-ppolicy-check-password-1.1.tar.gz) = a92854d7438cb95fac361da80a49d084d502155e8ce0ad2ea679db9529bbe0182aa4354e6139793c775e496349375d8f017678941d23315ff1c20fefc9573cdc -SHA512 (openldap-2.6.10.tgz) = 18129ad9a385457941e3203de5f130fe2571701abf24592c5beffb01361aae3182c196b2cd48ffeecb792b9b0e5f82c8d92445a7ec63819084757bdedba63b20 +SHA512 (openldap-2.6.7.tgz) = ea207b84fdb7bc6cdff2bc1201fcdde6a907f5766f9637589d956ca86ecf61d4e732ab7d80f33b18b691644e1f5fa39b00ff2c7f4084c9b85760ee693a7c451e diff --git a/tests/smoke-test/Makefile b/tests/smoke-test/Makefile index 322f5a5..5a549be 100644 --- a/tests/smoke-test/Makefile +++ b/tests/smoke-test/Makefile @@ -46,7 +46,7 @@ clean: include /usr/share/rhts/lib/rhts-make.include $(METADATA): Makefile - @echo "Owner: Viktor Ashirov " > $(METADATA) + @echo "Owner: Ondrej Moris " > $(METADATA) @echo "Name: $(TEST)" >> $(METADATA) @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) @echo "Path: $(TEST_DIR)" >> $(METADATA) @@ -57,23 +57,25 @@ $(METADATA): Makefile @echo "Requires: openldap" >> $(METADATA) @echo "Requires: openldap-clients" >> $(METADATA) @echo "Requires: openldap-servers" >> $(METADATA) - @echo "Requires: nss-devel" >> $(METADATA) - @echo "Requires: cracklib-devel" >> $(METADATA) @echo "Requires: cyrus-sasl-devel" >> $(METADATA) @echo "Requires: gdbm-devel" >> $(METADATA) - @echo "Requires: groff" >> $(METADATA) - @echo "Requires: krb5-devel" >> $(METADATA) - @echo "Requires: libdb-devel" >> $(METADATA) @echo "Requires: libtool" >> $(METADATA) - @echo "Requires: libtool-ltdl-devel" >> $(METADATA) - @echo "Requires: nfs-utils" >> $(METADATA) + @echo "Requires: krb5-devel" >> $(METADATA) @echo "Requires: openssl-devel" >> $(METADATA) @echo "Requires: pam-devel" >> $(METADATA) @echo "Requires: perl" >> $(METADATA) - @echo "Requires: perl-ExtUtils-Embed" >> $(METADATA) @echo "Requires: pkgconfig" >> $(METADATA) - @echo "Requires: rpm-build" >> $(METADATA) + @echo "Requires: tcp_wrappers-devel" >> $(METADATA) + @echo "Requires: bind-libbind-devel" >> $(METADATA) @echo "Requires: unixODBC-devel" >> $(METADATA) + @echo "Requires: libtool-ltdl-devel" >> $(METADATA) + @echo "Requires: nfs-utils" >> $(METADATA) + @echo "Requires: rpm-build" >> $(METADATA) + @echo "Requires: nss-devel" >> $(METADATA) + @echo "Requires: libdb-devel" >> $(METADATA) + @echo "Requires: groff" >> $(METADATA) + @echo "Requires: cracklib-devel" >> $(METADATA) + @echo "Requires: perl-ExtUtils-Embed" >> $(METADATA) @echo "Requires: yum-utils" >> $(METADATA) @echo "Priority: Normal" >> $(METADATA) @echo "License: GPLv2" >> $(METADATA) diff --git a/tests/smoke-test/main.fmf b/tests/smoke-test/main.fmf deleted file mode 100644 index cc59f6b..0000000 --- a/tests/smoke-test/main.fmf +++ /dev/null @@ -1,31 +0,0 @@ -summary: Test calls upstream test suite -description: Test calls upstream test suite -contact: Viktor Ashirov -component: - - openldap -test: ./runtest.sh -framework: beakerlib -recommend: - - openldap - - openldap-clients - - openldap-servers - - cracklib-devel - - cyrus-sasl-devel - - gdbm-devel - - groff - - krb5-devel - - libdb-devel - - libtool - - libtool-ltdl-devel - - nfs-utils - - nss-devel - - openssl-devel - - pam-devel - - perl - - perl-ExtUtils-Embed - - pkgconf-pkg-config - - pkgconfig - - rpm-build - - unixODBC-devel - - yum-utils -duration: 3h diff --git a/tests/smoke-test/runtest.sh b/tests/smoke-test/runtest.sh index bd1ebe6..63c8ccc 100755 --- a/tests/smoke-test/runtest.sh +++ b/tests/smoke-test/runtest.sh @@ -27,6 +27,7 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Include rhts environment +. /usr/bin/rhts-environment.sh . /usr/share/beakerlib/beakerlib.sh || exit 1 PACKAGE="openldap" @@ -44,46 +45,58 @@ PACKAGES=("openldap" \ "unixODBC-devel" \ "libtool-ltdl-devel" \ "nfs-utils" \ - "rpm-build" \ - "nss-devel" \ - "libdb-devel" \ - "groff" \ - "cracklib-devel" \ - "perl-ExtUtils-Embed"\ - "pkgconf-pkg-config" ) + "rpm-build" ) -LDAP_SERVICE='slapd' +if rlIsRHEL 5; then + PACKAGES=( ${PACKAGES[@]} "bind-libbind-devel" ) +elif rlIsRHEL 6; then + PACKAGES=( ${PACKAGES[@]} "tcp_wrappers-devel" ) +else + PACKAGES=( ${PACKAGES[@]} "tcp_wrappers-devel" "nss-devel" "libdb-devel" "groff" "cracklib-devel" "perl-ExtUtils-Embed" ) +fi +if rlIsFedora; then + PACKAGES=( ${PACKAGES[@]} "pkgconf-pkg-config" ) +else + PACKAGES=( ${PACKAGES[@]} "pkgconfig" ) +fi + +if rlIsRHEL 5; then + LDAP_SERVICE='ldap' +else + LDAP_SERVICE='slapd' +fi rlJournalStart rlPhaseStartSetup "General Setup" - rlRun "TmpDir=$(mktemp -d)" 0 "Creating tmp directory" + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "pushd $TmpDir" - + for P in "${PACKAGES[@]}"; do rlCheckRpm $P || rlDie; done rlFetchSrcForInstalled $PACKAGE rlRun "yum-builddep -y openldap*src.rpm" 0 rlRun "rpm -ihv *.rpm" 0 - rlServiceStop $LDAP_SERVICE + rlServiceStop $LDAP_SERVICE rlPhaseEnd rlPhaseStartTest - TOPDIR=$(rpm --eval %_topdir) + TOPDIR=`rpm --eval %_topdir` rlRun "pushd $TOPDIR" 0 rlRun "rpmbuild -vv -bc SPECS/openldap.spec >build.log 2>&1" 0 [[ $? -ne 0 ]] && cat build.log - VERSION=$(rpm -q --qf "%{VERSION}\n" openldap | tail -1) - rlRun "pushd BUILD/openldap-${VERSION}-build/openldap-${VERSION}/openldap-${VERSION}" 0 + VERSION=`rpm -q --qf "%{VERSION}\n" openldap | tail -1` + rlRun "pushd BUILD/openldap-${VERSION}/openldap-${VERSION}" 0 # workaround for failing test, it tests unsupported configuration # see http://www.openldap.org/lists/openldap-technical/201204/msg00080.html for upstream reply # change of check after test is not enough because run of all tests with hdb is skipped if test058 fails with bdb - #rm -f tests/scripts/test058-syncrepl-asymmetric + rm -f tests/scripts/test058-syncrepl-asymmetric + rlIsRHEL 5 6 && rlRun "pushd build-servers" 0 rlRun "make check > make_check.out 2>&1" 0 @@ -94,14 +107,15 @@ rlJournalStart rlAssertNotGrep "failed" make_check.results + rlIsRHEL 5 6 && rlRun "popd" 0 rlRun "popd" 0 rlRun "popd" 0 rlPhaseEnd rlPhaseStartCleanup - rlServiceRestore $LDAP_SERVICE - rlRun "rm -rf BUILD/opendap-$(rpm -q --qf "%{VERSION}" openldap)" 0 + rlServiceRestore $LDAP_SERVICE + rlRun "rm -rf BUILD/opendap-`rpm -q --qf "%{VERSION}" openldap`" 0 rlRun "popd" rlRun "rm -r $TmpDir" 0 "Removing tmp directory" diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..b1b1905 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,34 @@ +--- +# Tests that run in all contexts +- hosts: localhost + roles: + - role: standard-test-beakerlib + tags: + - classic + tests: + - smoke-test + required_packages: + - openldap # Required for smoke-test + - openldap-clients # Required for smoke-test + - openldap-servers # Required for smoke-test + - cyrus-sasl-devel # Required for smoke-test + - gdbm-devel # Required for smoke-test + - libtool # Required for smoke-test + - krb5-devel # Required for smoke-test + - openssl-devel # Required for smoke-test + - pam-devel # Required for smoke-test + - perl # Required for smoke-test + - pkgconfig # Required for smoke-test + - tcp_wrappers-devel # Required for smoke-test + - bind-libbind-devel # Required for smoke-test + - unixODBC-devel # Required for smoke-test + - nfs-utils # Required for smoke-test + - rpm-build # Required for smoke-test + - nss-devel # Required for smoke-test + - libdb-devel # Required for smoke-test + - groff # Required for smoke-test + - cracklib-devel # Required for smoke-test + - perl-ExtUtils-Embed # Required for smoke-test + - yum-utils # Required for smoke-test + - libtool-ltdl-devel # Required for smoke-test + - wget # Required for smoke-test