diff --git a/scripts/release.sh b/scripts/release.sh index 081715c..9d0db1b 100644 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -392,15 +392,60 @@ fi # The release notes: releases/v/notes.md when the release carries # one (staged beside the assets, not uploaded as one), GitHub's generated -# notes otherwise. -NOTES_OPT="--generate-notes" +# notes appended otherwise. +# +# Every release ends with the same Installation Information block. GPLv3 +# section 6 asks that it be provided WITH the object code, not merely be +# possible, and the release page is where the object code is conveyed. The +# source bundle's README carries the same text for the source route. +NOTES_OPT="--notes-file notes.md" if [ -f "$REPO/releases/v$VERSION/notes.md" ]; then cp "$REPO/releases/v$VERSION/notes.md" "$STAGE/notes.md" - NOTES_OPT="--notes-file notes.md" echo "notes: releases/v$VERSION/notes.md" else - rm -f "$STAGE/notes.md" - echo "notes: generated by GitHub" + # No hand-written notes: GitHub's generated changelog carries the release, + # and gh appends it to the body the notes file provides. + printf 'ForgeFIRM v%s. Installation, usage, and safety are documented at\nhttps://docs.forgefirm.org/.\n' \ + "$VERSION" > "$STAGE/notes.md" + NOTES_OPT="$NOTES_OPT --generate-notes" + echo "notes: generated by GitHub, with the installation block" +fi +cat >> "$STAGE/notes.md" <<'EOF' + +## Installing your own build + +This is the Installation Information that GPLv3 section 6 asks for. The +machine runs firmware you built yourself, and no key is needed to install it. + +- **From the control panel.** Upload the `.fw` on the System tab. An archive + no key on the machine verifies is reported as unsigned and installs when + you hold the machine button while confirming it. +- **From a root shell.** The serial console gives a root shell with no + password, and `fwup` is stock upstream. Write the archive to the slot the + machine is not running from and select it: + `fwup -a -d /dev/mmcblk2p2 -i my-build.fw -t upgrade.b` then `ffboot b` + (`upgrade.a` writes slot A, `/dev/mmcblk2p1`; `ffboot -l` says which slot + is running). +- **From an SD card.** Write `forgefirm-image-glowforge.rootfs.wic.gz` to a + card and boot from it. + +The trust anchor is replaceable: `/etc/forgefirm/keys` holds public keys only, +as ordinary world-readable files. Put your own public key in +`forgefirm-release.pub` and the automatic paths verify against your key +instead; sign your builds with `fwup -S` and they install with no button held. + +Full instructions: . +Building the image is documented at +. +EOF +# Only a release that carries the source bundle may point at it. The +# no-source path cannot be published at all, but its staged notes must not +# claim an asset that is not there either. +if [ "$SOURCE_BUNDLE" = 1 ]; then + cat >> "$STAGE/notes.md" <<'EOF' +The source of everything in this image is the `forgefirm-source-v*.tar.gz` +asset on this release. +EOF fi cat <