-
Notifications
You must be signed in to change notification settings - Fork 44
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
Can't prime symlink in resulting oci #208
Comments
ln is not part of CRAFT_PRIME; CRAFT_PRIME is probably empty, or partially full depending on what happened in previous teps of each part, better to do |
It's still not "primed" in the rock. What does |
sorry, I updated the comment; |
Ah, yes, I already removed the chroot on my side from other tries and still no link. I also tried to use |
After using tricks from #195 (comment), I was able to downgrade LXD to 5.9 and get I don't create the symlink manually anymore, it's created for me by the maintainer scripts of perl package. keystone:
after: [keystone-user]
plugin: nil
overlay-packages:
- apache2
- keystone
# Note (gboutry): required by charm-keystone-k8s / present in kolla images
- sudo But I still can't get that symlink inside the OCI image: $ rockcraft prime --shell-after
root@rockcraft-keystone-52836546:~# ls -alh stage/usr/share/perl/
total 14K
drwxr-xr-x 3 root root 7 Mar 9 08:51 .
drwxr-xr-x 33 root root 55 Mar 9 08:51 ..
-rwx------ 2 root root 0 Mar 9 08:50 .wh..wh..opq
-rw-r--r-- 1 root root 0 Mar 9 08:51 .wh.5.30.0.dpkg-new
-rw-r--r-- 1 root root 0 Mar 9 08:51 .wh.5.30.dpkg-new
lrwxrwxrwx 1 root root 6 Mar 9 08:50 5.30 -> 5.30.0
drwxr-xr-x 53 root root 253 Mar 9 08:51 5.30.0
root@rockcraft-keystone-52836546:~# ls -alh prime/usr/share/perl/
total 8.0K
drwxr-xr-x 3 root root 4 Mar 9 08:54 .
drwxr-xr-x 33 root root 33 Mar 9 08:54 ..
lrwxrwxrwx 1 root root 6 Mar 9 08:50 5.30 -> 5.30.0
drwxr-xr-x 53 root root 127 Mar 9 08:54 5.30.0 $ docker run --rm -it keystone:yoga bash
root@f4fbcf73e72d:/# ls -alh /usr/share/perl/
total 12K
drwxr-xr-x 3 root root 4.0K Mar 9 08:30 .
drwxr-xr-x 1 root root 4.0K Mar 9 08:30 ..
drwxr-xr-x 53 root root 4.0K Mar 9 08:30 5.30.0 |
From what I understand, the problem comes from Line 426 in 57e10db
When it processes the path I think we should add the subdirs that are symlinks to the resulting archive. Since lots of package depend on these symlinks to properly functions. In the case of PERL, the actual path is I would like to come up with a patch if you agree with this analysis. |
When Rockcraft creates the tar archive from the priming area, subdirs symlinks are skipped from archive. Solution is to add subdirs when they are symlinks. Fix canonical#208
When Rockcraft creates the tar archive from the priming area, subdirs symlinks are skipped from archive. Solution is to add subdirs when they are symlinks. Fix #208 --------- Co-authored-by: Tiago Nobrega <[email protected]>
When Rockcraft creates the tar archive from the priming area, subdirs symlinks are skipped from archive. Solution is to add subdirs when they are symlinks. Fix canonical#208 --------- Co-authored-by: Tiago Nobrega <[email protected]>
I'm trying to build a rock with apache2 webserver.
I'm hitting a problem where I'm trying to get a symlink into the final image but I can't.
I'm creating multiple symlinks in the same scriptlet, and the link using
ln
doesn't show up in the final image.a2enmod
basically creates a symlink in/etc/apache2/mods-enabled
. And these symlinks appear in the final image.Inside the LXD container:
After packing the rock and pushing into the docker daemon with skopeo:
The link created with
ln
is missing from the docker image.Am I missing something to get the symlink in the docker image ?
The text was updated successfully, but these errors were encountered: