aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArif Ali <arif.ali@canonical.com>2022-09-08 14:21:08 +0100
committerJake Hunsaker <jhunsake@redhat.com>2022-09-27 15:05:19 -0400
commit49ef27db7cfbeb161997d851614549a52677753b (patch)
tree5865670fe8437a0a55aaebfcf0b72b1bad4f1c7d
parent483ad1b8f8e8222118d2769529647609fd403166 (diff)
downloadsos-49ef27db7cfbeb161997d851614549a52677753b.tar.gz
[snapcraft] Update base to core22
core20 has python3-magic 0.4.15, and hence the binary detection will not work by default. Moving to core22 goes to 0.4.24-2 which would mean this would work nevertheless. This also means migrating to using craftctl instead of snapcraftctl. Snap build now needs to be done on 22.04, as it core22, so chaging the snap build for cirrus to the corresponding image. The version cannot be set now if adopt-info is not there, so removing this for the cirrus tests. Signed-off-by: Arif Ali <arif.ali@canonical.com>
-rw-r--r--.cirrus.yml4
-rw-r--r--snap/snapcraft.yaml6
2 files changed, 5 insertions, 5 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 7ca462fd..ac26703d 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -117,13 +117,13 @@ snap_build_task:
name: "snap Build From Checkout"
gce_instance:
image_project: "${UBUNTU_PROJECT}"
- image_name: "${UBUNTU_PRIOR_IMAGE_NAME}"
+ image_name: "${UBUNTU_IMAGE_NAME}"
type: e2-medium
setup_script: |
apt update
apt -y install snapd
systemctl start snapd
- sed -i 's/adopt-info.*/version: test/g' snap/snapcraft.yaml
+ sed -i -e 's/adopt-info.*/version: test/g' -e '/set version/d' snap/snapcraft.yaml
snap install snapcraft --classic
main_script: |
snapcraft --destructive-mode
diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml
index 92b7949e..8af14486 100644
--- a/snap/snapcraft.yaml
+++ b/snap/snapcraft.yaml
@@ -5,7 +5,7 @@ description: |
primarily aimed at Linux distributions and other UNIX-like operating
systems.
grade: stable
-base: core20
+base: core22
confinement: classic
adopt-info: sos
@@ -14,8 +14,8 @@ parts:
plugin: python
source: .
override-pull: |
- snapcraftctl pull
- snapcraftctl set-version $(git describe --tags --always)
+ craftctl default
+ craftctl set version="$(git describe --tags --always)"
build-packages:
- git
- python3