diff --git a/shadow-4.9-fix-libpam-link.patch b/shadow-4.9-fix-libpam-link.patch new file mode 100644 index 0000000..c5a004b --- /dev/null +++ b/shadow-4.9-fix-libpam-link.patch @@ -0,0 +1,10 @@ +--- shadow-4.9/src/Makefile.am.orig 2021-08-05 19:32:35.431191154 +0200 ++++ shadow-4.9/src/Makefile.am 2021-08-05 19:37:22.841706970 +0200 +@@ -168,6 +168,7 @@ + $(LIBSELINUX) \ + $(LIBSEMANAGE) \ + $(LIBCRYPT_NOPAM) \ ++ $(LIBPAM) \ + $(LIBSKEY) \ + $(LIBMD) \ + $(LIBECONF) \ diff --git a/shadow.spec b/shadow.spec index 4c35b9c..e4bd4c3 100644 --- a/shadow.spec +++ b/shadow.spec @@ -1,46 +1,48 @@ %define shadowgroupid 15 Summary: Utilities for managing shadow password files and user/group accounts Name: shadow -Version: 4.8.1 +Version: 4.9 Group: Applications/Security Release: 2mamba Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco -URL: http://pkg-shadow.alioth.debian.org/ -Source0: https://github.com/shadow-maint/shadow/releases/download/%{version}/shadow-%{version}.tar.xz +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: %{name}-4.0.3.patch -Patch1: %{name}-pam-makefile.patch -Patch2: %{name}-4.0.7-fixpam.patch -Patch3: %{name}-4.1.4.2-login_defs.patch -Patch4: %{name}-4.1.4.2-cross_compile.patch +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: libcap-ng-devel BuildRequires: libcrack-devel BuildRequires: libpam-devel -%if "%{stage1}" != "1" BuildRequires: libselinux-devel -BuildRequires: libsepol-devel -%endif -BuildRequires: pam-devel +BuildRequires: libsemanage-devel +BuildRequires: libz-devel ## AUTOBUILDREQ-END BuildRequires: skey-devel Requires: pam >= 0.77 -Requires: shadow-common == %{version}-%{release} -BuildRoot: %{_tmppath}/%{name}-%{version}-root Provides: shadowtool Provides: pwdutils -Obsoletes: 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. @@ -51,58 +53,55 @@ The shadow package includes the necessary programs for converting UNIX password - 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 common -Summary: Common tools used both by shadow tools and pwdutils -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. +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 -[ "%{buildroot}" != / ] && rm -rf %{buildroot} - %setup -q -#%patch1 -p1 -#%patch2 -p1 -#%patch3 -p1 -#%patch4 -p1 +%patch5 -p1 +./autogen.sh %build -%if "%{_host}" != "%{_build}" -cat > config.cache << EOF -ac_cv_func_setpgrp_void=yes -EOF -LDFLAGS="-ldl -lcrypt -lpam -lpam_misc -lselinux" ./configure \ - --cache-file=config.cache \ -%else -LDFLAGS="-ldl" ./configure \ -%endif +%configure \ --with-libpam \ - --host=%{_host} \ - --build=%{_build} \ - --prefix=%{_prefix} \ - --exec-prefix=%{_prefix} \ - --mandir=%{_mandir} \ - --libdir=%{_libdir} \ - --sysconfdir=%{_sysconfdir} \ --enable-shared \ --with-libcrack \ - --with-skey + --with-skey \ + --enable-man -LDFLAGS="-ldl" make %{_smp_mflags} LIBSELINUX="-lselinux -lsepol" +%make %install -LIBRARY_PATH=LIBRARY_PATH:%{buildroot}%{_libdir} \ -LDFLAGS="-ldl" make install \ - DESTDIR=%{buildroot} \ - gnulocaledir=%{buildroot}%{_datadir}/locale +[ "%{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 @@ -141,28 +140,28 @@ cp %{SOURCE6} %{buildroot}%{_sysconfdir}/pam.d/login #touch %{buildroot}%{_sysconfdir}/shadow -%find_lang 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 +#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} @@ -176,74 +175,49 @@ if [ ! -e /etc/shadow ]; then chmod 0640 /etc/shadow chgrp shadow /etc/shadow fi -exit 0 +: -#% post common -#/sbin/ldconfig -#exit 0 - -#% preun common -#/sbin/ldconfig -#exit 0 - -#% posttrans common -#if [ -e /etc/shadow.rpmsave ]; then -# SAVEPWD=`grep "^root:" /etc/shadow.rpmsave | sed "s|root:\([^:]*\):.*|\1|"` -# NEWPWD=`grep "^root:" /etc/shadow | sed "s|root:\([^:]*\):.*|\1|"` -# if [ "$NEWPWD" == "" -o "$NEWPWD" == "!" -o "$NEWPWD" == "x" ]; then -# if [ "$SAVEPWD" != "!" -a "$SAVEPWD" != "" -a "$SAVEPWD" != "x" ]; then -# mv /etc/shadow.rpmsave /etc/shadow -# else -# echo "Unexpected error updating /etc/shadow file: root password was lost, recovery needed!" -# fi -# fi -#fi -#chmod 0640 /etc/shadow -#chgrp shadow /etc/shadow -#exit 0 - -%files -f shadow-main.man +%files -f shadow.lang %defattr(-,root,root) -%{_bindir}/chage -%{_bindir}/expiry -%{_bindir}/gpasswd -%{_bindir}/newgrp -%{_bindir}/passwd -%{_bindir}/sg -%{_sbindir}/* -%exclude %{_sbindir}/newusers -%{_sysconfdir}/default/useradd +#%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 -%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/chage -%attr(644,root,root) %config /etc/pam.d/chpasswd +%{_bindir}/chage +%{_bindir}/expiry +%{_bindir}/faillog +%{_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 common -f shadow.lang -%defattr(-,root,root) -#%attr(640,root,shadow) %config(noreplace) %{_sysconfdir}/shadow -%{_sysconfdir}/limits -#%attr(644,root,root) %config /etc/pam.d/chgpasswd -%attr(644,root,root) %config /etc/pam.d/groupmems -%attr(644,root,root) %config /etc/pam.d/newusers -%dir %{_sysconfdir}/default -/bin/groups -%{_bindir}/faillog -%{_bindir}/lastlog -%{_bindir}/newgidmap -%{_bindir}/newuidmap -%{_sbindir}/newusers - %files extra %defattr(-,root,root) %{_sysconfdir}/login.access @@ -252,18 +226,34 @@ exit 0 %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}/login +%{_bindir}/su %{_bindir}/chfn %{_bindir}/chsh -/sbin/nologin +%{_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.la +%{_libdir}/libsubid.so + %changelog +* Fri Aug 06 2021 Silvan Calarco 4.9-2mamba +- shadow-common: added legacy provide /bin/groups; obsolete shadow-common + +* Thu Aug 05 2021 Silvan Calarco 4.9-1mamba +- update to 4.9 + * Sun Jan 31 2021 Silvan Calarco 4.8.1-2mamba - shadow-pam-shadow: fix chpasswd by setting password field to use pam_unix.so