adapt style to rest of file

OBS-URL: https://build.opensuse.org/package/show/network:ldap/sssd?expand=0&rev=245
This commit is contained in:
Jan Engelhardt 2021-04-13 11:24:53 +00:00 committed by Git OBS Bridge
parent a632f91ef5
commit 0d8eb32bb7

View File

@ -41,8 +41,8 @@ Patch1: krb-noversion.diff
# /etc/cifs-utils/idmap-plugin should be a symlink to one of the 2 idmap plugins
# * cifs-utils one is the default (priority 20)
# * installing SSSD should NOT switch to SSSD plugin (priority 10)
%define cifs_idmap_plugin %{_sysconfdir}/cifs-utils/idmap-plugin
%define cifs_idmap_lib %{_libdir}/cifs-utils/cifs_idmap_sss.so
%define cifs_idmap_plugin %_sysconfdir/cifs-utils/idmap-plugin
%define cifs_idmap_lib %_libdir/cifs-utils/cifs_idmap_sss.so
%define cifs_idmap_name cifs-idmap-plugin
%define cifs_idmap_priority 10
Requires(post): update-alternatives
@ -362,14 +362,7 @@ Security Services Daemon (sssd).
%autosetup -p1
%build
%if 0%{?suse_version} < 1210
# pkgconfig file not present
export LDB_LIBS="-lldb"
export LDB_CFLAGS=" "
export LDB_DIR="%_libdir/ldb"
%else
export LDB_DIR="$(pkg-config ldb --variable=modulesdir)"
%endif
# help configure find nscd
export PATH="$PATH:/usr/sbin"
@ -422,8 +415,8 @@ find "$b" -type f -name "*.la" -print -delete
%find_lang %name --all-name
# dummy target for cifs-idmap-plugin
mkdir -p %{buildroot}%{_sysconfdir}/alternatives %{buildroot}%{_sysconfdir}/cifs-utils
ln -s -f %{_sysconfdir}/alternatives/%{cifs_idmap_name} %{buildroot}%{cifs_idmap_plugin}
mkdir -p %buildroot/%_sysconfdir/alternatives %buildroot/%_sysconfdir/cifs-utils
ln -sfv %_sysconfdir/alternatives/%cifs_idmap_name %buildroot/%cifs_idmap_plugin
%check
# sss_config-tests fails
@ -440,7 +433,7 @@ ln -s -f %{_sysconfdir}/alternatives/%{cifs_idmap_name} %{buildroot}%{cifs_idmap
%service_add_post %services
# install SSSD cifs-idmap plugin as an alternative
update-alternatives --install %{cifs_idmap_plugin} %{cifs_idmap_name} %{cifs_idmap_lib} %{cifs_idmap_priority}
update-alternatives --install %cifs_idmap_plugin %cifs_idmap_name %cifs_idmap_lib %cifs_idmap_priority
%preun
%service_del_preun %services
@ -456,8 +449,8 @@ rm -f /var/lib/sss/db/*.ldb
# del_postun includes a try-restart
%service_del_postun %services
if [ ! -f %{cifs_idmap_lib} ] ; then
update-alternatives --remove %{cifs_idmap_name} %{cifs_idmap_lib}
if [ ! -f "%cifs_idmap_lib" ]; then
update-alternatives --remove %cifs_idmap_name %cifs_idmap_lib
fi
%post -n libsss_certmap0 -p /sbin/ldconfig
@ -610,10 +603,10 @@ fi
%_mandir/man8/sssd_krb5_locator_plugin.8*
# cifs idmap plugin
%dir %_sysconfdir/cifs-utils
%{cifs_idmap_plugin}
%cifs_idmap_plugin
%dir %_libdir/cifs-utils
%{cifs_idmap_lib}
%ghost %_sysconfdir/alternatives/%{cifs_idmap_name}
%cifs_idmap_lib
%ghost %_sysconfdir/alternatives/%cifs_idmap_name
%files ad
%dir %_libdir/%name/