commit aeb03b75a4b0315d76311f04282a047865785431
parent 96c958a3df6f91e22cb0353b26f0f1caac844343
Author: torter <koubbamohamedrayan@gmail.com>
Date: Sat, 21 Nov 2026 13:05:39 +0000
site: binary packages and the bootstrap, repo at chamesle.org/repo, x86 iso, handbook for mag
Diffstat:
34 files changed, 478 insertions(+), 534 deletions(-)
diff --git a/docs/404.html b/docs/404.html
@@ -26,7 +26,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
diff --git a/docs/about.html b/docs/about.html
@@ -32,7 +32,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<b>About</b>
</div>
@@ -54,20 +54,21 @@ with them. The old code is still on <a href="https://github.com/tortr-rs/chamesl
<ul>
<li><b>rifle</b>, the coreutils, from scratch, in one C file. It is tested against GNU's tools: 810 cases pass.<br>
The Rifle Shoots down the GNU<br>
-Unfortunately the GNU herd got so big the rifle doesn't have enough ammo to shoot all of it down. gmake, to build musl, and the kernel's build tools are still GNU.</li>
+Unfortunately the GNU herd got so big the rifle doesn't have enough ammo to shoot all of it down.</li>
<li><b>Winchester</b>, the init. A shell script that runs <code>/etc/rc</code> and keeps the gettys alive.</li>
-<li><b><a href="https://spas.chamesle.org/">SPAS</a></b>, the package manager. Its command is <code>hoard</code>. It reads Gentoo's repository and runs the ebuilds, on the musl profile.
-<code>hoard sync</code> fetches the tree.</li>
+<li><b><a href="https://github.com/tortr-rs/mag">mag</a></b>, the package manager, in one C file with its own inflate, tar, sha256 and RSA.
+It installs signed binary packages and runs nothing but the download command.</li>
+<li><b>chamesle-bootstrap</b>, which puts the base on a mounted disk with mag, like debootstrap.</li>
<li><b>chamesle-disk</b> and <b>chamesle-chroot</b>, two small helpers for installing: the first runs cfdisk and makes a vfat boot partition and a ZFS root, the second chroots with <code>/proc</code>, <code>/dev</code> and the rest mounted. The install itself stays by hand.</li>
-<li><b>musl</b> for the C library, <b>mksh</b> for the login shell and <code>/bin/sh</code>, a shell script init in the FreeBSD style (<code>/etc/init.conf</code>, services in <code>/etc/rc.d</code>),
+<li><b>musl</b> for the C library, <b>mksh</b> for the login shell, a shell script init in the FreeBSD style (<code>/etc/init.conf</code>, services in <code>/etc/rc.d</code>),
<b>limine</b> to boot.</li>
<li><b>Linux 6.18 LTS</b> as the kernel, prebuilt. Nobody here builds a kernel.</li>
</ul>
-<p>No GNU software goes in the system. The exceptions are build tools: gmake, bison, flex and m4, which
-some packages need while they are being built. They are not part of what gets installed.</p>
+<p>The rest, the kernel included, comes as binary packages from a large musl repo, which mag reads as it is. Nobody
+here compiles anything to install Chamesle, so it goes on old machines as fast as on new ones.</p>
<h2 id="roadmap">Roadmap</h2>
-<p>The plan is on the <a href="./#plan">home page</a>. There are no dates.</p>
+<p>Next: more of the base in our own repo, and more machines tested. There are no dates.</p>
<p>X22, our X server, is a separate project and has
<a href="https://x22.chamesle.org/">its own site</a>.</p>
@@ -78,13 +79,13 @@ vi, and nothing else. You write the shell and everything after it.</p>
<h2 id="help">Help out</h2>
<ul>
<li>Say hello and ask things on the <a href="board.html">board</a> or in the <a href="chat.html">chat</a>.</li>
- <li>When the source is out, build it and tell us what breaks.</li>
+ <li>Install it on whatever you have and tell us what breaks.</li>
<li>Chip in on <a href="https://ko-fi.com/L6N725GI1V">Ko-fi</a>. It pays for hosting and test machines.</li>
</ul>
<p>cheers @tortr-rs</p>
<h2>License</h2>
-<p>Not decided. The packages SPAS builds keep their own licenses.</p>
+<p>Not decided. The packages keep their own licenses.</p>
</main>
diff --git a/docs/board.html b/docs/board.html
@@ -32,7 +32,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
diff --git a/docs/chat.html b/docs/chat.html
@@ -32,7 +32,7 @@
<b>Chat</b> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
diff --git a/docs/chess.html b/docs/chess.html
@@ -32,7 +32,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
diff --git a/docs/docs.html b/docs/docs.html
@@ -32,7 +32,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
@@ -41,16 +41,16 @@
<p><i>How to build, install and run Chamesle.</i></p>
<ol>
<li><a href="handbook-about.html">About Chamesle</a>
-<ul><li><a href="handbook-about.html#s1-1">1.1 What it is</a></li><li><a href="handbook-about.html#s1-2">1.2 The layout of the system</a></li><li><a href="handbook-about.html#s1-3">1.3 Where the sources are</a></li></ul>
+<ul><li><a href="handbook-about.html#s1-1">1.1 What it is</a></li><li><a href="handbook-about.html#s1-2">1.2 Where the packages come from</a></li><li><a href="handbook-about.html#s1-3">1.3 The layout of the system</a></li><li><a href="handbook-about.html#s1-4">1.4 Where the sources are</a></li></ul>
</li>
<li><a href="handbook-preparing.html">Preparing</a>
-<ul><li><a href="handbook-preparing.html#s2-1">2.1 What the build host needs</a></li><li><a href="handbook-preparing.html#s2-2">2.2 Building SPAS and rifle</a></li><li><a href="handbook-preparing.html#s2-3">2.3 Getting the Gentoo tree</a></li><li><a href="handbook-preparing.html#s2-4">2.4 The profile</a></li><li><a href="handbook-preparing.html#s2-5">2.5 make.conf</a></li></ul>
+<ul><li><a href="handbook-preparing.html#s2-1">2.1 What you need</a></li><li><a href="handbook-preparing.html#s2-2">2.2 From another Linux</a></li><li><a href="handbook-preparing.html#s2-3">2.3 Getting on the network</a></li></ul>
</li>
<li><a href="handbook-installing.html">Installing by hand</a>
-<ul><li><a href="handbook-installing.html#s3-1">3.1 chamesle-disk</a></li><li><a href="handbook-installing.html#s3-2">3.2 Partitioning and file systems by hand</a></li><li><a href="handbook-installing.html#s3-3">3.3 Unpacking the stage</a></li><li><a href="handbook-installing.html#s3-4">3.4 Building the stage</a></li><li><a href="handbook-installing.html#s3-5">3.5 The other stages</a></li><li><a href="handbook-installing.html#s3-6">3.6 fstab</a></li><li><a href="handbook-installing.html#s3-7">3.7 Host name, users, password</a></li><li><a href="handbook-installing.html#s3-8">3.8 The kernel and the boot entry</a></li><li><a href="handbook-installing.html#s3-9">3.9 First boot</a></li></ul>
+<ul><li><a href="handbook-installing.html#s3-1">3.1 chamesle-disk</a></li><li><a href="handbook-installing.html#s3-2">3.2 Partitioning and file systems by hand</a></li><li><a href="handbook-installing.html#s3-3">3.3 chamesle-bootstrap</a></li><li><a href="handbook-installing.html#s3-4">3.4 Working inside the new root</a></li><li><a href="handbook-installing.html#s3-5">3.5 fstab</a></li><li><a href="handbook-installing.html#s3-6">3.6 Host name and password</a></li><li><a href="handbook-installing.html#s3-7">3.7 The boot entry</a></li><li><a href="handbook-installing.html#s3-8">3.8 First boot</a></li><li><a href="handbook-installing.html#s3-9">3.9 What to install next</a></li><li><a href="handbook-installing.html#s3-10">3.10 32-bit machines</a></li></ul>
</li>
-<li><a href="handbook-spas.html">Using SPAS</a>
-<ul><li><a href="handbook-spas.html#s4-1">4.1 The commands</a></li><li><a href="handbook-spas.html#s4-2">4.2 Installing and removing</a></li><li><a href="handbook-spas.html#s4-3">4.3 Where it keeps things</a></li><li><a href="handbook-spas.html#s4-4">4.4 make.conf</a></li><li><a href="handbook-spas.html#s4-5">4.5 Repositories</a></li><li><a href="handbook-spas.html#s4-6">4.6 USE flags and keywords</a></li><li><a href="handbook-spas.html#s4-7">4.7 Binary packages</a></li><li><a href="handbook-spas.html#s4-8">4.8 Writing an ebuild</a></li></ul>
+<li><a href="handbook-mag.html">mag</a>
+<ul><li><a href="handbook-mag.html#s4-1">4.1 The commands</a></li><li><a href="handbook-mag.html#s4-2">4.2 Installing and removing</a></li><li><a href="handbook-mag.html#s4-3">4.3 Where it keeps things</a></li><li><a href="handbook-mag.html#s4-4">4.4 Repositories</a></li><li><a href="handbook-mag.html#s4-5">4.5 Making a package</a></li></ul>
</li>
<li><a href="handbook-rifle.html">rifle</a>
<ul><li><a href="handbook-rifle.html#s5-1">5.1 What it is</a></li><li><a href="handbook-rifle.html#s5-2">5.2 The tools</a></li><li><a href="handbook-rifle.html#s5-3">5.3 Building</a></li><li><a href="handbook-rifle.html#s5-4">5.4 Tests</a></li></ul>
@@ -59,13 +59,13 @@
<ul><li><a href="handbook-base.html#s6-1">6.1 init</a></li><li><a href="handbook-base.html#s6-2">6.2 rc, init.conf and the services</a></li><li><a href="handbook-base.html#s6-3">6.3 Shutting down</a></li><li><a href="handbook-base.html#s6-4">6.4 The files in /etc</a></li><li><a href="handbook-base.html#s6-5">6.5 Users</a></li><li><a href="handbook-base.html#s6-6">6.6 udev and modules</a></li><li><a href="handbook-base.html#s6-7">6.7 Networking</a></li><li><a href="handbook-base.html#s6-8">6.8 Wireless</a></li><li><a href="handbook-base.html#s6-9">6.9 Mounting and disks</a></li></ul>
</li>
<li><a href="handbook-kernel.html">The kernel and firmware</a>
-<ul><li><a href="handbook-kernel.html#s7-1">7.1 The kernel package</a></li><li><a href="handbook-kernel.html#s7-2">7.2 Updating</a></li><li><a href="handbook-kernel.html#s7-3">7.3 Modules</a></li><li><a href="handbook-kernel.html#s7-4">7.4 Firmware</a></li><li><a href="handbook-kernel.html#s7-5">7.5 An initramfs</a></li></ul>
+<ul><li><a href="handbook-kernel.html#s7-1">7.1 The kernel package</a></li><li><a href="handbook-kernel.html#s7-2">7.2 Updating</a></li><li><a href="handbook-kernel.html#s7-3">7.3 Modules</a></li><li><a href="handbook-kernel.html#s7-4">7.4 Firmware</a></li><li><a href="handbook-kernel.html#s7-5">7.5 The initramfs</a></li></ul>
</li>
<li><a href="handbook-iso.html">The live ISO</a>
-<ul><li><a href="handbook-iso.html#s8-1">8.1 What it is</a></li><li><a href="handbook-iso.html#s8-2">8.2 How it boots</a></li><li><a href="handbook-iso.html#s8-3">8.3 Trying it in qemu</a></li></ul>
+<ul><li><a href="handbook-iso.html#s8-1">8.1 What it is</a></li><li><a href="handbook-iso.html#s8-2">8.2 How it boots</a></li><li><a href="handbook-iso.html#s8-3">8.3 Making it</a></li><li><a href="handbook-iso.html#s8-4">8.4 Trying it in qemu</a></li></ul>
</li>
<li><a href="handbook-maintaining.html">Maintaining</a>
-<ul><li><a href="handbook-maintaining.html#s9-1">9.1 Updating packages</a></li><li><a href="handbook-maintaining.html#s9-2">9.2 Cleaning up</a></li><li><a href="handbook-maintaining.html#s9-3">9.3 C23 and CFLAGS</a></li><li><a href="handbook-maintaining.html#s9-4">9.4 Installing into a root</a></li><li><a href="handbook-maintaining.html#s9-5">9.5 Build tools</a></li><li><a href="handbook-maintaining.html#s9-6">9.6 Failures you will see</a></li><li><a href="handbook-maintaining.html#s9-7">9.7 Keeping a build</a></li></ul>
+<ul><li><a href="handbook-maintaining.html#s9-1">9.1 Updating</a></li><li><a href="handbook-maintaining.html#s9-2">9.2 Cleaning up</a></li><li><a href="handbook-maintaining.html#s9-3">9.3 Configuration files</a></li><li><a href="handbook-maintaining.html#s9-4">9.4 Failures you will see</a></li></ul>
</li>
<li><a href="handbook-files.html">File reference</a>
<ul><li><a href="handbook-files.html#s10-1">10.1 On an installed system</a></li><li><a href="handbook-files.html#s10-2">10.2 In the sources</a></li><li><a href="handbook-files.html#s10-3">10.3 Commands in short</a></li></ul>
diff --git a/docs/download.html b/docs/download.html
@@ -4,12 +4,12 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Download - Chamesle</title>
-<meta name="description" content="Download the Chamesle ISO: one image for x86-64 machines, BIOS and UEFI, with its checksum and how to write it to a stick.">
+<meta name="description" content="Download the Chamesle ISO for x86-64 or 32-bit x86, with its checksum and how to write it to a stick.">
<link rel="canonical" href="https://chamesle.org/download.html">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Chamesle">
<meta property="og:title" content="Download - Chamesle">
-<meta property="og:description" content="Download the Chamesle ISO: one image for x86-64 machines, BIOS and UEFI, with its checksum and how to write it to a stick.">
+<meta property="og:description" content="Download the Chamesle ISO for x86-64 or 32-bit x86, with its checksum and how to write it to a stick.">
<meta property="og:url" content="https://chamesle.org/download.html">
<link rel="stylesheet" href="style.css?19">
<link rel="icon" href="img/logo.png">
@@ -32,25 +32,35 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
<main>
<h2>Download</h2>
-<p>Chamesle is one ISO for x86-64 machines. Write it to a stick, boot it, and install from it by hand with the
-<a href="handbook-installing.html">handbook</a>.</p>
+<p>Chamesle is one ISO, for x86-64 machines, and one for 32-bit x86. Write it to a stick, boot it, and install from it
+by hand with the <a href="handbook-installing.html">handbook</a>. There is no stage: <code>chamesle-bootstrap</code>
+fetches the base from the repos while you install.</p>
-<p><a class="button" href="https://github.com/tortr-rs/system/releases/latest/download/chamesle.iso">Download chamesle.iso (447 MB)</a></p>
+<p><a class="button" href="https://github.com/tortr-rs/system/releases/latest/download/chamesle.iso">Download chamesle.iso (376 MB)</a></p>
<table>
<tr><td>File</td><td>chamesle.iso</td></tr>
-<tr><td>Size</td><td>447 MB</td></tr>
-<tr><td>SHA-256</td><td><code>ac10b4c41f66790004f8d05c76f2229523667e014ce108de392825788e10f232</code></td></tr>
+<tr><td>Size</td><td>376 MB</td></tr>
+<tr><td>SHA-256</td><td><code>fd6f3b28cbf9707dfbea3496adc4b86b9c61560c87b1e10f4a82ebef270bb10d</code></td></tr>
<tr><td>Machines</td><td>x86-64, BIOS and UEFI</td></tr>
<tr><td>Kernel</td><td>Linux 6.18 LTS</td></tr>
</table>
+<h3>32-bit</h3>
+<p><a class="button" href="https://github.com/tortr-rs/system/releases/latest/download/chamesle-x86.iso">Download chamesle-x86.iso (291 MB)</a></p>
+<table>
+<tr><td>File</td><td>chamesle-x86.iso</td></tr>
+<tr><td>Size</td><td>291 MB</td></tr>
+<tr><td>SHA-256</td><td><code>d2b506c4cabdfa7440c92953e7744f75ce6d28051fccef1fcaba10c89e010e72</code></td></tr>
+<tr><td>Machines</td><td>32-bit x86 with SSE2 (Pentium 4 and later), BIOS</td></tr>
+</table>
+
<p>Check the download before you use it:</p>
<pre>sha256sum chamesle.iso</pre>
@@ -58,35 +68,32 @@
<p>Find the stick with <code>lsblk</code> and use its name, not a partition. This erases everything on it.</p>
<pre>dd if=chamesle.iso of=/dev/sdX bs=4M status=progress conv=fsync</pre>
-<h2>The stage</h2>
-<p><a class="button" href="https://github.com/tortr-rs/chamesle/releases/download/stage-20261117/chamesle-stage-20261117.tar.xz">Download chamesle-stage-20261117.tar.xz (988 MB)</a></p>
-<p>The system as a stage tarball: musl, rifle, mksh, Winchester, gcc, python, perl, SPAS and sam. Unpack it into a new root as in <a href="handbook-installing.html">the handbook</a>. Check it against <a href="https://github.com/tortr-rs/chamesle/releases/download/stage-20261117/chamesle-stage-20261117.tar.xz.sha256">the sha256</a>.</p>
-<h3>The graphical stage</h3>
-<p><a class="button" href="https://github.com/tortr-rs/chamesle/releases/download/stage-20261117/chamesle-stage-graphical-20261117.tar.xz">Download chamesle-stage-graphical-20261117.tar.xz (1.5 GB)</a></p>
-<p>The same system with Xorg, 9wm, 9term, acme and the other Plan 9 programs. It starts X on the first login at tty1. Check it against <a href="https://github.com/tortr-rs/chamesle/releases/download/stage-20261117/chamesle-stage-graphical-20261117.tar.xz.sha256">the sha256</a>.</p>
-
-
<h2>What is on it</h2>
-<p>A live system with mksh, vim, SPAS and the Gentoo tree, <code>chamesle-chroot</code>, <code>chamesle-disk</code>
-(cfdisk, then vfat for boot and ZFS for the root), the disk tools (sfdisk, mkfs.ext4, mkfs.fat, zpool, zfs) and the
-handbook in <code>/usr/share/doc/chamesle/</code>. It boots with limine and logs in as root with no password.</p>
+<p>A live system that logs in as root: mag with the keys and the repos, <code>chamesle-bootstrap</code>,
+<code>chamesle-chroot</code>, <code>chamesle-disk</code>, the disk tools (cfdisk, sfdisk, lsblk, blkid, mkfs.ext4,
+mkfs.fat, zpool, zfs, limine), dhcpcd and iwd for the network, the Intel wireless firmware, vim, and the handbook in
+<code>/usr/share/doc/chamesle/</code>.</p>
<h2>What you need</h2>
-<p>An x86-64 machine with 2 GB of RAM and a disk to install on. The network comes up with DHCP on a wired card; wifi
-firmware is added with SPAS after the install, as the handbook says.</p>
+<p>A machine with 256 MB of RAM or more, a disk to install on, and a network connection: a cable works at once,
+wireless with <code>iwctl</code>. The packages come from the repos during the install.</p>
<h2>Try it in QEMU first</h2>
-<pre>qemu-system-x86_64 -cpu max -m 2G -cdrom chamesle.iso -boot d
-qemu-system-x86_64 -cpu max -m 2G -bios /usr/share/qemu/edk2-x86_64-code.fd -cdrom chamesle.iso</pre>
+<pre>qemu-system-x86_64 -m 1G -cdrom chamesle.iso -boot d
+qemu-system-x86_64 -m 1G -bios /usr/share/qemu/edk2-x86_64-code.fd -cdrom chamesle.iso</pre>
<p>The first boots it as BIOS, the second as UEFI.</p>
<h2>Then</h2>
-<p>Install it with <a href="handbook-installing.html">chapter 3 of the handbook</a>: partition the disk, copy the
-system, write the boot entry, reboot.</p>
+<p>Install it with <a href="handbook-installing.html">chapter 3 of the handbook</a>: partition the disk, run
+<code>chamesle-bootstrap /mnt</code>, write the fstab and the boot entry, reboot.</p>
+
+<h2>The repo</h2>
+<p>Chamesle's own packages are at <code>https://chamesle.org/repo/x86_64</code> and <code>/repo/x86</code>, signed
+with <a href="repo/chamesle-20261118.rsa.pub">chamesle-20261118.rsa.pub</a>.</p>
<h2>Older Chamesle ISOs</h2>
-<p>Anything older with Chamesle's name on it, such as the 0.7 ISO, is the old Debian-based distro. It is a different
-system and gets no updates.</p>
+<p>The stages of 2026-11-17 and anything older with Chamesle's name on it, such as the 0.7 ISO, are earlier systems.
+They get no updates.</p>
</main>
diff --git a/docs/editions.html b/docs/editions.html
@@ -33,7 +33,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
diff --git a/docs/handbook-about.html b/docs/handbook-about.html
@@ -4,12 +4,12 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>About Chamesle - Chamesle</title>
-<meta name="description" content="Chamesle is a Linux distribution built from source that you put on a disk yourself, starting from the ISO. There is no installer: you">
+<meta name="description" content="Chamesle is a small Linux distribution on musl that you put on a disk yourself, from the ISO. There is no installer and">
<link rel="canonical" href="https://chamesle.org/handbook-about.html">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Chamesle">
<meta property="og:title" content="About Chamesle - Chamesle">
-<meta property="og:description" content="Chamesle is a Linux distribution built from source that you put on a disk yourself, starting from the ISO. There is no installer: you">
+<meta property="og:description" content="Chamesle is a small Linux distribution on musl that you put on a disk yourself, from the ISO. There is no installer and">
<meta property="og:url" content="https://chamesle.org/handbook-about.html">
<link rel="stylesheet" href="style.css?19">
<link rel="icon" href="img/logo.png">
@@ -32,7 +32,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
@@ -40,41 +40,45 @@
<p><a href="docs.html">Contents</a> | <a href="handbook-preparing.html">Preparing →</a></p>
<h2>1. About Chamesle</h2>
<h2 id="s1-1">1.1 What it is</h2>
-<p>Chamesle is a Linux distribution built from source that you put on a disk yourself, starting from the ISO. There is no installer: you install the root file system, write the configuration and the boot entry by hand. <code>chamesle-disk</code> partitions and formats the disk for you if you want, and this handbook goes through every other step.</p>
+<p>Chamesle is a small Linux distribution on musl that you put on a disk yourself, from the ISO. There is no installer and nothing is compiled: <code>chamesle-bootstrap</code> puts the base into an empty root with the package manager, and you write the fstab, the password and the boot entry by hand. This handbook goes through every step.</p>
<p>The parts:</p>
<table>
<tr><th>part</th><th>what it is</th></tr>
<tr><td>kernel</td><td>a prebuilt Linux 6.18 LTS kernel with its modules</td></tr>
<tr><td>musl</td><td>the C library</td></tr>
+<tr><td>mag</td><td>the package manager, binary packages only, in one C file</td></tr>
<tr><td>rifle</td><td>the coreutils, all in one C file; <code>cat</code>, <code>ls</code>, <code>cp</code> and the rest are links to one program</td></tr>
-<tr><td>SPAS</td><td>the package manager; its command is <code>hoard</code>. It builds from source and runs Gentoo's ebuilds</td></tr>
-<tr><td>mksh</td><td>the shell, login shell and <code>/bin/sh</code></td></tr>
+<tr><td>mksh</td><td>the login shell; <code>/bin/sh</code> is busybox's ash</td></tr>
<tr><td>init</td><td>Winchester, <code>/sbin/init</code>, a shell script that runs under mksh, in the style of FreeBSD's: <code>/etc/rc</code>, <code>/etc/init.conf</code>, services</td></tr>
<tr><td>limine</td><td>the boot loader, BIOS and UEFI</td></tr>
</table>
-<p>Chamesle is made to be the most UNIX distribution possible. The coreutils are rifle's, the init is Winchester, and the rest is what Gentoo's ebuilds build: GNU software where a package needs it, bash for the ebuilds themselves.</p>
-<p>The package repository is Gentoo's, on the musl profile, and <code>hoard</code> runs its ebuilds. Everything is built on the machine that installs it, so the first install takes a while (LLVM is the longest).</p>
-<h2 id="s1-2">1.2 The layout of the system</h2>
+<p>Chamesle is made to be the most UNIX distribution possible, and to run on almost anything: the same base goes on a new laptop and on a Pentium 4 with 256 MB of memory. It is a system for the tty first. Anything else is a <code>mag install</code> away.</p>
+<h2 id="s1-2">1.2 Where the packages come from</h2>
+<p>mag reads two kinds of repository, both signed:</p>
+<ul>
+<li>Chamesle's own, at <code>https://chamesle.org/repo</code>: <code>chamesle-base</code> (Winchester, <code>/etc/rc</code>, the services, the tools of this book and the keys), <code>mag</code> and <code>rifle</code></li>
+<li>a large musl repository with everything else: the kernel, the firmware, the libraries, editors, compilers, X, about 28,000 packages for x86_64</li>
+</ul>
+<p>Both are in <code>/etc/mag/repos</code>. A package is checked against the keys in <code>/etc/mag/keys</code> before anything of it is unpacked.</p>
+<h2 id="s1-3">1.3 The layout of the system</h2>
<pre>/bin /sbin /lib /lib holds the musl loader and the firmware
-/usr/bin /usr/sbin programs, /usr/lib libraries, /usr/share data, /usr/include headers
+/usr/bin /usr/sbin programs, /usr/lib libraries, /usr/share data
/usr/local/bin yours, first in PATH
-/boot kernel, config, System.map, limine.conf (on the EFI partition)
-/etc configuration
+/boot kernel, initramfs, limine.conf (on the EFI partition)
+/etc configuration; /etc/mag is mag's
/lib/modules kernel modules, one directory per kernel version
-/lib/firmware firmware for the hardware, zstd compressed
-/var/db/pkg which package owns which file
-/var/cache/distfiles downloaded sources
+/lib/firmware firmware for the hardware
+/var/lib/mag which package owns which file
+/var/cache/mag downloaded indexes and packages
/run /tmp tmpfs, made new at every boot</pre>
-<p>The PATH of a login shell is <code>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</code>. Packages install into <code>/usr</code>.</p>
-<h2 id="s1-3">1.3 Where the sources are</h2>
+<h2 id="s1-4">1.4 Where the sources are</h2>
<table>
<tr><th>directory</th><th>what is in it</th></tr>
-<tr><td><code>system/</code></td><td><code>tools/</code> (<code>chamesle-bootstrap</code>, <code>chamesle-chroot</code>, <code>chamesle-disk</code>), <code>files/</code> (init, rc and the services), <code>iso/</code>, this handbook</td></tr>
-<tr><td><code>SimplePackagemAnagingSystem/</code></td><td>SPAS: the Rust source of <code>hoard</code>, and <code>src/ebuild.sh</code>, the environment ebuilds run in</td></tr>
+<tr><td><code>system/</code></td><td><code>tools/</code> (<code>chamesle-bootstrap</code>, <code>chamesle-chroot</code>, <code>chamesle-disk</code>, and <code>mkapk</code>, <code>mkrepo</code>, <code>mkpkgs</code> for the repo), <code>files/</code> (init, rc and the services), <code>pkg/</code>, <code>keys/</code>, <code>iso/</code>, this handbook</td></tr>
+<tr><td><code>mag/</code></td><td><code>mag.c</code>, <code>c.h</code>, <code>build.sh</code></td></tr>
<tr><td><code>rifle/</code></td><td><code>rifle.c</code>, <code>build.sh</code>, <code>tests/run.sh</code></td></tr>
-<tr><td>Gentoo</td><td>the ebuild tree, which <code>hoard sync</code> fetches (chapter 2)</td></tr>
</table>
-<p>The commands in this book assume the source trees are in <code>$HOME/src/system</code>, <code>$HOME/src/SimplePackagemAnagingSystem</code> and <code>$HOME/src/rifle</code>. Change the paths if yours are elsewhere.</p>
+<p>They are on github.com/tortr-rs.</p>
<hr>
<p><a href="docs.html">Contents</a> | <a href="handbook-preparing.html">Preparing →</a></p>
</main>
diff --git a/docs/handbook-base.html b/docs/handbook-base.html
@@ -32,7 +32,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
@@ -63,11 +63,10 @@
<pre>hostname = chamesle
# started in this order at boot, stopped in reverse at shutdown
-#boot-services = {NetworkManager,LightDM,dbus}
boot-services = {udev,modules,network}
modules = {}
-ttys = {tty1,ttyS0}
+ttys = {tty1,tty2,tty3,tty4,tty5,tty6,ttyS0}
getty = agetty --noclear $tty linux
getty-ttyS0 = agetty -L $tty 115200 vt100</pre>
<table>
@@ -80,7 +79,7 @@ getty-ttyS0 = agetty -L $tty 115200 vt100</pre>
<tr><td><code>getty-NAME</code></td><td>the getty command for that tty alone</td></tr>
</table>
<p>The parser is <code>conf</code> in <code>/etc/init.sh</code>; <code>conf KEY</code> prints the value, with a list separated by spaces. A change to <code>ttys</code> or <code>getty</code> takes effect at the next boot.</p>
-<p>A service is an executable file in <code>/etc/rc.d</code> (or <code>/usr/local/etc/rc.d</code>, for the ones you add) that takes <code>start</code>, <code>stop</code>, <code>restart</code> or <code>status</code>. The base set has three: <code>udev</code> (starts <code>udevd</code>, replays the devices and waits for them), <code>modules</code> and <code>network</code> (<code>dhcpcd</code>). A name in <code>boot-services</code> without a script is skipped with one line saying so.</p>
+<p>A service is an executable file in <code>/etc/rc.d</code> (or <code>/usr/local/etc/rc.d</code>, for the ones you add) that takes <code>start</code>, <code>stop</code>, <code>restart</code> or <code>status</code>. The base set has <code>udev</code> (starts <code>udevd</code>, replays the devices and waits for them), <code>modules</code>, <code>network</code> (<code>dhcpcd</code>), and <code>dbus</code>, <code>iwd</code> and <code>NetworkManager</code> for when those packages are installed. A name in <code>boot-services</code> without a script is skipped with one line saying so.</p>
<p><code>service</code> is the way to run them:</p>
<pre>service -l every service
service -e the services of boot-services, as paths
@@ -99,49 +98,44 @@ shutdown -p +10 back in ten minutes</pre>
<h2 id="s6-4">6.4 The files in /etc</h2>
<table>
<tr><th>file</th><th>what it holds</th></tr>
-<tr><td><code>passwd</code>, <code>group</code></td><td>accounts and groups; no shadow file, the hash is in <code>passwd</code></td></tr>
-<tr><td><code>shells</code></td><td><code>/bin/sh</code>, <code>/usr/bin/mksh</code>, <code>/usr/bin/ksh</code></td></tr>
+<tr><td><code>passwd</code>, <code>shadow</code>, <code>group</code></td><td>accounts, password hashes, groups</td></tr>
+<tr><td><code>shells</code></td><td>the login shells; <code>/bin/mksh</code> is one</td></tr>
<tr><td><code>init.conf</code></td><td>host name, boot services, modules, ttys (6.2)</td></tr>
-<tr><td><code>fstab</code></td><td><code>proc</code>, <code>sysfs</code>, <code>tmpfs</code> on <code>/tmp</code>, plus the lines you add</td></tr>
-<tr><td><code>profile</code></td><td><code>PATH</code>, <code>EDITOR="sam -d"</code>, <code>PAGER=less</code>, <code>umask 022</code></td></tr>
+<tr><td><code>fstab</code></td><td>the file systems (3.5)</td></tr>
+<tr><td><code>profile</code></td><td><code>PATH</code>, <code>PAGER</code>, <code>umask 022</code>, and <code>/etc/profile.d/*.sh</code></td></tr>
<tr><td><code>os-release</code></td><td><code>NAME=Chamesle</code>, <code>ID=chamesle</code></td></tr>
-<tr><td><code>make.conf</code></td><td><code>MAKEOPTS</code> and <code>CFLAGS</code> for hoard</td></tr>
-<tr><td><code>skel/</code></td><td>empty directory for the files new homes start from</td></tr>
+<tr><td><code>mag/</code></td><td>the repos, the keys and the architecture (4.3)</td></tr>
+<tr><td><code>skel/</code></td><td>the files new homes start from</td></tr>
</table>
<p>The login shell is mksh and <code>/etc/profile</code> is read by login shells. For a prompt and aliases make <code>~/.mkshrc</code> and set <code>ENV=$HOME/.mkshrc</code> in <code>/etc/profile</code>.</p>
<h2 id="s6-5">6.5 Users</h2>
-<p>There is no <code>useradd</code>. To add <code>alice</code>:</p>
-<pre>echo 'alice:HASH:1000:1000:alice:/home/alice:/usr/bin/mksh' >> /etc/passwd
-echo 'alice:x:1000:' >> /etc/group
-mkdir /home/alice
-chown 1000:1000 /home/alice</pre>
-<p><code>HASH</code> comes from <code>openssl passwd -6</code> on a machine that has it. To put alice in <code>wheel</code>, add her name to the last field of the <code>wheel:x:10:</code> line.</p>
+<pre>adduser alice
+adduser alice wheel</pre>
+<p><code>adduser</code> makes the account, the group and the home, and asks for the password; <code>passwd alice</code> changes it. <code>deluser alice</code> takes the account away. For <code>doas</code> or <code>sudo</code>, <code>mag install</code> them and give <code>wheel</code> the right in their file.</p>
<h2 id="s6-6">6.6 udev and modules</h2>
-<p>eudev is the udev. <code>udevd</code> gives devices their nodes in <code>/dev</code> and loads the modules the hardware needs. eudev is built without the hardware database (<code>--disable-hwdb</code>).</p>
+<p>eudev is the udev. <code>udevd</code> gives devices their nodes in <code>/dev</code> and loads the modules the hardware needs.</p>
<p>kmod provides <code>modprobe</code>, <code>insmod</code>, <code>rmmod</code>, <code>lsmod</code>, <code>modinfo</code> and <code>depmod</code>. A kernel's modules are in <code>/lib/modules/VERSION</code>. To load one by hand: <code>modprobe name</code>. To load one at every boot, put its name in <code>modules</code> of <code>/etc/init.conf</code>. To keep one from loading, put <code>blacklist name</code> in a file in <code>/etc/modprobe.d/</code>.</p>
<h2 id="s6-7">6.7 Networking</h2>
-<p><code>dhcpcd</code> is the DHCP client and is in the base set. For a wired interface:</p>
-<pre>dhcpcd eth0</pre>
-<p><code>dhcpcd</code> without arguments takes every interface. It is the <code>network</code> service, in <code>boot-services</code> by default, so it is up at boot. <code>/sys/class/net/</code> lists the interfaces. For <code>ip</code>, install iproute2:</p>
-<pre>hoard install sys-apps/iproute2</pre>
+<p><code>dhcpcd</code> is the DHCP client and is in the base set. It is the <code>network</code> service, in <code>boot-services</code> by default, and takes every interface, so a cable is up at boot. <code>ip</code> lists them:</p>
+<pre>ip addr
+ip link set eth0 up</pre>
<p>A static address:</p>
<pre>ip addr add 192.168.1.10/24 dev eth0
-ip link set eth0 up
ip route add default via 192.168.1.1
echo 'nameserver 192.168.1.1' > /etc/resolv.conf</pre>
+<p>and take <code>network</code> out of <code>boot-services</code>.</p>
<h2 id="s6-8">6.8 Wireless</h2>
-<p><code>iw</code> talks to the kernel's nl80211. It is in Gentoo's tree, with libnl:</p>
-<pre>hoard install net-wireless/iw
-iw dev the wireless interfaces
-ip link set wlan0 up
-iw dev wlan0 scan | grep SSID</pre>
-<p><code>sys-firmware/wireless-regdb</code> (in the base set) has the regulatory database, and the card's firmware is in <code>/lib/firmware</code> from <code>sys-kernel/linux-firmware</code>. If <code>dmesg</code> says a firmware file failed to load, check that it is there.</p>
-<p>For an open network <code>iw dev wlan0 connect NAME</code> is enough. For WPA the connection needs <code>wpa_supplicant</code>; it is <code>net-wireless/wpa_supplicant</code> (<code>hoard search wpa</code>). Install it, give it a configuration file with the <code>ssid</code> and the <code>psk</code>, and run it on the interface. Then <code>dhcpcd wlan0</code>.</p>
+<p>The card needs its firmware (7.4). Then iwd:</p>
+<pre>mag install iwd dbus</pre>
+<p>and put <code>dbus</code> and <code>iwd</code> in <code>boot-services</code> before <code>network</code>:</p>
+<pre>boot-services = {udev,modules,dbus,iwd,network}</pre>
+<p><code>service dbus start</code>, <code>service iwd start</code> to have them now. <code>iwctl</code> connects, the same as on the ISO (2.3), and remembers the network. dhcpcd gives it an address.</p>
+<p><code>wpa_supplicant</code> works too, for those who know it: <code>mag install wpa_supplicant</code>.</p>
<h2 id="s6-9">6.9 Mounting and disks</h2>
<pre>mount /dev/sdb1 /mnt/usb
mount -t vfat -o ro /dev/sdb1 /mnt/usb
umount /mnt/usb</pre>
-<p><code>mount</code>, <code>umount</code>, <code>lsblk</code>, <code>blkid</code>, <code>sfdisk</code>, <code>fdisk</code> and <code>cfdisk</code> are util-linux's, <code>zpool</code> and <code>zfs</code> are OpenZFS's, <code>mkfs.ext4</code> and <code>fsck.ext4</code> are e2fsprogs', <code>mkfs.fat</code> is dosfstools'.</p>
+<p><code>mount</code> and <code>umount</code> are busybox's; <code>lsblk</code>, <code>blkid</code>, <code>sfdisk</code> and <code>cfdisk</code> are packages of their own, <code>mkfs.ext4</code> and <code>fsck.ext4</code> are e2fsprogs', <code>mkfs.fat</code> is dosfstools', <code>zpool</code> and <code>zfs</code> are <code>zfs</code>.</p>
<p>On a ZFS root, <code>/etc/rc</code> runs <code>zfs mount -a</code> right after <code>mount -a</code>, which mounts <code>rpool/home</code> and <code>rpool/var</code>; the root itself was mounted by the initramfs.</p>
<hr>
<p><a href="handbook-rifle.html">← rifle</a> | <a href="docs.html">Contents</a> | <a href="handbook-kernel.html">The kernel and firmware →</a></p>
diff --git a/docs/handbook-files.html b/docs/handbook-files.html
@@ -32,7 +32,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
@@ -45,46 +45,45 @@
<tr><td><code>/sbin/init</code>, <code>/etc/rc</code>, <code>/etc/rc.shutdown</code></td><td>init, the boot script, the shutdown script, all run by mksh</td></tr>
<tr><td><code>/etc/init.conf</code></td><td>host name, boot services, modules, ttys</td></tr>
<tr><td><code>/etc/rc.d/</code>, <code>/usr/local/etc/rc.d/</code></td><td>the service scripts</td></tr>
-<tr><td><code>/etc/services</code>, <code>/etc/hosts</code></td><td>port names and the local host name, the libc reads them</td></tr>
-<tr><td><code>/etc/profile</code></td><td><code>PATH</code>, <code>EDITOR</code>, <code>PAGER</code>, <code>umask</code></td></tr>
-<tr><td><code>/etc/passwd</code>, <code>/etc/group</code>, <code>/etc/shells</code></td><td>accounts, groups, login shells</td></tr>
+<tr><td><code>/etc/profile</code></td><td><code>PATH</code>, <code>umask</code></td></tr>
+<tr><td><code>/etc/passwd</code>, <code>/etc/shadow</code>, <code>/etc/group</code>, <code>/etc/shells</code></td><td>accounts, passwords, groups, login shells</td></tr>
<tr><td><code>/etc/fstab</code></td><td>file systems</td></tr>
<tr><td><code>/etc/os-release</code></td><td><code>NAME=Chamesle</code>, <code>ID=chamesle</code></td></tr>
-<tr><td><code>/etc/spas/</code></td><td>hoard's configuration: <code>make.conf</code>, <code>make.profile</code>, <code>repos.conf/</code>, <code>package.use</code> and the rest (section 4.3)</td></tr>
+<tr><td><code>/etc/mag/</code></td><td><code>repos</code>, <code>keys/</code>, <code>arch</code></td></tr>
+<tr><td><code>/etc/mkinitfs/mkinitfs.conf</code></td><td>what goes into the initramfs</td></tr>
<tr><td><code>/boot/limine.conf</code></td><td>the boot entries</td></tr>
<tr><td><code>/boot/limine-bios.sys</code></td><td>limine's BIOS stage</td></tr>
<tr><td><code>/boot/EFI/BOOT/BOOTX64.EFI</code></td><td>limine for UEFI</td></tr>
-<tr><td><code>/boot/vmlinuz-V</code>, <code>config-V</code>, <code>System.map-V</code></td><td>the kernel</td></tr>
+<tr><td><code>/boot/vmlinuz-lts</code>, <code>initramfs-lts</code></td><td>the kernel and its initramfs</td></tr>
<tr><td><code>/lib/modules/V/</code></td><td>its modules</td></tr>
<tr><td><code>/lib/firmware/</code></td><td>firmware</td></tr>
-<tr><td><code>/var/db/pkg/</code></td><td>the file list of each installed package</td></tr>
-<tr><td><code>/var/cache/distfiles/</code></td><td>downloaded sources</td></tr>
+<tr><td><code>/var/lib/mag/</code></td><td>what is installed, and its files</td></tr>
+<tr><td><code>/var/cache/mag/</code></td><td>indexes and downloaded packages</td></tr>
<tr><td><code>/usr/share/limine/</code></td><td>limine's boot files, for installing it</td></tr>
-<tr><td><code>/usr/share/doc/chamesle/handbook.md</code></td><td>this book, on the live ISO</td></tr>
-<tr><td><code>/var/db/repos/gentoo/</code></td><td>the Gentoo tree, from <code>hoard sync</code></td></tr>
+<tr><td><code>/usr/share/doc/chamesle/handbook.md</code></td><td>this book</td></tr>
</table>
<h2 id="s10-2">10.2 In the sources</h2>
<table>
<tr><th>path</th><th>what</th></tr>
-<tr><td><code>system/tools/chamesle-bootstrap</code></td><td>makes a root file system and builds the base set into it</td></tr>
+<tr><td><code>system/tools/chamesle-bootstrap</code></td><td>puts the base into a root with mag</td></tr>
<tr><td><code>system/tools/chamesle-chroot</code></td><td>chroot with the pseudo file systems mounted</td></tr>
<tr><td><code>system/tools/chamesle-disk</code></td><td>cfdisk, vfat boot partition, ZFS root, mounted on <code>/mnt</code></td></tr>
-<tr><td><code>system/files/</code></td><td>init, rc, <code>service</code>, <code>init.conf</code> and the service scripts that go into every root</td></tr>
-<tr><td><code>system/iso/mkinitramfs</code></td><td>builds an initramfs</td></tr>
-<tr><td><code>system/iso/init</code></td><td>the first process in the initramfs</td></tr>
-<tr><td><code>system/iso/profile/packages</code></td><td>what is in the live root</td></tr>
-<tr><td><code>system/iso/profile/modules</code></td><td>what the initramfs loads</td></tr>
-<tr><td><code>system/iso/profile/limine.conf</code></td><td>the live boot menu</td></tr>
-<tr><td><code>system/iso/profile/overlay/</code></td><td>files copied over the live root</td></tr>
+<tr><td><code>system/tools/mkapk</code>, <code>mkrepo</code>, <code>mkpkgs</code></td><td>packages, signed indexes, Chamesle's own repo</td></tr>
+<tr><td><code>system/files/</code></td><td>init, rc, <code>service</code>, <code>init.conf</code> and the service scripts, in <code>chamesle-base</code></td></tr>
+<tr><td><code>system/pkg/chamesle-base/</code></td><td>its scripts, <code>repos</code>, <code>os-release</code>, <code>issue</code></td></tr>
+<tr><td><code>system/keys/</code></td><td>the public keys the repos are signed with</td></tr>
+<tr><td><code>system/iso/mkiso</code>, <code>mkinitramfs</code>, <code>init</code></td><td>the live ISO, its initramfs and the first process in it</td></tr>
+<tr><td><code>system/iso/profile/</code></td><td><code>packages</code>, <code>modules</code>, <code>limine.conf</code> and the <code>overlay/</code> of the live root</td></tr>
<tr><td><code>system/handbook/handbook.md</code></td><td>this book</td></tr>
-<tr><td><code>SimplePackagemAnagingSystem/src/</code></td><td>hoard, in Rust, and <code>ebuild.sh</code>, the environment ebuilds run in</td></tr>
+<tr><td><code>mag/mag.c</code>, <code>mag/c.h</code>, <code>mag/build.sh</code></td><td>the package manager</td></tr>
<tr><td><code>rifle/rifle.c</code>, <code>rifle/c.h</code>, <code>rifle/build.sh</code></td><td>the coreutils</td></tr>
<tr><td><code>rifle/tests/run.sh</code>, <code>rifle/tests/cases</code></td><td>the comparison tests</td></tr>
</table>
<h2 id="s10-3">10.3 Commands in short</h2>
-<pre>chamesle-bootstrap [-s PACKAGES] [-n HOSTNAME] TARGET
-mkinitramfs [-m modules] ROOTFS KVER OUT
-hoard [--root DIR] install|upgrade|remove|autoremove|sync|search|info|list|files|owns|env-update|manifest|self-update
+<pre>chamesle-bootstrap [-a ARCH] [-n HOSTNAME] [-k KERNEL] [-f FIRMWARE] TARGET [PACKAGE]...
+chamesle-chroot DIR [COMMAND...]
+chamesle-disk DISK
+mag [-nf] update|install|remove|upgrade|autoremove|list|info|search|files|owns|deps|rdeps|fetch
rifle --install DIR | --list
limine bios-install DEVICE</pre>
<hr>
diff --git a/docs/handbook-installing.html b/docs/handbook-installing.html
@@ -32,15 +32,15 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
<main>
-<p><a href="handbook-preparing.html">← Preparing</a> | <a href="docs.html">Contents</a> | <a href="handbook-spas.html">Using SPAS →</a></p>
+<p><a href="handbook-preparing.html">← Preparing</a> | <a href="docs.html">Contents</a> | <a href="handbook-mag.html">mag →</a></p>
<h2>3. Installing by hand</h2>
-<p>Follow the BIOS or the UEFI variant where they differ. The disk here is <code>/dev/sda</code>; change it to yours. Everything below is run as root on the machine you install from, usually the live ISO, and it erases the disk.</p>
-<p>There are two ways through 3.1 and 3.2: <code>chamesle-disk</code> does the partitioning and the file systems and leaves the root on ZFS, or you do both yourself. From 3.3 on the steps are the same, and they are yours: <code>chamesle-disk</code> is only a helper.</p>
+<p>Follow the BIOS or the UEFI variant where they differ. The disk here is <code>/dev/sda</code>; change it to yours. Everything below is run as root on the live system, and it erases the disk.</p>
+<p>There are two ways through 3.1 and 3.2: <code>chamesle-disk</code> does the partitioning and the file systems and leaves the root on ZFS, or you do both yourself with the root on ext4. From 3.3 on the steps are the same, and they are yours: <code>chamesle-disk</code> is only a helper.</p>
<h2 id="s3-1">3.1 chamesle-disk</h2>
<pre>chamesle-disk /dev/sda</pre>
<p>It lists the disk and asks you to type its name before it touches anything. Then it starts <code>cfdisk</code> so you lay out the partitions. Three of them work for BIOS and UEFI both:</p>
@@ -58,8 +58,9 @@ zfs mount rpool/root
zfs create -o mountpoint=/home rpool/home
zfs create -o mountpoint=/var rpool/var
zpool set bootfs=rpool/root rpool</pre>
-<p>and mounts <code>rpool/root</code>, <code>rpool/home</code> and <code>rpool/var</code> under <code>/mnt</code> and the boot partition on <code>/mnt/boot</code>. It also writes <code>/mnt/etc/fstab</code> with the boot partition by UUID and the <code>proc</code>, <code>sysfs</code> and <code>tmpfs</code> lines (an existing one is left alone). It writes nothing else: no <code>limine.conf</code>, no host name, no password. Those are 3.7 and 3.8.</p>
-<p>ZFS mounts its own datasets, so the fstab does not list them. limine cannot read ZFS: the kernel, the initrd and <code>limine.conf</code> live on the FAT partition, which is <code>/boot</code>, and the initramfs imports the pool (3.8).</p>
+<p>and mounts <code>rpool/root</code>, <code>rpool/home</code> and <code>rpool/var</code> under <code>/mnt</code> and the boot partition on <code>/mnt/boot</code>. It also writes <code>/mnt/etc/fstab</code> with the boot partition by UUID and the <code>proc</code>, <code>sysfs</code> and <code>tmpfs</code> lines. It writes nothing else.</p>
+<p>ZFS mounts its own datasets, so the fstab does not list them. limine cannot read ZFS: the kernel, the initramfs and <code>limine.conf</code> live on the FAT partition, which is <code>/boot</code>.</p>
+<p>ZFS on a machine with little memory is slow; on the 256 MB machine use ext4 (3.2).</p>
<h2 id="s3-2">3.2 Partitioning and file systems by hand</h2>
<p>For a root on ext4. The layout is the one in 3.1, <code>sda1</code> to <code>sda3</code>:</p>
<pre>sfdisk /dev/sda <<P
@@ -74,83 +75,56 @@ mkfs.ext4 /dev/sda3
mount /dev/sda3 /mnt
mkdir /mnt/boot
mount /dev/sda2 /mnt/boot</pre>
-<p>The FAT partition is <code>/boot</code>. The kernel and <code>limine.conf</code> end up there, where limine looks for them on both BIOS and UEFI. The root can be ZFS by hand as well: the <code>zpool</code> and <code>zfs</code> lines of 3.1 are all there is to it.</p>
-<h2 id="s3-3">3.3 Unpacking the stage</h2>
-<p>The system comes as a stage tarball, as on Gentoo: a root with the base already in it. rifle, mksh, Winchester, musl, gcc, python, perl, gettext, <code>hoard</code> and its records of what is installed (<code>/var/db/pkg</code>) are all inside. Nothing is compiled until you ask hoard for something. It is on the releases page of github.com/tortr-rs/chamesle, with its <code>.sha256</code>. Check the tarball against its <code>.sha256</code> and unpack it:</p>
-<pre>sha256sum -c chamesle-stage-20261117.tar.xz.sha256
- tar -C /mnt --exclude ./etc/fstab -xpf chamesle-stage-20261117.tar.xz</pre>
-<p>[ -e /mnt/etc/fstab ] || tar -C /mnt -xpf chamesle-stage-20261117.tar.xz ./etc/fstab</p>
-<p>Make the directories the stage leaves out:</p>
-<pre>mkdir -p /mnt/proc /mnt/sys /mnt/dev /mnt/run /mnt/tmp /mnt/var/tmp /mnt/var/log /mnt/var/cache /mnt/home
-chmod 1777 /mnt/tmp /mnt/var/tmp</pre>
-<p>Keep <code>-p</code>: the modes and the owners matter. <code>/boot</code>, <code>/home</code>, <code>/proc</code>, <code>/sys</code>, <code>/dev</code>, <code>/run</code>, <code>/tmp</code>, <code>/var/cache</code>, <code>/var/log</code> and the Gentoo tree are not in the stage: the first are yours, the tree comes from <code>hoard sync</code> (section 2.3). The fstab chamesle-disk wrote is left alone, the stage's own is only used if there is none (3.6). The kernel and the initrd come from the ISO:</p>
-<pre>cp /run/live/medium/boot/initrd /mnt/boot/initrd
-cp /run/live/medium/boot/vmlinuz-* /mnt/boot/</pre>
-<p>Work inside the new root with <code>chamesle-chroot</code>:</p>
-<pre>chamesle-chroot /mnt
-chamesle-chroot /mnt passwd root</pre>
-<p>It mounts <code>proc</code>, <code>sys</code>, <code>dev</code>, <code>dev/pts</code> and a tmpfs on <code>run</code> under the directory, copies <code>/etc/resolv.conf</code> into it, runs <code>chroot</code> with an empty environment (<code>HOME=/root</code>, <code>TERM</code>, <code>PATH</code>) and takes the mounts away again when the command ends. Without a command it starts <code>/usr/bin/mksh -l</code>.</p>
-<p>Inside, fetch the tree and install what you want:</p>
-<pre>hoard sync
-hoard install -y -j4 --keep-going app-editors/vim</pre>
-<p>The stage's <code>/etc/spas/make.conf</code> builds with gcc (<code>CC=gcc</code>, <code>CXX=g++</code>) for <code>x86_64-pc-linux-musl</code> and the musl profile. Its <code>/etc/spas/profile/package.provided</code> lists what the stage already has, so hoard does not build those again: <code>musl</code>, <code>baselayout</code>, <code>util-linux</code>, <code>libunistring</code>, <code>make</code>, <code>m4</code>, <code>linux-headers</code>, <code>e2fsprogs</code>, <code>gettext</code> and a few others. <code>--resume</code> goes on after a failed build. Then go on with 3.6 (fstab) and the rest.</p>
-<h2 id="s3-4">3.4 Building the stage</h2>
-<p>You do not need this to install. It is how the stage is made. Start from a Gentoo musl stage3, whose gcc, binutils, python, perl and gettext are binaries, check its digest, and take from it the files each package lists in <code>/var/db/pkg/<i>/</i>/CONTENTS</code>, plus the <code>/var/db/pkg</code> directories themselves so hoard knows they are installed. Put rifle, mksh, Winchester, the files in <code>files/</code> and a <code>hoard</code> built for musl on top, write <code>make.conf</code> and <code>package.provided</code>, build whatever else the base needs with hoard, and pack the root:</p>
-<pre>tar -C ROOT -cpf - --exclude=./proc --exclude=./sys --exclude=./dev --exclude=./run --exclude=./tmp \
- --exclude=./boot --exclude=./home --exclude=./var/tmp --exclude=./var/cache --exclude=./var/log \
- --exclude=./var/db/repos . | xz -T0 > chamesle-stage-20261117.tar.xz</pre>
-<p>GNU patch is the one thing the stage3 does not give, and it is built from source.</p>
-<h2 id="s3-5">3.5 The other stages</h2>
-<p>There are two stages. The unpacking in 3.3 is the same for both; only the tarball differs.</p>
-<table>
-<tr><th>tarball</th><th>what is in it</th></tr>
-<tr><td><code>chamesle-stage-DATE</code></td><td>the base of 3.3: musl, rifle, mksh, Winchester, gcc, SPAS, sam</td></tr>
-<tr><td><code>chamesle-stage-graphical-DATE</code></td><td>the base, plus X, 9wm, sxhkd, dmenu, and plan9port with 9term and acme</td></tr>
-</table>
-<h3 id="the-graphical-stage">The graphical stage</h3>
-<p>On the first boot the login on tty1 is <code>chamesle-session</code>, not a shell. It starts X, and X starts <code>9wm</code>, which is the window manager that looks and works like rio: the right button makes windows (New, Reshape, Move, Delete, Hide), and text is selected and cut by chording the mouse buttons. A <code>9term</code> is open when it comes up, with <code>plumber</code> behind it. When X ends you land in <code>mksh</code>. The login is <code>root</code> with no password until you set one (3.7).</p>
-<p><code>sxhkd</code> carries the keys of the dwm setup that make sense without tags (<code>/etc/sxhkd/sxhkdrc</code>):</p>
+<p>The FAT partition is <code>/boot</code>. The kernel and <code>limine.conf</code> end up there, where limine looks for them on both BIOS and UEFI.</p>
+<h2 id="s3-3">3.3 chamesle-bootstrap</h2>
+<pre>chamesle-bootstrap /mnt</pre>
+<p>That is the whole base. It copies <code>/etc/mag/repos</code> and <code>/etc/mag/keys</code> of the live system into <code>/mnt</code>, runs <code>mag update</code> there, and installs <code>chamesle-base</code>, the kernel (<code>linux-lts</code>) and its firmware with everything they need. The kernel package writes <code>vmlinuz-lts</code> and <code>initramfs-lts</code> into <code>/mnt/boot</code>. It takes as long as the download, a few minutes.</p>
+<pre>chamesle-bootstrap [-a ARCH] [-n HOSTNAME] [-k KERNEL] [-f FIRMWARE] TARGET [PACKAGE]...</pre>
<table>
-<tr><th>key</th><th>does</th></tr>
-<tr><td>Super+t, Super+Shift+Return</td><td>a new <code>9term</code></td></tr>
-<tr><td>Super+d</td><td><code>dmenu_run</code></td></tr>
-<tr><td>Super+a</td><td><code>acme</code></td></tr>
-<tr><td>Super+e</td><td><code>sam</code> in a <code>9term</code></td></tr>
-<tr><td>Super+Shift+q</td><td>ends the session (kills <code>9wm</code>)</td></tr>
-<tr><td>volume and brightness keys</td><td><code>amixer</code> and <code>brightnessctl</code></td></tr>
+<tr><th>option</th><th>what</th></tr>
+<tr><td><code>-n</code></td><td>the host name, <code>chamesle</code> if not given</td></tr>
+<tr><td><code>-f</code></td><td>the firmware package. The default, <code>linux-firmware-none</code>, has no firmware; take the one your hardware needs (7.4)</td></tr>
+<tr><td><code>-k</code></td><td>the kernel package, <code>linux-lts</code> if not given</td></tr>
+<tr><td><code>-a</code></td><td>the architecture, the machine's own if not given (3.10)</td></tr>
</table>
-<p><code>EDITOR</code> is <code>sam -d</code> there too. Everything is a file to change: <code>/etc/X11/xinit/xinitrc</code> is the session, and <code>getty-tty1</code> in <code>/etc/init.conf</code> is what starts it. Take that line out to go back to a plain login.</p>
-<h2 id="s3-6">3.6 fstab</h2>
+<p>Packages after the target go in too. A ThinkPad with Intel wireless and graphics, with an editor:</p>
+<pre>chamesle-bootstrap -n t480 -f linux-firmware-intel /mnt vim</pre>
+<p>What <code>chamesle-base</code> brings: Winchester and the files of chapter 6, mag, rifle, mksh, busybox for the tools rifle does not have, <code>agetty</code>, eudev, kmod, dhcpcd and e2fsprogs.</p>
+<h2 id="s3-4">3.4 Working inside the new root</h2>
+<pre>chamesle-chroot /mnt
+chamesle-chroot /mnt passwd root</pre>
+<p>It mounts <code>proc</code>, <code>sys</code>, <code>dev</code>, <code>dev/pts</code> and a tmpfs on <code>run</code> under the directory, copies <code>/etc/resolv.conf</code> into it, runs <code>chroot</code> with an empty environment (<code>HOME=/root</code>, <code>TERM</code>, <code>PATH</code>) and takes the mounts away again when the command ends. Without a command it starts <code>/bin/mksh -l</code>. Inside, <code>mag install name</code> works as on the finished system.</p>
+<h2 id="s3-5">3.5 fstab</h2>
<p>If you used chamesle-disk the file is written. Look at it: the boot partition by UUID on <code>/boot</code>, then <code>proc</code>, <code>sysfs</code> and <code>tmpfs</code>, and nothing for the ZFS datasets, because ZFS mounts them itself.</p>
<p>By hand, <code>blkid</code> prints the UUIDs:</p>
<pre>blkid /dev/sda2 /dev/sda3</pre>
-<p>Open <code>/mnt/etc/fstab</code> and add the root and boot lines under the <code>proc</code>, <code>sysfs</code> and <code>tmpfs</code> lines already there:</p>
-<pre>UUID=ROOT-UUID / ext4 defaults 0 1
-UUID=BOOT-UUID /boot vfat defaults 0 2</pre>
-<p>A root on ZFS gets only the boot line. Check that the UUID is the one <code>blkid</code> shows for the boot partition.</p>
-<h2 id="s3-7">3.7 Host name, users, password</h2>
-<p>The host name is already in <code>/mnt/etc/init.conf</code> from <code>-n</code>. The root account is in <code>/mnt/etc/passwd</code> with an <code>x</code> in the password field, and there is no shadow file, so the hash goes into that field. Make one on any machine that has openssl, SHA-512:</p>
-<pre>openssl passwd -6</pre>
-<p>Put the output in the second field of the root line:</p>
-<pre>root:$6$salt$hash:0:0:root:/root:/usr/bin/mksh</pre>
-<p>musl's <code>crypt</code> reads <code>$6$</code> hashes. An empty field means no password at all.</p>
-<p>The groups are <code>root</code>, <code>wheel</code> (10) and <code>users</code> (100). More accounts are lines in <code>passwd</code> and <code>group</code> and a home directory you make (section 6.5).</p>
-<h2 id="s3-8">3.8 The kernel and the boot entry</h2>
-<p>The kernel package put these in <code>/mnt/boot</code> (the version number is whatever the recipe carries):</p>
+<p>Write <code>/mnt/etc/fstab</code>:</p>
+<pre>UUID=ROOT-UUID / ext4 defaults 0 1
+UUID=BOOT-UUID /boot vfat defaults 0 2
+proc /proc proc defaults 0 0
+sysfs /sys sysfs defaults 0 0
+tmpfs /tmp tmpfs nosuid,nodev 0 0</pre>
+<p>A root on ZFS gets no root line.</p>
+<h2 id="s3-6">3.6 Host name and password</h2>
+<p>The host name is in <code>/mnt/etc/init.conf</code>, from <code>-n</code>. Set the root password:</p>
+<pre>chamesle-chroot /mnt passwd root</pre>
+<p>The hash goes into <code>/etc/shadow</code>. The login shell of root is mksh.</p>
+<h2 id="s3-7">3.7 The boot entry</h2>
<pre>ls /mnt/boot
-config-6.18.63-0-lts System.map-6.18.63-0-lts vmlinuz-6.18.63-0-lts</pre>
-<p>Write <code>/mnt/boot/limine.conf</code> with the file name you see and the UUID of the root partition:</p>
+System.map-6.18.64-0-lts config-6.18.64-0-lts initramfs-lts vmlinuz-lts</pre>
+<p>The names stay the same when the kernel is updated, so <code>limine.conf</code> is written once. <code>/mnt/boot/limine.conf</code>, with the UUID of the root partition:</p>
<pre>timeout: 3
/Chamesle
protocol: linux
- path: boot():/vmlinuz-6.18.63-0-lts
- module_path: boot():/initrd
- cmdline: root=UUID=ROOT-UUID rw console=tty0</pre>
-<p>For a root on ZFS the command line names the dataset, there is no UUID:</p>
-<pre> cmdline: root=ZFS=rpool/root rw console=tty0</pre>
-<p><code>boot()</code> is the partition <code>limine.conf</code> is on, which is <code>/boot</code>; with ZFS it is the FAT partition, since limine cannot read ZFS. The kernel has ext4 and the disk drivers as modules, so the system needs the initramfs. The one from the ISO (<code>/mnt/boot/initrd</code>, copied in 3.3) finds the root by <code>root=UUID=</code> or <code>root=ZFS=</code> and loads the modules in <code>iso/profile/modules</code>. Section 7.5 says how to make your own.</p>
-<p>limine's files are in <code>/mnt/usr/share/limine</code>.</p>
+ path: boot():/vmlinuz-lts
+ module_path: boot():/initramfs-lts
+ cmdline: root=UUID=ROOT-UUID modules=sd-mod,usb-storage,ext4 rootfstype=ext4 quiet</pre>
+<p><code>boot()</code> is the partition <code>limine.conf</code> is on, which is <code>/boot</code>. The initramfs finds the root, loads the modules on the command line and starts <code>/sbin/init</code>. Take <code>quiet</code> out to see the kernel's messages. For a serial console add <code>console=ttyS0,115200</code>.</p>
+<p>A root on ZFS names the dataset; the initramfs needs the zfs module, which is section 7.5:</p>
+<pre> cmdline: root=ZFS=rpool/root rootfstype=zfs quiet</pre>
+<p>Install limine. <code>limine</code> is a package; install it into the new root, or use the one of the live system:</p>
+<pre>chamesle-chroot /mnt mag install limine</pre>
<h3 id="bios">BIOS</h3>
<pre>cp /mnt/usr/share/limine/limine-bios.sys /mnt/boot/
limine bios-install /dev/sda</pre>
@@ -160,20 +134,22 @@ limine bios-install /dev/sda</pre>
cp /mnt/usr/share/limine/BOOTX64.EFI /mnt/boot/EFI/BOOT/</pre>
<p>The firmware starts <code>EFI/BOOT/BOOTX64.EFI</code> of the EFI System partition by itself.</p>
<p>Do both and the disk boots either way.</p>
-<h2 id="s3-9">3.9 First boot</h2>
+<h2 id="s3-8">3.8 First boot</h2>
<pre>umount -R /mnt
zpool export rpool
reboot</pre>
<p>Leave out <code>zpool export</code> if the root is not on ZFS.</p>
-<p>Take out the installation medium. limine shows the entry for three seconds and boots the kernel. <code>init</code> runs <code>/etc/rc</code>, which mounts the file systems and starts the services of <code>init.conf</code>, and puts a login on the ttys. Log in as root.</p>
-<p>Then:</p>
-<ol>
-<li>Bring the network up (section 6.7).</li>
-<li><code>hoard sync</code> brings the Gentoo tree up to date (section 2.3), so <code>hoard install name</code> works from then on, and the compiler is in the base set.</li>
-<li><code>hoard list</code> shows what the bootstrap put on the machine.</li>
-</ol>
+<p>Take out the installation medium. limine shows the entry for three seconds and boots the kernel. <code>init</code> runs <code>/etc/rc</code>, which mounts the file systems and starts the services of <code>init.conf</code>, and puts a login on the ttys. Log in as root. <code>dhcpcd</code> brings up a cable at boot; for wireless see section 6.8.</p>
+<h2 id="s3-9">3.9 What to install next</h2>
+<pre>mag install vim htop tmux
+mag search irc</pre>
+<p>Chapter 4 has the rest.</p>
+<h2 id="s3-10">3.10 32-bit machines</h2>
+<p>On a 32-bit PC (Pentium 4, Athlon XP and the like) boot the ISO on another machine, or install from any Linux there (2.2), and give the architecture:</p>
+<pre>chamesle-bootstrap -a x86 /mnt</pre>
+<p>The x86 repository has the same packages, built for i686 with SSE2. <code>-a x86</code> is written to <code>/mnt/etc/mag/arch</code>, and mag keeps to it from then on. <code>rifle</code> is only built for x86_64, so on x86 busybox gives the coreutils. limine boots 32-bit BIOS machines as well; the entry is the same.</p>
<hr>
-<p><a href="handbook-preparing.html">← Preparing</a> | <a href="docs.html">Contents</a> | <a href="handbook-spas.html">Using SPAS →</a></p>
+<p><a href="handbook-preparing.html">← Preparing</a> | <a href="docs.html">Contents</a> | <a href="handbook-mag.html">mag →</a></p>
</main>
<hr>
diff --git a/docs/handbook-iso.html b/docs/handbook-iso.html
@@ -4,12 +4,12 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The live ISO - Chamesle</title>
-<meta name="description" content="The ISO is a live system to work from. It boots on BIOS and UEFI machines with limine, from a disc or a stick, and has">
+<meta name="description" content="The ISO is a live system to work from. It boots on BIOS and UEFI machines with limine, from a disc or a stick, logs in as">
<link rel="canonical" href="https://chamesle.org/handbook-iso.html">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Chamesle">
<meta property="og:title" content="The live ISO - Chamesle">
-<meta property="og:description" content="The ISO is a live system to work from. It boots on BIOS and UEFI machines with limine, from a disc or a stick, and has">
+<meta property="og:description" content="The ISO is a live system to work from. It boots on BIOS and UEFI machines with limine, from a disc or a stick, logs in as">
<meta property="og:url" content="https://chamesle.org/handbook-iso.html">
<link rel="stylesheet" href="style.css?19">
<link rel="icon" href="img/logo.png">
@@ -32,7 +32,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
@@ -40,17 +40,29 @@
<p><a href="handbook-kernel.html">← The kernel and firmware</a> | <a href="docs.html">Contents</a> | <a href="handbook-maintaining.html">Maintaining →</a></p>
<h2>8. The live ISO</h2>
<h2 id="s8-1">8.1 What it is</h2>
-<p>The ISO is a live system to work from. It boots on BIOS and UEFI machines with limine, from a disc or a stick, and has mksh, vim, hoard with the Gentoo tree (<code>hoard search</code> and <code>hoard info</code> work before <code>hoard sync</code>), <code>chamesle-bootstrap</code>, <code>chamesle-chroot</code>, <code>chamesle-disk</code>, the disk tools (<code>cfdisk</code>, <code>sfdisk</code>, <code>mkfs.ext4</code>, <code>mkfs.fat</code>, <code>zpool</code>, <code>zfs</code>) and this handbook in <code>/usr/share/doc/chamesle/handbook.md</code>. It is where you do chapter 3 on a machine that has nothing on it.</p>
+<p>The ISO is a live system to work from. It boots on BIOS and UEFI machines with limine, from a disc or a stick, logs in as root on every tty and has</p>
+<ul>
+<li>mag, the keys and the repos, and <code>chamesle-bootstrap</code>, <code>chamesle-chroot</code>, <code>chamesle-disk</code></li>
+<li>the disk tools: <code>cfdisk</code>, <code>sfdisk</code>, <code>lsblk</code>, <code>blkid</code>, <code>mkfs.ext4</code>, <code>mkfs.fat</code>, <code>zpool</code>, <code>zfs</code>, <code>limine</code></li>
+<li>the network: <code>dhcpcd</code>, <code>iwd</code> with <code>iwctl</code>, <code>wpa_supplicant</code>, <code>curl</code></li>
+<li>the Intel wireless firmware, vim, less, and this handbook in <code>/usr/share/doc/chamesle/handbook.md</code></li>
+</ul>
+<p>It is where you do chapter 3. <code>chamesle.iso</code> is for x86_64, <code>chamesle-x86.iso</code> for 32-bit machines (BIOS only).</p>
<h2 id="s8-2">8.2 How it boots</h2>
<p><code>iso/init</code> looks through <code>/dev/sr*</code>, <code>/dev/sd*</code>, <code>/dev/nvme*n*p*</code>, <code>/dev/vd*</code> and <code>/dev/mmcblk*</code> until it finds one that mounts and has <code>LiveOS/rootfs.sfs</code>. It mounts that squashfs read-only, puts a tmpfs overlay over it, moves the medium and the squashfs to <code>/run/live/medium</code> and <code>/run/live/rootfs</code>, and runs <code>switch_root</code> into the result. Whatever you change in the live system is gone at shutdown.</p>
-<h2 id="s8-3">8.3 Trying it in qemu</h2>
+<h2 id="s8-3">8.3 Making it</h2>
+<pre>iso/mkiso -o chamesle.iso
+iso/mkiso -a x86 -o chamesle-x86.iso</pre>
+<p>as root, with mag in PATH, <code>xorriso</code>, <code>mksquashfs</code>, <code>zstd</code>, <code>bsdcpio</code> and limine on the host. mkiso installs <code>chamesle-base</code>, the kernel and what <code>iso/profile/packages</code> names into <code>work/rootfs</code> with mag, copies <code>iso/profile/overlay</code> over it, makes the initramfs and the squashfs and puts them on the ISO with limine.</p>
+<h2 id="s8-4">8.4 Trying it in qemu</h2>
<p>BIOS:</p>
-<pre>qemu-system-x86_64 -cpu max -m 1G -cdrom chamesle.iso -boot d</pre>
+<pre>qemu-system-x86_64 -m 1G -cdrom chamesle.iso -boot d</pre>
<p>UEFI, with the firmware of your qemu (<code>edk2-x86_64-code.fd</code>; the path differs between systems):</p>
-<pre>qemu-system-x86_64 -cpu max -m 1G -bios /usr/share/qemu/edk2-x86_64-code.fd -cdrom chamesle.iso</pre>
+<pre>qemu-system-x86_64 -m 1G -bios /usr/share/qemu/edk2-x86_64-code.fd -cdrom chamesle.iso</pre>
<p>Add <code>-enable-kvm</code> for speed. To go through all of chapter 3 in a virtual machine, give it a disk:</p>
-<pre>qemu-img create -f qcow2 disk.qcow2 20G
-qemu-system-x86_64 -cpu max -m 2G -enable-kvm -cdrom chamesle.iso -drive file=disk.qcow2 -boot d -nic user</pre>
+<pre>qemu-img create -f qcow2 disk.qcow2 8G
+qemu-system-x86_64 -m 1G -enable-kvm -cdrom chamesle.iso -drive file=disk.qcow2 -boot d -nic user</pre>
+<p>A machine like an old Pentium 4 with 256 MB: <code>-cpu pentium3,+sse2 -m 256</code> and the x86 ISO.</p>
<p>To write the ISO to a stick: <code>dd if=chamesle.iso of=/dev/sdX bs=4M conv=fsync</code>.</p>
<hr>
<p><a href="handbook-kernel.html">← The kernel and firmware</a> | <a href="docs.html">Contents</a> | <a href="handbook-maintaining.html">Maintaining →</a></p>
diff --git a/docs/handbook-kernel.html b/docs/handbook-kernel.html
@@ -4,12 +4,12 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>The kernel and firmware - Chamesle</title>
-<meta name="description" content="Nobody builds a kernel in Chamesle. sys-kernel/linux is a prebuilt Linux 6.18 LTS kernel with its modules, taken from a">
+<meta name="description" content="Nobody builds a kernel in Chamesle. linux-lts is a Linux 6.18 LTS kernel with a generic configuration that runs on">
<link rel="canonical" href="https://chamesle.org/handbook-kernel.html">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Chamesle">
<meta property="og:title" content="The kernel and firmware - Chamesle">
-<meta property="og:description" content="Nobody builds a kernel in Chamesle. sys-kernel/linux is a prebuilt Linux 6.18 LTS kernel with its modules, taken from a">
+<meta property="og:description" content="Nobody builds a kernel in Chamesle. linux-lts is a Linux 6.18 LTS kernel with a generic configuration that runs on">
<meta property="og:url" content="https://chamesle.org/handbook-kernel.html">
<link rel="stylesheet" href="style.css?19">
<link rel="icon" href="img/logo.png">
@@ -32,7 +32,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
@@ -40,48 +40,40 @@
<p><a href="handbook-base.html">← The base system</a> | <a href="docs.html">Contents</a> | <a href="handbook-iso.html">The live ISO →</a></p>
<h2>7. The kernel and firmware</h2>
<h2 id="s7-1">7.1 The kernel package</h2>
-<p>Nobody builds a kernel in Chamesle. <code>sys-kernel/linux</code> is a prebuilt Linux 6.18 LTS kernel with its modules, taken from a binary mirror, with a generic configuration that runs on most machines. The recipe unpacks the package and installs</p>
-<pre>/boot/vmlinuz-VERSION
+<p>Nobody builds a kernel in Chamesle. <code>linux-lts</code> is a Linux 6.18 LTS kernel with a generic configuration that runs on most machines, and it installs</p>
+<pre>/boot/vmlinuz-lts
/boot/config-VERSION
/boot/System.map-VERSION
/lib/modules/VERSION/</pre>
-<p><code>VERSION</code> is the one the package carries, such as <code>6.18.63-0-lts</code>. <code>sys-kernel/linux-headers</code> has the headers the libc and util-linux build against.</p>
+<p><code>linux-virt</code> is a smaller one for virtual machines. Give it to chamesle-bootstrap with <code>-k</code>, and name its files in <code>limine.conf</code> (<code>vmlinuz-virt</code>, <code>initramfs-virt</code>).</p>
<h2 id="s7-2">7.2 Updating</h2>
-<p>The mirror drops a package when a newer one comes out, so a new kernel is a new <code>version</code> and <code>sha256</code> in the recipe. Edit <code>repo/sys-kernel/linux</code>:</p>
-<pre>version: 6.18.64
-sha256: the new one</pre>
-<p>The kernel comes from <code>sys-kernel/gentoo-sources</code>, or from <code>sys-kernel/vanilla-sources</code> for the plain one. Install it, which puts the source in <code>/usr/src</code>:</p>
-<pre>hoard install sys-kernel/gentoo-sources</pre>
-<p>and add an entry in <code>/boot/limine.conf</code> for the new <code>vmlinuz-VERSION</code>. Keep the old one until the new one has booted:</p>
-<pre>/Chamesle
- protocol: linux
- path: boot():/vmlinuz-NEW
- cmdline: root=UUID=ROOT-UUID rw
-
-/Chamesle (old)
- protocol: linux
- path: boot():/vmlinuz-OLD
- cmdline: root=UUID=ROOT-UUID rw</pre>
-<p>After a reboot, <code>uname -r</code> says what runs.</p>
+<pre>mag update
+mag upgrade</pre>
+<p>A new <code>linux-lts</code> replaces <code>vmlinuz-lts</code> and makes <code>initramfs-lts</code> again, so <code>limine.conf</code> needs no change. Reboot to run it; <code>uname -r</code> says what runs. Keep the ISO at hand in case a new kernel does not boot.</p>
<h2 id="s7-3">7.3 Modules</h2>
-<p>Modules are <code>.ko</code> files in <code>/lib/modules/VERSION</code>. <code>lsmod</code> shows what is loaded, <code>modprobe name</code> loads a module with what it needs, <code>modinfo name</code> describes it. udev loads the ones the hardware asks for. Modules belong to one kernel build: after installing a new kernel, reboot before loading any.</p>
+<p>Modules are files in <code>/lib/modules/VERSION</code>. <code>lsmod</code> shows what is loaded, <code>modprobe name</code> loads a module with what it needs, <code>modinfo name</code> describes it. udev loads the ones the hardware asks for. Modules belong to one kernel build: after an upgrade of the kernel, reboot before loading any.</p>
<h2 id="s7-4">7.4 Firmware</h2>
-<pre>hoard install sys-kernel/linux-firmware</pre>
-<p>puts the firmware for wifi, graphics, ethernet and the rest, compressed with zstd, into <code>/lib/firmware</code>. <code>sys-firmware/sof-firmware</code> has the sound firmware of newer Intel machines. Both are in the base set. A new firmware release is a new <code>version</code> and <code>sha256</code> in <code>repo/sys-kernel/linux-firmware</code>, the same way as the kernel's.</p>
-<h2 id="s7-5">7.5 An initramfs</h2>
-<p>A root on ext4 on a common disk (SATA, NVMe, virtio, USB storage) needs none. A root on ZFS needs one: the pool has to be imported before the root can be mounted. A root that needs a module to be reached, or RAID, LVM or an encrypted disk, does.</p>
-<p><code>iso/mkinitramfs</code> makes one, and the live ISO uses it:</p>
-<pre>mkinitramfs [-m modules-file] ROOTFS KVER OUT</pre>
-<p><code>ROOTFS</code> is the root whose <code>/lib/modules</code> and programs are used, <code>KVER</code> the name of the kernel's directory in <code>/lib/modules</code>, <code>OUT</code> the file to write. It puts in a few tools (<code>sh mount umount switch_root insmod mkdir sleep blkid</code>, and <code>zpool</code> when the root has it, with the libraries they need), the modules named in the modules file together with what they depend on, and <code>iso/init</code>. The names after a <code>[zfs]</code> line of the modules file go into a second list, which <code>iso/init</code> loads only for <code>root=ZFS=</code>. The result is a zstd compressed cpio.</p>
-<pre>$HOME/src/system/iso/mkinitramfs -m modules /mnt 6.18.63-0-lts /mnt/boot/initrd</pre>
-<p><code>iso/init</code> mounts <code>proc</code>, <code>sysfs</code> and <code>devtmpfs</code>, loads the modules, reads <code>root=</code> from the command line (<code>root=UUID=...</code> or a device), waits up to 15 seconds for the device, mounts it read-only at <code>/mnt/root</code>, and runs <code>switch_root /mnt/root /sbin/init</code>. With <code>root=ZFS=rpool/root</code> it loads the zfs modules, runs <code>zpool import -N -d /dev rpool</code> (until it works, 15 seconds at most) and mounts the dataset with <code>mount -o zfsutil -t zfs</code>. If anything fails it prints why and drops into a shell.</p>
-<p>Name the initrd in <code>limine.conf</code>:</p>
-<pre>/Chamesle
- protocol: linux
- path: boot():/vmlinuz-6.18.63-0-lts
- module_path: boot():/initrd
- cmdline: root=UUID=ROOT-UUID rw</pre>
-<p>On ZFS the command line is <code>root=ZFS=rpool/root rw</code>. The ZFS module is <code>sys-kernel/zfs-module</code>, for the kernel of <code>sys-kernel/linux</code>: when one is updated the other has to be too, and <code>depmod</code> has to run after installing it.</p>
+<p>The firmware is split by vendor, so a machine takes only what it uses:</p>
+<table>
+<tr><th>package</th><th>for</th></tr>
+<tr><td><code>linux-firmware-intel</code></td><td>Intel wireless (iwlwifi), Bluetooth and the rest of the intel folder</td></tr>
+<tr><td><code>linux-firmware-i915</code></td><td>Intel graphics</td></tr>
+<tr><td><code>linux-firmware-amdgpu</code>, <code>linux-firmware-radeon</code></td><td>AMD graphics</td></tr>
+<tr><td><code>linux-firmware-rtlwifi</code>, <code>linux-firmware-rtw88</code>, <code>linux-firmware-rtw89</code>, <code>linux-firmware-rtl_nic</code></td><td>Realtek wireless and ethernet</td></tr>
+<tr><td><code>linux-firmware-ath10k</code>, <code>linux-firmware-ath11k</code>, <code>linux-firmware-ath9k_htc</code></td><td>Qualcomm Atheros wireless</td></tr>
+<tr><td><code>linux-firmware-brcm</code></td><td>Broadcom wireless</td></tr>
+<tr><td><code>linux-firmware</code></td><td>all of them, over 500 MB</td></tr>
+<tr><td><code>linux-firmware-none</code></td><td>none</td></tr>
+</table>
+<p><code>mag search linux-firmware</code> lists them. If <code>dmesg</code> says a firmware file failed to load, <code>mag owns</code> is no help yet, since it is not installed; the name of the file says the vendor.</p>
+<h2 id="s7-5">7.5 The initramfs</h2>
+<p>The kernel package makes <code>/boot/initramfs-lts</code> with <code>mkinitfs</code> whenever the kernel is installed or updated. What goes into it is set in <code>/etc/mkinitfs/mkinitfs.conf</code>:</p>
+<pre>features="ata base cdrom ext4 keymap kms mmc nvme raid scsi usb virtio"</pre>
+<p>For a root on ZFS add <code>zfs</code> to the list, install <code>zfs</code> and <code>zfs-lts</code>, and make it again:</p>
+<pre>mag install zfs zfs-lts
+mkinitfs $(ls /lib/modules)</pre>
+<p>The initramfs reads <code>root=</code>, <code>rootfstype=</code> and <code>modules=</code> from the command line, mounts the root and starts <code>/sbin/init</code>. If it cannot, it says why and gives a shell.</p>
+<p>The live ISO has its own initramfs, made by <code>iso/mkinitramfs</code>, which mounts the squashfs (chapter 8).</p>
<hr>
<p><a href="handbook-base.html">← The base system</a> | <a href="docs.html">Contents</a> | <a href="handbook-iso.html">The live ISO →</a></p>
</main>
diff --git a/docs/handbook-mag.html b/docs/handbook-mag.html
@@ -0,0 +1,99 @@
+<!doctype html>
+<html lang="en">
+<head>
+<meta charset="utf-8">
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<title>mag - Chamesle</title>
+<meta name="description" content="mag is the package manager. It installs binary packages from the repositories in /etc/mag/repos, checks every index">
+<link rel="canonical" href="https://chamesle.org/handbook-mag.html">
+<meta property="og:type" content="website">
+<meta property="og:site_name" content="Chamesle">
+<meta property="og:title" content="mag - Chamesle">
+<meta property="og:description" content="mag is the package manager. It installs binary packages from the repositories in /etc/mag/repos, checks every index">
+<meta property="og:url" content="https://chamesle.org/handbook-mag.html">
+<link rel="stylesheet" href="style.css?19">
+<link rel="icon" href="img/logo.png">
+</head>
+<body>
+
+<div id="page">
+
+<div id="top">
+<h1><a href="./"><img src="img/banner-dark.png" alt="Chamesle Linux" width="223" height="56"></a></h1>
+</div>
+
+<div id="nav">
+<a href="./">Home</a> |
+<a href="download.html">Download</a> |
+<b>Handbook</b> |
+<a href="packages.html">Packages</a> |
+<a href="new.html">News</a> |
+<a href="board.html">Board</a> |
+<a href="chat.html">Chat</a> |
+<a href="source.html">Source</a> |
+<a href="https://x22.chamesle.org/">X22</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
+<a href="about.html">About</a>
+</div>
+
+<main>
+<p><a href="handbook-installing.html">← Installing by hand</a> | <a href="docs.html">Contents</a> | <a href="handbook-rifle.html">rifle →</a></p>
+<h2>4. mag</h2>
+<p>mag is the package manager. It installs binary packages from the repositories in <code>/etc/mag/repos</code>, checks every index and every package against <code>/etc/mag/keys</code>, and keeps what it installed in <code>/var/lib/mag</code>. It is one C file and runs nothing but the download command.</p>
+<h2 id="s4-1">4.1 The commands</h2>
+<pre>mag update get the index of every repo
+mag install PKG... install, with what they need
+mag remove PKG... take packages off
+mag upgrade install what the repos have a newer version of
+mag autoremove remove what was only a dependency and is not needed now
+mag list what is installed
+mag info PKG version, size, description, and whether it is installed
+mag search WORD names and descriptions
+mag files PKG the files a package put on the system
+mag owns PATH which package a file came from
+mag deps PKG what it needs; rdeps PKG for what needs it
+mag fetch PKG... only download them</pre>
+<p><code>-n</code> says what would happen and does nothing, <code>-f</code> goes on when files clash or something still needs a package. <code>MAG_ROOT=/mnt mag ...</code> works on another root, which is what chamesle-bootstrap does.</p>
+<h2 id="s4-2">4.2 Installing and removing</h2>
+<pre>mag install vim
+mag -n install xorg-server what would come with it
+mag remove vim</pre>
+<p>Before it unpacks anything, mag checks each file against what other packages own and stops if two packages want the same file. A file under <code>/etc</code> that you changed stays, and the new one is written next to it as <code>NAME.new</code>. Packages carry scripts that run after they are installed, and triggers that run when a directory they watch changes, like the one that makes the initramfs when a kernel is installed.</p>
+<p>A name can also be what a package provides: <code>mag install cmd:htop</code> installs the package that has the command.</p>
+<h2 id="s4-3">4.3 Where it keeps things</h2>
+<table>
+<tr><th>what</th><th>where</th></tr>
+<tr><td>the repositories</td><td><code>/etc/mag/repos</code>, one URL a line</td></tr>
+<tr><td>the keys</td><td><code>/etc/mag/keys</code></td></tr>
+<tr><td>the architecture</td><td><code>/etc/mag/arch</code></td></tr>
+<tr><td>installed packages</td><td><code>/var/lib/mag/NAME/</code>: <code>version</code>, <code>files</code>, <code>deps</code>, <code>explicit</code> and the scripts</td></tr>
+<tr><td>indexes and downloads</td><td><code>/var/cache/mag</code></td></tr>
+</table>
+<h2 id="s4-4">4.4 Repositories</h2>
+<pre>https://chamesle.org/repo
+https://dl-cdn.alpinelinux.org/alpine/v3.24/main
+https://dl-cdn.alpinelinux.org/alpine/v3.24/community</pre>
+<p>Each line is the URL above the directory of the architecture: mag adds <code>/x86_64/APKINDEX.tar.gz</code>. A repository you add needs its key in <code>/etc/mag/keys</code>. <code>mag update</code> after any change.</p>
+<h2 id="s4-5">4.5 Making a package</h2>
+<p><code>tools/mkapk</code> packs a directory, signs it and leaves its index entry; <code>tools/mkrepo</code> signs the index of a directory of them:</p>
+<pre>mkapk -k KEY -n hello -v 1.0 -a x86_64 -d "says hello" -D "musl" -o repo/x86_64 ./root
+mkrepo repo/x86_64 KEY</pre>
+<p>Put the public half of KEY in <code>/etc/mag/keys</code> and the repo's URL in <code>/etc/mag/repos</code>. <code>tools/mkpkgs</code> is how Chamesle's own repo is made.</p>
+<hr>
+<p><a href="handbook-installing.html">← Installing by hand</a> | <a href="docs.html">Contents</a> | <a href="handbook-rifle.html">rifle →</a></p>
+</main>
+
+<hr>
+<div id="foot">
+Something wrong on this page? Tell us on the <a href="board.html">board</a>.<br>
+Chamesle is installed by hand, from the <a href="docs.html">handbook</a>.<br>
+<a href="https://ko-fi.com/L6N725GI1V">Ko-fi</a><br>
+<a href="#" id="edit-link">Edit text</a><br>
+$Date: 2026-11-18 $
+</div>
+
+</div>
+
+<script src="edit.js"></script>
+</body>
+</html>
diff --git a/docs/handbook-maintaining.html b/docs/handbook-maintaining.html
@@ -4,12 +4,12 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Maintaining - Chamesle</title>
-<meta name="description" content="sync brings the Gentoo tree up to date (section 2.3), the second says what would be rebuilt, the third rebuilds whatever">
+<meta name="description" content="The first gets the indexes, the second says what would change, the third does it.">
<link rel="canonical" href="https://chamesle.org/handbook-maintaining.html">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Chamesle">
<meta property="og:title" content="Maintaining - Chamesle">
-<meta property="og:description" content="sync brings the Gentoo tree up to date (section 2.3), the second says what would be rebuilt, the third rebuilds whatever">
+<meta property="og:description" content="The first gets the indexes, the second says what would change, the third does it.">
<meta property="og:url" content="https://chamesle.org/handbook-maintaining.html">
<link rel="stylesheet" href="style.css?19">
<link rel="icon" href="img/logo.png">
@@ -32,46 +32,37 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
<main>
<p><a href="handbook-iso.html">← The live ISO</a> | <a href="docs.html">Contents</a> | <a href="handbook-files.html">File reference →</a></p>
<h2>9. Maintaining</h2>
-<h2 id="s9-1">9.1 Updating packages</h2>
-<pre>hoard sync
-hoard upgrade -p
-hoard upgrade</pre>
-<p><code>sync</code> brings the Gentoo tree up to date (section 2.3), the second says what would be rebuilt, the third rebuilds whatever the tree has a newer version of. One package: <code>hoard install name</code>.</p>
+<h2 id="s9-1">9.1 Updating</h2>
+<pre>mag update
+mag -n upgrade
+mag upgrade</pre>
+<p>The first gets the indexes, the second says what would change, the third does it.</p>
<h2 id="s9-2">9.2 Cleaning up</h2>
-<pre>hoard autoremove dependencies nothing needs any more
-rm -rf /var/cache/distfiles/* downloaded sources; they are fetched again when needed</pre>
-<h2 id="s9-3">9.3 C23 and CFLAGS</h2>
-<p>clang compiles C as C23 by default. Older programs written for C89 or C99 stop with errors about <code>bool</code>, <code>true</code> or <code>false</code> used as names, or about functions declared as <code>int f()</code> and called with arguments. <code>CFLAGS="-O2 -std=gnu17"</code> in <code>/etc/spas/make.conf</code> makes the compiler use C17 for every build. It is in the file chamesle-bootstrap writes; if you wrote your own <code>make.conf</code> without it, add it.</p>
-<p>To see the error of a failed build, read the log hoard names: the build directory is kept, and <code>hoard install --resume</code> goes on from the phase that stopped.</p>
-<h2 id="s9-4">9.4 Installing into a root</h2>
-<p><code>hoard --root /mnt install name</code> builds and merges into <code>/mnt</code>, with the configuration of <code>/mnt/etc/spas</code>. Once the root has musl in it, the builds use the clang of the new root, so a package is built for the system it goes into.</p>
-<h2 id="s9-5">9.5 Build tools</h2>
-<p>Ebuilds call the usual tools by name: <code>make</code>, <code>awk</code>, <code>sed</code>, <code>grep</code>, <code>diff</code>, <code>cmp</code>, <code>install</code>, <code>python3</code>, <code>perl</code>, <code>m4</code>. The coreutils ones are rifle's, and the rest are packages like any other. A name an ebuild asks for that is missing is a package to install, and <code>hoard install -p</code> says which one.</p>
-<h2 id="s9-6">9.6 Failures you will see</h2>
+<pre>mag autoremove dependencies nothing needs any more
+rm -rf /var/cache/mag/pkg downloaded packages; they are fetched again when needed</pre>
+<h2 id="s9-3">9.3 Configuration files</h2>
+<p>A changed file under <code>/etc</code> is never written over. When a package brings a new one, it lands next to yours as <code>NAME.new</code>. Look for them after an upgrade and merge by hand:</p>
+<pre>find /etc -name '*.new'</pre>
+<h2 id="s9-4">9.4 Failures you will see</h2>
<table>
<tr><th>what you see</th><th>why, and what to do</th></tr>
-<tr><td><code>no ebuilds match NAME</code></td><td>the name is in no repository of <code>repos.conf</code>; try <code>hoard search</code>, and run <code>hoard sync</code></td></tr>
-<tr><td>a checksum mismatch</td><td>the download is not the one the Manifest names; hoard fetches it again</td></tr>
-<tr><td><code>no clang in PATH</code></td><td>the build host has no clang outside the new root; install one</td></tr>
-<tr><td>files clash, or a package cannot be removed</td><td>another package owns the file or needs the package; read what hoard says</td></tr>
-<tr><td>errors on <code>bool</code>, <code>true</code>, <code>false</code> or on old declarations</td><td>C23; <code>CFLAGS=-O2 -std=gnu17</code> (section 9.3)</td></tr>
-<tr><td>musl's build fails</td><td><code>gmake</code> is missing on the host</td></tr>
-<tr><td>"root device not found" at boot</td><td>the kernel cannot see the disk or the file system: it needs a module, use an initramfs (section 7.5)</td></tr>
+<tr><td><code>no package NAME</code></td><td>not in any repo; <code>mag search</code>, and <code>mag update</code></td></tr>
+<tr><td>a signature or hash that does not match</td><td>the download or the index is not what the repo signed; <code>mag update</code> and try again, check <code>/etc/mag/keys</code></td></tr>
+<tr><td><code>NAME wants FILE, which OTHER has</code></td><td>two packages want the same file; <code>-f</code> writes over it if you are sure</td></tr>
+<tr><td>"root device not found" at boot</td><td>the initramfs cannot see the disk or the file system: check <code>root=</code> and <code>modules=</code> in <code>limine.conf</code></td></tr>
<tr><td>the machine boots to a limine prompt</td><td><code>limine.conf</code> is not found, or its <code>path:</code> does not name a file in <code>/boot</code>; check with <code>ls /boot</code></td></tr>
<tr><td>a BIOS machine does not boot</td><td><code>limine bios-install /dev/sda</code> was not run, or <code>limine-bios.sys</code> is not in <code>/boot</code></td></tr>
<tr><td>a UEFI machine does not boot</td><td><code>EFI/BOOT/BOOTX64.EFI</code> is not on the EFI partition, or the partition is not of type EFI System</td></tr>
-<tr><td>a login without a password</td><td>the password field of <code>passwd</code> is empty</td></tr>
-<tr><td>no devices in <code>/dev</code></td><td>udev did not start; check that <code>udevd</code> is installed with <code>hoard list</code></td></tr>
+<tr><td>no wireless interface</td><td>the firmware is missing (7.4); <code>dmesg</code> names the file</td></tr>
+<tr><td>no devices in <code>/dev</code></td><td>udev did not start; check <code>udev</code> is in <code>boot-services</code></td></tr>
</table>
-<h2 id="s9-7">9.7 Keeping a build</h2>
-<p>hoard keeps the build directory of a failed build, in <code>/var/tmp/portage</code>. <code>hoard install -f name</code> only downloads and checks the sources, and <code>hoard install --resume</code> carries on from the phase that stopped.</p>
<hr>
<p><a href="handbook-iso.html">← The live ISO</a> | <a href="docs.html">Contents</a> | <a href="handbook-files.html">File reference →</a></p>
</main>
diff --git a/docs/handbook-preparing.html b/docs/handbook-preparing.html
@@ -4,12 +4,12 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Preparing - Chamesle</title>
-<meta name="description" content="Chamesle is built from a running Linux machine: any distribution, or the live ISO of chapter 8. The host needs:">
+<meta name="description" content="The CPU can be x86_64, or a 32-bit x86 one from the Pentium 4 on (section 3.10).">
<link rel="canonical" href="https://chamesle.org/handbook-preparing.html">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Chamesle">
<meta property="og:title" content="Preparing - Chamesle">
-<meta property="og:description" content="Chamesle is built from a running Linux machine: any distribution, or the live ISO of chapter 8. The host needs:">
+<meta property="og:description" content="The CPU can be x86_64, or a 32-bit x86 one from the Pentium 4 on (section 3.10).">
<meta property="og:url" content="https://chamesle.org/handbook-preparing.html">
<link rel="stylesheet" href="style.css?19">
<link rel="icon" href="img/logo.png">
@@ -32,48 +32,40 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
<main>
<p><a href="handbook-about.html">← About Chamesle</a> | <a href="docs.html">Contents</a> | <a href="handbook-installing.html">Installing by hand →</a></p>
<h2>2. Preparing</h2>
-<h2 id="s2-1">2.1 What the build host needs</h2>
-<p>Chamesle is built from a running Linux machine: any distribution, or the live ISO of chapter 8. The host needs:</p>
+<h2 id="s2-1">2.1 What you need</h2>
<ul>
-<li><code>clang</code> and <code>lld</code>: <code>rifle</code> is built with them, and so is everything in the new system</li>
-<li><code>cargo</code> and <code>rustc</code>, for <code>hoard</code>, with the musl standard library for <code>x86_64-unknown-linux-musl</code></li>
-<li><code>bash</code>, which ebuilds run in</li>
-<li><code>gmake</code>, for musl</li>
-<li><code>tar</code> and a POSIX <code>sh</code></li>
-<li><code>sfdisk</code>, <code>mkfs.ext4</code> and <code>mkfs.fat</code> to prepare the disk</li>
-<li><code>blkid</code> to read UUIDs</li>
+<li>the ISO, from chamesle.org, written to a stick or a disc (chapter 8). It has everything chapter 3 uses</li>
+<li>a network connection: the packages come from the repositories</li>
+<li>about 1 GB of disk for a base system with a kernel, more for what you add</li>
+<li>256 MB of memory is enough to install and to run</li>
</ul>
-<p>Plan for about 20 GB of free disk space for the sources and build directories of a first install, and a network connection.</p>
-<h2 id="s2-2">2.2 Building SPAS and rifle</h2>
-<p>rifle is a single C file with no libc under it:</p>
-<pre>cd $HOME/src/rifle && ./build.sh</pre>
-<p><code>rifle/build.sh</code> leaves <code>./rifle</code> and a <code>bin/</code> directory with a link for every tool. SPAS is a Rust program, and builds the <code>hoard</code> command. For a system on musl it is built for the musl target, as a static binary:</p>
-<pre>cd $HOME/src/SimplePackagemAnagingSystem
-cargo build --release --target x86_64-unknown-linux-musl
-install -m755 target/x86_64-unknown-linux-musl/release/hoard /usr/local/bin/hoard</pre>
-<p>The releases of SPAS have a binary for glibc machines, which is what a Gentoo host uses to start with.</p>
-<h2 id="s2-3">2.3 Getting the Gentoo tree</h2>
-<pre>mkdir -p /var/db/repos /etc/spas/repos.conf
-printf '[gentoo]\nlocation = /var/db/repos/gentoo\nsync-type = git\nsync-uri = https://github.com/gentoo-mirror/gentoo.git\n' > /etc/spas/repos.conf/gentoo.conf
-hoard sync</pre>
-<p><code>sync</code> clones the tree the first time and pulls it after that, so it is also how the tree is brought up to date. Gentoo has a directory per category (<code>app-editors</code>, <code>sys-apps</code>, ...) and a directory per package inside it (<code>app-editors/vim</code>) with the ebuilds, a <code>Manifest</code> and the files they carry.</p>
-<h2 id="s2-4">2.4 The profile</h2>
-<p>The profile says what a package is built for. Chamesle uses the musl one, and <code>make.profile</code> is a link to it:</p>
-<pre>ln -sfn /var/db/repos/gentoo/profiles/default/linux/amd64/23.0/musl /etc/spas/make.profile</pre>
-<p><code>--root DIR</code> says where to install; it is the new root during an installation (chapter 3) and left out on a running system. Its own <code>etc/spas</code> is the one used.</p>
-<h2 id="s2-5">2.5 make.conf</h2>
-<p><code>/etc/spas/make.conf</code> holds the build settings, and section 4.4 has what goes in it. The stage has one. For the host you build from, make one yourself:</p>
-<pre>CFLAGS="-O2 -pipe -std=gnu17"
-CXXFLAGS="${CFLAGS}"
-MAKEOPTS="-j8"</pre>
-<p><code>-std=gnu17</code> matters. clang defaults to C23 now, and a lot of older source does not compile under it (section 9.3).</p>
+<p>The CPU can be x86_64, or a 32-bit x86 one from the Pentium 4 on (section 3.10).</p>
+<h2 id="s2-2">2.2 From another Linux</h2>
+<p>The ISO is the easy way, but any Linux machine can install Chamesle. It needs <code>mag</code>, the keys and the repos:</p>
+<pre>curl -LO https://chamesle.org/repo/x86_64/mag-0.3.apk
+tar -xzf mag-0.3.apk usr/bin/mag
+mkdir -p /etc/mag
+cp -R keys /etc/mag/keys
+cp pkg/chamesle-base/repos /etc/mag/repos
+install -m755 usr/bin/mag /usr/local/bin/mag</pre>
+<p><code>keys/</code> and <code>pkg/chamesle-base/repos</code> are in <code>system/</code> of the sources. The <code>tar</code> line warns about the signature and control parts it does not know; the program comes out all the same. mag is static, so it runs on any distribution. From there chapter 3 is the same, without the live system.</p>
+<h2 id="s2-3">2.3 Getting on the network</h2>
+<p>On the live system a cable works by itself: <code>dhcpcd</code> runs at boot. Check it with</p>
+<pre>ip addr
+ping -c 3 chamesle.org</pre>
+<p>For wireless, <code>iwctl</code> (iwd runs at boot on the ISO):</p>
+<pre>iwctl device list
+iwctl station wlan0 scan
+iwctl station wlan0 get-networks
+iwctl station wlan0 connect NAME</pre>
+<p>It asks for the passphrase. dhcpcd gives the interface an address once it is connected.</p>
<hr>
<p><a href="handbook-about.html">← About Chamesle</a> | <a href="docs.html">Contents</a> | <a href="handbook-installing.html">Installing by hand →</a></p>
</main>
diff --git a/docs/handbook-rifle.html b/docs/handbook-rifle.html
@@ -4,12 +4,12 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>rifle - Chamesle</title>
-<meta name="description" content="rifle is the coreutils of Chamesle in one C file, rifle.c, on c.h, a one-file libc. It has no GNU code in it and no">
+<meta name="description" content="rifle is the coreutils of Chamesle on x86_64 in one C file, rifle.c, on c.h, a one-file libc. It has no GNU code in it and no">
<link rel="canonical" href="https://chamesle.org/handbook-rifle.html">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Chamesle">
<meta property="og:title" content="rifle - Chamesle">
-<meta property="og:description" content="rifle is the coreutils of Chamesle in one C file, rifle.c, on c.h, a one-file libc. It has no GNU code in it and no">
+<meta property="og:description" content="rifle is the coreutils of Chamesle on x86_64 in one C file, rifle.c, on c.h, a one-file libc. It has no GNU code in it and no">
<meta property="og:url" content="https://chamesle.org/handbook-rifle.html">
<link rel="stylesheet" href="style.css?19">
<link rel="icon" href="img/logo.png">
@@ -32,15 +32,15 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
<main>
-<p><a href="handbook-spas.html">← Using SPAS</a> | <a href="docs.html">Contents</a> | <a href="handbook-base.html">The base system →</a></p>
+<p><a href="handbook-mag.html">← mag</a> | <a href="docs.html">Contents</a> | <a href="handbook-base.html">The base system →</a></p>
<h2>5. rifle</h2>
<h2 id="s5-1">5.1 What it is</h2>
-<p>rifle is the coreutils of Chamesle in one C file, <code>rifle.c</code>, on <code>c.h</code>, a one-file libc. It has no GNU code in it and no libc under it. It sorts and compares by bytes, always; there are no locales.</p>
+<p>rifle is the coreutils of Chamesle on x86_64 in one C file, <code>rifle.c</code>, on <code>c.h</code>, a one-file libc. It has no GNU code in it and no libc under it. It sorts and compares by bytes, always; there are no locales.</p>
<p>There is one program. <code>cat</code>, <code>ls</code>, <code>cp</code> and the other commands are links to it, and it runs whichever name it was called by. You type <code>cat</code>, not <code>rifle cat</code>.</p>
<h2 id="s5-2">5.2 The tools</h2>
<pre>[ arch base32 base64 basename cat chgrp chmod chown chroot cksum comm cp cut date dd df dirname du echo env
@@ -63,6 +63,7 @@ timeout touch tr true truncate tsort tty uname unexpand uniq unlink wc whoami ye
</table>
<p>Not there yet: <code>stty</code>, <code>who</code> and friends, <code>fmt</code>, <code>pr</code>, <code>csplit</code>, <code>numfmt</code>, <code>shred</code>, <code>stdbuf</code>, <code>ptx</code>, <code>pathchk</code>, <code>dircolors</code>.</p>
<h2 id="s5-3">5.3 Building</h2>
+<p>The <code>rifle</code> package has it built. From the sources:</p>
<pre>cd $HOME/src/rifle
./build.sh</pre>
<p>builds <code>rifle</code> with clang and lld (<code>CC</code> overrides <code>cc</code>) and makes the links in <code>bin/</code>. To put the links anywhere:</p>
@@ -72,9 +73,8 @@ rifle --list the names it knows</pre>
<pre>tests/run.sh all the cases
tests/run.sh sort the cases that have `sort` in them</pre>
<p>Each case in <code>tests/cases</code> runs once under GNU coreutils and once under rifle, and what they print and how they exit are compared. The machine that runs the tests therefore has GNU coreutils for the comparison; the installed system does not. <code>./build.sh</code> has to have run first. A case that starts with <code>@ro</code> runs with the whole file system read-only under <code>bwrap</code>, and is skipped when <code>bwrap</code> is missing.</p>
-<p>SPAS has tests of its own, in its sources (<code>cargo test</code>).</p>
<hr>
-<p><a href="handbook-spas.html">← Using SPAS</a> | <a href="docs.html">Contents</a> | <a href="handbook-base.html">The base system →</a></p>
+<p><a href="handbook-mag.html">← mag</a> | <a href="docs.html">Contents</a> | <a href="handbook-base.html">The base system →</a></p>
</main>
<hr>
diff --git a/docs/handbook-spas.html b/docs/handbook-spas.html
@@ -1,138 +0,0 @@
-<!doctype html>
-<html lang="en">
-<head>
-<meta charset="utf-8">
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<title>Using SPAS - Chamesle</title>
-<meta name="description" content="SPAS is the package manager, and its command is hoard. It is a replacement for Portage written in Rust, and it runs Gentoo's ebuilds. Chamesle">
-<link rel="canonical" href="https://chamesle.org/handbook-spas.html">
-<meta property="og:type" content="website">
-<meta property="og:site_name" content="Chamesle">
-<meta property="og:title" content="Using SPAS - Chamesle">
-<meta property="og:description" content="SPAS is the package manager, and its command is hoard. It is a replacement for Portage written in Rust, and it runs Gentoo's ebuilds. Chamesle">
-<meta property="og:url" content="https://chamesle.org/handbook-spas.html">
-<link rel="stylesheet" href="style.css?19">
-<link rel="icon" href="img/logo.png">
-</head>
-<body>
-
-<div id="page">
-
-<div id="top">
-<h1><a href="./"><img src="img/banner-dark.png" alt="Chamesle Linux" width="223" height="56"></a></h1>
-</div>
-
-<div id="nav">
-<a href="./">Home</a> |
-<a href="download.html">Download</a> |
-<b>Handbook</b> |
-<a href="packages.html">Packages</a> |
-<a href="new.html">News</a> |
-<a href="board.html">Board</a> |
-<a href="chat.html">Chat</a> |
-<a href="source.html">Source</a> |
-<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
-<a href="about.html">About</a>
-</div>
-
-<main>
-<p><a href="handbook-installing.html">← Installing by hand</a> | <a href="docs.html">Contents</a> | <a href="handbook-rifle.html">rifle →</a></p>
-<h2>4. Using SPAS</h2>
-<p>SPAS is the package manager, and its command is <code>hoard</code>. It is a replacement for Portage written in Rust, and it runs Gentoo's ebuilds. Chamesle uses Gentoo's repository on the musl profile, so a package is an ebuild in <code>/var/db/repos/gentoo</code>, and everything is built on the machine that installs it, unless a binary package matches.</p>
-<h2 id="s4-1">4.1 The commands</h2>
-<pre>hoard install PKG... install, dependencies first (-p pretend, -1 do not add to world, -u -D -N, -jN parallel builds)
-hoard upgrade update everything (install -uDN @world)
-hoard remove PKG... uninstall
-hoard autoremove uninstall what @world and @system no longer need
-hoard sync sync the repositories
-hoard search REGEX names (-d: descriptions too)
-hoard info PKG versions, masks, keywords, USE
-hoard list what is installed
-hoard files PKG the files a package put on the system
-hoard owns PATH which package a file came from
-hoard env-update regenerate /etc/profile.env and ld.so.conf
-hoard manifest PKG|DIR write the DIST lines of an overlay package's Manifest
-hoard self-update replace a hand-installed hoard with the newest release</pre>
-<p>A package name works without its category (<code>hoard install tree</code>); hoard asks if two categories have it. <code>hoard --root DIR</code> does any of this in another root, which is how a new system is built (chapter 3).</p>
-<h2 id="s4-2">4.2 Installing and removing</h2>
-<pre>hoard install app-editors/vim
-hoard install -p app-misc/fastfetch what would be built, nothing is done
-hoard remove vim</pre>
-<p><code>install</code> takes the dependencies first, downloads the sources, checks their size, BLAKE2B and SHA512 against the Manifest, builds in a private directory as the <code>portage</code> user without network, and merges the result. Before it touches anything it checks every file against what other packages own, a file under <code>/etc</code> that you changed stays and the new one is written next to it as <code>._cfg0000_name</code>, and each file is replaced atomically, so a running program is never half written.</p>
-<p>If a build fails, hoard keeps the build directory. <code>hoard install --resume</code> goes on from the phase that stopped, <code>--skipfirst</code> leaves the failed package out and <code>--keep-going</code> builds everything that does not depend on it.</p>
-<h2 id="s4-3">4.3 Where it keeps things</h2>
-<table>
-<tr><th>what</th><th>where</th></tr>
-<tr><td>configuration</td><td><code>/etc/spas</code>: <code>make.conf</code>, <code>make.profile</code>, <code>repos.conf/</code>, <code>package.use</code>, <code>package.accept_keywords</code>, <code>package.mask</code>, <code>package.license</code>, <code>package.env</code> and <code>env/</code></td></tr>
-<tr><td>the repositories</td><td><code>/var/db/repos/gentoo</code>, and any overlay you add</td></tr>
-<tr><td>installed packages</td><td><code>/var/db/pkg</code>, one directory per package, with its <code>CONTENTS</code></td></tr>
-<tr><td>the world file</td><td><code>/var/lib/portage/world</code></td></tr>
-<tr><td>downloaded sources</td><td><code>/var/cache/distfiles</code></td></tr>
-<tr><td>binary packages</td><td><code>PKGDIR</code>, from <code>/etc/spas/make.conf</code></td></tr>
-</table>
-<p>If there is no <code>/etc/spas</code>, hoard reads <code>/etc/portage</code> instead, so a machine that has Portage's files is understood as it is.</p>
-<h2 id="s4-4">4.4 make.conf</h2>
-<p><code>/etc/spas/make.conf</code> holds the build settings, in the shell syntax of Portage's:</p>
-<pre>COMMON_FLAGS="-O2 -pipe -std=gnu17"
-CFLAGS="${COMMON_FLAGS}"
-CXXFLAGS="${COMMON_FLAGS}"
-CHOST="x86_64-pc-linux-musl"
-MAKEOPTS="-j8"
-ACCEPT_KEYWORDS="amd64"
-USE="-systemd"</pre>
-<ul>
-<li><code>MAKEOPTS</code> is the number of jobs for <code>make</code>, and <code>-jN</code> on the hoard command line is how many packages build at once</li>
-<li><code>USE</code> turns features on and off for every package; one package gets its own line in <code>package.use</code></li>
-<li><code>ACCEPT_KEYWORDS</code> says how new the packages may be: <code>amd64</code> is stable, <code>~amd64</code> is testing</li>
-<li><code>/etc/spas/make.profile</code> is a link to a profile of the tree. Chamesle uses the musl one: <code>ln -sfn /var/db/repos/gentoo/profiles/default/linux/amd64/23.0/musl /etc/spas/make.profile</code></li>
-</ul>
-<p><code>-std=gnu17</code> matters. clang defaults to C23 now, and a lot of older source does not compile under it (section 9.3).</p>
-<h2 id="s4-5">4.5 Repositories</h2>
-<p><code>/etc/spas/repos.conf/gentoo.conf</code> names the tree and where it comes from:</p>
-<pre>[gentoo]
-location = /var/db/repos/gentoo
-sync-type = git
-sync-uri = https://github.com/gentoo-mirror/gentoo.git</pre>
-<p><code>hoard sync</code> brings every repository up to date. A git repository whose newest commit is not validly signed is rolled back, and a tree from rsync is checked against its signed Manifests.</p>
-<h2 id="s4-6">4.6 USE flags and keywords</h2>
-<p>When nothing satisfies a dependency, hoard works out the smallest change that would (a <code>package.use</code> line, a <code>~amd64</code> keyword or a license), shows it, and writes it to <code>zz-hoard-autounmask</code> in the config directory after you say yes.</p>
-<pre>hoard info net-misc/curl the versions, the USE flags and what they are now
-echo "net-misc/curl http2 -idn" >> /etc/spas/package.use</pre>
-<h2 id="s4-7">4.7 Binary packages</h2>
-<p><code>hoard install -g</code> uses prebuilt packages from Gentoo's binary host when the version, slot and every USE flag match, and otherwise builds the ebuild. They are checked against the index and the release key before they are unpacked. <code>-b</code> (or <code>FEATURES=buildpkg</code>) saves everything you build as a <code>.gpkg.tar</code> in <code>PKGDIR</code>, and hoard installs from those the next time the version and USE match.</p>
-<h2 id="s4-8">4.8 Writing an ebuild</h2>
-<p>If the tree does not have what you want, write an ebuild in an overlay. An overlay is a repository with <code>profiles/repo_name</code>, <code>metadata/layout.conf</code> and <code>category/name/name-VERSION.ebuild</code>:</p>
-<pre>EAPI=8
-DESCRIPTION="nl80211 wireless configuration tool"
-HOMEPAGE="https://wireless.docs.kernel.org/en/latest/en/users/documentation/iw.html"
-SRC_URI="https://cdn.kernel.org/pub/software/network/iw/${P}.tar.xz"
-LICENSE="ISC"
-SLOT="0"
-KEYWORDS="amd64"
-DEPEND="dev-libs/libnl"
-RDEPEND="${DEPEND}"
-BDEPEND="virtual/pkgconfig"
-
-src_install() {
- emake PREFIX="${EPREFIX}/usr" DESTDIR="${D}" install
-}</pre>
-<p><code>hoard manifest net-wireless/iw</code> writes the checksums of the sources into the package's <code>Manifest</code>. Add the overlay to <code>/etc/spas/repos.conf/</code>, run <code>hoard sync</code>, and <code>hoard install net-wireless/iw</code> builds it.</p>
-<hr>
-<p><a href="handbook-installing.html">← Installing by hand</a> | <a href="docs.html">Contents</a> | <a href="handbook-rifle.html">rifle →</a></p>
-</main>
-
-<hr>
-<div id="foot">
-Something wrong on this page? Tell us on the <a href="board.html">board</a>.<br>
-Chamesle is installed by hand, from the <a href="docs.html">handbook</a>.<br>
-<a href="https://ko-fi.com/L6N725GI1V">Ko-fi</a><br>
-<a href="#" id="edit-link">Edit text</a><br>
-$Date: 2026-11-18 $
-</div>
-
-</div>
-
-<script src="edit.js"></script>
-</body>
-</html>
diff --git a/docs/index.html b/docs/index.html
@@ -4,12 +4,12 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Chamesle, a Linux distribution built from source</title>
-<meta name="description" content="Chamesle is a Linux distribution you install by hand and build from source, with its own coreutils and package manager.">
+<meta name="description" content="Chamesle is a small musl Linux distribution you install by hand, with its own init, coreutils and binary package manager.">
<link rel="canonical" href="https://chamesle.org/">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Chamesle">
<meta property="og:title" content="Chamesle, a Linux distribution built from source">
-<meta property="og:description" content="Chamesle is a Linux distribution you install by hand and build from source, with its own coreutils and package manager.">
+<meta property="og:description" content="Chamesle is a small musl Linux distribution you install by hand, with its own init, coreutils and binary package manager.">
<meta property="og:url" content="https://chamesle.org/">
<link rel="stylesheet" href="style.css?19">
<link rel="icon" href="img/logo.png">
@@ -40,22 +40,26 @@
<h2 id="what">What is Chamesle</h2>
-<p>Chamesle is a Linux distribution built from source and installed by hand, like Gentoo or Linux From
-Scratch. The kernel is Linux. Nothing else in it is GNU. It boots to a text login, and the graphical stage starts X with <code>9wm</code>, a window manager like Plan 9's rio, with <code>9term</code>, <code>acme</code> and <code>sam</code>.</p>
+<p>Chamesle is a small Linux distribution on musl, installed by hand. Nothing is compiled: the package manager,
+<code>mag</code>, installs binary packages, and <code>chamesle-bootstrap</code> puts the base on a disk the way
+debootstrap does. The init is Winchester, the coreutils are rifle, the shell is mksh. It boots to a text login, and it
+runs on a new laptop as well as on a Pentium 4 with 256 MB of memory.</p>
<h2 id="news">News</h2>
<dl class="news">
+<dt>2026-11-21</dt>
+<dd>No more building. <code>mag</code> is now a binary package manager, one C file, and reads signed repos with
+about 28,000 packages for x86_64 and 32-bit x86. There is no stage any more: boot the <a href="download.html">ISO</a>,
+run <code>chamesle-bootstrap /mnt</code>, and write the fstab and the boot entry by hand. Chamesle's own packages are
+in its repo at <code>chamesle.org/repo</code>. The <a href="handbook-installing.html">handbook</a> is rewritten for it.</dd>
<dt>2026-11-17</dt>
-<dd>Stages are out. The <a href="download.html">base stage</a> is the whole system in one tarball: unpack it,
-chroot, and let <code>hoard</code> build the rest. The graphical stage adds Xorg and starts <code>9wm</code> with
-<code>9term</code>, <code>acme</code> and <code>sam</code> on the first login. The <a href="handbook-installing.html">handbook</a>
-covers both.</dd>
+<dd>Stages are out: the whole system in one tarball, with <code>hoard</code> to build the rest. Replaced a day
+later.</dd>
<dt>2026-11-14</dt>
<dd>Chamesle starts over. The old Debian-style desktop distro is gone, with its desktops and the 0.8 release.
-The new one is written from scratch. The handbook has the install steps: partition, mount,
-<code>chamesle-bootstrap</code>, fstab and limine.</dd>
+The new one is written from scratch.</dd>
<dt>2026-11-10</dt>
<dd>The old Chamesle went on hold. X8664 became <a href="https://x22.chamesle.org/">X22</a> and got a site of its
own. The <a href="new.html">news page</a> has the history of the old releases.</dd>
@@ -65,55 +69,36 @@ own. The <a href="new.html">news page</a> has the history of the old releases.</
<table class="grid">
<tr><th>part</th><th>what it is</th></tr>
-<tr><td>kernel</td><td>Linux 6.18 LTS, a prebuilt distribution kernel, boots on BIOS and UEFI</td></tr>
+<tr><td>kernel</td><td>Linux 6.18 LTS, prebuilt, boots on BIOS and UEFI</td></tr>
<tr><td>musl</td><td>the C library</td></tr>
+<tr><td><a href="https://github.com/tortr-rs/mag">mag</a></td><td>the package manager, binary packages only, one C file. Checks every package against its signature</td></tr>
<tr><td>rifle</td><td>the coreutils, one C file. 113 tools, more than 1700 test cases against GNU's</td></tr>
-<tr><td><a href="https://spas.chamesle.org/">SPAS</a></td><td>the package manager, its command is <code>hoard</code>. Builds from source, runs Gentoo's ebuilds</td></tr>
-<tr><td>ebuilds</td><td>the package repo, Gentoo's, on the musl profile</td></tr>
-<tr><td>mksh</td><td>the shell, also <code>/bin/sh</code></td></tr>
+<tr><td>mksh</td><td>the login shell</td></tr>
<tr><td>Winchester</td><td>the init, a shell script in the FreeBSD style, set up in <code>/etc/init.conf</code></td></tr>
<tr><td>limine</td><td>the boot loader</td></tr>
-<tr><td>sam</td><td>the editor, from Plan 9 (<code>sam -d</code> is <code>$EDITOR</code>)</td></tr>
</table>
<h2 id="install">Install</h2>
-<p>Boot the <a href="https://github.com/tortr-rs/system/releases/latest/download/chamesle.iso">ISO</a> or unpack a <a href="download.html">stage</a>, and install by hand from the
-<a href="docs.html">handbook</a> (chapter 3). Or, from any running Linux, mount a disk and run the bootstrap into it.</p>
+<p>Boot the <a href="https://github.com/tortr-rs/system/releases/latest/download/chamesle.iso">ISO</a> and install by hand from the
+<a href="docs.html">handbook</a> (chapter 3): partition, mount, then</p>
-<pre>chamesle-disk /dev/sda
-chamesle-bootstrap -n yourhostname /mnt</pre>
+<pre>chamesle-bootstrap -n yourhostname /mnt</pre>
-<p>The commands, one after the other, are on the <a href="download.html">install page</a>.</p>
-
-<h2 id="plan">Plan</h2>
-
-<ol>
-<li>rifle, the coreutils. Done.</li>
-<li>Packages: SPAS running Gentoo's ebuilds on musl. Under way.</li>
-<li>The full image, a root built entirely with SPAS.</li>
-<li>The handbook: every step of installing by hand, on BIOS and on UEFI.</li>
-<li>Publish the source.</li>
-</ol>
-
-<p>X22, our X server, is a separate project with
-<a href="https://x22.chamesle.org/">its own site</a>.</p>
+<p>and write the fstab, the password and <code>limine.conf</code>. For a 32-bit machine there is
+<a href="download.html">chamesle-x86.iso</a>.</p>
<h2 id="questions">Questions</h2>
<dl>
-<dt>Is there an ISO to download?</dt>
-<dd>Yes, <a href="https://github.com/tortr-rs/system/releases/latest/download/chamesle.iso">chamesle.iso</a>. Anything older with Chamesle's name on it is the old distro,
-not this system.</dd>
<dt>Where is the code?</dt>
-<dd>There is no public source repo yet. The old Chamesle code is on
-<a href="https://github.com/tortr-rs/chamesle">GitHub</a>, and none of it is in the new system.
-<a href="source.html">Chamesle Source</a> is a side project with its own repo.</dd>
+<dd>On GitHub: <a href="https://github.com/tortr-rs/system">system</a> (init, tools, ISO, handbook),
+<a href="https://github.com/tortr-rs/mag">mag</a> and <a href="https://github.com/tortr-rs/rifle">rifle</a>.</dd>
+<dt>Where do the packages come from?</dt>
+<dd>Chamesle's own (the base, mag, rifle) from its repo. Everything else, the kernel included, from a large musl
+binary repo that mag reads as it is. <a href="packages.html">Packages</a> has more.</dd>
<dt>What license?</dt>
-<dd>Not decided. The packages SPAS builds keep their own licenses.</dd>
-<dt>No GNU at all?</dt>
-<dd>Nothing GNU is installed. A few GNU build tools (gmake, bison, flex, m4) are used while some packages are
-built, and they are not part of the system.</dd>
+<dd>Not decided. The packages keep their own licenses.</dd>
<dt>Why start over?</dt>
<dd>The old Chamesle was mostly other people's software with our paint on it. <a href="about.html">About</a> has
more.</dd>
@@ -126,15 +111,14 @@ more.</dd>
<div class="side">
<div class="sbox">
-<h3>Latest stage</h3>
-<div><span class="ver">2026-11-17</span><br>musl, x86_64</div>
+<h3>Latest ISO</h3>
+<div><span class="ver">2026-11-21</span><br>x86_64 and x86</div>
</div>
<div class="sbox">
<h3>Download</h3>
<ul>
-<li><a href="https://github.com/tortr-rs/chamesle/releases/download/stage-20261117/chamesle-stage-20261117.tar.xz">Base stage</a> (988 MB)</li>
-<li><a href="https://github.com/tortr-rs/chamesle/releases/download/stage-20261117/chamesle-stage-graphical-20261117.tar.xz">Graphical stage</a> (1.5 GB)</li>
-<li><a href="https://github.com/tortr-rs/system/releases/latest/download/chamesle.iso">Live ISO</a></li>
+<li><a href="https://github.com/tortr-rs/system/releases/latest/download/chamesle.iso">chamesle.iso</a> (x86_64)</li>
+<li><a href="https://github.com/tortr-rs/system/releases/latest/download/chamesle-x86.iso">chamesle-x86.iso</a> (32-bit)</li>
<li><a href="download.html">Checksums and more</a></li>
</ul>
</div>
@@ -143,14 +127,14 @@ more.</dd>
<ul>
<li><a href="docs.html">Handbook</a></li>
<li><a href="handbook-installing.html">Installing</a></li>
-<li><a href="handbook-spas.html">SPAS and hoard</a></li>
+<li><a href="handbook-mag.html">mag</a></li>
<li><a href="handbook-rifle.html">rifle</a></li>
</ul>
</div>
<div class="sbox">
<h3>Elsewhere</h3>
<ul>
-<li><a href="https://spas.chamesle.org/">SPAS</a></li>
+<li><a href="https://github.com/tortr-rs/mag">mag</a></li>
<li><a href="https://x22.chamesle.org/">X22</a></li>
<li><a href="chat.html">Chat</a> (#chamesle, Libera)</li>
<li><a href="https://ko-fi.com/L6N725GI1V">Ko-fi</a></li>
diff --git a/docs/new.html b/docs/new.html
@@ -32,7 +32,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
@@ -40,6 +40,17 @@
<h2>News</h2>
<p><i>Newest first. The home page has the latest.</i></p>
+<h2 id="2026-11-21">November 21, 2026: binary packages, and a bootstrap instead of a stage</h2>
+<p>Building everything on every machine was too slow, and a Pentium 4 with 256 MB would never get there. So nothing is
+built any more. <a href="https://github.com/tortr-rs/mag">mag</a> is back, rewritten as a binary package manager:
+one C file with its own inflate, tar, sha1, sha256 and RSA, that reads signed apk repos and checks every package
+before it unpacks it. The big musl repo it reads has about 28,000 packages for x86_64 and as many for 32-bit x86.</p>
+<p>The stage is gone too. <code>chamesle-bootstrap /mnt</code> installs the base with mag, like debootstrap, and you
+write the fstab and the boot entry by hand, as before. Chamesle's own packages, <code>chamesle-base</code> (Winchester
+and the tools), <code>mag</code> and <code>rifle</code>, are in our repo at <code>chamesle.org/repo</code>.</p>
+<p>There is a 32-bit ISO now as well as the x86_64 one. The <a href="docs.html">handbook</a> is rewritten for all of
+this. SPAS and hoard are retired.</p>
+
<h2 id="2026-11-16">November 16, 2026: ebuilds, and a name for the init</h2>
<p>Packages will come from Gentoo's ebuilds, run by <a href="https://spas.chamesle.org/">SPAS</a>, instead of pkgsrc and mag. mag could read pkgsrc, but
every package that built needed another fix, and we'd rather stand on something that already builds. SPAS now runs on
diff --git a/docs/packages.html b/docs/packages.html
@@ -4,12 +4,12 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Packages - Chamesle</title>
-<meta name="description" content="Chamesle packages are Gentoo ebuilds, built from source with SPAS.">
+<meta name="description" content="Chamesle packages are signed binary packages, installed with mag.">
<link rel="canonical" href="https://chamesle.org/packages.html">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Chamesle">
<meta property="og:title" content="Packages - Chamesle">
-<meta property="og:description" content="Chamesle packages are Gentoo ebuilds, built from source with hoard.">
+<meta property="og:description" content="Chamesle packages are signed binary packages, installed with mag.">
<meta property="og:url" content="https://chamesle.org/packages.html">
<link rel="stylesheet" href="style.css?19">
<link rel="icon" href="img/logo.png">
@@ -32,28 +32,34 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
<main>
<h2>Packages</h2>
-<p><i>Packages are Gentoo's ebuilds, built from source with SPAS.</i></p>
+<p><i>Binary packages, signed, installed with mag.</i></p>
-<p>The repo is Gentoo's, on the musl profile. <a href="https://spas.chamesle.org/">SPAS</a> is the package manager, and <code>hoard</code> is its command: it reads the ebuilds,
-resolves the dependencies, runs them in bash and merges the result. There are no binary packages yet.</p>
-<pre>hoard sync
-hoard install app-misc/fastfetch
-hoard remove fastfetch
-hoard upgrade
-hoard search word</pre>
+<p><a href="https://github.com/tortr-rs/mag">mag</a> is the package manager. It reads two repos: Chamesle's own,
+with <code>chamesle-base</code>, <code>mag</code> and <code>rifle</code>, and a large musl repo with everything else,
+about 28,000 packages for x86_64 and as many for 32-bit x86. Every index and every package is checked against the
+keys in <code>/etc/mag/keys</code> before anything is unpacked.</p>
+<pre>mag update
+mag install tmux
+mag remove tmux
+mag upgrade
+mag search word</pre>
-<p>We started on pkgsrc with our own package manager, mag. It kept breaking on small things, one package after
-another, so we're moving to ebuilds. This is still being set up: a first dry run on Chamesle reads the tree and resolves
-dependencies, and the builds are what's being worked on.</p>
+<p>Before this, mag built from pkgsrc, then SPAS ran Gentoo's ebuilds. Both meant compiling for hours on every
+machine, so now nothing is built at all.</p>
+
+<h2>Chamesle's repo</h2>
+<p><code>https://chamesle.org/repo</code>, for <code>x86_64</code> and <code>x86</code>. The packages are made with
+<code>mkapk</code> and <code>mkrepo</code> from <a href="https://github.com/tortr-rs/system">system</a>, and signed
+with <code>chamesle-20261118.rsa</code>.</p>
<h2>Missing something?</h2>
-<p>If Gentoo has it, SPAS can usually build it. If it doesn't build, tell us on the <a href="board.html">board</a>.</p>
+<p><code>mag search</code> first. If it is not there, tell us on the <a href="board.html">board</a>.</p>
</main>
<hr>
diff --git a/docs/post.html b/docs/post.html
@@ -26,7 +26,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
diff --git a/docs/repo/chamesle-20261118.rsa.pub b/docs/repo/chamesle-20261118.rsa.pub
@@ -0,0 +1,14 @@
+-----BEGIN PUBLIC KEY-----
+MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAuk2uLeY5FngV5mLZiodA
+aHWxmSQFqIM8WVQY1gZDYoyOWx5+/xPPqgoMxOHaAyXL9pKF/HNcOb9zUAszy0Ix
+9szZhnGVTvfN5gyEsU3ybTPuYlnAe3FH3ywhNx4pkDhds7OTiMJwXrZyWp9YpcJI
+h8hHoZkQOCzZN1rBdn8+Gi6bEqLq3dl3E8IyC24+jELkzqIF40M79Pnj5ERjRMJw
+0NtIMOxhk4ZT1uFTiGEy6NZWAq1PZyTQCz8kwtvwNOYCwQCR94+61i2ZxSL+a3CN
+l6TWaG9WiUc+Vh0kce/JYY0/HyTASuZ71SRMQ9rUzSvym4iPEavx+4SPerEzP/BO
+0GrjaKXXBYzdZNnBU8YsJ4qjg28l0MtSdAyZoswIq5NQhK9f2ZJbTCk+jqMuLAz1
+ROwCEsk7KVEaN0K/9hCAf/eARR1U08VsJDuY/z6ONh9PLZBq+Sz4LmUcOlBIGk0m
+A/SDBZC9gTMp4VL02NbxlNL7w+PPSDZpKleXcPLbp1wzrS/lVrVNGcHv8J4Zo0nl
+I30J7orkJrxwafAr4ZgNsCrjkOoIzgfm9XKwLRa15qKTBCyt29LnvHyC3NsRjLqS
+Jisr0ErACvrt1d/8mz6G/8Es4vVAG5Q9xenu9gwanPdHcobZlBRYQzjRA0Yy9LRw
+JOQHLEmPe7pXmMydSWR660ECAwEAAQ==
+-----END PUBLIC KEY-----
diff --git a/docs/repo/x86/APKINDEX.tar.gz b/docs/repo/x86/APKINDEX.tar.gz
Binary files differ.
diff --git a/docs/repo/x86/chamesle-base-20261121-r8.apk b/docs/repo/x86/chamesle-base-20261121-r8.apk
Binary files differ.
diff --git a/docs/repo/x86/mag-0.3.apk b/docs/repo/x86/mag-0.3.apk
Binary files differ.
diff --git a/docs/repo/x86_64/APKINDEX.tar.gz b/docs/repo/x86_64/APKINDEX.tar.gz
Binary files differ.
diff --git a/docs/repo/x86_64/chamesle-base-20261121-r8.apk b/docs/repo/x86_64/chamesle-base-20261121-r8.apk
Binary files differ.
diff --git a/docs/repo/x86_64/mag-0.3.apk b/docs/repo/x86_64/mag-0.3.apk
Binary files differ.
diff --git a/docs/repo/x86_64/rifle-0.2.apk b/docs/repo/x86_64/rifle-0.2.apk
Binary files differ.
diff --git a/docs/sitemap.xml b/docs/sitemap.xml
@@ -6,7 +6,7 @@
<url><loc>https://chamesle.org/handbook-about.html</loc><lastmod>2026-11-18</lastmod></url>
<url><loc>https://chamesle.org/handbook-preparing.html</loc><lastmod>2026-11-18</lastmod></url>
<url><loc>https://chamesle.org/handbook-installing.html</loc><lastmod>2026-11-18</lastmod></url>
- <url><loc>https://chamesle.org/handbook-spas.html</loc><lastmod>2026-11-18</lastmod></url>
+ <url><loc>https://chamesle.org/handbook-mag.html</loc><lastmod>2026-11-18</lastmod></url>
<url><loc>https://chamesle.org/handbook-rifle.html</loc><lastmod>2026-11-18</lastmod></url>
<url><loc>https://chamesle.org/handbook-base.html</loc><lastmod>2026-11-18</lastmod></url>
<url><loc>https://chamesle.org/handbook-kernel.html</loc><lastmod>2026-11-18</lastmod></url>
diff --git a/docs/source.html b/docs/source.html
@@ -32,7 +32,7 @@
<a href="chat.html">Chat</a> |
<b>Source</b> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>
diff --git a/docs/submit.html b/docs/submit.html
@@ -26,7 +26,7 @@
<a href="chat.html">Chat</a> |
<a href="source.html">Source</a> |
<a href="https://x22.chamesle.org/">X22</a> |
-<a href="https://spas.chamesle.org/">SPAS</a> |
+<a href="https://github.com/tortr-rs/mag">mag</a> |
<a href="about.html">About</a>
</div>