installworld puts no kernel on the system. build now ends with build.sh kernel=$(KERNEL), install
runs tools/kernel-install.sh on the result: /netbsd with /netbsd.old kept, and the same on
/cgdboot of an encrypted installation, as mxupgrade(8) does. No restart.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
'make all install' has to be the whole update on a running Makronix. 'build' ran build.sh
distribution only, so the makronix set (mcde, /usr/pkg) was never built by it, only by
'make release'. Same two steps as release 2/7 and 3/7, in one lock.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
checkflist stopped the MacBook release with 105 extra files in DESTDIR: ./mnt/dev, ./mnt/pkgsrc,
./mnt/work ... (the sandbox's mount points), plus debris of earlier runs (a nested usr/src tree,
var/tmp/cwdtest*, dev/null, etc/usermgmt.conf), which were removed from build/obj by hand.
The mount points are rmdir'ed now, never rm -rf'ed: a mounted directory is not touched.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The native MacBook build got through every package (mcde-0.1.0, mcde-motif-2.3.8 built) and
stopped here: 'pkg_install-20260227 ... marked as not for deletion'. The target's pkg_install
comes from the distribution; the delete runs against the sysroot (-P $DESTDIR) only.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Under set -e the cat of the absent options.mk ended the key's group before the source id
was written: a commit in ext/src/mcde never changed the key, so the MacBook kept building
the old work directory (UilLexPars.h: File exists, three runs). Optional files get '|| :';
find -L, because the recipe mirror is symlinks and PLIST/patches were not hashed.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
sandbox_stale matched " $(fork_recipes) " against " <path> ", but the list is one path per line,
so only the first and the last entry had a space on both sides. x11/mcde-motif is not among
them: its source commit never reached the staleness key and a fix in ext/src/mcde was built
into the old work directory (MacBook 2026-11-24, UilLexPars.h: File exists, again).
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
NetBSD fails the extract of every fork with 'xargs: sha256sum: No such file'
(MacBook, 2026-11-24). Same line format, '<hex> <path>'.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
On the MacBook every recipe mirror came out empty (realpath: unknown option
-- m), so userland.sh found 'don't know how to make install' for mcde,
splinter, tasksd. Checked with a scratch tree: misc/tasksd links resolve,
no dangling link.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Two things, both found by reading the whole list of files that call
themselves pkgsrc's.
1. The header. `ext/AGENTS.md` now says what the rule is: a file Makronix
wrote carries `#\t$Makronix$' in its first lines, a file taken from pkgsrc
keeps pkgsrc's `$NetBSD: <file>,v <rev> ... Exp $' (the revision says where
it came from), and the unfilled `$NetBSD$' is neither -- it is pkgsrc's
recipe skeleton before the revision is set. Three files carried it:
- ext/src/mcde/pkgsrc-motif/buildlink3.mk, ours throughout
(MCDE_MOTIF_BUILDLINK3_MK, BUILDLINK_TREE mcde-motif, PKGSRCDIR
../../x11/mcde-motif) -- committed there, pushed to kropa.
- PINS: makronix-pins.sh write now writes the header with it, check
still matches.
- distfiles.lst: cmd_list writes three `#' lines; every reader goes
through list_lines() (verify, fetch, stage, the superset merge) and
install-simple.sh skips them, so a comment cannot be read as a package
path. afpfs-ng keeps `$NetBSD: Makefile,v ... wiz Exp $' in its recipe:
that file is upstream's, unchanged (diff against
pkgsrc/filesystems/afpfs-ng is empty), not the template.
2. afpfs-ng's tarball was missing from distfiles.lst. gen_list dropped every
recipe under ext/ -- written when all of them build from their tree -- but
afpfs-ng still builds from afpfs-ng-0.8.1.tar.gz, so the source set
carried a recipe whose distfile it did not. The filter now drops only a
recipe with `DISTFILES= # empty' (the eight that build from ext/src/<name>)
and keeps the one with an archive. distfiles.lst: 2088 archives.
install-simple.sh counted `stage's fork lines on top of distfiles.lst; that
command is gone (nothing is fetched or staged for a tree recipe), the
archive now counts in distfiles.lst itself.
Tested: tools/test-tools.sh 42 ok, 0 bad (six cases added: the header rule
over ext/src/*/pkgsrc*, distfiles.lst's header, four fields a line, afpfs-ng
present). makronix-pins.sh check matches; makronix-distfiles.sh list, verify,
check, stage all green; stage carries distfiles/afpfs-ng-0.8.1.tar.gz and none
of the tree recipes; bmake -C pkgsrc/wm/mcde -V MOTIFLIB still resolves through
mcde-motif's buildlink3.mk.
The recipes of the forks are tracked in their submodules and the set carries
them, but a recipe builds only from inside pkgsrc's own tree, so
tools/ext-sync.sh places a mirror at pkgsrc/<category>/<name>. That mirror is
named in pkgsrc's .git/info/exclude, so `git ls-files --others' does not list
it and the copy left it out: a tree built from the set had the recipe in
ext/src/<name>/pkgsrc and no way for pkgsrc to build it. It is written into
the set now, with the symlinks resolved -- a link copied as a link would point
out of the set once it is unpacked somewhere else.
Verified: the staging loop writes pkgsrc/misc/splinter/Makefile and the other
seven mirrors as files, 0 symlinks below the staged pkgsrc, and the content is
the recipe (# $Makronix$ as the first line).
Pins the five forks whose pkgsrc recipe stopped building from a tarball
(719c436, fdbaf84, 8a1b6e4, f85aaed, a7fe287; mcde 91967e9f was pinned by
the commit before). The four servers also carry libmcp's string-argument
fix from the remote, which was rebased onto, not overwritten.
Verified: bmake package built wikid, skilld, memoryd and tasksd from the
tree after the rebase (40-48 kB packages), splinter 505 kB, mcde 16 MB.
Each fork kept a recipe beside its source and a tarball in distfiles/ whose
distinfo had to be regenerated after every commit (tools/ext-dist.sh,
tools/mcde-dist.sh), and the work directory of a build could not see a later
commit at all (tools/ext-resync.sh merged an archive into it). Three tools,
one artefact per fork in git, and the failure mode that cost the 2026-11-23
release: mcde 288d1383 built from the commit of the day before, because the
recipe's mtime said "not stale".
Now the recipe builds the source tree itself, which is how pkgsrc's own
net/fetch and pkgtools/pkg_install do it: DISTFILES= # empty, do-extract
fills WRKSRC. What is gone with that:
- the tarballs (distfiles/{mcde,splinter,junction,wikid,skilld,memoryd,
tasksd}-*) and their .key
- tools/ext-dist.sh, tools/mcde-dist.sh, tools/ext-resync.sh and its test
- fork_archives in tools/makronix-distfiles.sh (nothing to fetch or stage)
- the distinfo files of the eight recipes
What replaces it: tools/ext-extract.sh, called from do-extract. It hashes
the tree, copies only the files that differ, keeps the time stamp of the rest
(so a commit rebuilds what it touched and not 27 minutes of MCDE) and
removes the copy when a file left the tree. The build key of a fork carries
the source commit for the same reason: a commit does not change the recipe.
The recipes keep $Makronix$ as their header; afpfs-ng keeps its upstream
$NetBSD: ...$ line and its real distfile, and fork_src() leaves it alone.
Verified:
- bmake package built all eight recipes from the tree with no distinfo:
splinter, junction, wikid, skilld, memoryd, tasksd, mcde (16 MB), and
mcde-motif's shared tree
- tools/test-tools.sh: 38 ok, 0 bad (5 new cases for ext-extract.sh)
- tools/makronix-distfiles.sh check: 0 missing, 0 wrong hash
- tools/makronix-pins.sh check: PINS matches
perl is a run-time dependency of devel/automake (USE_TOOLS=perl:run), and
NetBSD has no perl in the base system: the chroot build stopped at
"pkg_add: no pkg found for 'perl>=5.0'" (build/logs/release-2026-11-23-mbp1.log:5212).
Cross builds passed only because a Linux host has /usr/bin/perl in PATH.
fetch_binaries looked a package up by the last part of its PKGPATH (lang/perl5
-> perl5); the package is perl-5.44.0nb2. It now reads the name from the
repository summary, which carries PKGPATH, and falls back to the path.
distfiles.lst regenerated as the union of the recipes and the earlier list:
2086 archives, 0 dropped, 10 added. tools/makronix-distfiles.sh verify: matches.
.make_repo read .fetch-files from $ARCH/All, but tools/pkg-binaries.sh writes
it in $ARCH: the manifest was never found, every .tgz looked foreign, and the
282 downloaded packages were deleted before pkg_add could install them
(measured 2026-11-23 on the MacBook: 'userland: 0 packages in
build/packages/amd64/All', then automake failed on 'perl>=5.0' because perl
was gone). The function now keeps its own list, .repo-files, and clears only
what it copied itself.
The second loop wrote $tmp/files again, so .fetch-files had two lines
per package (measured 2026-11-23 on the MacBook: 564 lines for 282
packages). Its size lookup then read the wrong record and threw away
the archives it had just fetched.
pkgsrc removes DESTDIR on package-clean only; an install that died before
writing .install_done leaves the staging tree in place, and the next install
then fails on a file that is already there. pkgconf's
'ln -s pkgconf .destdir/usr/pkg/bin/pkg-config: File exists' stopped
x11/mcde-motif and wm/mcde on the MacBook.
Test: with .build_done and no .install_done the .destdir is removed; with
.install_done it stays. Both cases checked in a scratch tree.
verify compared the list for equality, so a run on Linux (where gmake, m4,
bison, gtar, bash, gsed, libXft are in PATH) rewrote the list without them and
would have broken an offline rebuild on Makronix. Now list only adds, and
verify asks for every implied line to be present, extras allowed.
Test: tools/makronix-distfiles.sh verify -> matches the recipes; the list kept
all 2076 lines, 0 lines lost against HEAD.
make_repo did rm -rf on build/packages/ARCH/All, the directory
tools/pkg-binaries.sh downloads the NetBSD project's binary packages
into: every release deleted the download and fetched it again, four
times on the MacBook on 2026-11-23, 20 minutes each. The manifest and
the key are now written before the first download rather than after the
last, and make_repo clears only what the manifest does not name.
Verified: a directory with a.tgz, b.tgz (in the manifest) and mine.tgz
(not) keeps the first two and loses the third; dash -n on both scripts.
In the chroot path every package of packages.list went through 'install',
which keeps an old registration and builds no archive: build/packages/All
held 64 packages and none of the five the media's repository names, so
make_repo said 'no package for: junction-0.1 wikid-0.1 ...' and the release
stopped. The target is now per package, as the cross path already had it.
build-lock: the nested path (make release -> sourcesets -> build-lock) ran
sh -c without dropping MAKEFLAGS, so step 5 hit the same read-only
.MAKE.LEVEL.ENV as step 4 did.
Debian's bmake exports .MAKE.LEVEL.ENV=MAKELEVEL, and the bmake that comes
with pkgsrc refuses to start with it ('Cannot delete ".MAKE.LEVEL.ENV" as
it is read-only'). Every bmake -V in a package directory came back empty, so
step 4 of a cross release took 0 archives from the shared DISTDIR and then
failed on all 26 it had to fetch.
install removes the .tgz again (_KEEP_BIN_PKGS defaults to no, and install
builds no package to begin with), so the MacBook's build/packages/All held
64 packages and none of the ones packages.list names as repo: make_repo had
nothing to copy and the release stopped there.
make_repo asked show-depends-recursive, which lists the build tools too
(pkgtools/cwrappers, libnbcompat, mktools, digest). Those are built for the
build host and have no package for the target, so every release printed seven
'no package ... .tgz' lines and copied nothing for them. The built package
itself records its run-time dependencies: +CONTENTS has them as
"@pkgdep name>=version". The closure is now read from there and closed until
it stops growing; a missing run-time dependency is still reported.
Test: the five repo packages plus their closure -> 5 tgz, 'missing: none';
the eight-package pkgtools noise is gone.
grep exits 1 when every line is filtered out -- which is exactly the good
case, every submodule at its pin. Under set -e the script died there in
silence (measured 2026-11-23: step 2, exit 1, no message, no work done).
`|| true' on the pipeline.
The reference trees are tens of gigabytes (the Linux kernel alone) and no
build step reads them: srctree-stage.sh keeps them out of the source set. A
fresh clone's `make release` pulled 36 GB before the timeout (measured
2026-11-23). refs/ is filtered out; the rest of the pinned submodules are
checked out.
A fresh clone has none of pkgsrc, ext/src/* checked out, and the release dies
in step 2 with 'no pkgsrc/bootstrap (pkgsrc submodule, PINS)'. The tree
carries everything it needs, so the build fetches it: the pinned submodules
are checked out at the start of userland, pkgsrc and the ext/ forks are then
required to be there, and the private trees the build does not read only warn.
Test: git submodule status marks the five private trees '-' (krang, sshcrypt,
kidstube, mikronix, CNCL) and the awk selects exactly those; a missing
pkgsrc/bootstrap dies with the message above.
pkgsrc's DISTDIR default is ${PKGSRCDIR}/distfiles, and PKGSRCDIR is
/usr/src/pkgsrc -- but tools/makronix-distfiles.sh stages the archives into
/usr/src/distfiles, and srctree-stage.sh puts them there in the source set.
On the installed system 'make -V DISTDIR' inside /usr/src/pkgsrc/wm/mcde
printed ${PKGSRCDIR}/distfiles while mcde-0.1.0.tar.gz lay one directory
up (measured 2026-11-23 on the MacBook), so a package build fetched an
archive it already had or failed without a network.
The file is what mk.conf(5) makes of /etc/mk.conf: one setting, a config
file at mode 644 that an update does not rewrite. It is in the etc set
(lists/etc/mi, etc-sys-etc) and installed from src/etc/Makefile with the
other CONFIGFILES.
Verified: the file was written by tools/makronix-distfiles.sh stage earlier
this session (1644 archives in /usr/src/distfiles on the running system);
bmake -V DISTDIR in src/etc is checked with the build that carries it.
pkgsrc/ stopped being an ignored copy at the top of the tree: it is a git
submodule of github.com/NetBSD/pkgsrc, pinned in PINS, so a fresh clone
gets it with 'git submodule update' and make release has what it needs.
The mtime test said nothing on the MacBook: a git checkout does not renew the
time of a file whose content changed in an earlier commit, so
/usr/src/pkgsrc/wm/mcde/Makefile kept 2026-11-22 10:27 after mcde 288d1383 was
checked out, and the work directory of 21:55 counted as newer. The release
then installed the binary of the day before again (run f, 12:30: no rebuild).
sandbox_stale() now hashes what the build reads -- Makefile, options.mk,
patches, PLIST, distinfo (which tools/ext-dist.sh writes from the archive) --
and compares that with the key it stored after the last build. A package
without a key is rebuilt once, which is the cost of the fix.
Test: key for wm/mcde computes (dc7b25d0...); dash -n; the release is not run
with it yet.
A fresh clone has empty directories where the submodules would be, and the
source set only needs the ones the build reads (the forks of ext/ and pkgsrc).
The rest -- krang, sshcrypt, kidstube, CNCL, mikronix -- are repositories whose
remotes ask for a password, so 'git submodule update --recursive' aborts on
them (measured 2026-11-23 on the MacBook, ext/src/mikronix) and step 5 of
make release then died on 'submodule ... is not checked out'.
Test: dash -n; the check is ls -A on the directory, and the root file list
already drops each submodule path before pax runs.
pkgsrc was gitignored, so a fresh checkout of the tree had no pkgsrc at all
and tools/userland.sh could not build a single package. It is a submodule
now (.gitmodules, pinned 3c1118e9 in PINS), like the forks of ext/.
The five server recipes (junction, wikid, skilld, memoryd, tasksd) had their
distfiles built but untracked: tools/makronix-distfiles.sh check counted them
as missing, so the source set could not be staged from a clean clone. They
are part of the repository now, like splinter's and MCDE's.
Test: git ls-files -s shows the gitlink for pkgsrc; git check-ignore says the
distfiles are not ignored; git status is clean for distfiles/.
Two bugs made the native release ship code from the day before:
- tools/pkgchroot.sh ran 'install' in a work directory pkgsrc had already
built. pkg_add printed 'already recorded as installed' and the step
counted as done, so MCDE and splinter in the 2026-11-23e run were the
binaries of 2026-11-22 21:39 while their distfiles were written 08:38
(build/logs/release-2026-11-23e.log:30,44). sandbox_stale() now drops a
work directory that is older than its recipe, and the old registration
goes with it -- the cross path in tools/userland.sh did that already.
- ensure_bootstrap returned at once for every mode but cross, so a fresh
tree without build/pkg stopped in tools/makronix-set.sh (pkg_info) and in
the reinstall logic (pkg_delete). It now bootstraps in all three modes.
The target system needs none of it: /usr/bin/make and /usr/sbin/pkg_add are
in base-util-bin and base-pkgutil-bin.
Test: sandbox_stale() against a work directory dated 2026-11-22 21:39 and
the recipe of 2026-11-23 -- stale: removed; fresh: kept. dash -n on both
scripts. The release itself is not run yet.
ext/src/mcde 288d1383: dtphoto, one CMD_SHOWOPTIONS case
ext/src/splinter f7c374b: embed.c, <signal.h> for kill/SIGKILL
misc/splinter stopped in the cross build of make release: memcpy() is a
three-argument macro in NetBSD's ssp/string.h and the commas of a compound
literal counted as its arguments. The fork builds its colours with rgb()
now. Test: clean make -j8 in the submodule, binary runs.
make release on the MacBook (build/logs/release-2026-11-23d.log): src/mcp.c:640
'implicit declaration of function usleep'.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
make release on the MacBook (build/logs/pkg-binaries-amd64.log): 24 packages 'is N bytes, want M'; the
cached pkg_summary.repo.gz was from 2026-11-19.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
make release on the MacBook (build/logs/release-2026-11-23b.log): junction, wikid, skilld, memoryd, tasksd
'has an unacceptable license condition: cncl-1.0'.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ext/src/mcde is the gitlink of hiddenbox/mcde at 222417e6, which carries the 27
commits of plain-file MCDE work (dtphoto, dtbar, dtsystemsettings, dtwm, icons)
merged into the fork by hand. splinter: the pin with its pkgsrc recipe.
.gitmodules is the union. tools/pkgchroot.sh and README.md take kropa's
(newer) version.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>