Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 757837

Summary: sys-apps/baselayout-java does not work well as a binpkg.
Product: Gentoo Linux Reporter: Boleyn Su <boleyn.su>
Component: Current packagesAssignee: Java team <java>
Status: RESOLVED FIXED    
Severity: normal CC: boleyn.su, jstein
Priority: Normal Keywords: PullRequest
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Boleyn Su 2020-12-01 10:20:05 UTC
We build a binpkg with EROOT=/ and it is hardcoded into a script file.

We then emerge the binpkg to EROOT=/build/whatever. However, the postinst calls the script file and write to /etc/ssl/certs/java/cacerts instead of /build/whatever/etc/ssl/certs/java/cacerts.

Finally, we package /build/whatever as our SDK. Thus, we cannot find /etc/ssl/certs/java/cacerts in the CrOS SDK.

Reproducible: Always

Steps to Reproduce:
We build a binpkg with EROOT=/ and it is hardcoded into a script file.

We then emerge the binpkg to EROOT=/build/whatever. However, the postinst calls the script file and write to /etc/ssl/certs/java/cacerts instead of /build/whatever/etc/ssl/certs/java/cacerts.

Finally, we package /build/whatever as our SDK. Thus, we cannot find /etc/ssl/certs/java/cacerts in the CrOS SDK.
Actual Results:  
We cannot find /etc/ssl/certs/java/cacerts in the CrOS SDK.

Expected Results:  
We can find /etc/ssl/certs/java/cacerts in the CrOS SDK.
Comment 1 Boleyn Su 2020-12-01 10:27:08 UTC
I have uploaded a PR at https://github.com/gentoo/gentoo/pull/18469.
Comment 2 Jonas Stein gentoo-dev 2020-12-01 20:43:54 UTC
Bug: https://bugs.gentoo.org/757837
should be
Closes: https://bugs.gentoo.org/757837
Comment 3 Larry the Git Cow gentoo-dev 2020-12-18 20:06:48 UTC
The bug has been closed via the following commit(s):

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

commit e6ebf3224ce898d9c55c0fe3fc29a47fe17a6906
Author:     Boleyn Su <boleyn.su@gmail.com>
AuthorDate: 2020-12-01 09:50:15 +0000
Commit:     Georgy Yakovlev <gyakovlev@gentoo.org>
CommitDate: 2020-12-18 20:06:25 +0000

    Fix postinst script of sys-apps/baselayout-java
    
    The old postinst will not work for binpkg. This CL fixes it.
    
    Closes: https://bugs.gentoo.org/757837
    Signed-off-by: Boleyn Su <boleynsu@google.com>
    Closes: https://github.com/gentoo/gentoo/pull/18469
    Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>

 sys-apps/baselayout-java/baselayout-java-0.1.0-r1.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)