Skip to content

Commit

Permalink
snapcraft: add zfs 2.2 to 5.0-edge for compat with kernel 6.5
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Deziel <[email protected]>
  • Loading branch information
simondeziel committed Jan 5, 2024
1 parent 8b45772 commit 0b17c5e
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,43 @@ parts:
mv "${SNAPCRAFT_PART_INSTALL}.tmp/lib/"*so* "${SNAPCRAFT_PART_INSTALL}/zfs-2.1/lib/"
rm -Rf "${SNAPCRAFT_PART_INSTALL}.tmp"
zfs-2-2:
source: https://github.com/openzfs/zfs
source-type: git
source-tag: zfs-2.2.2
source-depth: 1
plugin: autotools
autotools-configure-parameters:
- --prefix=/
- --with-config=user
build-packages:
- libblkid-dev
- libssl-dev
- uuid-dev
- zlib1g-dev
override-pull: |-
[ "$(uname -m)" != "x86_64" ] && \
[ "$(uname -m)" != "aarch64" ] && \
[ "$(uname -m)" != "s390x" ] && \
[ "$(uname -m)" != "ppc64le" ] && exit 0
craftctl default
override-build: |-
[ "$(uname -m)" != "x86_64" ] && \
[ "$(uname -m)" != "aarch64" ] && \
[ "$(uname -m)" != "s390x" ] && \
[ "$(uname -m)" != "ppc64le" ] && exit 0
craftctl default
set -ex
ZFS_VER="2.2"
mv "${SNAPCRAFT_PART_INSTALL}" "${SNAPCRAFT_PART_INSTALL}.tmp"
mkdir -p "${SNAPCRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin" "${SNAPCRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib"
mv "${SNAPCRAFT_PART_INSTALL}.tmp/sbin/zfs" "${SNAPCRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin/"
mv "${SNAPCRAFT_PART_INSTALL}.tmp/sbin/zpool" "${SNAPCRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin/"
mv "${SNAPCRAFT_PART_INSTALL}.tmp/lib/udev/zvol_id" "${SNAPCRAFT_PART_INSTALL}/zfs-${ZFS_VER}/bin/"
mv "${SNAPCRAFT_PART_INSTALL}.tmp/lib/"*so* "${SNAPCRAFT_PART_INSTALL}/zfs-${ZFS_VER}/lib/"
rm -Rf "${SNAPCRAFT_PART_INSTALL}.tmp"
zstd:
build-attributes: [core22-step-dependencies]
Expand Down Expand Up @@ -1516,6 +1553,7 @@ parts:
- zfs-0-8
- zfs-2-0
- zfs-2-1
- zfs-2-2
- zstd
- lxc
- lxcfs
Expand Down

0 comments on commit 0b17c5e

Please sign in to comment.