summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Lass2017-09-12 20:52:34 +0200
committerMichael Lass2017-09-12 20:52:34 +0200
commit8baf11c3753e72639d791a98ce2c67311a9adaf8 (patch)
tree36676a4a6f37c6496e963a422b52b8f28f44547a
parent691a8430acb972d29a47ab91cf6d31b1e157c280 (diff)
downloadaur-8baf11c3753e72639d791a98ce2c67311a9adaf8.tar.gz
Fix build with Linux 4.13
Also remove GCC workaround as the underlying bug was fixed.
-rw-r--r--.SRCINFO4
-rw-r--r--0001-Linux-4.13-use-designated-initializers-where-require.patch65
-rw-r--r--PKGBUILD19
3 files changed, 75 insertions, 13 deletions
diff --git a/.SRCINFO b/.SRCINFO
index bbbf576417e..9fcccf305ac 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,5 +1,5 @@
# Generated by mksrcinfo v8
-# Thu Jul 6 21:35:19 UTC 2017
+# Tue Sep 12 18:33:13 UTC 2017
pkgbase = openafs-modules
pkgdesc = Kernel module for OpenAFS
pkgver = 1.6.21
@@ -16,7 +16,9 @@ pkgbase = openafs-modules
conflicts = openafs<1.6.6-2
options = !emptydirs
source = http://openafs.org/dl/1.6.21/openafs-1.6.21-src.tar.bz2
+ source = 0001-Linux-4.13-use-designated-initializers-where-require.patch
sha256sums = ba9c1f615edd53b64fc271ad369c49a816acedca70cdd090975033469a84118f
+ sha256sums = 84e8686a04e27edfc040fccfa7fd2553eb2cfd1e0f254741b8da0018bdee4b55
pkgname = openafs-modules
diff --git a/0001-Linux-4.13-use-designated-initializers-where-require.patch b/0001-Linux-4.13-use-designated-initializers-where-require.patch
new file mode 100644
index 00000000000..70f882203b0
--- /dev/null
+++ b/0001-Linux-4.13-use-designated-initializers-where-require.patch
@@ -0,0 +1,65 @@
+From cbf9f6f27ce73ca54e54c672e349e66459d11b25 Mon Sep 17 00:00:00 2001
+From: Stephan Wiesand <stephan.wiesand@desy.de>
+Date: Mon, 24 Jul 2017 11:37:54 +0200
+Subject: [PATCH] Linux 4.13: use designated initializers where required
+
+struct path is declared with the "designated_init" attribute,
+and module builds now use -Werror=designated-init. Cope.
+
+And as pointed out by Michael Meffie, struct ctl_table has
+the same requirement now, so use a designated initializer
+for the final element of the sysctl table too.
+
+Reviewed-on: https://gerrit.openafs.org/12663
+Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
+Tested-by: Benjamin Kaduk <kaduk@mit.edu>
+(cherry picked from commit d55b41072ce873210481baa4cae5c7143011869b)
+
+Change-Id: I9797f8b1e16ab095775c53ac03e258affaa4d303
+---
+ src/afs/LINUX/osi_misc.c | 2 +-
+ src/afs/LINUX/osi_sysctl.c | 8 ++++++--
+ 2 files changed, 7 insertions(+), 3 deletions(-)
+
+diff --git a/src/afs/LINUX/osi_misc.c b/src/afs/LINUX/osi_misc.c
+index 32ee5a620..50dd625e9 100644
+--- a/src/afs/LINUX/osi_misc.c
++++ b/src/afs/LINUX/osi_misc.c
+@@ -143,7 +143,7 @@ int osi_abspath(char *aname, char *buf, int buflen,
+ code = osi_lookupname_internal(name, followlink, &mnt, &dp);
+ if (!code) {
+ #if defined(D_PATH_TAKES_STRUCT_PATH)
+- afs_linux_path_t p = { mnt, dp };
++ afs_linux_path_t p = { .mnt = mnt, .dentry = dp };
+ path = d_path(&p, buf, buflen);
+ #else
+ path = d_path(dp, mnt, buf, buflen);
+diff --git a/src/afs/LINUX/osi_sysctl.c b/src/afs/LINUX/osi_sysctl.c
+index 2b1be3b0c..4d56c4eb9 100644
+--- a/src/afs/LINUX/osi_sysctl.c
++++ b/src/afs/LINUX/osi_sysctl.c
+@@ -231,7 +231,9 @@ static struct ctl_table afs_sysctl_table[] = {
+ .mode = 0644,
+ .proc_handler = &proc_dointvec
+ },
+- {0}
++ {
++ .procname = 0
++ }
+ };
+
+ static struct ctl_table fs_sysctl_table[] = {
+@@ -247,7 +249,9 @@ static struct ctl_table fs_sysctl_table[] = {
+ .mode = 0555,
+ .child = afs_sysctl_table
+ },
+- {0}
++ {
++ .procname = 0
++ }
+ };
+
+ int
+--
+2.14.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 68fd5991cd8..ffbff4b12ec 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -15,9 +15,11 @@ depends=('openafs')
makedepends=('linux-headers')
conflicts=('openafs-features-libafs' 'openafs<1.6.6-2')
options=(!emptydirs)
-source=(http://openafs.org/dl/${pkgver}/${_srcname}-${pkgver}-src.tar.bz2)
+source=(http://openafs.org/dl/${pkgver}/${_srcname}-${pkgver}-src.tar.bz2
+ 0001-Linux-4.13-use-designated-initializers-where-require.patch)
install=openafs-modules.install
-sha256sums=('ba9c1f615edd53b64fc271ad369c49a816acedca70cdd090975033469a84118f')
+sha256sums=('ba9c1f615edd53b64fc271ad369c49a816acedca70cdd090975033469a84118f'
+ '84e8686a04e27edfc040fccfa7fd2553eb2cfd1e0f254741b8da0018bdee4b55')
# Heuristic to determine version of installed kernel
# You can modify this if the heuristic fails
@@ -27,6 +29,9 @@ _kernelver=$(cat ${_extramodules}/version)
prepare() {
cd ${srcdir}/${_srcname}-${pkgver}
+ # Fix build with Linux 4.13
+ patch -p1 < ${srcdir}/0001-Linux-4.13-use-designated-initializers-where-require.patch
+
# Only needed when changes to configure were made
# ./regen.sh -q
}
@@ -42,16 +47,6 @@ build() {
--with-linux-kernel-packaging \
--with-linux-kernel-build="/usr/lib/modules/${_kernelver}/build"
- # It seems like gcc is not happy with the code wich tests for the presence
- # of gid in the group_info struct:
- #
- # /var/lib/dkms/openafs/1.6.20.2/build/conftest.dir/conftest.c:43:8: internal compiler error: Segmentation fault
- # struct group_info _test; printk("%x\n", &_test.gid);
- # ^~~~~~~~~~
- #
- # Until this is fixed, we just force the result.
- echo "#define STRUCT_GROUP_INFO_HAS_GID" >> ${srcdir}/${_srcname}-${pkgver}/src/config/afsconfig.h
-
make only_libafs
}