Commit Graph
18 Commits
Author SHA1 Message Date
lotherkandClaude Opus 5.5 01ec19cc82 mcde: dtthemesync -- GTK, Qt, KDE and X programs take MCDE's palette
From the session's palette and font, with Motif's own colour calculation:
X resources (and the 16 terminal colours), GTK 1, GTK 2/3/4 themes with
Motif's bevels and no animation, qt5ct/qt6ct schemes and kdeglobals.  It
is also the XSETTINGS manager, so running GTK programs change with the
palette at once; System Settings runs it when a palette or font is chosen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 23:00:27 +00:00
lotherkandClaude Opus 5.5 c86243fd24 mcde: dtappscan, the installed applications by category
CDE's application manager shows a fixed list, installed or not.
dtappscan reads the desktop entries of the installed packages (Desktop
Entry Specification 1.5) and a table of the desktop's own programs, keeps
what is on the PATH, and writes CDE actions, icons (PNG to XPM) and one
folder per category in ~/.dt/Applications, at every login before the
session loads its actions.  The file manager has Applications among its
places, and the application manager opens the same folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 19:02:22 +00:00
lotherkandClaude Opus 5.5 f2e281c826 mcde: the front panel in a new order, its switch in the middle of the screen
Left of the workspace switch: Files (Home, Desktop, Documents, Downloads),
Mail (Text Editor, Calendar, Calculator, Icon Editor), Terminal (Disk
Utility, System Settings), Network (Remote Login, Sharing) and Desktop
Style with CDE's printers, applications and help in its drawer; right of
it only the running programs and the trash.  dtwm moves the panel so that
the switch stays in the middle of the screen, also when programs come and
go.  A program in a drawer is in the dock and not shown again on the
right.  dtfile shows the network for the folder ~/Network, which the panel
opens; the home folders are made at login.  Icons for the disk and the
network; dtremotelogin asks for user@computer and runs ssh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 18:49:07 +00:00
lotherkandClaude Opus 5.5 68f11cc393 mcde: backup by BorgBackup to a disk of its own, with a watcher for space
McdeSys gets the backup (lib/McdeSys/backup.c): a partition becomes the
backup disk with an encrypted repository (borg init -e repokey-blake2);
every hour root's crontab runs dtbackup run: borg create of / (and /home)
on its own file systems, lz4, then prune -- 24 hourly, 30 daily, 52
weekly, every monthly unless set otherwise (keep_* in
/etc/mcde-backup.conf, -1 keeps every one) -- and compact.  The watcher:
before and after each run, while the backup disk has less than min_free
percent free (10 unless set), the oldest backup is deleted and the space
given back; the newest is never deleted.  Listing (borg list --json) and
restoring a path into a folder (borg extract).  The passphrase lives in
/etc/mcde-backup.pass, root's alone, handed over by BORG_PASSCOMMAND.
docs/reference/borg.txt from borg 1.4.5's own documentation.

dtbackup run | status | list: the same from a shell and for cron, no X.

Measured: builds on the Linux host and compiles in the build VM; as a
user dtbackup status says no disk is set up and dtbackup run refuses.
Not measured: a real backup -- borg is not on the host and goes into the
set with the next userland.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 13:49:38 +00:00
lotherkandClaude Opus 5.5 33dcd9a72b mcde: McdeSys knows the disks, and the permissions the system should have
mcde_sys_disks lists the drives, each with its partitions: size, model,
file system, label, removable, the system's (/, /usr, /var, /home, swap),
where mounted and how full.  NetBSD: hw.disknames, dkctl getgeometry and
listwedges, atactl identify, getmntinfo, swapctl -l; Linux: lsblk -P -b.
mcde_sys_disk_mount (/media/LABEL; Linux through udisksctl),
_unmount, _check (fsck -n) and _erase (root; a drive with a system
partition or a mounted one is refused): NetBSD gpt destroy/create/add,
dkctl makewedges, newfs -O 2 or newfs_msdos -F 32; Linux sfdisk and
mkfs.ext4/vfat.  docs/reference/disks.txt.

mcde_sys_permissions compares owner, group and mode of the system's files
with the specification sysinst keeps for every installed set,
/etc/mtree/set.* (set.makronix too), and repairs them as root (mtree -e
-U).  mtree -k did not stop it from comparing sizes and checksums, so the
specification is narrowed to type, uname, gname, mode and link first.
Linux keeps no such list: not supported there.
docs/reference/permissions.txt.

Measured: on the Linux host the NVMe drive and its three partitions, all
the system's; erasing as a user refused.  In the build VM as root,
listing only: wd0 (QEMU HARDDISK, 68.7 GB) with dk0 on / and dk1 swap, cd0;
verifying the permissions reported 207 differences, all under /usr/pkg,
which that VM built itself instead of unpacking the set.  Nothing was
mounted, erased or repaired.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 13:12:14 +00:00
lotherkandClaude Opus 5.5 31e4398026 mcde: McdeSys finds the computers on the network and connects to them
mcde_sys_net_browse lists the computers that announce SMB, AFP, NFS, SSH
or just themselves by DNS-SD: on NetBSD through mdnsd with dns_sd.h from
base (DNSServiceBrowse per type, DNSServiceResolve per service, select
until the time is up; docs/reference/dns-sd.txt), on Linux with
avahi-browse -atrpk (its \DDD escapes decoded).  mcde_sys_net_shares
lists NFS exports (showmount -e) and SMB shares (smbclient -g -N -L);
mcde_sys_net_mount connects sftp:// (sshfs, a password on its standard
input), nfs:// (mount_nfs / mount.nfs) and afp:// (afpfs-ng's mount_afp)
to a folder; mcde_sys_net_unmount (fusermount -u, else umount).  Host
and user names are checked before they reach a command line.

mcde_sys_capture_limited ends a child after a time: showmount waited
minutes for an rpcbind that was not there (measured in the build VM);
the share lists wait 8 seconds.

Measured: on the Linux host 4 computers with their services (KITT,
N95 with SMB; two laptops with SMB and SSH), the local SMB share and NFS
export listed, a host name with ';' refused.  In the build VM: it builds
with -ldns_sd; without mdnsd a clear message; with mdnsd started the
browse ran and found none (qemu's user network carries no multicast);
showmount gave up after 8 s.  Mounting is not measured yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 12:47:12 +00:00
lotherkandClaude Opus 5.5 44e79e9ce2 mcde: Sharing in System Settings: SSH, SMB, NFS, AFP, AppleTalk
McdeSys gets the services that let others in (mcde_sys_service_state,
mcde_sys_service_set) and one list of shared folders for SMB, NFS and AFP
(mcde_sys_shares, mcde_sys_shares_set: /etc/mcde-shares, and a block
between "# MCDE shares begin" and "... end" in exports, smb.conf and
afp.conf; the rest of each file stays as written).  NetBSD switches
rc.conf and runs the rc.d scripts -- sshd; rpcbind, mountd, nfsd and
nfslocking for NFS; samba, netatalk, atalkd and papd from pkgsrc, whose
example rc.d scripts are copied to /etc/rc.d first, as PKG_RCD_SCRIPTS=YES
would.  Linux uses systemctl (ssh, smbd and nmbd, nfs-server, netatalk;
no AppleTalk).  NetBSD's kernel has AppleTalk (GENERIC: options NETATALK)
and pkgsrc's netatalk4 builds atalkd on NetBSD.  docs/reference/sharing.txt.

The Sharing pane (Internet & Network) shows each service with its switch
and how others reach it (ssh host, smb://host/, host:/folder,
afp://host/), and the shared folders with Add and Remove; as a user it
offers Unlock..., as Accounts does.

Measured: on the Linux host, read only: ssh, smb, nfs installed, enabled,
running; afp and appletalk not installed (the pane on Xvfb says so).  In
the build VM as root: NFS on started rpcbind, mountd, nfsd, statd, lockd;
sharing /tmp/mcdeshare made showmount -e list it for Everyone; NFS off
stopped them; the VM's rc.conf was restored after.  First found there:
mountd will not start without /etc/exports, and statd/lockd are one
script, nfslocking.  Samba and netatalk are not in the makronix set yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 12:36:46 +00:00
lotherkandClaude Opus 5.5 ae987f8593 mcde: Wi-Fi in System Settings: the networks in reach, joining one
McdeSys implements mcde_sys_wifi_scan and mcde_sys_wifi_join.  NetBSD
does what sysinst does (src/usr.sbin/sysinst/net.c): a network block in
/etc/wpa_supplicant.conf -- a new file gets the example's ctrl_interface
for the wheel group, so wpa_cli answers users -- and wpa_supplicant,
wpa_supplicant_flags and dhcpcd in rc.conf, each line replaced or added;
then both are restarted.  Scanning asks wpa_cli scan_results, else
ifconfig -v IF list scan (root).  Linux uses nmcli.  The sources are in
docs/reference/wifi.txt.

The Network pane lists the networks of the first Wi-Fi card with signal
and lock, scanned once the pane is drawn.  Join... opens a terminal where
su asks for the administrator's password and dtsystemsettings -join-wifi
IF SSID-HEX asks for the network's password without echo: the name goes
as hexadecimal, the password on no command line of MCDE's (nmcli takes it
on its own on Linux; said in linux.c).

Measured on the Linux host: test_sysinfo finds 5 networks on wlp0s20f3
(read only); the pane lists them on Xvfb; -join-wifi as a user refuses
with "Only the administrator can join" and refuses a bad name.  Not
measured: joining (never on this host), NetBSD scanning and joining
(no Wi-Fi in the build VM).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:37:38 +00:00
lotherkandClaude Opus 5.5 58ba130e88 mcde: read PNG with libpng, not with Motif
Motif 2.3.8 shifts the channels of a PNG without alpha the wrong way and
draws only its blue (docs/reference/motif-png.txt).  libDtSvc gets
McdeImageGetPixmap/McdeImageFreePixmap (Mcde/Image.h): PNG through libpng's
simplified interface (png_image, the background for the alpha), packed by
the visual's masks; every other format still through XmGetPixmap.  dtwm's
backdrops and slideshow and the small pictures of System Settings use it.
dtwm now also frees a backdrop pixmap that is not in Motif's cache (a
scaled copy), which it kept for good before.

configure finds libpng >= 1.6 with pkg-config; the recipe includes
graphics/png's buildlink3.mk (Motif depends on it already); the header is
in the PLIST.

Measured on Xvfb: the RGB PNG that showed only blue (slide-3.png before)
shows its colours as backdrop (build/mcde-shots/slide-3.png) and as a
small picture (desk-2.png).  A 16-bit PNG is not measured.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 08:16:14 +00:00
lotherkandClaude Opus 5.5 d3365797ed mcde: dtwm: backdrops from picture files, a folder as a slideshow
f.change_backdrop with pixmap 0 makes dtwm load the picture itself
(XmGetPixmap: JPEG and PNG through Motif), and the request is parsed from
its end, so a path may hold blanks.  f.mcde_slideshow INTERVAL RANDOM STYLE
FOLDER, and the resource Dtwm*mcdeSlideshow at the start, change the
backdrop of every workspace every INTERVAL minutes, in order or at random;
the folder is read anew each time.  Fit and Fill scale with Xrender's
bilinear filter instead of the nearest pixel.

Measured on Xvfb (build/mcde-shots/slide-*.png): c-red.jpg from "My
Pictures" filled the screen; the slideshow showed a-blue.jpg at once,
fitted, and the next picture after one minute; dtwm kept running.

Found: Motif 2.3.8 draws an RGB PNG without alpha as its blue channel only
(lib/Xm/Png.c shifts right where it must shift left);
docs/reference/motif-png.txt.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:54:21 +00:00
lotherkandClaude Opus 5.5 a6c21a4f89 mcde: the battery in the bar
McdeSys gets mcde_sys_battery: all batteries as one, charging, mains,
minutes left.  NetBSD reads the envsys(4) dictionary of /dev/sysmon as
envstat(8) does (acpibat "present", "charge", "charging", "discharge
rate"; acpiacad "connected"), Linux /sys/class/power_supply (energy_* or
charge_*, status, Mains/USB online).  The sources are in
docs/reference/battery.txt.

dtbar shows a fourth icon, only when there is a battery: full, half, low
(red), charging; its menu says the charge, the power source and the time
left.  The status bar is 30 pixels an icon.

Measured: on the Linux host test_sysinfo says "battery 76% ac", as
/sys/class/power_supply/BAT0/capacity and AC/online do; the menu on Xvfb
(build/mcde-shots/battery-menu.png) says "Battery: 76 %", "Power Source:
Power Adapter".  The NetBSD backend compiles and runs in the build VM,
which has no battery (envstat: no drivers registered): only the
no-battery case is measured there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 07:01:18 +00:00
lotherkandClaude Opus 5.5 76cc356c68 docs/reference/syspkgs.txt: what build.sh syspkgs is (read 2026-11-09)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-09 19:24:28 +00:00
lotherkandClaude Opus 5.5 5233d8297a mobile: mark the booted A/B slot successful from Linux
The bootloader counts a slot's retries down on every boot until the slot
is marked successful, and at 0 stops on "image destroyed" without falling
back to the other slot (measured).  qcom-ab-slot (soc/sm8150/rootfs, POSIX
sh) sets the successful bit of boot_<slot> in byte 6 of its GPT
attributes, in the primary and the backup table with both CRCs, checking
both before and after -- the edit qbootctl makes (docs/reference/
qbootctl.txt).  The runit service slot-successful runs it once sshd runs;
tools/mkrootimg.sh copies soc/<soc>/rootfs and rootfs-<base> into the
image.

Measured on hotdogb: after a flash (retry 7, not successful) the first
boot marks the slot at 6.4 s; fastboot then reports
slot-successful:a:yes and the retry count no longer drops.

devices/hotdogb/AGENTS.md: a rarer hang remains, 2 of 10 boots with
kernel patch 0003.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 21:12:16 +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 b83aaa425b docs: GOAL, AGENTS.md in every directory, build VM, offline build, references
Measurements named with their logs: the installs (BIOS, UEFI, encrypted, two CDs), the NetBSD self-build in the build VM (2 h 02 min, stopping only at checkflist for the missing userland), 9p and NFS against the local disk.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 12:53:21 +00:00
makronix fbe0f4ed1b handoff: measured state of the FDE medium, and the build order that fixes it
The installer cannot read its own CD: cd9660.kmod is 62 hours older than the
kernel inside the same ISO, so the module does not load. build.sh iso-image
only packages releasedir; the kmods come from distribution. Two steps, in this
order, with the timestamp check as the gate.

docs/HANDOFF-2026-11-05.md carries the measurements, the file map and what is
already proven (unencrypted GPT/EFI install boots to login:).
2026-11-05 16:00:21 +00:00
Makronix 0636e6ea15 reference: the install image needs a writable medium, and what happens when it does not
The amd64 EFI install image remounts its root read-write and copies
/tmp/gettytab into etc (distrib/amd64/installimage/etc.rc:39,46).  On a
read-only device the kernel accepts the remount and every write returns EIO,
which is the ld0d fsbn-264208 and gettytab transcript the boot failure was
reported as.  Measured both ways on the medium this tree built (2026-11-04):
attached writable it reaches install.sh, attached readonly=on it reproduces
the card.  The CD needs no writable medium -- tmpfs union on etc plus a
gettytab symlink.

Also corrects docs/reference/boot-cfg-timeout.txt section 9: install-image
does build; those runs failed on a stale work.fstab in an object directory
that is not used, because the EFI target builds inside src/.
2026-11-04 23:26:15 +00:00
makronix 9b62ae139d boot.cfg: the amd64 media declare a 5 second menu timeout, and what boots is measured.
The five amd64 boot.cfg.in files carried upstream's 30.  What a medium
actually waits comes from /boot.cfg, and on this tree's media that file is the
etc set's (distrib/sets/lists/etc/md.amd64:3), extracted after the medium's
own copy; measured with tools/boottimeout-probe.py on the built CD: countdown
5,4,3,2,1, menu gone at 5.8s; the same image with that byte set to 9 counts
from 9 and leaves the menu at 16.5s.  The patch makes the declared value equal
to the value that boots.

docs/reference/boot-cfg-timeout.txt records the quotes and the finding;
build/logs/t-d1972f2e-media.log is the release that carried it (rc=0).
2026-11-04 22:28:25 +00:00