Add Linux 5.1 Patches

pull/331/head
Jan Houben 6 years ago
parent 6fe93400e3
commit e993cfcaf5
No known key found for this signature in database
GPG Key ID: 6866AADB974DD983
  1. 2
      src/kernels/dkms.sh
  2. 14
      src/spl-dkms/PKGBUILD.sh
  3. 18
      src/spl-dkms/linux-5.1-compat-drop-ULLONG_MAX-and-LLONG_MAX-definitions.patch
  4. 12
      src/spl-dkms/linux-5.1-compat-get-ds-removed.patch
  5. 14
      src/spl/PKGBUILD.sh
  6. 18
      src/spl/linux-5.1-compat-drop-ULLONG_MAX-and-LLONG_MAX-definitions.patch
  7. 12
      src/spl/linux-5.1-compat-get-ds-removed.patch

@ -3,7 +3,7 @@ mode_name="dkms"
mode_desc="Select and use the dkms packages"
# version
pkgrel="1"
pkgrel="2"
# Version for GIT packages
pkgrel_git="1"

@ -9,8 +9,12 @@ pkgrel=${spl_pkgrel}
makedepends=(${spl_makedepends})
arch=("x86_64")
url="http://zfsonlinux.org/"
source=("${spl_src_target}")
sha256sums=("${spl_src_hash}")
source=("${spl_src_target}"
"linux-5.1-compat-drop-ULLONG_MAX-and-LLONG_MAX-definitions.patch"
"linux-5.1-compat-get-ds-removed.patch")
sha256sums=("${spl_src_hash}"
"f110bd86a81602e531dda943cf0d066f09f3d58c297159ea285957ce28f0f0c1"
"d4a6c27aea521cf5635c1b9f679633c068b024606f634d5e6bf1a7b97db486c4")
license=("GPL")
depends=("dkms")
provides=("spl" "spl-headers")
@ -18,6 +22,12 @@ groups=("${archzfs_package_group}")
conflicts=("spl" "spl-headers")
${spl_replaces}
prepare() {
cd "${spl_workdir}"
patch -Np1 -i \${srcdir}/linux-5.1-compat-drop-ULLONG_MAX-and-LLONG_MAX-definitions.patch
patch -Np1 -i \${srcdir}/linux-5.1-compat-get-ds-removed.patch
}
build() {
cd "${spl_workdir}"
./autogen.sh

@ -0,0 +1,18 @@
diff --unified --recursive --text a/include/sys/types.h b/include/sys/types.h
--- a/include/sys/types.h 2019-02-22 12:55:48.000000000 -0500
+++ b/include/sys/types.h 2019-05-15 18:32:17.357535303 -0400
@@ -28,14 +28,6 @@
#include <linux/types.h>
#include <sys/sysmacros.h>
-#ifndef ULLONG_MAX
-#define ULLONG_MAX (~0ULL)
-#endif
-
-#ifndef LLONG_MAX
-#define LLONG_MAX ((long long)(~0ULL>>1))
-#endif
-
typedef enum { B_FALSE = 0, B_TRUE = 1 } boolean_t;
typedef unsigned long intptr_t;
typedef unsigned long ulong_t;

@ -0,0 +1,12 @@
diff --unified --recursive --text a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c
--- a/module/spl/spl-vnode.c 2019-02-22 12:59:44.000000000 -0500
+++ b/module/spl/spl-vnode.c 2019-05-15 18:48:43.392458053 -0400
@@ -608,7 +608,7 @@
* size to ensure strncpy_from_user() does not fail with -EFAULT.
*/
saved_fs = get_fs();
- set_fs(get_ds());
+ set_fs(KERNEL_DS);
rc = user_path_dir(filename, &path);
if (rc)

@ -14,11 +14,21 @@ pkgrel=${spl_pkgrel}
makedepends=(${linux_headers_depends} ${spl_makedepends})
arch=("x86_64")
url="http://zfsonlinux.org/"
source=("${spl_src_target}")
sha256sums=("${spl_src_hash}")
source=("${spl_src_target}"
"linux-5.1-compat-drop-ULLONG_MAX-and-LLONG_MAX-definitions.patch"
"linux-5.1-compat-get-ds-removed.patch")
sha256sums=("${spl_src_hash}"
"f110bd86a81602e531dda943cf0d066f09f3d58c297159ea285957ce28f0f0c1"
"d4a6c27aea521cf5635c1b9f679633c068b024606f634d5e6bf1a7b97db486c4")
license=("GPL")
depends=("kmod" ${linux_depends})
prepare() {
cd "${spl_workdir}"
patch -Np1 -i \${srcdir}/linux-5.1-compat-drop-ULLONG_MAX-and-LLONG_MAX-definitions.patch
patch -Np1 -i \${srcdir}/linux-5.1-compat-get-ds-removed.patch
}
build() {
cd "${spl_workdir}"
./autogen.sh

@ -0,0 +1,18 @@
diff --unified --recursive --text a/include/sys/types.h b/include/sys/types.h
--- a/include/sys/types.h 2019-02-22 12:55:48.000000000 -0500
+++ b/include/sys/types.h 2019-05-15 18:32:17.357535303 -0400
@@ -28,14 +28,6 @@
#include <linux/types.h>
#include <sys/sysmacros.h>
-#ifndef ULLONG_MAX
-#define ULLONG_MAX (~0ULL)
-#endif
-
-#ifndef LLONG_MAX
-#define LLONG_MAX ((long long)(~0ULL>>1))
-#endif
-
typedef enum { B_FALSE = 0, B_TRUE = 1 } boolean_t;
typedef unsigned long intptr_t;
typedef unsigned long ulong_t;

@ -0,0 +1,12 @@
diff --unified --recursive --text a/module/spl/spl-vnode.c b/module/spl/spl-vnode.c
--- a/module/spl/spl-vnode.c 2019-02-22 12:59:44.000000000 -0500
+++ b/module/spl/spl-vnode.c 2019-05-15 18:48:43.392458053 -0400
@@ -608,7 +608,7 @@
* size to ensure strncpy_from_user() does not fail with -EFAULT.
*/
saved_fs = get_fs();
- set_fs(get_ds());
+ set_fs(KERNEL_DS);
rc = user_path_dir(filename, &path);
if (rc)
Loading…
Cancel
Save