:: Re: [DNG] How to unmerge /usr (was …
Página Inicial
Delete this message
Reply to this message
Autor: Arnt Karlsen
Data:  
Para: dng
Assunto: Re: [DNG] How to unmerge /usr (was Re: /usr to merge or not to merge... that is the question)
On Thu, 29 Nov 2018 10:05:19 +0100, Arnt wrote in message
<20181129100519.303dfc44@sda3>:

> On Wed, 28 Nov 2018 22:34:27 +0100 (CET), karl@??? wrote in
> message <20181128213427.2E51F862A869@???>:
>
> > Rich Moen:  
> > > Quoting KatolaZ (katolaz@???):    
> > ...  
> > > > # ldd /bin/ps | grep "/usr"
> > > >         liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1
> > > > (0x00007fd7f6ebc000)    

> > >
> > > Yeah, those two are really annoying.  FWIW, my server system has
> > > older versions of those two utilities that do _not_ have that
> > > (IMO) build error.  Local packages will be an immediate resort,
> > > when/if I hit that.    
> > ...

> >
> > Attached is a program to find possible /-/usr link breakage.
> > It could possible be changed into an un-usrmerge-program if we
> > want.
>
> ..yup, and packaged too. Put it in /sbin ? A shell or busybox
> or binary version might be handy to debug those boot-oopses.
>
> > Example output on a smallish system:
> > # usr.pl
> > /bin/nano
> >         /usr/lib64/libmagic.so.1
> > /bin/ping
> >         /usr/lib64/libcrypto.so.1.0.0  

>
> ..the output from my "life boat" install of
> devuan_ascii_2.0.0_amd64_desktop-live.iso
> is quite telling: 
> sda3:~# usr.pl
> /bin/efibootmgr
>         /usr/lib/x86_64-linux-gnu/libefivar.so.1
>         /usr/lib/x86_64-linux-gnu/libefiboot.so.1
> /bin/efibootdump
>         /usr/lib/x86_64-linux-gnu/libefivar.so.1
>         /usr/lib/x86_64-linux-gnu/libefiboot.so.1
> /bin/ping
>         /usr/lib/x86_64-linux-gnu/libnettle.so.6
> /sbin/mount.nfs
>         /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
>         /usr/lib/x86_64-linux-gnu/libkrb5.so.3
>         /usr/lib/x86_64-linux-gnu/libk5crypto.so.3
>         /usr/lib/x86_64-linux-gnu/libkrb5support.so.0
> /sbin/dhclient
>         /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.2
> /sbin/rpcbind
>         /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
>         /usr/lib/x86_64-linux-gnu/libkrb5.so.3
>         /usr/lib/x86_64-linux-gnu/libk5crypto.so.3
>         /usr/lib/x86_64-linux-gnu/liblz4.so.1
>         /usr/lib/x86_64-linux-gnu/libkrb5support.so.0
> /sbin/crda
>         /usr/lib/x86_64-linux-gnu/libssl.so.1.1
>         /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
> /sbin/tc
>         /usr/lib/x86_64-linux-gnu/libelf.so.1
> /sbin/umount.udisks2
>         /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0
>         /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
>         /usr/lib/x86_64-linux-gnu/libudisks2.so.0
>         /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0
>         /usr/lib/x86_64-linux-gnu/libffi.so.6
> /sbin/wpa_supplicant
>         /usr/lib/x86_64-linux-gnu/libpcsclite.so.1
>         /usr/lib/x86_64-linux-gnu/libssl.so.1.0.2
>         /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.2
> /sbin/rpc.statd
>         /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
>         /usr/lib/x86_64-linux-gnu/libkrb5.so.3
>         /usr/lib/x86_64-linux-gnu/libk5crypto.so.3
>         /usr/lib/x86_64-linux-gnu/libkrb5support.so.0
> /sbin/regdbdump
>         /usr/lib/x86_64-linux-gnu/libssl.so.1.1
>         /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1
> /sbin/discover
>         /usr/lib/libdiscover.so.2
> /sbin/sgdisk
>         /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> /sbin/gdisk
>         /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> /sbin/cgdisk
>         /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> /sbin/sm-notify
>         /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
>         /usr/lib/x86_64-linux-gnu/libkrb5.so.3
>         /usr/lib/x86_64-linux-gnu/libk5crypto.so.3
>         /usr/lib/x86_64-linux-gnu/libkrb5support.so.0
> /sbin/fixparts
>         /usr/lib/x86_64-linux-gnu/libstdc++.so.6
> /sbin/showmount
>         /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2
>         /usr/lib/x86_64-linux-gnu/libkrb5.so.3
>         /usr/lib/x86_64-linux-gnu/libk5crypto.so.3
>         /usr/lib/x86_64-linux-gnu/libkrb5support.so.0
> /sbin/xtables-multi
>         /usr/lib/x86_64-linux-gnu/libip4tc.so.0
>         /usr/lib/x86_64-linux-gnu/libip6tc.so.0
>         /usr/lib/x86_64-linux-gnu/libxtables.so.12
> sda3:~#

>
> ..note that I did toss out Xfce for LXQt to ease my workload fixing
> vdev or eudev, both are too polite to help build me a bootable
> initrd.
>
>


..chrooting into that sick box, I get:
root@sda3:/# usr.pl |grep ^/ |wc -l
36
root@sda3:/# dpkg -S $(usr.pl |grep ^/ ) |cut -d":" -f1 |sort \
|uniq |wc -l
20
root@sda3:/# dpkg -S $(usr.pl |grep ^/ ) |cut -d":" -f1 |sort |uniq
audispd-plugins
auditd
crda
discover
drbd-utils
ecryptfs-utils
efibootmgr
gdisk
iproute2
iptables
iptables-nftables-compat
iputils-ping
isc-dhcp-client
libpam-ccreds
nfs-common
nfs-kernel-server
reiserfsprogs
rpcbind
udisks2
wpasupplicant
root@sda3:/# ll $(usr.pl |grep ^/ )
-rwxr-xr-x 1 root root 18960 Jan 6 2017 /bin/efibootdump
-rwxr-xr-x 1 root root 40744 Jan 6 2017 /bin/efibootmgr
-rwxr-xr-x 1 root root 61240 Nov 10 2016 /bin/ping
-rwxr-xr-x 1 root root 30792 Apr 12 2017 /sbin/audispd-zos-remote
-rwxr-xr-x 1 root root 51424 Apr 12 2017 /sbin/audisp-prelude
-rwxr-xr-x 1 root root 43096 Apr 12 2017 /sbin/audisp-remote
-rwxr-xr-x 1 root root 116888 Apr 12 2017 /sbin/auditd
-rwsr-xr-x 1 root root 10536 Sep 27 2013 /sbin/ccreds_chkpwd
-rwxr-xr-x 1 root root 174128 Nov 22 2015 /sbin/cgdisk
-rwxr-xr-x 1 root root 10640 Jan 18 2017 /sbin/crda
-rwxr-xr-x 1 root root 72792 Jun 8 2016 /sbin/debugreiserfs
-rwxr-xr-x 1 root root 487728 Mar 3 2018 /sbin/dhclient
-rwxr-xr-x 1 root root 19672 Feb 26 2018 /sbin/discover
-rwxr-xr-x 1 root root 188192 May 12 2017 /sbin/drbdmon
-rwxr-xr-x 1 root root 59432 Nov 22 2015 /sbin/fixparts
-rwxr-xr-x 1 root root 182320 Nov 22 2015 /sbin/gdisk
-rwxr-xr-x 1 root root 23544 Jun 8 2016 /sbin/mkreiserfs
-rwxr-xr-x 1 root root 25416 Mar 18 2017 /sbin/mount.ecryptfs
-rwsr-xr-x 1 root root 18424 Mar 18 2017 /sbin/mount.ecryptfs_private
-rwsr-xr-x 1 root root 110760 Mar 20 2017 /sbin/mount.nfs
-rwxr-xr-x 1 root root 27672 Mar 20 2017 /sbin/nfsdcltrack
-rwxr-xr-x 1 root root 10464 Jan 18 2017 /sbin/regdbdump
-rwxr-xr-x 1 root root 172440 Jun 8 2016 /sbin/reiserfsck
-rwxr-xr-x 1 root root 23768 Jun 8 2016 /sbin/reiserfstune
-rwxr-xr-x 1 root root 19008 Jun 8 2016 /sbin/resize_reiserfs
-rwxr-xr-x 1 root root 52520 May 5 2017 /sbin/rpcbind
-rwxr-xr-x 1 root root 82056 Mar 20 2017 /sbin/rpc.statd
-rwxr-xr-x 1 root root 170032 Nov 22 2015 /sbin/sgdisk
-rwxr-xr-x 1 root root 19224 Mar 20 2017 /sbin/showmount
-rwxr-xr-x 1 root root 52456 Mar 20 2017 /sbin/sm-notify
-rwxr-xr-x 1 root root 387632 Nov 24 2017 /sbin/tc
-rwxr-xr-x 1 root root 10232 Mar 18 2017 /sbin/umount.ecryptfs
-rwxr-xr-x 1 root root 10472 Aug 23 2017 /sbin/umount.udisks2
-rwxr-xr-x 1 root root 2151984 Aug 9 09:23 /sbin/wpa_supplicant
-rwxr-xr-x 1 root root 185648 Apr 12 2017 /sbin/xtables-compat-multi
-rwxr-xr-x 1 root root 94968 Apr 12 2017 /sbin/xtables-multi
root@sda3:/#

..looks like Karl's usr.pl does the right thing, no links.


--
..med vennlig hilsen = with Kind Regards from Arnt Karlsen
...with a number of polar bear hunters in his ancestry...
Scenarios always come in sets of three:
best case, worst case, and just in case.