summaryrefslogtreecommitdiff
path: root/core/nfs-utils
diff options
context:
space:
mode:
Diffstat (limited to 'core/nfs-utils')
-rw-r--r--core/nfs-utils/PKGBUILD31
-rw-r--r--core/nfs-utils/nfs-utils-2.3.4-nfsdcld-sqlite-PRIx.patch101
-rw-r--r--core/nfs-utils/nfs-utils-2.3.4-rpcgen-missing-prototype.patch12
-rw-r--r--core/nfs-utils/nfs-utils-2.3.4-testing-statdb_dump-linking.patch13
4 files changed, 157 insertions, 0 deletions
diff --git a/core/nfs-utils/PKGBUILD b/core/nfs-utils/PKGBUILD
new file mode 100644
index 00000000..a8261df5
--- /dev/null
+++ b/core/nfs-utils/PKGBUILD
@@ -0,0 +1,31 @@
+# sprintf format patches: https://marc.info/?l=linux-nfs&m=155854918115682&w=2
+source+=(nfs-utils-2.3.4-nfsdcld-sqlite-PRIx.patch)
+sha1sums+=('4c6c2bc5d188d969b48707366aa7d1b8b255ecc4')
+eval "$(
+ declare -f prepare | \
+ sed '
+ /.*autoreconf.*/i patch -p1 < ../nfs-utils-2.3.4-nfsdcld-sqlite-PRIx.patch
+ '
+)"
+
+# linking errors for statdb_dump test program
+source+=(nfs-utils-2.3.4-testing-statdb_dump-linking.patch)
+sha1sums+=('2d629464292af5a3224173bb8f055d96e00ba68c')
+eval "$(
+ declare -f prepare | \
+ sed '
+ /.*autoreconf.*/i patch -p1 < ../nfs-utils-2.3.4-testing-statdb_dump-linking.patch
+ '
+)"
+
+# -Werror==missing-prototypes aborts 'make check' because 'nlm_sm_prog_3' and
+# 'nlm_sm_prog_4' get no prototypes in 'nlm_sm_inter.h' when generated with 'rpcgen'
+# (could be a bug in 'rpcsvc-proto')\
+source+=(nfs-utils-2.3.4-rpcgen-missing-prototype.patch)
+sha1sums+=('ae1c467933547aa71ff4660c953734d2de69e9e0')
+eval "$(
+ declare -f prepare | \
+ sed '
+ /.*autoreconf.*/i patch -p1 < ../nfs-utils-2.3.4-rpcgen-missing-prototype.patch
+ '
+)"
diff --git a/core/nfs-utils/nfs-utils-2.3.4-nfsdcld-sqlite-PRIx.patch b/core/nfs-utils/nfs-utils-2.3.4-nfsdcld-sqlite-PRIx.patch
new file mode 100644
index 00000000..692376b1
--- /dev/null
+++ b/core/nfs-utils/nfs-utils-2.3.4-nfsdcld-sqlite-PRIx.patch
@@ -0,0 +1,101 @@
+diff -rauN nfs-utils-2.3.4/utils/nfsdcld/sqlite.c nfs-utils-2.3.4-nfsdcld-sqlite-PRIx-patch/utils/nfsdcld/sqlite.c
+--- nfs-utils-2.3.4/utils/nfsdcld/sqlite.c 2019-05-10 21:09:49.000000000 +0200
++++ nfs-utils-2.3.4-nfsdcld-sqlite-PRIx-patch/utils/nfsdcld/sqlite.c 2019-05-23 11:35:41.306666615 +0200
+@@ -52,6 +52,7 @@
+ #include <string.h>
+ #include <sys/stat.h>
+ #include <sys/types.h>
++#include <inttypes.h>
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <stdlib.h>
+@@ -535,7 +536,7 @@
+ xlog(L_ERROR, "Unable to begin transaction: %s", err);
+ goto rollback;
+ }
+- ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016lx\";",
++ ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016" PRIx64 "\";",
+ current_epoch);
+ if (ret < 0) {
+ xlog(L_ERROR, "sprintf failed!");
+@@ -550,7 +551,7 @@
+ xlog(L_ERROR, "Unable to clear records from current epoch: %s", err);
+ goto rollback;
+ }
+- ret = snprintf(buf, sizeof(buf), "INSERT INTO \"rec-%016lx\" "
++ ret = snprintf(buf, sizeof(buf), "INSERT INTO \"rec-%016" PRIx64 "\" "
+ "SELECT id FROM attached.clients;",
+ current_epoch);
+ if (ret < 0) {
+@@ -703,7 +704,7 @@
+ int ret;
+ sqlite3_stmt *stmt = NULL;
+
+- ret = snprintf(buf, sizeof(buf), "INSERT OR REPLACE INTO \"rec-%016lx\" "
++ ret = snprintf(buf, sizeof(buf), "INSERT OR REPLACE INTO \"rec-%016" PRIx64 "\" "
+ "VALUES (?);", current_epoch);
+ if (ret < 0) {
+ xlog(L_ERROR, "sprintf failed!");
+@@ -748,7 +749,7 @@
+ int ret;
+ sqlite3_stmt *stmt = NULL;
+
+- ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016lx\" "
++ ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016" PRIx64 "\" "
+ "WHERE id==?;", current_epoch);
+ if (ret < 0) {
+ xlog(L_ERROR, "sprintf failed!");
+@@ -798,7 +799,7 @@
+ int ret;
+ sqlite3_stmt *stmt = NULL;
+
+- ret = snprintf(buf, sizeof(buf), "SELECT count(*) FROM \"rec-%016lx\" "
++ ret = snprintf(buf, sizeof(buf), "SELECT count(*) FROM \"rec-%016" PRIx64 "\" "
+ "WHERE id==?;", recovery_epoch);
+ if (ret < 0) {
+ xlog(L_ERROR, "sprintf failed!");
+@@ -873,7 +874,7 @@
+ tcur++;
+
+ ret = snprintf(buf, sizeof(buf), "UPDATE grace "
+- "SET current = %ld, recovery = %ld;",
++ "SET current = %" PRId64 ", recovery = %" PRId64 ";",
+ (int64_t)tcur, (int64_t)trec);
+ if (ret < 0) {
+ xlog(L_ERROR, "sprintf failed!");
+@@ -891,7 +892,7 @@
+ goto rollback;
+ }
+
+- ret = snprintf(buf, sizeof(buf), "CREATE TABLE \"rec-%016lx\" "
++ ret = snprintf(buf, sizeof(buf), "CREATE TABLE \"rec-%016" PRIx64 "\" "
+ "(id BLOB PRIMARY KEY);",
+ tcur);
+ if (ret < 0) {
+@@ -915,7 +916,7 @@
+ * values in the grace table, just clear out the records for
+ * the current reboot epoch.
+ */
+- ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016lx\";",
++ ret = snprintf(buf, sizeof(buf), "DELETE FROM \"rec-%016" PRIx64 "\";",
+ tcur);
+ if (ret < 0) {
+ xlog(L_ERROR, "sprintf failed!");
+@@ -976,7 +977,7 @@
+ goto rollback;
+ }
+
+- ret = snprintf(buf, sizeof(buf), "DROP TABLE \"rec-%016lx\";",
++ ret = snprintf(buf, sizeof(buf), "DROP TABLE \"rec-%016" PRIx64 "\";",
+ recovery_epoch);
+ if (ret < 0) {
+ xlog(L_ERROR, "sprintf failed!");
+@@ -1027,7 +1028,7 @@
+ return -EINVAL;
+ }
+
+- ret = snprintf(buf, sizeof(buf), "SELECT * FROM \"rec-%016lx\";",
++ ret = snprintf(buf, sizeof(buf), "SELECT * FROM \"rec-%016" PRIx64 "\";",
+ recovery_epoch);
+ if (ret < 0) {
+ xlog(L_ERROR, "sprintf failed!");
diff --git a/core/nfs-utils/nfs-utils-2.3.4-rpcgen-missing-prototype.patch b/core/nfs-utils/nfs-utils-2.3.4-rpcgen-missing-prototype.patch
new file mode 100644
index 00000000..bbc610c7
--- /dev/null
+++ b/core/nfs-utils/nfs-utils-2.3.4-rpcgen-missing-prototype.patch
@@ -0,0 +1,12 @@
+diff -rauN nfs-utils-2.3.4/configure.ac nfs-utils-2.3.4-rpcgen-missing-prototype-patch/configure.ac
+--- nfs-utils-2.3.4/configure.ac 2019-05-10 21:09:49.000000000 +0200
++++ nfs-utils-2.3.4-rpcgen-missing-prototype-patch/configure.ac 2019-05-23 12:02:26.639999948 +0200
+@@ -578,7 +578,7 @@
+ -Wall \
+ -Wextra \
+ $rpcgen_cflags \
+- -Werror=missing-prototypes \
++ -Wmissing-prototypes \
+ -Werror=missing-declarations \
+ -Werror=format=2 \
+ -Werror=undef \
diff --git a/core/nfs-utils/nfs-utils-2.3.4-testing-statdb_dump-linking.patch b/core/nfs-utils/nfs-utils-2.3.4-testing-statdb_dump-linking.patch
new file mode 100644
index 00000000..e541ac78
--- /dev/null
+++ b/core/nfs-utils/nfs-utils-2.3.4-testing-statdb_dump-linking.patch
@@ -0,0 +1,13 @@
+diff -rauN nfs-utils-2.3.4/tests/Makefile.am nfs-utils-2.3.4-testing-statdb_dump-linking-patch/tests/Makefile.am
+--- nfs-utils-2.3.4/tests/Makefile.am 2019-05-10 21:09:49.000000000 +0200
++++ nfs-utils-2.3.4-testing-statdb_dump-linking-patch/tests/Makefile.am 2019-05-23 11:58:40.659999955 +0200
+@@ -4,7 +4,8 @@
+ statdb_dump_SOURCES = statdb_dump.c
+
+ statdb_dump_LDADD = ../support/nfs/.libs/libnfs.a \
+- ../support/nsm/libnsm.a $(LIBCAP)
++ ../support/nsm/libnsm.a $(LIBCAP) \
++ ../support/misc/libmisc.a
+
+ SUBDIRS = nsm_client
+