diff options
| author | Philip J Freeman <elektron@halo.nu> | 2025-05-31 12:34:14 -0700 |
|---|---|---|
| committer | Philip J Freeman <elektron@halo.nu> | 2025-05-31 15:47:31 -0700 |
| commit | 34105077c777b0d2c5c69f39921f376b84ce1443 (patch) | |
| tree | 606152d6f739a0ee7fd8e5127e79b595f3fe8c85 /publish-repo | |
| parent | 5392080129b1093f36533e47c155f618c283ea57 (diff) | |
Deploying a demo amd64 debian-based OS via ostree
This is a prototype outline for building and deploying a debian based OS
with ostree. For purposes of demonstration, the OS runs from a bootable
USB device on a UEFI capable amd64 machine. Once a USB device is
created and booted, the OS can be updated using a simple shell script.
<https://ostreedev.github.io/ostree/>
<https://www.nin.wiki/Halo_numbers>
Diffstat (limited to 'publish-repo')
| -rwxr-xr-x | publish-repo | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/publish-repo b/publish-repo new file mode 100755 index 0000000..d4ece7c --- /dev/null +++ b/publish-repo @@ -0,0 +1,23 @@ +#!/bin/bash -xe + +set -o pipefail + +. config + +version="$(find "$roots" -mindepth 1 -maxdepth 1 -type d | cut -d/ -f2 | sort -rn | head -1)" + +[ ! -d "$repo" ] && ostree --repo="$repo" init --mode=archive + +REF=$(ostree --repo="$build_repo" rev-parse "$branch") + +ostree --repo="$repo" pull-local "$build_repo" "$REF" + +ostree --repo="$repo" commit -b "$branch" \ + -s "$osname/$osversion:($osdesc) $branch $version" \ + --add-metadata-string=version="$branch":"$version" \ + --gpg-sign=CE4A0BF21E1C237DD8C400FAA39487B22697143F \ + --tree=ref="$REF" + +ostree --repo="$repo" static-delta generate "$branch" || echo "Warning: static-delta generate failed" >&2 + +ostree --repo="$repo" summary -u |
