$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: <file>,v <rev> ... 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.
This commit is contained in:
lotherk committed 2026-11-24 03:33:56 +00:00
1 parent 1529fce6db
commit 6199effa3c
6 files changed
+19

No files matched your search

+7
View File
@@ -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: <file>,v <rev>
... 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
+2
View File
@@ -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),
+2
View File
@@ -1,3 +1,5 @@
/* $Makronix$ */
/*
* mx_locale.c -- NetBSD's LC_C_LOCALE on glibc (libmxlinux).
*
+2
View File
@@ -1,3 +1,5 @@
/* $Makronix$ */
/*
* mx_termios.h -- the NetBSD <termios.h> / <sys/ttycom.h> names that glibc
* does not have, and NetBSD's numeric speeds (cfsetospeed(t, 9600)), for
+2
View File
@@ -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).
+4
View File
@@ -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)"