Summary: | java-pkg-simple.eclass: does not sufficiently skip compilation if USE=binary is set. (was: app-misc/rundeck-cli-bin-2.0.1 - ejavac failed ) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Eclasses | Assignee: | Java team <java> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | java, liaoyuan, williamh |
Priority: | Normal | Keywords: | PullRequest |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/gentoo/gentoo/pull/26647 https://github.com/gentoo/gentoo/pull/27000 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
emerge-info.txt
app-misc:rundeck-cli-bin-2.0.1:20220725-174436.log emerge-history.txt environment etc.portage.tar.bz2 logs.tar.bz2 |
Description
Toralf Förster
![]() Created attachment 794354 [details]
emerge-info.txt
Created attachment 794357 [details]
app-misc:rundeck-cli-bin-2.0.1:20220725-174436.log
Created attachment 794360 [details]
emerge-history.txt
Created attachment 794363 [details]
environment
Created attachment 794366 [details]
etc.portage.tar.bz2
Created attachment 794369 [details]
logs.tar.bz2
It's a bug in java-pkg-simple.eclass. "If USE FLAG 'binary' exists and is set, it will just copy ${JAVA_BINJAR_FILENAME} to ${S} and skip the rest of src_compile." The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61f4303bb92f22c65c803763e8f4a29b5a8bd2b3 commit 61f4303bb92f22c65c803763e8f4a29b5a8bd2b3 Author: Volkmar W. Pogatzki <gentoo@pogatzki.net> AuthorDate: 2022-07-29 09:36:29 +0000 Commit: Florian Schmaus <flow@gentoo.org> CommitDate: 2022-08-02 11:45:28 +0000 java-pkg-simple.eclass: run java-pkg_gen-cp only for non-binary packages app-misc/rundeck-cli-bin-2.0.1 failed to build with openjdk-jre-bin-17 saying "javac is not available for openjdk-jre-bin-17 on x86_64". Culprit was java-pkg-simple.eclass calling java-pkg_gen-cp unconditionally. Limiting java-pkg_gen-cp to the "non-binary" case solves the problem. Closes: https://bugs.gentoo.org/861026 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Closes: https://github.com/gentoo/gentoo/pull/26647 Signed-off-by: Florian Schmaus <flow@gentoo.org> eclass/java-pkg-simple.eclass | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Sorry for this late reply because I've been struggling to keep up with Java updates for a while. I have just identified the above eclass change as the root cause of some regressions and test failures on Spark overlay [1] packages. The overlay has a lot of Java packages that support the 'binary' USE flag, and their dependencies are no longer correctly declared in the /usr/share/{PN}/package.env file after this change. From my (late) investigation on this bug, the eclass change per se is a non-solution. The java-pkg_gen-cp() function (defined at the very bottom of java-utils-2.eclass) does not call any JDK programs, so it is safe to call it when 'use binary' and only JRE is installed. The build log has a clue to the real underlying cause: 'binary' was not included in the USE flag combination printed at the log start despite 'IUSE="+binary"' being declared in app-misc/rundeck-cli-bin: > * USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU Since this bug was reported by tinderbox, I suspect it was caused by tinderbox testing different USE flag combinations. The '+' operator in IUSE just enables a USE flag by default; it does not force it, so anyone, including users and tinderbox, can disable it on their own in /etc/portage/package.use. Perhaps, when tinderbox decided to run a test with the 'binary' USE flag disabled, the error in the bug occurred. To compare, I built app-misc/rundeck-cli-bin-2.0.1 locally with default USE settings, and this is what was given in the build log. Note that the 'binary' USE flag was included here. > * USE: abi_x86_64 amd64 binary elibc_glibc kernel_linux userland_GNU Furthermore, this bug can still be reproduced with a copy of ::gentoo I just synced today, when I disabled the 'binary' USE flag myself, despite all the pertaining eclass and ebuild changes: > # USE="-binary" emerge -a1 app-misc/rundeck-cli-bin To properly resolve the bug, I would suggest reverting this eclass change, and doing either of the following: - Forcefully enable the 'binary' USE flag for app-misc/rundeck-cli-bin in the profile - Or, maybe better, just remove the 'binary' USE flag if it was intended to be always enabled, but override src_compile() in the app-misc/rundeck-cli-bin ebuild so it would copy the binary JAR to ${JAVA_JAR_FILENAME} and return directly, like in [3] [1]: https://github.com/6-6-6/spark-overlay [2]: https://861026.bugs.gentoo.org/attachment.cgi?id=794357 [3]: https://github.com/6-6-6/spark-overlay/blob/master/dev-java/lombok-bin/lombok-bin-1.18.22.ebuild#L29-L32 The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=38dc429245b0d935aeeb0b423ace19787c88b195 commit 38dc429245b0d935aeeb0b423ace19787c88b195 Author: Volkmar W. Pogatzki <gentoo@pogatzki.net> AuthorDate: 2022-08-24 10:46:34 +0000 Commit: William Hubbs <williamh@gentoo.org> CommitDate: 2022-08-25 16:37:47 +0000 app-misc/rundeck-cli-bin: revert to 0.1.11 style Bug: https://bugs.gentoo.org/861026 Closes: https://github.com/gentoo/gentoo/pull/27000 Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net> Signed-off-by: William Hubbs <williamh@gentoo.org> app-misc/rundeck-cli-bin/metadata.xml | 3 --- app-misc/rundeck-cli-bin/rundeck-cli-bin-2.0.1.ebuild | 13 +++++++------ 2 files changed, 7 insertions(+), 9 deletions(-) |