diff options
author | Michael Lass | 2021-01-15 09:15:15 +0100 |
---|---|---|
committer | Michael Lass | 2021-01-15 09:21:50 +0100 |
commit | 7471f5e5477b133c2fd317e4883e84a4d0e6ee2c (patch) | |
tree | d512b46425aee1b63c111ebf61fa6289edda3666 | |
parent | 5b5047f67331e949744d56f1b9589b087791b644 (diff) | |
download | aur-7471f5e5477b133c2fd317e4883e84a4d0e6ee2c.tar.gz |
Update to 1.8.7
While here, replace the custom GCC 10 patch by the one merged upstream.
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | 0001-Adjust-RedHat-config-and-service-files.patch (renamed from 0002-Adjust-RedHat-config-and-service-files.patch) | 4 | ||||
-rw-r--r-- | 0001-Temporary-fix-for-compilation-with-GCC-10.patch | 33 | ||||
-rw-r--r-- | 0002-Avoid-duplicate-definitions-of-globals.patch | 353 | ||||
-rw-r--r-- | 0003-afsmonitor-remove-unused-LWP_WaitProcess.patch | 77 | ||||
-rw-r--r-- | 0003-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch | 48 | ||||
-rw-r--r-- | 0004-rx-update_nextCid-overflow-handling-is-broken.patch | 62 | ||||
-rw-r--r-- | 0005-Remove-overflow-check-from-update_nextCid.patch | 49 | ||||
-rw-r--r-- | PKGBUILD | 41 |
9 files changed, 459 insertions, 236 deletions
@@ -1,7 +1,7 @@ pkgbase = openafs pkgdesc = Open source implementation of the AFS distributed file system - pkgver = 1.8.6 - pkgrel = 3 + pkgver = 1.8.7 + pkgrel = 1 url = http://www.openafs.org install = openafs.install arch = i686 @@ -17,22 +17,18 @@ pkgbase = openafs backup = etc/openafs/ThisCell backup = etc/openafs/cacheinfo backup = etc/openafs/CellServDB - source = http://openafs.org/dl/openafs/1.8.6/openafs-1.8.6-src.tar.bz2 - source = http://openafs.org/dl/openafs/1.8.6/openafs-1.8.6-doc.tar.bz2 + source = http://openafs.org/dl/openafs/1.8.7/openafs-1.8.7-src.tar.bz2 + source = http://openafs.org/dl/openafs/1.8.7/openafs-1.8.7-doc.tar.bz2 source = tmpfiles.d-openafs.conf - source = 0001-Temporary-fix-for-compilation-with-GCC-10.patch - source = 0002-Adjust-RedHat-config-and-service-files.patch - source = 0003-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch - source = 0004-rx-update_nextCid-overflow-handling-is-broken.patch - source = 0005-Remove-overflow-check-from-update_nextCid.patch - sha256sums = 8b4e9d3180f1ecd752753da17ac630df04eb7007c90a921a5f6403c0339d2945 - sha256sums = e34fa28d9ee06b47d080e4ed0c1f55fe2629ce974f1a7a7ec60dd6e87a9d21e9 + source = 0001-Adjust-RedHat-config-and-service-files.patch + source = 0002-Avoid-duplicate-definitions-of-globals.patch + source = 0003-afsmonitor-remove-unused-LWP_WaitProcess.patch + sha256sums = 53543a561fce67714fec9f2a6bf408c5cc1d061c7dc9d1459458275e8ccbfa79 + sha256sums = d61384efdce1aacabdd1890062ada741c0e0aeb4cc973811a493dcda6f4a317f sha256sums = 18d7b0173bbffbdc212f4e58c5b3ce369adf868452aabc3485f2a6a2ddb35d68 - sha256sums = 5a64f667ef5c63a0b54e859ccde0a69f6d883bfadfa5ce4b3e0a98e613764258 - sha256sums = 30cd5cb67782161a8510039c14479a02252e3bb80fdf23795753ddb7f1aeadf7 - sha256sums = 302cf63380e43145949f6e91e9510fdc8ed94de915b90975212a5bdb55bb9259 - sha256sums = 3ab566be3b11bcd8e59d7809ee4e73e3b7206b7cf21097d5cf55675543c2b785 - sha256sums = 94dea81621ba41b7b1122d977c60d66431b64bead0d6796ef322b04196579e63 + sha256sums = 56a35ca8a7946cfe379e7704f0a982e7bb70ba64bca3c0379c676fae36d416f1 + sha256sums = 2c49e0917eb8cee44b740f128e1991d75fbd53ac0661e2541824c1e9ecfd5ad1 + sha256sums = b816e2d934c281e9d9e07ce608a74d5354b6be92c5597a1cb962f6c943800a16 pkgname = openafs diff --git a/0002-Adjust-RedHat-config-and-service-files.patch b/0001-Adjust-RedHat-config-and-service-files.patch index 327d1da67e31..dff0d21235f8 100644 --- a/0002-Adjust-RedHat-config-and-service-files.patch +++ b/0001-Adjust-RedHat-config-and-service-files.patch @@ -1,7 +1,7 @@ -From c0f5be5ee08d8db59c0c0106bed56f602edf3cad Mon Sep 17 00:00:00 2001 +From f584b0812b1e8284fc9fbe746fb28d555ff0527f 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 2/5] Adjust RedHat config and service files +Subject: [PATCH 1/3] Adjust RedHat config and service files Basically we reuse upstream's config for RedHat but we change a few things: diff --git a/0001-Temporary-fix-for-compilation-with-GCC-10.patch b/0001-Temporary-fix-for-compilation-with-GCC-10.patch deleted file mode 100644 index c0a6d6acfaf3..000000000000 --- a/0001-Temporary-fix-for-compilation-with-GCC-10.patch +++ /dev/null @@ -1,33 +0,0 @@ -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/5] Temporary fix for compilation with GCC 10 - -See: -* https://bugs.gentoo.org/706738 -* https://gerrit.openafs.org/14106 - -Backporting that fix to OpenAFS 1.8 requires some changes in the xstat -code so for now let's just allow duplicate declarations. - -Change-Id: I0bbf317dcf584d5531db714c5e9b986f3fbb6a0b ---- - src/cf/osconf.m4 | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 -index 5f0d73fc2..7cf761757 100644 ---- a/src/cf/osconf.m4 -+++ b/src/cf/osconf.m4 -@@ -681,6 +681,8 @@ if test "x$GCC" = "xyes"; then - else - CFLAGS_NOSTRICT= - fi -+ else -+ XCFLAGS="${XCFLAGS} -fcommon" - fi - else - case $AFS_SYSNAME in --- -2.30.0 - diff --git a/0002-Avoid-duplicate-definitions-of-globals.patch b/0002-Avoid-duplicate-definitions-of-globals.patch new file mode 100644 index 000000000000..2465de7ebf47 --- /dev/null +++ b/0002-Avoid-duplicate-definitions-of-globals.patch @@ -0,0 +1,353 @@ +From 828174efa41aa7f35899b3dd0be190b4f15132c5 Mon Sep 17 00:00:00 2001 +From: Cheyenne Wills <cwills@sinenomine.net> +Date: Fri, 22 May 2020 12:16:48 -0600 +Subject: [PATCH 2/3] Avoid duplicate definitions of globals + +GCC 10 changed a default flag from -fcommon to -fno-common. See +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678 for some background. + +The change in gcc 10 results in build link-time errors. For example: + ../../src/xstat/.libs/liboafs_xstat_cm.a(xstat_cm.o):(.bss+0x2050): + multiple definition of `numCollections'; + +Ensure that only one definition for global data objects exist and change +references to use "extern" as needed. + +To ensure that future changes do not introduce duplicated global +definitions, add the -fno-common flag to XCFLAGS when using the +configure --enable-checking setting. + +[cwills@sinenomine.net: Note for 1.8.x: renamed terminationEvent +to cm_terminationEvent/fs_terminationEvent instead of deleting it.] + +Reviewed-on: https://gerrit.openafs.org/14106 +Tested-by: BuildBot <buildbot@rampaginggeek.com> +Reviewed-by: Andrew Deason <adeason@sinenomine.net> +Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> +(cherry picked from commit 0e2072ae386d4111bef161eb955964b649c31386) + +Change-Id: I54ca61d372cf763e4a28c0b0829ea361219f6203 +Reviewed-on: https://gerrit.openafs.org/14217 +Reviewed-by: Andrew Deason <adeason@sinenomine.net> +Reviewed-by: Mark Vitale <mvitale@sinenomine.net> +Tested-by: BuildBot <buildbot@rampaginggeek.com> +Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> +--- + src/bucoord/main.c | 6 ++---- + src/butc/dbentries.c | 2 +- + src/butc/dump.c | 7 +++---- + src/butc/lwps.c | 2 +- + src/butc/tcmain.c | 2 +- + src/cf/osconf.m4 | 2 +- + src/fsprobe/fsprobe.h | 1 - + src/uss/uss_vol.c | 2 +- + src/viced/host.c | 2 ++ + src/viced/host.h | 2 +- + src/vol/fssync-server.c | 3 --- + src/vol/volume.c | 3 --- + src/xstat/xstat_cm.c | 7 +++---- + src/xstat/xstat_cm.h | 3 +-- + src/xstat/xstat_cm_test.c | 4 ++-- + src/xstat/xstat_fs.c | 7 +++---- + src/xstat/xstat_fs.h | 3 +-- + src/xstat/xstat_fs_test.c | 4 ++-- + 18 files changed, 25 insertions(+), 37 deletions(-) + +diff --git a/src/bucoord/main.c b/src/bucoord/main.c +index d2a5f368b..a453cc9dd 100644 +--- a/src/bucoord/main.c ++++ b/src/bucoord/main.c +@@ -47,9 +47,9 @@ char tcell[64]; + /* + * Global configuration information for the Backup Coordinator. + */ +-struct bc_config *bc_globalConfig; /*Ptr to global BC configuration info */ ++extern struct bc_config *bc_globalConfig; /*Ptr to global BC configuration info */ + +-struct ubik_client *cstruct; /* Ptr to Ubik client structure */ ++extern struct ubik_client *cstruct; /* Ptr to Ubik client structure */ + time_t tokenExpires; /* The token's expiration time */ + + static const char *DefaultConfDir; /*Default backup config directory */ +@@ -162,8 +162,6 @@ bc_InitTextConfig(void) + udbClientTextP ctPtr; + int i; + +- extern struct bc_config *bc_globalConfig; +- + mkdir(DefaultConfDir, 777); /* temporary */ + + /* initialize the client text structures */ +diff --git a/src/butc/dbentries.c b/src/butc/dbentries.c +index 37b35d307..29ddcbd01 100644 +--- a/src/butc/dbentries.c ++++ b/src/butc/dbentries.c +@@ -31,7 +31,7 @@ + #include "error_macros.h" + + dlqlinkT savedEntries; +-dlqlinkT entries_to_flush; ++static dlqlinkT entries_to_flush; + + int dbWatcherinprogress; + +diff --git a/src/butc/dump.c b/src/butc/dump.c +index 1f4eb9b8f..f8fc943a6 100644 +--- a/src/butc/dump.c ++++ b/src/butc/dump.c +@@ -42,8 +42,7 @@ extern int isafile; + extern int forcemultiple; + + extern struct ubik_client *cstruct; +-dlqlinkT savedEntries; +-dlqlinkT entries_to_flush; ++extern dlqlinkT savedEntries; + + extern afs_int32 groupId; + extern afs_int32 BufferSize; +@@ -61,8 +60,8 @@ extern char *xbsalGName; + extern char *globalButcLog; + #endif /*xbsa */ + +-afs_int32 dataSize; /* Size of data to read on each rx_Read() call */ +-afs_int32 tapeblocks; /* Number of 16K tape datablocks in buffer (!CONF_XBSA) */ ++extern afs_int32 dataSize; /* Size of data to read on each rx_Read() call */ ++extern afs_int32 tapeblocks; /* Number of 16K tape datablocks in buffer (!CONF_XBSA) */ + + /* TBD + * +diff --git a/src/butc/lwps.c b/src/butc/lwps.c +index d262991d8..aff5e9e07 100644 +--- a/src/butc/lwps.c ++++ b/src/butc/lwps.c +@@ -51,7 +51,7 @@ extern int forcemultiple; + #endif + + /* XBSA Global Parameters */ +-afs_int32 xbsaType; ++extern afs_int32 xbsaType; + #ifdef xbsa + struct butx_transactionInfo butxInfo; + #endif +diff --git a/src/butc/tcmain.c b/src/butc/tcmain.c +index e8a20938e..a0298addb 100644 +--- a/src/butc/tcmain.c ++++ b/src/butc/tcmain.c +@@ -66,7 +66,7 @@ + #define TL_PREFIX "TL" + #define CFG_PREFIX "CFG" + +-struct ubik_client *cstruct; ++extern struct ubik_client *cstruct; + FILE *logIO, *ErrorlogIO, *centralLogIO, *lastLogIO; + char lFile[AFSDIR_PATH_MAX]; + char logFile[AFSDIR_PATH_MAX + 256]; +diff --git a/src/cf/osconf.m4 b/src/cf/osconf.m4 +index 5f0d73fc2..e36152bd4 100644 +--- a/src/cf/osconf.m4 ++++ b/src/cf/osconf.m4 +@@ -672,7 +672,7 @@ if test "x$GCC" = "xyes"; then + XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Wpointer-arith" + fi + if test "x$enable_checking" != "xno"; then +- XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Werror -fdiagnostics-show-option -Wpointer-arith" ++ XCFLAGS="${XCFLAGS} -Wall -Wstrict-prototypes -Wold-style-definition -Werror -fdiagnostics-show-option -Wpointer-arith -fno-common" + if test "x$enable_checking" != "xall"; then + CFLAGS_NOERROR="-Wno-error" + CFLAGS_NOUNUSED="-Wno-unused" +diff --git a/src/fsprobe/fsprobe.h b/src/fsprobe/fsprobe.h +index 94083bfe9..3060371ae 100644 +--- a/src/fsprobe/fsprobe.h ++++ b/src/fsprobe/fsprobe.h +@@ -103,7 +103,6 @@ struct fsprobe_ProbeResults { + + extern int fsprobe_numServers; /*# servers connected */ + extern struct fsprobe_ConnectionInfo *fsprobe_ConnInfo; /*Ptr to connections */ +-extern int numCollections; /*Num data collections */ + extern struct fsprobe_ProbeResults fsprobe_Results; /*Latest probe results */ + + extern int fsprobe_Init(int, struct sockaddr_in *, int, int (*)(void), int ); +diff --git a/src/uss/uss_vol.c b/src/uss/uss_vol.c +index c9c13941d..b31a42a06 100644 +--- a/src/uss/uss_vol.c ++++ b/src/uss/uss_vol.c +@@ -61,7 +61,7 @@ extern int line; + * will work and we can avoid nasty little core dumps. + */ + struct ubik_client *uconn_vldbP; /*Ubik connection struct */ +-struct ubik_client *cstruct; /*Required name for above */ ++extern struct ubik_client *cstruct; /*Required name for above */ + + /* + * ------------------------ Private globals ----------------------- +diff --git a/src/viced/host.c b/src/viced/host.c +index 36f9e88c0..e7657caac 100644 +--- a/src/viced/host.c ++++ b/src/viced/host.c +@@ -67,6 +67,8 @@ int hostCount = 0; /* number of hosts in hostList */ + int rxcon_ident_key; + int rxcon_client_key; + ++struct host *(hosttableptrs[h_MAXHOSTTABLES]); ++ + static struct rx_securityClass *sc = NULL; + static int h_quota_limit; + +diff --git a/src/viced/host.h b/src/viced/host.h +index fead948f6..272dcdbe7 100644 +--- a/src/viced/host.h ++++ b/src/viced/host.h +@@ -254,7 +254,7 @@ extern int h_RestoreState(void); + #define H_ENUMERATE_BAIL(flags) ((flags)|0x80000000) + #define H_ENUMERATE_ISSET_BAIL(flags) ((flags)&0x80000000) + +-struct host *(hosttableptrs[h_MAXHOSTTABLES]); /* Used by h_itoh */ ++extern struct host *(hosttableptrs[h_MAXHOSTTABLES]); /* Used by h_itoh */ + #define h_htoi(host) ((host)->index) /* index isn't zeroed, no need to lock */ + #define h_itoh(hostindex) (hosttableptrs[(hostindex)>>h_HTSHIFT]+((hostindex)&(h_HTSPERBLOCK-1))) + +diff --git a/src/vol/fssync-server.c b/src/vol/fssync-server.c +index 2d7cd6011..69d902f1b 100644 +--- a/src/vol/fssync-server.c ++++ b/src/vol/fssync-server.c +@@ -79,9 +79,6 @@ + #endif /* USE_UNIX_SOCKETS */ + + #ifdef FSSYNC_BUILD_SERVER +- +-int (*V_BreakVolumeCallbacks) (VolumeId volume); +- + #define MAXHANDLERS 4 /* Up to 4 clients; must be at least 2, so that + * move = dump+restore can run on single server */ + #define MAXOFFLINEVOLUMES 128 /* This needs to be as big as the maximum +diff --git a/src/vol/volume.c b/src/vol/volume.c +index f1ff10a7b..3d9e47ef3 100644 +--- a/src/vol/volume.c ++++ b/src/vol/volume.c +@@ -124,9 +124,6 @@ pthread_cond_t vol_vinit_cond; + int vol_attach_threads = 1; + #endif /* AFS_PTHREAD_ENV */ + +-/* start-time configurable I/O parameters */ +-ih_init_params vol_io_params; +- + #ifdef AFS_DEMAND_ATTACH_FS + pthread_mutex_t vol_salvsync_mutex; + +diff --git a/src/xstat/xstat_cm.c b/src/xstat/xstat_cm.c +index d8600c124..3f5bfc843 100644 +--- a/src/xstat/xstat_cm.c ++++ b/src/xstat/xstat_cm.c +@@ -32,9 +32,8 @@ + int xstat_cm_numServers; /*Num connected servers */ + struct xstat_cm_ConnectionInfo + *xstat_cm_ConnInfo; /*Ptr to connection array */ +-int numCollections; /*Number of data collections */ + struct xstat_cm_ProbeResults xstat_cm_Results; /*Latest probe results */ +-char terminationEvent; /*One-shot termination event */ ++char cm_terminationEvent; /*One-shot termination event */ + + afs_int32 xstat_cmData[AFSCB_MAX_XSTAT_LONGS]; /*Buffer for collected data */ + +@@ -315,8 +314,8 @@ xstat_cm_LWP(void *unused) + */ + if (xstat_cm_debug) + printf("[%s] Signalling main process at %" AFS_PTR_FMT "\n", rn, +- &terminationEvent); +- oneShotCode = LWP_SignalProcess(&terminationEvent); ++ &cm_terminationEvent); ++ oneShotCode = LWP_SignalProcess(&cm_terminationEvent); + if (oneShotCode) + fprintf(stderr, "[%s] Error %d from LWP_SignalProcess()", rn, + oneShotCode); +diff --git a/src/xstat/xstat_cm.h b/src/xstat/xstat_cm.h +index efbba531c..569011cc2 100644 +--- a/src/xstat/xstat_cm.h ++++ b/src/xstat/xstat_cm.h +@@ -86,10 +86,9 @@ struct xstat_cm_ProbeResults { + extern int xstat_cm_numServers; /*# connected servers */ + extern struct xstat_cm_ConnectionInfo + *xstat_cm_ConnInfo; /*Ptr to connections */ +-extern int numCollections; /*Num data collections */ + extern struct xstat_cm_ProbeResults + xstat_cm_Results; /*Latest probe results */ +-extern char terminationEvent; /*One-shot termination event */ ++extern char cm_terminationEvent; /*One-shot termination event */ + + /* + * ------------------------ Exported functions ------------------------ +diff --git a/src/xstat/xstat_cm_test.c b/src/xstat/xstat_cm_test.c +index b284237aa..7c5e56864 100644 +--- a/src/xstat/xstat_cm_test.c ++++ b/src/xstat/xstat_cm_test.c +@@ -881,8 +881,8 @@ RunTheTest(struct cmd_syndesc *a_s, void *arock) + */ + if (debugging_on) + printf("[%s] Calling LWP_WaitProcess() on event %" AFS_PTR_FMT +- "\n", rn, &terminationEvent); +- waitCode = LWP_WaitProcess(&terminationEvent); ++ "\n", rn, &cm_terminationEvent); ++ waitCode = LWP_WaitProcess(&cm_terminationEvent); + if (debugging_on) + printf("[%s] Returned from LWP_WaitProcess()\n", rn); + if (waitCode) { +diff --git a/src/xstat/xstat_fs.c b/src/xstat/xstat_fs.c +index 51dbe3847..dff930472 100644 +--- a/src/xstat/xstat_fs.c ++++ b/src/xstat/xstat_fs.c +@@ -33,9 +33,8 @@ + int xstat_fs_numServers; /*Num connected servers */ + struct xstat_fs_ConnectionInfo + *xstat_fs_ConnInfo; /*Ptr to connection array */ +-int numCollections; /*Number of data collections */ + struct xstat_fs_ProbeResults xstat_fs_Results; /*Latest probe results */ +-char terminationEvent; /*One-shot termination event */ ++char fs_terminationEvent; /*One-shot termination event */ + + afs_int32 xstat_fsData[AFS_MAX_XSTAT_LONGS]; /*Buffer for collected data */ + +@@ -334,8 +333,8 @@ xstat_fs_LWP(void *unused) + */ + if (xstat_fs_debug) + printf("[%s] Signalling main process at %" AFS_PTR_FMT "\n", rn, +- &terminationEvent); +- oneShotCode = LWP_SignalProcess(&terminationEvent); ++ &fs_terminationEvent); ++ oneShotCode = LWP_SignalProcess(&fs_terminationEvent); + if (oneShotCode) + fprintf(stderr, "[%s] Error %d from LWP_SignalProcess()", rn, + oneShotCode); +diff --git a/src/xstat/xstat_fs.h b/src/xstat/xstat_fs.h +index 6e2b77b85..a800ba679 100644 +--- a/src/xstat/xstat_fs.h ++++ b/src/xstat/xstat_fs.h +@@ -87,10 +87,9 @@ struct xstat_fs_ProbeResults { + extern int xstat_fs_numServers; /*# connected servers */ + extern struct xstat_fs_ConnectionInfo + *xstat_fs_ConnInfo; /*Ptr to connections */ +-extern int numCollections; /*Num data collections */ + extern struct xstat_fs_ProbeResults + xstat_fs_Results; /*Latest probe results */ +-extern char terminationEvent; /*One-shot termination event */ ++extern char fs_terminationEvent; /*One-shot termination event */ + + /* + * ------------------------ Exported functions ------------------------ +diff --git a/src/xstat/xstat_fs_test.c b/src/xstat/xstat_fs_test.c +index 853c2121e..d58ecf014 100644 +--- a/src/xstat/xstat_fs_test.c ++++ b/src/xstat/xstat_fs_test.c +@@ -778,8 +778,8 @@ RunTheTest(struct cmd_syndesc *a_s, void *dummy) + */ + if (debugging_on) + printf("[%s] Calling LWP_WaitProcess() on event %" AFS_PTR_FMT "\n", rn, +- &terminationEvent); +- waitCode = LWP_WaitProcess(&terminationEvent); ++ &fs_terminationEvent); ++ waitCode = LWP_WaitProcess(&fs_terminationEvent); + if (debugging_on) + printf("[%s] Returned from LWP_WaitProcess()\n", rn); + if (waitCode) { +-- +2.30.0 + diff --git a/0003-afsmonitor-remove-unused-LWP_WaitProcess.patch b/0003-afsmonitor-remove-unused-LWP_WaitProcess.patch new file mode 100644 index 000000000000..a9180b846176 --- /dev/null +++ b/0003-afsmonitor-remove-unused-LWP_WaitProcess.patch @@ -0,0 +1,77 @@ +From 8928efb34576eaa4de6f186e46b237e06e8c31ca Mon Sep 17 00:00:00 2001 +From: Michael Meffie <mmeffie@sinenomine.net> +Date: Mon, 9 Oct 2017 22:16:09 -0400 +Subject: [PATCH 3/3] afsmonitor: remove unused LWP_WaitProcess + +Remove the unimplemented once-only flag and the unused LWP_WaitProcess +call. + +Reviewed-on: https://gerrit.openafs.org/12745 +Tested-by: BuildBot <buildbot@rampaginggeek.com> +Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> +(cherry picked from commit 7c27365ea24aed5787f6fc03f30f6085c78ece51) + +Change-Id: I3b61f9fb4f45564304b0e35878d3535a10e31d02 +Reviewed-on: https://gerrit.openafs.org/14226 +Reviewed-by: Andrew Deason <adeason@sinenomine.net> +Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> +Reviewed-by: Mark Vitale <mvitale@sinenomine.net> +Tested-by: BuildBot <buildbot@rampaginggeek.com> +Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> +--- + src/afsmonitor/afsmonitor.c | 18 ------------------ + 1 file changed, 18 deletions(-) + +diff --git a/src/afsmonitor/afsmonitor.c b/src/afsmonitor/afsmonitor.c +index e7b303071..a6a9e9741 100644 +--- a/src/afsmonitor/afsmonitor.c ++++ b/src/afsmonitor/afsmonitor.c +@@ -56,7 +56,6 @@ int afsmon_debug = 0; /* debug info to file ? */ + FILE *debugFD; /* debugging file descriptor */ + static int afsmon_output = 0; /* output to file ? */ + static int afsmon_detOutput = 0; /* detailed output ? */ +-static int afsmon_onceOnly = 0; /* probe once only ? (not implemented) */ + int afsmon_probefreq; /* probe frequency */ + static int wpkg_to_use; /* graphics package to use */ + static char output_filename[80]; /* output filename */ +@@ -3794,8 +3793,6 @@ afsmon_execute(void) + } + + FSinitFlags = 0; +- if (afsmon_onceOnly) /* option not provided at this time */ +- FSinitFlags |= XSTAT_FS_INITFLAG_ONE_SHOT; + + if (afsmon_debug) { + fprintf(debugFD, "[ %s ] Calling xstat_fs_Init \n", rn); +@@ -3867,8 +3864,6 @@ afsmon_execute(void) + collIDs[num_cm_collections++] = AFSCB_XSTATSCOLL_FULL_PERF_INFO; + + CMinitFlags = 0; +- if (afsmon_onceOnly) /* once only ? */ +- CMinitFlags |= XSTAT_CM_INITFLAG_ONE_SHOT; + + if (afsmon_debug) { + fprintf(debugFD, "[ %s ] Calling xstat_cm_Init \n", rn); +@@ -3892,19 +3887,6 @@ afsmon_execute(void) + + + /* end of process cache manager entries */ +- /* if only one probe was required setup a waiting process for the +- * termination signal */ +- if (afsmon_onceOnly) { +- code = LWP_WaitProcess(&terminationEvent); +- if (code) { +- if (afsmon_debug) { +- fprintf(debugFD, "LWP_WaitProcess() returned error %d\n", +- code); +- fflush(debugFD); +- } +- afsmon_Exit(135); +- } +- } + + /* start the gtx input server */ + code = (intptr_t)gtx_InputServer(afsmon_win); +-- +2.30.0 + diff --git a/0003-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch b/0003-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch deleted file mode 100644 index 39e70918d8b5..000000000000 --- a/0003-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch +++ /dev/null @@ -1,48 +0,0 @@ -From cf0eaaa6023b89bc2765148b33481dfddc072432 Mon Sep 17 00:00:00 2001 -From: Jeffrey Altman <jaltman@auristor.com> -Date: Thu, 14 Jan 2021 09:41:39 -0500 -Subject: [PATCH 3/5] rx: rx_InitHost do not overwrite RAND_bytes rx_nextCid - -39b165cdda941181845022c183fea1c7af7e4356 ("Move epoch and cid -generation into the rx core") introduced the use of RAND_bytes() -to generate the initial 'rx_nextCid' but failed to remove the - - rx_nextCid = ((tv.tv_sec ^ tv.tv_usec) << RX_CIDSHIFT; - -assignment inherited from IBM/Transarc. - -At Thu, 14 Jan 2021 08:25:36 GMT the IBM inherited calculation -overflows the value CID range. This triggers broken overflow -logic in update_nextCid(). - -Reviewed-on: https://gerrit.openafs.org/14491 -Reviewed-by: Andrew Deason <adeason@sinenomine.net> -Tested-by: Andrew Deason <adeason@sinenomine.net> -Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu> -Reviewed-by: Cheyenne Wills <cwills@sinenomine.net> -Tested-by: Mark Vitale <mvitale@sinenomine.net> -Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> -(cherry picked from commit a3bc7ff1501d51ceb3b39d9caed62c530a804473) - -Change-Id: If5f7d4ba1cacc6978c83fd512653fbaa0c1559d8 ---- - src/rx/rx.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/src/rx/rx.c b/src/rx/rx.c -index 244838d9c..e1e6d8fd6 100644 ---- a/src/rx/rx.c -+++ b/src/rx/rx.c -@@ -621,9 +621,6 @@ rx_InitHost(u_int host, u_int port) - MUTEX_ENTER(&rx_quota_mutex); - rxi_dataQuota += rx_extraQuota; /* + extra pkts caller asked to rsrv */ - MUTEX_EXIT(&rx_quota_mutex); -- /* *Slightly* random start time for the cid. This is just to help -- * out with the hashing function at the peer */ -- rx_nextCid = ((tv.tv_sec ^ tv.tv_usec) << RX_CIDSHIFT); - rx_connHashTable = (struct rx_connection **)htable; - rx_peerHashTable = (struct rx_peer **)ptable; - --- -2.30.0 - diff --git a/0004-rx-update_nextCid-overflow-handling-is-broken.patch b/0004-rx-update_nextCid-overflow-handling-is-broken.patch deleted file mode 100644 index cd9cf2a2b72b..000000000000 --- a/0004-rx-update_nextCid-overflow-handling-is-broken.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 9dbe1e09f2b8eea9164ddce756614cd9462e7784 Mon Sep 17 00:00:00 2001 -From: Jeffrey Altman <jaltman@auristor.com> -Date: Thu, 14 Jan 2021 09:57:13 -0500 -Subject: [PATCH 4/5] rx: update_nextCid overflow handling is broken - -The overflow handling in update_nextCid() produces a rx_nextCid -value of 0x80000001 which itself is out of the valid range. When -used to construct the first call of a new connection the connection -id for the call becomes 0x80000002, and all subsequent connections -also trigger the overflow handling and thus also receive connection -id 0x80000002. - -If the same connection id is used for multiple connections from -the same endpoint the accepting rx peer will be very confused. - -When authenticated connections are used, the CHALLENGE/RESPONSE -will fail because of a mismatch in the connection's callNumber -array. - -If an initiator makes only a single connection to a given rx peer, -that connection would succeed, but once multiple connections are -initiated all communication from a broken initiator to any rx peer -will fail. - -The incorrect overflow calculation was introduced by -39b165cdda941181845022c183fea1c7af7e4356 ("Move epoch and cid -generation into the rx core"). - -This change corrects the overflow value to become - - 1 << RX_CIDSHIFT - -Reviewed-on: https://gerrit.openafs.org/14492 -Reviewed-by: Andrew Deason <adeason@sinenomine.net> -Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> -Tested-by: Benjamin Kaduk <kaduk@mit.edu> -(cherry picked from commit 2c0a3901cbfcb231b7b67eb0899a3133516f33c8) - -Change-Id: I74d70706ddf99022bed639891cb610fba9ef863d ---- - src/rx/rx.c | 5 ++--- - 1 file changed, 2 insertions(+), 3 deletions(-) - -diff --git a/src/rx/rx.c b/src/rx/rx.c -index e1e6d8fd6..5d5953120 100644 ---- a/src/rx/rx.c -+++ b/src/rx/rx.c -@@ -6651,9 +6651,8 @@ update_nextCid(void) - { - /* Overflow is technically undefined behavior; avoid it. */ - if (rx_nextCid > MAX_AFS_INT32 - (1 << RX_CIDSHIFT)) -- rx_nextCid = -1 * ((MAX_AFS_INT32 / RX_CIDSHIFT) * RX_CIDSHIFT); -- else -- rx_nextCid += 1 << RX_CIDSHIFT; -+ rx_nextCid = 0; -+ rx_nextCid += 1 << RX_CIDSHIFT; - } - - static void --- -2.30.0 - diff --git a/0005-Remove-overflow-check-from-update_nextCid.patch b/0005-Remove-overflow-check-from-update_nextCid.patch deleted file mode 100644 index 4f8537068eb3..000000000000 --- a/0005-Remove-overflow-check-from-update_nextCid.patch +++ /dev/null @@ -1,49 +0,0 @@ -From ad49f820fec917e361ff4cd3fb999cfa956b010e Mon Sep 17 00:00:00 2001 -From: Benjamin Kaduk <kaduk@mit.edu> -Date: Thu, 14 Jan 2021 10:20:59 -0800 -Subject: [PATCH 5/5] Remove overflow check from update_nextCid - -The rx_nextCid global has been an unsigned type since -http://gerrit.openafs.org/11106 (which was actually merged before -the refactoring of overflow check to avoid signed integer overflow) -and thus there is no need to avoid signed overflow. The per-connection -cid has been unsigned since the IBM import. - -The natural unsigned behavior on overflow of wrapping is the desired -behvaior here, so just remove the extra logic and always increment. - -Reviewed-on: https://gerrit.openafs.org/14496 -Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu> -Reviewed-by: Benjamin Kaduk <kaduk@mit.edu> -Tested-by: Benjamin Kaduk <kaduk@mit.edu> -(cherry picked from commit 43ef1f2a5d80aa1c3f5b4831ada8e776ac0c7d13) - -Change-Id: I64fabe5229039f7af040902ed2e6f03dba7bc14d ---- - src/rx/rx.c | 6 ++---- - 1 file changed, 2 insertions(+), 4 deletions(-) - -diff --git a/src/rx/rx.c b/src/rx/rx.c -index 5d5953120..c713fefd8 100644 ---- a/src/rx/rx.c -+++ b/src/rx/rx.c -@@ -6644,14 +6644,12 @@ rxi_CancelGrowMTUEvent(struct rx_call *call) - } - - /* -- * Increment the counter for the next connection ID, handling overflow. -+ * Increment the counter for the next connection ID. -+ * Wrapping on unsigned integer overflow is the intended behavior. - */ - static void - update_nextCid(void) - { -- /* Overflow is technically undefined behavior; avoid it. */ -- if (rx_nextCid > MAX_AFS_INT32 - (1 << RX_CIDSHIFT)) -- rx_nextCid = 0; - rx_nextCid += 1 << RX_CIDSHIFT; - } - --- -2.30.0 - @@ -5,8 +5,8 @@ # https://github.com/michaellass/AUR pkgname=openafs -pkgver=1.8.6 -pkgrel=3 +pkgver=1.8.7 +pkgrel=1 pkgdesc="Open source implementation of the AFS distributed file system" arch=('i686' 'x86_64' 'armv7h') url="http://www.openafs.org" @@ -24,19 +24,15 @@ 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 tmpfiles.d-openafs.conf - 0001-Temporary-fix-for-compilation-with-GCC-10.patch - 0002-Adjust-RedHat-config-and-service-files.patch - 0003-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch - 0004-rx-update_nextCid-overflow-handling-is-broken.patch - 0005-Remove-overflow-check-from-update_nextCid.patch) -sha256sums=('8b4e9d3180f1ecd752753da17ac630df04eb7007c90a921a5f6403c0339d2945' - 'e34fa28d9ee06b47d080e4ed0c1f55fe2629ce974f1a7a7ec60dd6e87a9d21e9' + 0001-Adjust-RedHat-config-and-service-files.patch + 0002-Avoid-duplicate-definitions-of-globals.patch + 0003-afsmonitor-remove-unused-LWP_WaitProcess.patch) +sha256sums=('53543a561fce67714fec9f2a6bf408c5cc1d061c7dc9d1459458275e8ccbfa79' + 'd61384efdce1aacabdd1890062ada741c0e0aeb4cc973811a493dcda6f4a317f' '18d7b0173bbffbdc212f4e58c5b3ce369adf868452aabc3485f2a6a2ddb35d68' - '5a64f667ef5c63a0b54e859ccde0a69f6d883bfadfa5ce4b3e0a98e613764258' - '30cd5cb67782161a8510039c14479a02252e3bb80fdf23795753ddb7f1aeadf7' - '302cf63380e43145949f6e91e9510fdc8ed94de915b90975212a5bdb55bb9259' - '3ab566be3b11bcd8e59d7809ee4e73e3b7206b7cf21097d5cf55675543c2b785' - '94dea81621ba41b7b1122d977c60d66431b64bead0d6796ef322b04196579e63') + '56a35ca8a7946cfe379e7704f0a982e7bb70ba64bca3c0379c676fae36d416f1' + '2c49e0917eb8cee44b740f128e1991d75fbd53ac0661e2541824c1e9ecfd5ad1' + 'b816e2d934c281e9d9e07ce608a74d5354b6be92c5597a1cb962f6c943800a16') # 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. @@ -45,22 +41,15 @@ ENABLE_KAUTH=0 prepare() { cd "${srcdir}/${pkgname}-${pkgver}" - # Fix compilation with GCC 10 (see https://bugs.gentoo.org/706738 and https://gerrit.openafs.org/14106) - patch -p1 < "${srcdir}/0001-Temporary-fix-for-compilation-with-GCC-10.patch" - # Adjust RedHat config and service files to our needs - patch -p1 < "${srcdir}/0002-Adjust-RedHat-config-and-service-files.patch" + patch -p1 < "${srcdir}"/0001-Adjust-RedHat-config-and-service-files.patch - # Fix RX bug triggered after 14.01.2021 08:25:36 UTC - # https://gerrit.openafs.org/#/c/14493/ - # https://gerrit.openafs.org/#/c/14494/ - # https://gerrit.openafs.org/#/c/14497/ - patch -p1 < "${srcdir}"/0003-rx-rx_InitHost-do-not-overwrite-RAND_bytes-rx_nextCi.patch - patch -p1 < "${srcdir}"/0004-rx-update_nextCid-overflow-handling-is-broken.patch - patch -p1 < "${srcdir}"/0005-Remove-overflow-check-from-update_nextCid.patch + # Fix compilation with GCC 10 + patch -p1 < "${srcdir}"/0002-Avoid-duplicate-definitions-of-globals.patch + patch -p1 < "${srcdir}"/0003-afsmonitor-remove-unused-LWP_WaitProcess.patch # Only needed when changes to configure were made - ./regen.sh -q + # ./regen.sh -q } build() { |