From ca7444dd1abe6ee2d1923a97473d9de02111deac Mon Sep 17 00:00:00 2001 From: Jan Synacek Date: Tue, 4 Mar 2014 08:52:00 +0100 Subject: [PATCH] don't automatically convert slapd.conf to slapd-config It is not possible to convert every possible slapd.conf to slapd-config and expect it to work. Also, it is bad to force conversion like that. --- openldap.spec | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/openldap.spec b/openldap.spec index 369d074..67470d5 100644 --- a/openldap.spec +++ b/openldap.spec @@ -5,7 +5,7 @@ Name: openldap Version: 2.4.39 -Release: 3%{?dist} +Release: 4%{?dist} Summary: LDAP support libraries Group: System Environment/Daemons License: OpenLDAP @@ -329,7 +329,6 @@ chmod 0755 %{buildroot}%{_libdir}/lib*.so* chmod 0644 %{buildroot}%{_libdir}/lib*.*a # slapd.conf(5) is obsoleted since 2.3, see slapd-config(5) -# new configuration will be generated in %%post mkdir -p %{buildroot}%{_datadir} install -m 0755 -d %{buildroot}%{_datadir}/openldap-servers install -m 0644 %SOURCE4 %{buildroot}%{_datadir}/openldap-servers/slapd.ldif @@ -388,14 +387,11 @@ exit 0 # generate sample TLS certificate for server (will not replace) %{_libexecdir}/openldap/generate-server-cert.sh -o &>/dev/null || : -# generate/upgrade configuration -if [ ! -f %{_sysconfdir}/openldap/slapd.d/cn=config.ldif ]; then - if [ -f %{_sysconfdir}/openldap/slapd.conf ]; then - %{_libexecdir}/openldap/convert-config.sh &>/dev/null - mv %{_sysconfdir}/openldap/slapd.conf %{_sysconfdir}/openldap/slapd.conf.bak - else - %{_libexecdir}/openldap/convert-config.sh -f %{_datadir}/openldap-servers/slapd.ldif &>/dev/null - fi +# generate configuration if necessary +if [[ ! -f %{_sysconfdir}/openldap/slapd.d/cn=config.ldif && \ + ! -f %{_sysconfdir}/openldap/slapd.conf + ]]; then + %{_libexecdir}/openldap/convert-config.sh -f %{_datadir}/openldap-servers/slapd.ldif &>/dev/null fi start_slapd=0 @@ -571,6 +567,9 @@ exit 0 %{_mandir}/man3/* %changelog +* Tue Mar 4 2014 Jan Synáček - 2.4.39-4 +- don't automatically convert slapd.conf to slapd-config + * Wed Feb 19 2014 Jan Synáček - 2.4.39-3 - remove redundant sysconfig-related stuff - add documentation reference to service file