Browse Source

shadow-utils-4.9-1

Tomohiro "Tomo-p" KATO 2 years ago
parent
commit
c52d3e730c
1 changed files with 168 additions and 141 deletions
  1. 168 141
      s/shadow-utils/shadow-utils-vl.spec

+ 168 - 141
s/shadow-utils/shadow-utils-vl.spec

@@ -4,62 +4,55 @@ Summary: Utilities for managing accounts and shadow password files.
 Summary(ja): シャドウパスワードファイルとアカウントを管理するユーティリティ
 Name: shadow-utils
 Epoch: 2
-Version: 4.8
+Version: 4.9
 Release: 1%{?_dist_release}
-Group: System Environment/Base
-
+Group: system
 Vendor: Project Vine
 Distribution: Vine Linux
 
 License: BSD and GPLv2+
-URL: http://pkg-shadow.alioth.debian.org/
-
-Source0: http://pkg-shadow.alioth.debian.org/shadow-%{version}.tar.xz
-Source1: shadow-4.0.17-login.defs
+URL: https://github.com/shadow-maint/shadow
+Source0: https://github.com/shadow-maint/shadow/releases/download/v%{version}/shadow-%{version}.tar.xz
+Source1: shadow-utils.login.defs
 Source2: shadow-utils.useradd
+Source3: shadow-bsd.txt
+Source4: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
 
+### Patches ###
 # Misc small changes - most probably non-upstreamable
-Patch0: shadow-4.6-redhat.patch
+Patch0: shadow-4.9-redhat.patch
 # Be more lenient with acceptable user/group names - non upstreamable
 Patch1: shadow-4.8-goodname.patch
-# Docfix for newusers - could be upstreamed
-Patch2: shadow-4.1.5.1-info-parent-dir.patch
-# Misc SElinux related changes - upstreamability unknown
-Patch6: shadow-4.8-selinux.patch
-# Syslog message change - could be upstreamed
-Patch11: shadow-4.1.5.1-logmsg.patch
+# Move create home to the end of main - upstreamability unknown
+Patch2: shadow-4.9-move-create-home.patch
 # SElinux related - upstreamability unknown
-Patch14: shadow-4.1.5.1-default-range.patch
-# Misc manual page changes - only some of them could be upstreamed
-Patch15: shadow-4.8-manfix.patch
-# Userdel usage message change - could be upstreamed
-Patch17: shadow-4.1.5.1-userdel-helpfix.patch
+Patch3: shadow-4.9-default-range.patch
+# Misc manual page changes - non-upstreamable
+Patch4: shadow-4.9-manfix.patch
 # Date parsing improvement - could be upstreamed
-Patch19: shadow-4.2.1-date-parsing.patch
+Patch5: shadow-4.2.1-date-parsing.patch
 # Additional error message - could be upstreamed
-Patch21: shadow-4.6-move-home.patch
+Patch6: shadow-4.6-move-home.patch
 # Audit message changes - upstreamability unknown
-Patch22: shadow-4.8-audit-update.patch
+Patch7: shadow-4.9-audit-update.patch
 # Changes related to password unlocking - could be upstreamed
-Patch23: shadow-4.5-usermod-unlock.patch
+Patch8: shadow-4.5-usermod-unlock.patch
 # Additional SElinux related changes - upstreamability unknown
-Patch28: shadow-4.8-selinux-perms.patch
+Patch9: shadow-4.8-selinux-perms.patch
 # Handle NULL return from *time funcs - could be upstreamed
-Patch29: shadow-4.2.1-null-tm.patch
-# SElinux related - upstreamability unknown
-Patch31: shadow-4.6-getenforce.patch
-# Handle include of crypt.h - could be upstreamed
-Patch32: shadow-4.8-crypt_h.patch
+Patch10: shadow-4.9-null-tm.patch
 # Handle /etc/passwd corruption - could be upstreamed
-Patch33: shadow-4.8-long-entry.patch
+Patch11: shadow-4.8-long-entry.patch
 # Limit uid/gid allocation to non-zero - could be upstreamed
-Patch38: shadow-4.6-sysugid-min-limit.patch
+Patch12: shadow-4.6-sysugid-min-limit.patch
 # Ignore LOGIN_PLAIN_PROMPT in login.defs - upstreamability unknown
-Patch40: shadow-4.8-ignore-login-prompt.patch
-# Make the missing shell check into warning - could be upstreamed
-Patch41: shadow-4.8-invalid-shell-check.patch
-# Generate /var/spool/mail/$USER with the proper SELinux user identity - already  upstreamed
-Patch42: shadow-4.8-useradd-selinux-mail.patch
+Patch13: shadow-4.8-ignore-login-prompt.patch
+# https://github.com/shadow-maint/shadow/commit/c6847011e8b656adacd9a0d2a78418cad0de34cb
+Patch14: shadow-4.9-newuidmap-libeconf-dependency.patch
+# https://github.com/shadow-maint/shadow/commit/e481437ab9ebe9a8bf8fbaabe986d42b2f765991
+Patch15: shadow-4.9-usermod-allow-all-group-types.patch
+# https://github.com/shadow-maint/shadow/pull/399
+Patch16: shadow-4.9-useradd-avoid-generating-empty-subid-range.patch
 
 BuildRoot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: gcc
@@ -70,6 +63,9 @@ BuildRequires: autoconf, automake, libtool, gettext-devel
 BuildRequires: /usr/bin/xsltproc, /usr/bin/itstool
 Obsoletes: adduser
 
+### Globals ###
+%global includesubiddir %{_includedir}/shadow
+
 %description
 The shadow-utils package includes the necessary programs for
 converting UNIX password files to the shadow password format, plus
@@ -94,41 +90,56 @@ pwconvコマンドはパスワードをシャドウパスワードフォーマ
 力します。useradd、userdelやusermodコマンドはユーザーアカウント
 を管理するのに使用されます。groupadd、groupdelやgroupmodコマンド
 はグループアカウントを管理するのに使用されます。
-  
+
+
+%package subid
+Summary: A library to manage subordinate uid and gid ranges
+Group:   system
+License: BSD and GPLv2+
+
+%description subid
+Utility library that provides a way to manage subid ranges.
+
+
+%package subid-devel
+Summary: Development package for shadow-utils-subid
+Group:   programming
+License: BSD and GPLv2+
+
+%description subid-devel
+Development files for shadow-utils-subid.
+
+
+%debug_package
+
 
 %prep
 %setup -q -n shadow-%{version}
 %patch0 -p1 -b .redhat
 %patch1 -p1 -b .goodname
-%patch2 -p1 -b .info-parent-dir
-%if %{WITH_SELINUX}
-%patch6 -p1 -b .selinux
-%endif
-%patch11 -p1 -b .logmsg
-%patch14 -p1 -b .default-range
-%patch15 -p1 -b .manfix
-%patch17 -p1 -b .userdel
-%patch19 -p1 -b .date-parsing
-%patch21 -p1 -b .move-home
-%patch22 -p1 -b .audit-update
-%patch23 -p1 -b .unlock
-%patch28 -p1 -b .selinux-perms
-%patch29 -p1 -b .null-tm
-%if %{WITH_SELINUX}
-%patch31 -p1 -b .getenforce
-%endif
-%patch32 -p1 -b .crypt_h
-%patch33 -p1 -b .long-entry
-%patch38 -p1 -b .sysugid-min-limit
-%patch40 -p1 -b .login-prompt
-%patch41 -p1 -b .invalid-shell
+%patch2 -p1 -b .move-create-home
+%patch3 -p1 -b .default-range
+%patch4 -p1 -b .manfix
+%patch5 -p1 -b .date-parsing
+%patch6 -p1 -b .move-home
+%patch7 -p1 -b .audit-update
+%patch8 -p1 -b .unlock
 %if %{WITH_SELINUX}
-%patch42 -p1 -b .useradd-selinux-mail
+%patch9 -p1 -b .selinux-perms
 %endif
+%patch10 -p1 -b .null-tm
+%patch11 -p1 -b .long-entry
+%patch12 -p1 -b .sysugid-min-limit
+%patch13 -p1 -b .login-prompt
+%patch14 -p1 -b .newuidmap-libeconf-dependency
+%patch15 -p1 -b .usermod-allow-all-group-types
+%patch16 -p1 -b .useradd-avoid-generating-empty-subid-range
 
 iconv -f ISO88591 -t utf-8  doc/HOWTO > doc/HOWTO.utf8
 cp -f doc/HOWTO.utf8 doc/HOWTO
 
+cp -a %{SOURCE3} %{SOURCE4} .
+
 # Force regeneration of getdate.c
 rm libmisc/getdate.c
 
@@ -137,20 +148,26 @@ rm libmisc/getdate.c
 export CFLAGS="$RPM_OPT_FLAGS -fpie"
 export LDFLAGS="-pie -Wl,-z,relro -Wl,-z,now"
 
+autoreconf -ivf
 %configure \
 	--enable-shadowgrp \
-	--without-libcrack \
+	--enable-man \
+	--with-audit \
 	--with-sha-crypt \
+	--with-bcrypt \
+	--with-yescrypt \
 %if %{WITH_SELINUX}
 	--with-selinux \
 %else
 	--without-selinux \
 %endif
+	--without-libcrack \
 	--without-libpam \
-	--disable-shared \
+	--enable-shared \
 	--with-group-name-max-length=32
 make %{_smp_mflags}
 
+
 %install
 rm -rf %{buildroot}
 make install DESTDIR=%{buildroot} gnulocaledir=%{buildroot}/%{_datadir}/locale MKINSTALLDIRS=`pwd`/mkinstalldirs
@@ -166,132 +183,142 @@ for subdir in %{buildroot}/%{_mandir}/{??,??_??,??_??.*}/man* ; do
 done
 
 # Remove binaries we don't use.
-rm %{buildroot}/%{_bindir}/chfn
-rm %{buildroot}/%{_bindir}/chsh
-rm %{buildroot}/%{_bindir}/expiry
-rm %{buildroot}/%{_bindir}/groups
-rm %{buildroot}/%{_bindir}/login
-rm %{buildroot}/%{_bindir}/passwd
-rm %{buildroot}/%{_bindir}/su
-rm %{buildroot}/%{_sysconfdir}/login.access
-rm %{buildroot}/%{_sysconfdir}/limits
-rm %{buildroot}/%{_sbindir}/logoutd
-rm %{buildroot}/%{_sbindir}/nologin
-rm %{buildroot}/%{_sbindir}/chgpasswd
-rm %{buildroot}/%{_mandir}/man1/chfn.*
-rm %{buildroot}/%{_mandir}/*/man1/chfn.*
-rm %{buildroot}/%{_mandir}/man1/chsh.*
-rm %{buildroot}/%{_mandir}/*/man1/chsh.*
-rm %{buildroot}/%{_mandir}/man1/expiry.*
-rm %{buildroot}/%{_mandir}/*/man1/expiry.*
-rm %{buildroot}/%{_mandir}/man1/groups.*
-rm %{buildroot}/%{_mandir}/*/man1/groups.*
-rm %{buildroot}/%{_mandir}/man1/login.*
-rm %{buildroot}/%{_mandir}/*/man1/login.*
-rm %{buildroot}/%{_mandir}/man1/passwd.*
-rm %{buildroot}/%{_mandir}/*/man1/passwd.*
-rm %{buildroot}/%{_mandir}/man1/su.*
-rm %{buildroot}/%{_mandir}/*/man1/su.*
-rm %{buildroot}/%{_mandir}/man5/limits.*
-rm %{buildroot}/%{_mandir}/*/man5/limits.*
-rm %{buildroot}/%{_mandir}/man5/login.access.*
-rm %{buildroot}/%{_mandir}/*/man5/login.access.*
-rm %{buildroot}/%{_mandir}/man5/passwd.*
-rm %{buildroot}/%{_mandir}/*/man5/passwd.*
-rm %{buildroot}/%{_mandir}/man5/porttime.*
-rm %{buildroot}/%{_mandir}/*/man5/porttime.*
-rm %{buildroot}/%{_mandir}/man5/suauth.*
-rm %{buildroot}/%{_mandir}/*/man5/suauth.*
-rm %{buildroot}/%{_mandir}/man8/logoutd.*
-rm %{buildroot}/%{_mandir}/*/man8/logoutd.*
-rm %{buildroot}/%{_mandir}/man8/nologin.*
-rm %{buildroot}/%{_mandir}/*/man8/nologin.*
-rm %{buildroot}/%{_mandir}/man8/chgpasswd.*
-rm %{buildroot}/%{_mandir}/*/man8/chgpasswd.*
-
+rm %{buildroot}%{_bindir}/chfn
+rm %{buildroot}%{_bindir}/chsh
+rm %{buildroot}%{_bindir}/expiry
+rm %{buildroot}%{_bindir}/groups
+rm %{buildroot}%{_bindir}/login
+rm %{buildroot}%{_bindir}/passwd
+rm %{buildroot}%{_bindir}/su
+rm %{buildroot}%{_bindir}/faillog
+rm %{buildroot}%{_sysconfdir}/login.access
+rm %{buildroot}%{_sysconfdir}/limits
+rm %{buildroot}%{_sbindir}/logoutd
+rm %{buildroot}%{_sbindir}/nologin
+rm %{buildroot}%{_mandir}/man1/chfn.*
+rm %{buildroot}%{_mandir}/*/man1/chfn.*
+rm %{buildroot}%{_mandir}/man1/chsh.*
+rm %{buildroot}%{_mandir}/*/man1/chsh.*
+rm %{buildroot}%{_mandir}/man1/expiry.*
+rm %{buildroot}%{_mandir}/*/man1/expiry.*
+rm %{buildroot}%{_mandir}/man1/groups.*
+rm %{buildroot}%{_mandir}/*/man1/groups.*
+rm %{buildroot}%{_mandir}/man1/login.*
+rm %{buildroot}%{_mandir}/*/man1/login.*
+rm %{buildroot}%{_mandir}/man1/passwd.*
+rm %{buildroot}%{_mandir}/*/man1/passwd.*
+rm %{buildroot}%{_mandir}/man1/su.*
+rm %{buildroot}%{_mandir}/*/man1/su.*
+rm %{buildroot}%{_mandir}/man5/limits.*
+rm %{buildroot}%{_mandir}/*/man5/limits.*
+rm %{buildroot}%{_mandir}/man5/login.access.*
+rm %{buildroot}%{_mandir}/*/man5/login.access.*
+rm %{buildroot}%{_mandir}/man5/passwd.*
+rm %{buildroot}%{_mandir}/*/man5/passwd.*
+rm %{buildroot}%{_mandir}/man5/porttime.*
+rm %{buildroot}%{_mandir}/*/man5/porttime.*
+rm %{buildroot}%{_mandir}/man5/suauth.*
+rm %{buildroot}%{_mandir}/*/man5/suauth.*
+rm %{buildroot}%{_mandir}/man8/logoutd.*
+rm %{buildroot}%{_mandir}/*/man8/logoutd.*
+rm %{buildroot}%{_mandir}/man8/nologin.*
+rm %{buildroot}%{_mandir}/*/man8/nologin.*
+rm %{buildroot}%{_mandir}/man3/getspnam.*
+rm %{buildroot}%{_mandir}/*/man3/getspnam.*
+rm %{buildroot}%{_mandir}/man5/faillog.*
+rm %{buildroot}%{_mandir}/*/man5/faillog.*
+rm %{buildroot}%{_mandir}/man8/faillog.*
+rm %{buildroot}%{_mandir}/*/man8/faillog.*
+
+find $RPM_BUILD_ROOT%{_mandir} -depth -type d -empty -delete
 %find_lang shadow
+for dir in $(ls -1d $RPM_BUILD_ROOT%{_mandir}/{??,??_??}) ; do
+    dir=$(echo $dir | sed -e "s|^$RPM_BUILD_ROOT||")
+    lang=$(basename $dir)
+#   echo "%%lang($lang) $dir" >> shadow.lang
+#   echo "%%lang($lang) $dir/man*" >> shadow.lang
+    echo "%%lang($lang) $dir/man*/*" >> shadow.lang
+done
+
+# Move header files to its own folder
+echo $(ls)
+mkdir -p $RPM_BUILD_ROOT/%{includesubiddir}
+install -m 644 libsubid/subid.h $RPM_BUILD_ROOT/%{includesubiddir}/
+
+# Remove .la files created by libsubid
+rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.la
+
 
 %clean
 rm -rf %{buildroot}
 
+
 %files -f shadow.lang
 %defattr(-,root,root)
+%license gpl-2.0.txt shadow-bsd.txt
 %doc NEWS doc/HOWTO README
 %dir /etc/default
 %attr(0644,root,root)	%config /etc/login.defs
 %attr(0600,root,root)	%config /etc/default/useradd
 %{_bindir}/sg
-%{_bindir}/chage
-%{_bindir}/faillog
-%{_bindir}/gpasswd
+%attr(4755,root,root) %{_bindir}/chage
+%attr(4755,root,root) %{_bindir}/gpasswd
 %{_bindir}/lastlog
-%{_bindir}/newgrp
+%attr(4755,root,root) %{_bindir}/newgrp
 %attr(0755,root,root) %caps(cap_setgid=ep) %{_bindir}/newgidmap
 %attr(0755,root,root) %caps(cap_setuid=ep) %{_bindir}/newuidmap
 %{_sbindir}/adduser
-%{_sbindir}/user*
-%{_sbindir}/group*
+%attr(0755,root,root) %{_sbindir}/user*
+%attr(0755,root,root) %{_sbindir}/group*
 %{_sbindir}/grpck
 %{_sbindir}/pwck
 %{_sbindir}/*conv
 %{_sbindir}/chpasswd
+%{_sbindir}/chgpasswd
 %{_sbindir}/newusers
 %{_sbindir}/vipw
 %{_sbindir}/vigr
 %{_mandir}/man1/chage.1*
-%{_mandir}/*/man1/chage.1*
 %{_mandir}/man1/gpasswd.1*
-%{_mandir}/*/man1/gpasswd.1*
 %{_mandir}/man1/sg.1*
-%{_mandir}/*/man1/sg.1*
 %{_mandir}/man1/newgrp.1*
-%{_mandir}/*/man1/newgrp.1*
 %{_mandir}/man1/newgidmap.1*
-%{_mandir}/*/man1/newgidmap.1*
 %{_mandir}/man1/newuidmap.1*
-%{_mandir}/*/man1/newuidmap.1*
 %{_mandir}/man3/shadow.3*
-%{_mandir}/*/man3/shadow.3*
-%{_mandir}/man3/getspnam.3*
-%{_mandir}/*/man3/getspnam.3*
 %{_mandir}/man5/shadow.5*
-%{_mandir}/*/man5/shadow.5*
 %{_mandir}/man5/login.defs.5*
-%{_mandir}/*/man5/login.defs.5*
 %{_mandir}/man5/gshadow.5*
-%{_mandir}/*/man5/gshadow.5*
-%{_mandir}/man5/faillog.5*
-%{_mandir}/*/man5/faillog.5*
-%{_mandir}/man5/subgid.5*
-%{_mandir}/*/man5/subgid.5*
 %{_mandir}/man5/subuid.5*
-%{_mandir}/*/man5/subuid.5*
+%{_mandir}/man5/subgid.5*
 %{_mandir}/man8/adduser.8*
-%{_mandir}/*/man8/adduser.8*
 %{_mandir}/man8/group*.8*
-%{_mandir}/*/man8/group*.8*
 %{_mandir}/man8/user*.8*
-%{_mandir}/*/man8/user*.8*
 %{_mandir}/man8/pwck.8*
-%{_mandir}/*/man8/pwck.8*
 %{_mandir}/man8/grpck.8*
-%{_mandir}/*/man8/grpck.8*
 %{_mandir}/man8/chpasswd.8*
-%{_mandir}/*/man8/chpasswd.8*
+%{_mandir}/man8/chgpasswd.8*
 %{_mandir}/man8/newusers.8*
-%{_mandir}/*/man8/newusers.8*
 %{_mandir}/man8/*conv.8*
-%{_mandir}/*/man8/*conv.8*
 %{_mandir}/man8/lastlog.8*
-%{_mandir}/*/man8/lastlog.8*
-%{_mandir}/man8/faillog.8*
-%{_mandir}/*/man8/faillog.8*
 %{_mandir}/man8/vipw.8*
-%{_mandir}/*/man8/vipw.8*
 %{_mandir}/man8/vigr.8*
-%{_mandir}/*/man8/vigr.8*
+
+%files subid
+%{_libdir}/libsubid.so.*
+
+%files subid-devel
+%{includesubiddir}/subid.h
+%{_libdir}/libsubid.so
+
 
 %changelog
+* Fri Aug 20 2021 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2:4.9-1
+- updated to 4.9.
+- updated patches.
+- updated Source1.
+- added license files (Source3 and 4).
+- added sub-packages: subid, subid-devel.
+
 * Wed Mar 18 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 2:4.8-1
 - updated to 4.8.
 - updated patches.