Commit Graph
29 Commits
Author SHA1 Message Date
lotherk c8cc69aac5 tools: dtlogin-check.sh, the installed package through dtlogin
The dev tree has mcde-desktop.sh; the .deb path (/usr/mdt, /etc/mdt) had
no test that logs in.  This one starts dtlogin on :94 against the
installed package, logs in with pam_permit, and requires the front
panel's Applications menu in the window tree.

Three things it learned in the runs, each a real failure first:

- -ac on the Xvfb line: dtlogin starts the server as nobody and nothing
  can look at it otherwise (xwininfo, xdotool, import all refused).
- Roll dtlogin.log before the run: a previous run's "Greeter started"
  satisfied the wait loop and the test measured a display that never
  came up.
- Kill the display's dtlogin and its Xvfb BEFORE restoring $HOME/.dt:
  dtsession writes sessions/current and errorlog on its way out, and a
  copy put back while it still ran was written over again.

Also: dtsession restores the last session, so without an empty $HOME/.dt
the screenshot showed the user's own Firefox and xterm, not the package
(a 682k-pixel white block).  $HOME/.dt is backed up and restored, and
the session's copy is kept in build/dtlogin-check/home.dt.session.

Test: sh tools/dtlogin-check.sh -> rc=0, clients dtwm, dtlaunch,
dtterm, mcdesoundd; screenshot is the MCDE desktop (no Firefox);
diff of $HOME/.dt against the pre-run copy: IDENTISCH.
2026-11-22 18:32:01 +00:00
lotherk d234b8be2e docs: README for the tree, drop harness-specific .claude config
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.
2026-11-22 12:04:30 +00:00
lotherkandClaude Opus 5.5 118b19a171 make usb: remove the image's work files before and after the build; keep one image backup
The install image left about 34 GB of work files in build/obj/distrib/amd64/
installimage (work/, work.rootfs, imgroot.fs, work.img), and a killed run
left install(1)'s temporary copy in RELEASEDIR/images (6.3 GB,
Makronix-0.99.11-amd64-install.img.inst.f7YyCj).  The root disk was at 99%
(15 GB free) while make usb still had 20 GB to write.

make usb now runs NetBSD's clean target of Makefile.bootimage before and
after install-image and removes *.img.inst.* first.  keep-images.sh keeps
one build/keep-* by default instead of two (each holds 10-20 GB).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-18 19:31:40 +00:00
lotherk 9e06d86e52 tools: test-desktop-login.sh -- the graphical login, end to end
The installer test checked that dtlogin runs, never that a person can log in:
the greeter is on the framebuffer, and vmsh.sh's keys go to the serial
console.  This test sends the user name and the password through the QEMU
monitor (sendkey), saves a screendump, and then checks from a root shell on
the console that dtsession, dtwm, dtbar, mcdesoundd, ttsession and rpcbind
run and that processes of the user exist -- the session a person gets, not
just a running login manager.  Motivated by 2026-11-17: the password was
accepted but dtsession exited (ToolTalk needs the portmapper), and no test
would have seen it.
2026-11-17 22:41:40 +00:00
lotherk b74473cb8e ext-resync: a file the work directory already has is no reason to clean
userland-2026-11-17f.log:11 'pkgsrc changed ./include/Dt/WsmP.h, cleaning':
the .pristine was older than the extract (the run before was started with
the userland.sh that kept no snapshot after a failure), so a header changed
since then looked like pkgsrc's, and MCDE was compiled from nothing for a
file the work directory already held as the new archive has it.  Such a
file is now skipped -- not cleaned and not copied, so its time stamp stays
and make does not recompile what includes it.

tools/test-ext-resync.sh (asked for by t0231, never written): six cases in
a scratch tree with a stand-in bmake; the committed ext-resync.sh fails
"stale pristine: no clean", this one passes 14 of 14.  test-tools.sh runs
it (34 ok, 0 bad).
2026-11-17 16:48:20 +00:00
lotherk 5a5046e9f8 tools: mcde-desktop.sh, MCDE through dtlogin on Xvfb for the website's pictures
The script was in the tree untracked; reviewed before it went in:
- pam_permit was written to the host's /etc/pam.d/dtlogin before the trap
  that puts it back was set: a run killed in between left the graphical
  login open without a password.  The trap comes first now, and only a run
  that switched puts the file back.
- the PAM backup was taken once (2026-11-15) and put back over every newer
  file; it is taken from the file as it is, each run.
- restore removed $HOME/.dt before copying the backup back; the session's
  copy is set aside now, and the backup is made whole or not at all.

.gitignore: /.hermes/ (an agent's local plans) and /www/screenshots/ (raw
shots; the kept ones are www/img/).
2026-11-17 16:39:43 +00:00
lotherk fd81bfefcc userland: an error or a recipe change no longer means MCDE from nothing
The lock of t0229 and the configure-only resync of t0231 were marked done
in tasksd but never committed; they are committed here with the fixes they
needed:

- .pristine was written only after a successful build, so after every
  failure ext-resync found none and userland.sh ran `bmake clean': the next
  run compiled MCDE from nothing (build/logs/userland-2026-11-17b..d.log).
  The snapshot is now kept whenever the work directory was extracted.
- a changed recipe ran `bmake clean'; fork_reconfigure drops pkgsrc's
  cookies from depends on and keeps sources and objects (the forks have no
  patches/).
- ext-resync left .package_done: in a cross build `install' adds the
  binary package, and pkgsrc did not make it again, so the old package was
  installed over a fresh build (pkgsrc/mk/package/package.mk:35).

tools/AGENTS.md says so, and that a fork's work directory is never removed
by hand.
2026-11-17 16:33:54 +00:00
lotherk 1dbc4b8734 uefi stick: write-stick.sh (guarded) moves the backup GPT to the device end; STUPID.md goes (t0086)
The stick boots under OVMF (measured 2026-11-17); the old finding was a serial-line artefact.
The lesson is in tools/AGENTS.md; the status file is deleted as docs/AGENTS.md wants.
2026-11-17 08:52:46 +00:00
lotherk 9bb5f0f6cb docs: tests check the build lock before they start
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.
2026-11-16 12:16:16 +00:00
lotherk 09e05087b3 docs: the build lock covers cdtest, the MCDE builds and the tools
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).
2026-11-16 12:11:53 +00:00
lotherk b3b2e6849c build: one build at a time in one tree
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.
2026-11-16 09:09:45 +00:00
lotherk e451e6d5b0 tools: add test-tools.sh and hook make test before media tests (t0232)
Add tools/test-tools.sh (POSIX sh, scratch dir, no network/build):
pkglist.sh (PACKAGES_LIST), keep-images.sh, mxupgrade -n and
makronix-set.sh against crafted pkgdb (relative @cwd, @ignore/+COMMENT,
@pkgdir, space-in-name warning, METALOG dirs) with a broken-relative-@cwd
red case. Wire as first step of make test (no new target).

Fix mxupgrade.8 mandoc lint: Li http/https/ftp/ssh trailing delimiters and
Xr order (the 5 STYLE/WARNING items requested).

Evidence: sh tools/test-tools.sh => result: 31 ok, 0 bad (RC=0);
dash -n/sh -n clean; mandoc -Tlint now reports only 'referenced manual not
found' for sysupgrade/etcupdate/postinstall/sysupgrade.conf (external).
2026-11-15 13:32:38 +00:00
lotherkandClaude Sonnet 5.5 7e3ecc4112 dtwm: the Command keys, Ctrl+Left/Right and the screenshot keys are in the key set a session loads; snap and full screen leave the front panel alone (t0058)
MEASURED 2026-11-15 on Xvfb with plain XTest keys: a session loads
Dtwm*keyBindings: DtKeyBindings, and that block of sys.dtwmrc had no Mod4 line;
the 25 Command/Ctrl+Left/Right/Eject/screenshot lines stood only in
DefaultKeyBindings (and in the Sun-keyboard variant), so XGrabKey of Mod4+h from
a second client succeeded (nothing grabbed) and the keys did nothing.  The 25
lines are copied into message 11 of all 11 sys.dtwmrc.tmsg.
SEEN after (C locale): Ctrl+Right goes to workspace Two; Command+Ctrl+Left makes
the focused File Manager the left half, Command+Ctrl+BackSpace gives it back,
Command+H minimizes it to an icon.  Not run: the other ten locales (only C is
built on this host); they got their own lines of DefaultKeyBindings, placed
after the F9-F11 lines of their message 11 like the lines that stand there.

With the front panel focused, Command+Ctrl+Left made it half the screen:
f.mcde_snap and f.mcde_fullscreen now ignore panel windows (seen: unchanged).

tools/mcde-xkey.sh presses keys by plain keycodes (XTest): xdotool 3.20160805
sends Alt_L first and the F-key with Alt held on this keymap, which made every
plain F-key binding look dead (the F9 of t0216).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 05:50:42 +00:00
lotherkandClaude Sonnet 5.5 b71d2b48b7 tools/AGENTS.md: ext-resync, check-buildtools, mcde-plist, keep-images, mcde-keytest (with the earlier pending edits of this file: the hook, vmctl/vmmon gone); tools/keep-images.sh
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-15 00:21:34 +00:00
lotherkandClaude Opus 5.5 a8e0b1438e Makronix Games: a group sysinst offers (yes by default), installed from the medium
Konrad, 2026-11-13: RetroArch with the emulators already there, ScummVM,
Tux Racer -- as a group in sysinst (his choice over a set tarball: the
packages stay registered for pkg_add -u).
- packages.list: kind games (RetroArch, every libretro core the NetBSD
  project publishes, ScummVM with BASS and FOTAQ, Tux Racer);
  pkglist.sh and pkg-binaries.sh know it.
- cd3.sh: per medium desktop.list and games.list, the files of the
  closure in dependency order that are on that medium; the DVD stage takes
  only what the summary names.
- extras.c: games_ask (all six catalogues), install_from() installs the
  files of desktop.list (and games.list) from the null-mounted medium.
- install-simple.sh answers the question.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 20:34:37 +00:00
lotherkandClaude Sonnet 5.5 efa96ca4f7 One package list: packages.list (kinds set/repo/fetch, @ARCH), read by tools/pkglist.sh; userland.sh detects cross or native and builds all of it; nothing is built in a VM any more
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>
2026-11-13 17:50:29 +00:00
lotherkandClaude Sonnet 5.5 f9767ef1a7 AGENTS.md of tools, vmbuild, .claude, www, ext, docs, refs: short, checked against the tree, VM scripts marked legacy; the old texts in docs/reference
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-13 14:13:50 +00:00
lotherkandClaude Opus 5.5 85fd446593 tools: make mcde-host -- MCDE for this host's desktop in /usr/mdt
The desktop on the Linux build host runs MCDE from /usr/mdt, built by hand
on 2026-11-11 (build/logs/mcde-host-install2-2026-11-11.log) without the
path step of the pkgsrc recipe (ext/src/mcde/pkgsrc/Makefile, pre-configure:
/usr/dt, /etc/dt, /usr/bin/X11 replaced in every file).  Without it
dtsearchpath (libCliSrv/Environ.C:59-61) gave the session
DTDATABASESEARCHPATH=$HOME/.dt/types,/etc/dt/appconfig/types/%L: no data
types, and dtwm no front panel ("panel fehlt", Konrad, 2026-11-13).

tools/mcde-host.sh copies the tree to build/mcde-host with that step (a
substituted file rewritten only when its text changes, with the source's
time, so motif/ does not run its aclocal-1.15), configures for /usr/mdt
and /etc/mdt, builds, and with MCDE_DIRS=install copies the second-level
directories of the stage (usr/mdt, etc/cde, etc/pam.d, var/spool) below /
as root:root without group or other write.  The first version copied
"stage/ /" with rsync -a and gave /, /etc, /usr and /var the user as owner
and mode 775; that was put back by hand at once (root:root 755, measured
with stat) and is what the second-level copy prevents.

Measured: make mcde-host MCDE_DIRS=install exit 0
(build/logs/mcde-host-install-2026-11-13b.log); afterwards / /etc /usr
/var /etc/pam.d root:root 755, no file below /usr/mdt or /etc/cde not
root's or writable by group or others.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 06:26:01 +00:00
lotherkandClaude Opus 5.5 b785ced362 tools: the USB install test gets twice the time; the build VM's clock
install-simple.sh waited 1500 rounds (about 55 minutes) for sysinst.  The
install from the USB stick is read through qemu's usb-storage and is much
slower than the DVD: on 2026-11-11 it was still unpacking msrc.tgz (626 MB)
when the limit came (build/logs/test-install-usb-2026-11-11.log), while
the DVD's install had passed.  With -U it waits 3000 rounds.

tools/AGENTS.md: a paused build VM's clock lags, which made automake
regenerate configure in a loop during make userland; how to set it, and
the new key build/vm/id_vm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 11:53:07 +00:00
lotherkandClaude Opus 5.5 870676e771 make binaries: the binary packages built in the build VM, as a repository for the media
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>
2026-11-10 17:18:20 +00:00
lotherkandClaude Opus 5.5 4df23f53ab binary packages paused: they need X in the base, Makronix has X from pkgsrc
The NetBSD project's binaries (firefox, thunderbird, qemu, pulseaudio,
pavucontrol, cups, cups-filters) link /usr/X11R7/lib/libX11.so.7 and the
other libraries of the X sets; since X comes from pkgsrc they do not install
("Please make sure to install the X sets", 7 package additions failed,
build/logs/install-src-bios-install-2026-11-10.log) and make test failed on
13 checks.  The lists name none for now; cd3.sh puts no packages on the media
then; install-simple.sh and install-cgd.sh run the checks of a binary package
only when the lists name it (wanted, a SKIP line otherwise).  They come back
built for Makronix in the build VM.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 16:28:15 +00:00
lotherkandClaude Opus 5.5 fcf214ddb4 tools: the VM builds the forks of ext/ anew every time
MCDE changes its archive without a new version, and pkgsrc does not build
an installed version again: make userland kept mcde-0.1.0 of the morning,
without dtbar (build/logs/x-userland-2026-11-10-mcde3.log: no build, no
change to the set list).  userland.sh passes the ext/ recipes as REBUILD;
vm-pkgbuild.sh cleans their work directory and runs bmake replace.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 11:31:43 +00:00
lotherkandClaude Opus 5.5 c23a40517b mcde: distinfo for the archive of be3b4886c; tools/AGENTS.md: MCDE in the VM build
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-10 06:10:00 +00:00
lotherk e7bd6d9407 tree: drop xsrc, track src, X from pkgsrc
- 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.
2026-11-09 23:30:07 +00:00
lotherkandClaude Opus 5.5 861608eaaa AGENTS.md: make usb, compress, test; tools/AGENTS.md: cd-com0.sh, -U, VMSH_AHCI
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>
2026-11-09 07:54:37 +00:00
lotherkandClaude Sonnet 5.5 074f559615 Remove the Apple special image: no tools/apple-image.sh, no make apple-amd64
A Mac that needs rEFInd boots a rEFInd stick and picks the Makronix stick.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 07:19:24 +00:00
lotherkandClaude Sonnet 5.5 dbd45ff4f0 images raw, packed on request: images.sh, make compress; apple image raw; tests take raw images
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-08 22:13:25 +00:00
lotherkandClaude Sonnet 5.5 840782e24c sysinst, media, tests: desktop defaults, four CDs, Portuguese, AHCI test VMs
- 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>
2026-11-07 21:09:35 +00:00
lotherkandClaude Sonnet 5.5 6c714a0ea7 tools, Makefile, package lists: media (CD 2, CD 3), install tests, build VM, source sets, binary packages
make iso now also writes CD 2 (makronix set) and CD 3 (binary packages); make sourcesets/isosrc make the source sets and the DVD with them. tools: cd2.sh cd3.sh, install-simple.sh install-cgd.sh (end-to-end tests on the serial console), vmsh.sh devvm.sh (QEMU sessions, the kept build VM), vm-pkgbuild.sh vm-pkgcollect.sh (native pkgsrc builds), pkg-binaries.sh (the project's binary packages), host-nfs-setup.sh (NFS for the build VM; loopback-only through an nftables rule), makronix-distfiles.sh makronix-pins.sh msrc-stage.sh. Package lists: common, per platform, and binary.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:53:21 +00:00