/
snap
/
lxd
/
current
/
snap
/
File Upload :
llllll
Current File: //snap/lxd/current/snap/snapcraft.yaml
apps: activate: command: commands/daemon.activate daemon: oneshot plugs: - lxd-support - system-observe buginfo: command: commands/buginfo plugs: - lxd-support - system-observe check-kernel: command: commands/lxd-check-kernel plugs: - lxd-support - system-observe daemon: command: commands/daemon.start command-chain: - bin/gpu-2404-custom-wrapper daemon: simple plugs: - lxd-support - network-bind - system-observe reload-command: commands/daemon.reload restart-condition: on-failure slots: - lxd sockets: unix: listen-stream: $SNAP_COMMON/lxd/unix.socket socket-mode: 432 stop-command: commands/daemon.stop stop-timeout: 600s lxc: command: commands/lxc completer: lxc-completer.sh plugs: - lxd-support - system-observe lxd: command: commands/lxd plugs: - lxd-support - system-observe user-daemon: command: commands/lxd-user daemon: simple plugs: - lxd-support - network-bind - system-observe restart-condition: on-failure sockets: unix: listen-stream: $SNAP_COMMON/lxd-user/unix.socket socket-mode: 432 stop-timeout: 600s assumes: - snapd2.39 base: core24 confinement: strict contact: lxd@lists.canonical.com description: |- LXD is a system container and virtual machine manager. It offers a simple CLI and REST API to manage local or remote instances, uses an image based workflow and support for a variety of advanced features. Images are available for all Ubuntu releases and architectures as well as for a wide number of other Linux distributions. Existing integrations with many deployment and operation tools, makes it work just like a public cloud, except everything is under your control. LXD containers are lightweight, secure by default and a great alternative to virtual machines when running Linux on Linux. LXD virtual machines are modern and secure, using UEFI and secure-boot by default and a great choice when a different kernel or operating system is needed. With clustering, up to 50 LXD servers can be easily joined and managed together with the same tools and APIs and without needing any external dependencies. Supported configuration options for the snap (snap set lxd [<key>=<value>...]): - apparmor.unprivileged-restrictions-disable: Whether to disable restrictions on unprivileged user namespaces [default=true] - ceph.builtin: Use snap-specific Ceph configuration [default=false] - ceph.external: Use the system's ceph tools (ignores ceph.builtin) [default=false] - daemon.debug: Increase logging to debug level [default=false] - daemon.group: Set group of users that have full control over LXD [default=lxd] - daemon.user.group: Set group of users that have restricted LXD access [default=lxd] - daemon.preseed: Pass a YAML configuration to `lxd init` on initial start - daemon.syslog: Send LXD log events to syslog [default=false] - daemon.verbose: Increase logging to verbose level [default=false] - db.trace: Enable dqlite trace logging (very verbose) [default=false] - lvm.external: Use the system's LVM tools [default=false] - lxcfs.pidfd: Start per-container process tracking [default=true] - lxcfs.loadavg: Start tracking per-container load average [default=false] - lxcfs.cfs: Consider CPU shares for CPU usage [default=false] - lxcfs.debug: Increase logging to debug level [default=false] - minio.path: Path to the directory containing the minio and mc binaries to use with LXD [default=""] - openvswitch.builtin: Run a snap-specific OVS daemon [default=false] - openvswitch.external: Use the system's OVS tools (ignores openvswitch.builtin) [default=false] - ovn.builtin: Use snap-specific OVN configuration [default=false] - ui.enable: Enable the web interface [default=true] - zfs.external: Use the system's ZFS tools [default=false] For system-wide configuration of the CLI, place your configuration in /var/snap/lxd/common/global-conf/ (config.yml and servercerts) grade: stable hooks: configure: plugs: - lxd-support - network - system-observe connect-plug-ceph-conf: plugs: - lxd-support - system-observe connect-plug-ovn-certificates: plugs: - lxd-support - system-observe connect-plug-ovn-chassis: plugs: - lxd-support - system-observe connect-plug-qemu-external: plugs: - lxd-support - system-observe disconnect-plug-ceph-conf: plugs: - lxd-support - system-observe disconnect-plug-ovn-certificates: plugs: - lxd-support - system-observe disconnect-plug-ovn-chassis: plugs: - lxd-support - system-observe disconnect-plug-qemu-external: plugs: - lxd-support - system-observe remove: plugs: - lxd-support - system-observe issues: https://github.com/canonical/lxd/issues layout: /usr/share/drirc.d: symlink: $SNAP/gpu-2404/drirc.d /usr/share/libdrm: bind: $SNAP/gpu-2404/libdrm license: AGPL-3.0-only name: lxd parts: apparmor: organize: sbin/: bin/ plugin: nil prime: - bin/apparmor_parser stage-packages: - apparmor btrfs: organize: sbin/: bin/ plugin: nil prime: - bin/btrfs - bin/btrfstune - bin/mkfs.btrfs stage-packages: - btrfs-progs ceph: after: - libatomic organize: usr/bin/: bin/ usr/lib/: lib/ override-build: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-prime: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default plugin: nil prime: - bin/ceph - bin/radosgw-admin - bin/rbd - lib/*/ceph - lib/*/libcephfs* - lib/python3 - lib/*/libboost_context.so* - lib/*/libboost_filesystem.so* - lib/*/libboost_iostreams.so* - lib/*/libboost_program_options.so* - lib/*/libboost_thread.so* - lib/*/libboost_url.so* - lib/*/libbrotlicommon.so* - lib/*/libbrotlidec.so* - lib/*/libcurl-gnutls.so* - lib/*/libdaxctl.so* - lib/*/libibverbs.so* - lib/*/libicudata.so* - lib/*/libicuuc.so* - lib/*/liblber-2.5.so* - lib/*/liblber.so* - lib/*/libldap-2.5.so* - lib/*/libldap.so* - lib/*/liblmdb.so* - lib/*/liblua5.4.so* - lib/*/libncurses.so* - lib/*/libndctl.so* - lib/*/libnghttp2.so* - lib/*/liboath.so* - lib/*/libpmemobj.so* - lib/*/libpmem.so* - lib/*/libpsl.so* - lib/*/librabbitmq.so* - lib/*/librados.so* - lib/*/librbd.so* - lib/*/librdmacm.so* - lib/*/librtmp.so* - lib/*/libsasl2.so* - lib/*/libsnappy.so* - lib/*/libssh.so* - lib/*/libtcmalloc.so* - lib/*/libunwind.so* stage-packages: - to armhf: [] - else: - ceph-common - libsnappy1v5 dqlite: autotools-configure-parameters: - --prefix= - --enable-build-raft build-packages: - liblz4-dev - libsqlite3-dev - libuv1-dev - xfslibs-dev organize: usr/bin/: bin/ usr/lib/: lib/ plugin: autotools prime: - bin/sqlite3 - lib/libdqlite*so* - lib/*/libsqlite3*so* - lib/*/libuv* source: https://github.com/canonical/dqlite source-commit: b6881488f39053ac5cc9996c7cf2196e56960cc6 source-depth: 1 source-type: git stage-packages: - liblz4-1 - libuv1t64 - sqlite3 edk2: build-packages: - to amd64: - g++ - acpica-tools - nasm - uuid-dev - to arm64: - g++ - acpica-tools - nasm - uuid-dev override-build: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 set -ex # Apply patches patch -p1 < "${CRAFT_PROJECT_DIR}/patches/edk2-0001-force-DUID-LLT.patch" cp "${CRAFT_PROJECT_DIR}/patches/edk2-0002-logo.bmp" MdeModulePkg/Logo/Logo.bmp patch -p1 < "${CRAFT_PROJECT_DIR}/patches/edk2-0003-boot-delay.patch" patch -p1 < "${CRAFT_PROJECT_DIR}/patches/edk2-0004-gcc-errors.patch" patch --binary -p1 < "${CRAFT_PROJECT_DIR}/patches/edk2-0005-disable-dynamic-mmio-winsize.patch" patch --binary -p1 < "${CRAFT_PROJECT_DIR}/patches/edk2-0006-disable-EFI-memory-attributes-protocol.patch" patch --binary -p1 < "${CRAFT_PROJECT_DIR}/patches/edk2-0007-Disable-the-Shell-when-SecureBoot-is-enabled.patch" # revert "ArmVirtPkg: make EFI_LOADER_DATA non-executable" as it breaks almost everything patch --binary -p1 < "${CRAFT_PROJECT_DIR}/patches/edk2-0008-Revert-ArmVirtPkg-make-EFI_LOADER_DATA-non-execurable.patch" # Arch-specific logic ARCH="X64" PKG="OvmfPkg/OvmfPkgX64.dsc" FV_CODE="OVMF_CODE" FV_VARS="OVMF_VARS" if [ "$(uname -m)" = "aarch64" ]; then ARCH="AARCH64" PKG="ArmVirtPkg/ArmVirtQemu.dsc" FV_CODE="QEMU_EFI" FV_VARS="QEMU_VARS" fi # Run in a bash sub-shell as edksetup.sh requires it build_edk2() { TARGET_CODE="$1" shift TARGET_VARS="$1" shift TARGET_BUILD_TYPE="$1" shift set -ex ( cat << EOF . ./edksetup.sh make -C BaseTools ARCH="${ARCH}" build -a "${ARCH}" -t GCC5 -b "${TARGET_BUILD_TYPE}" -p "${PKG}" \ -DSMM_REQUIRE=FALSE \ -DSECURE_BOOT_ENABLE=TRUE \ -DNETWORK_IP4_ENABLE=TRUE \ -DNETWORK_IP6_ENABLE=TRUE \ -DNETWORK_TLS_ENABLE=TRUE \ -DNETWORK_HTTP_BOOT_ENABLE=TRUE \ -DTPM2_ENABLE=TRUE \ -DTPM2_CONFIG_ENABLE=TRUE \ $@ EOF ) | bash -e cp Build/*/${TARGET_BUILD_TYPE}*/FV/${FV_CODE}.fd "${TARGET_CODE}" cp Build/*/${TARGET_BUILD_TYPE}*/FV/${FV_VARS}.fd "${TARGET_VARS}" if [ "$(uname -m)" = "aarch64" ]; then truncate -s 64m "${TARGET_CODE}" truncate -s 64m "${TARGET_VARS}" fi } # Create the firmware path mkdir -p "${CRAFT_PART_INSTALL}/share/qemu/" # Primary firmware (4MB) build_edk2 \ "${CRAFT_PART_INSTALL}/share/qemu/OVMF_CODE.4MB.fd" \ "${CRAFT_PART_INSTALL}/share/qemu/OVMF_VARS.4MB.fd" \ RELEASE \ -DFD_SIZE_4MB # Debug firmware (4MB, debug mode) # Can be enabled with the LXD boot.debug_edk2 instance option # Set DEBUG_VERBOSE flag if [ "$(uname -m)" = "aarch64" ]; then sed -i "s#DEBUG_PRINT_ERROR_LEVEL = 0x8000004F#DEBUG_PRINT_ERROR_LEVEL = 0x8040004F#g" ArmVirtPkg/ArmVirt.dsc.inc fi if [ "$(uname -m)" = "x86_64" ]; then sed -i "s#PcdDebugPrintErrorLevel|0x8000004F#PcdDebugPrintErrorLevel|0x8040004F#g" "${PKG}" fi build_edk2 \ "${CRAFT_PART_INSTALL}/share/qemu/OVMF_CODE.4MB.debug.fd" \ "${CRAFT_PART_INSTALL}/share/qemu/OVMF_VARS.4MB.debug.fd" \ DEBUG \ -DFD_SIZE_4MB rm "${CRAFT_PART_INSTALL}/share/qemu/OVMF_VARS.4MB.debug.fd" override-prime: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default set -ex # Fix submodule sources # see https://github.com/tianocore/edk2/commit/95d8a1c255cfb8e063d679930d08ca6426eb5701 sed -i "s#https://github.com/Zeex/subhook.git#https://github.com/tianocore/edk2-subhook.git#g" .gitmodules # Pull submodules after switching to source-commit git submodule update --init --recursive override-stage: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default plugin: nil prime: - share/qemu/* source: https://github.com/tianocore/edk2 source-commit: 8736b8fdca85e02933cdb0a13309de14c9799ece source-depth: 1 source-submodules: [] source-type: git gpu-2404: after: - lxd - qemu override-prime: | ${CRAFT_PART_SRC}/bin/gpu-2404-cleanup mesa-2404 nvidia-2404 plugin: dump source: https://github.com/canonical/gpu-snap.git libatomic: organize: usr/lib/: lib/ override-prime: |- [ "$(uname -m)" != "s390x" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" != "s390x" ] && exit 0 craftctl default plugin: nil prime: - lib/*/libatomic.so* stage-packages: - to s390x: - libatomic1 logrotate: organize: usr/bin/: bin/ usr/lib/: lib/ usr/sbin/: bin/ plugin: nil prime: - bin/logrotate stage: - bin/logrotate stage-packages: - logrotate lvm: organize: sbin/: bin/ usr/lib/: lib/ usr/sbin/: bin/ override-build: |- # Patch lvm.conf to: # 1) Disable bits that don't apply in a snap'ed env. Handle commented # out variants that represent builtin values. # * udev_sync # * udev_rules # * use_lvmetad # * monitoring # 2) Uncomment all executable directives to override their builtin # values. Replace paths in /usr/bin, /usr/sbin, /bin and /sbin # by /snap/lxd/current/bin to use executables from the snap. sed -i \ -e "s%\(# \)\?udev_sync = 1%udev_sync = 0%" \ -e "s%\(# \)\?udev_rules = 1%udev_rules = 0%" \ -e "s%\(# \)\?use_lvmetad = 1%use_lvmetad = 0%" \ -e "s%\(# \)\?monitoring = 1%monitoring = 0%" \ -e "/# .*_\?executable =/s/# //" \ -e "s%\(/usr\)\?/s\?bin/%/snap/lxd/current/bin/%" \ "${CRAFT_PART_INSTALL}/etc/lvm/lvm.conf" craftctl default plugin: nil prime: - bin/cache_* - bin/dmeventd - bin/era_* - bin/lv* - bin/pdata_tools - bin/pv* - bin/thin_* - bin/vg* - -bin/vgimportclone - -bin/lvmconf - -bin/lvmdump - -bin/lvmetad - -bin/lvmpolld - etc/lvm/lvm.conf - etc/lvm/profile/* - lib/*/device-mapper/* - lib/*/libaio.so* - lib/*/libdevmapper* - lib/*/liblvm* - lib/*/libreadline.so* stage-packages: - dmeventd - lvm2 - thin-provisioning-tools lxc: after: - apparmor build-packages: - libapparmor-dev - libcap-dev - libseccomp-dev - pkg-config - meson - ninja-build meson-parameters: - --buildtype=release - -Dapparmor=true - -Dcapabilities=true - -Dcommands=false - -Ddbus=false - -Dexamples=false - -Dinstall-init-files=false - -Dinstall-state-dirs=false - -Dlibdir=lib/${CRAFT_ARCH_TRIPLET_BUILD_FOR} - -Dman=false - -Dmemfd-rexec=false - -Dopenssl=false - -Dprefix=/ - -Drootfs-mount-path=/var/snap/lxd/common/lxc/ - -Dseccomp=true - -Dselinux=false - -Dspecfile=false - -Dtests=false - -Dtools=false organize: share/lxc/hooks: lxc/hooks snap/lxd/current/lxc: lxc override-build: | set -ex # Git cherry-picks cd ../src git config user.email "noreply@lists.canonical.com" git config user.name "LXD snap builder" # lxc-checkconfig.in does not need any preprocessing mkdir -p "${CRAFT_PART_INSTALL}/bin/" install --mode=0755 src/lxc/cmd/lxc-checkconfig.in "${CRAFT_PART_INSTALL}/bin/lxc-checkconfig" cd ../build set +ex craftctl default set -ex mkdir -p "${CRAFT_PART_INSTALL}/lxc/config/common.conf.d/" ln -s /var/snap/lxd/common/lxc/local.conf "${CRAFT_PART_INSTALL}/lxc/config/common.conf.d/01-local.conf" plugin: meson prime: - bin/lxc-checkconfig - lib/*/liblxc.so.1 - lib/*/liblxc.so.1.* - lxc/config/common.conf.d - lxc/hooks/nvidia source: https://github.com/lxc/lxc source-commit: 9e4e69ed1cb93159b0da99dad8d320b795887d07 source-depth: 1 source-type: git lxcfs: build-packages: - libfuse3-dev - pkg-config - python3-jinja2 - meson - ninja-build meson-parameters: - --prefix=/ - --datadir=/snap/lxd/current/ - --localstatedir=/var/snap/lxd/common/var/ - -Ddocs=false - -Dtests=false organize: lib/*/lxcfs/liblxcfs.so: lib/ snap/lxd/current/lxc/config/common.conf.d/*: lxc/config/common.conf.d/ snap/lxd/current/lxcfs/: lxcfs/ usr/lib/: lib/ override-build: | set -ex # Git cherry-picks cd ../src git config user.email "noreply@lists.canonical.com" git config user.name "LXD snap builder" set +ex craftctl default set -ex patch -p1 "${CRAFT_PART_INSTALL}/snap/lxd/current/lxcfs/lxc.mount.hook" < "${CRAFT_PROJECT_DIR}/patches/lxcfs-0001-hook.patch" plugin: meson prime: - bin/fusermount - bin/fusermount3 - lib/*/libfuse3.so.* - lib/*/libSegFault.so - bin/lxcfs - lib/liblxcfs.so - lxc/config/common.conf.d/00-lxcfs.conf - lxcfs/ source: https://github.com/lxc/lxcfs source-commit: 16503df8e814d29b348e61abebc4f89b2e20f440 source-depth: 1 source-type: git stage-packages: - fuse3 - glibc-tools lxd: after: - lxc - dqlite build-packages: - cmake - libacl1-dev - libudev-dev - libxml2-dev - libxslt1-dev - libblas-dev - libopenblas-dev - liblapack-dev - pkg-config - pypy3-dev - python3-dev - python3-pip - python3-venv build-snaps: - go/1.25/stable organize: sbin/sgdisk: bin/ usr/bin/: bin/ usr/lib/: lib/ usr/sbin/: bin/ usr/share/misc/: share/misc/ var/lib/usbutils/usb.ids: share/misc/ override-build: | set -ex # Git cherry-picks cd ../src git config user.email "noreply@lists.canonical.com" git config user.name "LXD snap builder" # Setup build environment export GOTOOLCHAIN="local" export GOPATH="$(realpath ./.go)" export CGO_CFLAGS="-I${CRAFT_STAGE}/include/ -I${CRAFT_STAGE}/usr/local/include/" export CGO_LDFLAGS="-L${CRAFT_STAGE}/lib/ -L${CRAFT_STAGE}/usr/local/lib/" export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)" # Build the binaries go build -trimpath -o "${CRAFT_PART_INSTALL}/bin/lxc" github.com/canonical/lxd/lxc # Build LXD server binary into ${CRAFT_PART_INSTALL}/sbin/lxd so that it does not conflict with the # lxd-stophook wrapper script which is stored in ${CRAFT_PART_INSTALL}/bin/lxd. # This way when a container stops it will call "/snap/lxd/current/bin/lxd callhook" which is handled by the # lxd-stophook script, which in turn will execute "/snap/lxd/current/bin/lxd-user callhook" to notify LXD. go build -trimpath -o "${CRAFT_PART_INSTALL}/sbin/lxd" -tags=libsqlite3 github.com/canonical/lxd/lxd # Build static binaries CGO_ENABLED=0 go build -trimpath -o "${CRAFT_PART_INSTALL}/bin/lxd-agent" -tags=agent,netgo github.com/canonical/lxd/lxd-agent CGO_ENABLED=0 go build -trimpath -o "${CRAFT_PART_INSTALL}/bin/lxd-user" -tags netgo github.com/canonical/lxd/lxd-user # Check which Go version was used to compile each of the lxc/lxd binaries # XXX: fail if an unexpected version (like a Go toolchain) was used GOVER="$(snap list go | awk '{if ($1 == "go") print $2}')" UNEXPECTED_GO_VER="$(go version -v "${CRAFT_PART_INSTALL}/bin/lxc"* "${CRAFT_PART_INSTALL}/bin/lxd"* | grep -vF ": go${GOVER}" || true)" if [ -n "${UNEXPECTED_GO_VER:-}" ]; then echo "Some binaries were compiled with an unexpected Go version (!= ${GOVER}):" echo "${UNEXPECTED_GO_VER}" exit 1 fi # Some python dependencies are not available for armhf/riscv64 or just require a build from source. # Not worth the effort for now. if [ "$(uname -m)" != "armv7l" ] && [ "$(uname -m)" != "riscv64" ]; then # Build the static website make doc # Remove unneeded bits rm doc/_build/objects.inv # only objects.inv.txt is used # not needed once built rm doc/_build/.buildinfo rm -rf doc/_build/_sphinx_design_static/ # Copy the static website mkdir -p "${CRAFT_PART_INSTALL}/share/lxd-documentation" cp -a doc/_build/. "${CRAFT_PART_INSTALL}/share/lxd-documentation/" fi # Setup bash completion mkdir -p "${CRAFT_PART_INSTALL}/etc/bash_completion.d/" # Snapd requires the unaliased command `lxd.lxc` to be supplied as the first command for completion to be detected set_cmds='s/^\s*complete.*__start_lxc /&lxd.lxc /' # When executed by snapd, the COLUMNS shell value is unset, so use $(tput cols) instead set_cols='s/# $COLUMNS.*/COLUMN="$(tput cols)" \# store the current shell width./' # When executed by snapd, the `compopt` support detection doesn't work so fake that it is always `builtin` set_compopt='s|$(type -t compopt)|"builtin"|' # Modify requestComp variable to use lxc based on context ($SNAP/bin/lxc in Snap environment) set_request_comp='s|requestComp="${words\[0\]} __complete ${args\[\*\]}"|requestComp="/snap/lxd/current/commands/lxc __complete ${args[*]}"|' # Generate completions script "${CRAFT_PART_INSTALL}/bin/lxc" completion bash | sed -e "${set_cmds}" -e "${set_cols}" -e "${set_compopt}" -e "${set_request_comp}" > "${CRAFT_PART_INSTALL}/lxc-completer.sh" chmod +x "${CRAFT_PART_INSTALL}/lxc-completer.sh" override-pull: | craftctl default set -ex # Setup build environment export GOTOOLCHAIN="local" export GOPATH="$(realpath ./.go)" # Setup the GOPATH rm -Rf "${GOPATH}" mkdir -p "${GOPATH}/src/github.com/canonical" ln -s "$(pwd)" "${GOPATH}/src/github.com/canonical/lxd" # Download the dependencies go get -v ./... plugin: nil prime: - bin/dnsmasq - bin/getfattr - bin/setfattr - bin/iw - bin/pigz - bin/rsync - bin/setfacl - bin/sgdisk - bin/xdelta3 - lib/*/libidn.so.* - lxc-completer.sh - share/lxd-documentation* - share/misc/pci.ids - share/misc/usb.ids - bin/lxc - bin/lxd-agent - bin/lxd-user - sbin/lxd source: https://github.com/canonical/lxd source-commit: 49569b65625b9c53dc5dce885ca2cb1390fd6481 source-type: git stage-packages: - acl - attr - dnsmasq-base - gdisk - iw - lshw - pci.ids - pigz - rsync - usb.ids - xdelta3 lxd-ui: override-build: | [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default npm install yarn --global yarn install yarn build mkdir -p "${CRAFT_PART_INSTALL}/share" cp -R build/ui "${CRAFT_PART_INSTALL}/share/lxd-ui/" override-prime: |- [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" = "riscv64" ] && exit 0 snap install node --channel=22/stable --classic craftctl default plugin: nil prime: - share/lxd-ui* source: https://github.com/canonical/lxd-ui source-commit: 69fa2699fe6a91754cc825bdca27d64bc6e39b2e source-depth: 1 source-type: git nftables: organize: usr/lib/: lib/ usr/sbin/: bin/ plugin: nil prime: - bin/nft - lib/*/libjansson*so* - lib/*/libnftables*so* stage-packages: - nftables nvidia-container: build-environment: - GIT_TAG: 1.18.0 build-packages: - to amd64: - bmake - curl - libelf-dev - libseccomp-dev - lsb-release - libtirpc-dev - to arm64: - bmake - curl - libelf-dev - libseccomp-dev - lsb-release - libtirpc-dev build-snaps: - go/1.25/stable organize: usr/local/bin/nvidia-container-cli: bin/nvidia-container-cli.real usr/local/lib: lib/ override-build: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 set -ex # Setup build environment export GOTOOLCHAIN="local" # Git cherry-picks git config user.email "noreply@lists.canonical.com" git config user.name "LXD snap builder" patch -p1 < "${CRAFT_PROJECT_DIR}/patches/nvidia-0001-Fix-for-22.04-build.patch" patch -p1 < "${CRAFT_PROJECT_DIR}/patches/nvidia-0002-pre-load-libdl.patch" mkdir -p "${CRAFT_PART_INSTALL}/bin/" cp "${CRAFT_PROJECT_DIR}/snapcraft/wrappers/nvidia-container-cli" "${CRAFT_PART_INSTALL}/bin/" set +ex craftctl default override-prime: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default plugin: make prime: - bin/nvidia-container-cli* - lib/libnvidia-container.so* - lib/libnvidia-container-go.so* source: https://github.com/NVIDIA/libnvidia-container source-commit: 889a3bb5408c195ed7897ba2cb8341c7d249672f source-depth: 1 source-type: git nvidia-container-toolkit: build-snaps: - go/1.25/stable organize: usr/bin/: bin/ override-build: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 set -ex # Setup build environment export GOTOOLCHAIN="local" make binaries mkdir -p "${CRAFT_PART_INSTALL}/bin/" cp nvidia-ctk "${CRAFT_PART_INSTALL}/bin/" override-prime: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default plugin: make prime: - bin/nvidia-ctk source: https://github.com/NVIDIA/nvidia-container-toolkit source-commit: f8daa5e26de9fd7eb79259040b6dd5a52060048c source-depth: 1 source-type: git nvme: organize: usr/lib/: lib/ usr/sbin/: bin/ plugin: nil prime: - bin/nvme - lib/*/libnvme* stage-packages: - nvme-cli openvswitch: organize: sbin/: bin/ usr/bin/: bin/ usr/lib/: lib/ usr/share/: share/ override-build: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-prime: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default plugin: nil prime: - bin/ovs-vsctl - lib/*/libunbound*so* - share/openvswitch/*.ovsschema stage-packages: - to armhf: [] - else: - openvswitch-common - openvswitch-switch ovn: after: - openvswitch organize: usr/bin/: bin/ usr/lib/: lib/ override-build: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-prime: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default plugin: nil prime: - bin/ovn-nbctl - bin/ovn-sbctl - lib/*/libunbound*so* stage-packages: - to armhf: [] - else: - ovn-common qemu: after: - libatomic - spice-server autotools-configure-parameters: - --disable-auth-pam - --disable-bochs - --disable-brlapi - --disable-cloop - --disable-curl - --disable-dmg - --disable-docs - --disable-fuse - --disable-glusterfs - --disable-gnutls - --disable-gtk - --disable-guest-agent - --disable-libiscsi - --disable-libnfs - --disable-libpmem - --disable-libssh - --disable-nettle - --disable-oss - --disable-parallels - --disable-pvrdma - --disable-qed - --disable-sdl - --disable-slirp - --disable-user - --disable-vde - --disable-vdi - --disable-vmnet - --disable-vnc - --disable-vvfat - --disable-xen - --disable-xkbcommon - --enable-attr - --enable-cap-ng - --enable-kvm - --enable-libusb - --enable-usb-redir - --enable-linux-aio - --enable-linux-io-uring - --enable-numa - --enable-pie - --enable-rbd - --enable-seccomp - --enable-spice - --enable-system - --enable-tcg - --enable-tools - --enable-vhost-crypto - --enable-vhost-kernel - --enable-vhost-net - --enable-vhost-user - --enable-virtfs - --firmwarepath=/snap/lxd/current/share/qemu/ - --localstatedir=/var/ - --disable-install-blobs build-packages: - to armhf: [] - else: - bison - bzip2 - flex - pkg-config - libaio-dev - libcap-ng-dev - libfdt-dev - libglib2.0-dev - libnuma-dev - libpixman-1-dev - libseccomp-dev - liburing-dev - libusb-1.0-0-dev - libusbredirparser-dev - quilt - librbd-dev organize: usr/bin/: bin/ usr/lib/: lib/ usr/local/bin/: bin/ usr/local/lib/: lib/ usr/local/libexec/: bin/ usr/local/share/: share/ usr/share/qemu/kvmvapic.bin: share/qemu/ usr/share/qemu/s390-ccw.img: share/qemu/ usr/share/qemu/s390-netboot.img: share/qemu/ usr/share/qemu/slof.bin: share/qemu/ usr/share/seabios/bios-256k.bin: share/qemu/ usr/share/seabios/vgabios-*: share/qemu/ override-build: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 set -ex # Mangle the configure a bit QEMUARCH="$(uname -m)" [ "${QEMUARCH}" = "ppc64le" ] && QEMUARCH="ppc64" # Apply patches from Ubuntu sources. QUILT_PATCHES=debian/patches quilt push -a # Apply custom patches # These patches enable more accurate error message returned in case of CPU registers mismatches. # This is backported from QEMU v9.2.2. patch -p1 < "${CRAFT_PROJECT_DIR}/patches/qemu-0001-kvm-Allow-kvm_arch_get-put_registers-to-accept-Error.patch" patch -p1 < "${CRAFT_PROJECT_DIR}/patches/qemu-0002-target-i386-kvm-Report-which-action-failed-in-kvm_ar.patch" sed -i "s/^unset target_list$/target_list=\"${QEMUARCH}-softmmu\"/" configure sed -i 's#libseccomp_minver=".*#libseccomp_minver="0.0"#g' configure # Extract efi-virtio.rom from ipxe-qemu. # This doesn't work in the organize section below. mkdir -p "${CRAFT_PART_INSTALL}"/share/qemu mv "${CRAFT_PART_INSTALL}"/usr/lib/ipxe/qemu/efi-virtio.rom "${CRAFT_PART_INSTALL}"/share/qemu/ set +ex craftctl default override-prime: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default plugin: autotools prime: - bin/genisoimage* - bin/mkisofs* - bin/qemu-system-* - bin/qemu-img* - bin/virtfs-proxy-helper* - lib/*/libatomic.so* - lib/*/libmagic*so* - lib/*/libnuma*so* - lib/*/libpixman*so* - lib/*/liburing.so* - lib/*/libusbredir*so* - lib/*/libusb*so* - lib/*/libfdt*.so* - share/qemu/keymaps/* - share/qemu/bios-256k.bin - share/qemu/efi-virtio.rom - share/qemu/kvmvapic.bin - share/qemu/s390-ccw.img - share/qemu/s390-netboot.img - share/qemu/slof.bin - share/qemu/vgabios-bochs-display.bin - share/qemu/vgabios-qxl.bin - share/qemu/vgabios-ramfb.bin - share/qemu/vgabios-stdvga.bin - share/qemu/vgabios-virtio.bin source: https://git.launchpad.net/ubuntu/+source/qemu source-commit: bc0011afab01de8c41ec80fc8c24dd33fb30cd90 source-depth: 1 source-type: git stage-packages: - to armhf: [] - else: - genisoimage - ipxe-qemu - libfdt1 - libmagic1t64 - libnuma1 - libpixman-1-0 - libusb-1.0-0 - libusbredirparser1t64 - liburing2 - seabios - qemu-system-data qemu-ovmf-secureboot: after: - edk2 - qemu build-packages: - to amd64: - dosfstools - mtools - python3-pexpect - xorriso - to arm64: - dosfstools - mtools - python3-pexpect - xorriso override-build: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 export ARCH="$(basename "$(readlink -f "${CRAFT_STAGE}"/lib/*-linux-gnu*/)")" export LD_LIBRARY_PATH="${CRAFT_STAGE}/lib:${CRAFT_STAGE}/lib/${ARCH}" set -ex FIRMWARE="OVMF" if [ "$(uname -m)" = "aarch64" ]; then FIRMWARE="AAVMF" fi mkdir -p "${CRAFT_PART_INSTALL}/share/qemu/" # 4MB variant ./edk2-vars-generator -f "${FIRMWARE}" \ -e ../../edk2/build/Build/*/RELEASE*/*/EnrollDefaultKeys.efi \ -s ../../edk2/build/Build/*/RELEASE*/*/Shell.efi \ -c "${CRAFT_STAGE}/share/qemu/OVMF_CODE.4MB.fd" \ -V "${CRAFT_STAGE}/share/qemu/OVMF_VARS.4MB.fd" \ -C "$(cat ubuntu-sb.crt)" \ -o "${CRAFT_PART_INSTALL}/share/qemu/OVMF_VARS.4MB.ms.fd" override-prime: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default plugin: nil prime: - share/qemu/* source: edk2-vars-generator shmounts: plugin: make prime: - bin/setup-shmounts source: shmounts/ spice-server: build-packages: - to armhf: [] - else: - libspice-protocol-dev - libjpeg-turbo8-dev - python3-pyparsing - python3-six - meson - ninja-build meson-parameters: - --prefix=/ - -Dgstreamer=no - -Dmanual=false - -Dlz4=false - -Dsasl=false - -Dopus=disabled - -Dsmartcard=disabled - -Dtests=false organize: sbin/: bin/ usr/lib: lib/ usr/local/lib/: lib/ override-build: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 # Apply patches from Ubuntu sources. cd ../src QUILT_PATCHES=debian/patches quilt push -a cd ../build craftctl default override-prime: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default plugin: meson prime: - lib/*/libjpeg*so* - lib/*/libspice-server*so* - lib/*/libpixman*so* source: https://git.launchpad.net/ubuntu/+source/spice source-commit: 085ca6b2bf58014ad8be571f3b601465c85ae931 source-depth: 1 source-type: git stage-packages: - to armhf: [] - else: - libjpeg-turbo8 - libpixman-1-0 squashfs-tools-ng: organize: usr/bin/: bin/ usr/lib/: lib/ plugin: nil prime: - bin/sqfs2tar - bin/tar2sqfs - lib/*/libsquashfs.so* stage-packages: - squashfs-tools-ng strip: after: - btrfs - ceph - dqlite - logrotate - lvm - nvidia-container - openvswitch - ovn - qemu-ovmf-secureboot - spice-server - squashfs-tools-ng - swtpm - virtiofsd - xfs - xz - wrappers - xtables - zfs-2-1 - zfs-2-2 - zfs-2-3 - zstd - lxc - lxcfs - lxd - shmounts - nvidia-container-toolkit override-prime: | set -x # XXX: remove unneeded files/directories rm -rf "${CRAFT_PRIME}/lib/systemd/" rm -rf "${CRAFT_PRIME}/lib/udev/" rm -rf "${CRAFT_PRIME}/usr/local/" rm -rf "${CRAFT_PRIME}/usr/share/" # Strip binaries (excluding shell scripts and LXCFS) # The "${CRAFT_PRIME}/bin/lxd" file is ignored as that is the lxd-stophook wrapper script. find "${CRAFT_PRIME}"/bin -type f \ -not -path "${CRAFT_PRIME}/bin/ceph" \ -not -path "${CRAFT_PRIME}/bin/editor" \ -not -path "${CRAFT_PRIME}/bin/lxc-checkconfig" \ -not -path "${CRAFT_PRIME}/bin/lxd" \ -not -path "${CRAFT_PRIME}/bin/nvidia-container-cli" \ -not -path "${CRAFT_PRIME}/bin/remote-viewer" \ -not -path "${CRAFT_PRIME}/bin/snap-query" \ -not -path "${CRAFT_PRIME}/bin/sshfs" \ -not -path "${CRAFT_PRIME}/bin/virt-v2v-in-place" \ -not -path "${CRAFT_PRIME}/bin/xfs_admin" \ -not -path "${CRAFT_PRIME}/bin/uefivars.py" \ -not -path "${CRAFT_PRIME}/bin/lxcfs" \ -not -path "${CRAFT_PRIME}/bin/gpu-2404-custom-wrapper" \ -exec strip --strip-all {} + # This is the actual LXD binary. strip --strip-all "${CRAFT_PRIME}/sbin/lxd" # Strip binaries not under bin/ due to being dynamically # Strip all versions of zfs utils for v in "${CRAFT_PRIME}"/zfs-*; do [ -d "${v}" ] || continue find "${v}/" -type f -exec strip -s {} + done # Strip libraries (excluding python3 scripts and liblxcfs) find "${CRAFT_PRIME}"/lib -type f \ -not -path "${CRAFT_PRIME}/lib/python3/*" \ -not -path "${CRAFT_PRIME}/lib/liblxcfs.so" \ -exec strip -s {} + # Delete empty directories find "${CRAFT_PRIME}/" -type d -empty -print -delete # XXX: look for broken symlinks indicating missing/invalid prime broken_symlinks="$(find "${CRAFT_PRIME}/" -xtype l \ -not -path "${CRAFT_PRIME}/lxc/config/common.conf.d/*")" if [ -n "${broken_symlinks}" ]; then echo "Found broken symlinks:" echo "${broken_symlinks}" exit 1 fi # Fixup logrotate.conf permissions to not be group writable chmod g-w "${CRAFT_PRIME}/etc/logrotate.conf" # XXX: do not keep the duplicated and often outdated CA certificates # store from Python `certifi`. This file is not even used as the # `python3-certifi` package providing it is patched to always use: # `/etc/ssl/certs/ca-certificates.crt` truncate --no-create --size=0 "${CRAFT_PRIME}/lib/python3/dist-packages/certifi/cacert.pem" exit 0 plugin: nil swtpm: organize: usr/bin/: bin/ usr/lib/: lib/ plugin: nil prime: - bin/swtpm - lib/*/swtpm/libswtpm*so* - lib/*/libtpms*so* stage-packages: - swtpm uefivars: after: - spice-server - qemu-ovmf-secureboot - nftables organize: bin/uefivars: bin/uefivars.py lib/python3.12/site-packages/: lib/python3/dist-packages/ override-build: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 # Apply patches # XXX: taken from: https://git.launchpad.net/ubuntu/+source/python-uefivars/plain/debian/patches/Revert-Use-google-crc32c-instead-of-crc32c.patch?h=ubuntu/plucky patch -p1 < "${CRAFT_PROJECT_DIR}/patches/uefivars-Revert-Use-google-crc32c-instead-of-crc32c.patch" craftctl default override-prime: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default plugin: python prime: - bin/uefivars.py - lib/python3/dist-packages/crc32c* - lib/python3/dist-packages/pyuefivars* source: https://github.com/awslabs/python-uefivars source-commit: ec1eab1717c65ea36ca7160c96fe0e10e071fb66 source-depth: 1 source-type: git stage-packages: - to amd64: - python3-crc32c - to arm64: - python3-crc32c virtiofsd: organize: usr/libexec/: bin/ override-build: |- [ "$(uname -m)" != "x86_64" ] && exit 0 craftctl default override-prime: |- [ "$(uname -m)" != "x86_64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" != "x86_64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" != "x86_64" ] && exit 0 craftctl default plugin: nil prime: - bin/virtiofsd* stage-packages: - to amd64: - virtiofsd wrappers: organize: commands/snap-query: bin/ hooks/: snap/hooks/ wrappers/editor: bin/ wrappers/gpu-2404-custom-wrapper: bin/ wrappers/lxd-stophook: bin/lxd wrappers/remote-viewer: bin/ wrappers/sshfs: bin/ wrappers/virt-v2v-in-place: bin/ plugin: dump source: snapcraft/ xfs: organize: sbin/: bin/ usr/lib/: lib/ usr/sbin/: bin/ plugin: nil prime: - bin/xfs_admin - bin/xfs_db - bin/xfs_growfs - bin/xfs_repair - bin/mkfs.xfs - lib/*/libinih.so* - lib/*/liburcu.so* stage-packages: - xfsprogs xtables: organize: usr/lib/ebtables/: lib/ usr/sbin/: bin/ plugin: nil prime: - bin/arptables-legacy - bin/ebtables-legacy - lib/libebtc.so.* stage-packages: - arptables - ebtables - netbase xz: organize: usr/bin/: bin/ usr/lib/: lib/ usr/sbin/: bin/ override-build: | craftctl default # Include the lzma symlink ln -s xz "${CRAFT_PART_INSTALL}/usr/bin/lzma" plugin: nil prime: - bin/lzma - bin/xz - lib/*/liblzma*so* stage-packages: - xz-utils zfs-2-1: autotools-configure-parameters: - --prefix=/ - --with-config=user build-packages: - to armhf: [] - else: - libblkid-dev - libssl-dev - uuid-dev - zlib1g-dev - libtirpc-dev override-build: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default set -ex ZFS_VER="2.1" mv "${CRAFT_PART_INSTALL}" "${CRAFT_PART_INSTALL}.tmp" mkdir -p "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin" "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib" mv "${CRAFT_PART_INSTALL}.tmp/sbin/zfs" "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin/" mv "${CRAFT_PART_INSTALL}.tmp/sbin/zpool" "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin/" mv "${CRAFT_PART_INSTALL}.tmp/lib/udev/zvol_id" "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin/" mv "${CRAFT_PART_INSTALL}.tmp/lib/"*so* "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib/" rm -Rf "${CRAFT_PART_INSTALL}.tmp" # unused .so rm "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib/libzfsbootenv.so"* rm "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib/libzpool.so"* override-prime: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default plugin: autotools source: https://github.com/openzfs/zfs source-commit: a7186651d3306debca6b4f72797239eea61db36c source-depth: 1 source-type: git zfs-2-2: autotools-configure-parameters: - --prefix=/ - --with-config=user build-packages: - to armhf: [] - else: - libblkid-dev - libssl-dev - uuid-dev - zlib1g-dev - libtirpc-dev override-build: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default set -ex ZFS_VER="2.2" mv "${CRAFT_PART_INSTALL}" "${CRAFT_PART_INSTALL}.tmp" mkdir -p "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin" "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib" mv "${CRAFT_PART_INSTALL}.tmp/sbin/zfs" "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin/" mv "${CRAFT_PART_INSTALL}.tmp/sbin/zpool" "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin/" mv "${CRAFT_PART_INSTALL}.tmp/lib/udev/zvol_id" "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin/" mv "${CRAFT_PART_INSTALL}.tmp/lib/"*so* "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib/" rm -Rf "${CRAFT_PART_INSTALL}.tmp" # unused .so rm "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib/libzfsbootenv.so"* rm "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib/libzpool.so"* override-prime: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default plugin: autotools source: https://github.com/openzfs/zfs source-commit: 3e4a3e161c00273303cd9fa9e0dc09ead3499a8a source-depth: 1 source-type: git zfs-2-3: autotools-configure-parameters: - --prefix=/ - --with-config=user build-packages: - to armhf: [] - else: - libblkid-dev - libssl-dev - uuid-dev - zlib1g-dev - libtirpc-dev override-build: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default set -ex ZFS_VER="2.3" mv "${CRAFT_PART_INSTALL}" "${CRAFT_PART_INSTALL}.tmp" mkdir -p "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin" "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib" mv "${CRAFT_PART_INSTALL}.tmp/sbin/zfs" "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin/" mv "${CRAFT_PART_INSTALL}.tmp/sbin/zpool" "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin/" mv "${CRAFT_PART_INSTALL}.tmp/lib/udev/zvol_id" "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin/" mv "${CRAFT_PART_INSTALL}.tmp/lib/"*so* "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib/" rm -Rf "${CRAFT_PART_INSTALL}.tmp" # unused .so rm "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib/libzfsbootenv.so"* rm "${CRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib/libzpool.so"* override-prime: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-pull: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default override-stage: |- [ "$(uname -m)" = "armv7l" ] && exit 0 [ "$(uname -m)" = "riscv64" ] && exit 0 craftctl default plugin: autotools source: https://github.com/openzfs/zfs source-commit: 34f96a15c73eab27dd6ad17bb5f1263bf26e37d7 source-depth: 1 source-type: git zstd: organize: usr/bin/: bin/ plugin: nil prime: - bin/pzstd - bin/zstd stage-packages: - zstd plugs: ceph-conf: interface: content target: $SNAP_DATA/microceph gpu-2404: interface: content target: $SNAP/gpu-2404 ovn-certificates: interface: content target: $SNAP_DATA/microovn/certificates ovn-chassis: interface: content target: $SNAP_DATA/microovn/chassis qemu-external: content: qemu-external-binaries interface: content target: $SNAP/external/qemu source-code: https://github.com/canonical/lxd summary: LXD - container and VM manager title: LXD version: 6.6-3c9aa6d website: https://ubuntu.com/lxd
Copyright ©2k19 -
Hexid
|
Tex7ure