diff --git a/sssd.spec b/sssd.spec index d64fa74..17e610d 100644 --- a/sssd.spec +++ b/sssd.spec @@ -427,7 +427,7 @@ perl -i -lpe 's{%_bindir/python\b}{%_bindir/python3}' src/tools/sss_obfuscate b="%buildroot" # Copy some defaults -%if "%{_distconfdir}" != "" +%if "%{?_distconfdir}" != "" install -D -p -m 0600 src/examples/sssd-example.conf "$b/%_distconfdir/sssd/sssd.conf" install -d -m 0755 "$b/%_distconfdir/sssd/conf.d" %else @@ -471,7 +471,7 @@ sed -i '1s@#!.*python.*@#!%{_bindir}/python3.11@' %{buildroot}/%{_libexecdir}/%{ %pre %service_add_pre sssd.service -%if "%{_distconfdir}" != "" +%if "%{?_distconfdir}" != "" # Prepare for migration to /usr/etc; save any old .rpmsave 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" || : @@ -564,7 +564,7 @@ touch /run/systemd/rpm/sssd-was-active fi %posttrans -%if "%{_distconfdir}" != "" +%if "%{?_distconfdir}" != "" # Migration to /usr/etc, restore just created .rpmsave 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" || : @@ -678,7 +678,7 @@ fi %attr(755,root,root) %dir %sssdstatedir/mc/ %attr(700,root,root) %dir %sssdstatedir/keytabs/ %attr(750,root,root) %dir %_localstatedir/log/%name/ -%if "%{_distconfdir}" != "" +%if "%{?_distconfdir}" != "" %dir %_distconfdir/sssd/ %%dir %_distconfdir/sssd/conf.d %config(noreplace) %_distconfdir/sssd/sssd.conf