Skip to content

Commit

Permalink
chore(snap): base migration from core20 to core22
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Schvezov <[email protected]>
  • Loading branch information
sergiusens committed Oct 6, 2023
1 parent 1661d11 commit d6b84cb
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: rockcraft
version: git
base: core20
base: core22
summary: A craft like experience to create ROCKS
description: |
Rockcraft aims to take the same primitives used in Charmcraft and Snapcraft
Expand All @@ -18,12 +18,14 @@ apps:
build-packages:
- libapt-pkg-dev
- libyaml-dev
- python3.8-dev
- python3.10-dev
- pkg-config

parts:
rockcraft-libs:
plugin: nil
build-attributes:
- enable-patchelf
stage-packages:
- apt
- apt-transport-https
Expand All @@ -32,16 +34,16 @@ parts:
- gpg
- gpgv
- libpython3-stdlib
- libpython3.8-stdlib
- libpython3.8-minimal
- libpython3.10-stdlib
- libpython3.10-minimal
- python3-pip
- python3-setuptools
- python3-wheel
- python3-venv
- python3-minimal
- python3-distutils
- python3-pkg-resources
- python3.8-minimal
- python3.10-minimal
- fuse-overlayfs

rockcraft:
Expand All @@ -51,19 +53,20 @@ parts:
- wheel
- pip
- setuptools
requirements:
- requirements-focal.txt
python-requirements:
- requirements-jammy.txt
- requirements.txt
build-attributes:
- enable-patchelf
build-environment:
- "CFLAGS": "$(pkg-config python-3.8 yaml-0.1 --cflags)"
- "CFLAGS": "$(pkg-config python-3.10 yaml-0.1 --cflags)"
after: [rockcraft-libs]
override-build: |
snapcraftctl build
# python3 fixup symlink (snapcraft bug)
ln -sf ../usr/bin/python3.8 $SNAPCRAFT_PART_INSTALL/bin/python3
mkdir -p $SNAPCRAFT_PART_INSTALL/libexec/rockcraft
mv $SNAPCRAFT_PART_INSTALL/bin/craftctl $SNAPCRAFT_PART_INSTALL/libexec/rockcraft/
sed -i -e '1 s|^#!/.*|#!/snap/rockcraft/current/bin/python|' $SNAPCRAFT_PART_INSTALL/libexec/rockcraft/craftctl
mkdir -p $SNAPCRAFT_PART_INSTALL/libexec/rockcraft
mv $SNAPCRAFT_PART_INSTALL/bin/craftctl $SNAPCRAFT_PART_INSTALL/libexec/rockcraft/
sed -i -e '1 s|^#!/.*|#!/snap/rockcraft/current/bin/python|' $SNAPCRAFT_PART_INSTALL/libexec/rockcraft/craftctl
umoci:
plugin: make
Expand All @@ -75,6 +78,8 @@ parts:
make umoci.static
mkdir "$SNAPCRAFT_PART_INSTALL"/bin
install -m755 umoci.static "$SNAPCRAFT_PART_INSTALL"/bin/umoci
build-attributes:
- enable-patchelf
build-packages:
- golang-go
- make
Expand All @@ -92,6 +97,8 @@ parts:
- libassuan0
- libbtrfs0
- libdevmapper1.02.1
build-attributes:
- enable-patchelf
build-snaps:
- go/1.17/stable
build-packages:
Expand All @@ -105,5 +112,7 @@ parts:
plugin: go
source: https://github.com/canonical/chisel.git
source-commit: bd27f8700cd7d2a6b4e0df6b10c3761c83a70485
build-attributes:
- enable-patchelf
build-snaps:
- go/1.18/stable

0 comments on commit d6b84cb

Please sign in to comment.