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.
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
Konrad, 2026-11-22: "i want mcde to support 'make debian' and it'll fully
create and download all required build dependencies and shit and make debian
debian-install would make the deb and all and then even install" and
"inkluding our own motif stuff xyz".
tools/mcde-debian.sh does the three steps in one lock:
build installs the build dependencies through apt-get (the ones
configure.ac stops on and each -dev the tree compiles against),
builds MCDE from a copy of ext/src/mcde with the path step of
tools/mcde-host.sh, installs into build/mcde-debian-stage, strips,
and packs build/mcde-debian/mcde_<version>_<arch>.deb
install installs that package
clean removes both directories
The package carries its own Motif: libXm, libMrm, libUil, the uil compiler
and the headers live in /usr/mdt, so the desktop runs from its own toolkit
and never from the system's libxm4 (--with-private-motif, as Konrad asked).
Four things cost a run each and are written where they bit:
- dpkg-shlibdeps matches a shlibs line on the SONAME version (libXm.so.4 ->
4), not on the file version (4.0.4). With 4.0.4 it ignored the line, found
the system's libxm4 and put it in Depends.
- -L is the override file dpkg-shlibdeps READS; -T is where it writes the
substvars it produced. The first version passed -T and got nothing.
- -x$PKG, or the package depends on itself (every binary links /usr/mdt/lib).
- The version carries the commit, so a rebuild leaves a second .deb beside
the first and `dpkg -i *.deb' installs both -- the older wins. One package,
one file: the old one goes.
debian-mcde/ holds what the package manager cannot do for the desktop: the
control paragraph, a postinst that indexes the fonts MCDE carries under
/usr/mdt/fonts for the X server, and the session entry (Type=XSession,
/usr/share/xsessions/mcde.desktop) -- without it a display manager lists the
host's desktops and not MCDE.
Verified on this host (2026-11-22):
bmake debian from an empty build/mcde-debian exit=0,
build/mcde-debian/mcde_0.1.0+git420f66c19e_amd64.deb (42M, 180280 KiB
installed, 4583 files)
Depends is free of libxm4/libuil4/libmrm4 and free of mcde itself
the package carries usr/mdt/lib/libXm.so.4.0.4, libMrm, libUil and the
uil compiler; /etc/pam.d/dtlogin and dtsession are conffiles
dpkg -i installs it, postinst runs
ldd /usr/mdt/bin/dtwm -> /usr/mdt/lib/libXm.so.4 (its own)
on a private Xvfb: dtsession, dtwm, dtlaunch, dtpad, dtfile and the
front panel (Applications/Files/Desktop/System/Network) run, no errors
bmake debian-install exit=0, "mcde 0.1.0+git420f66c19e install ok
installed", 0 upgraded / 0 newly installed
AGENTS.md and docs/BUILD-CONTRACT.md list mcde-debian.sh among the tools that
need the build lock, next to mcde-host.sh.
t0768
README.md collects what Makronix is, the repository layout, the one build
entry point and its gate, the installer/desktop/media design, offline
sources, platforms, the documentation map and the contribution rules from
AGENTS.md, GOAL.md and docs/BUILD-CONTRACT.md. All relative links resolve.
Remove .claude/ from the repository and ignore it: AGENTS.md is the
harness-independent convention. Root AGENTS.md and tools/AGENTS.md now
describe tools/claude-build-gate.sh as a build gate rather than a Claude
hook; docs/reference/AGENTS.md notes the removal of the archived directory.
Verification: sh -n tools/claude-build-gate.sh ok; tools/claude-build-gate-test.sh
25 ok, 0 bad; git check-ignore -v .claude/settings.json matches /.claude/;
README links checked against the tree.
Konrad, 2026-11-18: 'make release heisst ein RELEASE, ein RELEASE enthaelt
natuerlich ALLES'. release now runs build.sh release, then sourcesets, iso
and usb inside its own (re-entrant) lock; iso and usb keep checking the stamp
with -c, so nothing built in the same run is discarded. cdtest no longer
calls iso a second time. AGENTS.md and docs/BUILD-CONTRACT.md say so.
test.sh, mediacheck.sh, install-simple.sh, install-cgd.sh and mcde-tests.sh
call build-lock.sh --check; an existing build stops them, while make
test/cdtest pass because they hold the lock.
AGENTS.md, tools/AGENTS.md and docs/BUILD-CONTRACT.md name the re-entrant
lock, cdtest's whole run, mcde-linux/mcde-host, and the tools that refuse
to write build/obj or releasedir outside the lock (build-lock.sh --held).
A second make in the same tree runs clean_METALOG while the first one's
copy-releasedir still reads METALOG.sanitised; the CD staging then dies
with a missing file (t0286, build/logs/release-2026-11-16-guide.log).
The root Makefile's build, release, stamp, iso, usb, sourcesets, tools,
kernel, userland and clean-sanity targets now take tools/build-lock.sh,
which refuses a second build with the holder's pid and takes over a
stale lock. The lock is documented in the root and tools AGENTS.md.
LICENSE at the root; the 103 files new in ext/src/mcde (none was in the CDE
import) carry the CNCL line instead of the LGPL notice.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
- Makefile: -x -X $(XSRC); build-stamp keys on xsrc/ too; PINS and
makronix-pins.sh carry xsrc/BASE.
- pkgsrc-cross.mk.conf: X11_TYPE=native (pkgsrc uses the sysroot's /usr/X11R7).
- packages.list: no pkgsrc X any more (the X sets carry server, drivers,
fonts, clients); built here only the forks of ext/ (MCDE, Motif,
afpfs-ng) and flex; vim, git, samba, netatalk, sshfs, borg, pulseaudio,
pavucontrol, cups, firefox, thunderbird and the games (RetroArch with
all libretro cores, ScummVM with BASS and FOTAQ, Tux Racer) are the
NetBSD project's binaries (kind fetch).
- pkg-binaries.sh: resolve by PKGPATH (samba4 is samba-4.x), an empty
queue no longer trips set -u; cd3.sh top.list by PKGPATH as well.
- userland.sh: the host tools of the whole dependency closure.
- AGENTS.md, GOAL.md: the decision and why (measured: "The X-server can
not be started on display :0").
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removed: packages.{amd64,aarch64,binary*}.list, tools/packages.vm.list,
tools/vm-pkgbuild.sh, tools/vm-pkgcollect.sh, tools/vmbuild/, make binaries.
A package that fails no longer stops the others; they are named at the end.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The phone kernel no longer builds from the qualcomm-sm8150 fork: the base
is kernel.org stable v7.0.14 (refs/linux/7.0.14, shallow), and what hotdogb
needs from the fork is carried as kernel/patches 0001-0004 (sm8150/PMIC
DTSI nodes, the OnePlus DTS, the SMB5 charger, of/property), unchanged from
its 8e126dbc4; 0005-0025 are our series (the old 0005 is in v7.0.14 by a
stable backport).
The name comes from Makronix's versioning, the files the NetBSD side reads
(src/sys/conf/makronix-release, makronix-codename): kernel_make in
tools/lib.sh gives uname -r 7.0.14-makronix-unstable (x.99.y is -current)
and /proc/version makronix@camouflage, for the build and for every
modules_install. make update-root defaults to /system/<Makronix version>.
Measured: slot a boots 7.0.14-makronix-unstable with /system/0.99.9,
marked successful; WLAN, Bluetooth, battery and the display work
(build/logs/flash-0.99.9-2026-11-11.log). docs/NEXT.md 9c has what
7.3.4 showed (ftrace hangs it before the console; without ftrace a hard
freeze later).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The project's binaries need X in the base, Makronix has X from pkgsrc.
userland.sh binaries (make binaries; BINARIES=... before the lists name
them) builds packages.binary*.list in the build VM, vm-pkgbuild.sh repo packs
them with their run-time closure and pkg_summary.gz, and the host unpacks the
repository into build/packages/ARCH/All, where tools/cd3.sh takes it from.
The VM's mk.conf gets DEPENDS_TARGET=package-install (every dependency as a
binary package); a dependency installed before gets its package from its
PKGPATH. vmprep() is the VM preparation that vm() and binaries() share.
The lists name PKGPATHs (still paused); cd3.sh, pkg-binaries.sh and the
tests' wanted() take the last part as the name.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The next kernel base for mobile/ (Konrad: "7.4 is okay"; the fork has no
7.2): sm8150/7.4-rc1-wip at 38ceee3d0, Linux 7.4.0-rc1. kernel/PIN stays
at 7.0.0 until 7.4 is measured on the phone (mobile/docs/NEXT.md §9b).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- xsrc/ deleted; X11_TYPE=modular, Xorg and the X libraries come from pkgsrc
(packages.list), in the cross configuration and the build VM.
- overlay/ and patches/ are gone; their content is in src/ (commit 64934f16).
- Makefile: no -x/-X, no overlay target, stamp no longer syncs an overlay.
- makronix-pins.sh: src/BASE + pkgsrc; msrc-stage: no .git/xsrc, src comes
from the NetBSD source sets.
- AGENTS/GOAL/docs updated to the new model (src tracked, refs/ read-only).
- mobile: kernel source is refs/linux/7.0.0, patches stay in
mobile/kernel/patches; fetch-kernel clones it locally and checks the pin.
Written by opencode (iceman-contributor-free), checked against Makefile:79-92,
tools/test.sh, tools/vmsh.sh:97-100, tools/cd-com0.sh:7-12.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- sysinst simple mode: sshd on with root login by password, npf firewall,
mDNS (mdnsd, nsswitch), PulseAudio, CUPS, dbus; extra programs from N
package CDs (extras.c); cgd root fix (mnt2_mounted)
- Portuguese (pt_BR) catalogs and patch 0013; welcome text for DVD/CDs
- media: console=auto (0008), RAM-disk installer with two CDs (0012),
package CDs and DVD packages (cd3.sh), userland.sh for the build VM
- tests: line-by-line checks, mDNS pattern, UEFI Enter loop, VMSH_AHCI
(QEMU 11.1.2 loses PIIX IDE interrupts under load)
- docs: UPDATING.md, npf-default.conf, AGENTS.md updates
Measured 2026-11-07: simple 37 PASS, DVD+sources 42 PASS, cgd BIOS 35 PASS;
cgd UEFI with console=auto not green yet.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Measurements named with their logs: the installs (BIOS, UEFI, encrypted, two CDs), the NetBSD self-build in the build VM (2 h 02 min, stopping only at checkflist for the missing userland), 9p and NFS against the local disk.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
build.sh iso-image runs distrib/amd64/cdroms and writes NetBSD-<ver>-amd64.iso
(698 MiB, 20 sets) and the DVD (783 MiB, all 21 sets incl. base32) into
releasedir/images, alongside the two install.img.gz. Measured install from the
CD: Sets selected 20, base32 reported optional by the installer itself,
extraction complete, installed disk boots to login:, shutdown -p now ends in
ACPI S5. The CD boots with the pc console, so that transcript is VGA
screenshots; the serial-bootblock selection did not take in this run and is
recorded as open. images/MD5 and SHA512 now cover all four artifacts.
The makronix set was in the release but no installer unpacked it until
sysinst learned it; record where that lives (defs.h, util.c, SET_SYSTEM,
every msg.mi.*) so the next set addition follows the same four places.
Also record the measured install from the image this tree builds -- 20 sets,
makronix unpacked, /usr/pkg populated, login on com0, clean poweroff -- and
that the image is tested as built: the serial console comes from the loader
prompt, not from a patched boot.cfg.in.
`src/usr.sbin/pkg_install` does not exist in this import; the tree builds
`/usr/sbin/pkg_add` from `src/external/bsd/pkg_install`, which is the SUBDIR
'pkg_install' in `external/bsd/Makefile:18`. Measured against the sysroot:
`file build/obj/destdir.amd64/usr/sbin/pkg_add` reports NetBSD 11.99.9 ELF.
The makronix list has 10826 file entries in 10837 lines; the count in the text
was the line count. Both numbers are measured after `make release`.
wm/cde cannot be cross-built from Linux (mk/tools/replace.mk:142 refuses
awk:run when OPSYS != NATIVE_OPSYS), so it is built on a live image from src/
under qemu: tools/vm-boot.cfg puts the console on com0, tools/vmctl.py drives
it, and tools/vmbuild/ holds the stages that bootstrap pkgsrc there with
--prefer-native=yes and build the recipe unchanged.
Two settings, both configuration, both scoped to wm/cde in the build host's
mk.conf: FORCE_C_STD=gnu11 (autoconf 2.72 picks C23, where CDE's 'int f();'
means 'int f(void)') and the C wrapper's append list for the five GCC 14
implicit-declaration errors, the only lever that reaches the ksh93 subtree.
stage6 walks the runtime closure over the @pkgdep lines in +CONTENTS, not over
+DEPENDS (that file is in the binary package, not in the registration
database), and the closure is unpacked into the sysroot rather than pkg_add'ed
so CDE's /etc/dt paths do not land on the build host. 10837 set entries,
checkflist green.
vim 9.2.1202 and vim-share build cross with the tree's toolchain
(x86_64--netbsd-gcc) and come out as NetBSD 11.99.9 ELF. Two
configuration defects had to go first: bootstrap on a Linux host writes
PREFER_PKGSRC=yes, which made pkgsrc rebuild curses (devel/ncurses) for
the host and mix host and target in one build; and the fragment described
a target pkg_install that does not exist, since pkgtools/pkg_install
cannot cross-build.
The 'makronix' set is generated by tools/makronix-set.sh from what the
packages installed plus the METALOG records pkg_add does not write.
See AGENTS.md for the set, the bootstrap flag and where a Linux build
host stops.
The tree builds pkgsrc packages for NetBSD/amd64 with the tooldir and the
sysroot that build.sh produced; tools/pkgsrc-cross.mk.conf carries the whole
configuration as the bootstrap's mk-fragment. Measured: devel/zlib comes out
"for NetBSD 11.99.9", installs into destdir.amd64/usr/pkg through pkgsrc's
bootstrap pkg_add with -p, and checkflist reports those files as extra until a
set lists them.
OPSYS_VERSION in the fragment was 119900900; bsd.prefs.mk computes it as
printf "%02d%02d%02d" of major/minor/patch, so 11.99.9 is 119909, and the
missing CROSS_LOWER_*/CROSS_OBJECT_FMT stop bsd.prefs.mk with "missing cross
variable settings".
Also: build/ is output and now ignored, the tick uses the absolute path to
hermes, and AGENTS.md names the import pins and how a build is gated.