Revert "Temporary revert move into usr"

This reverts commit bac51129d6.
This commit is contained in:
survolog (Andrey Grigorev) 2023-10-12 18:57:36 +03:00
parent bac51129d6
commit f0d1ceb275

View file

@ -15,7 +15,7 @@
Summary: A security tool which provides authentication for applications Summary: A security tool which provides authentication for applications
Name: pam Name: pam
Version: 1.5.1 Version: 1.5.1
Release: 7 Release: 6
Epoch: 1 Epoch: 1
# The library is BSD licensed with option to relicense as GPLv2+ - this option is redundant # The library is BSD licensed with option to relicense as GPLv2+ - this option is redundant
# as the BSD license allows that anyway. pam_timestamp and pam_console modules are GPLv2+, # as the BSD license allows that anyway. pam_timestamp and pam_console modules are GPLv2+,
@ -139,9 +139,9 @@ having to recompile programs that handle authentication.
%dir %{_sysconfdir}/security/console.apps %dir %{_sysconfdir}/security/console.apps
%dir %{_sysconfdir}/security/console.perms.d %dir %{_sysconfdir}/security/console.perms.d
%dir %{_sysconfdir}/security/limits.d %dir %{_sysconfdir}/security/limits.d
%dir /%{_lib}/security %dir %{_libdir}/security
/%{_lib}/security/*.so %{_libdir}/security/*.so
/%{_lib}/security/pam_filter %{_libdir}/security/pam_filter
/usr/lib/tmpfiles.d/pam.conf /usr/lib/tmpfiles.d/pam.conf
%{_unitdir}/pam_namespace.service %{_unitdir}/pam_namespace.service
%ghost %dir /var/run/console %ghost %dir /var/run/console
@ -185,7 +185,7 @@ Conflicts: pam < 1.1.4-5
This package contains the library libpam for %{name}. This package contains the library libpam for %{name}.
%files -n %{libname} %files -n %{libname}
/%{_lib}/libpam.so.%{major}* %{_libdir}/libpam.so.%{major}*
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@ -198,7 +198,7 @@ Conflicts: %{_lib}pam0 < 1.1.4-5
This package contains the library libpamc for %{name}. This package contains the library libpamc for %{name}.
%files -n %{libnamec} %files -n %{libnamec}
/%{_lib}/libpamc.so.%{major}* %{_libdir}/libpamc.so.%{major}*
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@ -211,7 +211,7 @@ Conflicts: %{_lib}pam0 < 1.1.4-5
This package contains the library libpam_misc for %{name}. This package contains the library libpam_misc for %{name}.
%files -n %{libname_misc} %files -n %{libname_misc}
/%{_lib}/libpam_misc.so.%{major}* %{_libdir}/libpam_misc.so.%{major}*
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------
@ -232,9 +232,9 @@ This package contains the development libraries for %{name}.
%files -n %{devname} %files -n %{devname}
%doc Copyright %doc Copyright
/%{_lib}/libpam.so %{_libdir}/libpam.so
/%{_lib}/libpam_misc.so %{_libdir}/libpam_misc.so
/%{_lib}/libpamc.so %{_libdir}/libpamc.so
%{_includedir}/security/*.h %{_includedir}/security/*.h
%{_mandir}/man3/* %{_mandir}/man3/*
@ -268,7 +268,7 @@ autoreconf -fi
export BROWSER="" export BROWSER=""
%configure \ %configure \
--sbindir=/sbin \ --sbindir=/sbin \
--libdir=/%{_lib} \ --libdir=%{_libdir} \
--includedir=%{_includedir}/security \ --includedir=%{_includedir}/security \
--with-db-uniquename=_nss \ --with-db-uniquename=_nss \
--docdir=%{_docdir}/%{name} \ --docdir=%{_docdir}/%{name} \
@ -296,7 +296,7 @@ for readme in modules/pam_*/README ; do
done done
mkdir -p %{buildroot}%{_includedir}/security mkdir -p %{buildroot}%{_includedir}/security
mkdir -p %{buildroot}/%{_lib}/security mkdir -p %{buildroot}%{_libdir}/security
%make_install LDCONFIG=: %make_install LDCONFIG=:
install -d -m 755 %{buildroot}/etc/pam.d install -d -m 755 %{buildroot}/etc/pam.d
install -m 644 %{SOURCE5} %{buildroot}/etc/pam.d/other install -m 644 %{SOURCE5} %{buildroot}/etc/pam.d/other
@ -315,12 +315,12 @@ install -m 644 %{SOURCE9} %{SOURCE10} %{SOURCE12} %{buildroot}%{_mandir}/man5/
# no longer needed, handled by ACL in udev # no longer needed, handled by ACL in udev
for phase in auth acct passwd session ; do for phase in auth acct passwd session ; do
ln -sf pam_unix.so %{buildroot}/%{_lib}/security/pam_unix_${phase}.so ln -sf pam_unix.so %{buildroot}%{_libdir}/security/pam_unix_${phase}.so
done done
# cleanup # cleanup
rm -f %{buildroot}/%{_lib}/security/*.la rm -f %{buildroot}%{_libdir}/security/*.la
rm -f %{buildroot}/%{_lib}/*.la rm -f %{buildroot}%{_libdir}/*.la
#Set suid bit for /sbin/unix_chkpwd (bug #3169) #Set suid bit for /sbin/unix_chkpwd (bug #3169)
chmod u+s %{buildroot}/sbin/unix_chkpwd chmod u+s %{buildroot}/sbin/unix_chkpwd
@ -355,7 +355,7 @@ EXCEPT=''
%endif %endif
for dir in modules/pam_* ; do for dir in modules/pam_* ; do
if ![[ ${dir} =~ "${except}" ]]; then if ![[ ${dir} =~ "${except}" ]]; then
if ! ls -1 %{buildroot}/%{_lib}/security/`basename ${dir}`*.so ; then if ! ls -1 %{buildroot}%{_libdir}/security/`basename ${dir}`*.so ; then
echo ERROR `basename ${dir}` did not build a module. echo ERROR `basename ${dir}` did not build a module.
exit 1 exit 1
fi fi
@ -364,10 +364,10 @@ done
# Check for module problems. Specifically, check that every module we just # Check for module problems. Specifically, check that every module we just
# installed can actually be loaded by a minimal PAM-aware application. # installed can actually be loaded by a minimal PAM-aware application.
/sbin/ldconfig -n %{buildroot}/%{_lib} /sbin/ldconfig -n %{buildroot}%{_libdir}
for module in %{buildroot}/%{_lib}/security/pam*.so ; do for module in %{buildroot}%{_libdir}/security/pam*.so ; do
if ! env LD_LIBRARY_PATH=%{buildroot}/%{_lib} \ if ! env LD_LIBRARY_PATH=%{buildroot}%{_libdir} \
sh %{SOURCE8} -ldb -ldl -lpam -L%{buildroot}/%{_lib} ${module} ; then sh %{SOURCE8} -ldb -ldl -lpam -L%{buildroot}%{_libdir} ${module} ; then
echo ERROR module: ${module} cannot be loaded. echo ERROR module: ${module} cannot be loaded.
exit 1 exit 1
fi fi