Re: [DNG] How to unmerge /usr (was Re: /usr to merge or not to merge... that is the question)

2018-11-29 Thread Arnt Karlsen
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), k...@aspodata.se wrote in
> message <20181128213427.2e51f862a...@turkos.aspodata.se>:
> 
> > Rich Moen:  
> > > Quoting KatolaZ (kato...@freaknet.org):
> > ...  
> > > > # ldd /bin/ps | grep "/usr"
> > > > liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1
> > > > (0x7fd7f6ebc000)
> > > 
> > > 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  

Re: [DNG] How to unmerge /usr (was Re: /usr to merge or not to merge... that is the question)

2018-11-29 Thread Arnt Karlsen
On Thu, 29 Nov 2018 13:34:24 +0100, KatolaZ wrote in message 
<20181129123424.ojmbaljuam77m...@katolaz.homeunix.net>:

> On Thu, Nov 29, 2018 at 09:18:38PM +0900, Olaf Meeuwissen wrote:
> > Hi Karl,
> > 
> > k...@aspodata.se writes:
> >   
> > > Rich Moen:  
> > >> Quoting KatolaZ (kato...@freaknet.org):  
> > > ...  
> > >> > # ldd /bin/ps | grep "/usr"
> > >> > liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1
> > >> > (0x7fd7f6ebc000)  
> > >>
> > >> 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.  
> > 
> > Looks like your script is ignoring any symlinks in /bin and /sbin
> > that point to stuff in /usr ...
> > Or elsewhere not on the partition that holds / ...
> > :-/
> >   
> 
> Actually, that would amount to getting down a quite deep rabbit
> hole. Those links, even if they exist, might have been created by the
> postinst script of some package, or by the local sysadmin. In the
> former case, removing them blindly will probably cause at least a dpkg
> error at the next upgrade of the corresponding package.

..we can use those dpkg errors to help automate bug reports.

..and wherever we disagree with Debian's merge etc policy, 
a Devuan fork .deb can be as simple as having our postinst 
script flip a symlink around, or copying files into /sbin 
or /bin, rather than symlinking them there.

> In the latter
> case, removing them blindly might possibly cause breakage to some
> functionality put in place by the sysadmin and/or undesired
> side-effects.

..dpkg-divert is handy in such cases.

-- 
..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.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] How to unmerge /usr (was Re: /usr to merge or not to merge... that is the question)

2018-11-29 Thread KatolaZ
On Thu, Nov 29, 2018 at 09:18:38PM +0900, Olaf Meeuwissen wrote:
> Hi Karl,
> 
> k...@aspodata.se writes:
> 
> > Rich Moen:
> >> Quoting KatolaZ (kato...@freaknet.org):
> > ...
> >> > # ldd /bin/ps | grep "/usr"
> >> > liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 
> >> > (0x7fd7f6ebc000)
> >>
> >> 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.
> 
> Looks like your script is ignoring any symlinks in /bin and /sbin that
> point to stuff in /usr ...
> Or elsewhere not on the partition that holds / ...
> :-/
> 

Actually, that would amount to getting down a quite deep rabbit
hole. Those links, even if they exist, might have been created by the
postinst script of some package, or by the local sysadmin. In the
former case, removing them blindly will probably cause at least a dpkg
error at the next upgrade of the corresponding package. In the latter
case, removing them blindly might possibly cause breakage to some
functionality put in place by the sysadmin and/or undesired
side-effects.

My2Cents

KatolaZ

-- 
[ ~.,_  Enzo Nicosia aka KatolaZ - Devuan -- Freaknet Medialab  ]  
[ "+.  katolaz [at] freaknet.org --- katolaz [at] yahoo.it  ]
[   @)   http://kalos.mine.nu ---  Devuan GNU + Linux User  ]
[ @@)  http://maths.qmul.ac.uk/~vnicosia --  GPG: 0B5F062F  ] 
[ (@@@)  Twitter: @KatolaZ - skype: katolaz -- github: KatolaZ  ]


signature.asc
Description: PGP signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] How to unmerge /usr (was Re: /usr to merge or not to merge... that is the question)

2018-11-29 Thread Olaf Meeuwissen
Hi Karl,

k...@aspodata.se writes:

> Rich Moen:
>> Quoting KatolaZ (kato...@freaknet.org):
> ...
>> > # ldd /bin/ps | grep "/usr"
>> > liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 
>> > (0x7fd7f6ebc000)
>>
>> 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.

Looks like your script is ignoring any symlinks in /bin and /sbin that
point to stuff in /usr ...
Or elsewhere not on the partition that holds / ...
:-/

Hope that helps,
--
Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Softwarehttps://my.fsf.org/donate
 Join the Free Software Foundation  https://my.fsf.org/join
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] How to unmerge /usr (was Re: /usr to merge or not to merge... that is the question)

2018-11-29 Thread Rick Moen
Quoting Arnt Karlsen (a...@iaksess.no):

> ..the output from my "life boat" install of
> devuan_ascii_2.0.0_amd64_desktop-live.iso
> is quite telling: 

[snip]

My view:  It's not necessarily problematic that something in /sbin or
/bin depends on /usr to function -- and most of the tools you list IMO 
are not a problem on that account.

You might have different criteria in mind, so please feel free to
clarify, if so.   My view is that executables in /sbin and /bin 
_required for maintenance in /usr's absence_ must not depend on /usr
being mounted.  Many executables somehow get installed there anyway; 
probably they'd have been better written to /usr/sbin and /usr/bin, 
but that's a separate issue.  As Filesystem Hierarchy Standard 2.3[1]
puts it:

  /sbin contains binaries essential for booting, restoring, recovering,
  and/or repairing the system in addition to the binaries in /bin.

  /bin contains commands that may be used by both the system
  administrator and by users, but which are required when no other
  filesystems are mounted (e.g. in single user mode).  It may also 
  contain commands which are used indirectly by scripts

Many of the utilities you found using that script _aren't_ IMO required 
during the sort of maintenance operations contemplated here.


[1] Yes, FHS 3.0 also exists.  FWIW, I have reservations about its
general soundness under Linux Foundation's LSB Workgroup authorship
that made substantial revisions from Dan Quinlan, Rusty Russell, and the
late Chris Yeoh's universally admired FHS 2.x work.


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] How to unmerge /usr (was Re: /usr to merge or not to merge... that is the question)

2018-11-29 Thread Arnt Karlsen
On Wed, 28 Nov 2018 22:34:27 +0100 (CET), k...@aspodata.se wrote in
message <20181128213427.2e51f862a...@turkos.aspodata.se>:

> Rich Moen:
> > Quoting KatolaZ (kato...@freaknet.org):  
> ...
> > > # ldd /bin/ps | grep "/usr"
> > > liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1
> > > (0x7fd7f6ebc000)  
> > 
> > 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. 


-- 
..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.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] How to unmerge /usr (was Re: /usr to merge or not to merge... that is the question)

2018-11-28 Thread karl
Rich Moen:
> Quoting KatolaZ (kato...@freaknet.org):
...
> > # ldd /bin/ps | grep "/usr"
> > liblz4.so.1 => /usr/lib/x86_64-linux-gnu/liblz4.so.1 
> > (0x7fd7f6ebc000)
> 
> 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.

Example output on a smallish system:
# usr.pl
/bin/nano
/usr/lib64/libmagic.so.1
/bin/ping
/usr/lib64/libcrypto.so.1.0.0
#

Regards,
/Karl Hammar

---
Aspö Data
Lilla Aspö 148
S-742 94 Östhammar
Sweden

#!/usr/bin/perl -w

use strict;

sub run($) {
my $file = shift;
my @lib = split /\n/, `ldd $file`;
my @usr = grep /\/usr/, @lib;
if (@usr) {
	print "$file\n";
	for my $l (@usr) {
	$l =~ m/=>\s(\S*)\s/;
	my $n = $1;
	print "\t$n\n";
	}
}
}

sub main() {
my @file = split /\n/, `find /bin /sbin -type f`;

for my $file (@file) {
	run($file);
}
}

main();___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng