[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: merged-/usr-via-symlinks vs a-different-layout



Guillem Jover writes:
> On Tue, 2019-02-19 at 08:54:12 +0100, Ansgar wrote:
>> Guillem Jover writes:
>> > 3) Switching packages to the merged-/usr layout could have been
>> >    accomplished automatically via debhelper for a coverage of around
>> >    99% (?) of the archive. With something along the lines of:
>> >
>> >      ,---
>> >      D=debian/tmp
>> >      for d in /bin /sbin /lib; do
>> >        for p in $(find $D/$d ! -type d); do
>> >          b="${p##$D/}"
>> >          m="$D/usr$b"
>> >          if [ ! -e "$m" ]; then
>> >            mkdir -p "$(dirname $m)"
>> >            mv "$p" "$m"
>> >            ln -s "${m##$D}" "$p"
>> >          fi
>> >        done
>> >      done
>> >      `---
>> >
>> >    With the property that it would handle gracefully all cases were the
>> >    maintainer has checked that no compat symlinks are required and has
>> >    then progressively moved the pathname installation to their final
>> >    destination under /usr.
>> 
>> That is not merged-/usr, but a different filesystem layout.
>> 
>> So, no, it is not possible to switch packages to merged-/usr this way.
>
> You are still conflating the concept with the deployment. The
> underlaying properties of merging /usr is that the contents for
> directories that are present in both / and /usr get merged into
> /usr.

No, I'm saying that you are proposing yet another different file system
layout.  Which is quite simple to see: the file system would differ.

You just claim it follows similar "ideas" in some way.

I can come up with other variations that move files to /usr too: have
/bin a symlink to /usr/root/bin (some for other directories).  That
would also be a different file system layout which shouldn't be called
"merged-/usr" either.

(That would have no filesystem aliasing between /bin and /usr/bin;
policy has special rules to allow replacing top-level directories with
symlinks; but besides that it is different for no good reason so I don't
think it would be a good idea.)

> See for example OpenSUSE which did this transition correctly:
>
>   <https://en.opensuse.org/openSUSE:Usr_merge>

"The special comments #UsrMerge, #EndUsrMerge will help us to clean up
the spec files once everything has been moved and we can create a
general link from /bin to /usr/bin for example. "

So they want a /bin -> /usr/bin symlink (and the same for the other
directories) just as in the proposal you call broken...

Maybe you have misunderstood what SuSE plans to do?

Having dpkg track a symlink /bin/${something} and a file
/usr/bin/${something} will break should /bin be turned into a symlink
happen.  So there is no nice way to finish the transition.  I'm not sure
how that would work on RPM; maybe SuSE got stuck with that?  That would
be another good reason to not follow that way...

I wouldn't be surprised if that took about as long as the /usr/doc ->
/usr/share/doc transition.  (If the change process for most simple
changes like file locations takes 10+ years then I say the process is
broken...)

Ansgar


Reply to: