From 6da90bda0d29847aadf3f5e578e514886c783d95 Mon Sep 17 00:00:00 2001 From: Pavel Březina Date: Jun 13 2019 10:35:45 +0000 Subject: authselect-1.1-1: rebase to 1.1 --- diff --git a/.gitignore b/.gitignore index 0a2f060..34c8866 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /authselect-1.0.1.tar.gz /authselect-1.0.2.tar.gz /authselect-1.0.3.tar.gz +/authselect-1.1.tar.gz diff --git a/authselect.spec b/authselect.spec index 113ec71..a968626 100644 --- a/authselect.spec +++ b/authselect.spec @@ -1,5 +1,8 @@ +# Do not terminate build if language files are empty. +%define _empty_manifest_terminate_build 0 + Name: authselect -Version: 1.0.3 +Version: 1.1 Release: 1%{?dist} Summary: Configures authentication and identity sources from supported profiles URL: https://github.com/pbrezina/authselect @@ -93,7 +96,7 @@ done # It is not possible to use wildcards here so we need to use 'find' %if 0%{?rhel} find "%{makedir}/po" "%{makedir}/src/man/po" -name "*.po" -delete -rm "%{makedir}/po/LINGUAS" +%__rm "%{makedir}/po/LINGUAS" %setup -T -D -a 1 %endif @@ -115,11 +118,11 @@ autoreconf -if %find_lang %{name}-profiles %{name}-profiles.5.lang --with-man # We want this file to contain only manual page translations -sed -i '/LC_MESSAGES/d' %{name}.8.lang +%__sed -i '/LC_MESSAGES/d' %{name}.8.lang # Remove .la and .a files created by libtool -find $RPM_BUILD_ROOT -name "*.la" -exec rm -f {} \; -find $RPM_BUILD_ROOT -name "*.a" -exec rm -f {} \; +find $RPM_BUILD_ROOT -name "*.la" -exec %__rm -f {} \; +find $RPM_BUILD_ROOT -name "*.a" -exec %__rm -f {} \; %ldconfig_scriptlets libs @@ -127,16 +130,16 @@ find $RPM_BUILD_ROOT -name "*.a" -exec rm -f {} \; %dir %{_sysconfdir}/authselect %dir %{_sysconfdir}/authselect/custom %dir %{_localstatedir}/lib/authselect -%ghost %attr(755,root,root) %{_localstatedir}/lib/authselect/backups/ -%ghost %attr(644,root,root) %{_localstatedir}/lib/authselect/dconf-db -%ghost %attr(644,root,root) %{_localstatedir}/lib/authselect/dconf-locks -%ghost %attr(644,root,root) %{_localstatedir}/lib/authselect/fingerprint-auth -%ghost %attr(644,root,root) %{_localstatedir}/lib/authselect/nsswitch.conf -%ghost %attr(644,root,root) %{_localstatedir}/lib/authselect/password-auth -%ghost %attr(644,root,root) %{_localstatedir}/lib/authselect/postlogin -%ghost %attr(644,root,root) %{_localstatedir}/lib/authselect/smartcard-auth -%ghost %attr(644,root,root) %{_localstatedir}/lib/authselect/system-auth -%ghost %attr(644,root,root) %{_localstatedir}/lib/authselect/user-nsswitch-created +%ghost %attr(0755,root,root) %{_localstatedir}/lib/authselect/backups/ +%ghost %attr(0644,root,root) %{_localstatedir}/lib/authselect/dconf-db +%ghost %attr(0644,root,root) %{_localstatedir}/lib/authselect/dconf-locks +%ghost %attr(0644,root,root) %{_localstatedir}/lib/authselect/fingerprint-auth +%ghost %attr(0644,root,root) %{_localstatedir}/lib/authselect/nsswitch.conf +%ghost %attr(0644,root,root) %{_localstatedir}/lib/authselect/password-auth +%ghost %attr(0644,root,root) %{_localstatedir}/lib/authselect/postlogin +%ghost %attr(0644,root,root) %{_localstatedir}/lib/authselect/smartcard-auth +%ghost %attr(0644,root,root) %{_localstatedir}/lib/authselect/system-auth +%ghost %attr(0644,root,root) %{_localstatedir}/lib/authselect/user-nsswitch-created %dir %{_datadir}/authselect %dir %{_datadir}/authselect/vendor %dir %{_datadir}/authselect/default @@ -191,11 +194,12 @@ find $RPM_BUILD_ROOT -name "*.a" -exec rm -f {} \; %{_bindir}/authselect %{_mandir}/man8/authselect.8* %{_mandir}/man7/authselect-migration.7* +%{_sysconfdir}/bash_completion.d/authselect-completion.sh %global validfile %{_localstatedir}/lib/rpm-state/%{name}.config-valid %pre libs -rm -f %{validfile} +%__rm -f %{validfile} if [ $1 -gt 1 ] ; then # Remember if the current configuration is valid %{_bindir}/authselect check &> /dev/null @@ -209,11 +213,11 @@ exit 0 %posttrans libs # Copy nsswitch.conf to user-nsswitch.conf if it was not yet created if [ ! -f %{_localstatedir}/lib/authselect/user-nsswitch-created ]; then - cp -n %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/authselect/user-nsswitch.conf &> /dev/null + %__cp -n %{_sysconfdir}/nsswitch.conf %{_sysconfdir}/authselect/user-nsswitch.conf &> /dev/null touch %{_localstatedir}/lib/authselect/user-nsswitch-created &> /dev/null # If we are upgrading from older version, we want to remove these comments. - sed -i '/^# Generated by authselect on .*$/{$!{ + %__sed -i '/^# Generated by authselect on .*$/{$!{ N;N # Read also next two lines /# Generated by authselect on .*\n# Do not modify this file manually.\n/d }}' %{_sysconfdir}/authselect/user-nsswitch.conf &> /dev/null @@ -226,11 +230,11 @@ if [ -f %{validfile} ]; then smartcard-auth postlogin dconf-db dconf-locks" for FILE in $FILES ; do - cp -n %{_sysconfdir}/authselect/$FILE \ - %{_localstatedir}/lib/authselect/$FILE &> /dev/null + %__cp -n %{_sysconfdir}/authselect/$FILE \ + %{_localstatedir}/lib/authselect/$FILE &> /dev/null done - rm -f %{validfile} + %__rm -f %{validfile} fi # Apply any changes to profiles (validates configuration first internally) @@ -239,10 +243,10 @@ fi # Enable with-sudo feature if sssd-sudo responder is enabled. RHBZ#1582111 CURRENT=`%{_bindir}/authselect current --raw 2> /dev/null` if [ $? -eq 0 ]; then - PROFILE=`echo $CURRENT | awk '{print $1;}'` + PROFILE=`echo $CURRENT | %__awk '{print $1;}'` if [ $PROFILE == "sssd" ] ; then - if grep -E "services[[:blank:]]*=[[:blank:]]*.*sudo" /etc/sssd/sssd.conf &> /dev/null ; then + if %__grep -E "services[[:blank:]]*=[[:blank:]]*.*sudo" /etc/sssd/sssd.conf &> /dev/null ; then %{_bindir}/authselect enable-feature with-sudo &> /dev/null elif systemctl is-active sssd-sudo.service sssd-sudo.socket --quiet || systemctl is-enabled sssd-sudo.socket --quiet ; then %{_bindir}/authselect enable-feature with-sudo &> /dev/null @@ -257,10 +261,13 @@ exit 0 # Remove invalid lines from pwquality.conf generated by authconfig compat tool # - previous version could write some options without value, which is invalid # - we delete all options without value from existing file -sed -i -E '/^\w+=$/d' %{_sysconfdir}/security/pwquality.conf.d/10-authconfig-pwquality.conf &> /dev/null +%__sed -i -E '/^\w+=$/d' %{_sysconfdir}/security/pwquality.conf.d/10-authconfig-pwquality.conf &> /dev/null exit 0 %changelog +* Thu Jun 13 2019 Pavel Březina - 1.1-1 +- Rebase to 1.1 + * Tue Feb 26 2019 Pavel Březina - 1.0.3-1 - Rebase to 1.0.3 diff --git a/sources b/sources index 713ccb4..f2bdea2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (authselect-1.0.3.tar.gz) = 5e973f01d53949c6943396761daf1b5702261807d3dea2c19d0f7d7962a80ff5cf5bcf917513a7fb0886fb05db1fa6e7a9d76146bea0f7880752267fd6056b4e +SHA512 (authselect-1.1.tar.gz) = 118b308a7a72e56915ca758070174ef47a909ac4609275250ad837d2af8e3c38e7ecab561bcfd955814efcd17bf5bd761c915b6f57f03a78bde2c1040a2a75e4