Description
Hello !
The current snap package for Task is using the core20 snap base, which is not really needed and is getting a bit old (even though still supported).
Since Task is statically linked, we can simply use the bare base image, which is not dependent on any userspace (this is equivalent to the scratch base in the Docker world) and won't require an update when the base will be deprecated.
Here are the small modifications to bring to the snapcraft definition:
11c11,12
< base: core20
---
> base: bare
> build-base: core24 # we still need a base for building
15,18c16,22
< architectures:
< - build-on: amd64
< - build-on: armhf
< - build-on: arm64
---
# note: 'platform' dict must be used instead of 'architectures' for bare and core24+ base
> platforms:
> amd64:
> build-on: [amd64]
> armhf:
> build-on: [armhf]
> arm64:
> build-on: [arm64]
Reference: https://documentation.ubuntu.com/snapcraft/stable/reference/bases/#base-snap-reference
I rebuilt the snap package locally and it works as expected since the snap is using classic confinement. Something similar has been done in the chezmoi project, I think it makes sense for this kind of binary: twpayne/chezmoi#4672
I can open a PR on the snap repo with the changes.
WDYT ?
Florian
Description
Hello !
The current snap package for Task is using the
core20snap base, which is not really needed and is getting a bit old (even though still supported).Since Task is statically linked, we can simply use the
barebase image, which is not dependent on any userspace (this is equivalent to thescratchbase in the Docker world) and won't require an update when the base will be deprecated.Here are the small modifications to bring to the snapcraft definition:
Reference: https://documentation.ubuntu.com/snapcraft/stable/reference/bases/#base-snap-reference
I rebuilt the snap package locally and it works as expected since the snap is using classic confinement. Something similar has been done in the
chezmoiproject, I think it makes sense for this kind of binary: twpayne/chezmoi#4672I can open a PR on the snap repo with the changes.
WDYT ?
Florian