distroless icon indicating copy to clipboard operation
distroless copied to clipboard

fix: remove pkg_tar workaround from temurin archive

Open thesayyn opened this issue 1 year ago • 3 comments

Removes the workaround for executable files in temurin_archive and replaces it with tar from bazel-lib. This PR introduces a new system dependency awk for the build. @loosebazooka is awk installed on cloudbuild runners?

Some diff is expected, because tar rule preserves both numeric and non-numeric owner for files and defaults to file mode on disk.

Also https://github.com/aspect-build/bazel-lib/pull/829 landed, i will remove genrule once there's a new release of bazel-lib.

thesayyn avatar May 01 '24 20:05 thesayyn

🌳 🔄 Image Check This pull request doesn't make any changes to the images. 👍 You can check the details in the report here

github-actions[bot] avatar May 01 '24 20:05 github-actions[bot]

@thesayyn seeing directories with odd permissions (from the diff report)

File     usr/lib/jvm/temurin21_jre_arm64/conf/security/policy/                                                Mode 0x1ed                                                    Mode 0x0

Current 0755 New 0000

which looks incorrect to me. Is that just what's provided by the temurin archive? But I can't seem to figure out what's going on here.

loosebazooka avatar May 06 '24 18:05 loosebazooka

found some other issues here. Duplicate entries of the same file (ex:/usr) wont load up in docker.

loosebazooka avatar May 10 '24 15:05 loosebazooka

@loosebazooka okay i fixed the permission issues after a lengthy debug session;

rest of the diff is harmless;


🚧 Diffing gcr.io/distroless/java21-debian12:latest-amd64 against localhost:4564/stage/java21-debian12:latest-amd64

localhost:4564/stage/java21-debian12@sha256:9eb1a61b2196de0aa2a8984d986a4995d8b8c86306fe1a860d88ee72817e6694
TYPE     NAME                    INPUT-0                                                       INPUT-1
Layer    ctx:/layers-27/layer    length mismatch (328 vs 329)                                  
Layer    ctx:/layers-27/layer    name "usr/" appears 1 times in input 0, 2 times in input 1    
Layer    ctx:/layers-27/layer    name "usr/" appears 1 times in input 0, 2 times in input 1  

thesayyn avatar Aug 02 '24 04:08 thesayyn

I'll check the awk dependency.

loosebazooka avatar Aug 08 '24 17:08 loosebazooka

kk awk appears to be on the cloud-build bazel image. So we should be good there.

loosebazooka avatar Aug 09 '24 15:08 loosebazooka

this should be ready to land then?

thesayyn avatar Aug 12 '24 17:08 thesayyn