From 6199effa3c30ad3c22d5deb426ab5cd779aa1f0c Mon Sep 17 00:00:00 2001 From: lotherk Date: Tue, 24 Nov 2026 03:33:56 +0000 Subject: [PATCH] $Makronix$ in libmxlinux, the rule in AGENTS.md, and build/logs for a clone Three gaps, all found by running `make release' on a fresh clone instead of trusting the tree that had been built in for weeks. 1. tools/userland.sh: fetch_binaries redirects into build/logs/, but nothing created that directory: a clone has no build/ below AGENTS.md, so step 2/7 died with "Error code 1" from the shell, before pkg-binaries.sh ran, and the log it points at was never written. mkdir -p first. The other two redirects into build/logs (pkg-add, pkg-delete) come after it. 2. src/lib/libmxlinux: four files had no header at all (mx_termios.h, mxlinux.h, mx_locale.c, mx_fgetwln.c). They now carry `/*\t$Makronix$\t*/' like the other 61 there, and all 71 files of the directory have one. Checked with gcc -fsyntax-only on each of the four. 3. AGENTS.md says the header rule once, in "Licence": `#\t$Makronix$' in a file Makronix wrote, `$NetBSD: ,v ... Exp $' in one taken from pkgsrc, never the unfilled template -- the detail is in ext/AGENTS.md ("Header"). Tested: tools/test-tools.sh 42 ok, 0 bad. gcc -fsyntax-only clean on the four files. The directory builds through `make userland' (mobile/userland/mk/ mx.prog.mk: mx-lib), not standalone: a plain `bmake' in src/lib/libmxlinux has no NETBSDSRCDIR (getopt.c comes through .PATH) -- not caused by this change, the same command failed the same way before it. --- AGENTS.md | 7 +++++++ src/lib/libmxlinux/mx_fgetwln.c | 2 ++ src/lib/libmxlinux/mx_locale.c | 2 ++ src/lib/libmxlinux/mx_termios.h | 2 ++ src/lib/libmxlinux/mxlinux.h | 2 ++ tools/userland.sh | 4 ++++ 6 files changed, 19 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index 0b6902d23f..a7fb1d92bf 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -45,6 +45,13 @@ comes from elsewhere keeps its own licence: `src/` (NetBSD, BSD), `xsrc/`, or later) and their changes to files that already had a licence. A new file in a fork gets the CNCL line; a changed upstream file keeps the notice it has. +The header line says where a file came from: `#\t$Makronix$` (or +`/*\t$Makronix$\t*/` in C) in a file Makronix wrote, `$NetBSD: ,v +... Exp $` in a file taken from pkgsrc. The unfilled `$NetBSD$` is pkgsrc's +recipe template before the revision is set and belongs to neither -- a recipe +written here takes `$Makronix$`, also when it is modelled on a pkgsrc recipe +(`ext/AGENTS.md`, "Header"; `tools/test-tools.sh` fails if one comes back). + ## What belongs where - `src/` is **Makronix's NetBSD tree**, tracked here. It began as the upstream diff --git a/src/lib/libmxlinux/mx_fgetwln.c b/src/lib/libmxlinux/mx_fgetwln.c index 23ca849157..a3bdcea356 100644 --- a/src/lib/libmxlinux/mx_fgetwln.c +++ b/src/lib/libmxlinux/mx_fgetwln.c @@ -1,3 +1,5 @@ +/* $Makronix$ */ + /* mx_fgetwln.c -- fgetwln(3) for the phone (libmxlinux; moved from rev/), from its manual page * * rev(1) reads its input with NetBSD's fgetwln() (src/usr.bin/rev/rev.c:93), diff --git a/src/lib/libmxlinux/mx_locale.c b/src/lib/libmxlinux/mx_locale.c index 0313ea3292..ce377c7fb3 100644 --- a/src/lib/libmxlinux/mx_locale.c +++ b/src/lib/libmxlinux/mx_locale.c @@ -1,3 +1,5 @@ +/* $Makronix$ */ + /* * mx_locale.c -- NetBSD's LC_C_LOCALE on glibc (libmxlinux). * diff --git a/src/lib/libmxlinux/mx_termios.h b/src/lib/libmxlinux/mx_termios.h index ec19786c16..97537bd3d6 100644 --- a/src/lib/libmxlinux/mx_termios.h +++ b/src/lib/libmxlinux/mx_termios.h @@ -1,3 +1,5 @@ +/* $Makronix$ */ + /* * mx_termios.h -- the NetBSD / names that glibc * does not have, and NetBSD's numeric speeds (cfsetospeed(t, 9600)), for diff --git a/src/lib/libmxlinux/mxlinux.h b/src/lib/libmxlinux/mxlinux.h index 513263f982..5caa03e40a 100644 --- a/src/lib/libmxlinux/mxlinux.h +++ b/src/lib/libmxlinux/mxlinux.h @@ -1,3 +1,5 @@ +/* $Makronix$ */ + /* * mxlinux.h -- what a program of src/ expects from NetBSD's headers and * glibc's do not give, for a Linux target (Makronix/Linux; src/lib/libmxlinux). diff --git a/tools/userland.sh b/tools/userland.sh index d9d317b78c..05a6a83359 100755 --- a/tools/userland.sh +++ b/tools/userland.sh @@ -402,6 +402,10 @@ fetch_binaries() { [ -n "$("$TOP/tools/pkglist.sh" fetch)" ] || return 0 echo "=== binary packages (fetch)" + # a fresh clone has no build/logs: the directory is what this run writes + # into, and redirecting into a directory that does not exist fails before + # pkg-binaries.sh runs (measured 2026-11-24 on a clone, step 2/7) + mkdir -p "$TOP/build/logs" || die "cannot create build/logs" "$TOP/tools/pkg-binaries.sh" -a "$ARCH" fetch \ > "$TOP/build/logs/pkg-binaries-$ARCH.log" 2>&1 || die "tools/pkg-binaries.sh fetch failed (build/logs/pkg-binaries-$ARCH.log)"