+++ /dev/null
-From: Anders Kaseorg <andersk@mit.edu>
-Date: Tue, 6 Dec 2016 10:48:31 -0500
-Subject: AFS_component_version_number.c: Respect SOURCE_DATE_EPOCH if set
-
-To improve build reproducibility, if the SOURCE_DATE_EPOCH environment
-variable is set, use it to deterministically replace the embedded build
-date, and do not include the username or hostname in this case.
-
-https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal
-
-Change-Id: I9ba951f1836385ffd14aad95f071bf8c672a01bb
-(cherry picked from commit 21055d8f80b1a6214e4e25e6118e14c916a00fa5)
----
- src/config/Makefile.version-NOCML.in | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/src/config/Makefile.version-NOCML.in b/src/config/Makefile.version-NOCML.in
-index 325baa4..a286009 100644
---- a/src/config/Makefile.version-NOCML.in
-+++ b/src/config/Makefile.version-NOCML.in
-@@ -11,7 +11,11 @@ AFS_component_version_number.o: AFS_component_version_number.c
-
- AFS_component_version_number.c: @TOP_OBJDIR@/src/config/Makefile.version
- ( VERSION=`@abs_top_srcdir@/build-tools/git-version @abs_top_srcdir@ "@VERSION@"` && \
-- echo 'char cml_version_number[]="@(#)OpenAFS '$$VERSION `date +"%Y-%m-%d"` $$USER@`hostname`'";' >AFS_component_version_number.c.NEW && \
-+ if [ "$$SOURCE_DATE_EPOCH" ]; then \
-+ echo 'char cml_version_number[]="@(#)OpenAFS '$$VERSION `date -u -d "@$$SOURCE_DATE_EPOCH" +"%Y-%m-%d" 2>/dev/null || date -u -r "$$SOURCE_DATE_EPOCH" +"%Y-%m-%d" 2>/dev/null || date -u +"%Y-%m-%d"`'";'; \
-+ else \
-+ echo 'char cml_version_number[]="@(#)OpenAFS '$$VERSION `date +"%Y-%m-%d"` $$USER@`hostname`'";'; \
-+ fi >AFS_component_version_number.c.NEW && \
- echo 'char* AFSVersion = "${PACKAGE} '$$VERSION'";' >>AFS_component_version_number.c.NEW && \
- if cmp AFS_component_version_number.c.NEW AFS_component_version_number.c > /dev/null 2>&1 ; then : ; else \
- mv AFS_component_version_number.c.NEW AFS_component_version_number.c ; fi )
+++ /dev/null
-From: Benjamin Kaduk <kaduk@mit.edu>
-Date: Thu, 23 Oct 2014 17:28:43 -0400
-Subject: Add dummy -exit command for afsd to do nothing
-
----
- src/afsd/afsd.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/src/afsd/afsd.c b/src/afsd/afsd.c
-index 0976099..fcf3988 100644
---- a/src/afsd/afsd.c
-+++ b/src/afsd/afsd.c
-@@ -362,6 +362,7 @@ enum optionsList {
- OPT_dynrootsparse,
- OPT_rxmaxfrags,
- OPT_inumcalc,
-+ OPT_exit,
- };
-
- #ifdef MACOS_EVENT_HANDLING
-@@ -1905,6 +1906,10 @@ CheckOptions(struct cmd_syndesc *as)
- if (cmd_OptionPresent(as, OPT_inumcalc)) {
- cmd_OptionAsString(as, OPT_inumcalc, &inumcalc);
- }
-+ if (as->parms[39].items) {
-+ /* -exit */
-+ exit(0);
-+ }
-
- /* parse cacheinfo file if this is a diskcache */
- if (ParseCacheInfoFile()) {
-@@ -2624,6 +2629,8 @@ afsd_init(void)
- "send/receive per Rx packet");
- cmd_AddParmAtOffset(ts, OPT_inumcalc, "-inumcalc", CMD_SINGLE, CMD_OPTIONAL,
- "Set inode number calculation method");
-+ cmd_AddParmAtOffset(ts, OPT_exit, "-exit", CMD_FLAG, CMD_OPTIONAL,
-+ "exit immediately");
- }
-
- /**
+++ /dev/null
-From: Benjamin Kaduk <kaduk@mit.edu>
-Date: Thu, 15 Dec 2016 22:29:41 -0600
-Subject: softsig-helper: fix signame() loop
-
-We want to iterate through the length of the array, not whatever
-sizeof(<length of the array>) happens to evaluate to.
-
-Change-Id: I5d939e241e848ed800524d5f501e0504d2b0b42d
----
- tests/opr/softsig-helper.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/opr/softsig-helper.c b/tests/opr/softsig-helper.c
-index 91fa351..416f07c 100644
---- a/tests/opr/softsig-helper.c
-+++ b/tests/opr/softsig-helper.c
-@@ -55,7 +55,7 @@ static struct sigtable {
- static char *signame(int signo) {
- int i;
-
-- for (i = 0; i < sizeof(sizeof(sigtable) / sizeof(sigtable[0])); ++i) {
-+ for (i = 0; i < sizeof(sigtable) / sizeof(sigtable[0]); ++i) {
- if (sigtable[i].signo == signo) {
- return sigtable[i].name;
- }
+++ /dev/null
-From: Benjamin Kaduk <kaduk@mit.edu>
-Date: Thu, 15 Dec 2016 23:46:09 -0500
-Subject: Run jhash-t verbosely
-
-It's failing on several buildds and we need more information to
-debug why.
----
- tests/Makefile.in | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/tests/Makefile.in b/tests/Makefile.in
-index 23f1fa0..0e01fcb 100644
---- a/tests/Makefile.in
-+++ b/tests/Makefile.in
-@@ -23,6 +23,8 @@ runtests.o: $(srcdir)/runtests.c
- check test tests: runtests
- @for A in $(SUBDIRS); do cd $$A && $(MAKE) $@ && cd .. || exit 1; done
- MAKECHECK=1 ./libwrap @TOP_OBJDIR@/lib \
-+ ./runtests -o $(abs_top_srcdir)/tests/opr/jhash
-+ MAKECHECK=1 ./libwrap @TOP_OBJDIR@/lib \
- ./runtests $(abs_top_srcdir)/tests/TESTS
-
- install:
+++ /dev/null
-From: Stephan Wiesand <stephan.wiesand@desy.de>
-Date: Mon, 24 Jul 2017 11:37:54 +0200
-Subject: 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.
-
-Change-Id: I0ec45aac961dcefa0856a15ee218085626a357c7
-Reviewed-on: https://gerrit.openafs.org/12663
-Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
-Tested-by: Benjamin Kaduk <kaduk@mit.edu>
----
- 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 627b477253..077d4edfb8 100644
---- a/src/afs/LINUX/osi_misc.c
-+++ b/src/afs/LINUX/osi_misc.c
-@@ -140,7 +140,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 2b1be3b0c6..4d56c4eb99 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
-
+++ /dev/null
-From: Anders Kaseorg <andersk@mit.edu>
-Date: Wed, 14 Dec 2016 17:52:35 -0500
-Subject: opr: ExitHandler: re-raise the signal instead of exiting with that
- code
-MIME-Version: 1.0
-Content-Type: text/plain; charset="utf-8"
-Content-Transfer-Encoding: 8bit
-
-This fixes a ‘make check’ failure introduced by commit
-803d15b6aa1e65b259ba11ca30aa1afd2e12accb “vlserver: convert the vlserver
-to opr softsig”:
-
- $ make check
- …
- volser/vos..............FAILED 6
- …
- $ cd tests
- $ ./libwrap ../lib ./runtests -o volser/vos
- 1..6
- ok 1 - Successfully got security class
- ok 2 - Successfully built ubik client structure
- ok 3 - First address registration succeeds
- ok 4 - Second address registration succeeds
- ok 5 - vos output matches
- Server exited with code 15
- # wanted: 0
- # seen: -1
- not ok 6 - Server exited cleanly
- # Looks like you failed 1 test of 6
-
-afstest_StopServer has a check for the process terminating with signal
-15 (SIGTERM), but not for the process exiting with code 15.
-
-Change-Id: I022965ea2b5440486ea1cf562551d3bbd0516104
----
- src/opr/softsig.c | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/src/opr/softsig.c b/src/opr/softsig.c
-index 4a210ad..469bd43 100644
---- a/src/opr/softsig.c
-+++ b/src/opr/softsig.c
-@@ -82,6 +82,13 @@ signalHandler(void *arg)
- static void
- ExitHandler(int signal)
- {
-+ sigset_t set;
-+ sigemptyset(&set);
-+ sigaddset(&set, signal);
-+ pthread_sigmask(SIG_UNBLOCK, &set, NULL);
-+ raise(signal);
-+
-+ /* Should be unreachable. */
- exit(signal);
- }
-
+++ /dev/null
-From: Anders Kaseorg <andersk@mit.edu>
-Date: Fri, 16 Dec 2016 03:04:18 -0500
-Subject: opr: Make opr_jhash_opaque consistent with opr_jhash
-
-Change-Id: I42e1030f8c841dcb974476012a774b91c87d3fb0
----
- src/opr/jhash.h | 2 +-
- tests/opr/jhash-t.c | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/src/opr/jhash.h b/src/opr/jhash.h
-index e7b7d5d53..9c82f9c98 100644
---- a/src/opr/jhash.h
-+++ b/src/opr/jhash.h
-@@ -125,7 +125,7 @@ opr_jhash_opaque(const void *val, size_t length, afs_uint32 initval)
- afs_uint32 a,b,c;
-
- /* Set up the internal state */
-- a = b = c = 0xdeadbeef + (((afs_uint32)length)<<2) + initval;
-+ a = b = c = 0xdeadbeef + ((afs_uint32)length) + initval;
-
- while (length > 12) {
- a += (afs_uint32) str[3]<<24 |
-diff --git a/tests/opr/jhash-t.c b/tests/opr/jhash-t.c
-index 92661c27e..bde5a2e40 100644
---- a/tests/opr/jhash-t.c
-+++ b/tests/opr/jhash-t.c
-@@ -65,10 +65,10 @@ main(int argc, char **argv)
- is_int(0xdeadbeef, opr_jhash_opaque("", 0, 0),
- "Hashing an empty string works");
-
-- is_int(2748273291UL,
-+ is_int(393676113,
- opr_jhash_opaque("Four score and seven years ago", 30, 0),
- "Hashing a string with a 0 initval works");
-- is_int(1389900913,
-+ is_int(3445784929UL,
- opr_jhash_opaque("Four score and seven years ago", 30, 1),
- "Hashing a string with a 1 initval works");
- return 0;
+++ /dev/null
-From: Anders Kaseorg <andersk@mit.edu>
-Date: Fri, 16 Dec 2016 02:16:20 -0500
-Subject: opr: Make opr_jhash_opaque endian-independent
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-gcc -O2 produces exactly the same code for this on little-endian
-systems, but now big-endian systems have a chance of passing ‘make
-check’.
-
-Change-Id: Ifc6350648355a0a9f79184439e3f9522cd6f2ffa
----
- src/opr/jhash.h | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/src/opr/jhash.h b/src/opr/jhash.h
-index 5c6e3ad6c..e7b7d5d53 100644
---- a/src/opr/jhash.h
-+++ b/src/opr/jhash.h
-@@ -123,16 +123,23 @@ opr_jhash_opaque(const void *val, size_t length, afs_uint32 initval)
- {
- const unsigned char *str = (const unsigned char *) val;
- afs_uint32 a,b,c;
-- afs_uint32 k[3];
-
- /* Set up the internal state */
- a = b = c = 0xdeadbeef + (((afs_uint32)length)<<2) + initval;
-
- while (length > 12) {
-- memcpy(&k, str, 12);
-- a += k[0];
-- b += k[1];
-- c += k[2];
-+ a += (afs_uint32) str[3]<<24 |
-+ (afs_uint32) str[2]<<16 |
-+ (afs_uint32) str[1]<<8 |
-+ (afs_uint32) str[0];
-+ b += (afs_uint32) str[7]<<24 |
-+ (afs_uint32) str[6]<<16 |
-+ (afs_uint32) str[5]<<8 |
-+ (afs_uint32) str[4];
-+ c += (afs_uint32) str[11]<<24 |
-+ (afs_uint32) str[10]<<16 |
-+ (afs_uint32) str[9]<<8 |
-+ (afs_uint32) str[8];
- opr_jhash_mix(a, b, c);
- length -= 12;
- str += 12;
+++ /dev/null
-From: Anders Kaseorg <andersk@mit.edu>
-Date: Fri, 16 Dec 2016 02:43:48 -0500
-Subject: opr: Make opr_uuid_hash endian-independent
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-And also make sure it doesn’t use unaligned accesses. Fixes a ‘make
-check’ failure on big-endian architectures.
-
-Change-Id: I490174f8d1eecb5f20969b4ef12ff16d0dd3806a
----
- src/opr/uuid.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/src/opr/uuid.c b/src/opr/uuid.c
-index 493c660b2..6a22ca3c2 100644
---- a/src/opr/uuid.c
-+++ b/src/opr/uuid.c
-@@ -58,9 +58,7 @@ opr_uuid_equal(const opr_uuid_t *uuid1, const opr_uuid_t *uuid2)
- unsigned int
- opr_uuid_hash(const opr_uuid_t *uuid)
- {
-- /* uuid->data is a (unsigned char *), so there's every danger that this
-- * may cause an unaligned access on some platforms */
-- return opr_jhash((const afs_uint32 *)uuid->data, 4, 0);
-+ return opr_jhash_opaque(uuid->data, sizeof(uuid->data), 0);
- }
-
- #if !defined(KERNEL)
-0003-Add-dummy-exit-command-for-afsd-to-do-nothing.patch
-0002-AFS_component_version_number.c-Respect-SOURCE_DATE_E.patch
0003-Catch-up-to-roken-s-rename-of-base64-symbols.patch
-tests-opr-softsig-t-Avoid-hanging-due-to-intermediat.patch
-opr-ExitHandler-re-raise-the-signal-instead-of-exiti.patch
-0006-softsig-helper-fix-signame-loop.patch
-0007-Run-jhash-t-verbosely.patch
-opr-Make-opr_jhash_opaque-endian-independent.patch
-opr-Make-opr_jhash_opaque-consistent-with-opr_jhash.patch
-opr-Make-opr_uuid_hash-endian-independent.patch
+++ /dev/null
-From: Anders Kaseorg <andersk@mit.edu>
-Date: Wed, 14 Dec 2016 15:47:21 -0500
-Subject: tests/opr/softsig-t: Avoid hanging due to intermediate sh -c
-
-If the build directory happened to contain shell metacharacters, like
-the ~ in /build/openafs-vb8tid/openafs-1.8.0~pre1 used by the Debian
-builders, Perl was running softsig-helper via an intermediate sh -c,
-which would then intercept the signals we tried to send to
-softsig-helper. Use the list syntax to avoid this sh -c.
-
-Change-Id: I054b9c8f606e197accb414bfe3f89719255c62c4
----
- tests/opr/softsig-t | 14 ++++++++++----
- 1 file changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/tests/opr/softsig-t b/tests/opr/softsig-t
-index 89e66e5..533feb4 100755
---- a/tests/opr/softsig-t
-+++ b/tests/opr/softsig-t
-@@ -33,8 +33,14 @@ use FindBin qw($Bin);
- # Start up our test process, and send it various signals. Check that these
- # signals make it to it correctly, and are reported on the command line.
- my $softsig_helper = $Bin . "/softsig-helper";
--my $pid=open(HELPER, "$softsig_helper |")
-- or die "Couldn't start test helper.";
-+
-+# This -dummy argument prevents Perl from putting an intermediate sh
-+# -c between us and softsig-helper in the case where the build
-+# directory happens to contain shell metacharacters, like the ~ in
-+# /build/openafs-vb8tid/openafs-1.8.0~pre1 used by the Debian
-+# builders.
-+my $pid = open(HELPER, "-|", $softsig_helper, "-dummy")
-+ or die "Couldn't start test helper.";
-
- # Wait for softsig to start up.
- is(<HELPER>, "Ready\n");
-@@ -71,7 +77,7 @@ is($?, SIGKILL, "Helper exited on KILL signal.");
-
- # Check that an internal segmentation fault kills the process.
-
--$pid = open(HELPER, "$softsig_helper -crash |")
-+$pid = open(HELPER, "-|", $softsig_helper, "-crash")
- or die "Couldn't start test helper.";
- close(HELPER);
- is($? & 0x7f, SIGSEGV, "Helper exited on SEGV signal.");
-@@ -84,7 +90,7 @@ SKIP: {
- skip("Skipping buserror test; SIGBUS constant is not defined.", 1) unless $sigbus;
-
- my ($fh, $path) = mkstemp("/tmp/softsig-t_XXXXXX");
-- $pid = open(HELPER, "$softsig_helper -buserror $path |")
-+ $pid = open(HELPER, "-|", $softsig_helper, "-buserror", $path)
- or die "Couldn't start test helper.";
- close(HELPER);
- is($? & 0x7f, $sigbus, "Helper exited on BUS signal.");