-
Notifications
You must be signed in to change notification settings - Fork 481
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assembly files with unnormalized paths don't get fileMode changes #1483
Comments
…leMode changes (eclipse-jkube#1483) Normalize output directory returned by AssemblyFileUtils Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Could you please try with this repo (note the commit hash): https://github.com/iam-roger-io/camel-quarkus-demo/blob/6161f0a989e5436f179efc08e80ed7a3ae12ef04/pom.xml <build>
<from>registry.access.redhat.com/ubi8/ubi-minimal:8.5</from>
<tags>
<tag>latest</tag>
<tag>${project.version}</tag>
</tags>
<entryPoint>/${project.artifactId}-${project.version}-runner</entryPoint>
<assembly>
<mode>dir</mode>
<targetDir>/</targetDir>
<inline>
<id>customized-quarkus</id>
<files>
<file>
<source>target/${project.artifactId}-${project.version}-runner</source>
<outputDirectory>.</outputDirectory>
<fileMode>0755</fileMode>
</file>
</files>
</inline>
</assembly>
<runCmds>
<!-- <run>chown 1001:root -R /application</run> -->
<run>chmod +x /${project.artifactId}-${project.version}-runner</run>
</runCmds>
</build> The runCmds commands should not be necessary, and permissions in the generated container should be changed in the tar archive: tar --numeric-owner -tvf ./target/docker/org.acme/camel-quarkus-demo/tmp/docker-build.tar |
Somehow native build isn't working for me on this repository. I had to make some changes to project to copy quarkus-run jar instead of native executable. Here are my observations: With 1.7.0 permission of quarkus-run jar is camel-quarkus-demo : $ mvn k8s:build -Pkubernetes
camel-quarkus-demo : $ tar --numeric-otar --numeric-owner -tvf ./target/docker/org.acme/camel-quarkus-demo/tmp/docker-build.tar
drwxr-xr-x 1000/1000 0 2022-05-09 17:12 customized-quarkus/
-rw-r--r-- 1000/1000 608 2022-05-09 17:12 customized-quarkus/quarkus-run.jar
drwxr-xr-x 1000/1000 0 2022-05-09 17:12 jkube-generated-layer-final-artifact/
-rw-r--r-- 1000/1000 9375 2022-05-09 17:12 jkube-generated-layer-final-artifact/camel-quarkus-demo-1.0.0.jar
-rw-r--r-- 1000/1000 149 2022-05-09 17:12 Dockerfile Docker container:
With 1.8.0-SNAPSHOT based on #1487 permissions of quarkus-run jar is camel-quarkus-demo : $ mvn k8s:build -Pkubernetes
camel-quarkus-demo : $ tar --numeric-owner -tvf ./target/docker/org.acme/camel-quarkus-demo/tmp/docker-build.tar
drwxr-xr-x 1000/1000 0 2022-05-09 17:16 customized-quarkus/
-rwxr-xr-x 1000/1000 608 2022-05-09 17:16 customized-quarkus/quarkus-run.jar
drwxr-xr-x 1000/1000 0 2022-05-09 17:16 jkube-generated-layer-final-artifact/
-rw-r--r-- 1000/1000 9375 2022-05-09 17:16 jkube-generated-layer-final-artifact/camel-quarkus-demo-1.0.0.jar
-rw-r--r-- 1000/1000 149 2022-05-09 17:16 Dockerfile Docker container: camel-quarkus-demo : $ docker run -it --entrypoint /bin/sh 6222c
sh-4.4$ ls -lt /quarkus-run.jar
-rwxr-xr-x 1 root root 608 May 9 12:08 /quarkus-run.jar
|
Have you tried using a remote container build (n.b. use Java 11 unless you want to provide additional options)? mvn clean package -Pnative -Dquarkus.native.remote-container-build=true |
Thanks, I was using the remote container build but in my I just verified this scenario with native executable as well. fix seems to be working as expected (i.e. even after removing |
…leMode changes (#1483) Normalize output directory returned by AssemblyFileUtils Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Description
The following entries are not equal but should be:
/quarkus-demo/build/./camel-quarkus-demo-1.0.0-runner
/quarkus-demo/build/camel-quarkus-demo-1.0.0-runner
https://github.com/eclipse/jkube/blob/ee2390178dcad8a9cc3a9cb6d5e8c5d70a162a04/jkube-kit/common/src/main/java/org/eclipse/jkube/kit/common/archive/JKubeTarArchiver.java#L80-L85
This is caused by a configuration such as:
We should normalize the output directory to avoid this issue:
https://github.com/eclipse/jkube/blob/c83eb4bace375fd53f2c83b987a5c728d7695f89/jkube-kit/common/src/main/java/org/eclipse/jkube/kit/common/archive/AssemblyFileUtils.java#L49
Maybe:
The text was updated successfully, but these errors were encountered: