From 784c1e8b98b438af8b6dc2004161d393d6f171b7 Mon Sep 17 00:00:00 2001 From: Alexander Mikhalitsyn Date: Fri, 21 Jun 2024 10:14:22 +0200 Subject: [PATCH 01/46] snapcraft: install edk2 build dependencies only when needed It's a fix for a build failure on s390: Installing build-packages Cannot find package listed in 'build-packages': acpica-tools Full execution log: '/root/.local/state/snapcraft/log/snapcraft-20240621-073250.087743.log' Build failed Reason is that, in Ubuntu 24.04 acpica-tools package is not available for s390: https://packages.ubuntu.com/noble/acpica-tools compare with: https://packages.ubuntu.com/jammy/acpica-tools Let's workaround this by preventing build packages installation for any architectures other than amd64/arm64. It's safe, because we only build edk2 for these two architectures. Signed-off-by: Alexander Mikhalitsyn (cherry picked from commit a0e011e7831f19b5fc6c26eed8ad7b6818764cc1) (cherry picked from commit 8d8f8f43dde582e076e585ea3ceeee0bc1cbd4bf) --- snapcraft.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 498c1f06..6bf35de9 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -322,11 +322,7 @@ parts: source-type: git plugin: nil build-packages: - - on amd64: - - g++ - - acpica-tools - - uuid-dev - - on arm64: + - on amd64,arm64: - g++ - acpica-tools - uuid-dev From aa86ac1791e5ba3714815fe9d6682d62985e6e8e Mon Sep 17 00:00:00 2001 From: Alexander Mikhalitsyn Date: Fri, 21 Jun 2024 11:17:27 +0200 Subject: [PATCH 02/46] snapcraft: edk2: properly filter architectures snapcraft syntax a little bit unobvious, and it turned out that: - on amd64,arm64: means AND and not OR. Which is obviously wrong. Let's workaround this. Fixes: a0e011e78 ("snapcraft: install edk2 build dependencies only when needed") Signed-off-by: Alexander Mikhalitsyn (cherry picked from commit b57a13122150692561e82c80f71712e4acefa291) (cherry picked from commit 712aad5643e4fe219e1b11db557584dd96aefff2) --- snapcraft.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 6bf35de9..29f5acf9 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -322,10 +322,14 @@ parts: source-type: git plugin: nil build-packages: - - on amd64,arm64: + - on amd64: - g++ - acpica-tools - uuid-dev + - on arm64: + - g++ + - acpica-tools12 + - uuid-dev override-prime: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 craftctl default From 84310dade40b0456deaae5ea8117bbbe6f6a6b30 Mon Sep 17 00:00:00 2001 From: Alexander Mikhalitsyn Date: Fri, 21 Jun 2024 15:52:21 +0200 Subject: [PATCH 03/46] snapcraft: fix acpica-tools dependency package name Only for core24. Signed-off-by: Alexander Mikhalitsyn (cherry picked from commit 59104500c8b6d600c433f59837160ad4166d98e3) (cherry picked from commit 9c5f5f262cca787d1c15e9dc32f51bf374f1b92e) --- snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 29f5acf9..498c1f06 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -328,7 +328,7 @@ parts: - uuid-dev - on arm64: - g++ - - acpica-tools12 + - acpica-tools - uuid-dev override-prime: |- [ "$(uname -m)" != "x86_64" ] && [ "$(uname -m)" != "aarch64" ] && exit 0 From 6cd9c434f464ef5d6a746c53d565754e7f5b45d0 Mon Sep 17 00:00:00 2001 From: Alexander Mikhalitsyn Date: Thu, 27 Jun 2024 14:25:02 +0200 Subject: [PATCH 04/46] snapcraft: fix snapcraft libraries linter warnings for ceph Signed-off-by: Alexander Mikhalitsyn (cherry picked from commit dacdab296c37fe097ce923cd05fb89c4ac1dac1b) (cherry picked from commit 56cebc069f9f60100e7d7f9ab194785b1f200e3a) --- snapcraft.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/snapcraft.yaml b/snapcraft.yaml index 498c1f06..15fd08b7 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -248,6 +248,12 @@ parts: - lib/*/libsasl2.so* - lib/*/libsnappy.so* - lib/*/libncurses.so* + - lib/*/liblber.so* + - lib/*/libldap.so* + - lib/*/libssh.so* + - lib/*/liblmdb.so* + - lib/*/libunwind.so* + - lib/*/libtcmalloc.so* criu: source: https://github.com/checkpoint-restore/criu From dfd9984e832564b2d2c2909fa6c1658acd767383 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 10 Jul 2024 10:18:01 -0400 Subject: [PATCH 05/46] snapcraft: add explicit depend on libsnappy1v5 Signed-off-by: Simon Deziel (cherry picked from commit 0eb7b80f0d9289ea6ccad062749768041461697c) (cherry picked from commit ee8ea0eb62f8b9500203b001081993af91565576) --- snapcraft.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/snapcraft.yaml b/snapcraft.yaml index 15fd08b7..61552d4a 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -191,14 +191,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/ From 2346b0e418d2f6f2f093d21c7b73bdeeb4b564e8 Mon Sep 17 00:00:00 2001 From: Gabriel Mougard Date: Thu, 20 Jun 2024 14:05:15 +0200 Subject: [PATCH 06/46] snapcraft: Add `nvidia-ctk` as part of the binary tool for Container Device Interface spec generation Signed-off-by: Gabriel Mougard (cherry picked from commit 2b7129f413789c4ae799f6670b19327b852fc673) (cherry picked from commit a787d81d0102900ad45cc195bfdc084cf6127fe6) --- snapcraft.yaml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/snapcraft.yaml b/snapcraft.yaml index 61552d4a..77bcf937 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -687,6 +687,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: a470818ba7d9166be282cd0039dd2fc9b0a34d73 # v1.16.1 + 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: @@ -1606,6 +1632,7 @@ parts: - criu - lxd - shmounts + - nvidia-container-toolkit plugin: nil override-prime: | set -x From 280bba9e039689b163e459b2a4adc02e551200e6 Mon Sep 17 00:00:00 2001 From: Kadin Sayani Date: Thu, 5 Sep 2024 07:30:45 -0600 Subject: [PATCH 07/46] snapcraft: Add cobra completions Signed-off-by: Kadin Sayani (cherry picked from commit bf88064d2afea3d14029ada6f6d8cc09939ace69) (cherry picked from commit 335da207ff5594c1890de1d7c65c3d9521e98f92) --- snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 77bcf937..0ec444ae 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1539,7 +1539,7 @@ parts: # 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" + "${CRAFT_PART_INSTALL}/bin/lxc" completion bash > "${CRAFT_PART_INSTALL}/etc/bash_completion.d/snap.lxd.lxc" organize: usr/bin/: bin/ usr/lib/: lib/ From 60e2bf8b54c4f9ab66b3db84c5505ebcb4cbb403 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Tue, 10 Sep 2024 10:24:34 -0400 Subject: [PATCH 08/46] snapcraft: rework how the lxd-doc gets primed This is merely cosmetic/for logical correctness as the end result is the same. Signed-off-by: Simon Deziel (cherry picked from commit f2c08e2c1bc0236e404f47e7c0b2e54f48a64d4a) (cherry picked from commit 1bb52fc1c82f2b4288e222d35ee00a29576fa7eb) --- snapcraft.yaml | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 0ec444ae..11290b34 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1522,6 +1522,8 @@ parts: 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 + # 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 @@ -1532,9 +1534,9 @@ 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 @@ -1562,6 +1564,7 @@ parts: - etc/bash_completion.d/snap.lxd.lxc + - share/lxd-documentation* - share/misc/pci.ids - share/misc/usb.ids @@ -1677,13 +1680,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 From 431e913309fcc7481963f27cbf5f7ac325ea60c7 Mon Sep 17 00:00:00 2001 From: Kadin Sayani Date: Thu, 5 Sep 2024 14:51:50 -0600 Subject: [PATCH 09/46] snapcraft: Set up completer for snap Signed-off-by: Kadin Sayani (cherry picked from commit 245e9e1d48f099c99ec0ec0d016ab4829c8ac578) (cherry picked from commit 28a3e19d64c4144214a6d5e51fbc04c21ed05e64) --- snapcraft.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 11290b34..31cce396 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1541,7 +1541,14 @@ parts: # Setup bash completion mkdir -p "${CRAFT_PART_INSTALL}/etc/bash_completion.d/" - "${CRAFT_PART_INSTALL}/bin/lxc" completion bash > "${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/$(tput cols)/' + # 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_request_comp}" > "${CRAFT_PART_INSTALL}/etc/bash_completion.d/snap.lxd.lxc" organize: usr/bin/: bin/ usr/lib/: lib/ From dfced979df2198091e06b905ba0ba316f0959ccc Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Mon, 16 Sep 2024 10:32:43 +0100 Subject: [PATCH 10/46] github: Align concurrency rules with lxd repo Signed-off-by: Thomas Parrott (cherry picked from commit 30a24f364f836b1639b7e08b0bb892d1c855992c) (cherry picked from commit 70286379629ec588b74da01ed0817f75dd05d0da) --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3a82673f..d797373a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ permissions: contents: read concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} cancel-in-progress: true defaults: From 18ff376d63f7e0e2c7a7da93744a99f5839fae6a Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 18 Sep 2024 12:51:30 -0400 Subject: [PATCH 11/46] snapcraft: Remove deprecated `-d` flag from `go get` Signed-off-by: Simon Deziel (cherry picked from commit d3206698bd38199c3bdecdabc6c12b03fa3184c2) (cherry picked from commit ae55caebc91745590ab763dc7d23b22f52aa0ba5) --- snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 31cce396..127bb1d6 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1501,7 +1501,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 From 2f587d9688c622e6e9172156303c13e89266921d Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Tue, 17 Sep 2024 20:27:57 -0400 Subject: [PATCH 12/46] snapcraft: bump apparmor to v4.0.3 Signed-off-by: Simon Deziel (cherry picked from commit b3a2abedd62a3a2a32a4de44e9c0a29b746d8d3a) (cherry picked from commit 2aaa93716f98749ab90ef392ec1669a29c663525) --- snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 127bb1d6..1d564684 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1278,7 +1278,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 From a292485cbaaf935eadcb4643ea2be4898d6cc39f Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Fri, 4 Oct 2024 16:26:04 +0100 Subject: [PATCH 13/46] lxd: Build lxd-user as static binary This is in preparation for it being used as a container stop hook helper to allow it to be called across snap base changes without depending in libs from the core snaps. Signed-off-by: Thomas Parrott (cherry picked from commit 2c18445bbf3557e9ce0ddb590e0f6b9c34926502) (cherry picked from commit a762038fd8cf1380347334cb9d4a4ec08d1f7271) --- snapcraft.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 1d564684..8dbdea79 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1519,8 +1519,10 @@ 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 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. From 0a155045698abd9063f622b6a48418134c2b14d2 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Wed, 9 Oct 2024 14:38:28 +0100 Subject: [PATCH 14/46] snapcraft: Use --strip-all for clarity Signed-off-by: Thomas Parrott (cherry picked from commit 6a1f4c2e3f03ab474dae6fe357b1de3305cfd497) (cherry picked from commit 9794f7b374733ce4352545e2fd214889e92448ee) --- snapcraft.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 8dbdea79..195adefb 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1668,7 +1668,8 @@ 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 {} + # Strip binaries not under bin/ due to being dynamically # added to the path with `snap set lxd`, like `criu.enable=true` From 63d6c7442d451ca16b2414f20859b3f5364c413d Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 10 Oct 2024 11:38:20 -0400 Subject: [PATCH 15/46] github: pin actions/checkout@v4 Signed-off-by: Simon Deziel (cherry picked from commit dec20d96e7d09e7b635eb1b917255b546517fe2b) (cherry picked from commit fc454f31ddf552eafe06db38dc4d36167956adee) --- .github/workflows/builds.yml | 2 +- .github/workflows/tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 134288fe..65c0b20c 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -19,7 +19,7 @@ jobs: if: ${{ github.repository == 'canonical/lxd-pkg-snap' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }} steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 - name: Setup Launchpad SSH access env: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d797373a..9f832b8b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 with: # A non-shallow clone is needed for the Differential ShellCheck fetch-depth: 0 From e585e1d43b984026580169b9a3af93a1cba5c805 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 10 Oct 2024 11:38:30 -0400 Subject: [PATCH 16/46] github: pin actions/setup-go@v5 Signed-off-by: Simon Deziel (cherry picked from commit 463217037b11c2fdf51b1f89834f9a1719ab47d7) (cherry picked from commit f579ab75a5dc1856873dd4bc79f3b9cc50ecb856) --- .github/workflows/builds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 65c0b20c..d33b78cb 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -37,7 +37,7 @@ jobs: ssh-keygen -qlF git.launchpad.net | grep -xF 'git.launchpad.net RSA SHA256:UNOzlP66WpDuEo34Wgs8mewypV0UzqHLsIFoqwe8dYo' - name: Install Go - uses: actions/setup-go@v5 + uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 with: go-version: 1.22.x From f5384b3c3adbe98108f961340ae52426407f8e34 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 10 Oct 2024 11:38:44 -0400 Subject: [PATCH 17/46] github: pin redhat-plumbers-in-action/differential-shellcheck@v5 Signed-off-by: Simon Deziel (cherry picked from commit 9e84fc5fb2233392c45c74dc0f55f4b3d0e3e3d5) (cherry picked from commit f0677f6cfc8ef464135aa27658959018cb02c34c) --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9f832b8b..77b6fe40 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,7 +29,7 @@ jobs: - id: ShellCheck name: Differential ShellCheck - uses: redhat-plumbers-in-action/differential-shellcheck@v5 + uses: redhat-plumbers-in-action/differential-shellcheck@cc6721c45a8800cc666de45493545a07a638d121 # v5.4.0 with: token: ${{ secrets.GITHUB_TOKEN }} if: github.event_name == 'pull_request' From a2f6fa03c4e8e08722bbfcfca4784fd69e498f05 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 10 Oct 2024 11:38:59 -0400 Subject: [PATCH 18/46] github: pin actions/upload-artifact@v4 Signed-off-by: Simon Deziel (cherry picked from commit 236d626c25ab496cfe79cff20e5054beb4583c47) (cherry picked from commit 4af31f3eee93dd8c188a39656c25b324779f6706) --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 77b6fe40..9a9a645b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,7 @@ jobs: if: github.event_name == 'pull_request' - name: Upload artifact with ShellCheck defects in SARIF format - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@84480863f228bb9747b473957fcc9e309aa96097 # v4.4.2 with: name: Differential ShellCheck SARIF path: ${{ steps.ShellCheck.outputs.sarif }} From 2022fe80411eb59d27abca0c8ddc987a80071cb6 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 00:43:05 +0000 Subject: [PATCH 19/46] chore(deps): update actions/upload-artifact action to v4.4.3 (cherry picked from commit ed62bb3f6f6638ca1bc13f0147fdce528ff0210c) (cherry picked from commit fdc5b8f5f7021d3f9a38b5190522ae3e4cadc2ee) --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9a9a645b..c848d65d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,7 +35,7 @@ jobs: if: github.event_name == 'pull_request' - name: Upload artifact with ShellCheck defects in SARIF format - uses: actions/upload-artifact@84480863f228bb9747b473957fcc9e309aa96097 # v4.4.2 + uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 with: name: Differential ShellCheck SARIF path: ${{ steps.ShellCheck.outputs.sarif }} From 273498364acc911a903118e2e4e6c3b0dba23302 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:44:59 +0000 Subject: [PATCH 20/46] build(deps): bump actions/checkout from 4.2.1 to 4.2.2 Bumps [actions/checkout](https://github.com/actions/checkout) from 4.2.1 to 4.2.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871...11bd71901bbe5b1630ceea73d27597364c9af683) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] (cherry picked from commit 35ef0ce079037e45fb9278bb168e31a6d4478b49) (cherry picked from commit 722ead6dc2fe289f8b699554f1c43d32c7601329) --- .github/workflows/builds.yml | 2 +- .github/workflows/tests.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index d33b78cb..5376fe74 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -19,7 +19,7 @@ jobs: if: ${{ github.repository == 'canonical/lxd-pkg-snap' && github.event_name == 'push' && github.actor != 'dependabot[bot]' }} steps: - name: Checkout code - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Setup Launchpad SSH access env: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c848d65d..a094867d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -22,7 +22,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Checkout - uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1 + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: # A non-shallow clone is needed for the Differential ShellCheck fetch-depth: 0 From 6b3a0a74654497c76ade81969909c76fccf9172c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 15:45:01 +0000 Subject: [PATCH 21/46] build(deps): bump actions/setup-go from 5.0.2 to 5.1.0 Bumps [actions/setup-go](https://github.com/actions/setup-go) from 5.0.2 to 5.1.0. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](https://github.com/actions/setup-go/compare/0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32...41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] (cherry picked from commit 2b51aa34dcb0ce317bc9f44a527a0fdbb846b15f) (cherry picked from commit 8e425009bb7496392944a65220df457099e125e1) --- .github/workflows/builds.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 5376fe74..ba26f27f 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -37,7 +37,7 @@ jobs: ssh-keygen -qlF git.launchpad.net | grep -xF 'git.launchpad.net RSA SHA256:UNOzlP66WpDuEo34Wgs8mewypV0UzqHLsIFoqwe8dYo' - name: Install Go - uses: actions/setup-go@0a12ed9d6a96ab950c8f026ed9f722fe0da7ef32 # v5.0.2 + uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 with: go-version: 1.22.x From 90b8130a4c3bd65e551b2c59ef07f12a4a3b6f33 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Mon, 4 Nov 2024 17:05:26 -0500 Subject: [PATCH 22/46] daemon.start: use % instead of # with `sed` Also drop `g` flag as those `key = value` only occur once per line anyway. Signed-off-by: Simon Deziel (cherry picked from commit 35b74b3ffb708305d8d62c1403d14833ce788afb) (cherry picked from commit 8be31ec5d04eacf33ef7c3c807ef885aa5f3bae2) --- snapcraft/commands/daemon.start | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/snapcraft/commands/daemon.start b/snapcraft/commands/daemon.start index db84d98b..3cc0af76 100755 --- a/snapcraft/commands/daemon.start +++ b/snapcraft/commands/daemon.start @@ -314,15 +314,15 @@ fi echo "==> Setting up LVM configuration" mkdir -p /etc/lvm/ sed \ - -e "s#obtain_device_list_from_udev = 1#obtain_device_list_from_udev = 0#g" \ - -e "s#cache_file_prefix = \"\"#cache_file_prefix = \"lxd\"#g" \ - -e "s#udev_sync = 1#udev_sync = 0#g" \ - -e "s#udev_rules = 1#udev_rules = 0#g" \ - -e "s#use_lvmetad = 1#use_lvmetad = 0#g" \ - -e "s#monitoring = 1#monitoring = 0#g" \ - -e "s%# executable = \"/sbin/dmeventd\"%executable = \"${SNAP}/bin/dmeventd\"%g" \ - -e "/# .*_executable =/s/# //g" \ - -e "s#/usr/sbin/#${SNAP}/bin/#g" \ + -e "s%obtain_device_list_from_udev = 1%obtain_device_list_from_udev = 0%" \ + -e "s%cache_file_prefix = \"\"%cache_file_prefix = \"lxd\"%" \ + -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 "s%# executable = \"/sbin/dmeventd\"%executable = \"${SNAP}/bin/dmeventd\"%" \ + -e "/# .*_executable =/s/# //" \ + -e "s%/usr/sbin/%${SNAP}/bin/%" \ "${SNAP}/etc/lvm/lvm.conf" > /etc/lvm/lvm.conf # Setup for OVN From f7f37ee5f4cfc7462ccdc15fe753b4dd6e7b7b66 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Mon, 4 Nov 2024 17:09:43 -0500 Subject: [PATCH 23/46] daemon.start: handle commented \`key = value\` in lvm.conf Signed-off-by: Simon Deziel (cherry picked from commit b773a489856dcd3e6ad9b1600f37d642ac458df8) (cherry picked from commit f1cf00a1824c256f7a0242f3545c37033bddc9e9) --- snapcraft/commands/daemon.start | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/snapcraft/commands/daemon.start b/snapcraft/commands/daemon.start index 3cc0af76..f5fd2be2 100755 --- a/snapcraft/commands/daemon.start +++ b/snapcraft/commands/daemon.start @@ -314,12 +314,12 @@ fi echo "==> Setting up LVM configuration" mkdir -p /etc/lvm/ sed \ - -e "s%obtain_device_list_from_udev = 1%obtain_device_list_from_udev = 0%" \ - -e "s%cache_file_prefix = \"\"%cache_file_prefix = \"lxd\"%" \ - -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 "s%\(# \)\?obtain_device_list_from_udev = 1%obtain_device_list_from_udev = 0%" \ + -e "s%\(# \)\?cache_file_prefix = \"\"%cache_file_prefix = \"lxd\"%" \ + -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 "s%# executable = \"/sbin/dmeventd\"%executable = \"${SNAP}/bin/dmeventd\"%" \ -e "/# .*_executable =/s/# //" \ -e "s%/usr/sbin/%${SNAP}/bin/%" \ From ba9d698fde3a48fe31c0f9fe9c58362e4d5f542b Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Mon, 4 Nov 2024 17:13:49 -0500 Subject: [PATCH 24/46] daemon.start: handle /sbin/ and /bin/ paths in lvm.conf Signed-off-by: Simon Deziel (cherry picked from commit 98f2c84f03304f7fa86a725cee8d88eab6a03d12) (cherry picked from commit cca18528bc4e45e4df0949a4e50225c286edddc0) --- snapcraft/commands/daemon.start | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snapcraft/commands/daemon.start b/snapcraft/commands/daemon.start index f5fd2be2..8c6a7c0c 100755 --- a/snapcraft/commands/daemon.start +++ b/snapcraft/commands/daemon.start @@ -320,9 +320,9 @@ sed \ -e "s%\(# \)\?udev_rules = 1%udev_rules = 0%" \ -e "s%\(# \)\?use_lvmetad = 1%use_lvmetad = 0%" \ -e "s%\(# \)\?monitoring = 1%monitoring = 0%" \ - -e "s%# executable = \"/sbin/dmeventd\"%executable = \"${SNAP}/bin/dmeventd\"%" \ + -e "s%# executable = \"/s\?bin/dmeventd\"%executable = \"${SNAP}/bin/dmeventd\"%" \ -e "/# .*_executable =/s/# //" \ - -e "s%/usr/sbin/%${SNAP}/bin/%" \ + -e "s%/usr/s\?bin/%${SNAP}/bin/%" \ "${SNAP}/etc/lvm/lvm.conf" > /etc/lvm/lvm.conf # Setup for OVN From fca4829ea7fb872d45f090407f2afa3b1a5d919a Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Mon, 11 Nov 2024 11:38:30 -0500 Subject: [PATCH 25/46] github: don't rerun tests when PRs are merged Signed-off-by: Simon Deziel (cherry picked from commit f31dbafb37b7e4bb8a731de303637f74cd51f138) (cherry picked from commit 878ed1fc2ede1ceb7bec2a544828d053485af4b5) --- .github/workflows/tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a094867d..f7e042d1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,5 @@ name: Tests on: - push: pull_request: permissions: From 5702570044b6d351e178bbb4b13079330b61b23b Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Mon, 11 Nov 2024 11:40:01 -0500 Subject: [PATCH 26/46] github: only run tests (shellcheck) when files in `snapcraft/**` are touched Signed-off-by: Simon Deziel (cherry picked from commit ec03f70f175ca86b727d041ce4bf1c843bc19d54) (cherry picked from commit dd19380dcdcdb85b0740b9ddb78397a326a24749) --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f7e042d1..8400c3f7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,8 @@ name: Tests on: pull_request: + paths: + - 'snapcraft/**' permissions: contents: read From 024fa96f2ddd25cf017d2f9e95f4a704be1843ee Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 6 Nov 2024 16:52:30 -0500 Subject: [PATCH 27/46] daemon.start: simplify executable path patching Signed-off-by: Simon Deziel (cherry picked from commit eeffd466f54fc1586fb951d3df03d5d78b23f1c0) (cherry picked from commit eaa652492ff55ac46f972326f11993ad3fd61ab5) --- snapcraft/commands/daemon.start | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/snapcraft/commands/daemon.start b/snapcraft/commands/daemon.start index 8c6a7c0c..08527912 100755 --- a/snapcraft/commands/daemon.start +++ b/snapcraft/commands/daemon.start @@ -320,9 +320,8 @@ sed \ -e "s%\(# \)\?udev_rules = 1%udev_rules = 0%" \ -e "s%\(# \)\?use_lvmetad = 1%use_lvmetad = 0%" \ -e "s%\(# \)\?monitoring = 1%monitoring = 0%" \ - -e "s%# executable = \"/s\?bin/dmeventd\"%executable = \"${SNAP}/bin/dmeventd\"%" \ - -e "/# .*_executable =/s/# //" \ - -e "s%/usr/s\?bin/%${SNAP}/bin/%" \ + -e "/# .*_\?executable =/s/# //" \ + -e "s%\(/usr\)\?/s\?bin/%${SNAP}/bin/%" \ "${SNAP}/etc/lvm/lvm.conf" > /etc/lvm/lvm.conf # Setup for OVN From 84f1967c2055fb8f6a92e2f0f9d34b91d5dc9af4 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 6 Nov 2024 14:52:23 -0500 Subject: [PATCH 28/46] daemon.start: stop live-patching lvm.conf Signed-off-by: Simon Deziel (cherry picked from commit 95e33aed5b128b033f98afd67918e11dcd255d3b) (cherry picked from commit 114c95653437b6523d282ffea711ab6ce43e8769) --- snapcraft/commands/daemon.start | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/snapcraft/commands/daemon.start b/snapcraft/commands/daemon.start index 08527912..8f29c963 100755 --- a/snapcraft/commands/daemon.start +++ b/snapcraft/commands/daemon.start @@ -311,18 +311,16 @@ else fi # Setup for LVM -echo "==> Setting up LVM configuration" -mkdir -p /etc/lvm/ -sed \ - -e "s%\(# \)\?obtain_device_list_from_udev = 1%obtain_device_list_from_udev = 0%" \ - -e "s%\(# \)\?cache_file_prefix = \"\"%cache_file_prefix = \"lxd\"%" \ - -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}/bin/%" \ - "${SNAP}/etc/lvm/lvm.conf" > /etc/lvm/lvm.conf +if [ "${lvm_external:-"false"}" = "false" ]; then + echo "==> Setting up LVM configuration" + # XXX: the directory ${SNAP}/etc/lvm cannot be symlink'ed as LVM tools try + # to create /etc/lvm/{archive,backup} dirs which is not possible as ${SNAP} + # is read-only. + mkdir -p /etc/lvm + ln -sf "${SNAP}/etc/lvm/lvm.conf" /etc/lvm/ + # the /etc/lvm/profile dir is however only read from so a symlink is OK + ln -sf "${SNAP}/etc/lvm/profile" /etc/lvm/ +fi # Setup for OVN echo "==> Setting up OVN configuration" From 9e9b43e4c88c1fb6ca6b4ad20facf5b61d26fec3 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 6 Nov 2024 16:00:04 -0500 Subject: [PATCH 29/46] snapcraft: prime LVM config profiles Signed-off-by: Simon Deziel (cherry picked from commit 174523d6457007b4b58f0a0a299e9fea04e69345) (cherry picked from commit cd5970221fd4179a235fcde4355d389ff1eb1d12) --- snapcraft.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/snapcraft.yaml b/snapcraft.yaml index 195adefb..cb625bf4 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -578,6 +578,7 @@ parts: - -bin/lvmetad - -bin/lvmpolld - etc/lvm/lvm.conf + - etc/lvm/profile/* - lib/*/device-mapper/* - lib/*/libaio.so* - lib/*/libdevmapper* From 1020efc61f41861f04f1a7eebe1903457ad09516 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 6 Nov 2024 14:15:01 -0500 Subject: [PATCH 30/46] snapcraft: patch lvm.conf at build time Signed-off-by: Simon Deziel (cherry picked from commit 513cd241b59aad685ccbf197b436bb18b4e430b3) (cherry picked from commit e6aa23a7e8545d3ce9a6446327e5470c2ba32358) --- snapcraft.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/snapcraft.yaml b/snapcraft.yaml index cb625bf4..19d320f4 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -563,6 +563,20 @@ parts: sbin/: bin/ usr/lib/: lib/ usr/sbin/: bin/ + override-build: |- + # Patch lvm.conf + 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\"%" \ + -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 From e554ff6456b5bd0d72f3b88e9b6fe046ab872937 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 6 Nov 2024 17:22:26 -0500 Subject: [PATCH 31/46] snapcraft: split lvm.conf patching based on release Signed-off-by: Simon Deziel (cherry picked from commit a7099ab6203c9b7ba1760eec0618748af9379304) (cherry picked from commit 792e1ac501ad9aa509dcfe3ba1d0505c6d617051) --- snapcraft.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/snapcraft.yaml b/snapcraft.yaml index 19d320f4..ee6c4da6 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -565,9 +565,14 @@ parts: 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%" \ From 53429271276da7026fb6c47b881f9e167b718d05 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Mon, 15 Apr 2024 13:30:49 -0400 Subject: [PATCH 32/46] snapcraft: add `zfs.external` config key Signed-off-by: Simon Deziel (cherry picked from commit f0a2d8f516f03e1f0e6bd515fdd23aff664f82b2) (cherry picked from commit 284f9c3dcf9b2db1b96572d3e1067bc3c7b54b70) --- snapcraft.yaml | 1 + snapcraft/commands/daemon.start | 38 ++++++++++++++++++++++----------- snapcraft/hooks/configure | 2 ++ 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index ee6c4da6..83cf61f9 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -51,6 +51,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) diff --git a/snapcraft/commands/daemon.start b/snapcraft/commands/daemon.start index 8f29c963..4e1a8718 100755 --- a/snapcraft/commands/daemon.start +++ b/snapcraft/commands/daemon.start @@ -204,6 +204,12 @@ if [ "${lvm_external:-"false"}" = "true" ]; then ln -s "${SNAP}/wrappers/run-host" "/run/bin/lvresize" fi +if [ "${zfs_external:-"false"}" = "true" ]; then + ln -s "${SNAP}/wrappers/run-host" "/run/bin/zfs" + ln -s "${SNAP}/wrappers/run-host" "/run/bin/zpool" + ln -s "${SNAP}/wrappers/run-host" "/run/bin/zvol_id" +fi + # Detect presence of sideloaded lxd-agent executable. if [ -x "${SNAP_COMMON}/lxd-agent.debug" ]; then echo "==> WARNING: Using a custom debug lxd-agent binary!" @@ -367,22 +373,28 @@ echo "==> Rotating logs" logrotate -f "${SNAP}/etc/logrotate.conf" -s "/etc/logrotate.status" || true # Setup for ZFS -if [ -e /sys/module/zfs/version ]; then - read -r VERSION < /sys/module/zfs/version -else - VERSION=$(nsenter -t 1 -m modinfo -F version zfs 2>/dev/null || true) -fi +if [ "${zfs_external:-"false"}" = "false" ]; then + if [ -e /sys/module/zfs/version ]; then + read -r VERSION < /sys/module/zfs/version + else + VERSION=$(nsenter -t 1 -m modinfo -F version zfs 2>/dev/null || true) + fi -ZFS_VER="$(echo "${VERSION}" | cut -c 1-3)" + ZFS_VER="$(echo "${VERSION}" | cut -c 1-3)" -if [ -d "${SNAP_CURRENT}/zfs-${ZFS_VER}/bin" ]; then - echo "==> Setting up ZFS (${ZFS_VER})" - export LD_LIBRARY_PATH="${SNAP_CURRENT}/zfs-${ZFS_VER}/lib/:${LD_LIBRARY_PATH}" - export PATH="${SNAP_CURRENT}/zfs-${ZFS_VER}/bin:${PATH}" -elif [ -n "${ZFS_VER}" ]; then - echo "==> Unsupported ZFS version (${ZFS_VER})" + if [ -d "${SNAP_CURRENT}/zfs-${ZFS_VER}/bin" ]; then + echo "==> Setting up ZFS (${ZFS_VER})" + export LD_LIBRARY_PATH="${SNAP_CURRENT}/zfs-${ZFS_VER}/lib/:${LD_LIBRARY_PATH}" + export PATH="${SNAP_CURRENT}/zfs-${ZFS_VER}/bin:${PATH}" + elif [ -n "${ZFS_VER}" ]; then + echo "==> Unsupported ZFS version (${ZFS_VER})" + echo "Consider installing ZFS tools in the host and use zfs.external" + else + echo "==> No ZFS support" + echo "Consider installing ZFS tools in the host and use zfs.external" + fi else - echo "==> No ZFS support" + echo "==> Using ZFS tools from the host system" fi # Escape resource limits diff --git a/snapcraft/hooks/configure b/snapcraft/hooks/configure index 62e074d8..9a3208f5 100755 --- a/snapcraft/hooks/configure +++ b/snapcraft/hooks/configure @@ -58,6 +58,7 @@ openvswitch_builtin=$(get_bool "$(snapctl get openvswitch.builtin)") openvswitch_external=$(get_bool "$(snapctl get openvswitch.external)") ovn_builtin=$(get_bool "$(snapctl get ovn.builtin)") ui_enable=$(get_bool "$(snapctl get ui.enable)") +zfs_external=$(get_bool "$(snapctl get zfs.external)") # Special-handling of daemon.preseed daemon_preseed=$(snapctl get daemon.preseed) @@ -89,6 +90,7 @@ openvswitch_builtin=${openvswitch_builtin:-"false"} openvswitch_external=${openvswitch_external:-"false"} ovn_builtin=${ovn_builtin:-"false"} ui_enable=${ui_enable:-"true"} +zfs_external=${zfs_external:-"false"} EOC # Set socket ownership in case it changed From a111f9cfa35977661a7b90e1a4b2f2103965b8a4 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Mon, 18 Nov 2024 13:29:17 +0000 Subject: [PATCH 33/46] nvidia-container-toolkit: Bump to v1.17.2 Signed-off-by: Thomas Parrott (cherry picked from commit febb44f4d6c70dd9319b63a578225f35704cd282) (cherry picked from commit a3bc4599dfd5c5b43951af7fe9476f66c14afbc4) --- snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 83cf61f9..8f7f5654 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -711,7 +711,7 @@ parts: nvidia-container-toolkit: source: https://github.com/NVIDIA/nvidia-container-toolkit source-depth: 1 - source-commit: a470818ba7d9166be282cd0039dd2fc9b0a34d73 # v1.16.1 + source-commit: fa66e4cd562804509055e44a88f666673e6d27c0 # v1.17.2 source-type: git build-snaps: - go From 37cef691a303047acfde5878f99455062fb598f1 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Mon, 18 Nov 2024 13:29:01 +0000 Subject: [PATCH 34/46] libnvidia-container: Bump to v1.17.2 Signed-off-by: Thomas Parrott (cherry picked from commit 2be63e5683d7cf0e1dbb8bc119d0eec33e834a1e) (cherry picked from commit 33e295bed71ecd9b0ef6afa96f5e0011954f16bc) --- snapcraft.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 8f7f5654..f9f202a2 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -666,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 From 02e02097deec757e0caa41e3083a8fbd05052f4b Mon Sep 17 00:00:00 2001 From: Din Music Date: Thu, 19 Sep 2024 17:08:02 +0000 Subject: [PATCH 35/46] snapcraft: Add .py extension to uefivars Signed-off-by: Din Music (cherry picked from commit bb622127079347f856c407ed184ea309030a0a57) (cherry picked from commit 8b510d26aed776975200c83990047489172100ae) --- snapcraft.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/snapcraft.yaml b/snapcraft.yaml index f9f202a2..4a13d99e 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1466,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* From 6c4d199fd7b6f877a77b6e8670a28bd85e042f78 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Tue, 8 Oct 2024 15:45:01 +0100 Subject: [PATCH 36/46] lxd-stophook: Adds stop hook wrapper for the lxd command This command is intended to replace the `lxd` command in the snap so that existing running containers that are stopping will call this script as part of their stop hooks. This will then "route" the command to the `lxd-user` command that will be statically compiled so that it can connect to the running LXD daemon via the unix socket to indicate the container is stopping, even after refreshing the LXD snap to a different core base snap. Signed-off-by: Thomas Parrott (cherry picked from commit 4d10cbd366cd4e9d0bc05c7f12073f620e20941d) (cherry picked from commit d037e01e7c02dc43738681510e3e5f6362bf8e53) (cherry picked from commit 65fdfd4cfb0ff63c46320cde77b8ec8263259e3e) --- snapcraft.yaml | 1 + snapcraft/wrappers/lxd-stophook | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100755 snapcraft/wrappers/lxd-stophook diff --git a/snapcraft.yaml b/snapcraft.yaml index 4a13d99e..92db4ed7 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1734,6 +1734,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/ diff --git a/snapcraft/wrappers/lxd-stophook b/snapcraft/wrappers/lxd-stophook new file mode 100755 index 00000000..fbb01f41 --- /dev/null +++ b/snapcraft/wrappers/lxd-stophook @@ -0,0 +1,9 @@ +#!/bin/sh +# Use exec so that this script process is replaced. +# This avoids polluting the process tree with this wrapper script. +if [ "$1" = "callhook" ]; then + exec /snap/lxd/current/bin/lxd-user "$@" +fi + +echo "lxd-stophook: Invalid argument: ${1}" >&2 +exit 1 From a7ca1c5a5ce1891664c76d0efb8f526d99170419 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Wed, 9 Oct 2024 14:38:13 +0100 Subject: [PATCH 37/46] lxd: Build lxd server binary into /sbin The PATH inside the snap is configured to prefer /sbin over /bin so the lxd binary will still be called by default. The lxd-stophook-wrapper script which will be placed into `/bin/lxd`. Because containers are configured to call `/snap/lxd/current/bin/lxd callhook` which in turn will be routed to `/snap/lxd/current/bin/lxd-user` by the lxd-stophook-wrapper script, which will then connect to LXD's unix socket to indicate to the server that the container is stopping. Because lxd-user is compiled as a static binary this will work across snap core base changes. Also update LXD_EXEC_PATH env var so that LXD will still directly execute itself when needed, rather than going via the lxd-stophook wrapper script. Signed-off-by: Thomas Parrott (cherry picked from commit 75de117a9ca456a082c6a141ee32178197e9974f) (cherry picked from commit 74e8bc728ba2e4204decb398fe6b053427194424) (cherry picked from commit 2419b143790fc557e6164c09b5e44eaa57a4290d) --- snapcraft.yaml | 16 +++++++++++++--- snapcraft/commands/daemon.start | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 92db4ed7..299a6cd8 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1540,7 +1540,12 @@ 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 @@ -1579,7 +1584,7 @@ parts: usr/share/misc/: share/misc/ var/lib/usbutils/usb.ids: share/misc/ usr/sbin/: bin/ - sbin/: bin/ + sbin/sgdisk: bin/ prime: - bin/dnsmasq - bin/getfattr @@ -1600,9 +1605,9 @@ parts: - 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 @@ -1678,10 +1683,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" \ @@ -1693,6 +1700,9 @@ parts: -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` for binary in "${CRAFT_PRIME}/criu/criu"; do diff --git a/snapcraft/commands/daemon.start b/snapcraft/commands/daemon.start index 4e1a8718..e2afd68a 100755 --- a/snapcraft/commands/daemon.start +++ b/snapcraft/commands/daemon.start @@ -23,7 +23,7 @@ export HOME="/tmp/" export LXD_DIR="${SNAP_COMMON}/lxd/" export LXD_LXC_TEMPLATE_CONFIG="${SNAP_CURRENT}/lxc/config/" export LXD_LXC_HOOK="${SNAP_CURRENT}/lxc/hooks/" -export LXD_EXEC_PATH="${SNAP_CURRENT}/bin/lxd" +export LXD_EXEC_PATH="${SNAP_CURRENT}/sbin/lxd" export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:-}:${SNAP_CURRENT}/lib:${SNAP_CURRENT}/lib/${ARCH}:${SNAP_CURRENT}/lib/${ARCH}/ceph" export PATH="${PATH}:${SNAP_CURRENT}/bin" export LXD_CLUSTER_UPDATE="${SNAP_CURRENT}/commands/refresh" From 2908c5bc50339068bfb4c5eab7aedcc2641edff5 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Mon, 18 Nov 2024 13:28:42 +0000 Subject: [PATCH 38/46] criu: Bump to v4.0 Signed-off-by: Thomas Parrott (cherry picked from commit c8962039c03e94353bd6ccd3afd9c1355714c7e8) (cherry picked from commit 0ff5b62f0ce833e90b27d37d52493cd71fc8c682) --- snapcraft.yaml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 299a6cd8..22866387 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -263,7 +263,7 @@ parts: 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 @@ -290,7 +290,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 "noreply@lists.canonical.com" + git config user.name "LXD snap builder" + + make criu mkdir -p "${CRAFT_PART_INSTALL}/criu/" cp criu/criu "${CRAFT_PART_INSTALL}/criu/" organize: From 1348c75b7b66ec9923ff7aa3c1e7a2f791dfa43a Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Wed, 27 Nov 2024 12:48:49 +0000 Subject: [PATCH 39/46] lxd: Update iw location for core22 Signed-off-by: Thomas Parrott (cherry picked from commit e5a12969feb5a429776da01957f3549a1047e0ae) --- snapcraft.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/snapcraft.yaml b/snapcraft.yaml index 22866387..ad2f7343 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1587,6 +1587,7 @@ parts: usr/share/misc/: share/misc/ var/lib/usbutils/usb.ids: share/misc/ usr/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 From 7168b25f501777191baa146b7848843fcb61c939 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Tue, 26 Nov 2024 09:38:32 +0000 Subject: [PATCH 40/46] snapcraft: Adds title field Signed-off-by: Thomas Parrott (cherry picked from commit c0b8a0dfac8117cba66ef609dae368291cb0f202) (cherry picked from commit 94ad1d96a9b054f8c6f92df7f0e1ba57d9ba004f) --- snapcraft.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/snapcraft.yaml b/snapcraft.yaml index ad2f7343..a983d5c5 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -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. From fbbf0e62d2a7f043f8588999bce79cde6df3ad8d Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 21 Nov 2024 20:31:36 -0500 Subject: [PATCH 41/46] snapcraft: hardcode support for compopt to fix bash completion Reported-by: Kadin Sayani Signed-off-by: Simon Deziel (cherry picked from commit d51c247078dd92254f4b28d84af29abc3410bb2c) --- snapcraft.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index a983d5c5..c8a6a9a9 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1578,10 +1578,12 @@ parts: 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/$(tput cols)/' + # 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_request_comp}" > "${CRAFT_PART_INSTALL}/etc/bash_completion.d/snap.lxd.lxc" + "${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/ From 516a582439f48f6271dd3e7a33c0419ba9402682 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 21 Nov 2024 20:41:14 -0500 Subject: [PATCH 42/46] snapcraft: call `tput cols` only once during completion Signed-off-by: Simon Deziel (cherry picked from commit 55c4560d07d2646e6df67385da730934365d35d2) --- snapcraft.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index c8a6a9a9..14afb562 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1576,8 +1576,8 @@ parts: 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/$(tput cols)/' + # 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) From bd4243c7eac08a93b474512efe3c7e0f7c4924e8 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Wed, 10 Jul 2024 08:30:11 -0400 Subject: [PATCH 43/46] snapcraft: sort primed libs for ceph part Signed-off-by: Simon Deziel (cherry picked from commit 4d61d1ced30114305bec8e9c087d51f12cb14cfa) Signed-off-by: Thomas Parrott --- snapcraft.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 14afb562..6292d7ac 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -254,13 +254,9 @@ parts: - lib/*/librtmp.so* - lib/*/libsasl2.so* - lib/*/libsnappy.so* - - lib/*/libncurses.so* - - lib/*/liblber.so* - - lib/*/libldap.so* - lib/*/libssh.so* - - lib/*/liblmdb.so* - - lib/*/libunwind.so* - lib/*/libtcmalloc.so* + - lib/*/libunwind.so* criu: source: https://github.com/checkpoint-restore/criu From 381a8dafd04e13e7be88d7c68e0bb261916e5282 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Thu, 12 Dec 2024 15:24:13 +0000 Subject: [PATCH 44/46] zfs: Bump to zfs-2.2.6 Signed-off-by: Thomas Parrott --- snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index 6292d7ac..c3969543 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1252,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 From 43662c8b9b9997e6fed88f56c4a5f40009a5a242 Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Thu, 12 Dec 2024 15:24:40 +0000 Subject: [PATCH 45/46] python-uefivars: Bump to v1.2 Signed-off-by: Thomas Parrott --- snapcraft.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index c3969543..a2b81791 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1451,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 From bc2cae4d0f457c57603f1782e3c763bcc4a37eec Mon Sep 17 00:00:00 2001 From: Thomas Parrott Date: Thu, 12 Dec 2024 15:26:52 +0000 Subject: [PATCH 46/46] github: Use stable version of go Signed-off-by: Thomas Parrott --- .github/workflows/builds.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index ba26f27f..a40c5f98 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -21,6 +21,11 @@ jobs: - name: Checkout code uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - name: Install Go + uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 + with: + go-version: 'stable' + - name: Setup Launchpad SSH access env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock @@ -36,11 +41,6 @@ jobs: ssh-keyscan git.launchpad.net >> ~/.ssh/known_hosts ssh-keygen -qlF git.launchpad.net | grep -xF 'git.launchpad.net RSA SHA256:UNOzlP66WpDuEo34Wgs8mewypV0UzqHLsIFoqwe8dYo' - - name: Install Go - uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0 - with: - go-version: 1.22.x - - name: Trigger Launchpad snap build env: SSH_AUTH_SOCK: /tmp/ssh_agent.sock