diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 6e1e0f881..cb26b6853 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -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 @@ -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 @@ -32,8 +34,8 @@ parts: - gpg - gpgv - libpython3-stdlib - - libpython3.8-stdlib - - libpython3.8-minimal + - libpython3.10-stdlib + - libpython3.10-minimal - python3-pip - python3-setuptools - python3-wheel @@ -41,7 +43,7 @@ parts: - python3-minimal - python3-distutils - python3-pkg-resources - - python3.8-minimal + - python3.10-minimal - fuse-overlayfs rockcraft: @@ -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 @@ -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 @@ -92,6 +97,8 @@ parts: - libassuan0 - libbtrfs0 - libdevmapper1.02.1 + build-attributes: + - enable-patchelf build-snaps: - go/1.17/stable build-packages: @@ -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