forked from jengelh/openldap2
Accepting request 223202 from network:ldap
fix systemd service installation OBS-URL: https://build.opensuse.org/request/show/223202 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openldap2?expand=0&rev=100
This commit is contained in:
commit
33e5f41ae6
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 18 14:39:07 UTC 2014 - ckornacker@suse.com
|
||||
|
||||
- Fix systemd service installation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 12 11:24:08 UTC 2014 - varkoly@suse.com
|
||||
|
||||
|
@ -51,10 +51,11 @@ PreReq: %insserv_prereq %fillup_prereq /usr/sbin/useradd /usr/sbin/group
|
||||
%if 0%{?suse_version} >= 1140
|
||||
# avoid cycle with krb5
|
||||
BuildRequires: krb5-mini
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
Conflicts: openldap-client
|
||||
Requires: libldap-2_4-2 = %{version_main}
|
||||
Requires: systemd
|
||||
%endif
|
||||
Source: openldap-%{version_main}.tgz
|
||||
Source1: openldap-rc.tgz
|
||||
@ -317,10 +318,10 @@ make SLAPD_DEBUG=0 test
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/openldap/
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
|
||||
make STRIP="" DESTDIR=$RPM_BUILD_ROOT install
|
||||
install -m 755 start $RPM_BUILD_ROOT/usr/lib/openldap/start
|
||||
install -m 644 slapd.service $RPM_BUILD_ROOT/usr/lib/systemd/system
|
||||
install -m 644 slapd.service $RPM_BUILD_ROOT/%{_unitdir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/slapd.d
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sasl2
|
||||
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/sasl2/slapd.conf
|
||||
@ -361,6 +362,13 @@ rm -f $RPM_BUILD_ROOT/etc/openldap/schema/README
|
||||
rm -f $RPM_BUILD_ROOT/etc/openldap/slapd.ldif*
|
||||
rm -f $RPM_BUILD_ROOT/var/run/slapd/openldap-data/DB_CONFIG.example
|
||||
mv servers/slapd/back-sql/rdbms_depend servers/slapd/back-sql/examples
|
||||
# Provide SUSE policy symlink /usr/sbin/rcFOO -> /etc/init.d/FOO
|
||||
# /usr/sbin/service exists only since openSUSE 12.3:
|
||||
%if 0%{?suse_version} > 1220
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcslapd
|
||||
%else
|
||||
ln -s /sbin/service %{buildroot}%{_sbindir}/rcslapd
|
||||
%endif
|
||||
%if %suse_version < 1130
|
||||
# install 2.3 slapcat
|
||||
install -m 755 ../openldap-2.3.37/servers/slapd/slapcat $RPM_BUILD_ROOT/usr/sbin/openldap-2.3-slapcat
|
||||
@ -386,6 +394,7 @@ cat >openldap2.filelist <<EOF
|
||||
/var/adm/fillup-templates/sysconfig.openldap
|
||||
%config /etc/sysconfig/SuSEfirewall2.d/services/openldap
|
||||
/usr/sbin/slap*
|
||||
/usr/sbin/rcslapd
|
||||
%dir /etc/sasl2
|
||||
%dir /etc/openldap
|
||||
%dir %attr(0770, ldap, ldap) /etc/openldap/slapd.d
|
||||
@ -540,6 +549,7 @@ then
|
||||
cp -p --remove-destination /etc/openldap/schema/* $TEMPDIR
|
||||
echo $TEMPDIR > /etc/openldap/UPDATE_NEEDED ;
|
||||
fi
|
||||
%service_add_pre slapd.service
|
||||
|
||||
%post
|
||||
if [ ${1:-0} -gt 1 ] && [ -f %{_libdir}/sasl2/slapd.conf ] ; then
|
||||
@ -548,12 +558,13 @@ if [ ${1:-0} -gt 1 ] && [ -f %{_libdir}/sasl2/slapd.conf ] ; then
|
||||
fi
|
||||
%{fillup_only -n openldap ldap}
|
||||
%{remove_and_set -n openldap OPENLDAP_RUN_DB_RECOVER}
|
||||
%service_add_post slapd.service
|
||||
|
||||
%preun
|
||||
%stop_on_removal ldap
|
||||
%service_del_preun slapd.service
|
||||
|
||||
%postun
|
||||
%restart_on_update ldap
|
||||
%service_del_postun slapd.service
|
||||
|
||||
%post -n compat-libldap-2_3-0 -p /sbin/ldconfig
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 18 14:39:07 UTC 2014 - ckornacker@suse.com
|
||||
|
||||
- Fix systemd service installation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 12 11:24:08 UTC 2014 - varkoly@suse.com
|
||||
|
||||
|
@ -51,10 +51,11 @@ PreReq: %insserv_prereq %fillup_prereq /usr/sbin/useradd /usr/sbin/group
|
||||
%if 0%{?suse_version} >= 1140
|
||||
# avoid cycle with krb5
|
||||
BuildRequires: krb5-mini
|
||||
BuildRequires: pkgconfig(systemd)
|
||||
%{?systemd_requires}
|
||||
%endif
|
||||
Conflicts: openldap-client
|
||||
Requires: libldap-2_4-2 = %{version_main}
|
||||
Requires: systemd
|
||||
%endif
|
||||
Source: openldap-%{version_main}.tgz
|
||||
Source1: openldap-rc.tgz
|
||||
@ -317,10 +318,10 @@ make SLAPD_DEBUG=0 test
|
||||
%install
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/openldap/
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/systemd/system
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_unitdir}
|
||||
make STRIP="" DESTDIR=$RPM_BUILD_ROOT install
|
||||
install -m 755 start $RPM_BUILD_ROOT/usr/lib/openldap/start
|
||||
install -m 644 slapd.service $RPM_BUILD_ROOT/usr/lib/systemd/system
|
||||
install -m 644 slapd.service $RPM_BUILD_ROOT/%{_unitdir}
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/openldap/slapd.d
|
||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sasl2
|
||||
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/sasl2/slapd.conf
|
||||
@ -361,6 +362,13 @@ rm -f $RPM_BUILD_ROOT/etc/openldap/schema/README
|
||||
rm -f $RPM_BUILD_ROOT/etc/openldap/slapd.ldif*
|
||||
rm -f $RPM_BUILD_ROOT/var/run/slapd/openldap-data/DB_CONFIG.example
|
||||
mv servers/slapd/back-sql/rdbms_depend servers/slapd/back-sql/examples
|
||||
# Provide SUSE policy symlink /usr/sbin/rcFOO -> /etc/init.d/FOO
|
||||
# /usr/sbin/service exists only since openSUSE 12.3:
|
||||
%if 0%{?suse_version} > 1220
|
||||
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcslapd
|
||||
%else
|
||||
ln -s /sbin/service %{buildroot}%{_sbindir}/rcslapd
|
||||
%endif
|
||||
%if %suse_version < 1130
|
||||
# install 2.3 slapcat
|
||||
install -m 755 ../openldap-2.3.37/servers/slapd/slapcat $RPM_BUILD_ROOT/usr/sbin/openldap-2.3-slapcat
|
||||
@ -386,6 +394,7 @@ cat >openldap2.filelist <<EOF
|
||||
/var/adm/fillup-templates/sysconfig.openldap
|
||||
%config /etc/sysconfig/SuSEfirewall2.d/services/openldap
|
||||
/usr/sbin/slap*
|
||||
/usr/sbin/rcslapd
|
||||
%dir /etc/sasl2
|
||||
%dir /etc/openldap
|
||||
%dir %attr(0770, ldap, ldap) /etc/openldap/slapd.d
|
||||
@ -540,6 +549,7 @@ then
|
||||
cp -p --remove-destination /etc/openldap/schema/* $TEMPDIR
|
||||
echo $TEMPDIR > /etc/openldap/UPDATE_NEEDED ;
|
||||
fi
|
||||
%service_add_pre slapd.service
|
||||
|
||||
%post
|
||||
if [ ${1:-0} -gt 1 ] && [ -f %{_libdir}/sasl2/slapd.conf ] ; then
|
||||
@ -548,12 +558,13 @@ if [ ${1:-0} -gt 1 ] && [ -f %{_libdir}/sasl2/slapd.conf ] ; then
|
||||
fi
|
||||
%{fillup_only -n openldap ldap}
|
||||
%{remove_and_set -n openldap OPENLDAP_RUN_DB_RECOVER}
|
||||
%service_add_post slapd.service
|
||||
|
||||
%preun
|
||||
%stop_on_removal ldap
|
||||
%service_del_preun slapd.service
|
||||
|
||||
%postun
|
||||
%restart_on_update ldap
|
||||
%service_del_postun slapd.service
|
||||
|
||||
%post -n compat-libldap-2_3-0 -p /sbin/ldconfig
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user