From 4caa3ef92668fb50ad9fef7ec97c6567175f5b8e Mon Sep 17 00:00:00 2001 From: Andrey Bondrov Date: Sat, 5 Jul 2014 17:20:55 +1100 Subject: [PATCH] Add tirpc to BuildRequires, spec cleanup --- .abf.yml | 2 - pam.spec | 240 ++++++++++++++++++++++++++++--------------------------- 2 files changed, 124 insertions(+), 118 deletions(-) diff --git a/.abf.yml b/.abf.yml index 03f2e9c..0500b99 100644 --- a/.abf.yml +++ b/.abf.yml @@ -1,5 +1,3 @@ -removed_sources: - Linux-PAM-1.1.4.tar.bz2: 4634b09f9e059f384ce69dbaa4a67f88bef5cf7b sources: Linux-PAM-1.1.8.tar.bz2: f8ce53c67363f78d520392fa1c253c4978058be1 pam-redhat-0.99.10-1.tar.bz2: 09e618edc5dcda9a6eb435a31db742afca673ae1 diff --git a/pam.spec b/pam.spec index ef7f510..a73a2e7 100644 --- a/pam.spec +++ b/pam.spec @@ -1,25 +1,20 @@ -%define major 0 +%define major 0 %define libname %mklibname %{name} %{major} %define libnamec %mklibname %{name}c %{major} %define libname_misc %mklibname %{name}_misc %{major} -%define develname %mklibname %{name} -d +%define devname %mklibname %{name} -d -%define with_prelude 0 -%{?_without_prelude: %{expand: %%global with_prelude 0}} -%{?_with_prelude: %{expand: %%global with_prelude 1}} +%bcond_with prelude -%define bootstrap 0 -%{?_without_bootstrap: %global bootstrap 0} -%{?_with_bootstrap: %global bootstrap 1} +%bcond_with bootstrap %define pam_redhat_version 0.99.10-1 -Epoch: 1 - Summary: A security tool which provides authentication for applications Name: pam Version: 1.1.8 -Release: 3 +Release: 4 +Epoch: 1 # 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+, License: BSD and GPLv2+ @@ -42,17 +37,17 @@ Source501: pam_tty_audit.8 Source502: README # RedHat patches -Patch1: pam-1.0.90-redhat-modules.patch -Patch2: pam-1.1.6-std-noclose.patch -Patch4: pam-1.1.0-console-nochmod.patch -Patch5: pam-1.1.0-notally.patch -Patch7: pam-1.1.0-console-fixes.patch -Patch9: pam-1.1.6-noflex.patch -Patch10: pam-1.1.3-nouserenv.patch -Patch11: pam-1.1.3-console-abstract.patch -Patch13: pam-1.1.5-limits-user.patch -Patch22: pam-1.1.7-unix-build.patch -Patch32: pam-1.1.7-tty-audit-init.patch +Patch1: pam-1.0.90-redhat-modules.patch +Patch2: pam-1.1.6-std-noclose.patch +Patch4: pam-1.1.0-console-nochmod.patch +Patch5: pam-1.1.0-notally.patch +Patch7: pam-1.1.0-console-fixes.patch +Patch9: pam-1.1.6-noflex.patch +Patch10: pam-1.1.3-nouserenv.patch +Patch11: pam-1.1.3-console-abstract.patch +Patch13: pam-1.1.5-limits-user.patch +Patch22: pam-1.1.7-unix-build.patch +Patch32: pam-1.1.7-tty-audit-init.patch # ROSA specific sources/patches # (fl) fix infinite loop @@ -77,22 +72,23 @@ Patch702: Linux-PAM-1.1.4-add-now-missing-nis-constant.patch Patch801: Linux-PAM-1.1.4-group_add_users.patch BuildRequires: bison -BuildRequires: cracklib-devel BuildRequires: flex -%if !%{bootstrap} +%if %{without bootstrap} # this pulls in the mega texlive load BuildRequires: linuxdoc-tools %endif +BuildRequires: cracklib-devel BuildRequires: db_nss-devel -BuildRequires: openssl-devel -BuildRequires: libaudit-devel +BuildRequires: gettext-devel BuildRequires: glibc-crypt_blowfish-devel -BuildRequires: gettext-devel -%if %with_prelude -BuildRequires: prelude-devel >= 0.9.0 +BuildRequires: libaudit-devel +%if %{with prelude} +BuildRequires: pkgconfig(libprelude) %else -BuildConflicts: prelude-devel +BuildConflicts: pkgconfig(libprelude) %endif +BuildRequires: pkgconfig(libtirpc) +BuildRequires: pkgconfig(openssl) Requires: cracklib-dicts Requires: setup >= 2.7.12-2 Requires: pam_tcb >= 1.0.2-16 @@ -100,47 +96,121 @@ Requires(pre): rpm-helper Requires(post): coreutils Requires(post): tcb >= 1.0.2-16 Conflicts: %{_lib}pam0 < 1.1.4-5 -Requires: libpwquality >= 0.9.9 - +Requires: libpwquality >= 0.9.9 %description PAM (Pluggable Authentication Modules) is a system security tool that allows system administrators to set authentication policy without having to recompile programs that handle authentication. -%package doc +%files -f Linux-PAM.lang +%doc NEWS +%docdir %{_docdir}/%{name} +%dir /etc/pam.d +%config(noreplace) /etc/environment +%config /etc/pam.d/other +%attr(0644,root,shadow) %config(noreplace) /etc/pam.d/system-auth +%attr(0644,root,shadow) %config(noreplace) /etc/pam.d/system-auth-default +%config /etc/pam.d/config-util +%config /etc/pam.d/postlogin +/sbin/mkhomedir_helper +/sbin/pam_console_apply +/sbin/pam_tally2 +/sbin/unix_chkpwd +/sbin/unix_update +%attr(4755,root,root) /sbin/pam_timestamp_check +%config(noreplace) %{_sysconfdir}/security/access.conf +%config(noreplace) %{_sysconfdir}/security/chroot.conf +%config(noreplace) %{_sysconfdir}/security/console.perms +%config(noreplace) %{_sysconfdir}/security/console.handlers +%config(noreplace) %{_sysconfdir}/security/group.conf +%config(noreplace) %{_sysconfdir}/security/limits.conf +%config(noreplace) %{_sysconfdir}/security/namespace.conf +%attr(755,root,root) %config(noreplace) %{_sysconfdir}/security/namespace.init +%config(noreplace) %{_sysconfdir}/security/pam_env.conf +%config(noreplace) %{_sysconfdir}/security/time.conf +%config(noreplace) %{_sysconfdir}/security/opasswd +%config(noreplace) %{_sysconfdir}/security/limits.d/90-nproc.conf +%dir %{_sysconfdir}/security/console.apps +%dir %{_sysconfdir}/security/console.perms.d +%dir /%{_lib}/security +/%{_lib}/security/*.so +/%{_lib}/security/pam_filter +/usr/lib/tmpfiles.d/pam.conf +%dir /var/run/console +%ghost %verify(not md5 size mtime) /var/log/tallylog +%{_mandir}/man5/* +%{_mandir}/man8/* + +%posttrans +# (cg) Ensure that the pam_systemd.so is included for user ACLs under systemd +# Note: Only affects upgrades, but does no harm so always update if needed. +if ! grep -q "pam_systemd\.so" /etc/pam.d/system-auth; then + echo "-session optional pam_systemd.so" >>/etc/pam.d/system-auth +fi + +if [ ! -a /var/log/tallylog ] ; then + install -m 600 /dev/null /var/log/tallylog +fi +if [ -f /etc/login.defs ] && ! grep -q USE_TCB /etc/login.defs; then + /usr/sbin/set_tcb --auto --migrate +fi + +#---------------------------------------------------------------------------- + +%package doc Summary: Additional documentation for %{name} -Group: System/Libraries +Group: Documentation Requires: %{name} = %{EVRD} -%description doc +%description doc This is the documentation package of %{name}. -%package -n %{libname} +%files doc +%doc doc/txts doc/specs/rfc86.0.txt Copyright + +#---------------------------------------------------------------------------- + +%package -n %{libname} Summary: Library for %{name} Group: System/Libraries Conflicts: pam < 1.1.4-5 -%description -n %{libname} +%description -n %{libname} This package contains the library libpam for %{name}. -%package -n %{libnamec} +%files -n %{libname} +/%{_lib}/libpam.so.%{major}* + +#---------------------------------------------------------------------------- + +%package -n %{libnamec} Summary: Library for %{name} Group: System/Libraries Conflicts: %{_lib}pam0 < 1.1.4-5 -%description -n %{libnamec} +%description -n %{libnamec} This package contains the library libpamc for %{name}. -%package -n %{libname_misc} +%files -n %{libnamec} +/%{_lib}/libpamc.so.%{major}* + +#---------------------------------------------------------------------------- + +%package -n %{libname_misc} Summary: Library for %{name} Group: System/Libraries Conflicts: %{_lib}pam0 < 1.1.4-5 -%description -n %{libname_misc} +%description -n %{libname_misc} This package contains the library libpam_misc for %{name}. -%package -n %{develname} +%files -n %{libname_misc} +/%{_lib}/libpam_misc.so.%{major}* + +#---------------------------------------------------------------------------- + +%package -n %{devname} Summary: Development headers and libraries for %{name} Group: Development/Other Requires: %{libname} = %{EVRD} @@ -148,13 +218,23 @@ Requires: %{libnamec} = %{EVRD} Requires: %{libname_misc} = %{EVRD} Provides: %{name}-devel = %{EVRD} -%description -n %{develname} +%description -n %{devname} PAM (Pluggable Authentication Modules) is a system security tool that allows system administrators to set authentication policy without having to recompile programs that handle authentication. This package contains the development libraries for %{name}. +%files -n %{devname} +%doc Copyright +/%{_lib}/libpam.so +/%{_lib}/libpam_misc.so +/%{_lib}/libpamc.so +%{_includedir}/security/*.h +%{_mandir}/man3/* + +#---------------------------------------------------------------------------- + %prep %setup -q -n Linux-PAM-%{version} -a 2 @@ -175,7 +255,7 @@ autoreconf -ifs -I m4 %build export BROWSER="" -CFLAGS="$RPM_OPT_FLAGS -fPIC -I%{_includedir}/db_nss -D_GNU_SOURCE" \ +CFLAGS="%{optflags} -fPIC -I%{_includedir}/db_nss -D_GNU_SOURCE" \ %configure2_5x \ --sbindir=/sbin \ --libdir=/%{_lib} \ @@ -248,75 +328,3 @@ for module in %{buildroot}/%{_lib}/security/pam*.so ; do fi done -%posttrans -# (cg) Ensure that the pam_systemd.so is included for user ACLs under systemd -# Note: Only affects upgrades, but does no harm so always update if needed. -if ! grep -q "pam_systemd\.so" /etc/pam.d/system-auth; then - echo "-session optional pam_systemd.so" >>/etc/pam.d/system-auth -fi - -if [ ! -a /var/log/tallylog ] ; then - install -m 600 /dev/null /var/log/tallylog -fi -if [ -f /etc/login.defs ] && ! grep -q USE_TCB /etc/login.defs; then - /usr/sbin/set_tcb --auto --migrate -fi - -%files -f Linux-PAM.lang -%doc NEWS -%docdir %{_docdir}/%{name} -%dir /etc/pam.d -%config(noreplace) /etc/environment -%config /etc/pam.d/other -%attr(0644,root,shadow) %config(noreplace) /etc/pam.d/system-auth -%attr(0644,root,shadow) %config(noreplace) /etc/pam.d/system-auth-default -%config /etc/pam.d/config-util -%config /etc/pam.d/postlogin -/sbin/mkhomedir_helper -/sbin/pam_console_apply -/sbin/pam_tally2 -/sbin/unix_chkpwd -/sbin/unix_update -%attr(4755,root,root) /sbin/pam_timestamp_check -%config(noreplace) %{_sysconfdir}/security/access.conf -%config(noreplace) %{_sysconfdir}/security/chroot.conf -%config(noreplace) %{_sysconfdir}/security/console.perms -%config(noreplace) %{_sysconfdir}/security/console.handlers -%config(noreplace) %{_sysconfdir}/security/group.conf -%config(noreplace) %{_sysconfdir}/security/limits.conf -%config(noreplace) %{_sysconfdir}/security/namespace.conf -%attr(755,root,root) %config(noreplace) %{_sysconfdir}/security/namespace.init -%config(noreplace) %{_sysconfdir}/security/pam_env.conf -%config(noreplace) %{_sysconfdir}/security/time.conf -%config(noreplace) %{_sysconfdir}/security/opasswd -%config(noreplace) %{_sysconfdir}/security/limits.d/90-nproc.conf -%dir %{_sysconfdir}/security/console.apps -%dir %{_sysconfdir}/security/console.perms.d -%dir /%{_lib}/security -/%{_lib}/security/*.so -/%{_lib}/security/pam_filter -/usr/lib/tmpfiles.d/pam.conf -%dir /var/run/console -%ghost %verify(not md5 size mtime) /var/log/tallylog -%{_mandir}/man5/* -%{_mandir}/man8/* - -%files -n %{libname} -/%{_lib}/libpam.so.%{major}* - -%files -n %{libnamec} -/%{_lib}/libpamc.so.%{major}* - -%files -n %{libname_misc} -/%{_lib}/libpam_misc.so.%{major}* - -%files -n %{develname} -%doc Copyright -/%{_lib}/libpam.so -/%{_lib}/libpam_misc.so -/%{_lib}/libpamc.so -%{_includedir}/security/*.h -%{_mandir}/man3/* - -%files doc -%doc doc/txts doc/specs/rfc86.0.txt Copyright