feed through formatter, use more widely used ?expr:1

OBS-URL: https://build.opensuse.org/package/show/network:ldap/sssd?expand=0&rev=315
This commit is contained in:
Jan Engelhardt 2024-07-16 11:04:35 +00:00 committed by Git OBS Bridge
parent fd5a3e89d6
commit 8ef9d54958

View File

@ -420,7 +420,7 @@ perl -i -lpe 's{%_bindir/python\b}{%_bindir/python3}' src/tools/sss_obfuscate
b="%buildroot" b="%buildroot"
# Copy some defaults # Copy some defaults
%if %{defined _distconfdir} %if %{?_distconfdir:1}
install -D -p -m 0600 src/examples/sssd-example.conf "$b/%_distconfdir/sssd/sssd.conf" install -D -p -m 0600 src/examples/sssd-example.conf "$b/%_distconfdir/sssd/sssd.conf"
install -d -m 0755 "$b/%_distconfdir/sssd/conf.d" install -d -m 0755 "$b/%_distconfdir/sssd/conf.d"
%else %else
@ -451,8 +451,8 @@ find "$b" -type f -name "*.la" -print -delete
mkdir -pv %buildroot/%_sysconfdir/alternatives %buildroot/%_sysconfdir/cifs-utils mkdir -pv %buildroot/%_sysconfdir/alternatives %buildroot/%_sysconfdir/cifs-utils
ln -sfv %_sysconfdir/alternatives/%cifs_idmap_name %buildroot/%cifs_idmap_plugin ln -sfv %_sysconfdir/alternatives/%cifs_idmap_name %buildroot/%cifs_idmap_plugin
%python3_fix_shebang %python3_fix_shebang
%if %{suse_version} >= 1600 %if 0%{?suse_version} >= 1600
%python3_fix_shebang_path %{buildroot}/%{_libexecdir}/%{name}/ %python3_fix_shebang_path %buildroot/%_libexecdir/%name/
%endif %endif
%check %check
@ -461,10 +461,10 @@ ln -sfv %_sysconfdir/alternatives/%cifs_idmap_name %buildroot/%cifs_idmap_plugin
%pre %pre
%service_add_pre sssd.service %service_add_pre sssd.service
%if %{defined _distconfdir} %if %{?_distconfdir:1}
# Prepare for migration to /usr/etc; save any old .rpmsave # Prepare for migration to /usr/etc; save any old .rpmsave
for i in sssd/sssd.conf pam.d/sssd-shadowutils logrotate.d/sssd ; do for i in sssd/sssd.conf pam.d/sssd-shadowutils logrotate.d/sssd ; do
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i}.rpmsave.old ||: test -f "%_sysconfdir/$i.rpmsave" && mv -v "%_sysconfdir/$i.rpmsave" "%_sysconfdir/$i.rpmsave.old" || :
done done
%endif %endif
@ -554,10 +554,10 @@ touch /run/systemd/rpm/sssd-was-active
fi fi
%posttrans %posttrans
%if %{defined _distconfdir} %if %{?_distconfdir:1}
# Migration to /usr/etc, restore just created .rpmsave # Migration to /usr/etc, restore just created .rpmsave
for i in sssd/sssd.conf logrotate.d/sssd pam.d/sssd-shadowutils ; do for i in sssd/sssd.conf logrotate.d/sssd pam.d/sssd-shadowutils ; do
test -f %{_sysconfdir}/${i}.rpmsave && mv -v %{_sysconfdir}/${i}.rpmsave %{_sysconfdir}/${i} ||: test -f "%_sysconfdir/$i.rpmsave" && mv -v "%_sysconfdir/$i.rpmsave" "%_sysconfdir/$i" || :
done done
%endif %endif
# Migrate sssd.service from sssd-common to sssd # Migrate sssd.service from sssd-common to sssd
@ -668,14 +668,14 @@ fi
%attr(755,root,root) %dir %sssdstatedir/mc/ %attr(755,root,root) %dir %sssdstatedir/mc/
%attr(700,root,root) %dir %sssdstatedir/keytabs/ %attr(700,root,root) %dir %sssdstatedir/keytabs/
%attr(750,root,root) %dir %_localstatedir/log/%name/ %attr(750,root,root) %dir %_localstatedir/log/%name/
%if %{defined _distconfdir} %if %{?_distconfdir:1}
%dir %{_distconfdir}/sssd/ %dir %_distconfdir/sssd/
%%dir %{_distconfdir}/sssd/conf.d %%dir %_distconfdir/sssd/conf.d
%config(noreplace) %{_distconfdir}/sssd/sssd.conf %config(noreplace) %_distconfdir/sssd/sssd.conf
%else %else
%dir %{_sysconfdir}/sssd/ %dir %_sysconfdir/sssd/
%%dir %{_sysconfdir}/sssd/conf.d %%dir %_sysconfdir/sssd/conf.d
%config(noreplace) %{_sysconfdir}/sssd/sssd.conf %config(noreplace) %_sysconfdir/sssd/sssd.conf
%endif %endif
%if 0%{?suse_version} > 1500 %if 0%{?suse_version} > 1500
%_distconfdir/logrotate.d/sssd %_distconfdir/logrotate.d/sssd