Skip to content

Commit

Permalink
attempt to add virt-customize
Browse files Browse the repository at this point in the history
Signed-off-by: Din Music <[email protected]>
  • Loading branch information
MusicDin committed Jul 11, 2024
1 parent c9c0e8e commit 1e97f3b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,15 @@ parts:
- bin/tar2sqfs
- lib/libsquashfs.so*

virt-customize:
plugin: nil
stage-packages:
- libguestfs-tools
organize:
usr/bin/: bin/
prime:
- bin/virt-customize

virtiofsd:
source: https://gitlab.com/virtio-fs/virtiofsd
source-depth: 1
Expand Down
13 changes: 13 additions & 0 deletions snapcraft/commands/virt-v2v-in-place
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

CMD="virt-v2v-in-place"

unset XDG_RUNTIME_DIR
unset LD_LIBRARY_PATH
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"

if [ "$(id -u)" = "0" ]; then
exec nsenter -t 1 -m "${CMD}" "$@"
fi

exec unshare -U -r --root="/var/lib/snapd/hostfs/" "${CMD}" "$@"

0 comments on commit 1e97f3b

Please sign in to comment.