Skip to content

Commit

Permalink
feat: add 'zfs' package
Browse files Browse the repository at this point in the history
ZFS is a powerful and flexible file system that ensures data integrity and offers features like snapshots and storage pooling.

Signed-off-by: Andrei Kvapil <kvapss@gmail.com>
Signed-off-by: Noel Georgi <git@frezbo.dev>
  • Loading branch information
kvaps authored and frezbo committed Jul 24, 2023
1 parent d0eaedc commit 84cdfb6
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ TARGETS += \
drbd-pkg \
gasket-driver-pkg \
nvidia-open-gpu-kernel-modules-pkg \
zfs-pkg \

# Temporarily disabled until mellanox builds with Linux 6.1
# mellanox-ofed-pkg \
Expand Down
5 changes: 5 additions & 0 deletions Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,10 @@ vars:
xfsprogs_version: 5.18.0
xfsprogs_sha256: 1e8d8801bdec8cd4cad360ce3bbd12c35a97f2bc8f7c8c9580d1903b0e8cc35b
xfsprogs_sha512: 47d035a33367edae7357e34c70bdb0fe9219231153fb4c4f418ed1462d137dd77338c12a199eb71cd70e88903e5fc11e1e4fb595c622183786e87346e2f65739

# renovate: datasource=github-tags extractVersion=^zfs-(?<version>.*)$ depName=openzfs/zfs
zfs_version: 2.1.12
zfs_sha256: 64daa26aed3e12c931f6f4413d7527c4ebdb8da35416b356152b5f9fdd4c6e6d
zfs_sha512: f48493a21883e441cda705fb085353bed033f1620a1d0f93069c345c76cf2c0759a2e6f7a80c47c9398e9878abfe1d90d931fe5ceaf2588770a71491a434631e
labels:
org.opencontainers.image.source: https://github.com/siderolabs/pkgs
38 changes: 38 additions & 0 deletions zfs/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: zfs-pkg
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: kernel-build
steps:
- sources:
- url: https://github.com/openzfs/zfs/releases/download/zfs-{{ .zfs_version }}/zfs-{{ .zfs_version }}.tar.gz
destination: zfs.tar.gz
sha256: "{{ .zfs_sha256 }}"
sha512: "{{ .zfs_sha512 }}"
env:
ARCH: {{ if eq .ARCH "aarch64"}}arm64{{ else if eq .ARCH "x86_64" }}x86_64{{ else }}unsupported{{ end }}
prepare:
- |
tar -xzf zfs.tar.gz --strip-components=1
./autogen.sh
./configure --with-config=kernel --with-linux=/src
build:
- |
make -j $(nproc)
install:
- |
mkdir -p /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/
cp /src/modules.order /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/
cp /src/modules.builtin /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/
cp /src/modules.builtin.modinfo /rootfs/lib/modules/$(cat /src/include/config/kernel.release)/
for i in $(find $(pwd)/module/ -mindepth 1 -maxdepth 1 -type d); do
make -j $(nproc) -C /src M="$i" modules_install DESTDIR=/rootfs INSTALL_MOD_PATH=/rootfs INSTALL_MOD_DIR=extras INSTALL_MOD_STRIP=1 CONFIG_MODULE_SIG_ALL=y
done
test:
- |
# https://www.kernel.org/doc/html/v4.15/admin-guide/module-signing.html#signed-modules-and-stripping
find /rootfs/lib/modules -name '*.ko' -exec grep -FL '~Module signature appended~' {} \+
finalize:
- from: /rootfs
to: /

0 comments on commit 84cdfb6

Please sign in to comment.