Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 728674 - sys-apps/baselayout-2.7[-split-usr] fails to install on RISC-V
Summary: sys-apps/baselayout-2.7[-split-usr] fails to install on RISC-V
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2020-06-18 15:50 UTC by David Michael
Modified: 2021-04-16 16:26 UTC (History)
2 users (show)

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


Attachments
Patch (baselayout.patch,4.19 KB, patch)
2020-06-20 22:22 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
Patch (baselayout.patch,5.39 KB, patch)
2020-06-20 23:39 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff
fix.patch (0001-sys-apps-baselayout-EAPI-7-fix-RISC-V-UsrMerge-sync-.patch,19.00 KB, patch)
2021-03-29 15:33 UTC, David Michael
Details | Diff
style.patch (0001-sys-apps-baselayout-unify-conditional-block-style.patch,16.20 KB, patch)
2021-03-29 15:57 UTC, David Michael
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Michael 2020-06-18 15:50:56 UTC
The baselayout package fails to install a new RISC-V root when split-usr is masked because of its multilib libdir subdirectories.  See the multilib_layout function in the ebuild.

Reproducible: Always

Steps to Reproduce:
1. emerge --{,sys}root=/tmp/newroot -v baselayout  # with split-usr masked in a riscv profile

Actual Results:  
>>> Emerging (1 of 1) sys-apps/baselayout-2.7::gentoo for /tmp/newroot/
 * baselayout-2.7.tar.bz2 BLAKE2B SHA512 size ;-) ... [ ok ]
 * symlinking /tmp/newroot/lib64/lp64d to usr/lib64/lp64d
ln: failed to create symbolic link '/tmp/newroot/lib64/lp64d': No such file or directory
 * ERROR: sys-apps/baselayout-2.7::gentoo failed (setup phase):
 *    Unable to make /tmp/newroot/lib64/lp64d symlink

Expected Results:  
It should build and install.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2020-06-20 22:21:23 UTC
It seems that adding 'mkdir -p' for parent directory before 'ln -s' should work.


Also since elements of prefix_lst array contain "${EROOT}", ${prefix_lst[@]} needs to be quoted as "${prefix_lst[@]}"...
Comment 2 Arfrever Frehtes Taifersar Arahesis 2020-06-20 22:22:50 UTC
Created attachment 645456 [details, diff]
Patch
Comment 3 Arfrever Frehtes Taifersar Arahesis 2020-06-20 23:39:21 UTC
Created attachment 645464 [details, diff]
Patch
Comment 4 David Michael 2020-06-21 04:25:54 UTC
To reiterate here from IRC earlier so I don't forget, the patch fixes the build failure, but it creates a /lib64 directory with lp64 and lp64d symlinks inside it, which is not the expected UsrMerge layout.  It should be /lib64 is a symlink to usr/lib64 where lp64 and lp64d are subdirectories.
Comment 5 David Michael 2021-03-29 15:33:41 UTC
Created attachment 695970 [details, diff]
fix.patch

Here is an EAPI update that includes this fix.
Comment 6 David Michael 2021-03-29 15:57:12 UTC
Created attachment 695973 [details, diff]
style.patch

I'll upload this as a separate patch since it's so noisy.  Feel free to squash them.
Comment 7 Larry the Git Cow gentoo-dev 2021-04-16 16:26:26 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b0ced97b588ac34ba5730ff812248e4e7f2af1cd

commit b0ced97b588ac34ba5730ff812248e4e7f2af1cd
Author:     David Michael <fedora.dm0@gmail.com>
AuthorDate: 2021-03-29 15:28:36 +0000
Commit:     William Hubbs <williamh@gentoo.org>
CommitDate: 2021-04-16 16:25:51 +0000

    sys-apps/baselayout: EAPI 7, fix RISC-V UsrMerge, sync live
    
    This fixes the UsrMerge layout on RISC-V with its subdirectory
    libdirs so that only lib and lib64 and links.
    
    It also updates the test for bad shells to look in the target root.
    
    Closes: https://bugs.gentoo.org/728674
    Signed-off-by: David Michael <fedora.dm0@gmail.com>
    Signed-off-by: William Hubbs <williamh@gentoo.org>

 sys-apps/baselayout/baselayout-2.7-r2.ebuild | 318 +++++++++++++++++++++++++++
 sys-apps/baselayout/baselayout-9999.ebuild   |  74 ++++---
 2 files changed, 359 insertions(+), 33 deletions(-)