summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO10
-rw-r--r--0001-Temporary-fix-for-compilation-with-GCC-10.patch4
-rw-r--r--0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch4
-rw-r--r--0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch4
-rw-r--r--0004-LINUX-5.8-use-lru_cache_add.patch4
-rw-r--r--0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch169
-rw-r--r--PKGBUILD15
7 files changed, 193 insertions, 17 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c01041962428..d6b0d207a342 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -19,11 +19,13 @@ pkgbase = openafs-modules
source = 0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch
source = 0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch
source = 0004-LINUX-5.8-use-lru_cache_add.patch
+ source = 0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch
sha256sums = 8b4e9d3180f1ecd752753da17ac630df04eb7007c90a921a5f6403c0339d2945
- sha256sums = 3d0bf6960ef1eaab87492e93ea36c3b1a6b1e12877863abd7b64ad78e4637bce
- sha256sums = 5c02f2c152720bc790dfdf5f99b083b986acd34074da917efa9f39265eda7483
- sha256sums = 4373b0509c1eb7f4aec4cb11a231571f1015cdf3bef6e059c0df9e493e178e83
- sha256sums = 955f710fff9f535406800406bf128deccc209511b0aa9b6aacb6f3b4417a6a4d
+ sha256sums = 604fc461acf66dc833baa434023320ab656b17acdfabcd8153759af5578ddaf8
+ sha256sums = fa4a34c095429a84a68251270323dfa7159ee3532c2fe2dd8d49da449d275e89
+ sha256sums = 0921338953f2359971a1431c3fc2d2a5f4d3ff050acce160e5cf21023eca9d0f
+ sha256sums = 938fcde2ab0637164cc893bf21fec0f495495bea5690f00a0cc0bfd6b8c07f66
+ sha256sums = 9057a23e755c4b218f67c71d481500ff32598f3f6de6a2f487d5b22412130c78
pkgname = openafs-modules
diff --git a/0001-Temporary-fix-for-compilation-with-GCC-10.patch b/0001-Temporary-fix-for-compilation-with-GCC-10.patch
index 9a9ce50e1cf1..f7aab0f3aa7b 100644
--- a/0001-Temporary-fix-for-compilation-with-GCC-10.patch
+++ b/0001-Temporary-fix-for-compilation-with-GCC-10.patch
@@ -1,7 +1,7 @@
From 81c4f50914bd0f696a0a6c356982e97594bd2c77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20La=C3=9F?= <lass@mail.uni-paderborn.de>
Date: Tue, 19 May 2020 16:17:01 +0200
-Subject: [PATCH 1/4] Temporary fix for compilation with GCC 10
+Subject: [PATCH 1/5] Temporary fix for compilation with GCC 10
See:
* https://bugs.gentoo.org/706738
@@ -29,5 +29,5 @@ index 5f0d73fc2..7cf761757 100644
else
case $AFS_SYSNAME in
--
-2.27.0
+2.28.0
diff --git a/0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch b/0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch
index 07bd4a72b593..997983465aa4 100644
--- a/0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch
+++ b/0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch
@@ -1,7 +1,7 @@
From 858ce410250bae8c5043b8277aa3941dd528d577 Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Fri, 3 Jul 2020 10:33:51 -0600
-Subject: [PATCH 2/4] LINUX 5.8: Replace kernel_setsockopt with new funcs
+Subject: [PATCH 2/5] LINUX 5.8: Replace kernel_setsockopt with new funcs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -155,5 +155,5 @@ index 9fbb563f3..50607c8f5 100644
return (osi_socket *)sockp;
}
--
-2.27.0
+2.28.0
diff --git a/0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch b/0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch
index 9bed0a8166a4..601866833c0e 100644
--- a/0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch
+++ b/0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch
@@ -1,7 +1,7 @@
From c8d51224d54275ac34f9bb4d817842e73e777b14 Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Fri, 3 Jul 2020 10:34:42 -0600
-Subject: [PATCH 3/4] LINUX 5.8: do not set name field in backing_dev_info
+Subject: [PATCH 3/5] LINUX 5.8: do not set name field in backing_dev_info
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -45,5 +45,5 @@ index 8bbb5f225..ca1d5c83b 100644
#else
/* used for inodes backing_dev_info field, also */
--
-2.27.0
+2.28.0
diff --git a/0004-LINUX-5.8-use-lru_cache_add.patch b/0004-LINUX-5.8-use-lru_cache_add.patch
index b4a49c6cbb88..2fb2b4924a34 100644
--- a/0004-LINUX-5.8-use-lru_cache_add.patch
+++ b/0004-LINUX-5.8-use-lru_cache_add.patch
@@ -1,7 +1,7 @@
From db3408925dd69a70c14249a97d178d2762329f15 Mon Sep 17 00:00:00 2001
From: Cheyenne Wills <cwills@sinenomine.net>
Date: Fri, 3 Jul 2020 10:35:06 -0600
-Subject: [PATCH 4/4] LINUX 5.8: use lru_cache_add
+Subject: [PATCH 4/5] LINUX 5.8: use lru_cache_add
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -104,5 +104,5 @@ index 78ff48294..11d071806 100644
dnl e.g. ip_sock_set_mtu_discover, ip_sock_set_recverr
AC_CHECK_LINUX_FUNC([ip_sock_set],
--
-2.27.0
+2.28.0
diff --git a/0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch b/0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch
new file mode 100644
index 000000000000..476ca39b7ff5
--- /dev/null
+++ b/0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch
@@ -0,0 +1,169 @@
+From e7f32efde6b4cf8c4a69768826c9fa2509bb98a2 Mon Sep 17 00:00:00 2001
+From: Cheyenne Wills <cwills@sinenomine.net>
+Date: Fri, 21 Aug 2020 10:37:51 -0600
+Subject: [PATCH 5/5] LINUX 5.9: Remove HAVE_UNLOCKED_IOCTL/COMPAT_IOCTL
+
+Linux-5.9-rc1 commit 'fs: remove the HAVE_UNLOCKED_IOCTL and
+HAVE_COMPAT_IOCTL defines' (4e24566a) removed the two referenced macros
+from the kernel.
+
+The support for unlocked_ioctl and compat_ioctl were introduced in
+Linux 2.6.11.
+
+Remove references to HAVE_UNLOCKED_IOCTL and HAVE_COMPAT_IOCTL using
+the assumption that they were always defined.
+
+Notes:
+
+With this change, building against kernels 2.6.10 and older will fail.
+RHEL4 (EOL in March 2017) used a 2.6.9 kernel. RHEL5 uses a 2.6.18
+kernel.
+
+In linux-2.6.33-rc1 the commit messages for "staging: comedi:
+Remove check for HAVE_UNLOCKED_IOCTL" (00a1855c) and "Staging: comedi:
+remove check for HAVE_COMPAT_IOCTL" (5d7ae225) both state that all new
+kernels have support for unlocked_ioctl/compat_ioctl so the checks can
+be removed along with removing support for older kernels.
+
+Reviewed-on: https://gerrit.openafs.org/14300
+Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
+Tested-by: Benjamin Kaduk <kaduk@mit.edu>
+(cherry picked from commit 13a49aaf0d5c43bce08135edaabb65587e1a8031)
+
+Change-Id: I6dc5ae5b32031641f4a021a31630390a91d834fe
+Reviewed-on: https://gerrit.openafs.org/14315
+Tested-by: BuildBot <buildbot@rampaginggeek.com>
+Reviewed-by: Andrew Deason <adeason@sinenomine.net>
+Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
+---
+ src/afs/LINUX/osi_ioctl.c | 25 ++-----------------------
+ src/afs/LINUX/osi_vnodeops.c | 14 --------------
+ 2 files changed, 2 insertions(+), 37 deletions(-)
+
+diff --git a/src/afs/LINUX/osi_ioctl.c b/src/afs/LINUX/osi_ioctl.c
+index 1646a1518..9ba076a1b 100644
+--- a/src/afs/LINUX/osi_ioctl.c
++++ b/src/afs/LINUX/osi_ioctl.c
+@@ -25,10 +25,6 @@
+ #include <asm/ia32_unistd.h>
+ #endif
+
+-#if defined(AFS_SPARC64_LINUX26_ENV) && defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
+-#include <linux/ioctl32.h>
+-#endif
+-
+ #include <linux/slab.h>
+ #include <linux/init.h>
+ #include <linux/sched.h>
+@@ -37,9 +33,6 @@
+ #include "osi_compat.h"
+
+ extern struct proc_dir_entry *openafs_procfs;
+-#if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
+-static int ioctl32_done;
+-#endif
+
+ extern asmlinkage long
+ afs_syscall(long syscall, long parm1, long parm2, long parm3, long parm4);
+@@ -85,12 +78,11 @@ afs_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+ }
+ }
+
+-#if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
+ static long afs_unlocked_ioctl(struct file *file, unsigned int cmd,
+ unsigned long arg) {
+ return afs_ioctl(FILE_INODE(file), file, cmd, arg);
+ }
+-#endif
++
+ #if defined(HAVE_LINUX_STRUCT_PROC_OPS)
+ static struct proc_ops afs_syscall_ops = {
+ .proc_ioctl = afs_unlocked_ioctl,
+@@ -100,16 +92,11 @@ static struct proc_ops afs_syscall_ops = {
+ };
+ #else
+ static struct file_operations afs_syscall_ops = {
+-# ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = afs_unlocked_ioctl,
+-# else
+- .ioctl = afs_ioctl,
+-# endif
+-# ifdef HAVE_COMPAT_IOCTL
+ .compat_ioctl = afs_unlocked_ioctl,
+-# endif
+ };
+ #endif /* HAVE_LINUX_STRUCT_PROC_OPS */
++
+ void
+ osi_ioctl_init(void)
+ {
+@@ -121,18 +108,10 @@ osi_ioctl_init(void)
+ entry->owner = THIS_MODULE;
+ #endif
+
+-#if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
+- if (register_ioctl32_conversion(VIOC_SYSCALL32, NULL) == 0)
+- ioctl32_done = 1;
+-#endif
+ }
+
+ void
+ osi_ioctl_clean(void)
+ {
+ remove_proc_entry(PROC_SYSCALL_NAME, openafs_procfs);
+-#if defined(NEED_IOCTL32) && !defined(HAVE_COMPAT_IOCTL)
+- if (ioctl32_done)
+- unregister_ioctl32_conversion(VIOC_SYSCALL32);
+-#endif
+ }
+diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
+index 36a4f685e..ba4f1e6af 100644
+--- a/src/afs/LINUX/osi_vnodeops.c
++++ b/src/afs/LINUX/osi_vnodeops.c
+@@ -589,13 +589,11 @@ out1:
+ extern int afs_xioctl(struct inode *ip, struct file *fp, unsigned int com,
+ unsigned long arg);
+
+-#if defined(HAVE_UNLOCKED_IOCTL) || defined(HAVE_COMPAT_IOCTL)
+ static long afs_unlocked_xioctl(struct file *fp, unsigned int com,
+ unsigned long arg) {
+ return afs_xioctl(FILE_INODE(fp), fp, com, arg);
+
+ }
+-#endif
+
+
+ static int
+@@ -891,14 +889,8 @@ struct file_operations afs_dir_fops = {
+ #else
+ .readdir = afs_linux_readdir,
+ #endif
+-#ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = afs_unlocked_xioctl,
+-#else
+- .ioctl = afs_xioctl,
+-#endif
+-#ifdef HAVE_COMPAT_IOCTL
+ .compat_ioctl = afs_unlocked_xioctl,
+-#endif
+ .open = afs_linux_open,
+ .release = afs_linux_release,
+ .llseek = default_llseek,
+@@ -926,14 +918,8 @@ struct file_operations afs_file_fops = {
+ .read = afs_linux_read,
+ .write = afs_linux_write,
+ #endif
+-#ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = afs_unlocked_xioctl,
+-#else
+- .ioctl = afs_xioctl,
+-#endif
+-#ifdef HAVE_COMPAT_IOCTL
+ .compat_ioctl = afs_unlocked_xioctl,
+-#endif
+ .mmap = afs_linux_mmap,
+ .open = afs_linux_open,
+ .flush = afs_linux_flush,
+--
+2.28.0
+
diff --git a/PKGBUILD b/PKGBUILD
index c0562c725557..7fb7811c9d01 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -19,13 +19,15 @@ source=("http://openafs.org/dl/openafs/${pkgver}/${_srcname}-${pkgver}-src.tar.b
0001-Temporary-fix-for-compilation-with-GCC-10.patch
0002-LINUX-5.8-Replace-kernel_setsockopt-with-new-funcs.patch
0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch
- 0004-LINUX-5.8-use-lru_cache_add.patch)
+ 0004-LINUX-5.8-use-lru_cache_add.patch
+ 0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch)
install=openafs-modules.install
sha256sums=('8b4e9d3180f1ecd752753da17ac630df04eb7007c90a921a5f6403c0339d2945'
- '3d0bf6960ef1eaab87492e93ea36c3b1a6b1e12877863abd7b64ad78e4637bce'
- '5c02f2c152720bc790dfdf5f99b083b986acd34074da917efa9f39265eda7483'
- '4373b0509c1eb7f4aec4cb11a231571f1015cdf3bef6e059c0df9e493e178e83'
- '955f710fff9f535406800406bf128deccc209511b0aa9b6aacb6f3b4417a6a4d')
+ '604fc461acf66dc833baa434023320ab656b17acdfabcd8153759af5578ddaf8'
+ 'fa4a34c095429a84a68251270323dfa7159ee3532c2fe2dd8d49da449d275e89'
+ '0921338953f2359971a1431c3fc2d2a5f4d3ff050acce160e5cf21023eca9d0f'
+ '938fcde2ab0637164cc893bf21fec0f495495bea5690f00a0cc0bfd6b8c07f66'
+ '9057a23e755c4b218f67c71d481500ff32598f3f6de6a2f487d5b22412130c78')
# Heuristic to determine version of installed kernel
# You can modify this if the heuristic fails
@@ -43,6 +45,9 @@ prepare() {
patch -p1 < "${srcdir}"/0003-LINUX-5.8-do-not-set-name-field-in-backing_dev_info.patch
patch -p1 < "${srcdir}"/0004-LINUX-5.8-use-lru_cache_add.patch
+ # Compatibility with Linux 5.9
+ patch -p1 < "${srcdir}"/0005-LINUX-5.9-Remove-HAVE_UNLOCKED_IOCTL-COMPAT_IOCTL.patch
+
# Only needed when changes to configure were made
./regen.sh -q
}