From 0f3da151092ca91b4420504dbaf9828ab2ebab13 Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 17:03:22 +0300 Subject: [PATCH 1/9] docs: streamline readme introduction --- README.md | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/README.md b/README.md index 5fef4a4..12b2444 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,9 @@ [![build-ublue](https://github.com/ublue-os/startingpoint/actions/workflows/build.yml/badge.svg)](https://github.com/ublue-os/startingpoint/actions/workflows/build.yml) -A starting point for creating your own customized Ostree Native Container image. - -## What is this? - This is a starting point Fedora Silverblue image designed to be customized to whatever you want, have GitHub build it for you, and then host it for you. You then just tell your computer to boot off of that image. GitHub keeps 90 days worth image backups for you, thanks Microsoft! -Check out the [spec for Fedora](https://fedoraproject.org/wiki/Changes/OstreeNativeContainerStable) for more information and proper explanation. - -You can use any other native container image as a base for your custom image. Check out the [uBlue images list](https://ublue.it/images/) to decide what to use! - -The Github actions and methods are meant to be shared and improved upon, [so come on in](https://github.com/orgs/ublue-os/discussions) and help out! +For more info, check out the [uBlue homepage](https://ublue.it/) and the [main uBlue repo](https://github.com/ublue-os/main/) ## Making your own From 0f457747ada3db86f62a1227fce0bf8ca395a545 Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 17:12:05 +0300 Subject: [PATCH 2/9] docs: getting started & start of customization --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 12b2444..2bf70fe 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,15 @@ This is a starting point Fedora Silverblue image designed to be customized to wh For more info, check out the [uBlue homepage](https://ublue.it/) and the [main uBlue repo](https://github.com/ublue-os/main/) -## Making your own +## Getting started -See [the documentation](https://ublue.it/making-your-own/) on how to clone and use this repo for your own projects. +See the [Make Your Own -page in the documentation](https://ublue.it/making-your-own/) for quick setup instructions for setting up your own repository based on this template. + +Don't worry, it only requires some basic knowledge about using the terminal and git. ## Customization -You can customize this image to your needs by adding packages to install in the `recipe.yml`, configuration files in the `etc` or `usr` folders or doing any custom commands you want to in the `Containerfile`. +The easiest way to start customizing is by looking at and modifying `recipe.yml`. ## Installation From 2e1499b332cb9f4d92bad335a779d52331d9b7fc Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 17:20:50 +0300 Subject: [PATCH 3/9] docs: full simple customization section --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2bf70fe..3993ae1 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,11 @@ Don't worry, it only requires some basic knowledge about using the terminal and ## Customization -The easiest way to start customizing is by looking at and modifying `recipe.yml`. +The easiest way to start customizing is by looking at and modifying `recipe.yml`. It's documented using comments and should be pretty easy to understand. + +For the base-container field, you can use any other native container image. You will get all the features of that image, plus the ones added here! Check out the [uBlue images list](https://ublue.it/images/) to decide what to use! + +If you want to add custom configuration files, you can just add them in the `etc` directory. If you need to add other directories, you can look at the Containerfile to see how it's done. Writing to any directories under `/var` in Fedora Silverblue are not supported and will not work, as those are user-managed. ## Installation From 095434581e7f4b3a9e350dbe9018e7fd650cd5bf Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 17:22:42 +0300 Subject: [PATCH 4/9] docs: move note to getting started --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3993ae1..9783f6d 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ See the [Make Your Own -page in the documentation](https://ublue.it/making-your- Don't worry, it only requires some basic knowledge about using the terminal and git. +> **Note** +> Everywhere in this repository, make sure to replace `ublue-os/startingpoint` with the details of your own repository. Unless you used `create-ublue-image`, in which case the previous repo identifier should already be your repo's details. + ## Customization The easiest way to start customizing is by looking at and modifying `recipe.yml`. It's documented using comments and should be pretty easy to understand. @@ -25,9 +28,6 @@ If you want to add custom configuration files, you can just add them in the `etc > **Warning** > This is an experimental feature and should not be used in production, try it in a VM for a while! If you are rebasing and not doing a clean install do a `touch ~/.config/ublue/firstboot-done` to keep your flatpak configuration untouched BEFORE you rebase, otherwise we're going to mangle it (for science). -> **Note** -> In the commands below, make sure to replace `ublue-os/startingpoint` with the details of your own repository. - To rebase an existing Silverblue/Kinoite installation to the latest build: ``` From ba12a9cf88ed079d72d9eedb2aaeeeccbd0b3730 Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 17:32:01 +0300 Subject: [PATCH 5/9] docs: cleanup some incorrect info --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 9783f6d..58cf8b8 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ If you want to add custom configuration files, you can just add them in the `etc ## Installation > **Warning** -> This is an experimental feature and should not be used in production, try it in a VM for a while! If you are rebasing and not doing a clean install do a `touch ~/.config/ublue/firstboot-done` to keep your flatpak configuration untouched BEFORE you rebase, otherwise we're going to mangle it (for science). +> This is an experimental feature and should not be used in production, try it in a VM for a while! To rebase an existing Silverblue/Kinoite installation to the latest build: @@ -37,10 +37,10 @@ sudo rpm-ostree rebase ostree-unverified-registry:ghcr.io/ublue-os/startingpoint This repository builds date tags as well, so if you want to rebase to a particular day's build: ``` -sudo rpm-ostree rebase ostree-unverified-registry:ghcr.io/ublue-os/startingpoint:20221217 +sudo rpm-ostree rebase ostree-unverified-registry:ghcr.io/ublue-os/startingpoint:20230403 ``` -The `latest` tag will automatically point to the latest build. Note that when a new version of Fedora is released that the `latest` tag will get updated to that latest release automatically. +The `latest` tag will automatically point to the latest build. That build will still always use the Fedora version specified in `release.yml`, so you won't get accidentally updated to the next major version. ## Just From c986ebacca82081f3fc7eb6dbd07e63d44126778 Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 17:34:26 +0300 Subject: [PATCH 6/9] docs: document the usage of "latest" in fedora ver --- recipe.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/recipe.yml b/recipe.yml index 28a28cc..ed41444 100644 --- a/recipe.yml +++ b/recipe.yml @@ -5,7 +5,10 @@ name: startingpoint # images not built by ublue might function unexpectly base-container: ghcr.io/ublue-os/silverblue-main -# what fedora version to use, you can just change this to update +# what fedora version to use, you can just change this to the next version update +# if you change this to "latest", you will be automatically updated +# to the next major version assuming the image you're using as your base container +# builds with the tag (all uBlue images do) fedora-version: 37 # this description will be visible in the containers metadata From 8310669bf228ba0137a41c5ca22aa3731114e7ed Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 17:42:05 +0300 Subject: [PATCH 7/9] docs: rm unfullfilled promises of ublue-firstboot --- README.md | 2 +- ublue-firstboot | 99 ------------------------------------------------- 2 files changed, 1 insertion(+), 100 deletions(-) delete mode 100755 ublue-firstboot diff --git a/README.md b/README.md index 58cf8b8..0278e32 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ The `latest` tag will automatically point to the latest build. That build will s ## Just The `just` task runner is included in main for further customization after first boot. -The firstboot script copies the justfile from `/etc/justfile` to your home directory. +You can copy the justfile from `/etc/justfile` to `~/.justfile` to get started. Once `just` supports [include directives](https://just.systems/man/en/chapter_52.html), you can just include the file in `/etc` into your own justfile, where you have the option of adding new tasks. After that run the following commands: - `just` - Show all tasks, more will be added in the future diff --git a/ublue-firstboot b/ublue-firstboot deleted file mode 100755 index 393e801..0000000 --- a/ublue-firstboot +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/sh - -if test -e "$HOME"/.config/ublue/firstboot-done; then - echo "Already ran" - exit 0 -fi - -( -echo "# Waiting for Internet connection" -until /usr/bin/ping -q -c 1 flathub.org; do sleep 1; done -echo "00" - -echo "# Removing Filtered Flathub Repository" -/usr/bin/flatpak remote-delete flathub --force ||: -if [ "$?" != 0 ] ; then - zenity --error \ - --text="Removing Filtered Flathub Repo Failed" - exit 1 -fi -echo "3" - -echo "# Enabling Flathub Repository" -/usr/bin/flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo -if [ "$?" != 0 ] ; then - zenity --error \ - --text="Adding Flathub Repo Failed" - exit 1 -fi -echo "5" - -echo "# Replacing Fedora Flatpaks with Flathub Ones (this may take a while)" -/usr/bin/flatpak install --user --noninteractive org.gnome.Platform//43 -/usr/bin/flatpak install --user --noninteractive --reinstall flathub $(flatpak list --app-runtime=org.fedoraproject.Platform --columns=application | tail -n +1 ) -if [ "$?" != 0 ] ; then - zenity --error \ - --text="Replacing Fedora Flatpaks Failed" - exit 1 -fi -echo "20" - -echo "Removing all preinstalled Flatpaks" -/usr/bin/flatpak remove --system --noninteractive --all ||: -if [ "$?" != 0 ] ; then - zenity --error \ - --text="Removing all preinstalled flatpaks failed" - exit 1 -fi - -echo "# Removing Fedora Flatpak Repository" -/usr/bin/flatpak remote-delete fedora --force ||: -if [ "$?" != 0 ] ; then - zenity --error \ - --text="Removing Fedora Flatpak Repo Failed" - exit 1 -fi -echo "25" - -echo "# Installing flatpaks from recipe" -flatpaks=$(yq '.flatpaks[]' < /etc/ublue-recipe.yml) -flatpaks_count=$(yq '.flatpaks[]' < /etc/ublue-recipe.yml | wc -l) -i=0 -for pkg in $flatpaks; do - echo "# Installing ${pkg}" - /usr/bin/flatpak install --user --noninteractive flathub $pkg - if [ "$?" != 0 ] ; then - zenity --error \ - --text="Installing ${pkg} Failed" - exit 1 - fi - i=$((i+1)) - # Automatically calculates evenly spaced progess using bc, cuts everything after decimal point. - echo "${i}/${flatpaks_count} * (95-30) + 30" | bc -l | cut -d "." -f1 -done - - - -echo "Enabling Flatpak auto update" -/usr/bin/systemctl --user enable --now flatpak-user-update.timer -if [ "$?" != 0 ] ; then - zenity --error \ - --text="Setting Flatpak Autoupdate Failed" - exit 1 -fi -echo "100" - - -echo "# Reticulating Final Splines" -mkdir -p "$HOME"/.config/ublue/ -touch "$HOME"/.config/ublue/firstboot-done -cp -n /etc/justfile "$HOME"/.justfile - -) | - - zenity --progress --title="uBlue Desktop Firstboot" --percentage=0 --auto-close --no-cancel --width=300 - -if [ "$?" != 0 ] ; then - zenity --error \ - --text="Firstboot Configuration Error" -fi From 12497d394db4c0c8cca60b123b6e911f1316035e Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 17:44:23 +0300 Subject: [PATCH 8/9] docs: simplify redundant signing info --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0278e32..4b0aec3 100644 --- a/README.md +++ b/README.md @@ -68,4 +68,4 @@ These images are signed with sisgstore's [cosign](https://docs.sigstore.dev/cosi cosign verify --key cosign.pub ghcr.io/ublue-os/base -If you're forking this repo you should [read the docs](https://docs.github.com/en/actions/security-guides/encrypted-secrets) on keeping secrets in github. You need to [generate a new keypair](https://docs.sigstore.dev/cosign/overview/) with cosign. The public key can be in your public repo (your users need it to check the signatures), and you can paste the private key in Settings -> Secrets -> Actions. +If you're forking this repo, the uBlue website has [instructions](https://ublue.it/making-your-own/) for setting up signing properly. From 2012e2443b8ff86ef6d39aba25939361222ec8d2 Mon Sep 17 00:00:00 2001 From: ER Date: Mon, 3 Apr 2023 17:53:22 +0300 Subject: [PATCH 9/9] docs: section about yafti --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index 4b0aec3..bf23526 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,12 @@ For the base-container field, you can use any other native container image. You If you want to add custom configuration files, you can just add them in the `etc` directory. If you need to add other directories, you can look at the Containerfile to see how it's done. Writing to any directories under `/var` in Fedora Silverblue are not supported and will not work, as those are user-managed. +### [yafti](https://github.com/ublue-os/yafti/) + +`yafti` is the uBlue firstboot installer, and it's configuration can be found in `/etc/yafti.yml`. It includes an optional selection of Flatpaks to install, with a new group added for the Flatpaks declared in `recipe.yml`. You can look at what's done in the config and modify it to your liking. + +The files `/etc/profile.d/ublue-firstboot.sh` and `/etc/skel.d/.config/autostart/ublue-firstboot.desktop` set up `yafti` so that it starts on boot, so if you wish to retain that functionality those files shouldn't be touched. + ## Installation > **Warning**