diod: update to 1.0.24-tip

Along with the new commits, we do the following:

   - drop the upstreamed patch
   - pass our systemd system unit dir to configure
   - disable auth to fix a build error

Bumping diod to version 1.0-pre27-763-g54d1325, which comprises the following commits:

    b91d74b diod: Fix uint32 overflow when Tread/Twrite count > UINT32_MAX-IOHDRSZ
    539827e diod: keep --foreground option for compatibility
    9126275 build: don't just warn if libcap is missing
    729830b build: don't just warn if munge is missing
    4b04d68 diod: require --no-auth if not build with munge
    45ae4ac diod: make multi-user initialization errors fatal
    fb4a588 diod: refactor startup logic for clarity
    a474d34 build: adjust multi-user configuration options
    4684e5c diod: log access policy
    06e325b diod: use setgroups() on linux for transition
    d093411 diod: log user transition and simplify code
    cce7b2d diod: don't cache effective uid
    2948cc7 systemd: support systemctl reload diod
    5e22ace diod: log listen addresses
    6d3d25d diod: drop program prefix from logs
    e5d270f testsuite: fix test server TAP logging
    d666304 diod: initialize rdma after user transitions
    ef46b9b ci: add build-only check for RDMA
    8615778 ci: cull package dependencies
    9380f2d build: fix rdma configure logic
    2038957 rdma: fix include paths
    7aea316 systemd: switch to Type=exec from Type=forking
    2f9e3f8 man: drop --foreground from diod(8)
    3dc9363 diod: always run in the foreground
    cc881bd man: drop syslog from diod(8), diod.conf(5)
    4de6eed diod: drop --logdest=syslog[options]
    c8775c2 libdiod: drop leftover TCP Wrappers stuff
    9abd6ae testsuite: drop setgroups unit test
    d367f3a diod: make SYS_setgroups test safer
    b78d7cd diod: improve supplementary group warning + comments
    cf4bfac build: drop FreeBSD automatic --disable-diodmount
    43b2e25 build: drop configure --disable-tests option
    1a9391d build: drop checks for vsprintf(), vsscanf()
    59b221f drop TCP Wrappers support
    e96f369 build: drop conditional getopt stuff
    c510de8 build: drop libpopt references
    bd0d3ac tests: Handle various time_t sizes in printf (#124)
    adc86ad testsuite: drop unused tests
    8b18a31 testsuite: skip FALLOC_FL_PUNCH_HOLE in fsx
    e08d71e testsuite: drop record locking kernel tests
    c24c22f testsuite: drop fcntl locking test
    7cacf63 testsuite: add locking unit test
    9b1bdc3 libnpclient: add npc_lock() and npc_getlock()
    7ea6e7f libnpfs: replace kernel 9p.h header
    4ab0076 don't include 9p.h directly
    b66c8a9 testsuite: reduce unnecessary include directives
    e057687 headers include the headers they depend on
    cb0c9dc add header guards
    c992e0e testsuite: factor out duplicated server code
    5567efc testsuite: factor out duplicated thread code
    9730b8f eliminate src/daemon directory
    f5fe359 testsuite: enable parallel test harness
    ff57671 build: fix Makefile.am typo
    932fea8 testsuite: make unit tests work w/parallel harness
    ccf9dc5 liblsd: clean up source directory dependencies
    3b6ce5c ci: valgrind and sudo some unit tests
    7b435ab testsuite: convert multiuser cli/srv test to TAP
    3d5d90a testsuite: convert dir/file cli/srv test to TAP
    2e4645d testsuite: convert simple np cli/srv test to TAP
    aaa28bc testsuite: convert config file test to TAP
    3a97415 testsuite: convert setreuid test to TAP
    b810cd4 testsuite: convert setgroups groups test to TAP
    c87295e testsuite: convert setfsuid test to TAP
    1300b50 testsuite: convert fcntl locking test to TAP
    3022797 testsuite: convert capability test to TAP
    f8cd2ed testsuite: convert list test to TAP
    e7a67b6 testsuite: convert opt test to TAP
    6829e1e testsuite: convert fidpool test to TAP
    ca886f4 testsuite: convert encoding test to TAP
    a1e4e7d testsuite: add TAP unit test framework
    cf9496b diodmount: drop --9nbd-attach, --9nbd-detach opts
    dbed88e fix fsid in Rstatfs result
    d2b311f doc: update Rstatfs description
    573d107 implement Tfsync datasync
    075c321 doc: Tfsync is missing 'datasync'
    2265d6b libnpfs: catch overflow in np_deserialize_p9dirent
    6b4384d build: add make deb target for debian package
    e97e68d src: move source code to one directory
    d698cd9 man: move all man pages to one directory
    7a5671b simplify autogen.sh script
    43db888 build: combine and simplify etc and scripts
    c081e85 configure: normalize systemd unit install
    968bd75 configure: drop AC_HEADER_STDC
    c02fe09 configure: use AC_CONFIG_HEADERS
    7bc04ab libnpfs: fix off by one buffer check
    34263af diod: check offset in xattr read/write
    65d69a8 diod: handle xattr write errors properly
    c529cd8 ci: run kernel tests in CI
    b0a25c5 testsuite: fix racy test looking for old bug
    f3c4a7d ci: add scrub to github workflow
    e4bbbe7 testsuite: drop subversion test
    1e3cb24 testsuite: remove security xattr XFAIL
    55da67f testsuite: add setfattr prereq to t46,t47
    6dea909 testsuite: drop internal copy of dbench
    eb0306c testsuite: remove dbench XFAIL
    d4401fc testsuite: set root mount propagation to private
    2b03061 Shutdown all connection threads when applications is terminated
    f300f90 Signal that connection is done after all cleanup has finished
    9819777 Use a pthread_cleanup callback function in connection thread
    49c4c32 signal refcond in connection under lock
    4c6e4bd tests: Skip kern tests t35 and t40 unless there is enough disk space
    6985948 Mark kernel tests t19 t23 t32 t37 t43 and t47 as XFAIL
    70e9b6b tests/kern/runtest: Delete PATH_EXPDIR and PATH_MNTDIR on failure
    180749e tests/user/runtest: Delete PATH_EXPDIR when it is a file
    2bb882a tests/user/t16: Delete the tempfile on failure
    e0cd706 Don't use pushd/popd in kern test t33
    e9097f9 Use grep -E instead of egrep in kern test t28
    9684b82 kern test t28 requires rsync, skip if it not available
    eae17bc Handle various time_t sizes in printf and scanf
    76fd64e ci: drop deprecated 18.04 actions runner
    f7dc0e8 add mergify support
    f732f19 auto.diod.in: remove bashisms

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2025-03-24 23:29:18 +00:00
parent a309b738e7
commit 178e395a95
2 changed files with 3 additions and 102 deletions

View File

@ -9,16 +9,17 @@ LICENSE = "GPL-2.0-only"
LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
PV = "1.0.24+git"
SRCREV = "b4b5e8e00ed11b21d7fcf05a080dc054a8eac2d6"
SRCREV = "54d1325fc435d14a6f5c161c88dac79b016b0061"
SRC_URI = "git://github.com/chaos/diod.git;protocol=https;branch=master \
file://diod \
file://diod.conf \
file://0001-build-Find-lua-with-pkg-config.patch \
file://0002-Handle-various-time_t-sizes-in-printf-and-scanf.patch \
"
DEPENDS = "libcap ncurses tcp-wrappers lua"
EXTRA_OEMAKE += "systemddir=${systemd_unitdir}/system"
EXTRA_OECONF = "--disable-auth \
--with-systemdsystemunitdir=${systemd_unitdir}/system"
S = "${WORKDIR}/git"

View File

@ -1,100 +0,0 @@
From 04b0c5a5cb9e32090b177ff7327ad3260783abe0 Mon Sep 17 00:00:00 2001
From: Ola x Nilsson <olani@axis.com>
Date: Mon, 15 Apr 2024 17:31:44 +0200
Subject: [PATCH] Handle various time_t sizes in printf and scanf
The members of the timeval struct are both signed (defined by POSIX)
and typically both 64 bits on a system where time_t is 64 bits. This
is possible also on 32 bit systems where time_t is larger to handle
the 2038 problem.
It's practically impossible to find a type and printf format that
works even on all glibc systems. Play it safe and always use printf
with intmax_t and explict int64_t variables for scanf.
Upstream-Status: Submitted [https://github.com/chaos/diod/pull/100]
Signed-off-by: Ola x Nilsson <olani@axis.com>
---
libnpfs/conn.c | 5 +++--
libnpfs/ctl.c | 7 ++++---
utils/dioddate.c | 8 +++++++-
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/libnpfs/conn.c b/libnpfs/conn.c
index 6e85fff..c34c840 100644
--- a/libnpfs/conn.c
+++ b/libnpfs/conn.c
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <string.h>
#include <stdint.h>
+#include <inttypes.h>
#include <stdarg.h>
#include <errno.h>
#include <pthread.h>
@@ -133,8 +134,8 @@ _debug_trace (Npsrv *srv, Npfcall *fc)
(void)gettimeofday(&b, NULL);
(void)gettimeofday(&a, NULL);
timersub(&a, &b, &c);
- np_logmsg(srv, "[%lu.%-3lu] %s",
- c.tv_sec, c.tv_usec/1000, s);
+ np_logmsg(srv, "[%"PRIdMAX".%-3"PRIdMAX"] %s",
+ (intmax_t)c.tv_sec, (intmax_t)c.tv_usec/1000, s);
} else
np_logmsg(srv, "%s", s);
}
diff --git a/libnpfs/ctl.c b/libnpfs/ctl.c
index f40cde4..317a22e 100644
--- a/libnpfs/ctl.c
+++ b/libnpfs/ctl.c
@@ -16,6 +16,7 @@
#include <stdio.h>
#include <string.h>
#include <stdint.h>
+#include <inttypes.h>
#include <stdarg.h>
#include <pthread.h>
#include <errno.h>
@@ -291,9 +292,9 @@ _ctl_get_date (char *name, void *a)
np_uerror (errno);
goto error;
}
- if (aspf (&s, &len, "%lu.%lu %d.%d\n",
- tv.tv_sec, tv.tv_usec,
- tz.tz_minuteswest, tz.tz_dsttime) < 0) {
+ if (aspf (&s, &len, "%"PRIdMAX".%"PRIdMAX" %d.%d\n",
+ (uintmax_t)tv.tv_sec, (uintmax_t)tv.tv_usec,
+ tz.tz_minuteswest, tz.tz_dsttime) < 0) {
np_uerror (ENOMEM);
goto error;
}
diff --git a/utils/dioddate.c b/utils/dioddate.c
index bde002f..f392792 100644
--- a/utils/dioddate.c
+++ b/utils/dioddate.c
@@ -21,6 +21,7 @@
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
+#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#if HAVE_GETOPT_H
@@ -142,11 +143,16 @@ main (int argc, char *argv[])
errn (np_rerror (), "error reading date");
goto done;
}
- if (sscanf (buf, "%lu.%lu %d.%d", &tv.tv_sec, &tv.tv_usec,
+
+ int64_t sec = 0, usec = 0;
+ if (sscanf (buf, "%"SCNd64".%"SCNd64" %d.%d", &sec, &usec,
&tz.tz_minuteswest, &tz.tz_dsttime) != 4) {
msg ("error scanning returned date: %s", buf);
goto done;
}
+ tv.tv_sec = sec;
+ tv.tv_usec = usec;
+
if (Sopt) {
if (settimeofday (&tv, &tz) < 0)
err_exit ("settimeofday");