Skip to content
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

Use enable-patchelf [backport] #38

Draft
wants to merge 1 commit into
base: branch-1.0
Choose a base branch
from

Conversation

freyes
Copy link
Member

@freyes freyes commented Oct 13, 2023

This change enables enable-patchelf which is a opt-in feature for core22 and available in snapcraft>=7.3, without this change virt-dib escapes the sandbox and tries to consume libicuuc.so from the host instead of the one within the snap.

$ sudo octavia-diskimage-retrofit
jammy-server-cloudimg-amd64.img
ubuntu-amphora-haproxy-amd64.qcow2
Image resized.
virt-dib: /snap/core22/current/usr/lib/x86_64-linux-gnu/libm.so.6: version GLIBC_2.38' not found (required by /lib/x86_64-linux-gnu/libicuuc.so.72) virt-dib: /snap/core22/current/usr/lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.38' not found (required by /lib/x86_64-linux-gnu/libicuuc.so.72)

With this change the snap runs successfully:

sudo octavia-diskimage-retrofit /var/snap/octavia-diskimage-retrofit/common/jammy-server-cloudimg-amd64.img /var/snap/octa via-diskimage-retrofit/common/ubuntu-amphora-haproxy-amd64.qcow2 Image resized.
virt-dib: Elements: base growrootfs retrofit-dynamic-envvar dpkg [...]
[ 2.5] Trimming /dev/sda1
[ 3.0] Sparsify in-place operation completed with no errors

(cherry picked from commit dc870eb)

This change enables `enable-patchelf` which is a opt-in feature for
core22 and available in snapcraft>=7.3, without this change virt-dib
escapes the sandbox and tries to consume libicuuc.so from the host
instead of the one within the snap.

$ sudo octavia-diskimage-retrofit \
          jammy-server-cloudimg-amd64.img \
          ubuntu-amphora-haproxy-amd64.qcow2
Image resized.
virt-dib: /snap/core22/current/usr/lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.38' not found (required by /lib/x86_64-linux-gnu/libicuuc.so.72)
virt-dib: /snap/core22/current/usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.38' not found (required by /lib/x86_64-linux-gnu/libicuuc.so.72)

With this change the snap runs successfully:

sudo octavia-diskimage-retrofit /var/snap/octavia-diskimage-retrofit/common/jammy-server-cloudimg-amd64.img /var/snap/octa
via-diskimage-retrofit/common/ubuntu-amphora-haproxy-amd64.qcow2
Image resized.
virt-dib: Elements: base growrootfs retrofit-dynamic-envvar dpkg
[...]
[   2.5] Trimming /dev/sda1
[   3.0] Sparsify in-place operation completed with no errors

(cherry picked from commit dc870eb)
@freyes freyes requested a review from coreycb October 13, 2023 16:16
@freyes freyes marked this pull request as draft October 13, 2023 16:17
@freyes
Copy link
Member Author

freyes commented Oct 13, 2023

marking as draft, I'm building the snap to test the backport works as expected.

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.

1 participant