389 lines
13 KiB
RPMSpec
389 lines
13 KiB
RPMSpec
%define shadowgroupid 15
|
|
%define mailgroupid 72
|
|
Summary: Utilities for managing shadow password files and user/group accounts
|
|
Name: shadow
|
|
Version: 4.13
|
|
Group: Applications/Security
|
|
Release: 1mamba
|
|
Vendor: openmamba
|
|
Distribution: openmamba
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
|
URL: https://github.com/shadow-maint/shadow
|
|
Source0: https://github.com/shadow-maint/shadow.git/%{version}/shadow-%{version}.tar.bz2
|
|
Source1: shadow-useradd
|
|
Source2: shadow-pam-shadow
|
|
Source3: shadow-pam-useradd
|
|
Source4: shadow-pam-su
|
|
Source5: shadow-pam-passwd
|
|
Source6: shadow-pam-login
|
|
Patch0: shadow-4.0.3.patch
|
|
Patch1: shadow-pam-makefile.patch
|
|
Patch2: shadow-4.0.7-fixpam.patch
|
|
Patch3: shadow-4.1.4.2-login_defs.patch
|
|
Patch4: shadow-4.1.4.2-cross_compile.patch
|
|
Patch5: shadow-4.9-fix-libpam-link.patch
|
|
License: BSD
|
|
## AUTOBUILDREQ-BEGIN
|
|
BuildRequires: glibc-devel
|
|
BuildRequires: libacl-devel
|
|
BuildRequires: libattr-devel
|
|
BuildRequires: libaudit-devel
|
|
BuildRequires: libcrack-devel
|
|
BuildRequires: libmd-devel
|
|
BuildRequires: libpam-devel
|
|
BuildRequires: libselinux-devel
|
|
BuildRequires: libsemanage-devel
|
|
## AUTOBUILDREQ-END
|
|
BuildRequires: skey-devel
|
|
BuildRequires: libsemanage-devel >= 3.3
|
|
Requires: pam >= 0.77
|
|
Provides: shadowtool
|
|
Provides: pwdutils
|
|
Obsoletes: pwdutils < 4.9
|
|
Provides: shadow-common
|
|
Obsoletes: shadow-common <= 4.9-1mamba
|
|
Provides: /bin/groups
|
|
|
|
|
|
%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.
|
|
- The pwconv command converts passwords to the shadow password format.
|
|
- The pwunconv command unconverts shadow passwords and generates an npasswd file (a standard UNIX password file).
|
|
- The pwck command checks the integrity of password and shadow files.
|
|
- The lastlog command prints out the last login times for all users.
|
|
- The useradd, userdel and usermod commands are used for managing user accounts.
|
|
- The groupadd, groupdel and groupmod commands are used for managing group accounts.
|
|
|
|
%package extra
|
|
Summary: Extra tools provided also by util-linux
|
|
Group: Applications/Security
|
|
|
|
%description extra
|
|
The shadow-extra package contains tools packaged apart because provided also by util-linux.
|
|
|
|
%package -n libsubid
|
|
Summary: Sub-id library provided with shadow package
|
|
Group: System/Libraries
|
|
|
|
%description -n libsubid
|
|
Sub-id library provided with shadow package.
|
|
|
|
%package -n libsubid-devel
|
|
Summary: Sub-id library provided with shadow package
|
|
Group: Development/Libraries
|
|
Requires: libsubid = %{?epoch:%epoch:}%{version}-%{release}
|
|
|
|
%description -n libsubid-devel
|
|
Sub-id library provided with shadow package.
|
|
This is the development package.
|
|
|
|
%debug_package
|
|
|
|
%prep
|
|
%setup -q
|
|
%patch5 -p1
|
|
./autogen.sh
|
|
|
|
%build
|
|
%configure \
|
|
--with-libpam \
|
|
--enable-shared \
|
|
--with-libcrack \
|
|
--with-skey \
|
|
--enable-man
|
|
|
|
%make
|
|
|
|
%install
|
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
|
|
|
%make_install
|
|
|
|
#LIBRARY_PATH=LIBRARY_PATH:%{buildroot}%{_libdir} \
|
|
#LDFLAGS="-ldl" make install \
|
|
# DESTDIR=%{buildroot} \
|
|
# gnulocaledir=%{buildroot}%{_datadir}/locale
|
|
|
|
mkdir -p %{buildroot}/etc/default
|
|
cp etc/{limits,login.access} %{buildroot}/etc
|
|
install -m 744 %{SOURCE1} %{buildroot}/etc/default/useradd
|
|
|
|
install -m 0644 etc/login.defs %{buildroot}/etc/login.defs
|
|
|
|
#mkdir %{buildroot}/lib
|
|
#mv %{buildroot}%{_libdir}/libshadow.so.0* \
|
|
# %{buildroot}/lib
|
|
#ln -sf ../../lib/libshadow.so.0 %{buildroot}%{_libdir}/libshadow.so
|
|
##ln -sf ../../lib/libmisc.so.0 %{buildroot}%{_libdir}/libmisc.so
|
|
|
|
mv %{buildroot}%{_mandir}/man5/passwd.5 \
|
|
%{buildroot}%{_mandir}/man5/passwd-shadow.5
|
|
|
|
mkdir -p %{buildroot}%{_sysconfdir}/pam.d
|
|
cp %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/shadow
|
|
cp %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/chage
|
|
cp %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/chpasswd
|
|
cp %{SOURCE2} %{buildroot}%{_sysconfdir}/pam.d/newusers
|
|
|
|
cp %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/useradd
|
|
cp %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/userdel
|
|
cp %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/usermod
|
|
cp %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/groupadd
|
|
cp %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/groupdel
|
|
cp %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/groupmod
|
|
|
|
# FIXME: /etc/pam.d/su is installed though moved to coreutils
|
|
# because an upgrade of shadow-common and coreutils would make
|
|
# it disappear (an RPM issue)
|
|
#cp %{SOURCE4} %{buildroot}%{_sysconfdir}/pam.d/su
|
|
cp %{SOURCE5} %{buildroot}%{_sysconfdir}/pam.d/passwd
|
|
cp %{SOURCE6} %{buildroot}%{_sysconfdir}/pam.d/login
|
|
|
|
#touch %{buildroot}%{_sysconfdir}/shadow
|
|
|
|
%find_lang shadow --all-name --with-man
|
|
|
|
#for l in cs da de fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW; do
|
|
# for m in man1/groups.1 man5/faillog.5 man8/lastlog.8 man8/newusers.8; do
|
|
# [ -e %{buildroot}%{_mandir}/$l/$m ] && \
|
|
# echo "%lang(%l) %{_mandir}/$l/$m*" >> shadow.lang
|
|
# done
|
|
# for m in `ls %{buildroot}%{_mandir}/$l/*/*`; do
|
|
# m1=`echo $m | sed "s|%{buildroot}||"`
|
|
# grep $m1 shadow.lang || \
|
|
# echo "%lang(%l) /${m1}*" >> shadow-main.man
|
|
# done
|
|
#done
|
|
#for m in man1/groups.1 man5/faillog.5 man8/lastlog.8 man8/newusers.8; do
|
|
# [ -e %{buildroot}%{_mandir}/$m ] && \
|
|
# echo "%{_mandir}/$m*" >> shadow.lang
|
|
#done
|
|
#for m in `ls %{buildroot}%{_mandir}/*/*\.[1-9]`; do
|
|
# m1=`echo $m | sed "s|%{buildroot}||"`
|
|
# grep $m1 shadow.lang || \
|
|
# echo "/${m1}*" >> shadow-main.man
|
|
#done
|
|
|
|
%clean
|
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
|
|
|
%post
|
|
groupadd shadow -g %{shadowgroupid} 2>/dev/null || :
|
|
if [ ! -e /etc/shadow ]; then
|
|
# upgrade/create passwords to shadow system
|
|
# for a new install or an upgrade
|
|
/usr/sbin/pwconv
|
|
chmod 0640 /etc/shadow
|
|
chgrp shadow /etc/shadow
|
|
fi
|
|
groupadd mail -g %{mailgroupid} 2>/dev/null || :
|
|
:
|
|
|
|
%files -f shadow.lang
|
|
%defattr(-,root,root)
|
|
#%attr(640,root,shadow) %config(noreplace) %{_sysconfdir}/shadow
|
|
%dir %{_sysconfdir}/default
|
|
%config(noreplace) %{_sysconfdir}/default/useradd
|
|
%config(noreplace) %{_sysconfdir}/limits
|
|
%attr(644,root,root) %config /etc/pam.d/chage
|
|
%attr(644,root,root) %config /etc/pam.d/chpasswd
|
|
%attr(644,root,root) %config /etc/pam.d/groupadd
|
|
%attr(644,root,root) %config /etc/pam.d/groupdel
|
|
%attr(644,root,root) %config /etc/pam.d/groupmod
|
|
%attr(644,root,root) %config /etc/pam.d/groupmems
|
|
%attr(644,root,root) %config /etc/pam.d/newusers
|
|
%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/useradd
|
|
%attr(644,root,root) %config /etc/pam.d/userdel
|
|
%attr(644,root,root) %config /etc/pam.d/usermod
|
|
%{_bindir}/chage
|
|
%{_bindir}/expiry
|
|
%{_bindir}/faillog
|
|
%{_bindir}/getsubids
|
|
%{_bindir}/gpasswd
|
|
%{_bindir}/groups
|
|
%{_bindir}/lastlog
|
|
%{_bindir}/newgidmap
|
|
%{_bindir}/newuidmap
|
|
%{_bindir}/newgrp
|
|
%{_bindir}/passwd
|
|
%{_bindir}/sg
|
|
%{_sbindir}/*
|
|
%{_mandir}/man1/*.1*
|
|
%{_mandir}/man3/*.3*
|
|
%{_mandir}/man5/*.5*
|
|
%{_mandir}/man8/*.8*
|
|
%exclude %{_sbindir}/nologin
|
|
%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 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
|
|
%{_bindir}/login
|
|
%{_bindir}/su
|
|
%{_bindir}/chfn
|
|
%{_bindir}/chsh
|
|
%{_sbindir}/nologin
|
|
%{_mandir}/man1/chfn.1*
|
|
%{_mandir}/man1/chsh.1*
|
|
%{_mandir}/man1/login.1*
|
|
%{_mandir}/man1/su.1*
|
|
%{_mandir}/man8/nologin.8*
|
|
|
|
%files -n libsubid
|
|
%defattr(-,root,root)
|
|
%{_libdir}/libsubid.so.*
|
|
|
|
%files -n libsubid-devel
|
|
%defattr(-,root,root)
|
|
%{_includedir}/shadow/subid.h
|
|
%{_libdir}/libsubid.a
|
|
%{_libdir}/libsubid.so
|
|
|
|
%changelog
|
|
* Mon Mar 13 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 4.13-1mamba
|
|
- update to 4.13
|
|
|
|
* Tue Sep 06 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 4.11.1-2mamba
|
|
- create mail group required to useradd when creating /var/mail/<user>
|
|
|
|
* Sat May 07 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 4.11.1-1mamba
|
|
- update to 4.11.1
|
|
|
|
* Fri Dec 24 2021 Automatic Build System <autodist@mambasoft.it> 4.10-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Fri Aug 06 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 4.9-2mamba
|
|
- shadow-common: added legacy provide /bin/groups; obsolete shadow-common
|
|
|
|
* Thu Aug 05 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 4.9-1mamba
|
|
- update to 4.9
|
|
|
|
* Sun Jan 31 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 4.8.1-2mamba
|
|
- shadow-pam-shadow: fix chpasswd by setting password field to use pam_unix.so
|
|
|
|
* Fri Feb 07 2020 Automatic Build System <autodist@mambasoft.it> 4.8.1-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Mon Aug 05 2019 Automatic Build System <autodist@mambasoft.it> 4.7-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Wed Aug 22 2018 Automatic Build System <autodist@mambasoft.it> 4.6-1mamba
|
|
- automatic version update by autodist
|
|
|
|
* Wed Nov 15 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 4.5-4mamba
|
|
- create /etc/shadow with pwconv if not existing in %post
|
|
|
|
* Thu Nov 09 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 4.5-3mamba
|
|
- create /etc/shadow if missing
|
|
|
|
* 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
|
|
|
|
* Sat Dec 08 2012 Automatic Build System <autodist@mambasoft.it> 4.1.5.1-1mamba
|
|
- update to 4.1.5.1
|
|
|
|
* Fri Sep 14 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.4.3-3mamba
|
|
- also move login.1 man page from shadow-common to shadow
|
|
|
|
* Sun Sep 09 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.4.3-2mamba
|
|
- move login from shadow-common to main (unused) package following utill-linux 2.22
|
|
|
|
* Sun Mar 06 2011 Automatic Build System <autodist@mambasoft.it> 4.1.4.3-1mamba
|
|
- automatic update by autodist
|
|
|
|
* Tue Sep 21 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.4.2-6mamba
|
|
- fixed /etc/shadow checks to prevent password loss on upgrade from old installations
|
|
|
|
* Mon Jul 19 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.4.2-5mamba
|
|
- don't own /etc/shadow
|
|
|
|
* Mon Jun 28 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.4.2-4mamba
|
|
- run pwconv on install to correctly create /etc/shadow
|
|
|
|
* Wed Feb 10 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.4.2-3mamba
|
|
- patched default /etc/login.defs to remove not supported options due to pam enabled
|
|
|
|
* Tue Feb 09 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.4.2-2mamba
|
|
- removed obsolete pwconv code in post script
|
|
- added S/Key support
|
|
|
|
* Fri Feb 05 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 4.1.4.2-1mamba
|
|
- update to 4.1.4.2
|
|
|
|
* Mon May 04 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.7-10mamba
|
|
- reset /etc/shadow file permissions on update
|
|
|
|
* Sat May 02 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.7-9mamba
|
|
- set shadow group with read permission for /etc/shadow
|
|
|
|
* Mon Jun 25 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.7-8mamba
|
|
- pam files changed to support pam 0.99.7
|
|
|
|
* Wed May 18 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.7-6qilnx
|
|
- removed su which is replaced by coreutils's
|
|
|
|
* Mon Mar 07 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.7-5qilnx
|
|
- fix login script to work with pam_unix2
|
|
|
|
* Wed Mar 02 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.7-4qilnx
|
|
- added missing pam files for some service who now use them instead of shadow
|
|
- added empty /etc/shadow file
|
|
|
|
* Fri Feb 25 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.7-3qilnx
|
|
- fixed requirement for libmisc
|
|
|
|
* Fri Feb 25 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.7-2qilnx
|
|
- package split into shadow and shadow-common, the latter for use with pwdutils
|
|
|
|
* Fri Feb 25 2005 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.7-1qilnx
|
|
- update to version 4.0.7 by autospec
|
|
|
|
* Fri May 28 2004 Davide Madrisan <davide.madrisan@qilinux.it> 4.0.4.1-2qilnx
|
|
- added missing ldconfig to preun and postun scripts
|
|
|
|
* Thu May 27 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 4.0.4.1-1qilnx
|
|
- new version build
|
|
- removed pam_console from services that used it
|
|
|
|
* Fri May 09 2003 Silvan Calarco <silvan.calarco@qinet.it> 4.0.3-8qilnx
|
|
- fixed login pam configuration module
|
|
|
|
* Fri May 09 2003 Silvan Calarco <silvan.calarco@qinet.it> 4.0.3-7qilnx
|
|
- added login pam configuration module
|
|
- fixed configuration files for shadow and useradd
|
|
|
|
* Thu May 08 2003 Silvan Calarco <silvan.calarco@qinet.it> 4.0.3-6qilnx
|
|
- added /etc/pam.d files: su, shadow, passwd, useradd
|
|
|
|
* Tue May 06 2003 Alessandro Ramazzina <alessandro.ramazzina@qinet.it> 4.0.3-5qilnx
|
|
- added useradd file in /etc/default directory
|
|
- added patch for pam support
|
|
|
|
* Sun Apr 27 2003 Silvan Calarco <silvan.calarco@qinet.it> 4.0.3-4qilnx
|
|
- added post and preun pw conversion scripts
|
|
|
|
* Tue Apr 22 2003 Silvan Calarco <silvan.calarco@qinet.it> 4.0.3-2qilnx
|
|
- removed Prefix variable definition
|
|
- PAM support added
|
|
|
|
* Tue Apr 08 2003 Luca Tinelli <luca.tinelli@qinet.it>
|
|
- first Build
|
|
|