diff --git a/.gitignore b/.gitignore index a455dd8..bdf6580 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ /authselect-1.1.tar.gz /authselect-1.2.tar.gz /authselect-1.2.1.tar.gz +/authselect-1.2.2.tar.gz diff --git a/authselect.spec b/authselect.spec index 29fa09e..37f0895 100644 --- a/authselect.spec +++ b/authselect.spec @@ -2,17 +2,14 @@ %define _empty_manifest_terminate_build 0 Name: authselect -Version: 1.2.1 -Release: 4%{?dist} +Version: 1.2.2 +Release: 1%{?dist} Summary: Configures authentication and identity sources from supported profiles URL: https://github.com/authselect/authselect License: GPLv3+ Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz -Patch0001: 0001-utils-correctly-remove-the-whole-line-if-str-does-no.patch -Patch0002: 0002-profiles-add-support-for-resolved.patch - %global makedir %{_builddir}/%{name}-%{version} BuildRequires: autoconf @@ -122,6 +119,16 @@ find $RPM_BUILD_ROOT -name "*.a" -exec %__rm -f {} \; %files libs -f %{name}.lang -f %{name}-profiles.5.lang %dir %{_sysconfdir}/authselect %dir %{_sysconfdir}/authselect/custom +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/authselect.conf +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/dconf-db +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/dconf-locks +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/fingerprint-auth +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/nsswitch.conf +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/password-auth +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/postlogin +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/smartcard-auth +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/system-auth +%ghost %attr(0644,root,root) %{_sysconfdir}/authselect/user-nsswitch.conf %dir %{_localstatedir}/lib/authselect %ghost %attr(0755,root,root) %{_localstatedir}/lib/authselect/backups/ %ghost %attr(0644,root,root) %{_localstatedir}/lib/authselect/dconf-db @@ -198,6 +205,15 @@ find $RPM_BUILD_ROOT -name "*.a" -exec %__rm -f {} \; %global validfile %{_localstatedir}/lib/rpm-state/%{name}.config-valid +%preun +if [ $1 == 0 ] ; then + # Remove authselect symbolic links so all authselect files can be + # deleted safely. If this fail, the uninstallation must fail to avoid + # breaking the system by removing PAM files. However, the command can + # only fail if it can not write to the file system. + %{_bindir}/authselect uninstall +fi + %pre libs %__rm -f %{validfile} if [ $1 -gt 1 ] ; then @@ -237,6 +253,14 @@ if [ -f %{validfile} ]; then %__rm -f %{validfile} fi +# Add nss-altfiles if we are on Silverblue +if %__grep -i silverblue /etc/os-release &> /dev/null; then + for PROFILE in `ls %{_datadir}/authselect/default`; do + %{_bindir}/authselect create-profile $PROFILE --vendor --base-on $PROFILE --symlink-pam --symlink-dconf --symlink=REQUIREMENTS --symlink=README &> /dev/null + %__sed -ie "s/^\(passwd\|group\):\(.*\)systemd\(.*\)/\1:\2systemd altfiles\3/g" %{_datadir}/authselect/vendor/$PROFILE/nsswitch.conf &> /dev/null + done +fi + # Apply any changes to profiles (validates configuration first internally) %{_bindir}/authselect apply-changes &> /dev/null @@ -265,6 +289,10 @@ exit 0 exit 0 %changelog +* Wed Nov 25 2020 Pavel Březina - 1.2.2-1 +- Rebase to 1.2.2 +- Add nss-altfiles to profiles on Fedora Silverblue + * Mon Jul 27 2020 Fedora Release Engineering - 1.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 4b38f4a..65033db 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (authselect-1.2.1.tar.gz) = 50eb364244b9f9a572f0d54303c87045e6d0867ab3fcaa2cf253202ee9f7e4c80ce390c03225f6cd6a9cf0e2af01079288a37fdc74f099a70178001e921077d6 +SHA512 (authselect-1.2.2.tar.gz) = 3d75eba6ba1771a71a9c60d817064c9cd46bf03515b75a855ac15aed28c7b2b851e33aff3ebbc8092fcb07a9d86607ebe0199208b1be9839b5bddeba68020faf