Skip to content

release: ship MCPd as an LhA archive built on AmigaOS - #6

Merged
derfsss merged 2 commits into
mainfrom
develop
Sep 11, 2026
Merged

derfsss merged 2 commits into
mainfrom
develop

Conversation

@derfsss

@derfsss derfsss commented Sep 11, 2026

Copy link
Copy Markdown
Owner

Fixes the protection-bit problem at its source, so the file a user downloads is correct before it ever reaches an Amiga.

The problem

AmigaOS protection bits belong to the file, not to its contents, and no cross-platform container carries them. A bare MCPd ELF downloaded from the release page and moved onto an Amiga over SMB, a USB stick, or a browser arrives with the e (executable) bit protected. The daemon then refuses to run, and the error looks nothing like the cause.

Both installers (MCPd-Install, scripts/install_mcpd_autostart.py) set the bits themselves, so this only ever bit people doing it by hand — which is exactly what a first-time user does.

The fix

scripts/build_release_lha.py assembles the archive on an AmigaOS filesystem — a QEMU guest will do; it needs no hardware and leaves nothing behind. It stages the daemon, the five install scripts and a README, sets the executable bit on the binary and the script bit on the scripts, runs LhA, and then — rather than assuming — extracts the archive again into a clean directory and checks the flags came back before it will hand over the file.

The s bit is what makes that check meaningful: it is never a filesystem default, so -s--rwed after extraction can only have come out of the archive.

MCPd-1.3.lha (126,574 bytes) is attached to the v1.3 release alongside the bare ELF, and is what the README and INSTALL.md now point a new user at.

Verified on a QEMU guest

  • extracted files carry ----rwed (binary) and -s--rwed (scripts)
  • MCPd-Install runs by name, with no Execute — proving the script bit survived — and exits 0
  • the scripts inside the archive are pure LF, 0 CRLF

Two things found along the way

  • .gitattributes (new). The install scripts are uploaded to targets byte-for-byte from the working tree, and on a Windows checkout autocrlf had been giving every one of them CRLF endings — a stray carriage return on each AmigaDOS script line, and visible ^M in Amiga text viewers. eol=lf pins them, along with the daemon sources the Docker toolchain compiles from the same tree.
  • MCPd-Install printed (input.) instead of (input.*). * is the AmigaDOS Echo escape character; a literal one needs **. Found by running the shipped artifact rather than reading it.

Release status

The v1.3 release needed nothing else. Everything committed after the tag is documentation, and mcpd/ + host/ at v1.3 still match main, so the attached binary remains current.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VF4wwBXaKNK2Y2N5sYtt71

derfsss and others added 2 commits September 11, 2026 08:31
AmigaOS protection bits belong to the file, not to its contents, and
no cross-platform container carries them. A bare `MCPd` ELF downloaded
from the release page and moved onto an Amiga over SMB, a USB stick,
or a browser arrives with the `e` bit protected; the daemon then
refuses to run, and the error looks nothing like the cause. The two
installers set the bits themselves, so this only ever bit people doing
it by hand -- which is exactly the path a first-time user takes.

`scripts/build_release_lha.py` fixes it at the source by assembling
the archive *on an AmigaOS filesystem* (a QEMU guest will do; it needs
no hardware and leaves nothing behind). It stages the daemon, the five
install scripts and a README, sets the executable bit on the binary
and the script bit on the scripts, runs `LhA`, and then -- rather than
assuming -- extracts the archive again into a clean directory and
checks the flags came back before it will hand over the file. The `s`
bit is the proof: it is never a filesystem default, so `-s--rwed` on
extraction can only have come out of the archive.

`MCPd-1.3.lha` (126,535 bytes) is now attached to the v1.3 release
alongside the bare ELF, and is what the README and INSTALL.md point a
new user at. The release needed nothing else: everything committed
after the tag is documentation, and `mcpd/` + `host/` at `v1.3` still
match `main`, so the attached binary remains current.

Also adds `.gitattributes`. The install scripts are uploaded to
targets byte-for-byte from the working tree, and on a Windows checkout
autocrlf had been giving every one of them CRLF endings -- a stray
carriage return on each AmigaDOS script line, and visible ^M in Amiga
text viewers. `eol=lf` pins them, along with the daemon sources the
Docker toolchain compiles from the same tree.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VF4wwBXaKNK2Y2N5sYtt71
Running the installer out of the release archive showed the last line
as "keyboard/mouse injection (input.) is DISABLED" -- the asterisk had
vanished. In AmigaDOS Echo, '*' escapes the next character, so a
literal one has to be written '**'. MCPd-Enable-Input already carried
a comment about this; MCPd-Install did not.

Found by actually running the shipped artifact rather than reading it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VF4wwBXaKNK2Y2N5sYtt71
@derfsss
derfsss merged commit b94fcda into main Sep 11, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant