automatic version update by autodist [release 2.5.5-1mamba;Thu Jun 10 2021]

This commit is contained in:
Automatic Build System 2024-01-06 08:13:03 +01:00
parent 6bff585692
commit f03ab264e6

View File

@ -1,5 +1,5 @@
Name: openldap Name: openldap
Version: 2.4.58 Version: 2.5.5
Release: 1mamba Release: 1mamba
Group: System/Servers Group: System/Servers
Summary: An open source implementation of the Lightweight Directory Access Protocol Summary: An open source implementation of the Lightweight Directory Access Protocol
@ -21,13 +21,12 @@ Patch4: openldap-2.4.43-liblmdb-installdirs.patch
License: OpenLDAP Public License License: OpenLDAP Public License
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libdb53-devel
BuildRequires: libe2fs-devel BuildRequires: libe2fs-devel
BuildRequires: libicu-devel
BuildRequires: libkrb5-devel BuildRequires: libkrb5-devel
BuildRequires: libltdl-devel BuildRequires: libltdl-devel
BuildRequires: libopenssl-devel BuildRequires: libopenssl-devel
BuildRequires: libsasl2-devel BuildRequires: libsasl2-devel
BuildRequires: libsystemd-devel
BuildRequires: libuuid-devel BuildRequires: libuuid-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: libsasl-devel >= 2.1.26 BuildRequires: libsasl-devel >= 2.1.26
@ -43,9 +42,6 @@ Summary: OpenLDAP libraries
Group: System/Libraries Group: System/Libraries
# requires latest SASL libraries # requires latest SASL libraries
Requires: libsasl >= 2.1.25 Requires: libsasl >= 2.1.25
Provides: liblber.so.2
Provides: libldap.so.2
Provides: libldap_r.so.2
%description -n lib%{name} %description -n lib%{name}
OpenLDAP is an open source implementation of the Lightweight Directory Access Protocol. OpenLDAP is an open source implementation of the Lightweight Directory Access Protocol.
@ -74,7 +70,7 @@ Summary: OpenLDAP server
Group: System/Libraries Group: System/Libraries
Requires: libopenldap = %{version}-%{release} Requires: libopenldap = %{version}-%{release}
Provides: openldap-servers Provides: openldap-servers
Obsoletes: openldap-servers Obsoletes: openldap-servers < 2.5.5
%description server %description server
OpenLDAP is an open source implementation of the Lightweight Directory Access Protocol. OpenLDAP is an open source implementation of the Lightweight Directory Access Protocol.
@ -113,10 +109,8 @@ This package contains static libraries and header files needed for development.
#-D -T #-D -T
#:<< _EOF #:<< _EOF
#cp %{SOURCE3} servers/slapd/slapd.conf #cp %{SOURCE3} servers/slapd/slapd.conf
%patch0 -p1 -b .ntlm #%patch0 -p1 -b .ntlm
%patch2 -p1 %patch2 -p1
#%patch3 -p1
#%patch4 -p1
%build %build
#:<< _EOF #:<< _EOF
@ -151,10 +145,10 @@ chmod +x %{buildroot}%{_libdir}/lib*.so.*
install -d %{buildroot}/var/lib/%{name}-data install -d %{buildroot}/var/lib/%{name}-data
install -d %{buildroot}/var/run/openldap/ install -d %{buildroot}/var/run/openldap/
install -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name} #install -D -m 755 %{SOURCE1} %{buildroot}%{_initrddir}/%{name}
install -D -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} install -D -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
install -D -m 644 %{SOURCE4} %{buildroot}/lib/systemd/system/openldap.service #install -D -m 644 %{SOURCE4} %{buildroot}/lib/systemd/system/openldap.service
install -D -m 644 %{SOURCE5} %{buildroot}%_tmpfilesdir/openldap.conf #install -D -m 644 %{SOURCE5} %{buildroot}%_tmpfilesdir/openldap.conf
rm -f %{buildroot}%{_sysconfdir}/%{name}/*.default rm -f %{buildroot}%{_sysconfdir}/%{name}/*.default
rm -f %{buildroot}%{_sysconfdir}/%{name}/schema/*.default rm -f %{buildroot}%{_sysconfdir}/%{name}/schema/*.default
@ -187,94 +181,23 @@ rm -f %{buildroot}/var/openldap-data/DB_CONFIG.example
%post -n lib%{name} -p /sbin/ldconfig %post -n lib%{name} -p /sbin/ldconfig
%postun -n lib%{name} -p /sbin/ldconfig %postun -n lib%{name} -p /sbin/ldconfig
%pre -n %{name}-server
if [ $1 -eq 2 ]; then
# upgrade
# make a backup of the existing tree
ldapadd -VV 2>&1 | grep "ldapmodify 2.1" >/dev/null
if [ $? -eq 0 ]; then
echo "Backing up current ldap tree"
[ -e /run/openldap/slapd.pid ] && service openldap stop
slapcat > /var/lib/ldap/openldap-data/ldap-backup.rpm_update
fi
fi
if [ $1 -eq 1 ]; then
# new install
groupadd ldap 2>/dev/null || true
useradd -g ldap -c "LDAP user" -d /var/lib/ldap \
-s /bin/false ldap 2>/dev/null || true
fi
exit 0
%post -n %{name}-server %post -n %{name}-server
# new install %systemd_post slapd
if [ $1 -eq 1 ]; then :
if [ -e /etc/sysconfig/hostname ]; then
HOSTNAME=`cat /etc/sysconfig/hostname`
else
. %{_sysconfdir}/sysconfig/network
fi
ldap_hostname=${HOSTNAME/.*}
ldap_domain=${HOSTNAME/*.}
if [ "$ldap_hostname" ]; then
[ "$ldap_domain" ] || ldap_domain=local
suffix="dc=${ldap_hostname},dc=${ldap_domain}"
rootdn="cn=Manager,${suffix}"
sed -i "s|cn=Manager,dc=my-domain,dc=com|${rootdn}|
s|dc=my-domain,dc=com|${suffix}|" \
%{_sysconfdir}/openldap/slapd.conf
fi
chkconfig --add openldap
systemctl enable openldap.service -q
fi
if [ $1 -gt 1 ]; then
# update
sed -i "s|/var/run/openldap|/run/openldap|" %{_sysconfdir}/openldap/slapd.conf
if [ -f /var/lib/ldap/openldap-data/ldap-backup.rpm_update ]; then
# update from previous LDAP version (rebuild database)
echo "Backing up current ldap bdb files into /var/lib/ldap/openldap-data/backup-2.1"
mkdir -p /var/lib/ldap/openldap-data/backup-2.1
mv /var/lib/ldap/openldap-data/*.bdb /var/lib/ldap/openldap-data/backup-2.1
mv /var/lib/ldap/openldap-data/log* /var/lib/ldap/openldap-data/backup-2.1
mv /var/lib/ldap/openldap-data/__db.* /var/lib/ldap/openldap-data/backup-2.1
echo "Restoring ldap information into new ldap server"
slapadd < /var/lib/ldap/openldap-data/ldap-backup.rpm_update
chown ldap.ldap /var/lib/ldap/openldap-data/*
mv /var/lib/ldap/openldap-data/ldap-backup.rpm_update /var/lib/ldap/openldap-data/backup-2.1
fi
fi
if [ $1 -ge 1 ]; then
systemctl daemon-reload -q
fi
exit 0
%preun -n %{name}-server %preun -n %{name}-server
#erase %systemd_preun slapd
if [ $1 -eq 0 ]; then :
service openldap stop
chkconfig --del openldap
systemctl disable openldap.service -q
systemctl daemon-reload -q
fi
exit 0
fi
exit 0
%postun -n %{name}-server %postun -n %{name}-server
#update %systemd_postun_with_restart slapd
if [ $1 -eq 1 ]; then :
service openldap condrestart
fi
exit 0
%files -n lib%{name} %files -n lib%{name}
%defattr(-,root,root) %defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/openldap/ldap.conf
%{_bindir}/ldapurl
%{_libdir}/liblber-*.so.* %{_libdir}/liblber-*.so.*
%{_libdir}/libldap-*.so.* %{_libdir}/libldap-*.so.*
%{_libdir}/libldap_r-*.so.* #%{_libdir}/libldap_r-*.so.*
%doc COPYRIGHT LICENSE %doc COPYRIGHT LICENSE
%files -n lib%{name}-devel %files -n lib%{name}-devel
@ -295,14 +218,17 @@ exit 0
%{_libdir}/libldap.a %{_libdir}/libldap.a
%{_libdir}/libldap.la %{_libdir}/libldap.la
%{_libdir}/libldap.so %{_libdir}/libldap.so
%{_libdir}/libldap_r.a #%{_libdir}/libldap_r.a
%{_libdir}/libldap_r.la #%{_libdir}/libldap_r.la
%{_libdir}/libldap_r.so #%{_libdir}/libldap_r.so
%{_libdir}/pkgconfig/lber.pc
%{_libdir}/pkgconfig/ldap.pc
%doc doc/devel/* doc/drafts/draft*.txt doc/rfc/rfc*.txt %doc doc/devel/* doc/drafts/draft*.txt doc/rfc/rfc*.txt
%doc ANNOUNCEMENT CHANGES README %doc ANNOUNCEMENT CHANGES README
%files clients %files clients
%defattr(-,root,root) %defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/openldap/ldap.conf
%{_bindir}/ldapexop %{_bindir}/ldapexop
%{_bindir}/ldapadd %{_bindir}/ldapadd
%{_bindir}/ldapdelete %{_bindir}/ldapdelete
@ -310,6 +236,8 @@ exit 0
%{_bindir}/ldapmodrdn %{_bindir}/ldapmodrdn
%{_bindir}/ldappasswd %{_bindir}/ldappasswd
%{_bindir}/ldapsearch %{_bindir}/ldapsearch
%{_bindir}/ldapurl
%{_bindir}/ldapvc
#%{_bindir}/saucer #%{_bindir}/saucer
#%{_bindir}/ud #%{_bindir}/ud
%{_mandir}/man1/* %{_mandir}/man1/*
@ -318,13 +246,12 @@ exit 0
%files server %files server
%defattr(-,root,root) %defattr(-,root,root)
%dir %{_sysconfdir}/openldap %dir %{_sysconfdir}/openldap
%{_sysconfdir}/openldap/DB_CONFIG.example #%{_sysconfdir}/openldap/DB_CONFIG.example
%{_sysconfdir}/openldap/slapd.ldif %{_sysconfdir}/openldap/slapd.ldif
%config(noreplace) %attr(640,root,ldap) %{_sysconfdir}/openldap/slapd.conf %config(noreplace) %attr(640,root,ldap) %{_sysconfdir}/openldap/slapd.conf
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/openldap %config(noreplace) %attr(0644,root,root) %{_sysconfdir}/logrotate.d/openldap
%dir %{_sysconfdir}/openldap/schema %dir %{_sysconfdir}/openldap/schema
%{_sysconfdir}/openldap/schema/* %{_sysconfdir}/openldap/schema/*
%{_initrddir}/openldap
%{_bindir}/ldapcompare %{_bindir}/ldapcompare
%{_bindir}/ldapwhoami %{_bindir}/ldapwhoami
%{_sbindir}/slapacl %{_sbindir}/slapacl
@ -334,20 +261,21 @@ exit 0
%{_sbindir}/slapd %{_sbindir}/slapd
%{_sbindir}/slapdn %{_sbindir}/slapdn
%{_sbindir}/slapindex %{_sbindir}/slapindex
%{_sbindir}/slapmodify
%{_sbindir}/slappasswd %{_sbindir}/slappasswd
%{_sbindir}/slapschema %{_sbindir}/slapschema
%{_sbindir}/slaptest %{_sbindir}/slaptest
#%{_sbindir}/slurpd %{_unitdir}/slapd.service
/lib/systemd/system/openldap.service #%{_tmpfilesdir}/openldap.conf
%_tmpfilesdir/openldap.conf
#%{_datadir}/openldap/ucdata/*
%dir %attr(700,ldap,ldap) /var/lib/openldap-data %dir %attr(700,ldap,ldap) /var/lib/openldap-data
#%dir %attr(700,ldap,ldap) /var/run/openldap
%config(noreplace) /var/lib/openldap-data/DB_CONFIG %config(noreplace) /var/lib/openldap-data/DB_CONFIG
%{_mandir}/man3/* %{_mandir}/man3/*
%{_mandir}/man8/* %{_mandir}/man8/*
%changelog %changelog
* Thu Jun 10 2021 Automatic Build System <autodist@mambasoft.it> 2.5.5-1mamba
- automatic version update by autodist
* Wed Mar 17 2021 Automatic Build System <autodist@mambasoft.it> 2.4.58-1mamba * Wed Mar 17 2021 Automatic Build System <autodist@mambasoft.it> 2.4.58-1mamba
- automatic version update by autodist - automatic version update by autodist