Skip to content

Conversation

@wolfi-bot
Copy link
Contributor

@wolfi-bot wolfi-bot requested a review from a team as a code owner April 12, 2023 13:06
@wolfi-bot wolfi-bot requested review from cpanato and luhring April 12, 2023 13:06
luhring
luhring previously approved these changes Apr 12, 2023
@luhring
Copy link
Member

luhring commented Apr 12, 2023

Hmmm

2023/04/12 13:07:23 error during command execution: failed to build package: unable to build guest: unable to generate image: installing apk packages: unable to install files for pkg openjdk-11: file already exists

@rawlingsj rawlingsj force-pushed the wolfictl-1f475e04-fe0a-481c-9b20-d675a6122743 branch from 4bbd97d to c7e66e7 Compare April 19, 2023 08:48
@patflynn
Copy link
Contributor

I wonder if that error is because maven includes openjdk-jre while gradle is including openjdk directly and they both overlap.

@rawlingsj
Copy link
Member

I wonder if it's actually the - gradle-stage0 dependency? That has a runtime dependency

os/gradle-stage0.yaml

Lines 9 to 10 in 12c3c58

runtime:
- openjdk-11-jre

@patflynn
Copy link
Contributor

@rawlingsj you're onto something. it's kinda weird because if I run it locally I get

Apr 19 16:18:42.065 [INFO] [arch:x86_64] installing freetype (2.13.0-r1)
Apr 19 16:18:42.110 [INFO] [arch:x86_64] installing fontconfig (2.14.2-r1)
**Apr 19 16:18:42.151 [INFO] [arch:x86_64] installing openjdk-11-jre (11.0.19.5-r2)**
Apr 19 16:18:53.448 [INFO] [arch:x86_64] installing gradle-8 (8.0.2-r0)
Apr 19 16:18:58.363 [INFO] [arch:x86_64] installing maven (3.9.1-r1)
**Apr 19 16:18:58.720 [INFO] [arch:x86_64] installing openjdk-11 (11.0.19.5-r2)**
2023/04/19 16:19:08 ERROR: failed to build package. the build environment has been preserved:
2023/04/19 16:19:08 melange (gradle-8/x86_64):   workspace dir: /tmp/melange-workspace-2735288947
2023/04/19 16:19:08 melange (gradle-8/x86_64):   guest dir: /tmp/melange-guest-471790162
Error: failed to build package: unable to build guest: unable to generate image: installing apk packages: unable to install files for pkg openjdk-11: error creating file usr/lib/jvm/openjdk/legal/java.base/ADDITIONAL_LICENSE_INFO: open /tmp/melange-guest-471790162/usr/lib/jvm/openjdk/legal/java.base/ADDITIONAL_LICENSE_INFO: permission denied
2023/04/19 16:19:08 error during command execution: failed to build package: unable to build guest: unable to generate image: installing apk packages: unable to install files for pkg openjdk-11: error creating file usr/lib/jvm/openjdk/legal/java.base/ADDITIONAL_LICENSE_INFO: open /tmp/melange-guest-471790162/usr/lib/jvm/openjdk/legal/java.base/ADDITIONAL_LICENSE_INFO: permission denied
make: *** [Makefile:82: packages/x86_64/gradle-8-8.0.2-r0.apk] Error 1

but it seems only apko doesn't like this because I can run

➜  tmp docker run --rm -it cgr.dev/chainguard/wolfi-base:latest sh
/ # apk add openjdk-11-jre
fetch https://packages.wolfi.dev/os/x86_64/APKINDEX.tar.gz
(1/8) Installing expat (2.5.0-r3)
(2/8) Installing libbrotlicommon1 (1.0.9-r3)
(3/8) Installing libbrotlidec1 (1.0.9-r3)
(4/8) Installing bzip2 (1.0.8-r4)
(5/8) Installing libpng (1.6.39-r3)
(6/8) Installing freetype (2.13.0-r1)
(7/8) Installing fontconfig (2.14.2-r1)
(8/8) Installing openjdk-11-jre (11.0.19.5-r2)
OK: 321 MiB in 21 packages
/ # apk add openjdk-11
(1/1) Installing openjdk-11 (11.0.19.5-r2)
OK: 633 MiB in 22 packages
/ # 

removing

- openjdk-11
helps the build proceed.

@kaniini as an FYI perhaps there is an apko issue when packages/subpackages overlap and are installed together?

Signed-off-by: Patrick Flynn <patrick@chainguard.dev>
@patflynn patflynn marked this pull request as ready for review April 19, 2023 21:41
@patflynn
Copy link
Contributor

@luhring @rawlingsj build should be green now. rerunning CI.

@patflynn
Copy link
Contributor

very sad. It seems 8.1 can't be built with 8.0.1 🤷. I'm tempted to just have gradle build itself with the gradlewrapper.

@wolfi-bot
Copy link
Contributor Author

superceded by #1504

@wolfi-bot wolfi-bot closed this Apr 21, 2023
@rawlingsj rawlingsj deleted the wolfictl-1f475e04-fe0a-481c-9b20-d675a6122743 branch June 29, 2023 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants