Commit Graph
263 Commits
Author SHA1 Message Date
lotherk d300fc1329 release: a stale package work directory is rebuilt, not installed
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
2026-11-23 11:41:40 +00:00
lotherkandClaude Sonnet 5.5 7e9d92d75f pkg-binaries.sh: a size mismatch means the cached summary is stale -- drop it and the bad file
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>
2026-11-23 09:59:30 +00:00
lotherkandClaude Sonnet 5.5 db91645aab pkgchroot.sh: cncl-1.0, Makronix's own licence, is acceptable
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>
2026-11-23 09:25:55 +00:00
lotherkandClaude Sonnet 5.5 19a70fb37d build-stamp.sh: the kernel configuration key uses sha256_in (no sha256sum on NetBSD)
make release on the MacBook: 'tools/build-stamp.sh: sha256sum: not found'.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-23 08:39:09 +00:00
lotherkandClaude Sonnet 5.5 0d629ae70a Merge kropa/main: MCDE and splinter are submodules; the Makronix-tree work is in the mcde fork
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>
2026-11-23 08:36:20 +00:00
lotherkandClaude Sonnet 5.5 9570e48bdc ext: pkgsrc recipes for splinter, junction, wikid, skilld, memoryd, tasksd (pins moved); ext-dist.sh archives a submodule from its own repository
The recipes live in the project repositories (committed there, not pushed yet).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 22:13:42 +00:00
lotherkandClaude Sonnet 5.5 f731d1291b tools: userland.sh drops the parent make's MAKEFLAGS; build-stamp.sh defaults MACHINE
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 22:06:01 +00:00
lotherkandClaude Sonnet 5.5 ca01d56c9d build: the userland builds in a chroot on Makronix; release gains the userland step; set list, mxupgrade, installimage and pins follow
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 22:01:30 +00:00
lotherk a537a3b57d pkgchroot: force deinstalls, and `mount' keeps its mounts
Two bugs, both measured on 2026-11-22 while rebuilding wm/mcde:

1. `force' ran `clean' + `reinstall'.  reinstall is `install-clean
   install' (mk/install/deinstall.mk:50) and install-clean only removes
   state files, it does not deinstall.  So pkg_add saw the package
   already recorded, refused with "package `mcde-0.1.0' already
   recorded as installed" and returned 0 -- the sysroot kept the
   pre-fix binaries: dtphoto stayed at 15:15 while the binary package
   carried the 21:28 build.  pkgsrc documents the way itself in
   mk/install/install.mk:225: `make deinstall reinstall'.  `deinstall
   || true' because the package may not be installed yet.

2. sandbox_mount set `trap umount_all EXIT INT TERM HUP', so the
   `mount' subcommand unmounted everything again before the caller
   could use it, and still printed "pkgchroot: mounted".  The trap
   belongs to the modes that mount and work: build and force.

Test: `pkgchroot.sh mount' leaves 5 mounts standing and
/mnt/pkgsrc/wm/mcde is visible in the chroot; `pkgchroot.sh umount'
brings it back to 0.  `deinstall' in the chroot removed
/usr/pkg/dt/bin/dtphoto and deregistered mcde-0.1.0.
2026-11-22 21:56:11 +00:00
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 691bf6e543 pkgchroot: the file index is rebuilt before any build
The by-file index beside the package database is a cache, and pkg_add trusts
it without checking the database: after a `force' run had removed packages,
it still named digest-20220214 as the owner of /usr/pkg/bin/digest -- a
package that was not registered and a file that did not exist.  pkg_add then
reported "digest-20220214: conflicting PLIST with digest-20220214: bin/digest"
against itself and would not install the tool, so every build that needed
something from the sysroot stopped.  Measured 2026-11-22: 45 packages were
left deleted, and none of them could be reinstalled.

sandbox_index() rebuilds the index from the +CONTENTS of the packages that
are registered, so it can only name packages that exist.  It runs at the end
of sandbox_mount(), before any build starts, and uses the sysroot's own
pkg_admin (/usr/sbin: the package tools are part of a base set since they
moved there), so the index format matches the pkg_add inside the chroot.

Measured: with the stale index, `tools/pkgchroot.sh force pkgtools/digest'
failed with the self-conflict above; after `pkg_admin -K ... rebuild' it
built and installed (rc=0, 14131 files from 86 packages).
2026-11-22 18:06:47 +00:00
lotherk 93aa5bacf2 MCDE: make debian / debian-install -- the desktop as one Debian package
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
2026-11-22 17:35:17 +00:00
lotherk b13d6cd081 mcde-dist: archive the tree, not the commit
git archive COMMIT writes "52 comment=<commit>" as a pax_global_header into
the tar, 38 bytes that change with every commit.  Two commits with the same
source tree therefore gave different archives, and a rebuild from a cleared
DISTDIR produced a checksum pkgsrc refuses against the distinfo in the tree:

  4fead8a3 (the merge)          67,122,036 bytes, BLAKE2s bb9d08d3...
  c6441410 (+ pkgsrc/distinfo)  67,122,047 bytes, BLAKE2s ecad6283...

The .key check hid it: the key hashes ls-tree, which does not see the commit
id, so the tool said "archive unchanged" and never rebuilt.  The archive now
comes from SRCREV^{tree}, the object that holds exactly what goes into the
package and carries no header.

Measured 2026-11-22 on the build host: both commits give 67,121,814 bytes,
BLAKE2s dd809aaa06af65128886c0741088174178a9dabb76cbb3a813da77d8557c04b7,
byte-identical across two runs with distfiles/ emptied in between.
ext-dist.sh is not affected: it archives REV:ext/src/NAME, a path, and git
writes no header for those (2,099,200 bytes twice, no pax_global_header).
2026-11-22 16:33:54 +00:00
lotherk 5fe3281496 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. It describes the tree as it
is on main: ext/src/* are submodules, distfiles/ is in the repository, and
the version is 0.99.11 (src/sys/conf/makronix-release) with 0.99.10
"Camouflage" as the last named release.

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.

build/ becomes build/* in .gitignore: git cannot re-include a file from an
excluded directory, so "build/ + !build/AGENTS.md" never worked and the
one tracked file the comment promises was never addable.

Verification: every relative link checked with git cat-file -e against main
(16 links, 0 dead, after build/AGENTS.md became addable); measured in a
throwaway repo that build/* adds build/AGENTS.md and still ignores
build/sub/x.o; make targets read from the root Makefile and
docs/BUILD-CONTRACT.md; 0.99.11 from src/sys/conf/makronix-release.
2026-11-22 14:12:28 +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
lotherk ce2d3211e1 srctree-stage: submodules go into the source set as tracked files
Since ext/src/mcde and the other projects are submodules, `git ls-files` names
each one as a single gitlink -- and pax -rw, given that path, copied the whole
working tree behind it: .git and build output included.  The root copy leaves
the gitlinks out now, and each submodule's tracked files are copied on their
own, so the source set carries the source and nothing else.

refs/ stays out as before: its five submodules are the 11 GB reference
checkouts, and only refs/AGENTS.md is part of a rebuild (the header says why).

Measured on the MacBook-built tree here:
- 7 submodules copied: splinter, krang, sshcrypt, kidstube, CNCL, mikronix,
  mcde (~303 MB together, mcde 286 MB).
- mcde alone: 19,591 files copied == `git -C ext/src/mcde ls-files | wc -l`,
  `find -name .git` = 0.
- sh -n tools/srctree-stage.sh rc=0.
2026-11-22 11:44:22 +01:00
lotherk 71ccd4b0b9 pkgchroot: force builds the package it was named, not its category
sandbox_run() assigned c=$1 and p=${1%/*} without local, so the second
sandbox_run in force's loop saw p=wm instead of p=wm/mcde: `pkgchroot force
wm/mcde` cleaned mcde and then ran `make -C /mnt/pkgsrc/wm reinstall`, a bulk
reinstall of every window manager in the category (measured 2026-11-22 on the
MacBook: after "Cleaning for mcde-0.1.0" it began to fetch 2bwm and afterstep).

The variables are prefixed (sr_path, sr_dir) so they cannot collide with a
caller's loop variable.

Measured: sh -n tools/pkgchroot.sh rc=0.
2026-11-22 11:29:52 +01:00
lotherk 7e20c712e8 ext/src/mcde is a submodule of its own repository
The fork's history is split out (git subtree split -P ext/src/mcde, 404
commits) and pushed to git.kropa.tech/hiddenbox/mcde.  This tree records the
commit 3d79fc80ca01e5afc94ea87db3c5a5f16c2284b5, whose tree is byte for byte
the tree of the last in-tree commit c723c7f277 for this path.

tools/mcde-dist.sh archives the submodule now: `git archive REV:ext/src/mcde'
in the parent writes an empty directory, because git does not descend into a
gitlink.  The key beside the archive is hashed with sha256 when sha256sum is
missing -- NetBSD has no sha256sum, so the key was empty and the "archive
unchanged" comparison meaningless (measured 2026-11-22).

ext/AGENTS.md: a change to MCDE is a commit in the submodule, then a gitlink
bump here.

Measured: git submodule status -> 3d79fc80...; git rev-parse
c723c7f277:ext/src/mcde, mcde-split^{tree} and HEAD:ext/src/mcde are all
7469d5a621.
2026-11-22 11:19:59 +01:00
lotherk cd58e70ef1 desktop icons: the IRIX Foundation pictures at 64x64
tools/fti2xpm.py rastered at one size only (32x32).  It takes the size as a
third argument now, and the six pictures the desktop shows come from the
Foundation .fti sources at 64x64: IrixDisk (scsi.fti), IrixCD
(cdrom.loaded.fti), IrixDVD (dvd.loaded.fti), IrixFloppy (floppy.loaded.fti),
IrixTape (dat.loaded.fti) and IrixNet (device.remote.fti).  The array in the
file keeps the name of the old ones (IrixDisk_m_pm), so nothing that includes
them changes.

WmMcdeDesktop.c names them, and a medium picks its picture by file system:
cd9660 the CD, udf the DVD, msdos the diskette, tar/dump the tape, anything
else the disk.  The cell grows to 96x96 for the 64 pixel picture and the
label under it.

Measured: make -C programs/dtwm rc=0, 0 errors (build/logs/dtwm-icons64.log).
2026-11-22 10:02:59 +01:00
lotherk 11bf05e108 pkgchroot: force -- clean and reinstall when only the recipe changed
install sees the package already recorded in the sysroot and does nothing,
so a change that does not bump the version went into no build at all
(measured 2026-11-21: the System Settings change).  force throws the work
directory away and installs again.
2026-11-21 21:54:43 +01:00
lotherk 6ec89e2678 pkgchroot: docbook stylesheets from the local catalog
xmlto (a dependency of wm/mcde) resolves the stylesheet of its manual through
the URL in the XML PI, and a chroot without a route stopped with "failed to
load external entity http://docbook.sourceforge.net/release/xsl/current/
manpages/docbook.xsl" (measured 2026-11-21 on the MacBook).  docbook-xsl
ships the mapping in /usr/pkg/share/xsl/docbook/catalog.xml; XML_CATALOG_FILES
names it, so the build needs no network.
2026-11-21 09:17:16 +01:00
lotherk b08d9d2cbc pkgchroot: no PKG_PATH -- pkgsrc refuses to build with it
pkgsrc stops every package with "Please unset PKG_PATH before doing pkgsrc
work!" (measured 2026-11-21 on the MacBook).  Dependencies are built here
like every other package, natively in the sysroot.
2026-11-21 03:33:06 +01:00
lotherk fef02b7f3f pkgchroot/userland: a fresh way starts with fresh work directories and a repository
Two things the MacBook needed once its sysroot was empty:

- build/sandbox/work belongs to the way it was built like /usr/pkg does: a
  cross work directory says .depends_done and then installs a package whose
  dependencies this sysroot no longer has.  A change of way moves it aside.
- pkg_add inside the chroot had no PKG_PATH, so a dependency pkgsrc did not
  build stopped mcde-motif with "no pkg found for libXft>=2.3.8nb1".  The
  binary repository of the set is mounted at /mnt/repo and named in PKG_PATH
  (measured 2026-11-21).
2026-11-21 03:25:16 +01:00
lotherk 85648c6f1c userland: a change of build way starts from an empty /usr/pkg
The packages in the sysroot belong to the way they were built: a cross build
writes .la dependencies as "=/usr/pkg/lib/..." and paths into its work tree,
a native build writes the plain path.  pkg_add does not replace a package that
is already recorded as installed, so the MacBook kept the cross libgcrypt.la
and xmlto stopped with "/usr/pkg/lib/libintl.la is not a valid libtool
archive" (measured 2026-11-21).  build/.sysroot-mode names the way; when it
differs, /usr/pkg is moved to build/usr-pkg.<old-way>-<date> and the run
starts from an empty one.
2026-11-21 03:20:57 +01:00
lotherk f973adc406 pkgchroot: /sbin and /usr/sbin in PATH -- mount is there
A build started over ssh on the MacBook ran with a PATH without /sbin, and
every package stopped at "pkgchroot.sh: umount_all: mount: not found"
(measured 2026-11-21, build/logs/native-2026-11-21.log).
2026-11-21 02:04:14 +01:00
lotherk a6d197875b mcde recipes and the cross configuration: the X of the build host, named once
These are the changes the cross (Linux) path needed before the chroot path
made them unnecessary on Makronix; they are kept because that path still
builds for the same sysroot on a host that is not Makronix.

tools/pkgsrc-cross.mk.conf names the host side in one place instead of in the
recipes: HOST_TOOLS_BIN on PREPEND_PATH (autoreconf stopped with "Can't exec
libtoolize"), HOST_X11BASE (the include path of the host's X), HOST_X11_LIBS
and HOST_FL_A (the archives the host tools link) and HOST_BUILD_CFLAGS
(-std=gnu17 -fPIE: the 1990s C of the forks, and NetBSD links PIE by default
so tradcpp failed with "relocation R_X86_64_32 ... can not be used when
making a PIE object").  /usr/pkg/lib comes before the base X when linking: a
library pkgsrc builds because the base copy is too old must be the one a
package links (the base freetype is 2.10.4, pkgsrc's 2.15.0 was ignored and
libfontconfig.so needed .19).  x11-links keeps the sysroot override only on a
host without X of its own (on Makronix it doubled the path, 7 instead of 111
pkg-config links, x11/libXft then "Package 'x11' not found").

ext/src/mcde/pkgsrc-motif and ext/src/mcde/pkgsrc use those variables; the
build tools (makestrs, wml, wmldbcreate) are built and run by the host, so
their CFLAGS come from HOST_BUILD_CFLAGS and their include path from
HOST_X11BASE.

Measured on makronix-build before the chroot path: mcde-motif rc=0 in 529 s,
wm/mcde rc=0 in 1506 s.
2026-11-21 01:49:20 +01:00
lotherk a4ea8fb56b release: a Makronix host builds the set in its own sysroot -- the first green release
build/obj/releasedir/amd64 with the sets is there, built on makronix-build by
/root/build-now.sh: fetch exit=0, userland exit=0, release exit=0
(build/logs/native-2026-11-20.log, 2026-11-21 01:32).

tools/userland.sh: on NetBSD the packages of the set are built in the sysroot,
natively (MODE=chroot, tools/pkgchroot.sh); on Linux pkgsrc cross-builds for
the same sysroot as before (MODE=cross).  Both fill destdir/usr/pkg and both
end in the same makronix set; the recipes know nothing of either.  In the
chroot the four forks built with no case for the host at all, where the cross
path had stopped on x11-links, the cross libtool, freetype and the host X
tools one after the other.

tools/makronix-set.sh, three things that only a release shows:

- ./usr/pkg itself is a METALOG record.  The prefix belongs to no package and
  the ancestor loop stops before it, so nbmtree stopped the distribution step
  with "./usr/pkg: missing directory in specification".
- What the set does not name, the sysroot does not keep.  A chroot build
  installs its build tools (perl, autoconf, ...) to build the set; the prune
  deregisters them and 526 of their files stayed (perl's cpan, perldoc, man
  pages), plus pkgdb.refcount.  checkflist counted every one as an extra file.
- ensure_pkgdb (pkg_admin -K db rebuild) runs for chroot too: a pkg_add that
  died leaves the by-file index claiming files nobody owns, and the next
  install of that package stops with "conflicting PLIST with libnbcompat".

tools/pkgchroot.sh: the sysroot's /dev and /mnt are tmpfs (the sets describe
those directories), pkgsrc, distfiles, work and packages are null mounts, and
WRKOBJDIR/PACKAGES/DISTDIR travel as make arguments -- the base bmake does not
read MAKECONF, and a mk.conf in the sysroot's /etc would be an extra file.
After the build the runtime state the packages leave behind is removed
(/var/cache, /var/dt, /var/spool/calendar, /tmp/dtinfogen-*, pkgdb.refcount);
none of it is in a base set.
2026-11-21 01:49:15 +01:00
lotherk 915fa8f763 userland: on Makronix the packages are built in the sysroot, natively
The packages of the makronix set are built for the target sysroot on every
host, but the way to build a Makronix program differs with the host, and that
difference belongs in the tools, not in recipes (AGENTS.md: cross and native
are one build):

  chroot  the host IS Makronix: tools/pkgchroot.sh chroots into
          build/obj/destdir.$ARCH and builds there with that system's
          compiler, libraries and package tools, into its /usr/pkg.  NetBSD
          builds its own packages this way.  Default on NetBSD.
  cross   the host is not Makronix (Linux): pkgsrc cross-builds for the same
          sysroot with this tree's toolchain (tools/pkgsrc-cross.mk.conf).

Measured 2026-11-20 on makronix-build, same tree, same four forks:

  cross: x11/mcde-motif and wm/mcde stopped one after the other on things
  that exist only because the build runs for a system it does not run on --
  pkgtools/x11-links with a doubled sysroot (7 instead of 111 pkg-config
  links, x11/libXft then "Package 'x11' not found"), the cross libtool
  writing .la dependencies as "=<work>/.buildlink/lib/libpng16.la", the base
  freetype 2.10.4 linked instead of the 2.15.0 pkgsrc builds, makestrs and
  tradcpp built for the target and run on the host.

  chroot: fuse-afpfs-ng, splinter, mcde-motif and mcde built with no case for
  the host at all (build/logs/pkgchroot-2026-11-20.log, 0 errors), the last
  two in 66 minutes including every dependency; /usr/pkg/dt/bin/dtfile in the
  sysroot, mcde-0.1.0.tgz in build/packages/All.

tools/pkgchroot.sh mounts the sysroot's /dev and /mnt as tmpfs (the sets
describe those directories; nothing of the build stays in them), the tree's
pkgsrc, distfiles, work and packages by null mount, and passes WRKOBJDIR,
PACKAGES and DISTDIR as make arguments -- the base bmake does not read
MAKECONF, and a mk.conf in the sysroot's /etc would be an extra file for
checkflist.  The binary packages of the set are still fetched (they are built
for the same NetBSD/x86_64), so only the four forks are built from source.
2026-11-20 22:06:03 +01:00
lotherk 0992bdb09c pkgsrc-cross.mk.conf: x11-links without a doubled sysroot on Makronix; .la paths in the "=" form
Two things the first cross build on Makronix (makronix-build, 2026-11-20)
stopped at:

- pkgtools/x11-links with X11BASE=${CROSS_DESTDIR}/usr/X11R7: the builtin
  checks put _CROSS_DESTDIR in front again (destdir/destdir/usr/X11R7), so
  libX11, libXrender and xorgproto were "not builtin", their files were not
  linked (7 pkg-config links instead of 111) and x11/libXft stopped with
  "Package 'x11' not found".  The override is for a host without X; on
  Makronix /usr/X11R7 is the native X and the links point where the target
  has the files.  Checked: USE_BUILTIN.libX11/libXrender/xorgproto = yes,
  share/x11-links/lib/pkgconfig has x11.pc.

- the cross libtool writes .la dependencies as "=$libdir/name", so one from
  the buildlink tree was installed as "=<work>/.buildlink/lib/libpng16.la"
  (libfreetype.la, libgcrypt.la) and the next package stopped with "is not a
  valid libtool archive".  An unwrap rule for the "=" form maps it to
  =/usr/pkg; checked: freetype2's libfreetype.lai now names
  =/usr/pkg/lib/libpng16.la.
2026-11-20 12:23:40 +01:00
lotherk fae95ccdc2 userland: mk-host.conf names nawk only where the bootstrap made one
A pkgsrc bootstrap on NetBSD installs no nawk; mk-host.conf pointed\nTOOLS_PLATFORM.awk at build/pkg/bin/nawk all the same, and every host tool on\nthe MacBook stopped in the dependency check ("build/pkg/bin/nawk: not found",\nmeasured 2026-11-20) -- devel/bison, devel/cmake, the docbook packages.  The\nline is written when the file exists (a Linux bootstrap), else the system awk\nis used.
2026-11-20 11:42:41 +01:00
lotherk 820cdad998 pkgsrc-cross.mk.conf: /usr/pkg/lib before the base X when linking
A library that pkgsrc builds because the base copy is too old must be the one a
package links.  Measured 2026-11-20 on makronix-build: the base freetype is
2.10.4, pkgsrc wants >=2.13 and builds libfreetype.so.6, but fontconfig linked
the base libfreetype.so.19 through -L=/usr/X11R7/lib and the next link stopped
with "libfreetype.so.19, needed by libfontconfig.so.1.17.0, not found".  With
-L=/usr/pkg/lib first, fonts/fontconfig builds (rc=0) and libfontconfig.so needs
libfreetype.so.6 with RPATH /usr/pkg/lib -- the same as the package the Linux
build shipped.  rpath-link lets ld follow NEEDED entries inside the sysroot.
2026-11-20 11:41:17 +01:00
lotherk c93d70fc57 pkg-binaries: no sort -V and no sha256sum, and an empty result is an error
On NetBSD sort(1) has no -V: the pipe that picks the newest package of a name
gave nothing, every wanted package counted as "not published for amd64", and
the script still ended with exit 0 after "0 packages, 0 bytes" -- userland then
failed later with "pkg_add: no pkg found for flex" (measured 2026-11-20 on
makronix-build).  newest() picks by pkgsrc's own version rules (pkg_admin pmatch
name>version; checked: foo-1.10 over foo-1.9), sha256_in() uses cksum where
sha256sum is missing, and a closure that finds nothing dies.  After the fix:
281 packages, 897 MB.
2026-11-20 10:52:15 +01:00
lotherk 5c880e9887 userland: the set is built for the sysroot on every host; dist scripts hash without digest(1)
tools/userland.sh decided by uname: on NetBSD it took a "native" branch that
built the forks for the bootstrap's prefix (build/pkg), never installed
anything into build/obj/destdir/usr/pkg and never ran tools/makronix-set.sh.
Measured 2026-11-20 on makronix-build: userland exit=0, then build.sh release
stopped at checkflist with "9422 missing files", all under ./usr/pkg.  The
cross branch builds what the set needs -- the sysroot, PREFIX /usr/pkg, this
tree's own toolchain from build.sh (tooldir.NetBSD-11.99.9-amd64 on Makronix)
-- and that is the same build on Linux and on Makronix (AGENTS.md: cross and
native are one build).  It is the default now; USERLAND_MODE=native keeps the
old branch for packages of the running host.  mk-host.conf takes the archives
from distfiles/ of the tree.

tools/ext-dist.sh and tools/mcde-dist.sh: digest_of() (digest when it exists,
else SHA512 from cksum) and no hash line without a value.  This was meant for
0c91b0cddf and stayed staged when that commit stopped at the ignored recipe
paths.  ext/src/mcde/pkgsrc-motif/distinfo names the archive in distfiles/.
2026-11-20 10:31:44 +01:00
lotherk db03e20f26 dist scripts: an existing identical archive is not a failure
ln of the archive into build/distfiles leaves a hard link; when it is already
there, cp says "are identical (not copied)" and exits 1, and the || exit 1 made
mcde-dist fail on every run after the first -- userland then reported
"tools/mcde-dist.sh failed" (measured 2026-11-20 on the MacBook).  cmp -s is
the question to ask: same content, nothing to do.
2026-11-20 03:44:26 +01:00
lotherk 231d474cd0 tools: sha256 without sha256sum, and no empty distinfo lines
The native build ran for the first time (t0050) and stopped twice in the same
place: tools/userland.sh called sha256sum at five points (no such program on
NetBSD), so the keys came out empty; and tools/ext-dist.sh / tools/mcde-dist.sh
wrote "BLAKE2s (...) = " and "SHA512 (...) = " with nothing after the equals
when build/pkg/bin/digest did not exist yet -- pkgsrc reads that as no checksum
and refused the forks with "checksum: No checksum recorded for mcde-0.1.0.tar.gz".

userland.sh gets sha256_in/sha256_of (sha256sum when there is one, else
"cksum -a sha256", as tools/build-stamp.sh and tools/makronix-distfiles.sh
already do); ext-dist.sh and mcde-dist.sh get digest_of() and write a hash line
only when there is a hash.  mcde-dist.sh's archive key uses the same fallback.
2026-11-20 00:09:59 +01:00
lotherk 34bc2e37a8 makronix-pins: do not walk up out of pkgsrc; one reason per failure
git -C pkgsrc rev-parse HEAD, with pkgsrc/ inside a git checkout and without a
pkgsrc/.git (as the source set carries it), walks up the directory chain and
answers with the outer repository's commit: measured on makronix-build, where
it compared PINS against e57d47bd3b (the Makronix commit) instead of the pkgsrc
pin and stopped make sourcesets with "PINS differs".  --git-dir names the
repository explicitly, so a missing one fails instead of answering for another.

The check also feeds emit into a file now: a die inside a pipeline only ends the
subshell and the comparison then reported "differs" on top of the real reason.
2026-11-19 12:24:34 +01:00
lotherk eb4b6ba65e distfiles: part of the repository
Konrad, 2026-11-19: everything the build needs lives in the repository --
today the source archives and the binary packages, later the sources of what
now comes as a binary.  The rule "distfiles/ never lives in the repository"
(AGENTS.md) was never his decision; it goes.  distfiles/ is the set the source
set carries (1621 archives, 4.6 GB, from /usr/src of Makronix 0.99.11 on the
build host); tools/pkgsrc-cross.mk.conf already prefers it.
2026-11-19 10:31:00 +01: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 f5a42ab966 dtlogin: LANG before PATH in the session environment (ksh93 dropped it)
The session ran with LANG=C although dtlogin passed LANG=en_US.UTF-8 to
Xsession (dtlogin -debug 3: 'LANG=en_US.UTF-8'; ps -e on Xsession showed it).
Xsession is a ksh93 script, and ksh93 93u+m 1.0.10 on NetBSD rejects LANG as
'en_US.UTF-8: unknown locale' and leaves it empty when PATH comes earlier in
the environment (put_lang -> libast setlocale); Xsession then set LANG=C.
Measured in the installed system: env -i PATH=/bin:/usr/bin LANG=en_US.UTF-8
ksh93 -> empty, LANG before PATH -> kept, no PATH -> kept.  verify.c now
creates LANG right after LOGNAME; setLang() replaces the value in place.

Tests: test-desktop-login's LOGIN and CORES checks matched padded ps and wc
output ('CORES= 0'); install-simple's .local lookup is bounded to 5 s per
round (the loop outlasted ENDCHK's 300 s without a network).
2026-11-18 12:28:02 +00:00
lotherk f5eabee88d test-desktop-login: wait for the greeter's window, check LANG and core files
dtgreet is in the process list before its window takes keys; typing 3 s
later lost the user name, 12 s did not.  New checks: the session's LANG is
en_US.UTF-8 (the default), and no core file is in the user's home (that is
how dtsession died, 2026-11-18).
2026-11-18 06:39:13 +00:00
lotherk 5764998fc2 install-simple: answer the museum question by its text, longer ENDCHK wait
The museum message's title is cut by the screen handling ('...qqqj(B Museum?'),
so the test hung there; its body names it.  The checks' own loops (mdnsd name,
Xorg) can take more than 150 s, which made the test fail after a correct
install (2026-11-18).
2026-11-18 05:04:50 +00:00
lotherk bc781a9e6a mcde: sessreg's path -- the session setup failed and dtlogin went back to the greeter
Xstartup's last line is 'exec sessreg -a ...' and Xreset's 'sessreg -d ...'.
configure (AC_CHECK_PROGS(SESSREG, sessreg)) recorded the bare name from the
build host, and Dtlogin*userPath had no /usr/X11R7/bin -- where NetBSD's
sessreg is.  The session setup died with 'Xstartup[57]: exec: sessreg: not
found', dtlogin restarted the greeter: the password was accepted and the
login bounced (measured in the installed VM 2026-11-18, Xerrors).

- pkgsrc/Makefile: ac_cv_prog_SESSREG=/bin/sessreg
- dtlogin/config/Xconfig.src: NetBSD's userPath carries /usr/X11R7/bin
  (xrdb, xset, xmodmap too)
- tools/install-simple.sh: answer the museum question (it hung there)
- tools/test-desktop-login.sh: the greeter test rebuilt: root shell first,
  wait for X and dtgreet before typing (keys sent too early were lost), -g
  restarts dtlogin with -debug.
2026-11-18 02:02:19 +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 9f5d55dab8 sign-release: the release key of the build host is the default
Without SIGNIFY_SECKEY 'auto' printed 'not signed' and left the previous
.sig next to the new SHA512: a stale signature, which tools/upgrade-verify.sh
and the source DVD check refuse.  Measured twice on 2026-11-17 (release b and
the source set c).  An explicit SIGNIFY_SECKEY still wins.
2026-11-17 20:49:17 +00:00
lotherk 6751dc39a9 build-stamp: a changed kernel configuration removes the kernel objects
config(1) writes a new Makefile and opt_*.h, but not every object depends
on them.  Measured 2026-11-17: after adding ALL's options, the Makefile had
-DRF_INCLUDE_PARITYLOGGING=1 and rf_paritylogging.o stayed from 10:12, so
the link failed on rf_ConfigureParityLogging.  The configuration of the
kernel (sys/conf/makronix_*.config, arch/*/conf/GENERIC and INSTALL) is
keyed on its own; a source change still builds the kernel incrementally.
2026-11-17 19:36:49 +00:00
lotherk fcee679eb5 makronix-set: two processes a file instead of ten (98 s -> 31 s)
The loop over the ~12000 files of the set asked stat(1) three times, each
helper twice (once to see which stat this is), plus sed and sha256sum|awk:
95 of the 97 s of 'set and repository' (userland-2026-11-17j.log).  The
kind of stat and sha256 is decided once, mode/type/size come from one stat
call, sed runs only for a path with //.  Run on the sysroot of
release-2026-11-17 after the old one: list and METALOG byte-identical,
98 s -> 31 s; test-tools.sh 34 ok.  NetBSD's stat -f %Lp is octal digits
already: printed %04d now (the old %04o turned 755 into 1363).
2026-11-17 17:25:41 +00:00
lotherk f878aa410e userland: fork_reconfigure runs pkgsrc's tools phase itself
The tools phase is reached only on the way to extract, which fork_reconfigure
keeps done, so the compiler wrapper (.gcc, .compiler, .tools) it had removed
was never made again and configure stopped: 'C compiler cannot create
executables' (build/logs/userland-2026-11-17i.log:304).  A plain
`bmake tools' in pkgsrc/wm/mcde made all three again (measured).
2026-11-17 17:09:08 +00:00
lotherk 056229500a userland: skip what did not change -- archive, binary packages, host tools
Measured on 2026-11-17 (userland-2026-11-17g.log): three minutes of every
make userland went by before MCDE was looked at, with nothing changed:
- mcde-dist.sh packed the archive again, 16 s (15.7 s of it gzip -9).  Now
  keyed on the source trees and the time; when it does pack, gzip -6
  (6.0 s, 0.9 % more bytes).
- pkg-binaries.sh fetch resolved the closure of 281 packages again (some
  1100 awk passes over the index; nothing was downloaded -- the files are
  from 2026-11-13).  Now keyed on the summary and the wanted list, with every
  file checked by its size: 44 s -> 0 s, measured twice.
- host_tools looked up the TOOL_DEPENDS of 84 package directories, 38 s.
  Now keyed on the list, the pkgsrc pin and mk-host.conf, written only when
  no host tool failed.
Each step writes its time into the log ("userland: [HH:MM:SS] ...").
2026-11-17 17:07:02 +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