move to shadow-extra files conflicting with util-linux [release 4.5-2mamba;Mon Nov 06 2017]

This commit is contained in:
Silvan Calarco 2024-01-05 17:46:21 +01:00
parent 214f7b7d4d
commit 67676173a1

View File

@ -1,14 +1,14 @@
%define shadowgroupid 15
Summary: Utilities for managing shadow password files and user/group accounts
Name: shadow
Version: 4.2.1
Version: 4.5
Group: Applications/Security
Release: 1mamba
Release: 2mamba
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://pkg-shadow.alioth.debian.org/
Source0: http://pkg-shadow.alioth.debian.org/releases/shadow-%{version}.tar.xz
Source0: https://github.com/shadow-maint/shadow/releases/download/%{version}/shadow-%{version}.tar.xz
Source1: shadow-useradd
Source2: shadow-pam-shadow
Source3: shadow-pam-useradd
@ -23,16 +23,24 @@ Patch4: %{name}-4.1.4.2-cross_compile.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libacl-devel
BuildRequires: libattr-devel
BuildRequires: libaudit-devel
BuildRequires: libcrack-devel
BuildRequires: libpam-devel
%if "%{stage1}" != "1"
BuildRequires: libselinux-devel
BuildRequires: libsepol-devel
%endif
BuildRequires: pam-devel
## AUTOBUILDREQ-END
Requires: pam >= 0.77, shadow-common == %{version}
BuildRequires: skey-devel
Requires: pam >= 0.77
Requires: shadow-common == %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Provides: shadowtool
Provides: pwdutils
Obsoletes: pwdutils
%description
The shadow package includes the necessary programs for converting UNIX password files to the shadow password format, plus programs for managing user and group accounts.
@ -50,6 +58,13 @@ Group: Applications/Security
%description common
The shadow-common package includes the necessary programs for converting UNIX password files to the shadow password format, plus programs for managing user and group accounts.
%package extra
Summary: Extra tools provided also by util-linux
Group: Applications/Security
%description extra
The shadow-common package includes the necessary programs for converting UNIX password files to the shadow password format, plus programs for managing user and group accounts.
%prep
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
@ -125,9 +140,6 @@ cp %{SOURCE6} %{buildroot}%{_sysconfdir}/pam.d/login
#touch %{buildroot}%{_sysconfdir}/shadow
# remove su
rm %{buildroot}/bin/su %{buildroot}%{_mandir}/man1/su.*
%find_lang shadow
for l in cs da de fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW; do
@ -170,38 +182,28 @@ if [ -e /etc/shadow.rpmsave ]; then
if [ "$NEWPWD" == "" -o "$NEWPWD" == "!" -o "$NEWPWD" == "x" ]; then
if [ "$SAVEPWD" != "!" -a "$SAVEPWD" != "" -a "$SAVEPWD" != "x" ]; then
mv /etc/shadow.rpmsave /etc/shadow
chmod 0640 /etc/shadow
chgrp shadow /etc/shadow
else
echo "Unexpected error updating /etc/shadow file: root password was lost, recover needed!"
fi
fi
fi
chmod 0640 /etc/shadow
chgrp shadow /etc/shadow
exit 0
%files -f shadow-main.man
%defattr(-,root,root)
%{_sysconfdir}/login.access
%{_sysconfdir}/login.defs
%attr(644,root,root) %config /etc/pam.d/login
/bin/login
%{_bindir}/chage
%{_bindir}/chfn
%{_bindir}/chsh
%{_bindir}/expiry
%{_bindir}/gpasswd
%{_bindir}/newgrp
%{_bindir}/passwd
%{_bindir}/sg
%{_sbindir}/*
/sbin/nologin
%exclude %{_sbindir}/newusers
%{_sysconfdir}/default/useradd
%attr(644,root,root) %config /etc/pam.d/passwd
%attr(644,root,root) %config /etc/pam.d/shadow
%attr(644,root,root) %config /etc/pam.d/chfn
%attr(644,root,root) %config /etc/pam.d/chsh
%attr(644,root,root) %config /etc/pam.d/su
%attr(644,root,root) %config /etc/pam.d/useradd
%attr(644,root,root) %config /etc/pam.d/userdel
%attr(644,root,root) %config /etc/pam.d/usermod
@ -210,6 +212,11 @@ exit 0
%attr(644,root,root) %config /etc/pam.d/groupmod
%attr(644,root,root) %config /etc/pam.d/chage
%attr(644,root,root) %config /etc/pam.d/chpasswd
%exclude %{_mandir}/man1/chfn.1*
%exclude %{_mandir}/man1/chsh.1*
%exclude %{_mandir}/man1/login.1*
%exclude %{_mandir}/man1/su.1*
%exclude %{_mandir}/man8/nologin.8*
%files common -f shadow.lang
%defattr(-,root,root)
@ -226,7 +233,32 @@ exit 0
%{_bindir}/newuidmap
%{_sbindir}/newusers
%files extra
%defattr(-,root,root)
%{_sysconfdir}/login.access
%{_sysconfdir}/login.defs
%attr(644,root,root) %config /etc/pam.d/login
%attr(644,root,root) %config /etc/pam.d/chfn
%attr(644,root,root) %config /etc/pam.d/chsh
%attr(644,root,root) %config /etc/pam.d/su
/bin/login
/bin/su
%{_bindir}/chfn
%{_bindir}/chsh
/sbin/nologin
%{_mandir}/man1/chfn.1*
%{_mandir}/man1/chsh.1*
%{_mandir}/man1/login.1*
%{_mandir}/man1/su.1*
%{_mandir}/man8/nologin.8*
%changelog
* Mon Nov 06 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 4.5-2mamba
- move to shadow-extra files conflicting with util-linux
* Sun Nov 05 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 4.5-1mamba
- update to 4.5
* Wed Jun 04 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 4.2.1-1mamba
- update to 4.2.1