Runway 1.0.1

This commit is contained in:
Runway committed 2026-10-21 13:49:47 -06:00
1 parent dcf819146b
commit ce217fc952
259 files changed
+22226 -206

No files matched your search

+10 -2
View File
@@ -326,7 +326,7 @@ Options:
--memory-max SIZE Set a systemd MemoryMax cgroup backstop, e.g. 3g / 1945M (drop-in 10-memory.conf). Keep it
>= the heap + headroom (~max(0.5G, 25% of -Xmx)). Omit to leave it as-is.
--update-essential-plugins
Accepted and ignored, so existing runbooks keep working: since 1.0.0-rc1 every
Accepted and ignored, so existing runbooks keep working: every
upgrade does what it used to ask for (below).
--dry-run Print every privileged action instead of doing it.
-h, --help This help.
@@ -361,7 +361,7 @@ while [ $# -gt 0 ]; do
--secret-key) SECRET_KEY="${2:?}"; shift 2 ;;
-y|--yes|--non-interactive) INTERACTIVE="no"; shift ;;
--update-essential-plugins)
# Kept so pre-rc1 runbooks still run; the refresh it used to opt into is now every upgrade's.
# Kept so older runbooks still run; the refresh it used to opt into is now every upgrade's.
log "--update-essential-plugins: nothing to do — every upgrade refreshes the bundled plugins now"
shift ;;
--heap) HEAP_MAX="${2:?}"; shift 2 ;;
@@ -534,6 +534,14 @@ run cp -f "$JAR_SRC" "$DEST/bin/"
run cp -f "$BUNDLE/bin/runway.sh" "$DEST/bin/runway.sh"
run cp -f "$BUNDLE"/scripts/* "$DEST/scripts/" 2>/dev/null || true
run chmod 0755 "$DEST/bin/runway.sh" "$DEST/scripts/install.sh"
# The license, the plugin permission and the third-party notices travel with each installed release, so the
# installed system carries its terms (the jars carry them too, under META-INF/). Skipped when the installer runs from
# an installed release, whose bundle IS $DEST.
if [ "$(readlink -m "$BUNDLE")" != "$(readlink -m "$DEST")" ]; then
for f in LICENSE LICENSE-EXCEPTION THIRD-PARTY-NOTICES; do
if [ -f "$BUNDLE/$f" ]; then run cp -f "$BUNDLE/$f" "$DEST/$f"; fi
done
fi
# The bundled plugins stay in the release too (seed/plugins/<id>/), so repairing the essential plugin needs no .bin:
# when external/plugins/<id> is not the running release's copy (a hand-copied kernel jar, a hand edit), the kernel's
# fail-closed message says to copy $LINK/seed/plugins/<id>/ over it. After a rollback the symlink names the older
+3 -3
View File
@@ -63,9 +63,9 @@ payload="$work/payload.tar.gz"
# "the tree holds what we shipped" invariant quietly stopped holding for the plugin artifacts.
#
# The instant is the cut's, and there is ONE copy of it: the reactor pom's project.build.outputTimestamp, which also
# stamps every jar entry. The Maven build passes it in as BUILD_TIMESTAMP; a hand run reads it from the pom. (Until
# 0.5.0-beta14 this script kept its own hand-edited default, so a cut that bumped only one of the two still built
# reproducibly — building twice cannot catch it — but shipped a jar and a .bin claiming different instants.)
# stamps every jar entry. The Maven build passes it in as BUILD_TIMESTAMP; a hand run reads it from the pom. (A second,
# hand-edited default in this script would let a cut that bumped only one of the two still build
# reproducibly — building twice cannot catch it — but ship a jar and a .bin claiming different instants.)
# SOURCE_DATE_EPOCH, the reproducible-builds convention, still wins when set. An instant that cannot be read is an
# error, never a silent fallback: a fallback is how the two copies drifted.
if [ -z "${SOURCE_DATE_EPOCH:-}" ] && [ -z "${BUILD_TIMESTAMP:-}" ]; then
+8 -8
View File
@@ -3,8 +3,8 @@
#
# The question this file exists to answer correctly: when an upgrade finds that a plugin's template or i18n
# file differs from the one being installed, WHO changed it? Comparing the installed copy with the incoming
# one cannot say — a difference means only "not the new version". Until 0.5.0-beta14 the installer guessed
# "the operator", backed the file up and said so, and it was wrong every time the change was ours: hashing the
# one cannot say — a difference means only "not the new version". An installer that guesses
# "the operator", backs the file up and says so is wrong every time the change was ours: hashing the
# files before two upgrades proved the "operator edits" were the previous shipped versions.
#
# So the installer now remembers what it laid down. A SHIPPED-MANIFEST per plugin records the SHA-256 of
@@ -61,9 +61,9 @@ _ps_write_manifest() {
# opt-in any more. The bundled plugins are the essential ones (today: protection), and an essential plugin is
# lockstep with the kernel: it is the one plugin allowed to link kernel internals, and its descriptor names the
# kernel's SPI level. An old copy beside a new kernel is refused — the essential plugin blocked puts the platform in
# fail-closed mode, every tenant page 503 — or crashes on a missing class. Until 1.0.0-rc1 the refresh needed
# --update-essential-plugins, and an upgrade run without it left the old copy in place; with SPI 1.0.0's mandatory
# floor that became a 503 on every site, so the refresh is part of every upgrade. What makes
# fail-closed mode, every tenant page 503 — or crashes on a missing class. An upgrade that left
# the old copy in place would, with SPI 1.0.0's mandatory floor, mean a 503 on every site, so the refresh is part
# of every upgrade. What makes
# "always" safe is what the refresh keeps:
# - the previous jar and plugin.yml as <name>.bak (written only when the file changes) — the rollback pair;
# - a template/i18n file the operator edited, as <name>.operator-backup-<stamp>, with a warning naming it;
@@ -93,7 +93,7 @@ seed_bundled_plugins() {
# The previous jar AND descriptor are kept as <name>.bak: they are what a ROLLBACK needs. The refreshed
# folder outlives the kernel it came with (external/ is version-independent), so flipping /opt/runway
# back to an older release puts that kernel in front of the new jar — which may link SPI types the old
# kernel lacks (0.5.0-beta14's protection 1.5.0 did: beta13 failed to start). Restoring both .bak files
# kernel lacks. Restoring both .bak files
# is the rollback step. The descriptor matters as much as the jar: it carries the requiresSpi floor, so
# the new descriptor beside the old jar would get the old jar refused.
# Backed up only when the file actually changes, so re-running the same installer (it is idempotent)
@@ -113,8 +113,8 @@ seed_bundled_plugins() {
done
[ -d "$pdir/lib" ] && { run mkdir -p "$pdst/lib"; run cp -a "$pdir/lib/." "$pdst/lib/"; }
# Templates and i18n too: an essential plugin's SCREENS ship in these files, so skipping them would
# mean a release that adds a panel never reaches an upgraded install (0.5.0-beta10's "Recently ended
# blocks" did exactly that — no error, just a feature that was not there).
# mean a release that adds a panel never reaches an upgraded install — no error, just a
# feature that is not there.
for sub in templates i18n; do
[ -d "$pdir/$sub" ] || continue
run mkdir -p "$pdst/$sub"
+4 -6
View File
@@ -2,11 +2,9 @@
# also sourced on its own by test-release-notes.sh, which is why it defines functions and runs nothing at load time.
#
# Why this is a gate and not a convenience. The release body IS the upgrade notes an operator reads
# before upgrading. beta10 shipped with none (the body said "See CHANGELOG.md"), so the notes now come from the
# CHANGELOG section keyed by the version. That made a MISSING section impossible, but not a section WITHOUT the
# part an operator acts on: in 0.5.0-beta14 the [Unreleased] section — 47 KB of entries — had no
# "Upgrading — read this first" at all, while the development guide claimed the publish script refused exactly
# that. It did not. Now it does: the section must open with that heading, the way every release since beta10 has.
# before upgrading, so the notes come from the CHANGELOG section keyed by the version. That makes a MISSING
# section impossible, but not a section WITHOUT the part an operator acts on, so the section must also open with
# the "Upgrading — read this first" heading.
# The heading every release section must open with (its first "### " heading). Part of the CHANGELOG contract.
RELEASE_NOTES_UPGRADING_HEADING="### Upgrading — read this first"
@@ -36,7 +34,7 @@ release_notes_check() {
if [ -z "$notes" ]; then
echo "refusing to publish: CHANGELOG.md has no '## [${version}]' section (or it is empty)." >&2
echo " The release body IS the upgrade notes — write the section first (flip [Unreleased] to" >&2
echo " [${version}]), then re-run. beta10 shipped with no notes because nothing enforced this." >&2
echo " [${version}]), then re-run." >&2
return 1
fi
first="$(printf '%s\n' "$notes" | grep -m1 '^### ' || true)"
+13 -2
View File
@@ -6,8 +6,8 @@
# Why: the installer writes application.yml WHOLE when --port N (N != 8080) or --tls-keystore is given. On a first
# install that is the point; on an existing one the file also holds the setup wizard's application-superadmin pin
# (runway.security.app-master-id) and whatever the operator added (CSP keys, ...), so a re-run with the flags from
# the first install silently dropped the pin and the platform booted back into wizard mode, /setup open to anyone
# (fixed in 1.0.0-rc1). Those flags are now first-install only: refused, before any change, on an existing install.
# the first install would silently drop the pin and the platform would boot back into wizard mode, /setup open to
# anyone. Those flags are therefore first-install only: refused, before any change, on an existing install.
# The real installer runs in --dry-run (no root needed), so its printed plan and its exit status are the evidence;
# the write function's own guard (the backstop) is exercised directly, non-dry, as the defect was reproduced.
set -euo pipefail
@@ -144,5 +144,16 @@ check "9: ... and over a unit without it (8080 behind a proxy) adds nothing" '[
grep -q '^#[[:space:]]*AmbientCapabilities=CAP_NET_BIND_SERVICE' "$HERE/runway.service" && pass \
|| fail "9: the unit template ships the capability commented (the check above depends on it)"
# --- 10. The license files go into the installed release, and a bundle without them still installs ------------
L="$ROOT/licensed"
for f in LICENSE LICENSE-EXCEPTION THIRD-PARTY-NOTICES; do printf '%s' "$f" > "$B/$f"; done
install_dry "$L"
for f in LICENSE LICENSE-EXCEPTION THIRD-PARTY-NOTICES; do
check "10: the release gets $f" '[ "$RC" -eq 0 ] && grep -qF "+ cp -f $B/$f $L/runway-" "$OUT"'
done
rm -f "$B/LICENSE" "$B/LICENSE-EXCEPTION" "$B/THIRD-PARTY-NOTICES"
install_dry "$ROOT/unlicensed"
check "10: a bundle without the license files installs and copies none" '[ "$RC" -eq 0 ] && ! grep -q "LICENSE" "$OUT"'
printf 'install-config: %d passed, %d failed\n' "$PASSES" "$FAILS"
[ "$FAILS" -eq 0 ]
+6 -6
View File
@@ -98,8 +98,8 @@ check "5: dry run changes nothing on disk" 'diff -r "$ROOT/c5-before" "$D" > /de
check "5: a new file is installed without a warning" '[ -f "$D/external/plugins/protection/i18n/messages_fr.properties" ] && ! grep -q WARNING "$OUT"'
check "5: a file the operator never had is in the new manifest" '[ -n "$(_ps_manifest_hash "$D/external/plugin-manifests/protection.sha256" "i18n/messages_fr.properties")" ]'
# --- 6. Every upgrade refreshes an existing essential plugin — no flag (the 1.0.0-rc1 blocker) ----------------
# Until rc1 an upgrade without --update-essential-plugins left the old protection in place; on SPI 1.0.0 an old
# --- 6. Every upgrade refreshes an existing essential plugin — no flag ---------------------------------------
# An upgrade that left the old protection in place would take the platform down: on SPI 1.0.0 an old
# descriptor (no requiresSpi) is blocked, and a blocked essential plugin makes every tenant page answer 503. So the
# old copy here is exactly that shape — no requiresSpi, and hand-disabled — and the upgrade must replace it.
D="$ROOT/c6"; P="$D/external/plugins/protection"; : > "$OUT"
@@ -123,7 +123,7 @@ check "6: the old 'leaving it as-is' path is gone" '! grep -q "leaving it as-is"
# --- 7. The previous jar AND descriptor are kept for a rollback, and a re-run never overwrites them -----------
# A rollback is a symlink flip back to the older kernel, which then meets the refreshed plugin folder. The new jar
# may link SPI types that kernel lacks (beta14's protection did: beta13 died on NoClassDefFoundError), and the new
# may link SPI types that kernel lacks (an older kernel then dies on NoClassDefFoundError), and the new
# descriptor carries a requiresSpi floor that refuses the old jar, so the rollback restores BOTH .bak files.
D="$ROOT/c7"; P="$D/external/plugins/protection"; : > "$OUT"
bundle "$ROOT/b1" v1; seed_bundled_plugins "$ROOT/b1" "$D"
@@ -182,9 +182,9 @@ bash "$B/scripts/install.sh" --help > "$INSTALL_OUT" 2>&1 || true
check "9: --help no longer offers the flag as an opt-in" 'grep -q "Accepted and ignored" "$INSTALL_OUT" && grep -q "ALWAYS refreshed" "$INSTALL_OUT" && ! grep -q "plugins are never touched on upgrade" "$INSTALL_OUT"'
# --- 10. install.sh keeps the bundle's seed/ in the release, the repair copy the kernel's message points at ------
# A refused essential plugin's fix is the running release's copy; before 1.0.0-rc1 that copy lived only inside the
# .bin, so the operator had to find and extract it. The installer now lays seed/ into <prefix>/runway-<version>/,
# replaced whole (no stale file, no seed/seed nesting on a re-run), before the release is chowned and relabeled.
# A refused essential plugin's fix is the running release's copy; were that copy only inside the .bin, the operator
# would have to find and extract it. The installer therefore lays seed/ into <prefix>/runway-<version>/, replaced
# whole (no stale file, no seed/seed nesting on a re-run), before the release is chowned and relabeled.
# Reuses case 9's bundle and prefix; dry run, so the printed plan is the evidence.
DEST9="$PREFIX9/runway-9.9.9"
if install_dry; then pass; else fail "10: install.sh exits 0"; sed 's/^/ | /' "$INSTALL_OUT" >&2; fi
+2 -2
View File
@@ -4,8 +4,8 @@
# it in its test phase next to test-plugin-seed.sh (skipped with -DskipTests). Exit status 0 = all passed.
#
# The defect it guards against: the development guide said publishing refused a release section with no
# "Upgrading — read this first" part, and the script only refused a MISSING section — so the 0.5.0-beta14 notes
# came within one cut of shipping without any operator steps.
# "Upgrading — read this first" part, and the script only refused a MISSING section — so a release's notes
# could ship without any operator steps.
set -euo pipefail
HERE="$(dirname "$(readlink -f "$0")")"