3 Commits

Author SHA1 Message Date
William Gill
f54bf88e50 Document per-version branch model on main README
With the scoutfs-build multi-version pipeline landing, each
supported scoutfs version (v1.28, v1.29, v1.30) has its own
long-lived branch here.  The tag history section is replaced by a
table showing which branch targets which scoutfs version, and the
rebase-for-new-upstream walkthrough is updated to describe creating
a new branch rather than overwriting main.
2026-04-23 09:02:44 -05:00
William Gill
d68cd6c0e8 v1.30-notify-1: rebase patch series onto scoutfs v1.30
Upstream released v1.30 (ad65116 on 2026-04-16 per the scoutfs tag).
The CI's daily cron picked the new tag and failed because our patch
series targeted v1.29.

Rebase was clean: scoutfs v1.30's diff against v1.29 touches btree,
forest, quota, totl, triggers, wkic, and xattr — none of the files
our series modifies.  No daemon, Makefile, or packaging changes;
this is a pure retag.

  git checkout v1.30
  git am --3way <the three existing patches>      # clean apply
  git format-patch v1.30..HEAD

Base bumped: v1.29 -> v1.30.
2026-04-22 16:14:54 -05:00
William Gill
0d7c6a6203 apply.sh: set executable bit in git index
The file was committed with mode 100644 so Linux clones couldn't
execute it directly; the CI path that invokes it as
  /tmp/scoutfs-notify/apply.sh <target>
was getting 'Permission denied'.  The ci/apply-notify-patches.sh
shim now also chmod +x defensively, but fixing the stored mode
is the right place to handle it.
2026-04-22 16:12:24 -05:00
6 changed files with 48 additions and 38 deletions

View File

@@ -2,12 +2,12 @@
Observer-only file access notifications for [ScoutFS](https://github.com/versity/scoutfs),
distributed as a rebasable `git format-patch` series plus a small Go
userspace relay daemon. Layers onto each upstream release with minimal
maintenance.
userspace relay daemon. Maintained as one long-lived branch per
currently-supported upstream scoutfs version.
## What the series adds
Three patches against the scoutfs source tree:
Three patches against each supported scoutfs release:
1. **Kmod core** — a per-mount 64 KiB ring of 64-byte notification records and
a single-reader drain ioctl (`SCOUTFS_IOC_READ_NOTIFY`, nr 25). Emit is
@@ -25,57 +25,67 @@ Three patches against the scoutfs source tree:
clients. Pure-stdlib Go; no external module dependencies. Shipped
with a systemd template unit `scoutfs-notifyd@<mountpoint>.service`.
## Base
The notify ABI (`SCOUTFS_IOC_READ_NOTIFY` nr 25, 64-byte event record) is
identical across all three supported scoutfs versions, so consumers and
the daemon do not need per-version branching in their own code.
Currently rebased against:
## Repository layout
scoutfs v1.29
Each supported scoutfs version lives on its own long-lived branch. The
patches in each branch are tuned for that specific scoutfs tree; they do
NOT apply cross-version without rebasing.
See [base.txt](./base.txt).
| Branch | Targets scoutfs | Tag |
|----------------|-----------------|------------------|
| `v1.28` | `v1.28` | `v1.28-notify-1` |
| `v1.29` | `v1.29` | `v1.29-notify-1` |
| `main` / `v1.30` | `v1.30` | `v1.30-notify-1` |
## Build dependencies added
On top of the stock scoutfs build requirements, patch 3 adds:
* `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
ELF.
`main` tracks the newest supported scoutfs version. When a new scoutfs
release ships, a new branch is created and the patches are rebased onto
it; when a scoutfs version ages out of support, its branch stays in the
repo for historical builds but is no longer maintained.
## Applying
Against a scoutfs git working tree at the matching upstream tag:
```sh
./apply.sh /path/to/scoutfs
git clone -b v1.29 https://git.anomalous.dev/alphacentri/scoutfs-notify.git /tmp/notify
/tmp/notify/apply.sh /path/to/scoutfs-v1.29-checkout
```
Runs `git am --3way` on each patch. For a tarball instead of a git tree,
loop `patch -p1 < patches/*.patch`.
The script runs `git am --3way` on each patch in order.
## Rebasing onto a new upstream release
```sh
git fetch --tags
git checkout -B notify v1.30
git am --3way patches/*.patch
# resolve any conflicts, git am --continue
git format-patch v1.30..notify -o patches/
# update base.txt and commit
# In a fresh scoutfs checkout:
git checkout v1.31
git checkout -b notify-v1.31
# Apply the previous branch's patches (usually clean; resolve any
# conflicts, git am --continue).
git am --3way /path/to/scoutfs-notify-v1.30/patches/*.patch
git format-patch v1.31..notify-v1.31 -o /tmp/new-patches/
# Push a new branch + tag in this repo:
cd /path/to/scoutfs-notify
git checkout -b v1.31 main
rm patches/*.patch
cp /tmp/new-patches/*.patch patches/
echo v1.31 > base.txt
git commit -am 'v1.31-notify-1: rebase onto scoutfs v1.31'
git push -u origin v1.31
git tag v1.31-notify-1 && git push origin v1.31-notify-1
# Fast-forward main to the new tip once you're ready to promote it.
```
## Tag history
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)
## Quick smoke test after installation
```sh
systemctl enable --now scoutfs-notifyd@mnt-scoutfs.service
FSID=$(stat -f -c %i /mnt/scoutfs) # or use your scoutfs cli
FSID=$(scoutfs stat /mnt/scoutfs | awk '/fsid/ { print $2 }')
socat - UNIX-CONNECT:/run/scoutfs/${FSID}/notify.sock | xxd | head
# touch some files in /mnt/scoutfs in another terminal
```

0
apply.sh Normal file → Executable file
View File

View File

@@ -1 +1 @@
v1.29
v1.30

View File

@@ -1,4 +1,4 @@
From e226ce3bead4181110f7ba491207ebed584eed67 Mon Sep 17 00:00:00 2001
From 6c5b791d47079df892ee25e6f17c22da2f643340 Mon Sep 17 00:00:00 2001
From: William Gill <claude@williamgill.net>
Date: Wed, 22 Apr 2026 14:38:51 -0500
Subject: [PATCH 1/3] notify: core file-access notification infrastructure

View File

@@ -1,4 +1,4 @@
From 28ebd2776c91db2df24b3b2cc3ed994fc3183b77 Mon Sep 17 00:00:00 2001
From 496b47ab6dab052baecdfbabb0c92649a89d65b4 Mon Sep 17 00:00:00 2001
From: William Gill <claude@williamgill.net>
Date: Wed, 22 Apr 2026 14:40:04 -0500
Subject: [PATCH 2/3] notify: file open/read hook sites

View File

@@ -1,4 +1,4 @@
From 3fa637080d92a6f466738d321fac2f5c44a187db Mon Sep 17 00:00:00 2001
From b6cbfc46485cb9b7f5e87d0ff451f81c25d7d41c Mon Sep 17 00:00:00 2001
From: William Gill <claude@williamgill.net>
Date: Wed, 22 Apr 2026 14:40:34 -0500
Subject: [PATCH 3/3] notify: scoutfs-notifyd userspace relay daemon (Go 1.26)