diff --git a/Makefile b/Makefile index 86eb8ca38b..f2f575715d 100644 --- a/Makefile +++ b/Makefile @@ -111,15 +111,12 @@ sourcesets: tools/srctree-stage.sh $(SRCSTAGE) $(BUILD_SH) -V MAKROSRCDIR=$(SRCSTAGE) sourcesets -# The DVD that carries the source sets too (distrib/common/Makefile.bootcd: -# CDSOURCE copies RELEASEDIR/source onto the medium). A CD does not hold them, -# and upstream skips the CD when CDSOURCE is defined (distrib/amd64/cdroms/ -# Makefile), so this writes the DVD only, over the one `make iso' made. -# Run `make release ARCH=...' and `make sourcesets' first. +# The source DVD on its own: source/sets/src.tgz, MD5, SHA512 and a README +# (tools/cd-source.sh). The install DVD and the CDs carry no sources; the +# installer asks for this disc when the full profile wants them. +# Run `make sourcesets' first. isosrc: - @tools/build-stamp.sh -c - tools/cd3.sh stage - $(BUILD_SH) -V CDSOURCE=true iso-image + tools/cd-source.sh # The pkgsrc userland (packages.list): the makronix set and the media's # repository, cross or native as the host is (tools/userland.sh). diff --git a/docs/OFFLINE-BUILD.md b/docs/OFFLINE-BUILD.md index 40db1692dd..445b43df09 100644 --- a/docs/OFFLINE-BUILD.md +++ b/docs/OFFLINE-BUILD.md @@ -19,11 +19,13 @@ not the history: no `.git` anywhere, no `build/`, and of `refs/` only `refs/AGENTS.md` (the reference checkouts are not build inputs). `tools/makronix-pins.sh check` compares `PINS` with the repositories. -The set is one `.tgz` (`makesrctars`). `make isosrc` writes the DVD with -`RELEASEDIR/source` on it (`CDSOURCE`, `distrib/common/Makefile.bootcd`); the -CD does not carry it. sysinst installs the source set when the medium carries -it and the installation asks for it (the simple mode selects it by default; a -medium without the set installs no sources). The size is measured below. +The set is one `.tgz` (`makesrctars`). It has its own DVD: +`make isosrc` writes `RELEASEDIR/images/Makronix--amd64-source.iso` +with `source/sets/src.tgz`, `MD5`, `SHA512` and a `README` that names the +commands (`tools/cd-source.sh`). The install DVD and the CDs do not carry +the sources. The installer asks for the source DVD when the chosen profile +includes the sources (the full profile) and the disc in the drive is not it; +the sources unpack to `/usr/src`. ## Which distfiles @@ -65,9 +67,9 @@ log) `RELEASEDIR/source/sets/src.tgz` written, 5.5 GB; size and hashes are in `build/logs/sourcesets-2026-11-15.log` and `RELEASEDIR/source/sets/SHA512`. The target removed the sets of the old layout before it wrote. -- Not a single-layer DVD: 5.5 GB fits a dual-layer DVD (8.5 GB) together - with the install sets, not a DVD-5. The old split sets were 5.6 GB - together, so this is not bigger than before. +- Not a single-layer DVD: 5.5 GB needs a dual-layer DVD (8.5 GB), and it has + that medium for itself (the install media carry no sources). The old split + sets were 5.6 GB together, so this is not bigger than before. - Not proven: an installation from this set and `make release` inside it (that is `tasksd t0050`). diff --git a/tools/cd-source.sh b/tools/cd-source.sh new file mode 100755 index 0000000000..5bc7df715a --- /dev/null +++ b/tools/cd-source.sh @@ -0,0 +1,79 @@ +#!/bin/sh +# License: CNCL 1.0 (Could Not Care Less), see LICENSE at the top of the tree. +# cd-source.sh -- the source DVD: the one source set, on its own medium. +# +# usage: cd-source.sh +# +# The install DVD carries the system and the programs; the sources are their +# own DVD (Konrad, 2026-11-15). It is a data DVD, ISO 9660 with Rock Ridge, +# made with the build's own makefs (nbmakefs), the way the other media are +# made (distrib/common/Makefile.bootcd), and has the layout the installer +# would look for on a source medium: +# +# source/sets/src.tgz MD5 SHA512 the one set, unpacked to /usr/src +# README the commands to install it +# +# Written to RELEASEDIR/images/Makronix--amd64-source.iso. Run by +# `make isosrc' after `make sourcesets'. The set is 5.5 GB (2026-11-15), so +# the medium is a dual-layer DVD (8.5 GB), not a DVD-5. + +set -eu + +TOP=$(cd "$(dirname "$0")/.." && pwd) +OBJ=$TOP/build/obj +REL=$OBJ/releasedir +SETS=$REL/source/sets +STAGE=$TOP/build/cdsource +VER=$(cat "$TOP/src/sys/conf/makronix-release") + +die() +{ + echo "cd-source: $*" >&2 + exit 1 +} + +MAKEFS=$(ls "$OBJ"/tooldir.*/bin/nbmakefs 2>/dev/null | head -1) +[ -x "$MAKEFS" ] || die "no nbmakefs in $OBJ/tooldir.*/bin" +[ -f "$SETS/src.tgz" ] || die "no $SETS/src.tgz (make sourcesets first)" +[ -f "$SETS/MD5" ] || die "no $SETS/MD5 (make sourcesets first)" +[ -f "$SETS/SHA512" ] || die "no $SETS/SHA512 (make sourcesets first)" + +rm -rf "$STAGE" +mkdir -p "$STAGE/source/sets" +ln "$SETS/src.tgz" "$STAGE/source/sets/src.tgz" 2>/dev/null \ + || cp -p "$SETS/src.tgz" "$STAGE/source/sets/src.tgz" +cp -p "$SETS/MD5" "$SETS/SHA512" "$STAGE/source/sets/" + +cat > "$STAGE/README" <