:: Re: [DNG] ..rabbit hole plugging cr…
Top Page
Delete this message
Reply to this message
Author: Arnt Karlsen
Date:  
To: tito via Dng
Subject: Re: [DNG] ..rabbit hole plugging creepy stuff like usr-merge...
On Sun, 5 Jul 2026 10:55:45 +0200, tito wrote in message
<20260705105545.3848322a@devuan>:

> On Sun, 5 Jul 2026 08:31:43 +0200
> Lorenz via Dng <dng@???> wrote:
>
> > On Sat, Jul 4, 2026 at 7:27 PM Svante Signell via Dng
> > <dng@???> wrote:
> >
> > > >
> > > What does your script really do? A wish would be a script logging
> > > the number of soft links and files referring to /bin, /sbin etc.
> > > Then we could determine how many soft links are really needed for
> > > Devuan without usrmerge. And those already implemented by me for
> > > GNU/Hurd sid.
> > >
> > > Thanks!
> >
> > I'm not sure what layout you have in mind for your unmerged system:
> > in any case I guess /bin /lib /sbin will be real directories, but
> > 1) populate /bin /lib /sbin and so with symlinks to their /usr
> > counterpart for a list of binaries (for example from coreutils and
> > util-linux)
> Hi,
>
> 1) make a tool that traces what binaries and their deps (libs,
> interpreters, linker, modules) are needed to boot that particular
> system until e.g. /usr is mounted (or any other target you need) and
> make a list of that files e.g UNMERGEDFILES.TXT and add for each file
> the target dir in a way it could be easily parsed (or if you know by
> experience you no tool at all)
>
> 2) detect to which deb packages the files belong and make a list
> PACKAGELIST.TXT or add that info to the UNMERGEDFILES.TXT to keep it
> simple
>
> 3) make /bin /sbin /lib directories (any other I forget?)
>
> 4) copy the binaries, libs, shells, and interpreters to the
>      created  target directories by a script that parses
>       UNMERGEDFILES.TXT

>
> 5) add a hook to apt so that if any package in PACKAGELIST.TXT (or
> UNMERGEDFILES.TXT) is updated the relevant files are copied to the
> target directories
>
> 6) (if possible) add a hook that at every package install checks if 
>       any new dependencies are added to the boot process
>        ( i think this will be slow, to slow)

>
> Advantages: no need to mess with deb packages, from the package
> manager point of view the system is still usrmerged.
>
> Contra: is it possible to trace all the files needed? I have no idea
> how to achieve this....yet can this survive updates and upgrades: is
> to be demonstrated.
>
> Just my 2 cents,


..my 2 cents: ...
for p in sbin bin lib lib32 lib64 ;do dpkg -S $(which $(ls \
/$p/* )) |cut -d":" -f1 |sort |uniq |wc -l ;echo "in /$p" \
;done ;cat /etc/issue ;dpkg -l |wc -l "

..._counts_ the packages that has files is /sbin, /bin, /lib,
/lib32 ond /lib64, that maybe should stay there, as statically
linked programs, for root's exclusive use, in this fine era of
such plentiful cheap disk space that the fanbois wants us to
waste on usrmerge, systemd, wayland etc "clever" pötterisms.

..the masses who lives in their /home/* should be happy with
whatever is served from the /usr tree, and should _NOT_ need
anything from above the /usr tree, or whatever they build in
their own /home/~ .

..to _list_ those files: for p in sbin bin lib lib32 lib64 ;do \
echo "List of packages in /$p:" &&dpkg -S $(which $(ls /$p/* )) \
|cut -d":" -f1 |sort |uniq ;echo "End of list of packages in /$p" \
&&echo ;done ;cat /etc/issue ;echo -n "total number of packages \
installed: " &&qalc -t $(dpkg -l |wc -l )-5

..the above lists packages that lives in /sbin, /bin, /lib, /lib32
ond /lib64.on my chimaera and daedalus machines where we're going
to help prevent or reverse any usrmerge etc damage.


..if the "qalc -t $(dpkg -l |wc -l )-5 " bit thruws an error msg,
"aptitude install qalc " and try again, or, replace with "dpkg -l \
|wc -l " and manually deduct the 5 "dpkg -l " header lines "wc -l "
also counts.

..furter AI rabbit holing dug up 3 more uselessly fancy
alternatives to my 'qalc -t $(dpkg -l |wc -l )-5 ':
' dc -e "$(dpkg -l | wc -l) 5 - p" ',
' echo "$(dpkg -l | wc -l) - 5" | bc '
and ' calc -p $(dpkg -l |wc -l )-5 '.

> Ciao,
> Tito
>
> > 2) rebuild few essential packages (again coreutils, util linux and
> > so) to revert the move to /usr and ship in /bin /sbin, then populate
> >     /usr/bin and /usr/sbin with symlinks
> > 3) some other way I didn't think about

> >
> > Could you clarify?



--
..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.