[packages/shadow] - shadow puts everything into /bin and /sbin - that's ok but provide symlinks for old (pwdutils) loc

Arkadiusz Miśkiewicz arekm at maven.pl
Tue Jan 7 17:58:46 CET 2020


On 07/01/2020 17:06, Jakub Bogusz wrote:
> On Tue, Jan 07, 2020 at 01:36:44PM +0100, arekm wrote:
>> commit 2bb4da0ffecbbc08e6e25336b3e1e012b7cd61a5
>> Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
>> Date:   Tue Jan 7 13:36:34 2020 +0100
>>
>>     - shadow puts everything into /bin and /sbin - that's ok but provide symlinks for old (pwdutils) locations
> [...]
>> +# compatibility with old locations (and pwdutils)
>> +install -d $RPM_BUILD_ROOT%{_bindir}
>> +for f in chage chfn chsh expiry faillog gpasswd newgrp newgidmap passwd newuidmap sg; do
>> +  ln -s /bin/${f} $RPM_BUILD_ROOT%{_bindir}/${f}
>> +done
>> +install -d $RPM_BUILD_ROOT%{_sbindir}
>> +for f in chgpasswd chpasswd groupadd groupdel groupmems groupmod grpck grpconv grpunconv logoutd newusers pwck pwconv pwunconv useradd userdel usermod vigr vipw; do
>> +  ln -s /sbin/${f} $RPM_BUILD_ROOT%{_sbindir}/${f}
>> +done
>> +
> [...]
>> +%attr(4755,root,root) /bin/chfn
>>  %attr(4755,root,root) %{_bindir}/chfn
>> +%attr(4755,root,root) /bin/chsh
>>  %attr(4755,root,root) %{_bindir}/chsh
>> +%attr(4755,root,root) /bin/expiry
>>  %attr(4755,root,root) %{_bindir}/expiry
>> +%attr(4755,root,root) /bin/gpasswd
>>  %attr(4755,root,root) %{_bindir}/gpasswd
>> +%attr(4755,root,root) /bin/passwd
>>  %attr(4755,root,root) %{_bindir}/passwd
>> +%attr(4755,root,root) /bin/chage
>>  %attr(4755,root,root) %{_bindir}/chage
>> +%attr(755,root,root) /bin/faillog
>>  %attr(755,root,root) %{_bindir}/faillog
>> +%attr(4755,root,root) /bin/newgrp
>>  %attr(4755,root,root) %{_bindir}/newgrp
>> +%attr(755,root,root) /bin/sg
>>  %attr(755,root,root) %{_bindir}/sg
>> +%attr(755,root,root) /sbin/chgpasswd
>>  %attr(755,root,root) %{_sbindir}/chgpasswd
>> +%attr(755,root,root) /sbin/chpasswd
>>  %attr(755,root,root) %{_sbindir}/chpasswd
>> +%attr(755,root,root) /sbin/groupadd
>>  %attr(755,root,root) %{_sbindir}/groupadd
>> +%attr(755,root,root) /sbin/groupdel
>>  %attr(755,root,root) %{_sbindir}/groupdel
>> +%attr(755,root,root) /sbin/groupmems
>>  %attr(755,root,root) %{_sbindir}/groupmems
>> +%attr(755,root,root) /sbin/groupmod
>>  %attr(755,root,root) %{_sbindir}/groupmod
> [...]
> 
> Uhhh, please, no.

It's ugly but I don't see any other solution that would work.

> Either go traditional way and distribute binaries over directories (like
> in coreutils),

To goal is not to diverge from upstream.

or maybe it's time to go merged-/usr distro-wide?
> 
> Are there still any profits from using local / with network or host shared /usr?

Does it matter for this case?


The only goal of symlinks it to have this package working in current PLD
which has hardcoded /usr paths to some of these binaries.

-- 
Arkadiusz Miśkiewicz, arekm / ( maven.pl | pld-linux.org )


More information about the pld-devel-en mailing list