v1.29-notify-4: bump Go toolchain minimum to 1.26

Raises the minimum Go required to build scoutfs-notifyd to 1.26
(current upstream Go as of Feb 2026).  The source uses no language
features beyond basic stdlib; the bump is a policy decision to
track current Go rather than a technical need.

No distro currently packages Go 1.26 in its stable repos, so
scoutfs-build's CI now fetches the official linux tarball from
go.dev and caches it in /var/cache/scoutfs on the runner host
(keyed by version + arch).  Builds remain hermetic after that
single fetch: CGO_ENABLED=0, GOPROXY=off, no module dependencies.

Changes:
  utils/notifyd/go.mod          go 1.21 -> go 1.26
  utils/scoutfs-utils.spec.in   golang >= 1.21 -> golang >= 1.26

The kmod patches (1 and 2) and the daemon source are unchanged.
This commit is contained in:
William Gill
2026-04-22 14:41:14 -05:00
parent 25a2182c45
commit 5e05ccae05
4 changed files with 27 additions and 21 deletions

View File

@@ -37,8 +37,8 @@ See [base.txt](./base.txt).
On top of the stock scoutfs build requirements, patch 3 adds:
* `golang >= 1.21` on the build host (RHEL/EL9: `golang`, EL8: `go-toolset`).
Debian 12 / Ubuntu 22.04+: `golang-go`.
* `golang >= 1.26` on the build host (fetched from go.dev by the CI; no distro currently packages 1.26).
The Go build is offline (`GOPROXY=off`) — no network access required at
build time. `CGO_ENABLED=0` so the produced binary is a pure-Go static
@@ -66,7 +66,8 @@ git format-patch v1.30..notify -o patches/
## Tag history
v1.29-notify-3 (current — Go daemon, struct alignment fix)
v1.29-notify-4 (current — Go 1.26 toolchain)
v1.29-notify-3 (retired — Go 1.21 toolchain)
v1.29-notify-2 (retired — C daemon; had latent ring-size compile bug)
v1.29-notify-1 (retired — shipped mount options)

View File

@@ -1,6 +1,6 @@
From c73736df8b8206e66a72a432781034c56765a64a Mon Sep 17 00:00:00 2001
From e226ce3bead4181110f7ba491207ebed584eed67 Mon Sep 17 00:00:00 2001
From: William Gill <claude@williamgill.net>
Date: Wed, 22 Apr 2026 14:21:34 -0500
Date: Wed, 22 Apr 2026 14:38:51 -0500
Subject: [PATCH 1/3] notify: core file-access notification infrastructure
Adds a per-mount observer-only notification ring and an ioctl to

View File

@@ -1,6 +1,6 @@
From 34a879b1f6e77915df8930c173eef9f17887da2f Mon Sep 17 00:00:00 2001
From 28ebd2776c91db2df24b3b2cc3ed994fc3183b77 Mon Sep 17 00:00:00 2001
From: William Gill <claude@williamgill.net>
Date: Wed, 22 Apr 2026 14:21:50 -0500
Date: Wed, 22 Apr 2026 14:40:04 -0500
Subject: [PATCH 2/3] notify: file open/read hook sites
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8

View File

@@ -1,16 +1,19 @@
From 4286c88487c986db0d468be540aca3ad67d32c25 Mon Sep 17 00:00:00 2001
From 3fa637080d92a6f466738d321fac2f5c44a187db Mon Sep 17 00:00:00 2001
From: William Gill <claude@williamgill.net>
Date: Wed, 22 Apr 2026 14:31:15 -0500
Subject: [PATCH 3/3] notify: scoutfs-notifyd userspace relay daemon (Go)
Date: Wed, 22 Apr 2026 14:40:34 -0500
Subject: [PATCH 3/3] notify: scoutfs-notifyd userspace relay daemon (Go 1.26)
Adds the userspace side of the file access notification feature.
The kmod provides a ring and a drain ioctl; this daemon binds the
well-known per-mount socket, drains the ring, and broadcasts each
record to connected clients.
Written in Go using the standard library only. The go.mod has no
external module requirements, so builds work offline and the
Written in Go 1.26 using the standard library only. The go.mod has
no external module requirements, so builds work offline and the
packaging path sets GOPROXY=off to make that guarantee explicit.
Distro Go packages lag the upstream release schedule, so the
scoutfs-build CI fetches the official go.dev tarball and caches it
in /var/cache/scoutfs on the runner host.
Socket:
@@ -54,7 +57,7 @@ Packaging:
"go build" with CGO_ENABLED=0, GOPROXY=off, -trimpath, and
-ldflags="-s -w" for a small, reproducible static binary.
- utils/scoutfs-utils.spec.in: adds BuildRequires on golang
(>= 1.21); installs /usr/sbin/scoutfs-notifyd and
(>= 1.26); installs /usr/sbin/scoutfs-notifyd and
/usr/lib/systemd/system/scoutfs-notifyd@.service.
- utils/man/scoutfs-notifyd.8 documents the tool, protocol and
drop policy.
@@ -71,8 +74,8 @@ recv() events.
utils/notifyd/go.mod | 3 +
utils/notifyd/main.go | 434 +++++++++++++++++++++++++
utils/notifyd/scoutfs-notifyd@.service | 40 +++
utils/scoutfs-utils.spec.in | 6 +
6 files changed, 628 insertions(+), 3 deletions(-)
utils/scoutfs-utils.spec.in | 8 +
6 files changed, 630 insertions(+), 3 deletions(-)
create mode 100644 utils/man/scoutfs-notifyd.8
create mode 100644 utils/notifyd/go.mod
create mode 100644 utils/notifyd/main.go
@@ -262,13 +265,13 @@ index 0000000..a0dcd46
+.BR systemd.unit (5)
diff --git a/utils/notifyd/go.mod b/utils/notifyd/go.mod
new file mode 100644
index 0000000..2d5fd0e
index 0000000..d99f395
--- /dev/null
+++ b/utils/notifyd/go.mod
@@ -0,0 +1,3 @@
+module scoutfs.org/notifyd
+
+go 1.21
+go 1.26
diff --git a/utils/notifyd/main.go b/utils/notifyd/main.go
new file mode 100644
index 0000000..9478bae
@@ -756,19 +759,21 @@ index 0000000..2e87f17
+[Install]
+WantedBy=multi-user.target
diff --git a/utils/scoutfs-utils.spec.in b/utils/scoutfs-utils.spec.in
index fb24b81..2c8a5d8 100644
index fb24b81..ef6165e 100644
--- a/utils/scoutfs-utils.spec.in
+++ b/utils/scoutfs-utils.spec.in
@@ -17,6 +17,8 @@ BuildRequires: gzip
@@ -17,6 +17,10 @@ BuildRequires: gzip
BuildRequires: libuuid-devel
BuildRequires: openssl-devel
BuildRequires: libblkid-devel
+# scoutfs-notifyd is a Go program (pure stdlib, no external modules).
+BuildRequires: golang >= 1.21
+# Distro Go packages lag upstream; the CI fetches an official tarball
+# when a new-enough compiler isn't already on PATH.
+BuildRequires: golang >= 1.26
#Requires: kmod-scoutfs = %{version}
@@ -52,19 +54,23 @@ cp man/*.5.gz $RPM_BUILD_ROOT%{_mandir}/man5/.
@@ -52,19 +56,23 @@ cp man/*.5.gz $RPM_BUILD_ROOT%{_mandir}/man5/.
cp man/*.7.gz $RPM_BUILD_ROOT%{_mandir}/man7/.
cp man/*.8.gz $RPM_BUILD_ROOT%{_mandir}/man8/.
install -m 755 -D src/scoutfs $RPM_BUILD_ROOT%{_sbindir}/scoutfs