diff options
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | 0001-LINUX-Avoid-building-rand-fortuna-kernel.o.patch | 261 | ||||
-rw-r--r-- | 0002-LINUX-5.6-define-time_t-and-use-timespec-timespec64.patch | 162 | ||||
-rw-r--r-- | 0003-Update-NEWS-for-OpenAFS-1.8.6pre2.patch | 41 | ||||
-rw-r--r-- | 0004-Make-OpenAFS-1.8.6pre2.patch | 86 | ||||
-rw-r--r-- | 0005-Adjust-RedHat-config-and-service-files.patch (renamed from 0001-Adjust-RedHat-config-and-service-files.patch) | 6 | ||||
-rw-r--r-- | PKGBUILD | 36 |
7 files changed, 593 insertions, 21 deletions
@@ -1,6 +1,6 @@ pkgbase = openafs pkgdesc = Open source implementation of the AFS distributed file system - pkgver = 1.8.5 + pkgver = 1.8.6pre1 pkgrel = 1 url = http://www.openafs.org install = openafs.install @@ -17,14 +17,22 @@ pkgbase = openafs backup = etc/openafs/ThisCell backup = etc/openafs/cacheinfo backup = etc/openafs/CellServDB - source = http://openafs.org/dl/openafs/1.8.5/openafs-1.8.5-src.tar.bz2 - source = http://openafs.org/dl/openafs/1.8.5/openafs-1.8.5-doc.tar.bz2 - source = 0001-Adjust-RedHat-config-and-service-files.patch + source = http://openafs.org/dl/openafs/candidate/1.8.6pre1/openafs-1.8.6pre1-src.tar.bz2 + source = http://openafs.org/dl/openafs/candidate/1.8.6pre1/openafs-1.8.6pre1-doc.tar.bz2 source = tmpfiles.d-openafs.conf - sha256sums = eeded68f238be2d6fc37522b7feae5e0b1ea9815b90ea5da91e5d43e00b28523 - sha256sums = 3abab824485429674b8f60b228c35d77667f55ca2848388356ee4581811daf22 - sha256sums = cba06b94f1e0c50f95e5811fcc23d448a97fa1c5efa8ce99a09c53cde60144f3 + source = 0001-LINUX-Avoid-building-rand-fortuna-kernel.o.patch + source = 0002-LINUX-5.6-define-time_t-and-use-timespec-timespec64.patch + source = 0003-Update-NEWS-for-OpenAFS-1.8.6pre2.patch + source = 0004-Make-OpenAFS-1.8.6pre2.patch + source = 0005-Adjust-RedHat-config-and-service-files.patch + sha256sums = 4ae020010632fbc9198be94ea97d6f6301c813227117fd8a28e15f32e8f58517 + sha256sums = 4aaea8d80c0df1947a843093385a10adc50a191f4fb3d6285f27e514da965135 sha256sums = 18d7b0173bbffbdc212f4e58c5b3ce369adf868452aabc3485f2a6a2ddb35d68 + sha256sums = 3639bc58cf7896f4b3c5a0c93f8a7a65a119dbd6eff0cb55597e3762ac2e6b3f + sha256sums = a75af2f13ac35e4d324183ac76727f53b832e7fa3b16f4983b48226a0c5452d2 + sha256sums = 5fc7fc6c44f950c99a1ad9629d6fe56bd88bd1f0b2f2ce3922939e7d073790c9 + sha256sums = d15fd705b0b24280c06ca8f2cb6d5c08bcb492cdb1f8f509de1d2c076c01c99d + sha256sums = 0e696e44a434dab91e8ab9755687169896a6739beadd0eba727b4e9bd07b3681 pkgname = openafs diff --git a/0001-LINUX-Avoid-building-rand-fortuna-kernel.o.patch b/0001-LINUX-Avoid-building-rand-fortuna-kernel.o.patch new file mode 100644 index 000000000000..e4a2acad244b --- /dev/null +++ b/0001-LINUX-Avoid-building-rand-fortuna-kernel.o.patch @@ -0,0 +1,261 @@ +From 355ea43f0d1b7feae1b3af58bc33af12838db7c3 Mon Sep 17 00:00:00 2001 +From: Andrew Deason <adeason@sinenomine.net> +Date: Mon, 2 Mar 2020 16:17:55 -0600 +Subject: [PATCH 1/5] LINUX: Avoid building rand-fortuna-kernel.o + +Currently, we build rand-fortuna-kernel.o for libafs on all platforms, +even though we only use the fortuna RNG on AIX, DragonFlyBSD, HP-UX, +and Irix. Everywhere else, our RAND_bytes() in +src/crypto/hcrypto/kernel/rand.c uses osi_readRandom() instead of +going through heimdal. + +Building rand-fortuna.c causes occasional build headaches for the +kernel on Linux (see cc7f942, "LINUX: Disable kernel fortuna large +frame errors"). The most recent instance of this is that Linux 5.6 +removes the definition for struct timeval, which is referenced in +rand-fortuna.c. + +The Linux kernel is constantly changing, and so trying to keep +rand-fortuna.c building on Linux seems like a waste of ongoing effort. +So, just stop building rand-fortuna-kernel.o on Linux. The original +intent of building this file on all platforms was to avoid bitrot, so +still keep building rand-fortuna-kernel.o on all other platforms even +when it's not used; just avoid it on Linux specifically, the platform +that requires the most effort. + +To accomplish this, move rand-fortuna-kernel.o from AFSAOBJS to +AFS_OS_OBJS, and remove it from the Linux-only AFSPAGOBJS. + +[1.8.x: The 1.8 branch does not contain the commits that introduced +-Wno-error=frame-larger-than= (cc7f942a and 54150f38), so we can skip +removing the references to -Wno-error=frame-larger-than=.] + +Reviewed-on: https://gerrit.openafs.org/14084 +Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> +Tested-by: BuildBot <buildbot@rampaginggeek.com> +Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> +(cherry picked from commit b8088b49dec23da19406fcb014e7100695dc8322) + +Change-Id: Iad0d1af5ffd79c576ddbc253b0037b9772187350 +Reviewed-on: https://gerrit.openafs.org/14094 +Reviewed-by: Andrew Deason <adeason@sinenomine.net> +Tested-by: BuildBot <buildbot@rampaginggeek.com> +Tested-by: Cheyenne Wills <cwills@sinenomine.net> +Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> +--- + src/crypto/hcrypto/kernel/rand.c | 13 ++++++++++++- + src/libafs/Makefile.common.in | 2 -- + src/libafs/MakefileProto.AIX.in | 3 ++- + src/libafs/MakefileProto.DARWIN.in | 4 ++-- + src/libafs/MakefileProto.DFBSD.in | 3 ++- + src/libafs/MakefileProto.FBSD.in | 3 +++ + src/libafs/MakefileProto.HPUX.in | 3 ++- + src/libafs/MakefileProto.IRIX.in | 3 ++- + src/libafs/MakefileProto.LINUX.in | 1 - + src/libafs/MakefileProto.NBSD.in | 3 ++- + src/libafs/MakefileProto.OBSD.in | 3 ++- + src/libafs/MakefileProto.SOLARIS.in | 3 ++- + 12 files changed, 31 insertions(+), 13 deletions(-) + +diff --git a/src/crypto/hcrypto/kernel/rand.c b/src/crypto/hcrypto/kernel/rand.c +index 81064863b..72cc41877 100644 +--- a/src/crypto/hcrypto/kernel/rand.c ++++ b/src/crypto/hcrypto/kernel/rand.c +@@ -15,6 +15,15 @@ + */ + afs_kmutex_t hckernel_mutex; + ++/* ++ * For these platforms, we use the fortuna RNG from heimdal (seeded from afsd ++ * userspace on startup). Otherwise, we rely on osi_readRandom() as the source ++ * of random data. ++ */ ++#if defined(AFS_AIX_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SGI_ENV) ++# define USE_FORTUNA ++#endif ++ + /* Called from osi_Init(); will only run once. */ + void + init_hckernel_mutex(void) +@@ -25,8 +34,10 @@ init_hckernel_mutex(void) + void + RAND_seed(const void *indata, size_t size) + { ++#ifdef USE_FORTUNA + const RAND_METHOD *m = RAND_fortuna_method(); + m->seed(indata, size); ++#endif + } + + int +@@ -34,7 +45,7 @@ RAND_bytes(void *outdata, size_t size) + { + if (size == 0) + return 0; +-#if defined(AFS_AIX_ENV) || defined(AFS_DFBSD_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SGI_ENV) ++#ifdef USE_FORTUNA + const RAND_METHOD *m = RAND_fortuna_method(); + return m->bytes(outdata, size); + #else +diff --git a/src/libafs/Makefile.common.in b/src/libafs/Makefile.common.in +index 0b8505a0f..b4e00166a 100644 +--- a/src/libafs/Makefile.common.in ++++ b/src/libafs/Makefile.common.in +@@ -72,7 +72,6 @@ depsrcs: + + AFSAOBJS = \ + sha256-kernel.o \ +- rand-fortuna-kernel.o \ + rand-timer-kernel.o \ + afs_atomlist.o \ + afs_lhash.o \ +@@ -217,7 +216,6 @@ AFSNONFSOBJS = \ + # init daemons call pioctl + AFSPAGOBJS = \ + sha256-kernel.o \ +- rand-fortuna-kernel.o \ + rand-timer-kernel.o \ + md5.o \ + evp.o \ +diff --git a/src/libafs/MakefileProto.AIX.in b/src/libafs/MakefileProto.AIX.in +index 5c2b7467c..697ba7aa9 100644 +--- a/src/libafs/MakefileProto.AIX.in ++++ b/src/libafs/MakefileProto.AIX.in +@@ -24,7 +24,8 @@ AFS_OS_OBJS = \ + osi_sleep.o \ + osi_timeout.o \ + osi_vcache.o \ +- osi_vm.o ++ osi_vm.o \ ++ rand-fortuna-kernel.o + + AFSNOIAUTHOBJS = \ + afs_call.o \ +diff --git a/src/libafs/MakefileProto.DARWIN.in b/src/libafs/MakefileProto.DARWIN.in +index 0592913c1..fc0945480 100644 +--- a/src/libafs/MakefileProto.DARWIN.in ++++ b/src/libafs/MakefileProto.DARWIN.in +@@ -28,8 +28,8 @@ AFS_OS_OBJS = \ + osi_vcache.o \ + osi_vm.o \ + osi_vnodeops.o \ +- osi_module.o +- ++ osi_module.o \ ++ rand-fortuna-kernel.o + + #AFS_OS_NFSOBJS = osi_vfsops_nfs.o + +diff --git a/src/libafs/MakefileProto.DFBSD.in b/src/libafs/MakefileProto.DFBSD.in +index 41e1b5140..9c06a50a7 100644 +--- a/src/libafs/MakefileProto.DFBSD.in ++++ b/src/libafs/MakefileProto.DFBSD.in +@@ -20,7 +20,8 @@ AFS_OS_OBJS = \ + osi_vcache.o \ + osi_vm.o \ + osi_vnodeops.o \ +- osi_module.o ++ osi_module.o \ ++ rand-fortuna-kernel.o + + #AFS_OS_NFSOBJS = \ + # osi_vfsops_nfs.o +diff --git a/src/libafs/MakefileProto.FBSD.in b/src/libafs/MakefileProto.FBSD.in +index 4c3c0cd8e..e0616afad 100644 +--- a/src/libafs/MakefileProto.FBSD.in ++++ b/src/libafs/MakefileProto.FBSD.in +@@ -31,6 +31,9 @@ SRCS+= \ + osi_vnodeops.c \ + osi_module.c + ++AFS_OS_OBJS = \ ++ rand-fortuna-kernel.o ++ + #AFS_OS_NFSOBJS = \ + # osi_vfsops_nfs.o + +diff --git a/src/libafs/MakefileProto.HPUX.in b/src/libafs/MakefileProto.HPUX.in +index 929884e23..0925a3f96 100644 +--- a/src/libafs/MakefileProto.HPUX.in ++++ b/src/libafs/MakefileProto.HPUX.in +@@ -24,7 +24,8 @@ AFS_OS_OBJS = \ + osi_sleep.o \ + osi_vcache.o \ + osi_vnodeops.o \ +- osi_vm.o ++ osi_vm.o \ ++ rand-fortuna-kernel.o + + AFS_OS_NFSOBJS = \ + <ia64_hpux1123 hp_ux1123> +diff --git a/src/libafs/MakefileProto.IRIX.in b/src/libafs/MakefileProto.IRIX.in +index 310db13fb..4142b413f 100644 +--- a/src/libafs/MakefileProto.IRIX.in ++++ b/src/libafs/MakefileProto.IRIX.in +@@ -26,7 +26,8 @@ AFS_OS_OBJS = \ + osi_sleep.o \ + osi_vcache.o \ + osi_vm.o \ +- osi_vnodeops.o ++ osi_vnodeops.o \ ++ rand-fortuna-kernel.o + + AFS_OS_NFSOBJS = \ + osi_vfsops_nfs.o +diff --git a/src/libafs/MakefileProto.LINUX.in b/src/libafs/MakefileProto.LINUX.in +index ed687f1ec..d98fa05ad 100644 +--- a/src/libafs/MakefileProto.LINUX.in ++++ b/src/libafs/MakefileProto.LINUX.in +@@ -82,7 +82,6 @@ CFLAGS_evp.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto \ + -DHAVE_CONFIG_H + CFLAGS_evp-algs.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto + CFLAGS_evp-kernel.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto +-CFLAGS_rand-fortuna-kernel.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto + CFLAGS_rand-timer-kernel.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto + CFLAGS_rand-kernel.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto + CFLAGS_aes.o = -I$(TOP_SRCDIR)/external/heimdal/hcrypto +diff --git a/src/libafs/MakefileProto.NBSD.in b/src/libafs/MakefileProto.NBSD.in +index 892dea2e9..f1669339e 100644 +--- a/src/libafs/MakefileProto.NBSD.in ++++ b/src/libafs/MakefileProto.NBSD.in +@@ -24,7 +24,8 @@ AFS_OS_OBJS = \ + osi_sleep.o \ + osi_vcache.o \ + osi_vm.o \ +- osi_vnodeops.o ++ osi_vnodeops.o \ ++ rand-fortuna-kernel.o + + AFS_OS_NFSOBJS = \ + osi_vfsops_nfs.o +diff --git a/src/libafs/MakefileProto.OBSD.in b/src/libafs/MakefileProto.OBSD.in +index 3e3beaae7..69871cc37 100644 +--- a/src/libafs/MakefileProto.OBSD.in ++++ b/src/libafs/MakefileProto.OBSD.in +@@ -44,7 +44,8 @@ AFS_OS_OBJS = \ + osi_sleep.o \ + osi_vcache.o \ + osi_vm.o \ +- osi_vnodeops.o ++ osi_vnodeops.o \ ++ rand-fortuna-kernel.o + + #AFS_OS_NFSOBJS = osi_vfsops_nfs.o + +diff --git a/src/libafs/MakefileProto.SOLARIS.in b/src/libafs/MakefileProto.SOLARIS.in +index 602fed543..5d7e07037 100644 +--- a/src/libafs/MakefileProto.SOLARIS.in ++++ b/src/libafs/MakefileProto.SOLARIS.in +@@ -26,7 +26,8 @@ AFS_OS_OBJS = \ + osi_sleep.o \ + osi_vcache.o \ + osi_vm.o \ +- osi_vnodeops.o ++ osi_vnodeops.o \ ++ rand-fortuna-kernel.o + + AFS_OS_NFSOBJS = \ + osi_vfsops_nfs.o +-- +2.26.0 + diff --git a/0002-LINUX-5.6-define-time_t-and-use-timespec-timespec64.patch b/0002-LINUX-5.6-define-time_t-and-use-timespec-timespec64.patch new file mode 100644 index 000000000000..1d75d37a4771 --- /dev/null +++ b/0002-LINUX-5.6-define-time_t-and-use-timespec-timespec64.patch @@ -0,0 +1,162 @@ +From 17d38e31e6f2e237a7fb4dfb46841060296310b6 Mon Sep 17 00:00:00 2001 +From: Cheyenne Wills <cwills@sinenomine.net> +Date: Tue, 3 Mar 2020 15:39:49 -0700 +Subject: [PATCH 2/5] LINUX 5.6: define time_t and use timespec/timespec64 + +The time_t type and the structure timeval were removed for use in kernel +space code in Linux commits: + 412c53a680a97cb1ae2c0ab60230e193bee86387 + y2038: remove unused time32 interfaces + c766d1472c70d25ad475cf56042af1652e792b23 + y2038: hide timeval/timespec/itimerval/itimerspec types + +Add an autoconf test for the time_t type. + +If time_t is missing, define the time_t type when building the kernel +module. + +Change the vattr structure in LINUX/osi_vfs.h to use timespec/timespec64 +instead of the timeval structure. + +Conditionalize the definition of gettimeofday (needed by rand-fortuna.c) in +crypto/hcrypto/kernel/config.h. It is unused by the Linux kernel module +and the function uses struct timeval that is no longer available. + +Reviewed-on: https://gerrit.openafs.org/14083 +Tested-by: BuildBot <buildbot@rampaginggeek.com> +Reviewed-by: Andrew Deason <adeason@sinenomine.net> +Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> +Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> +(cherry picked from commit 78049987aa3e84865e2e7e0f3dd3b54d66258e74) + +Change-Id: Iff80c161441356d19b5962956dd524792b7bf629 +Reviewed-on: https://gerrit.openafs.org/14095 +Tested-by: BuildBot <buildbot@rampaginggeek.com> +Reviewed-by: Andrew Deason <adeason@sinenomine.net> +Tested-by: Cheyenne Wills <cwills@sinenomine.net> +Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> +--- + src/afs/LINUX/osi_machdep.h | 4 ++++ + src/afs/LINUX/osi_vfs.h | 12 +++++++++--- + src/afs/LINUX/osi_vnodeops.c | 6 +++--- + src/afs/VNOPS/afs_vnop_attrs.c | 4 ++-- + src/cf/linux-kernel-type.m4 | 1 + + src/crypto/hcrypto/kernel/config.h | 7 +++++++ + 6 files changed, 26 insertions(+), 8 deletions(-) + +diff --git a/src/afs/LINUX/osi_machdep.h b/src/afs/LINUX/osi_machdep.h +index 6832c3ee0..1864cec6e 100644 +--- a/src/afs/LINUX/osi_machdep.h ++++ b/src/afs/LINUX/osi_machdep.h +@@ -76,6 +76,10 @@ + #include "h/cred.h" + #endif + ++#if !defined(HAVE_LINUX_TIME_T) ++typedef time64_t time_t; ++#endif ++ + #if defined(HAVE_LINUX_KTIME_GET_COARSE_REAL_TS64) + static inline time_t osi_Time(void) { + struct timespec64 xtime; +diff --git a/src/afs/LINUX/osi_vfs.h b/src/afs/LINUX/osi_vfs.h +index f771dad38..b3006796e 100644 +--- a/src/afs/LINUX/osi_vfs.h ++++ b/src/afs/LINUX/osi_vfs.h +@@ -70,9 +70,15 @@ typedef struct vattr { + dev_t va_rdev; + ino_t va_nodeid; /* Inode number */ + nlink_t va_nlink; /* link count for file. */ +- struct timeval va_atime; +- struct timeval va_mtime; +- struct timeval va_ctime; ++#if defined(IATTR_TAKES_64BIT_TIME) ++ struct timespec64 va_atime; ++ struct timespec64 va_mtime; ++ struct timespec64 va_ctime; ++#else ++ struct timespec va_atime; ++ struct timespec va_mtime; ++ struct timespec va_ctime; ++#endif + } vattr_t; + + #define VATTR_NULL(A) memset(A, 0, sizeof(struct vattr)) +diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c +index d8487afb3..03635212c 100644 +--- a/src/afs/LINUX/osi_vnodeops.c ++++ b/src/afs/LINUX/osi_vnodeops.c +@@ -1008,15 +1008,15 @@ iattr2vattr(struct vattr *vattrp, struct iattr *iattrp) + vattrp->va_size = iattrp->ia_size; + if (iattrp->ia_valid & ATTR_ATIME) { + vattrp->va_atime.tv_sec = iattrp->ia_atime.tv_sec; +- vattrp->va_atime.tv_usec = 0; ++ vattrp->va_atime.tv_nsec = 0; + } + if (iattrp->ia_valid & ATTR_MTIME) { + vattrp->va_mtime.tv_sec = iattrp->ia_mtime.tv_sec; +- vattrp->va_mtime.tv_usec = 0; ++ vattrp->va_mtime.tv_nsec = 0; + } + if (iattrp->ia_valid & ATTR_CTIME) { + vattrp->va_ctime.tv_sec = iattrp->ia_ctime.tv_sec; +- vattrp->va_ctime.tv_usec = 0; ++ vattrp->va_ctime.tv_nsec = 0; + } + } + +diff --git a/src/afs/VNOPS/afs_vnop_attrs.c b/src/afs/VNOPS/afs_vnop_attrs.c +index 05a38ce96..a22331a5b 100644 +--- a/src/afs/VNOPS/afs_vnop_attrs.c ++++ b/src/afs/VNOPS/afs_vnop_attrs.c +@@ -141,7 +141,7 @@ afs_CopyOutAttrs(struct vcache *avc, struct vattr *attrs) + attrs->va_atime.tv_nsec = attrs->va_mtime.tv_nsec = + attrs->va_ctime.tv_nsec = 0; + attrs->va_gen = hgetlo(avc->f.m.DataVersion); +-#elif defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_OBSD_ENV) || defined(AFS_NBSD_ENV) ++#elif defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_OBSD_ENV) || defined(AFS_NBSD_ENV) || defined(AFS_LINUX26_ENV) + attrs->va_atime.tv_nsec = attrs->va_mtime.tv_nsec = + attrs->va_ctime.tv_nsec = + (hgetlo(avc->f.m.DataVersion) & 0x7ffff) * 1000; +@@ -433,7 +433,7 @@ afs_VAttrToAS(struct vcache *avc, struct vattr *av, + #endif + mask |= AFS_SETMODTIME; + #ifndef AFS_SGI_ENV +-#if defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) ++#if defined(AFS_SUN5_ENV) || defined(AFS_AIX41_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV) || defined(AFS_LINUX26_ENV) + if (av->va_mtime.tv_nsec == -1) + #else + if (av->va_mtime.tv_usec == -1) +diff --git a/src/cf/linux-kernel-type.m4 b/src/cf/linux-kernel-type.m4 +index ae59fccfb..444317da5 100644 +--- a/src/cf/linux-kernel-type.m4 ++++ b/src/cf/linux-kernel-type.m4 +@@ -3,4 +3,5 @@ dnl Type existence checks + AC_CHECK_LINUX_TYPE([struct vfs_path], [dcache.h]) + AC_CHECK_LINUX_TYPE([kuid_t], [uidgid.h]) + AC_CHECK_LINUX_TYPE([struct proc_ops], [proc_fs.h]) ++AC_CHECK_LINUX_TYPE([time_t], [types.h]) + ]) +diff --git a/src/crypto/hcrypto/kernel/config.h b/src/crypto/hcrypto/kernel/config.h +index 6fec83da0..dd7608dae 100644 +--- a/src/crypto/hcrypto/kernel/config.h ++++ b/src/crypto/hcrypto/kernel/config.h +@@ -98,8 +98,15 @@ static_inline int close(int d) {return -1;} + #ifdef HAVE_ARC4RANDOM + # undef HAVE_ARC4RANDOM + #endif ++ ++#if !defined(AFS_LINUX26_ENV) ++/* ++ * gettimeofday is only used in rand-fortuna.c, not built for Linux. ++ * Linux 5.6 removes the native struct timeval, so this stub would not build. ++ */ + static_inline int gettimeofday(struct timeval *tp, void *tzp) + {if (tp == NULL) return -1; tp->tv_sec = osi_Time(); tp->tv_usec = 0; return 0;} ++#endif + + #if defined(KERNEL) && (defined(AFS_SUN5_ENV) || defined(AFS_ARM64_LINUX26_ENV)) + /* +-- +2.26.0 + diff --git a/0003-Update-NEWS-for-OpenAFS-1.8.6pre2.patch b/0003-Update-NEWS-for-OpenAFS-1.8.6pre2.patch new file mode 100644 index 000000000000..c07cd43b22ae --- /dev/null +++ b/0003-Update-NEWS-for-OpenAFS-1.8.6pre2.patch @@ -0,0 +1,41 @@ +From 828bd461d9be40b53ded91977b9ea1238575f77f Mon Sep 17 00:00:00 2001 +From: Stephan Wiesand <stephan.wiesand@desy.de> +Date: Fri, 13 Mar 2020 18:19:45 +0100 +Subject: [PATCH 3/5] Update NEWS for OpenAFS 1.8.6pre2 + +Release notes for the second 1.8.6 prerelease + +Change-Id: I3abfbfacb68a134afafa73a9ac292f9ee776d9a2 +--- + NEWS | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/NEWS b/NEWS +index df1743454..cd77d193a 100644 +--- a/NEWS ++++ b/NEWS +@@ -24,7 +24,11 @@ OpenAFS 1.8.6 (in progress) + All server platforms + + * Do not leave empty directories behind in the file server vice partition +- when running the "vos zap -force" command (13896 13897) ++ when running the "vos zap -force" command (13897) ++ ++ * Fix "vos zap -force" failures when the volume being zapped does not have ++ an entry in the fileserver's volume group cache (e.g., during fileserver ++ startup) (13896) + + * Relax the length limits on some membership lists used in ptserver RPCs, + introduced in release 1.8.0 to prevent denial of service attacks, to +@@ -66,7 +70,7 @@ OpenAFS 1.8.6 (in progress) + + Linux clients + +- * Support mainline kernels up to and including 5.6-rc2 (14069) ++ * Support mainline kernels up to and including 5.6-rc5 (14069 14094 14095) + + * Make builds succeed with --enable-checking for mainline kernels + 5.3-rc2 and later (13910) +-- +2.26.0 + diff --git a/0004-Make-OpenAFS-1.8.6pre2.patch b/0004-Make-OpenAFS-1.8.6pre2.patch new file mode 100644 index 000000000000..b2d05a5a900b --- /dev/null +++ b/0004-Make-OpenAFS-1.8.6pre2.patch @@ -0,0 +1,86 @@ +From efebfb1576872777c77a64005e12c92218a0b3b3 Mon Sep 17 00:00:00 2001 +From: Stephan Wiesand <stephan.wiesand@desy.de> +Date: Fri, 13 Mar 2020 18:23:14 +0100 +Subject: [PATCH 4/5] Make OpenAFS 1.8.6pre2 + +Update version strings for the second 1.8.6 prerelease. + +Change-Id: Ic5e452a379dac906520040a451f84ca19fd158e1 +--- + configure-libafs.ac | 2 +- + configure.ac | 4 ++-- + src/config/NTMakefile.amd64_w2k | 2 +- + src/config/NTMakefile.i386_nt40 | 2 +- + src/config/NTMakefile.i386_w2k | 2 +- + 5 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/configure-libafs.ac b/configure-libafs.ac +index 218c5d515..0839d3711 100644 +--- a/configure-libafs.ac ++++ b/configure-libafs.ac +@@ -4,7 +4,7 @@ AC_CONFIG_AUX_DIR([build-tools]) + AC_CONFIG_SRCDIR([src/libafs/Makefile.common.in]) + + AC_CONFIG_HEADER([src/config/afsconfig.h]) +-MACOS_VERSION=1.8.6fc1 ++MACOS_VERSION=1.8.6fc2 + + AC_SUBST([MACOS_VERSION]) + +diff --git a/configure.ac b/configure.ac +index 3c9fa9dbe..ebeaf031c 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -5,8 +5,8 @@ AC_CONFIG_MACRO_DIR([src/cf]) + AC_CONFIG_SRCDIR([src/config/stds.h]) + + AC_CONFIG_HEADER([src/config/afsconfig.h]) +-MACOS_VERSION=1.8.6fc1 +-LINUX_PKGREL=1.8.6pre1 ++MACOS_VERSION=1.8.6fc2 ++LINUX_PKGREL=1.8.6pre2 + + AC_SUBST([MACOS_VERSION]) + +diff --git a/src/config/NTMakefile.amd64_w2k b/src/config/NTMakefile.amd64_w2k +index e09a0a3bb..1eb1f8c32 100644 +--- a/src/config/NTMakefile.amd64_w2k ++++ b/src/config/NTMakefile.amd64_w2k +@@ -88,7 +88,7 @@ AFSPRODUCT_VER_MAJOR=1 + AFSPRODUCT_VER_MINOR=8 + !ENDIF + !IF !DEFINED(AFSPRODUCT_VER_PATCH) +-AFSPRODUCT_VER_PATCH=0600 ++AFSPRODUCT_VER_PATCH=0601 + !ENDIF + !IF !DEFINED(AFSPRODUCT_VER_BUILD) + AFSPRODUCT_VER_BUILD=0 +diff --git a/src/config/NTMakefile.i386_nt40 b/src/config/NTMakefile.i386_nt40 +index 58ea05c11..88b1afcbf 100644 +--- a/src/config/NTMakefile.i386_nt40 ++++ b/src/config/NTMakefile.i386_nt40 +@@ -88,7 +88,7 @@ AFSPRODUCT_VER_MAJOR=1 + AFSPRODUCT_VER_MINOR=8 + !ENDIF + !IF !DEFINED(AFSPRODUCT_VER_PATCH) +-AFSPRODUCT_VER_PATCH=0600 ++AFSPRODUCT_VER_PATCH=0601 + !ENDIF + !IF !DEFINED(AFSPRODUCT_VER_BUILD) + AFSPRODUCT_VER_BUILD=0 +diff --git a/src/config/NTMakefile.i386_w2k b/src/config/NTMakefile.i386_w2k +index b16d0f227..596163d93 100644 +--- a/src/config/NTMakefile.i386_w2k ++++ b/src/config/NTMakefile.i386_w2k +@@ -92,7 +92,7 @@ AFSPRODUCT_VER_MAJOR=1 + AFSPRODUCT_VER_MINOR=8 + !ENDIF + !IF !DEFINED(AFSPRODUCT_VER_PATCH) +-AFSPRODUCT_VER_PATCH=0600 ++AFSPRODUCT_VER_PATCH=0601 + !ENDIF + !IF !DEFINED(AFSPRODUCT_VER_BUILD) + AFSPRODUCT_VER_BUILD=0 +-- +2.26.0 + diff --git a/0001-Adjust-RedHat-config-and-service-files.patch b/0005-Adjust-RedHat-config-and-service-files.patch index 56944525f479..6f64cfddc1c4 100644 --- a/0001-Adjust-RedHat-config-and-service-files.patch +++ b/0005-Adjust-RedHat-config-and-service-files.patch @@ -1,7 +1,7 @@ -From cb6022a7261bbec2b44c373e5a83dab039467b73 Mon Sep 17 00:00:00 2001 +From 3444888d8d5d491fbd6e9b3b68492d387ff84fb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20La=C3=9F?= <lass@mail.uni-paderborn.de> Date: Thu, 19 Feb 2015 19:34:00 +0100 -Subject: [PATCH] Adjust RedHat config and service files +Subject: [PATCH 5/5] Adjust RedHat config and service files Basically we reuse upstream's config for RedHat but we change a few things: @@ -66,5 +66,5 @@ index ac9d3c411..0a4b3bfea 100644 [Install] -- -2.23.0 +2.26.0 @@ -5,7 +5,7 @@ # https://github.com/michaellass/AUR pkgname=openafs -pkgver=1.8.5 +pkgver=1.8.6pre1 pkgrel=1 pkgdesc="Open source implementation of the AFS distributed file system" arch=('i686' 'x86_64' 'armv7h') @@ -21,14 +21,22 @@ backup=(etc/conf.d/openafs etc/openafs/CellServDB) options=(!emptydirs) install=openafs.install -source=(http://openafs.org/dl/openafs/${pkgver}/${pkgname}-${pkgver}-src.tar.bz2 - http://openafs.org/dl/openafs/${pkgver}/${pkgname}-${pkgver}-doc.tar.bz2 - 0001-Adjust-RedHat-config-and-service-files.patch - tmpfiles.d-openafs.conf) -sha256sums=('eeded68f238be2d6fc37522b7feae5e0b1ea9815b90ea5da91e5d43e00b28523' - '3abab824485429674b8f60b228c35d77667f55ca2848388356ee4581811daf22' - 'cba06b94f1e0c50f95e5811fcc23d448a97fa1c5efa8ce99a09c53cde60144f3' - '18d7b0173bbffbdc212f4e58c5b3ce369adf868452aabc3485f2a6a2ddb35d68') +source=(http://openafs.org/dl/openafs/candidate/${pkgver}/${pkgname}-${pkgver}-src.tar.bz2 + http://openafs.org/dl/openafs/candidate/${pkgver}/${pkgname}-${pkgver}-doc.tar.bz2 + tmpfiles.d-openafs.conf + 0001-LINUX-Avoid-building-rand-fortuna-kernel.o.patch + 0002-LINUX-5.6-define-time_t-and-use-timespec-timespec64.patch + 0003-Update-NEWS-for-OpenAFS-1.8.6pre2.patch + 0004-Make-OpenAFS-1.8.6pre2.patch + 0005-Adjust-RedHat-config-and-service-files.patch) +sha256sums=('4ae020010632fbc9198be94ea97d6f6301c813227117fd8a28e15f32e8f58517' + '4aaea8d80c0df1947a843093385a10adc50a191f4fb3d6285f27e514da965135' + '18d7b0173bbffbdc212f4e58c5b3ce369adf868452aabc3485f2a6a2ddb35d68' + '3639bc58cf7896f4b3c5a0c93f8a7a65a119dbd6eff0cb55597e3762ac2e6b3f' + 'a75af2f13ac35e4d324183ac76727f53b832e7fa3b16f4983b48226a0c5452d2' + '5fc7fc6c44f950c99a1ad9629d6fe56bd88bd1f0b2f2ce3922939e7d073790c9' + 'd15fd705b0b24280c06ca8f2cb6d5c08bcb492cdb1f8f509de1d2c076c01c99d' + '0e696e44a434dab91e8ab9755687169896a6739beadd0eba727b4e9bd07b3681') # If you need the kauth tools set this to 1. But be aware that these tools # are considered insecure since 2003! This also affects the PAM libs. @@ -37,11 +45,17 @@ ENABLE_KAUTH=0 prepare() { cd "${srcdir}/${pkgname}-${pkgver}" + # Imitate what is likely to become 1.8.6pre2 + patch -p1 < "${srcdir}/0001-LINUX-Avoid-building-rand-fortuna-kernel.o.patch" + patch -p1 < "${srcdir}/0002-LINUX-5.6-define-time_t-and-use-timespec-timespec64.patch" + patch -p1 < "${srcdir}/0003-Update-NEWS-for-OpenAFS-1.8.6pre2.patch" + patch -p1 < "${srcdir}/0004-Make-OpenAFS-1.8.6pre2.patch" + # Adjust RedHat config and service files to our needs - patch -p1 < "${srcdir}/0001-Adjust-RedHat-config-and-service-files.patch" + patch -p1 < "${srcdir}/0005-Adjust-RedHat-config-and-service-files.patch" # Only needed when changes to configure were made - # ./regen.sh -q + ./regen.sh -q } build() { |