fix systemd service installation
OBS-URL: https://build.opensuse.org/package/show/network:ldap/openldap2?expand=0&rev=111
This commit is contained in:
parent
23b5d4c8e8
commit
19017bed2e
@ -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
|
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
|
%if 0%{?suse_version} >= 1140
|
||||||
# avoid cycle with krb5
|
# avoid cycle with krb5
|
||||||
BuildRequires: krb5-mini
|
BuildRequires: krb5-mini
|
||||||
|
BuildRequires: systemd
|
||||||
|
%{?systemd_requires}
|
||||||
%endif
|
%endif
|
||||||
Conflicts: openldap-client
|
Conflicts: openldap-client
|
||||||
Requires: libldap-2_4-2 = %{version_main}
|
Requires: libldap-2_4-2 = %{version_main}
|
||||||
Requires: systemd
|
|
||||||
%endif
|
%endif
|
||||||
Source: openldap-%{version_main}.tgz
|
Source: openldap-%{version_main}.tgz
|
||||||
Source1: openldap-rc.tgz
|
Source1: openldap-rc.tgz
|
||||||
@ -317,10 +318,10 @@ make SLAPD_DEBUG=0 test
|
|||||||
%install
|
%install
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/openldap/
|
mkdir -p $RPM_BUILD_ROOT/usr/lib/openldap/
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
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
|
make STRIP="" DESTDIR=$RPM_BUILD_ROOT install
|
||||||
install -m 755 start $RPM_BUILD_ROOT/usr/lib/openldap/start
|
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}/openldap/slapd.d
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sasl2
|
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sasl2
|
||||||
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/sasl2/slapd.conf
|
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/etc/openldap/slapd.ldif*
|
||||||
rm -f $RPM_BUILD_ROOT/var/run/slapd/openldap-data/DB_CONFIG.example
|
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
|
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
|
%if %suse_version < 1130
|
||||||
# install 2.3 slapcat
|
# install 2.3 slapcat
|
||||||
install -m 755 ../openldap-2.3.37/servers/slapd/slapcat $RPM_BUILD_ROOT/usr/sbin/openldap-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
|
/var/adm/fillup-templates/sysconfig.openldap
|
||||||
%config /etc/sysconfig/SuSEfirewall2.d/services/openldap
|
%config /etc/sysconfig/SuSEfirewall2.d/services/openldap
|
||||||
/usr/sbin/slap*
|
/usr/sbin/slap*
|
||||||
|
/usr/sbin/rcslapd
|
||||||
%dir /etc/sasl2
|
%dir /etc/sasl2
|
||||||
%dir /etc/openldap
|
%dir /etc/openldap
|
||||||
%dir %attr(0770, ldap, ldap) /etc/openldap/slapd.d
|
%dir %attr(0770, ldap, ldap) /etc/openldap/slapd.d
|
||||||
@ -540,6 +549,7 @@ then
|
|||||||
cp -p --remove-destination /etc/openldap/schema/* $TEMPDIR
|
cp -p --remove-destination /etc/openldap/schema/* $TEMPDIR
|
||||||
echo $TEMPDIR > /etc/openldap/UPDATE_NEEDED ;
|
echo $TEMPDIR > /etc/openldap/UPDATE_NEEDED ;
|
||||||
fi
|
fi
|
||||||
|
%service_add_pre slapd.service
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ ${1:-0} -gt 1 ] && [ -f %{_libdir}/sasl2/slapd.conf ] ; then
|
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
|
fi
|
||||||
%{fillup_only -n openldap ldap}
|
%{fillup_only -n openldap ldap}
|
||||||
%{remove_and_set -n openldap OPENLDAP_RUN_DB_RECOVER}
|
%{remove_and_set -n openldap OPENLDAP_RUN_DB_RECOVER}
|
||||||
|
%service_add_post slapd.service
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%stop_on_removal ldap
|
%service_del_preun slapd.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%restart_on_update ldap
|
%service_del_postun slapd.service
|
||||||
|
|
||||||
%post -n compat-libldap-2_3-0 -p /sbin/ldconfig
|
%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
|
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
|
%if 0%{?suse_version} >= 1140
|
||||||
# avoid cycle with krb5
|
# avoid cycle with krb5
|
||||||
BuildRequires: krb5-mini
|
BuildRequires: krb5-mini
|
||||||
|
BuildRequires: systemd
|
||||||
|
%{?systemd_requires}
|
||||||
%endif
|
%endif
|
||||||
Conflicts: openldap-client
|
Conflicts: openldap-client
|
||||||
Requires: libldap-2_4-2 = %{version_main}
|
Requires: libldap-2_4-2 = %{version_main}
|
||||||
Requires: systemd
|
|
||||||
%endif
|
%endif
|
||||||
Source: openldap-%{version_main}.tgz
|
Source: openldap-%{version_main}.tgz
|
||||||
Source1: openldap-rc.tgz
|
Source1: openldap-rc.tgz
|
||||||
@ -317,10 +318,10 @@ make SLAPD_DEBUG=0 test
|
|||||||
%install
|
%install
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/lib/openldap/
|
mkdir -p $RPM_BUILD_ROOT/usr/lib/openldap/
|
||||||
mkdir -p $RPM_BUILD_ROOT/usr/sbin
|
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
|
make STRIP="" DESTDIR=$RPM_BUILD_ROOT install
|
||||||
install -m 755 start $RPM_BUILD_ROOT/usr/lib/openldap/start
|
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}/openldap/slapd.d
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sasl2
|
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/sasl2
|
||||||
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT/%{_sysconfdir}/sasl2/slapd.conf
|
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/etc/openldap/slapd.ldif*
|
||||||
rm -f $RPM_BUILD_ROOT/var/run/slapd/openldap-data/DB_CONFIG.example
|
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
|
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
|
%if %suse_version < 1130
|
||||||
# install 2.3 slapcat
|
# install 2.3 slapcat
|
||||||
install -m 755 ../openldap-2.3.37/servers/slapd/slapcat $RPM_BUILD_ROOT/usr/sbin/openldap-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
|
/var/adm/fillup-templates/sysconfig.openldap
|
||||||
%config /etc/sysconfig/SuSEfirewall2.d/services/openldap
|
%config /etc/sysconfig/SuSEfirewall2.d/services/openldap
|
||||||
/usr/sbin/slap*
|
/usr/sbin/slap*
|
||||||
|
/usr/sbin/rcslapd
|
||||||
%dir /etc/sasl2
|
%dir /etc/sasl2
|
||||||
%dir /etc/openldap
|
%dir /etc/openldap
|
||||||
%dir %attr(0770, ldap, ldap) /etc/openldap/slapd.d
|
%dir %attr(0770, ldap, ldap) /etc/openldap/slapd.d
|
||||||
@ -540,6 +549,7 @@ then
|
|||||||
cp -p --remove-destination /etc/openldap/schema/* $TEMPDIR
|
cp -p --remove-destination /etc/openldap/schema/* $TEMPDIR
|
||||||
echo $TEMPDIR > /etc/openldap/UPDATE_NEEDED ;
|
echo $TEMPDIR > /etc/openldap/UPDATE_NEEDED ;
|
||||||
fi
|
fi
|
||||||
|
%service_add_pre slapd.service
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ ${1:-0} -gt 1 ] && [ -f %{_libdir}/sasl2/slapd.conf ] ; then
|
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
|
fi
|
||||||
%{fillup_only -n openldap ldap}
|
%{fillup_only -n openldap ldap}
|
||||||
%{remove_and_set -n openldap OPENLDAP_RUN_DB_RECOVER}
|
%{remove_and_set -n openldap OPENLDAP_RUN_DB_RECOVER}
|
||||||
|
%service_add_post slapd.service
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
%stop_on_removal ldap
|
%service_del_preun slapd.service
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%restart_on_update ldap
|
%service_del_postun slapd.service
|
||||||
|
|
||||||
%post -n compat-libldap-2_3-0 -p /sbin/ldconfig
|
%post -n compat-libldap-2_3-0 -p /sbin/ldconfig
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user