Compare commits

...

12 Commits

Author SHA1 Message Date
fe5df43bd8 automatic version update by autodist [release 4.17.4-1mamba;Fri Mar 21 2025] 2025-03-22 14:57:53 +01:00
9c2072ccb0 automatic version update by autodist [release 4.17.3-1mamba;Tue Feb 25 2025] 2025-02-26 09:09:19 +01:00
4cdd25dd0b remove su man conflicting with util-linux [release 4.17.2-2mamba;Sat Feb 01 2025] 2025-02-03 10:47:05 +01:00
2d6ed1fbce automatic version update by autodist [release 4.14.2-1mamba;Mon Oct 30 2023] 2024-01-05 17:46:26 +01:00
d63c33b043 automatic version update by autodist [release 4.14.1-1mamba;Fri Oct 06 2023] 2024-01-05 17:46:25 +01:00
8dd3917c75 automatic version update by autodist [release 4.14.0-1mamba;Fri Aug 18 2023] 2024-01-05 17:46:25 +01:00
a01b3737fa move also translated man pages to -extra subpackage [release 4.13-2mamba;Sat May 20 2023] 2024-01-05 17:46:24 +01:00
b90a1da8dd update to 4.13 [release 4.13-1mamba;Mon Mar 13 2023] 2024-01-05 17:46:23 +01:00
0a236705d8 create mail group required to useradd when creating /var/mail/<user> [release 4.11.1-2mamba;Tue Sep 06 2022] 2024-01-05 17:46:23 +01:00
6919de885b update to 4.11.1 [release 4.11.1-1mamba;Sat May 07 2022] 2024-01-05 17:46:22 +01:00
6209b3ac43 automatic version update by autodist [release 4.10-1mamba;Fri Dec 24 2021] 2024-01-05 17:46:22 +01:00
0884ec08c8 shadow-common: added legacy provide /bin/groups; obsolete shadow-common [release 4.9-2mamba;Fri Aug 06 2021] 2024-01-05 17:46:22 +01:00
2 changed files with 202 additions and 139 deletions

View File

@ -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) \

View File

@ -1,46 +1,55 @@
%define shadowgroupid 15 %define shadowgroupid 15
%define mailgroupid 72
Summary: Utilities for managing shadow password files and user/group accounts Summary: Utilities for managing shadow password files and user/group accounts
Name: shadow Name: shadow
Version: 4.8.1 Version: 4.17.4
Group: Applications/Security Group: Applications/Security
Release: 2mamba Release: 1mamba
Vendor: openmamba Vendor: openmamba
Distribution: openmamba Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://pkg-shadow.alioth.debian.org/ URL: https://github.com/shadow-maint/shadow
Source0: https://github.com/shadow-maint/shadow/releases/download/%{version}/shadow-%{version}.tar.xz Source0: https://github.com/shadow-maint/shadow.git/%{version}/shadow-%{version}.tar.bz2
Source1: shadow-useradd Source1: shadow-useradd
Source2: shadow-pam-shadow Source2: shadow-pam-shadow
Source3: shadow-pam-useradd Source3: shadow-pam-useradd
Source4: shadow-pam-su Source4: shadow-pam-su
Source5: shadow-pam-passwd Source5: shadow-pam-passwd
Source6: shadow-pam-login Source6: shadow-pam-login
Patch0: %{name}-4.0.3.patch Patch0: shadow-4.0.3.patch
Patch1: %{name}-pam-makefile.patch Patch1: shadow-pam-makefile.patch
Patch2: %{name}-4.0.7-fixpam.patch Patch2: shadow-4.0.7-fixpam.patch
Patch3: %{name}-4.1.4.2-login_defs.patch Patch3: shadow-4.1.4.2-login_defs.patch
Patch4: %{name}-4.1.4.2-cross_compile.patch Patch4: shadow-4.1.4.2-cross_compile.patch
Patch5: shadow-4.9-fix-libpam-link.patch
License: BSD License: BSD
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel BuildRequires: glibc-devel
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libattr-devel BuildRequires: libattr-devel
BuildRequires: libaudit-devel BuildRequires: libaudit-devel
BuildRequires: libcrack-devel
BuildRequires: libpam-devel BuildRequires: libpam-devel
%if "%{stage1}" != "1"
BuildRequires: libselinux-devel BuildRequires: libselinux-devel
BuildRequires: libsepol-devel BuildRequires: libsemanage-devel
%endif BuildRequires: libxcrypt-devel
BuildRequires: pam-devel
## AUTOBUILDREQ-END ## AUTOBUILDREQ-END
BuildRequires: skey-devel BuildRequires: libsemanage-devel >= 3.3
Requires: pam >= 0.77 Requires: pam >= 0.77
Requires: shadow-common == %{version}-%{release}
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Provides: shadowtool Provides: shadowtool
Provides: pwdutils Provides: pwdutils
Obsoletes: pwdutils Obsoletes: pwdutils < 4.9
Provides: shadow-common
Obsoletes: shadow-common <= 4.9-1mamba
Provides: /bin/groups
Provides: /usr/sbin/adduser
Provides: /usr/sbin/useradd
Provides: /usr/sbin/userdel
Provides: /usr/sbin/usermod
Provides: /usr/sbin/groupadd
Provides: /usr/sbin/groupdel
Provides: /usr/sbin/groupmod
Provides: group(mail)
Provides: group(shadow)
%description %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 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 +60,67 @@ The shadow package includes the necessary programs for converting UNIX password
- The useradd, userdel and usermod commands are used for managing user accounts. - The useradd, userdel and usermod commands are used for managing user accounts.
- The groupadd, groupdel and groupmod commands are used for managing group 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 %package extra
Summary: Extra tools provided also by util-linux Summary: Extra tools provided also by util-linux
Group: Applications/Security Group: Applications/Security
%description extra %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.
%prep %prep
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%setup -q %setup -q
#%patch1 -p1 %patch 5 -p1
#%patch2 -p1 ./autogen.sh
#%patch3 -p1
#%patch4 -p1
%build %build
%if "%{_host}" != "%{_build}" %configure \
cat > config.cache << EOF --sbindir=%{_bindir} \
ac_cv_func_setpgrp_void=yes --disable-account-tools-setuid \
EOF --enable-lastlog \
LDFLAGS="-ldl -lcrypt -lpam -lpam_misc -lselinux" ./configure \ --enable-logind=no \
--cache-file=config.cache \ --enable-man \
%else --enable-shadowgrp \
LDFLAGS="-ldl" ./configure \
%endif
--with-libpam \
--host=%{_host} \
--build=%{_build} \
--prefix=%{_prefix} \
--exec-prefix=%{_prefix} \
--mandir=%{_mandir} \
--libdir=%{_libdir} \
--sysconfdir=%{_sysconfdir} \
--enable-shared \ --enable-shared \
--with-libcrack \ --with-audit \
--with-skey --with-bcrypt \
--with-group-name-max-length=32 \
--with-libpam \
--with-selinux \
--with-sha-crypt \
--with-yescrypt \
--without-libbsd \
--without-libcrack \
--without-nscd \
--without-sssd \
--without-su
LDFLAGS="-ldl" make %{_smp_mflags} LIBSELINUX="-lselinux -lsepol" %make
%install %install
LIBRARY_PATH=LIBRARY_PATH:%{buildroot}%{_libdir} \ [ "%{buildroot}" != / ] && rm -rf %{buildroot}
LDFLAGS="-ldl" make install \
DESTDIR=%{buildroot} \ %make_install
gnulocaledir=%{buildroot}%{_datadir}/locale
#LIBRARY_PATH=LIBRARY_PATH:%{buildroot}%{_libdir} \
#LDFLAGS="-ldl" make install \
# DESTDIR=%{buildroot} \
# gnulocaledir=%{buildroot}%{_datadir}/locale
mkdir -p %{buildroot}/etc/default mkdir -p %{buildroot}/etc/default
cp etc/{limits,login.access} %{buildroot}/etc cp etc/{limits,login.access} %{buildroot}/etc
@ -139,30 +157,14 @@ cp %{SOURCE3} %{buildroot}%{_sysconfdir}/pam.d/groupmod
cp %{SOURCE5} %{buildroot}%{_sysconfdir}/pam.d/passwd cp %{SOURCE5} %{buildroot}%{_sysconfdir}/pam.d/passwd
cp %{SOURCE6} %{buildroot}%{_sysconfdir}/pam.d/login cp %{SOURCE6} %{buildroot}%{_sysconfdir}/pam.d/login
#touch %{buildroot}%{_sysconfdir}/shadow # The installation script doesn't actually use the configured paths
mv -v %{buildroot}/usr/sbin/* %{buildroot}%{_bindir}/
%find_lang shadow # remove conflicting su man still installed
rm -f %{buildroot}%{_mandir}/man1/su.1*
rm -f %{buildroot}%{_mandir}/*/man1/su.1*
for l in cs da de fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW; do %find_lang shadow --all-name --with-man
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 %clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot} [ "%{buildroot}" != / ] && rm -rf %{buildroot}
@ -176,73 +178,69 @@ if [ ! -e /etc/shadow ]; then
chmod 0640 /etc/shadow chmod 0640 /etc/shadow
chgrp shadow /etc/shadow chgrp shadow /etc/shadow
fi fi
exit 0 groupadd mail -g %{mailgroupid} 2>/dev/null || :
:
#% post common %files -f shadow.lang
#/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
%defattr(-,root,root) %defattr(-,root,root)
%{_bindir}/chage %dir %{_sysconfdir}/default
%{_bindir}/expiry %config(noreplace) %{_sysconfdir}/default/useradd
%{_bindir}/gpasswd %config(noreplace) %{_sysconfdir}/limits
%{_bindir}/newgrp %attr(644,root,root) %config /etc/pam.d/chage
%{_bindir}/passwd %attr(644,root,root) %config /etc/pam.d/chpasswd
%{_bindir}/sg %attr(644,root,root) %config /etc/pam.d/groupadd
%{_sbindir}/* %attr(644,root,root) %config /etc/pam.d/groupdel
%exclude %{_sbindir}/newusers %attr(644,root,root) %config /etc/pam.d/groupmod
%{_sysconfdir}/default/useradd %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/passwd
%attr(644,root,root) %config /etc/pam.d/shadow %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/useradd
%attr(644,root,root) %config /etc/pam.d/userdel %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/usermod
%attr(644,root,root) %config /etc/pam.d/groupadd %{_bindir}/chage
%attr(644,root,root) %config /etc/pam.d/groupdel %{_bindir}/chgpasswd
%attr(644,root,root) %config /etc/pam.d/groupmod %{_bindir}/chpasswd
%attr(644,root,root) %config /etc/pam.d/chage %{_bindir}/expiry
%attr(644,root,root) %config /etc/pam.d/chpasswd %{_bindir}/faillog
%{_bindir}/getsubids
%{_bindir}/gpasswd
%{_bindir}/groupadd
%{_bindir}/groupdel
%{_bindir}/groupmems
%{_bindir}/groupmod
%{_bindir}/grpck
%{_bindir}/grpconv
%{_bindir}/grpunconv
%{_bindir}/lastlog
%{_bindir}/logoutd
%{_bindir}/newgidmap
%{_bindir}/newuidmap
%{_bindir}/newgrp
%{_bindir}/newusers
%{_bindir}/passwd
%{_bindir}/pwck
%{_bindir}/pwconv
%{_bindir}/pwunconv
%{_bindir}/sg
%{_bindir}/useradd
%{_bindir}/userdel
%{_bindir}/usermod
%{_bindir}/vigr
%{_bindir}/vipw
%{_mandir}/man1/*.1*
%{_mandir}/man3/*.3*
%{_mandir}/man5/*.5*
%{_mandir}/man8/*.8*
%exclude %{_bindir}/nologin
%exclude %{_mandir}/man1/chfn.1* %exclude %{_mandir}/man1/chfn.1*
%exclude %{_mandir}/man1/chsh.1* %exclude %{_mandir}/man1/chsh.1*
%exclude %{_mandir}/man1/login.1* %exclude %{_mandir}/man1/login.1*
%exclude %{_mandir}/man1/su.1*
%exclude %{_mandir}/man8/nologin.8* %exclude %{_mandir}/man8/nologin.8*
%exclude %{_mandir}/*/man1/chfn.1*
%files common -f shadow.lang %exclude %{_mandir}/*/man1/chsh.1*
%defattr(-,root,root) %exclude %{_mandir}/*/man1/login.1*
#%attr(640,root,shadow) %config(noreplace) %{_sysconfdir}/shadow %exclude %{_mandir}/*/man8/nologin.8*
%{_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 %files extra
%defattr(-,root,root) %defattr(-,root,root)
@ -251,19 +249,74 @@ exit 0
%attr(644,root,root) %config /etc/pam.d/login %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/chfn
%attr(644,root,root) %config /etc/pam.d/chsh %attr(644,root,root) %config /etc/pam.d/chsh
%attr(644,root,root) %config /etc/pam.d/su %{_bindir}/login
/bin/login
/bin/su
%{_bindir}/chfn %{_bindir}/chfn
%{_bindir}/chsh %{_bindir}/chsh
/sbin/nologin %{_bindir}/nologin
%{_mandir}/man1/chfn.1* %{_mandir}/man1/chfn.1*
%{_mandir}/man1/chsh.1* %{_mandir}/man1/chsh.1*
%{_mandir}/man1/login.1* %{_mandir}/man1/login.1*
%{_mandir}/man1/su.1*
%{_mandir}/man8/nologin.8* %{_mandir}/man8/nologin.8*
%{_mandir}/*/man1/chfn.1*
%{_mandir}/*/man1/chsh.1*
%{_mandir}/*/man1/login.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 %changelog
* Fri Mar 21 2025 Automatic Build System <autodist@openmamba.org> 4.17.4-1mamba
- automatic version update by autodist
* Tue Feb 25 2025 Automatic Build System <autodist@openmamba.org> 4.17.3-1mamba
- automatic version update by autodist
* Sat Feb 01 2025 Silvan Calarco <silvan.calarco@mambasoft.it> 4.17.2-2mamba
- remove su man conflicting with util-linux
* Fri Jan 31 2025 Automatic Build System <autodist@openmamba.org> 4.17.2-1mamba
- automatic version update by autodist
- provide groups shadow and mail
- updated configure options
* Mon Oct 30 2023 Automatic Build System <autodist@mambasoft.it> 4.14.2-1mamba
- automatic version update by autodist
* Fri Oct 06 2023 Automatic Build System <autodist@mambasoft.it> 4.14.1-1mamba
- automatic version update by autodist
* Fri Aug 18 2023 Automatic Build System <autodist@mambasoft.it> 4.14.0-1mamba
- automatic version update by autodist
* Sat May 20 2023 Silvan Calarco <silvan.calarco@mambasoft.it> 4.13-2mamba
- move also translated man pages to -extra subpackage
* 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 * 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 - shadow-pam-shadow: fix chpasswd by setting password field to use pam_unix.so