From fd5a3e89d6633fd85c0361223d926b0c63917ee96fb8956aa17561bc88dd5a27 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 16 Jul 2024 10:57:44 +0000 Subject: [PATCH 1/3] Accepting request 1187794 from home:scabrero:sssd-conf - Revert the change dropping the default configuration file. If /usr/etc exists will be installed there, otherwise in /etc. (bsc#1226157); OBS-URL: https://build.opensuse.org/request/show/1187794 OBS-URL: https://build.opensuse.org/package/show/network:ldap/sssd?expand=0&rev=314 --- sssd.changes | 7 +++++++ sssd.spec | 20 ++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/sssd.changes b/sssd.changes index 028e4af..ec838e0 100644 --- a/sssd.changes +++ b/sssd.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 11 09:41:21 UTC 2024 - Samuel Cabrero + +- Revert the change dropping the default configuration file. If + /usr/etc exists will be installed there, otherwise in /etc. + (bsc#1226157); + ------------------------------------------------------------------- Thu May 16 12:13:02 UTC 2024 - Jan Engelhardt diff --git a/sssd.spec b/sssd.spec index ccc0c6f..d034c35 100644 --- a/sssd.spec +++ b/sssd.spec @@ -420,6 +420,13 @@ perl -i -lpe 's{%_bindir/python\b}{%_bindir/python3}' src/tools/sss_obfuscate b="%buildroot" # Copy some defaults +%if %{defined _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 +install -D -p -m 0600 src/examples/sssd-example.conf "$b/%_sysconfdir/sssd/sssd.conf" +install -d -m 0755 "$b/%_sysconfdir/sssd/conf.d" +%endif install -d "$b/%_unitdir" %if 0%{?suse_version} > 1500 install -d "$b/%_distconfdir/logrotate.d" @@ -454,10 +461,12 @@ ln -sfv %_sysconfdir/alternatives/%cifs_idmap_name %buildroot/%cifs_idmap_plugin %pre %service_add_pre sssd.service +%if %{defined _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 ||: done +%endif %post /sbin/ldconfig @@ -545,10 +554,12 @@ touch /run/systemd/rpm/sssd-was-active fi %posttrans +%if %{defined _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} ||: done +%endif # Migrate sssd.service from sssd-common to sssd if [ -e /run/systemd/rpm/sssd-was-enabled ]; then systemctl is-enabled sssd.service > /dev/null @@ -657,6 +668,15 @@ fi %attr(755,root,root) %dir %sssdstatedir/mc/ %attr(700,root,root) %dir %sssdstatedir/keytabs/ %attr(750,root,root) %dir %_localstatedir/log/%name/ +%if %{defined _distconfdir} +%dir %{_distconfdir}/sssd/ +%%dir %{_distconfdir}/sssd/conf.d +%config(noreplace) %{_distconfdir}/sssd/sssd.conf +%else +%dir %{_sysconfdir}/sssd/ +%%dir %{_sysconfdir}/sssd/conf.d +%config(noreplace) %{_sysconfdir}/sssd/sssd.conf +%endif %if 0%{?suse_version} > 1500 %_distconfdir/logrotate.d/sssd %_pam_vendordir/sssd-shadowutils From 8ef9d54958062443d1dabe76328741e9654209f2d4c17f16b378f850f19c50df Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 16 Jul 2024 11:04:35 +0000 Subject: [PATCH 2/3] feed through formatter, use more widely used ?expr:1 OBS-URL: https://build.opensuse.org/package/show/network:ldap/sssd?expand=0&rev=315 --- sssd.spec | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/sssd.spec b/sssd.spec index d034c35..41a153c 100644 --- a/sssd.spec +++ b/sssd.spec @@ -420,7 +420,7 @@ perl -i -lpe 's{%_bindir/python\b}{%_bindir/python3}' src/tools/sss_obfuscate b="%buildroot" # 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 -m 0755 "$b/%_distconfdir/sssd/conf.d" %else @@ -451,8 +451,8 @@ find "$b" -type f -name "*.la" -print -delete mkdir -pv %buildroot/%_sysconfdir/alternatives %buildroot/%_sysconfdir/cifs-utils ln -sfv %_sysconfdir/alternatives/%cifs_idmap_name %buildroot/%cifs_idmap_plugin %python3_fix_shebang -%if %{suse_version} >= 1600 -%python3_fix_shebang_path %{buildroot}/%{_libexecdir}/%{name}/ +%if 0%{?suse_version} >= 1600 +%python3_fix_shebang_path %buildroot/%_libexecdir/%name/ %endif %check @@ -461,10 +461,10 @@ ln -sfv %_sysconfdir/alternatives/%cifs_idmap_name %buildroot/%cifs_idmap_plugin %pre %service_add_pre sssd.service -%if %{defined _distconfdir} +%if %{?_distconfdir:1} # 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 ||: + test -f "%_sysconfdir/$i.rpmsave" && mv -v "%_sysconfdir/$i.rpmsave" "%_sysconfdir/$i.rpmsave.old" || : done %endif @@ -554,10 +554,10 @@ touch /run/systemd/rpm/sssd-was-active fi %posttrans -%if %{defined _distconfdir} +%if %{?_distconfdir:1} # 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} ||: + test -f "%_sysconfdir/$i.rpmsave" && mv -v "%_sysconfdir/$i.rpmsave" "%_sysconfdir/$i" || : done %endif # Migrate sssd.service from sssd-common to sssd @@ -668,14 +668,14 @@ fi %attr(755,root,root) %dir %sssdstatedir/mc/ %attr(700,root,root) %dir %sssdstatedir/keytabs/ %attr(750,root,root) %dir %_localstatedir/log/%name/ -%if %{defined _distconfdir} -%dir %{_distconfdir}/sssd/ -%%dir %{_distconfdir}/sssd/conf.d -%config(noreplace) %{_distconfdir}/sssd/sssd.conf +%if %{?_distconfdir:1} +%dir %_distconfdir/sssd/ +%%dir %_distconfdir/sssd/conf.d +%config(noreplace) %_distconfdir/sssd/sssd.conf %else -%dir %{_sysconfdir}/sssd/ -%%dir %{_sysconfdir}/sssd/conf.d -%config(noreplace) %{_sysconfdir}/sssd/sssd.conf +%dir %_sysconfdir/sssd/ +%%dir %_sysconfdir/sssd/conf.d +%config(noreplace) %_sysconfdir/sssd/sssd.conf %endif %if 0%{?suse_version} > 1500 %_distconfdir/logrotate.d/sssd From 75c9ecde1e420da3c5efd7a829951416dddd11ca54b0ae7e0c82d2bf46b1cebf Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 16 Jul 2024 11:11:31 +0000 Subject: [PATCH 3/3] [info=747483e6173b31472d61e166a581bb9c9034cf6a690a8bc476176dd5b5befaba] OBS-URL: https://build.opensuse.org/package/show/network:ldap/sssd?expand=0&rev=316 --- _scmsync.obsinfo | 4 ++++ build.specials.obscpio | 3 +++ 2 files changed, 7 insertions(+) create mode 100644 _scmsync.obsinfo create mode 100644 build.specials.obscpio diff --git a/_scmsync.obsinfo b/_scmsync.obsinfo new file mode 100644 index 0000000..10a45d3 --- /dev/null +++ b/_scmsync.obsinfo @@ -0,0 +1,4 @@ +mtime: 1721128452 +commit: 747483e6173b31472d61e166a581bb9c9034cf6a690a8bc476176dd5b5befaba +url: https://src.opensuse.org/jengelh/sssd +revision: master diff --git a/build.specials.obscpio b/build.specials.obscpio new file mode 100644 index 0000000..114e570 --- /dev/null +++ b/build.specials.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8e9d70dca414f164c37d455e73d3eec0537555e5183567128cf0ef329962fed3 +size 256