Skip to content

Commit

Permalink
backport a 6.8 compat patch
Browse files Browse the repository at this point in the history
See openzfs/zfs#15931 for details
  • Loading branch information
bjin committed Mar 20, 2024
1 parent d67475e commit 3dfc415
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 7 deletions.
8 changes: 5 additions & 3 deletions .SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = zfs-dkms-staging-git
pkgdesc = Kernel modules for the Zettabyte File System (release staging branch).
pkgver = 2.2.3.r0.gc883088df8
pkgrel = 1
pkgrel = 2
url = https://zfsonlinux.org/
arch = any
license = CDDL-1.0
Expand All @@ -10,12 +10,14 @@ pkgbase = zfs-dkms-staging-git
provides = SPL-MODULE
provides = zfs-dkms
conflicts = zfs-dkms
source = zfs::git+https://github.com/openzfs/zfs.git#tag=zfs-2.2.3
source = zfs::git+https://github.com/openzfs/zfs.git#branch=zfs-2.2.4-staging
source = 0001-only-build-the-module-in-dkms.conf.patch
source = linux-6.8-compat-splice-cfr.patch::https://github.com/openzfs/zfs/commit/a24f6e17c8cf75b5f551eb43019d41747c08891f.patch
sha256sums = SKIP
sha256sums = 8d5c31f883a906ab42776dcda79b6c89f904d8f356ade0dab5491578a6af55a5
sha256sums = 0bedcf6cc7800d073aca4cd3da5f94e97be11b166afa3453226c137cc7c8029c

pkgname = zfs-dkms-staging-git
depends = zfs-utils>=2.2.3
depends = zfs-utils<=2.2.3
depends = zfs-utils<=2.2.4
depends = dkms
22 changes: 18 additions & 4 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi

pkgname=${_pkgname}-dkms-staging-git
pkgver=2.2.3.r0.gc883088df8
pkgrel=1
pkgrel=2
pkgdesc="Kernel modules for the Zettabyte File System (release staging branch)."
arch=('any')
url="https://zfsonlinux.org/"
Expand All @@ -27,16 +27,30 @@ provides=("ZFS-MODULE" "SPL-MODULE" "zfs-dkms")
conflicts=("zfs-dkms")
makedepends=("git")
source=("${_pkgname}::git+${_git_repo}#${_git_branch}"
"0001-only-build-the-module-in-dkms.conf.patch")
"0001-only-build-the-module-in-dkms.conf.patch"
"linux-6.8-compat-splice-cfr.patch::${_git_repo%.git}/commit/a24f6e17c8cf75b5f551eb43019d41747c08891f.patch")
sha256sums=('SKIP'
'8d5c31f883a906ab42776dcda79b6c89f904d8f356ade0dab5491578a6af55a5')
'8d5c31f883a906ab42776dcda79b6c89f904d8f356ade0dab5491578a6af55a5'
'0bedcf6cc7800d073aca4cd3da5f94e97be11b166afa3453226c137cc7c8029c')

prepare() {
cd "${srcdir}/${_pkgname}"

msg2 "Staging branch set to ${_git_branch}"

patch -p1 -i ../0001-only-build-the-module-in-dkms.conf.patch
local -a patches
patches=($(printf '%s\n' "${source[@]}" | grep -F '.patch'))
patches=("${patches[@]%%::*}")
patches=("${patches[@]##*/}")

for patch in "${patches[@]}"; do
if patch -p1 -R -i "../$patch" --dry-run -sf >/dev/null; then
msg2 "Ignoring patch $patch..."
else
msg2 "Applying patch $patch..."
patch -p1 -N -i "../$patch"
fi
done

# remove unneeded sections from module build
sed -ri "/AC_CONFIG_FILES/,/]\)/{
Expand Down

0 comments on commit 3dfc415

Please sign in to comment.