Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 940633 - app-shells/bash-5.1_p16-r13 resets merge-usr
Summary: app-shells/bash-5.1_p16-r13 resets merge-usr
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal minor
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-02 06:51 UTC by Mark Liman
Modified: 2024-10-03 16:15 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Liman 2024-10-02 06:51:12 UTC
I created a fresh crossdev environment and ran the merge user script on it, then I emerged bash inside the crossdev which reset the symlink on /bin and made it back to a normal folder, if I ran the merge user script again after that it put the symlink back and reinstalling bash seemed to no longer reset it

Reproducible: Always

Steps to Reproduce:
1.Create crossdev, my crossdev is x86_64-linux-gnu same as host
2.Run merge-usr script with --root set to the crossdev folder
3.Select a hardened openrc (merged-usr) profile for the crossdev 
4.emerge-(crossdev) app-shells/bash
Actual Results:  
the bin folder was reset back to a normal folder inside the crossdev environment instead of being a symlink

Expected Results:  
the merge user should have stayed and not been reset
Comment 1 Mike Gilbert gentoo-dev 2024-10-02 19:15:48 UTC
This likely has nothing to do with the bash ebuild, and is probably related to the profile you have selected in the cross-root.

If you could provide the emerge output showing the /bin symlink being removed, that might help.
Comment 2 Mike Gilbert gentoo-dev 2024-10-02 19:20:02 UTC
Please also provide emerge --info from your cross-emerge.
Comment 3 Mark Liman 2024-10-03 05:55:15 UTC
You were right it has nothing to do with bash, it's the crossdev itself, it doesn't make a /bin folder so there is nothing for the merge-usr script to symlink to /usr/bin, bash if the first program from @system to actually install in /bin rather than /usr/bin and the next package alternatives/sh fails as it sees the /bin folder not symlinked on a merge-usr profile

default/linux/amd64/23.0/hardened

ls -l of the crossdev

drwxr-xr-x 1 root root   21 Sep 30 12:43 etc
drwxr-xr-x 2 root root   60 Sep 30 12:43 lib
drwxr-xr-x 2 root root 4096 Sep 30 12:43 lib64
drwxr-xr-x 2 root root   33 Sep 30 12:43 sbin
lrwxrwxrwx 1 root root   11 Sep 30 12:43 sys-include -> usr/include
drwxr-xr-x 8 root root   81 Sep 30 12:43 usr
drwxr-xr-x 3 root root   16 Sep 30 12:43 var

of course after the merge-usr script

drwxr-xr-x 1 root root 21 Sep 30 12:43 etc
lrwxrwxrwx 1 root root  7 Oct  3 05:49 lib -> usr/lib
lrwxrwxrwx 1 root root  9 Oct  3 05:49 lib64 -> usr/lib64
lrwxrwxrwx 1 root root  7 Oct  3 05:49 sbin -> usr/bin
lrwxrwxrwx 1 root root 11 Sep 30 12:43 sys-include -> usr/include
drwxr-xr-x 1 root root 42 Oct  3 05:49 usr
drwxr-xr-x 3 root root 16 Sep 30 12:43 var

ROOT=/usr/x86_64-epic-linux-gnu/

If I run mkdir ${ROOT}/bin and then run merge-usr --root ${ROOT} then installing bash doesn't break anything

the crossdev I am using is

crossdev --target x86_64-epic-linux-gnu --stable

I guess this isn't really a bug but me just not looking well enough.
Comment 4 Mike Gilbert gentoo-dev 2024-10-03 14:57:05 UTC
I would suggest running the following to populate your ROOT after running crossdev:

USE=build x86_64-epic-linux-gnu-emerge -v1O sys-apps/baselayout

Note the "build" USE flag; this is important.

This should install the base directory layout, including an empty /bin directory (or a /bin symlink if on a merged-usr profile).
Comment 5 Mark Liman 2024-10-03 16:15:31 UTC
(In reply to Mike Gilbert from comment #4)
> I would suggest running the following to populate your ROOT after running
> crossdev:
> 
> USE=build x86_64-epic-linux-gnu-emerge -v1O sys-apps/baselayout
> 
> Note the "build" USE flag; this is important.
> 
> This should install the base directory layout, including an empty /bin
> directory (or a /bin symlink if on a merged-usr profile).

Thanks, didn't know about this.