%global _hardened_build 1 %define _prefix /opt/openldap25 %define _varfix /var/opt/openldap25 %define _cflags "-O0 -g" Summary: openldap 2.5.3 beta build Name: openldap25 Version: 2.5.3beta Release: 1%{?dist} License: BSD BuildRequires: gcc, libcom_err-devel BuildRequires: openssl-devel, cyrus-sasl-devel BuildRequires: libtool-ltdl-devel, heimdal-devel BuildRequires: libevent-devel, libargon2-devel BuildRequires: cracklib-devel AutoReqProv: no URL: http://www.openldap.org Source0: ftp://ftp.OpenLDAP.org/pub/OpenLDAP/openldap-release/openldap-%{version}.tgz Patch0: Install-slapd-watcher.patch Patch1: ITS9515.patch Patch2: ITS9515-2.patch Patch3: ITS7832.patch Patch4: ITS9471.patch %description The openldap 2.5.3 beta build %prep %setup -n openldap-%{version} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %build CFLAGS="-O0 -g"; export CFLAGS; ./configure --prefix=%{_prefix} \ --with-cyrus-sasl \ --with-tls=openssl \ --libexecdir=%{_prefix}/lib \ --enable-dynamic \ --enable-slapd \ --enable-modules \ --enable-backends=mod \ --enable-balancer=mod \ --disable-sql \ --disable-ndb \ --disable-perl \ --disable-wt \ --enable-overlays=mod \ --disable-seqmod \ --enable-argon2 \ --enable-debug \ --enable-spasswd \ --localstatedir=%{_varfix} \ --enable-crypt make depend make DEFINES="-DSLAP_SCHEMA_EXPOSE" make -C contrib/slapd-modules/autogroup prefix=%{_prefix} libexecdir=%{_prefix}/lib make -C contrib/slapd-modules/datamorph prefix=%{_prefix} libexecdir=%{_prefix}/lib make -C contrib/slapd-modules/lastbind prefix=%{_prefix} libexecdir=%{_prefix}/lib make -C contrib/slapd-modules/noopsrch prefix=%{_prefix} libexecdir=%{_prefix}/lib make -C contrib/slapd-modules/passwd/pbkdf2 prefix=%{_prefix} libexecdir=%{_prefix}/lib make -C contrib/slapd-modules/passwd/sha2 prefix=%{_prefix} libexecdir=%{_prefix}/lib make -C contrib/slapd-modules/ppm prefix=%{_prefix} libexecdir=%{_prefix}/lib make -C contrib/slapd-modules/rbac prefix=%{_prefix} libexecdir=%{_prefix}/lib make -C contrib/slapd-modules/smbk5pwd prefix=%{_prefix} libexecdir=%{_prefix}/lib HEIMDAL_INC='-I/usr/include/heimdal' HEIMDAL_LIB='-L/usr/lib64/heimdal -lkrb5 -lkadm5srv' make -C contrib/slapd-modules/variant prefix=%{_prefix} libexecdir=%{_prefix}/lib pushd libraries/liblmdb export XCFLAGS=%{_cflags} make prefix=%{_prefix} popd %install make install DESTDIR=%{buildroot} STRIP_OPTS="" make -C contrib/slapd-modules/autogroup install prefix=%{_prefix} libexecdir=%{_prefix}/lib DESTDIR=%{buildroot} STRIP_OPTS="" make -C contrib/slapd-modules/datamorph install prefix=%{_prefix} libexecdir=%{_prefix}/lib DESTDIR=%{buildroot} STRIP_OPTS="" make -C contrib/slapd-modules/lastbind install prefix=%{_prefix} libexecdir=%{_prefix}/lib DESTDIR=%{buildroot} STRIP_OPTS="" make -C contrib/slapd-modules/noopsrch install prefix=%{_prefix} libexecdir=%{_prefix}/lib DESTDIR=%{buildroot} STRIP_OPTS="" make -C contrib/slapd-modules/passwd/pbkdf2 install prefix=%{_prefix} libexecdir=%{_prefix}/lib DESTDIR=%{buildroot} STRIP_OPTS="" make -C contrib/slapd-modules/passwd/sha2 install prefix=%{_prefix} libexecdir=%{_prefix}/lib DESTDIR=%{buildroot} STRIP_OPTS="" make -C contrib/slapd-modules/ppm install prefix=%{_prefix} libexecdir=%{_prefix}/lib DESTDIR=%{buildroot} STRIP_OPTS="" make -C contrib/slapd-modules/rbac install prefix=%{_prefix} libexecdir=%{_prefix}/lib DESTDIR=%{buildroot} STRIP_OPTS="" make -C contrib/slapd-modules/smbk5pwd install prefix=%{_prefix} libexecdir=%{_prefix}/lib DESTDIR=%{buildroot} STRIP_OPTS="" make -C contrib/slapd-modules/variant install prefix=%{_prefix} libexecdir=%{_prefix}/lib DESTDIR=%{buildroot} STRIP_OPTS="" pushd libraries/liblmdb make install prefix=%{_prefix} DESTDIR=%{buildroot} popd pushd tests/progs make install prefix=%{_prefix} DESTDIR=%{buildroot} popd rm -f %{buildroot}%{_prefix}/include/lmdb.h rm -f %{buildroot}%{_prefix}/lib/liblmdb.{a,so} rm -f %{buildroot}%{_prefix}/lib/openldap/autogroup.a rm -f %{buildroot}%{_prefix}/lib/openldap/datamorph.a rm -f %{buildroot}%{_prefix}/lib/openldap/lastbind.a rm -f %{buildroot}%{_prefix}/lib/openldap/noopsrch.a rm -f %{buildroot}%{_prefix}/lib/openldap/ppm.a rm -f %{buildroot}%{_prefix}/lib/openldap/pw-pbkdf2.a rm -f %{buildroot}%{_prefix}/lib/openldap/pw-sha2.a rm -f %{buildroot}%{_prefix}/lib/openldap/rbac.a rm -f %{buildroot}%{_prefix}/lib/openldap/smbk5pwd.a rm -f %{buildroot}%{_prefix}/lib/openldap/variant.a rm -f %{buildroot}%{_prefix}/etc/openldap/ppm.example mkdir -p %{buildroot}%{_varfix}/openldap-data mkdir -p %{buildroot}%{_varfix}/run chmod 0755 %{buildroot}%{_prefix}/lib/lib*.so* chmod 0644 %{buildroot}%{_prefix}/lib/*.la chmod 0644 %{buildroot}%{_prefix}/lib/openldap/*.la install -m 0700 -d %{buildroot}%{_varfix}/openldap-data install -m 0755 -d %{buildroot}%{_varfix}/run %package libs Summary: openldap Libaries Requires: openssl-libs >= 1.1.1a, cyrus-sasl-lib >= 2.1.26 AutoReqProv: no %description libs The openldap25-libs package contains the openldap libraries %package devel Summary: openldap Development Requires: openldap25-libs = %{version}-%{release} AutoReqProv: no %description devel The openldap25-devel package contains the linking libraries and include files %package server Summary: openldap server binaries Requires: openldap25-libs = %{version}-%{release}, libargon2 >= 20171227, heimdal-libs >= 7.7.0, cracklib >= 2.9.6 Requires: libtool-ltdl AutoReqProv: no %description server The openldap25-server package contains slapd and its modules %package clients Summary: openldap client binaries Requires: openldap25-libs = %{version}-%{release} AutoReqProv: no %description clients The openldap25-clients package contains client tools such as ldapsearch %files libs %defattr(-,root,root) %{_prefix}/etc/openldap/ldap.conf.default %{_prefix}/lib/*.so.* %{_prefix}/share/man/man5/ldap.conf.5 %{_prefix}/share/man/man5/ldif.5 %files devel %defattr(-,root,root) %{_prefix}/include %{_prefix}/lib/*.a %{_prefix}/lib/*.la %{_prefix}/lib/*.so %{_prefix}/lib/pkgconfig/*.pc %{_prefix}/share/man/man3 %files server %defattr(-,root,root) %{_prefix}/bin/mdb_* %{_prefix}/sbin %{_prefix}/etc %{_prefix}/lib/slapd %{_prefix}/lib/openldap %{_prefix}/share/man/man1/mdb_* %{_prefix}/share/man/man5/slap*.5 %{_prefix}/share/man/man5/lload*.5 %{_prefix}/share/man/man8 %{_varfix} %exclude %{_prefix}/etc/openldap/ldap.conf %exclude %{_prefix}/etc/openldap/ldap.conf.default %exclude %{_prefix}/etc/openldap/slapd.conf %exclude %{_prefix}/etc/openldap/slapd.ldif %exclude %{_prefix}/share/man/man5/ldap.conf.5 %exclude %{_prefix}/share/man/man5/ldif.5 %files clients %defattr(-,root,root) %{_prefix}/bin %{_prefix}/share/man/man1 %exclude %{_prefix}/bin/mdb_* %exclude %{_prefix}/share/man/man1/mdb_* %changelog * Wed Mar 31 2021 Symas Support - OpenLDAP 2.5.3 Beta * Fri Feb 26 2021 Symas Support - initial packaging