avoid combining && and ||

drop init-dir

OBS-URL: https://build.opensuse.org/package/show/network:ldap/sssd?expand=0&rev=293
This commit is contained in:
Jan Engelhardt 2023-10-31 16:22:04 +00:00 committed by Git OBS Bridge
parent aa747329c7
commit cdb36fb4bb

View File

@ -96,7 +96,7 @@ Obsoletes: libsss_sudo < %version-%release
%define ldbdir %(pkg-config ldb --variable=modulesdir)
# Both SSSD and cifs-utils provide an idmap plugin for cifs.ko
# /etc/cifs-utils/idmap-plugin should be a symlink to one of the 2 idmap plugins
# %_sysconfdir/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
@ -117,7 +117,7 @@ services for projects like FreeIPA.
Summary: The ActiveDirectory backend plugin for sssd
License: GPL-3.0-or-later
Group: System/Daemons
Requires: %name-krb5-common = %{version}-%{release}
Requires: %name-krb5-common = %version-%release
Requires: adcli
%description ad
@ -163,7 +163,7 @@ caches.
Summary: The Kerberos authentication backend plugin for sssd
License: GPL-3.0-or-later
Group: System/Daemons
Requires: %name-krb5-common = %{version}-%{release}
Requires: %name-krb5-common = %version-%release
%description krb5
Provides the Kerberos back end that the SSSD can utilize authenticate
@ -183,7 +183,7 @@ use for Kerberos user or host authentication.
Summary: The LDAP backend plugin for sssd
License: GPL-3.0-or-later
Group: System/Daemons
Requires: %name-krb5-common = %{version}-%{release}
Requires: %name-krb5-common = %version-%release
%description ldap
Provides the LDAP back end that the SSSD can utilize to fetch
@ -202,7 +202,7 @@ and/or PAM modules to leverage SSSD caching.
Summary: Commandline tools for sssd
License: GPL-3.0-or-later AND LGPL-3.0-or-later
Group: System/Management
Requires: python3-sssd-config = %{version}-%{release}
Requires: python3-sssd-config = %version-%release
Requires: sssd = %version
%description tools
@ -358,7 +358,6 @@ autoreconf -fiv
--with-pipe-path="%pipepath" \
--with-pubconf-path="%pubconfpath" \
--with-gpo-cache-path="%gpocachepath" \
--with-init-dir="%_initrddir" \
--with-environment-file="%_sysconfdir/sysconfig/sssd" \
--with-initscript=systemd \
--with-syslog=journald \
@ -378,7 +377,7 @@ autoreconf -fiv
%install
# sss_obfuscate is compatible with both python 2 and 3
perl -i -lpe 's{%_bindir/python\b}{%_bindir/python3}' src/tools/sss_obfuscate
%make_install dbuspolicydir=%{_datadir}/dbus-1/system.d
%make_install dbuspolicydir=%_datadir/dbus-1/system.d
b="%buildroot"
# Copy some defaults
@ -411,7 +410,9 @@ ln -sfv %_sysconfdir/alternatives/%cifs_idmap_name %buildroot/%cifs_idmap_plugin
%if 0%{?suse_version} > 1500
# Prepare for migration to /usr/etc; save any old .rpmsave
for i in pam.d/sssd-shadowutils logrotate.d/sssd ; do
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||:
if [ -f "%_sysconfdir/$i.rpmsave" ]; then
mv -v "%_sysconfdir/$i.rpmsave" "%_sysconfdir/$i.rpmsave.old" || :
fi
done
%endif
@ -450,7 +451,7 @@ fi
%post -n libsss_nss_idmap0 -p /sbin/ldconfig
%postun -n libsss_nss_idmap0 -p /sbin/ldconfig
%triggerun -- %{name} < %{version}-%{release}
%triggerun -- %name < %version-%release
# sssd takes care of upgrading the database but it doesn't handle downgrades.
# Clear caches when downgrading the package, which may have an
# incompatible format afterwards preventing the daemon from startup.
@ -487,7 +488,9 @@ fi
%posttrans
# Migration to /usr/etc, restore just created .rpmsave
for i in logrotate.d/sssd pam.d/sssd-shadowutils ; do
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||:
if [ -f "%_sysconfdir/$i.rpmsave" ]; then
mv -v "%_sysconfdir/$i.rpmsave" "%_sysconfdir/$i.rpmsave.old" || :
fi
done
%endif
@ -579,7 +582,7 @@ done
%_datadir/%name/sssd.api.conf
%dir %_datadir/%name/sssd.api.d/
%_datadir/%name/sssd.api.d/sssd-simple.conf
%exclude /usr/share/man/*/*/sssd-files.5.gz
%exclude %_mandir/*/*/sssd-files.5.gz
#
# sssd-client
#