Commit Graph
921 Commits
Author SHA1 Message Date
lotherk 0958f4243c mcde: icons above the wallpaper, dtchat links iconv, a README that is MCDE
Three submodule commits:

- 753c0f83 dtwm: the desktop icons stay above the wallpaper -- the icons are
  override-redirect and XLowerWindow put them below the backdrop window, so
  they were mapped but invisible on the MacBook.  DeskMap lowers the
  backdrops too; the screenshot shows them.
- dd05d43c libDtChat: link libiconv -- the library used iconv without
  carrying LTLIBICONV, so dtchat, dtchat-headless and dtchat-irc did not
  link.
- 285ea4b3 README: MCDE, not CDE -- the new README, the two screenshots from
  the MacBook and LICENSE.CNCL (CDE keeps COPYING/LGPL).
2026-11-22 13:52:21 +01:00
lotherk abe9bd18c4 packages.list: got comes in next to git
got (Game of Trees, pkgsrc devel/got) is installed in the makronix set as a
second, OpenBSD-style VCS for Git repositories.  It does not replace
git-base: Makronix's build calls `git archive`, `ls-files`, `ls-tree`,
`rev-parse`, `config`, `reset`, `restore` and `submodule`, and got has no
such commands -- a `git` symlink to got would stop `make release` (measured
on got-portable 0.127, the command lists).  Konrad chose got in addition,
git stays (2026-11-22).

Measured: tools/pkglist.sh bin lists devel/got next to devel/git-base.
2026-11-22 12:56:34 +01: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 62d9bb9c71 etc: junction, splinter and the four daemons as native services
Six rc.d scripts, all off by default (junction=YES etc. in /etc/rc.conf):
junction (the policy router, 127.0.0.1:8090), splinter (its MCP registry,
8098), wikid (8796), skilld (8790), tasksd (8781) and memoryd (8795).
The programs run in the foreground, so command_args ends in "&"; stop finds
them by their command, they write no pid file.

/etc/junction/junction.conf is a loopback listener with no endpoints and no
rules: a request is answered 503 naming why until one is added (the commented
block is the smallest working setup).  /etc/splinter/splinter.conf has one
provider, the local junction, so the routing decision stays in
/etc/junction/junction.conf and not in splinter.

wikid and memoryd take their embeddings from the local junction and keep
their data in /var/db/<name>; each start_precmd makes the directory.  skilld
and tasksd use their own stores, /var/db/skilld and /var/db/tasksd.

The scripts are installed by src/etc/rc.d/Makefile, the configurations by the
subdir loop in src/etc/Makefile, the directories by NetBSD.dist.base, and the
set list (src/distrib/sets/lists/etc/mi) carries all eight files.

Measured: sh -n on all six rc=0; /sbin/rcorder rc.d/* rc=0, junction at 113
before splinter (117), no stderr.
2026-11-22 11:40:50 +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 9f471c2847 mcde: the distfile is the source again
The "archive unchanged" check in tools/mcde-dist.sh was broken on NetBSD
(sha256sum does not exist, the key was empty), so the distfile was never
remade after the 64x64 icons and the AGENTS.md update: 66,941,013 bytes with
the old AGENTS.md (58,298) and the 32x32 pictures.  Every build from it built
the old desktop.

The fixed script made the archive the submodule's tree really is:
66,940,999 bytes, AGENTS.md 61,013 bytes, IrixDisk.m.pm "64 64".  Its
distinfo is be056d34 in the submodule; this commit bumps the gitlink and
carries the distfile and its key.

Measured: tools/mcde-dist.sh twice, the second run "archive unchanged
(HEAD ..., mcde 3d79fc80)".
2026-11-22 11:22:49 +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 fdc4565421 ext/src/mcde: the fork moves to its own repository
MCDE's history was split out of this tree (git subtree split -P
ext/src/mcde, 404 commits, head 3d79fc80ca01e5afc94ea87db3c5a5f16c2284b5)
and pushed to git.kropa.tech/hiddenbox/mcde.  The tree comes back as a
submodule; the in-tree copy leaves the index in this commit, so the history
of both sides stays complete and no file is lost (the same bytes are in the
submodule).

The pkgsrc recipe and tools/mcde-dist.sh keep working: the distfile is made
with git archive from the submodule.

Measured: tree of 3d79fc80 == tree of the last in-tree commit c723c7f277 for
this path.
2026-11-22 11:14:01 +01:00
lotherk c8847809cf ext/src: the other projects become submodules
splinter (replacing the in-tree copy), krang, sshcrypt, kidstube, CNCL and
mikronix are tracked as submodules of git.kropa.tech/hiddenbox/* now, next to
junction, memoryd, skilld, tasksd and wikid.  koder has no repository there
and is left out (Konrad, 2026-11-22).

The clone used a token for the private repositories; .gitmodules carries the
plain https URL.
2026-11-22 11:07:28 +01:00
lotherk 4c4bc9ade0 ext/src/splinter: the old in-tree copy leaves the index
It was committed as ordinary files, so a submodule entry could not be added
("already exists in the index").  The fork is replaced by the submodule of
git.kropa.tech/hiddenbox/splinter.
2026-11-22 11:04:38 +01:00
lotherk c723c7f277 mcde: the archive with the 64x64 icons and the AGENTS.md 2026-11-22 10:05:47 +01:00
lotherk c54fcd647f mcde/AGENTS.md: the file follows the code again
Seven paragraphs were out of date after this session's changes:

- System Settings is one window (1022x550, min equal to max, panes scroll in
  an XmScrolledWindow, the tab strip is one of many); a pane's picture must
  exist, three did not and one was used twice.
- The Dock has a pane again, and it works: ~/.dt/panel-apps, remove, add,
  _DtWmRestartNoConfirm.
- Startup Disk is not a pane any more; startupdisk.c is no longer built.
- dttoolbox's window title is "dttoolchest".
- dtkeys asks the machine (hw.model "Mac...") before usbdevs, because the
  internal keyboard may not be enumerated when the session starts.
- The panel defines its own arrow and keeps the busy cursor's handle (the
  black 16x16 square came from the frame's cursor).
- The desktop draws the Foundation icons at 64x64 by file system, shapes the
  icon window to picture and label, and maps/lowers it, so a raised window
  covers it.
- dtbar sets _MCDE_NO_FOCUS and dtwm skips such a client in its
  focus-follows-pointer path: the bar keeps the last program's menu.
2026-11-22 10:04:49 +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 836610fbc8 dtbar/dtwm: the bar is no focus target, so its menu can be used with the mouse
Moving the pointer from a program to the bar took the keyboard away from that
program: dtbar set the input focus to PointerRoot on EnterNotify and dtwm
cleared the active client, so the bar showed the M menu instead of the
program's and a click could not act on it (t0255/t0257).

Now dtbar marks its window _MCDE_NO_FOCUS and leaves the focus alone, and
dtwm's focus-follows-pointer path (HandleWsFocusIn) skips a client that
carries the property: the last program stays focused while the pointer crosses
the bar, the bar keeps showing its menu, and an item acts on the client the
menu came from (ItemActivated sends the ClientMessage to that window, not to
whoever has the X focus).

Measured: make -C programs/dtwm rc=0 and make -C programs/dtbar rc=0, 0
errors each.
2026-11-22 09:59:49 +01:00
lotherk b800c9c8cd dtwm: the desktop's icons look like 4Dwm's and stay under the windows
- No tile: the icon window is shaped (XShapeCombineMask) to the picture and
  the label, so the backdrop shows between them; the label is drawn on it with
  one pixel of black under it instead of a filled box.
- Bottom of the stack: the icons were mapped with XMapRaised, and an
  override-redirect window is not restacked by the window manager, so they
  stayed above every client.  They are mapped and lowered now -- a raised
  window, a full screen program included, covers them, as 4Dwm's desktop does.

Measured: make -C programs/dtwm rc=0, 0 errors (build/logs/dtwm-zorder2.log).

Not yet: the 64x64 pictures.  The .pm files of programs/icons are 32x32 and
scaling them would only blur; the IRIX .fti sources raster at 64 with
tools/fti2xpm.py once it takes a size.
2026-11-22 09:56:42 +01:00
lotherk d343079c35 dtwm: the panel says which pointer it wants
The busy cursor was created and thrown away (_DtGetHourGlassCursor's return
value went nowhere), so BUSY_START defined cursor None on the panel and the
pointer fell back to whatever the shell had inherited.  On the MacBook that
was a black 16x16 square (measured with XFixes: 16x16, hotspot 8,8, every
pixel black, serial 16) over the whole front panel, while the root and the
xterm showed the arrow and the I-beam.

The return value is kept now, and the panel defines the standard arrow on
itself when it is mapped instead of inheriting one from its frame.

Measured: make -C programs/dtwm rc=0, 0 errors (build/logs/dtwm-cursor.log).
2026-11-22 09:53:16 +01:00
lotherk a6bb36c3de dtwm: the panel finds a program's icon under either spelling
CDE names its icons with a capital (Dtterm.m.pm, Dtcalc.m.pm); a client's
WM_CLASS instance name is usually lower case and a kept program is written
with whatever the command names.  The panel tried the name as stored and in
lower case only, so a lower-case class with a capitalised icon file fell back
to Dtactn.  ClassIcon() tries the name as given, lower case and with a
capital, in that order, for the dock and for the drawers.

Measured: make -C programs/dtwm rc=0 on this tree (0 errors,
build/logs/dtwm-iconfix2.log).
2026-11-22 09:50:29 +01:00
lotherk fce9b71637 mcde: the review's loose ends
- dtsystemsettings/panes.c: the icon of every pane is unique again (Backup
  showed the same DtSystem.m.pm as System Information, Default Programs the
  same Dtmail.t.pm as Internet Accounts) and the dock entry is indented like
  its neighbours.
- startupdisk.c is no longer built: the pane was removed, the file stayed in
  the SUBDIRS list.
- dttoolbox.msg: message 2 says "No dttoolchest menu", like message 1 says
  "dttoolchest".
- dock.c stores the program's class as the command names it (lower case, as
  WM_CLASS's instance name is), not with an invented capital.  dtwm compares
  classes with strcasecmp (WmMcdePanel.c:144, 233), so matching works either
  way; the icon lookup by file name is what a made-up case could spoil.
2026-11-22 09:40:15 +01:00
lotherk 68f51449cc configure: a plain build installs into /usr/mdt
CDE's upstream default is /usr/dt.  On this development machine the desktop
lives in /usr/mdt (the running install is there since 2026-11-16), so a plain
./configure && make install went to /usr/local instead, next to the one that
is running.  The pkgsrc recipe still passes its own --prefix (/usr/pkg/dt).
2026-11-22 09:30:30 +01:00
lotherk 1d1232175f mcde: the archive with the Dock pane 2026-11-22 08:09:02 +01:00
lotherk b003169830 dtsystemsettings: a Dock pane that works
The Dock entry is back, and it is a pane of its own: it lists the programs
kept in the front panel (the CLASS and COMMAND lines of ~/.dt/panel-apps),
removes the chosen one, adds one from a command, writes the file at once and
restarts the window manager (_DtWmRestartNoConfirm) so the panel is built
again.  The icon is Dtapps.m.pm -- the entry was PANE_LATER with
DtPanel.m.pm, which does not exist, so it was greyed out and had no picture.
2026-11-22 08:08:45 +01:00
lotherk 2dd1c61b1a mcde: the archive of 94ab6eb75e 2026-11-22 06:46:42 +01:00
lotherk 94ab6eb75e dtsystemsettings: include Xm/ScrolledW.h for the pane scrolled window
The pane scrolls since 8f03d0d74e; the widget class was not declared
(measured 2026-11-22 on the MacBook: xmScrolledWindowWidgetClass
undeclared).
2026-11-22 06:46:01 +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 961d06225e mcde: the archive of 8f03d0d74e
The recipe had the archive of the commit before the System Settings change.
2026-11-21 21:46:03 +01:00
lotherk 8f03d0d74e mcde: one window size for System Settings, tabs that are one of many, icons that exist
- dtsystemsettings: the shell is 1022x550 and stays so (min/max equal); every
  pane lives in it instead of growing the window (thirteen per-pane
  XtVaSetValues(shell, width, height) calls are gone), and a taller pane
  scrolls (the pages sit in an XmScrolledWindow with XmAUTOMATIC).
- panes.c: CDs & DVDs had no icon (Dtmedia.m.pm does not exist) - it shows
  IrixCD.m.pm; Energy Saver shows SDtpowermgr.m.pm; Accounts had the same icon
  as Startup (DtStart.pm) and shows McdeUser.t.pm.  The "Startup Disk" entry
  and the disabled "Dock" entry (no icon, PANE_LATER) are removed.
- McdePrefs: the tab strip is one of many (XmNradioBehavior,
  XmNradioAlwaysOne).  Without it every visited tab stayed pressed
  (measured 2026-11-21: Keyboard, Mouse and Shortcuts all down at once).
- dttoolbox: the window title is "dttoolchest" (msg 1 of the catalog).
- McdeSys: mcde_sys_keyboard_is_mac asks the machine (hw.model "Mac...")
  before usbdevs.  At session start the internal keyboard may not be
  enumerated yet, so dtkeys took a MacBook for a PC keyboard and exchanged
  Alt and Command (_MCDE_KEYS said "pc", measured 2026-11-21).
2026-11-21 21:44:16 +01:00
lotherk 633787ec1f mxupgrade: write the sysupgrade configuration when it is missing
sysupgrade(8) stopped the first real upgrade with "Configuration file
/usr/pkg/etc/sysupgrade.conf does not exist" before it began (measured
2026-11-21 on the MacBook).  The release to install is on mxupgrade's command
line, but sysupgrade reads KERNEL, SETS and POSTINSTALL_AUTOFIX from that file,
so mxupgrade writes the defaults where the sysupgrade that runs looks for them
(/etc/sysupgrade.conf and /usr/pkg/etc/sysupgrade.conf), once, if absent.
Checked on the MacBook with a stub sysupgrade: the file is created and the run
reaches the end.
2026-11-21 20:52:47 +01:00
lotherk b419080298 make release: the archives of the source set, before the source set
make sourcesets stopped with "2080 archives in build/distfiles: 2076 missing"
(build/logs/make-release-2026-11-21b.log): the source set is built from
build/distfiles, which tools/makronix-distfiles.sh fetch fills.  It is a step
of the release now -- an archive path against its hash, an archive the shared
DISTDIR has is linked, nothing to download twice.
2026-11-21 15:15:20 +01:00
lotherk 0b61f53389 distfiles.lst: the archives of the forks in the source set
tools/makronix-distfiles.sh list, after ext-dist.sh and mcde-dist.sh wrote the
archives of mcde, afpfs-ng and splinter into distfiles/.  make sourcesets
stopped with "distfiles.lst is stale" (build/logs/make-release-2026-11-21.log).
2026-11-21 14:08:04 +01:00
lotherk 1c881d7f49 make release: the userland belongs to it
The release target ran build-stamp, build.sh release, sourcesets, iso and usb;
the packages of the makronix set were missing, and checkflist stopped on every
file under /usr/pkg (11,817 missing, measured 2026-11-19).  tools/userland.sh
runs between the stamp and build.sh: it fills destdir/usr/pkg and generates
src/distrib/sets/lists/makronix/mi.  With that the chain is green on both
hosts (makronix-build 2026-11-21 01:32, makronix-mbp 11:18), each with
fetch exit=0, userland exit=0, release exit=0.
2026-11-21 12:34:55 +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 f7a139f694 motif recipe: the build tools link the host archives where the host has X
The cross branch named ${MAKRONIX_TOP}/build/pkg/lib/libXt.a and friends.  That
is a Linux host, where userland builds them as host tools; on Makronix the
builtin libXt is used, the bootstrap has no libXt.a, and makestrs stopped at
the link ("cannot find /usr/src/build/pkg/lib/libX11.a", measured 2026-11-20).
Where /usr/X11R7/lib/libXt.a and /usr/lib/libfl.a exist, they are named
instead; the bootstrap path stays for the Linux host.
2026-11-20 16:12:57 +01:00
lotherk 464caf2bbc mcde recipes: the build tools take the X of the build host
makestrs, wml and wmldbcreate are built and RUN by the build host, and in a
cross build prefix is the target ( /usr/pkg ): there /usr/pkg/include has no
X11, and makestrs stopped with "X11/Xos.h: No such file or directory" on
Makronix (measured 2026-11-20) while the Linux host had the buildlink stub in
that directory.  Where the host has its own X (/usr/X11R7), the tools use it;
else the old -I${PREFIX}/include stays.
2026-11-20 15:40: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 0c91b0cddf ext: the recipes of the forks are tracked again, with their distinfo
The root .gitignore said "pkgsrc/", which git applies at every level, so
ext/src/*/pkgsrc -- the recipes of MCDE, afpfs-ng and splinter -- were ignored
and never in the repository; a fresh clone had no recipe for any fork and the
source set could not carry one.  The rule is "/pkgsrc/" now: the checkout at
the top stays out, the recipes belong in.

The three distinfo files name the hashes of the archives this run packed, and
the archives themselves are the ones in distfiles/ (regenerated with digest, or
with cksum when digest does not exist yet).
2026-11-20 05:59:49 +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 bb51357db4 installimage: the source-set check names the image targets, not every parse
bsd.subdir parses distrib/amd64/installimage for obj and release as well, so an
unconditional .error stopped build.sh release on a tree whose source sets did not
exist yet -- before anything was built (measured 2026-11-19 on makronix-build and
on the MacBook).  make(obj) and make(release) now parse; make(install_image) and
make(install_image-bios) still refuse with the same sentence, which is where the
image is actually built.
2026-11-19 15:36:40 +01:00
lotherk 56c241db9f distfiles.lst: regenerated against the pkgsrc checkout at the pin
The list is generated from pkgsrc's distinfo files (tools/makronix-distfiles.sh
list); with pkgsrc now a real checkout at 3c1118e94 instead of the source set's
copy, the closure resolves to 2124 archives (489 packages), 73 added and 7
removed.  Found by make sourcesets, which refuses a stale list.
2026-11-19 15:34:22 +01:00