From ee255ab2b5ba1db45afd8ce2230efadd5bf6bfd7 Mon Sep 17 00:00:00 2001 From: Jarno Rankinen <50285623+0ranki@users.noreply.github.com> Date: Sun, 30 Jun 2024 17:45:48 +0300 Subject: [PATCH 1/3] WIP: Update README.md --- README.md | 82 ++----------------------------------------------------- 1 file changed, 2 insertions(+), 80 deletions(-) diff --git a/README.md b/README.md index 40fe917..a36d116 100644 --- a/README.md +++ b/README.md @@ -1,81 +1,3 @@ -# image-template +# Silverblue-ZFS -# Purpose - -This repository is meant to be a template for building your own custom Universal Blue image. This template is the recommended way to make customizations to any image published by the Universal Blue Project: -- [Aurora](https://getaurora.dev/) -- [Bazzite](https://bazzite.gg/) -- [Bluefin](https://projectbluefin.io/) -- [uCore](https://projectucore.io/) -- [main](https://github.com/ublue-os/main/) -- [hwe](https://github.com/ublue-os/hwe/) - -This template includes a Containerfile and a Github workflow for building the container image. As soon as the workflow is enabled in your repository, it will build the container image and push it to the Github Container Registry. - -# Prerequisites - -Working knowledge in the following topics: - -- Containers - - https://www.youtube.com/watch?v=SnSH8Ht3MIc - - https://www.mankier.com/5/Containerfile -- rpm-ostree - - https://coreos.github.io/rpm-ostree/container/ -- Fedora Silverblue (and other Fedora Atomic variants) - - https://docs.fedoraproject.org/en-US/fedora-silverblue/ -- Github Workflows - - https://docs.github.com/en/actions/using-workflows - -# How to Use - -## Template - -Select `Use this Template` and create a new repository from it. To enable the workflows, you may need to go the `Actions` tab of the new repository and click to enable workflows. - -## Containerfile - -This file defines the operations used to customize the selected image. It contains examples of possible modifications, including how to: -- change the upstream from which the custom image is derived -- add additional RPM packages -- add binaries as a layer from other images - -## Workflows - -### build.yml - -This workflow creates your custom OCI image and publishes it to the Github Container Registry (GHCR). By default, the image name will match the Github repository name. - -#### Container Signing - -Container signing is important for end-user security and is enabled on all Universal Blue images. It is recommended you set this up, and by default the image builds *will fail* if you don't. - -This provides users a method of verifying the image. - -1. Install the [cosign CLI tool](https://edu.chainguard.dev/open-source/sigstore/cosign/how-to-install-cosign/#installing-cosign-with-the-cosign-binary) - -2. Run inside your repo folder: - - ```bash - cosign generate-key-pair - ``` - - - - Do NOT put in a password when it asks you to, just press enter. The signing key will be used in GitHub Actions and will not work if it is encrypted. - -> [!WARNING] -> Be careful to *never* accidentally commit `cosign.key` into your git repo. - -3. Add the private key to GitHub - - - This can also be done manually. Go to your repository settings, under Secrets and Variables -> Actions - ![image](https://user-images.githubusercontent.com/1264109/216735595-0ecf1b66-b9ee-439e-87d7-c8cc43c2110a.png) - Add a new secret and name it `SIGNING_SECRET`, then paste the contents of `cosign.key` into the secret and save it. Make sure it's the .key file and not the .pub file. Once done, it should look like this: - ![image](https://user-images.githubusercontent.com/1264109/216735690-2d19271f-cee2-45ac-a039-23e6a4c16b34.png) - - - (CLI instructions) If you have the `github-cli` installed, run: - - ```bash - gh secret set SIGNING_SECRET < cosign.key - ``` - -4. Commit the `cosign.pub` file into your git repository +This is a customized Universal Blue image with the OpenZFS kernel module installed. From 379125e8155c130dead76d21dc27fa1e9e76875c Mon Sep 17 00:00:00 2001 From: Jarno Rankinen <50285623+0ranki@users.noreply.github.com> Date: Sun, 30 Jun 2024 18:12:01 +0300 Subject: [PATCH 2/3] Update README.md --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index a36d116..d1ac6e2 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,19 @@ # Silverblue-ZFS This is a customized Universal Blue image with the OpenZFS kernel module installed. + +See [upstream Universal Blue](https://github.com/ublue-os/main/) repo for more detailed instructions how +to rebase to this image. + +The ZFS modules are built against the latest latest ublue-os:main image, Fedora 40 at the time of writing. +Building the modules is basically taken straight from [Fedora CoreOS](https://github.com/coreos/layering-examples/tree/main/build-zfs-module) +example, except the base image used to detect the correct version is `ublue-os:main`. + +## Known issues +The build fails consistently once a week. Most likely Fedora repos are already serving a newer kernel version, +while the pulled ublue image is still on the older kernel version. Next day's build succeeds, so this only means +a day without an updated image every week. + +Dependencies for Jim Salter's excellent [Sanoid/Syncoid](https://github.com/jimsalterjrs/sanoid) might become +preinstalled at some stage, but for now I've decided to keep everything close to `ublue-os:main`. Suggestions, +issues and pull requests are welcome. From afeed55bd99de2106a6e2398e02881bf89f41bb7 Mon Sep 17 00:00:00 2001 From: Jarno Rankinen <50285623+0ranki@users.noreply.github.com> Date: Sun, 30 Jun 2024 18:15:29 +0300 Subject: [PATCH 3/3] Update README.md --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d1ac6e2..fd6fff0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Silverblue-ZFS +[![build-silverblue-zfs](https://github.com/0ranki/silverblue-zfs/actions/workflows/build.yml/badge.svg)](https://github.com/0ranki/silverblue-zfs/actions/workflows/build.yml) + This is a customized Universal Blue image with the OpenZFS kernel module installed. See [upstream Universal Blue](https://github.com/ublue-os/main/) repo for more detailed instructions how @@ -7,7 +9,7 @@ to rebase to this image. The ZFS modules are built against the latest latest ublue-os:main image, Fedora 40 at the time of writing. Building the modules is basically taken straight from [Fedora CoreOS](https://github.com/coreos/layering-examples/tree/main/build-zfs-module) -example, except the base image used to detect the correct version is `ublue-os:main`. +example, except the base image used to detect the correct kernel version to build against is `ublue-os:main`. ## Known issues The build fails consistently once a week. Most likely Fedora repos are already serving a newer kernel version,