spec: subpackage of newuidmap and newgidmap

and have the main package depend on them for consistent experience.
Though this may hae the side effect of yum wanting to use the main
shadow as an upgrade to the shadow 4.1 that centos/rhel are using ...

Built local rpm with:
```shell
rpmbuild \
	--define "_sourcedir $(pwd)" \
	--define "_specdir $(pwd)" \
	--define "_builddir $(pwd)" \
	--define "_srcrpmdir $(pwd)" \
	--define "_rpmdir $(pwd)" \
	--nodeps \
	-ba \
	shadow-utils.spec
```

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
Vincent Batts 2018-10-02 04:35:53 -04:00
parent 6a08374eef
commit 3544220035

View file

@ -48,6 +48,7 @@ Requires: audit-libs >= 1.6.5
Requires: setup
Requires(pre): coreutils
Requires(post): coreutils
Requires: %{name}-newxidmap = %{version}-%{release}
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
@ -62,6 +63,11 @@ 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 newxidmap
Summary: only the newuidmapp and newgidmap from shadow-utils
%description newxidmap
%{summary}.
%prep
%setup -q -n shadow-%{version}
%patch0 -p1 -b .redhat
@ -200,8 +206,6 @@ done
%attr(4755,root,root) %{_bindir}/gpasswd
%{_bindir}/lastlog
%attr(4755,root,root) %{_bindir}/newgrp
%attr(4755,root,root) %{_bindir}/newgidmap
%attr(4755,root,root) %{_bindir}/newuidmap
%{_sbindir}/adduser
%attr(0755,root,root) %{_sbindir}/user*
%attr(0755,root,root) %{_sbindir}/group*
@ -217,8 +221,6 @@ done
%{_mandir}/man1/gpasswd.1*
%{_mandir}/man1/sg.1*
%{_mandir}/man1/newgrp.1*
%{_mandir}/man1/newgidmap.1*
%{_mandir}/man1/newuidmap.1*
%{_mandir}/man3/shadow.3*
%{_mandir}/man5/shadow.5*
%{_mandir}/man5/login.defs.5*
@ -238,6 +240,12 @@ done
%{_mandir}/man8/vipw.8*
%{_mandir}/man8/vigr.8*
%files newxidmap
%attr(4755,root,root) %{_bindir}/newgidmap
%attr(4755,root,root) %{_bindir}/newuidmap
%{_mandir}/man1/newgidmap.1*
%{_mandir}/man1/newuidmap.1*
%changelog
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2:4.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild