Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,15 @@ jobs:
# One release, both roots: its index pins each root's manifest, the board picks by architecture.
python -m orchard.image.publish --distro minimal-linux --tag "$TAG" \
--release-dir out/release --release-dir out/release-armv7 --output out/publication
# install.sh: installs the orchard command and runs `orchard install` for this release.
# install.sh: tools' one distribution script, stamped for this release (no
# installer window here, so the terminal): installs orchard, then this release.
base="https://github.com/$GITHUB_REPOSITORY/releases/download/$TAG"
python .orchard/producers/install_script.py --name 'Minimal Linux' --index "$base/index.toml" --url "$base/install.sh" \
--output out/publication/install.sh
tools=https://github.com/OrchardLinux/tools/releases/latest/download
mkdir -p out/stamp
timeout 60 curl -fsSL --retry 3 -o out/stamp/stamp.py "$tools/stamp.py"
timeout 60 curl -fsSL --retry 3 -o out/stamp/install-template.sh "$tools/install-template.sh"
python3 -I out/stamp/stamp.py --script-only --out out/publication --name 'Minimal Linux' \
--release '' --index "$base/index.toml" --url "$base/install.sh"
cp out/release/rootfs.json out/release/build-receipt.json out/base/* out/publication/
cp out/release-armv7/rootfs.json out/publication/rootfs-armv7.json
cp out/release-armv7/build-receipt.json out/publication/build-receipt-armv7.json
Expand Down
7 changes: 5 additions & 2 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,11 @@ python3 build.py --base out/base/base.tar.gz --base-receipt out/base/base.tar.gz
--version YOUR_NEW_VERSION --output out/releases/YOUR_NEW_VERSION
python3 audit.py out/releases/YOUR_NEW_VERSION --orchard "$ORCHARD"
python3 -m orchard.manifests --verify-local out/releases/YOUR_NEW_VERSION/index.toml
python3 "$ORCHARD/producers/install_script.py" --name 'Minimal Linux' --index index.toml --url install.sh \
--output out/releases/YOUR_NEW_VERSION/install.sh
# install.sh: tools' distribution script, stamped by stamp.py from the latest tools release
tools=https://github.com/OrchardLinux/tools/releases/latest/download
curl -fsSLO "$tools/stamp.py" && curl -fsSLO "$tools/install-template.sh"
python3 -I stamp.py --script-only --out out/releases/YOUR_NEW_VERSION --name 'Minimal Linux' \
--release '' --index index.toml --url install.sh
```

`orchard.inputs` takes the nightly's kernels, m1n1 and tools when they were
Expand Down
14 changes: 11 additions & 3 deletions tools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,17 @@ def main():
'--inputs', inputs / 'inputs.json', '--orchard-inputs', resolved, '--orchard', orchard,
'--version', args.version, '--output', args.output)
python('audit.py', args.output, '--orchard', orchard)
# install.sh: installs the orchard command and runs `orchard install` for the index beside it.
python(orchard / 'producers/install_script.py', '--name', 'Minimal Linux', '--index', 'index.toml', '--url', 'install.sh',
'--output', Path(args.output) / 'install.sh')
# install.sh: tools' one distribution script (terminal: no installer window
# here), stamped by tools' stamp.py from its latest release; it installs
# orchard, then the index beside it.
with tempfile.TemporaryDirectory(prefix='minimal-stamp-') as stamp:
tools = 'https://github.com/OrchardLinux/tools/releases/latest/download'
for name in ('stamp.py', 'install-template.sh'):
subprocess.run(['curl', '-fsSL', '--retry', '3', '--max-time', '60', '-o', str(Path(stamp) / name),
f'{tools}/{name}'], check=True)
subprocess.run([sys.executable, '-I', str(Path(stamp) / 'stamp.py'), '--script-only', '--out', str(args.output),
'--name', 'Minimal Linux', '--release', '', '--index', 'index.toml', '--url', 'install.sh'],
check=True)


if __name__ == '__main__':
Expand Down
Loading