diff --git a/pam.changes b/pam.changes index 75cef9f..e52b4d2 100644 --- a/pam.changes +++ b/pam.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Aug 22 20:29:24 UTC 2019 - Jan Engelhardt + +- Replace old $RPM_* shell vars by macros. +- Avoid unnecessary invocation of subshells. +- Shorten recipe for constructing securetty contents on s390. + ------------------------------------------------------------------- Mon Aug 19 14:45:43 CEST 2019 - kukuk@suse.de diff --git a/pam.spec b/pam.spec index 2ea747a..b22d1dd 100644 --- a/pam.spec +++ b/pam.spec @@ -95,7 +95,7 @@ having to recompile programs that do authentication. This package contains the documentation. %package devel -Summary: Include Files and Libraries for PAM-Development +Summary: Include Files and Libraries for PAM Development Group: Development/Libraries/C and C++ Requires: glibc-devel Requires: pam = %{version} @@ -132,7 +132,7 @@ export CFLAGS="%{optflags} -DNDEBUG" --enable-isadir=../../%{_lib}/security \ --enable-securedir=/%{_lib}/security make %{?_smp_mflags} -gcc -fwhole-program -fpie -pie -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE %{optflags} -I$RPM_BUILD_DIR/linux-pam-%{version}/libpam/include %{SOURCE10} -o $RPM_BUILD_DIR/unix2_chkpwd -L$RPM_BUILD_DIR/linux-pam-%{version}/libpam/.libs/ -lpam +gcc -fwhole-program -fpie -pie -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE %{optflags} -I%{_builddir}/linux-pam-%{version}/libpam/include %{SOURCE10} -o %{_builddir}/unix2_chkpwd -L%{_builddir}/linux-pam-%{version}/libpam/.libs/ -lpam %check make %{?_smp_mflags} check @@ -147,22 +147,13 @@ mkdir -p -m 755 %{buildroot}%{_libdir} %make_install /sbin/ldconfig -n %{buildroot}/%{_lib} # Install documentation -make -C doc install DESTDIR=%{buildroot} +%make_install -C doc # install securetty install -m 644 %{SOURCE8} %{buildroot}%{_sysconfdir} %ifarch s390 s390x -echo "ttyS0" >> %{buildroot}%{_sysconfdir}/securetty -echo "ttyS1" >> %{buildroot}%{_sysconfdir}/securetty -echo "hvc0" >> %{buildroot}%{_sysconfdir}/securetty -echo "hvc1" >> %{buildroot}%{_sysconfdir}/securetty -echo "hvc2" >> %{buildroot}%{_sysconfdir}/securetty -echo "hvc3" >> %{buildroot}%{_sysconfdir}/securetty -echo "hvc4" >> %{buildroot}%{_sysconfdir}/securetty -echo "hvc5" >> %{buildroot}%{_sysconfdir}/securetty -echo "hvc6" >> %{buildroot}%{_sysconfdir}/securetty -echo "hvc7" >> %{buildroot}%{_sysconfdir}/securetty -echo "sclp_line0" >> %{buildroot}%{_sysconfdir}/securetty -echo "ttysclp0" >> %{buildroot}%{_sysconfdir}/securetty +for i in ttyS0 ttyS1 hvc0 hvc1 hvc2 hvc3 hvc4 hvc5 hvc6 hvc7 sclp_line0 ttysclp0; do + echo "$i" >>%{buildroot}/%{_sysconfdir}/securetty +done %endif # install /etc/security/namespace.d used by pam_namespace.so for namespace.conf iscript install -d %{buildroot}%{_sysconfdir}/security/namespace.d @@ -190,12 +181,11 @@ done # DOC=%{buildroot}%{_defaultdocdir}/pam mkdir -p $DOC/modules -( - cd modules; - for i in pam_*/README ; do - cp -fpv ${i} $DOC/modules/README.`dirname ${i}` - done -) +pushd modules +for i in pam_*/README; do + cp -fpv "$i" "$DOC/modules/README.${i%/*}" +done +popd # # pam_tally is deprecated since ages # @@ -204,8 +194,8 @@ rm -f %{buildroot}/sbin/pam_tally rm -f %{buildroot}%{_mandir}/man8/pam_tally.8* rm -f %{buildroot}%{_defaultdocdir}/pam/modules/README.pam_tally # Install unix2_chkpwd -install -m 755 $RPM_BUILD_DIR/unix2_chkpwd %{buildroot}/sbin/ -install -m 644 $RPM_SOURCE_DIR/unix2_chkpwd.8 %{buildroot}%{_mandir}/man8/ +install -m 755 %{_builddir}/unix2_chkpwd %{buildroot}/sbin/ +install -m 644 %{_sourcedir}/unix2_chkpwd.8 %{buildroot}/%{_mandir}/man8/ # Create filelist with translatins %find_lang Linux-PAM