Skip to content

Commit

Permalink
feat: make this repo ready to be used as a template
Browse files Browse the repository at this point in the history
  • Loading branch information
xynydev committed Aug 11, 2024
1 parent 5e37e3a commit bd9066d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 37 deletions.
34 changes: 11 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,43 +1,31 @@
# vanillin   [![build-ublue](https://github.com/xynydev/vanillin/actions/workflows/build.yml/badge.svg)](https://github.com/xynydev/vanillin/actions/workflows/build.yml)
# BlueBuild VanillaOS Testing   [![build-ublue](https://github.com/xynydev/vanillin/actions/workflows/build.yml/badge.svg)](https://github.com/xynydev/vanillin/actions/workflows/build.yml)

See the [BlueBuild docs](https://blue-build.org/how-to/setup/) for quick setup instructions for setting up your own repository based on this template.
This is a template / testing ground for building custom images based on VanillaOS using BlueBuild.

After setup, it is recommended you update this README to describe your custom image.
To use this, generate a new repo based on the template. To make the builds not fail at the signing steps, follow the instructions here: https://blue-build.org/how-to/cosign/ (you can install `skopeo` on Vanilla with `sudo apt install skopeo`).

## Installation

> **Warning**
> [This is an experimental feature](https://www.fedoraproject.org/wiki/Changes/OstreeNativeContainerStable), try at your own discretion.
To rebase an existing VanillaOS installation to the latest build:

To rebase an existing atomic Fedora installation to the latest build:

- First rebase to the unsigned image, to get the proper signing keys and policies installed:
```
rpm-ostree rebase ostree-unverified-registry:ghcr.io/xynydev/vanillin:latest
```
- Reboot to complete the rebase:
```
systemctl reboot
- First change your base image to the custom image:
```
- Then rebase to the signed image, like so:
IMAGE=xynydev/vanillin # change this
host-shell -- run0 bash -c "jq -r '.name |= \"$IMAGE\"' /etc/abroot/abroot.json > /etc/abroot/abroot_tmp.json && mv /etc/abroot/abroot_tmp.json /etc/abroot/abroot.json"
```
rpm-ostree rebase ostree-image-signed:docker://ghcr.io/xynydev/vanillin:latest
- Upgrade and reboot to complete the installation:
```
- Reboot again to complete the installation
```
systemctl reboot
abroot upgrade
host-shell -- systemctl reboot
```

The `latest` tag will automatically point to the latest build. That build will still always use the Fedora version specified in `recipe.yml`, so you won't get accidentally updated to the next major version.

## ISO

If build on Fedora Atomic, you can generate an offline ISO with the instructions available [here](https://blue-build.org/learn/universal-blue/#fresh-install-from-an-iso). These ISOs cannot unfortunately be distributed on GitHub for free due to large sizes, so for public projects something else has to be used for hosting.

## Verification

These images are signed with [Sigstore](https://www.sigstore.dev/)'s [cosign](https://github.com/sigstore/cosign). You can verify the signature by downloading the `cosign.pub` file from this repo and running the following command:

```bash
cosign verify --key cosign.pub ghcr.io/xynydev/vanillin
```

5 changes: 0 additions & 5 deletions files/scripts/abroot.sh

This file was deleted.

File renamed without changes.
16 changes: 7 additions & 9 deletions recipes/recipe.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# yaml-language-server: $schema=https://schema.blue-build.org/recipe-v1.json
# yaml-language-server: $schema=https://json.schemastore.org/yamllint.json

# image will be published to ghcr.io/<user>/<name>
name: vanillin

# description will be included in the image's metadata
description: Custom image based on VanillaOS testing.
description: Custom image based on VanillaOS.

# the base image to build on top of (FROM) and the version tag to use
base-image: ghcr.io/vanilla-os/desktop
image-version: main # latest is also supported if you want new updates ASAP
image-version: main

# vanilla specific config, unstable, might change later
base-image-type: vanilla
# blue-build-tag: vanilla
blue-build-tag: vanilla

# module configuration, executed in order
# you can include multiple instances of the same module
Expand All @@ -34,9 +36,5 @@ modules:
install:
- io.github.flattool.Warehouse

- type: script
scripts:
- abroot.sh

# - type: signing # this sets up the proper policy & signing files for signed images to work fully
- type: signing # this sets up the proper policy & signing files for signed images to work fully

0 comments on commit bd9066d

Please sign in to comment.