![](https://seccdn.libravatar.org/avatar/af8a9293484ed04b89081d848929b19a.jpg?s=120&d=mm&r=g)
On Tue, Nov 17, 2020 at 8:18 AM Ludwig Nussel <ludwig.nussel@suse.de> wrote:
Hi,
Quite some packages carry around sections like this:
#UsrMerge mkdir $RPM_BUILD_ROOT/sbin ln -s %_sbindir/foo $RPM_BUILD_ROOT/sbin/foo #EndUsrMerge
That was added years ago as preparation of replacing /bin, /sbin, /lib and /lib64 with a symlink and merging the content into their counterparts in /usr. I'm not sure how that was supposed to work in practice though. To actually get rid of resp disable that code even for testing one would have to modify a hundred packages.
So I'd like to replace those comments with a conditional, ie
%if !0%{?usrmerged} mkdir %buildroot/sbin ln -s %_sbindir/foo %buildroot/sbin/foo %endif
That doesn't yet answer the question when and how we finally do the /usr merge. However at least it would be possible to flip a switch via prjconf to stop building compat symlinks in a branch project then. Factory as of today would keep building the packages the way they are now, so no change in content at this point. Using the macro also paves the way to actually test a usr merged environment in staging in the future.
So unless there are better ideas I'd just go ahead and adjust all packages that have those symlinks.
I'd more be in favor of just ripping all that stuff out, but yeah, your plan makes sense. -- 真実はいつも一つ!/ Always, there's only one truth!