-
Notifications
You must be signed in to change notification settings - Fork 37
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
Sync latest-candidate to 5.21-edge (5.21-edge) #647
Merged
Merged
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
784c1e8
snapcraft: install edk2 build dependencies only when needed
mihalicyn aa86ac1
snapcraft: edk2: properly filter architectures
mihalicyn 84310da
snapcraft: fix acpica-tools dependency package name
mihalicyn 6cd9c43
snapcraft: fix snapcraft libraries linter warnings for ceph
mihalicyn dfd9984
snapcraft: add explicit depend on libsnappy1v5
simondeziel 2346b0e
snapcraft: Add `nvidia-ctk` as part of the binary tool for Container …
gabrielmougard 280bba9
snapcraft: Add cobra completions
kadinsayani 60e2bf8
snapcraft: rework how the lxd-doc gets primed
simondeziel 431e913
snapcraft: Set up completer for snap
kadinsayani dfced97
github: Align concurrency rules with lxd repo
tomponline 18ff376
snapcraft: Remove deprecated `-d` flag from `go get`
simondeziel 2f587d9
snapcraft: bump apparmor to v4.0.3
simondeziel a292485
lxd: Build lxd-user as static binary
tomponline 0a15504
snapcraft: Use --strip-all for clarity
tomponline 63d6c74
github: pin actions/checkout@v4
simondeziel e585e1d
github: pin actions/setup-go@v5
simondeziel f5384b3
github: pin redhat-plumbers-in-action/differential-shellcheck@v5
simondeziel a2f6fa0
github: pin actions/upload-artifact@v4
simondeziel 2022fe8
chore(deps): update actions/upload-artifact action to v4.4.3
renovate[bot] 2734983
build(deps): bump actions/checkout from 4.2.1 to 4.2.2
dependabot[bot] 6b3a0a7
build(deps): bump actions/setup-go from 5.0.2 to 5.1.0
dependabot[bot] 90b8130
daemon.start: use % instead of # with `sed`
simondeziel f7f37ee
daemon.start: handle commented \`key = value\` in lvm.conf
simondeziel ba9d698
daemon.start: handle /sbin/ and /bin/ paths in lvm.conf
simondeziel fca4829
github: don't rerun tests when PRs are merged
simondeziel 5702570
github: only run tests (shellcheck) when files in `snapcraft/**` are …
simondeziel 024fa96
daemon.start: simplify executable path patching
simondeziel 84f1967
daemon.start: stop live-patching lvm.conf
simondeziel 9e9b43e
snapcraft: prime LVM config profiles
simondeziel 1020efc
snapcraft: patch lvm.conf at build time
simondeziel e554ff6
snapcraft: split lvm.conf patching based on release
simondeziel 5342927
snapcraft: add `zfs.external` config key
simondeziel a111f9c
nvidia-container-toolkit: Bump to v1.17.2
tomponline 37cef69
libnvidia-container: Bump to v1.17.2
tomponline 02e0209
snapcraft: Add .py extension to uefivars
MusicDin 6c4d199
lxd-stophook: Adds stop hook wrapper for the lxd command
tomponline a7ca1c5
lxd: Build lxd server binary into /sbin
tomponline 2908c5b
criu: Bump to v4.0
tomponline 1348c75
lxd: Update iw location for core22
tomponline 7168b25
snapcraft: Adds title field
tomponline fbbf0e6
snapcraft: hardcode support for compopt to fix bash completion
simondeziel 516a582
snapcraft: call `tput cols` only once during completion
simondeziel bd4243c
snapcraft: sort primed libs for ceph part
simondeziel 381a8da
zfs: Bump to zfs-2.2.6
tomponline 43662c8
python-uefivars: Bump to v1.2
tomponline bc2cae4
github: Use stable version of go
tomponline File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ version: git | |
grade: devel | ||
summary: LXD - container and VM manager | ||
license: AGPL-3.0 | ||
title: LXD | ||
description: |- | ||
LXD is a system container and virtual machine manager. | ||
|
||
|
@@ -51,6 +52,7 @@ description: |- | |
- 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) | ||
|
@@ -191,14 +193,19 @@ parts: | |
- libatomic | ||
plugin: nil | ||
stage-packages: | ||
# XXX: explicitly depend on libsnappy1v5 due to https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/2072656 | ||
- on amd64: | ||
- ceph-common | ||
- libsnappy1v5 | ||
- on arm64: | ||
- ceph-common | ||
- libsnappy1v5 | ||
- on ppc64el: | ||
- ceph-common | ||
- libsnappy1v5 | ||
- on s390x: | ||
- ceph-common | ||
- libsnappy1v5 | ||
organize: | ||
usr/bin/: bin/ | ||
usr/lib/: lib/ | ||
|
@@ -247,11 +254,13 @@ parts: | |
- lib/*/librtmp.so* | ||
- lib/*/libsasl2.so* | ||
- lib/*/libsnappy.so* | ||
- lib/*/libncurses.so* | ||
- lib/*/libssh.so* | ||
- lib/*/libtcmalloc.so* | ||
- lib/*/libunwind.so* | ||
|
||
criu: | ||
source: https://github.com/checkpoint-restore/criu | ||
source-commit: f8b14286b092853a4485813e1efd564109df9123 # v3.19 | ||
source-commit: c2b48ff423aa663b3534a5ba96907366e4c1b408 # v4.0 | ||
source-depth: 1 | ||
source-type: git | ||
plugin: nil | ||
|
@@ -278,7 +287,10 @@ parts: | |
[ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && [ "$(uname -m)" != "ppc64le" ] && [ "$(uname -m)" != "s390x" ] && [ "$(uname -m)" != "armv7l" ] && exit 0 | ||
set -ex | ||
|
||
make USERCFLAGS=-Wno-error=format-truncation criu | ||
git config user.email "[email protected]" | ||
git config user.name "LXD snap builder" | ||
|
||
make criu | ||
mkdir -p "${CRAFT_PART_INSTALL}/criu/" | ||
cp criu/criu "${CRAFT_PART_INSTALL}/criu/" | ||
organize: | ||
|
@@ -552,6 +564,25 @@ parts: | |
sbin/: bin/ | ||
usr/lib/: lib/ | ||
usr/sbin/: bin/ | ||
override-build: |- | ||
# Patch lvm.conf | ||
# lvm.conf changes for lvm2 from 22.04/core22 | ||
sed -i \ | ||
-e "s%\(# \)\?obtain_device_list_from_udev = 1%obtain_device_list_from_udev = 0%" \ | ||
-e "s%\(# \)\?cache_file_prefix = \"\"%cache_file_prefix = \"lxd\"%" \ | ||
"${CRAFT_PART_INSTALL}/etc/lvm/lvm.conf" | ||
|
||
# Generic lvm.conf changes | ||
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 | ||
prime: | ||
- bin/cache_* | ||
- bin/dmeventd | ||
|
@@ -567,6 +598,7 @@ parts: | |
- -bin/lvmetad | ||
- -bin/lvmpolld | ||
- etc/lvm/lvm.conf | ||
- etc/lvm/profile/* | ||
- lib/*/device-mapper/* | ||
- lib/*/libaio.so* | ||
- lib/*/libdevmapper* | ||
|
@@ -634,12 +666,12 @@ parts: | |
|
||
nvidia-container: | ||
source: https://github.com/NVIDIA/libnvidia-container | ||
source-commit: 63d366ee3b4183513c310ac557bf31b05b83328f # v1.17.1 | ||
source-commit: 63d366ee3b4183513c310ac557bf31b05b83328f # v1.17.2 | ||
source-depth: 1 | ||
source-type: git | ||
plugin: make | ||
build-environment: | ||
- GIT_TAG: "1.17.1" # Enables source-depth: 1, should match git tag without "v" prefix. | ||
- GIT_TAG: "1.17.2" # Enables source-depth: 1, should match git tag without "v" prefix. | ||
build-packages: | ||
- bmake | ||
- curl | ||
|
@@ -676,6 +708,32 @@ parts: | |
- bin/nvidia-container-cli* | ||
- lib/libnvidia-container*.so* | ||
|
||
nvidia-container-toolkit: | ||
source: https://github.com/NVIDIA/nvidia-container-toolkit | ||
source-depth: 1 | ||
source-commit: fa66e4cd562804509055e44a88f666673e6d27c0 # v1.17.2 | ||
source-type: git | ||
build-snaps: | ||
- go | ||
plugin: make | ||
override-prime: |- | ||
[ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && [ "$(uname -m)" != "ppc64le" ] && [ "$(uname -m)" != "s390x" ] && exit 0 | ||
craftctl default | ||
override-pull: |- | ||
[ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && [ "$(uname -m)" != "ppc64le" ] && [ "$(uname -m)" != "s390x" ] && exit 0 | ||
craftctl default | ||
override-build: |- | ||
[ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && [ "$(uname -m)" != "ppc64le" ] && [ "$(uname -m)" != "s390x" ] && exit 0 | ||
set -ex | ||
|
||
make binaries | ||
mkdir -p "${CRAFT_PART_INSTALL}/bin/" | ||
cp nvidia-ctk "${CRAFT_PART_INSTALL}/bin/" | ||
organize: | ||
usr/bin/: bin/ | ||
prime: | ||
- bin/nvidia-ctk | ||
|
||
nvme: | ||
plugin: nil | ||
stage-packages: | ||
|
@@ -1194,7 +1252,7 @@ parts: | |
|
||
zfs-2-2: | ||
source: https://github.com/openzfs/zfs | ||
source-commit: 2566592045780e7be7afc899c2496b1ae3af4f4d # zfs-2.2.4 | ||
source-commit: baa50314567afd986a00838f0fa65fdacbd12daf # zfs-2.2.6 | ||
source-depth: 1 | ||
source-type: git | ||
plugin: autotools | ||
|
@@ -1241,7 +1299,7 @@ parts: | |
|
||
apparmor: | ||
source: https://gitlab.com/apparmor/apparmor.git | ||
source-commit: 84a6bc1b6dcdfeabb1ed3597f01e314f3bcee5c1 # v4.0.2 | ||
source-commit: b4dfdf50f50ed1d64161424d036a2453645f0cfe # v4.0.3 | ||
source-depth: 1 | ||
source-type: git | ||
plugin: autotools | ||
|
@@ -1393,7 +1451,7 @@ parts: | |
- qemu-ovmf-secureboot | ||
- nftables | ||
source: https://github.com/awslabs/python-uefivars | ||
source-commit: 9679002a4392d8e7831d2dbda3fab41ccc5c6b8c # v1.0.0 | ||
source-commit: ec1eab1717c65ea36ca7160c96fe0e10e071fb66 # v1.2 | ||
source-depth: 1 | ||
source-type: git | ||
plugin: python | ||
|
@@ -1408,6 +1466,7 @@ parts: | |
craftctl default | ||
organize: | ||
lib/python3.10/site-packages/: lib/python3/dist-packages/ | ||
bin/uefivars: bin/uefivars.py | ||
prime: | ||
- bin/uefivars.py | ||
- lib/python3/dist-packages/google_crc32c* | ||
|
@@ -1464,7 +1523,7 @@ parts: | |
ln -s "$(pwd)" "${GOPATH}/src/github.com/canonical/lxd" | ||
|
||
# Download the dependencies | ||
go get -d -v ./... | ||
go get -v ./... | ||
override-build: | | ||
set -ex | ||
|
||
|
@@ -1481,10 +1540,19 @@ parts: | |
|
||
# Build the binaries | ||
go build -trimpath -o "${CRAFT_PART_INSTALL}/bin/lxc" github.com/canonical/lxd/lxc | ||
go build -trimpath -o "${CRAFT_PART_INSTALL}/bin/lxd" -tags=libsqlite3 github.com/canonical/lxd/lxd | ||
|
||
# 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 | ||
go build -trimpath -o "${CRAFT_PART_INSTALL}/bin/lxd-user" github.com/canonical/lxd/lxd-user | ||
CGO_ENABLED=0 go build -trimpath -o "${CRAFT_PART_INSTALL}/bin/lxd-user" -tags netgo github.com/canonical/lxd/lxd-user | ||
|
||
# Some python dependencies are not available for riscv64 or just require a build from source. | ||
# Not worth the effort for now. | ||
if [ "$(uname -m)" != "riscv64" ]; then | ||
# Build the static website | ||
make doc | ||
|
@@ -1495,21 +1563,31 @@ parts: | |
rm doc/_build/.buildinfo | ||
rm -rf doc/_build/_sphinx_design_static/ | ||
|
||
# Stage the static website | ||
mkdir -p "${CRAFT_STAGE}/share/lxd-documentation" | ||
cp -a doc/_build/. "${CRAFT_STAGE}/share/lxd-documentation/" | ||
# 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/" | ||
cp scripts/bash/lxd-client "${CRAFT_PART_INSTALL}/etc/bash_completion.d/snap.lxd.lxc" | ||
# 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/bin/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}/etc/bash_completion.d/snap.lxd.lxc" | ||
organize: | ||
usr/bin/: bin/ | ||
usr/lib/: lib/ | ||
usr/share/misc/: share/misc/ | ||
var/lib/usbutils/usb.ids: share/misc/ | ||
usr/sbin/: bin/ | ||
sbin/: bin/ | ||
sbin/iw: bin/ # core22 installs iw in sbin (not needed for core24 which installs to usr/sbin) | ||
sbin/sgdisk: bin/ | ||
prime: | ||
- bin/dnsmasq | ||
- bin/getfattr | ||
|
@@ -1525,13 +1603,14 @@ parts: | |
|
||
- etc/bash_completion.d/snap.lxd.lxc | ||
|
||
- share/lxd-documentation* | ||
- share/misc/pci.ids | ||
- share/misc/usb.ids | ||
|
||
- bin/lxc | ||
- bin/lxd | ||
- bin/lxd-agent | ||
- bin/lxd-user | ||
- sbin/lxd | ||
|
||
lxd-ui: | ||
source: https://github.com/canonical/lxd-ui | ||
|
@@ -1595,6 +1674,7 @@ parts: | |
- criu | ||
- lxd | ||
- shmounts | ||
- nvidia-container-toolkit | ||
plugin: nil | ||
override-prime: | | ||
set -x | ||
|
@@ -1606,10 +1686,12 @@ parts: | |
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" \ | ||
|
@@ -1618,7 +1700,11 @@ parts: | |
-not -path "${CRAFT_PRIME}/bin/xfs_admin" \ | ||
-not -path "${CRAFT_PRIME}/bin/uefivars.py" \ | ||
-not -path "${CRAFT_PRIME}/bin/lxcfs" \ | ||
-exec strip -s {} + | ||
-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 | ||
# added to the path with `snap set lxd`, like `criu.enable=true` | ||
|
@@ -1639,13 +1725,6 @@ parts: | |
-not -path "${CRAFT_PRIME}/lib/liblxcfs.so" \ | ||
-exec strip -s {} + | ||
|
||
if [ "$(uname -m)" != "riscv64" ]; then | ||
# Prime the documentation only if the arch is not riscv64. | ||
# Some python dependencies are not available for riscv64 or just require a build from source. | ||
# Not worth the effort for now. | ||
cp -r "${CRAFT_STAGE}/share/lxd-documentation" "${CRAFT_PRIME}/share/" | ||
fi | ||
|
||
# Delete empty directories | ||
find "${CRAFT_PRIME}/" -type d -empty -print -delete | ||
|
||
|
@@ -1668,6 +1747,7 @@ parts: | |
organize: | ||
commands/snap-query: bin/ | ||
hooks/: snap/hooks/ | ||
wrappers/lxd-stophook: bin/lxd | ||
wrappers/editor: bin/ | ||
wrappers/remote-viewer: bin/ | ||
wrappers/sshfs: bin/ | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unneeded as we don't do any cherry-picking or such, but also harmless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, yeah was trying to sync as much as possible.