Skip to content

Use enable-patchelf [backport]#38

Open
freyes wants to merge 1 commit intoopenstack-charmers:branch-1.0from
freyes:bug/2038962-backport
Open

Use enable-patchelf [backport]#38
freyes wants to merge 1 commit intoopenstack-charmers:branch-1.0from
freyes:bug/2038962-backport

Conversation

@freyes
Copy link
Copy Markdown
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
Copy Markdown
Member Author

freyes commented Oct 13, 2023

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

@freyes freyes marked this pull request as ready for review October 2, 2025 12:43
@freyes freyes closed this Oct 2, 2025
@freyes freyes reopened this Oct 2, 2025
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