Skip to content

Commit

Permalink
✨ release 4.1hf4 to current
Browse files Browse the repository at this point in the history
  • Loading branch information
electricduck committed Mar 20, 2023
2 parents 6764c55 + 9156259 commit d12ca9b
Show file tree
Hide file tree
Showing 13 changed files with 292 additions and 34 deletions.
58 changes: 58 additions & 0 deletions .ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
#!/bin/bash

step="$1"

function die() {
echo "Error: $1"
exit 255
}

function step_build_tree() {
tree="$1"
ostree_repo="$2"

container_hostname="$(hostname -f)"
container_image="fedora:37"
start_time="$(date +%s)"

./build.sh \
--container \
--tree "$tree" \
--vendor "sodaliterocks" \
--working-dir "$ostree_repo" \
--ex-container-hostname "$container_hostname" \
--ex-container-image "$container_image" \
--ex-override-starttime "$start_time" \
--ex-print-github-release-table-row

if [[ $? != 0 ]]; then
die "Failed to build"
fi
}

function step_checkout_branch() {
branch="$1"
git checkout $branch
}

function step_update_submodules() {
git submodule sync
git submodule update --init --recursive
}

function step_test_environment() {
if [[ $(id -u) != 0 ]]; then
die "Unauthorized (are you root?)"
fi
}

shift

case $step in
"build-tree") step_build_tree $1 $2 ;;
"checkout-branch") step_checkout_branch $1 $2 ;;
"test-environment") step_test_environment ;;
"update-submodules") step_update_submodules ;;
*)
die "Step '$step' does not exist"
esac
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ insert_final_newline = true
tab_width = 4
trim_trailing_whitespace = true

[*.yaml]
[*.yaml,*.yml]
tab_width = 2
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on:
workflow_call:
inputs:
branch:
type: string
repo:
type: string
tree:
required: true
type: string

jobs:
ci:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3

- name: Test environment
run: ./.ci.sh test-environment

- name: Checkout branch
if: ${{ inputs.branch != '' }}
run: ./.ci.sh checkout-branch ${{ inputs.branch }}

- name: Update submodules
run: ./.ci.sh update-submodules

- name: Build tree
run: ./.ci.sh build-tree ${{ inputs.tree }} ${{ inputs.repo }}
24 changes: 24 additions & 0 deletions .github/workflows/update-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Update (Manual)

on:
workflow_dispatch:
inputs:
tree:
default: desktop
description: "Tree"
required: true
type: choice
options:
- desktop
- desktop-budgie
- desktop-deepin
- desktop-gnome
- derp

jobs:
custom:
name: Update (Manual)
uses: sodaliterocks/sodalite/.github/workflows/ci.yml@main
with:
repo: /srv/store/variable/ostree
tree: ${{ inputs.tree }}
63 changes: 63 additions & 0 deletions .github/workflows/update-scheduled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Update (Scheduled)

on:
schedule:
- cron: '0 4 * * 3,6'
workflow_dispatch:

jobs:
desktop:
name: "Update: Desktop (Current)"
uses: sodaliterocks/sodalite/.github/workflows/ci.yml@main
with:
branch: release/current
repo: /srv/store/variable/ostree
tree: desktop

desktop--long-4:
name: "Update: Desktop (Long 4)"
uses: sodaliterocks/sodalite/.github/workflows/ci.yml@main
with:
branch: release/long/4
repo: /srv/store/variable/ostree
tree: desktop

desktop--next:
name: "Update: Desktop (Next)"
uses: sodaliterocks/sodalite/.github/workflows/ci.yml@main
with:
branch: release/next
repo: /srv/store/variable/ostree
tree: desktop

desktop--devel:
name: "Update: Desktop (Devel)"
uses: sodaliterocks/sodalite/.github/workflows/ci.yml@main
with:
branch: main
repo: /srv/store/variable/ostree
tree: desktop

desktop-budgie--devel:
name: "Update: Budgie (Devel)"
uses: sodaliterocks/sodalite/.github/workflows/ci.yml@main
with:
branch: main
repo: /srv/store/variable/ostree
tree: desktop-budgie

desktop-deepin--devel:
name: "Update: Deepin (Devel)"
uses: sodaliterocks/sodalite/.github/workflows/ci.yml@main
with:
branch: main
repo: /srv/store/variable/ostree
tree: desktop-deepin

desktop-gnome--devel:
name: "Update: GNOME (Devel)"
uses: sodaliterocks/sodalite/.github/workflows/ci.yml@main
with:
branch: main
repo: /srv/store/variable/ostree
tree: desktop-gnome
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ To allow for several versions to co-exist and be developed in tandem with each o

* `<name>`: **Name** of the branch; always `sodalite`
* `<channel>`: **Channel** of the branch. Possible values:
- `current`: Current stable release (currently 4, based on [Fedora Linux 37](https://docs.fedoraproject.org/en-US/releases/f37/))
- `current`: Current stable release (currently [4.1](https://github.com/sodaliterocks/sodalite/releases/tag/v%2F4%2F4.1%2Fcurrent), based on [Fedora Linux 37](https://docs.fedoraproject.org/en-US/releases/f37/))
- `long-<version>`: "Long-term" releases to stay with a specific version
- `4`: 4.x, based on [Fedora Linux 37](https://docs.fedoraproject.org/en-US/releases/f37/). Reaches end-of-life on 14-Nov-2023 (2023-11-14)
- `next`: Upcoming release candidates. **Potentially broken!**
Expand Down Expand Up @@ -110,7 +110,8 @@ _(todo)_

#### Environment
* Permission to `sudo`
- `rpm-ostree` needs superuser access to work: there's no way around this.
- `rpm-ostree` needs superuser access to work: there's no way around this
- Building in a container, however, is possible and supported: just pass the `-c`/`--container` flag to `build.sh` (mentioned below)
* &gt;10GiB disk space
- The repository itself (including submodules) takes up ~300MiB
- Initial builds will take up ~4GiB, with subsequent builds adding to this
Expand Down Expand Up @@ -174,6 +175,10 @@ This will usually take 10-15 minutes. Remember when I told you to grab a cuppa?

#### Additional Notes

##### Building in a Container

If you have [Podman](https://podman.io/), you can build Sodalite entirely in a container: just use `-c`/`--container`. This is in fact how builds are done on the release server! However, this will add an extra few minutes for the build to complete as the Fedora container needs to install packages first.

##### NTFS/FAT partitions

Build failures are inevitable on drives formatted as NTFS, FAT, or anything other filesystems that do not support Unix-like permissions, as `build.sh` sets permissions on various objects.
Expand Down Expand Up @@ -219,17 +224,25 @@ _(todo)_

### Individuals

* [Fabio "decathorpe" Valentini](https://decathorpe.com/), for providing the extra packages for elementary on Fedora via the [elementary-staging Copr repository](https://copr.fedorainfracloud.org/coprs/decathorpe/elementary-staging/)
* [Jorge O. Castro](https://github.com/castrojo), for including Sodalite in [awesome-immutable](https://github.com/castrojo/awesome-immutable)
* [TimothΓ©e Ravier](https://tim.siosm.fr), for their extensive guidance to the community concerning Fedora Silverblue
* The amazing photographers/artists of the included wallpapers &mdash; [Adrien Olichon](https://unsplash.com/@adrienolichon), [Ashwini Chaudhary](https://unsplash.com/@suicide_chewbacca), [Austin Neill](https://unsplash.com/@arstyy), [Cody Fitzgerald](https://unsplash.com/@cfitz), [Dustin Humes](https://unsplash.com/@dustinhumes_photography), [Eugene Golovesov](https://unsplash.com/@eugene_golovesov), [Jack B.](https://unsplash.com/@nervum), [Jeremy Gerritsen](https://unsplash.com/@jeremygerritsen), [Marek Piwnicki](https://unsplash.com/@marekpiwnicki), [Max Okhrimenko](https://unsplash.com/@maxokhrimenko), [Nathan Dumlao](https://unsplash.com/@nate_dumlao), [Piermanuele Sberni](https://unsplash.com/@piermanuele_sberni), [Phil Botha](https://unsplash.com/@philbotha), [Ryan Stone](https://unsplash.com/@rstone_design), [Smaran Alva](https://unsplash.com/@smal), [Takashi Miyazaki](https://unsplash.com/@miyatankun), [Willian Daigneault](https://unsplash.com/@williamdaigneault), and [Zara Walker](https://unsplash.com/@mojoblogs)

#### Past Individuals

_These fine folks' work is no longer included in, or relevant to, Sodalite, but they're still worth a shout-out!_

* [Fabio "decathorpe" Valentini](https://decathorpe.com/), for maintaining elementary/Pantheon packages on Fedora
* Due to various packaging issues with Pantheon on Fedora's official repos (see [#44](https://github.com/sodaliterocks/sodalite/issues/44), and [writing (about) code βž” elementary-stable](https://decathorpe.com/fedora-elementary-stable-status.html)), these packages were dropped entirely (including the addtional ~~[elementary-staging](https://copr.fedorainfracloud.org/coprs/decathorpe/elementary-staging/)~~ and ~~[elementary-nightly](https://copr.fedorainfracloud.org/coprs/decathorpe/elementary-nightly/)~~ Copr repos, dropped in Feb '23). Despite this, decathorpe's contributions are essentially what sparked Sodalite in the first place.
* ["Topfi"](https://github.com/ACertainTopfi), for their various contributions
* The amazing photographers/artists of the included wallpapers &mdash; [Adrien Olichon](https://unsplash.com/@adrienolichon), [Ashwini Chaudhary](https://unsplash.com/@suicide_chewbacca), [Austin Neill](https://unsplash.com/@arstyy), [Cody Fitzgerald](https://unsplash.com/@cfitz), [Dustin Humes](https://unsplash.com/@dustinhumes_photography), [Eugene Golovesov](https://unsplash.com/@eugene_golovesov), [Jack B.](https://unsplash.com/@nervum), [Jeremy Gerritsen](https://unsplash.com/@jeremygerritsen), [Karsten WΓΌrth](https://unsplash.com/@karsten_wuerth), [Marek Piwnicki](https://unsplash.com/@marekpiwnicki), [Max Okhrimenko](https://unsplash.com/@maxokhrimenko), [Nathan Dumlao](https://unsplash.com/@nate_dumlao), [Piermanuele Sberni](https://unsplash.com/@piermanuele_sberni), [Phil Botha](https://unsplash.com/@philbotha), [Ryan Stone](https://unsplash.com/@rstone_design), [Smaran Alva](https://unsplash.com/@smal), [Takashi Miyazaki](https://unsplash.com/@miyatankun), [Willian Daigneault](https://unsplash.com/@williamdaigneault), and [Zara Walker](https://unsplash.com/@mojoblogs)
* The amazing photographers/artists of the now **excluded** wallpapers &mdash; [Karsten WΓΌrth](https://unsplash.com/@karsten_wuerth)
* Old wallpapers from old releases are eventually purged to keep `/usr/share/backgrounds/default/` from getting too large. No hard feelings!

### Teams & Organizations

* [elementary](https://elementary.io/team), for building lovely stuff
* [Fyra Labs](https://fyralabs.com), for maintaining [Terra](https://terra.fyralabs.com/)
* The official Fedora repos ran into issues (see [#44](https://github.com/sodaliterocks/sodalite/issues/44)) with Pantheon packages for f37+, potentially dooming Sodalite after f36 reached EoL: Terra solved this
* Due to various packaging issues with Pantheon on Fedora's official repos (see [#44](https://github.com/sodaliterocks/sodalite/issues/44)), Sodalite was almost doomed after f36+ reached EoL. However, Terra maintains builds of Pantheon and effectively keeps the lights on here!
* The contributors to [workstation-ostree-config](https://pagure.io/workstation-ostree-config), for a solid ground to work from

### Miscellaneous
Expand Down
15 changes: 12 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ _PLUGIN_OPTIONS=(
"ex-ntfy-topic;;"
"ex-ntfy-username;;"
"ex-override-starttime;;"
"ex-print-github-release-table-row;;"
)
_PLUGIN_ROOT="true"

Expand Down Expand Up @@ -454,10 +455,11 @@ function main() {
fi

if [[ $container == "true" ]]; then # BUG: Podman sets $container (usually to "oci"), so we need to look for "true" instead

if [[ $(command -v "podman") ]]; then
container_start_time=$(date +%s)

container_name="sodalite-build_$(get_random_string 6)"
container_name="sodalite-build_$(echo $RANDOM | md5sum | head -c 6; echo;)"
container_hostname="$(echo $container_name | sed s/_/-/g)"
container_image="fedora:37"

Expand Down Expand Up @@ -499,7 +501,7 @@ function main() {
podman pull $container_image

say primary "$(build_emj "πŸ“¦")Executing container ($container_name)..."
eval "podman $container_args"
eval "podman $container_args" # BUG: Exits with 0 always
else
build_die "Podman not installed. Cannot build with --container"
fi
Expand Down Expand Up @@ -562,14 +564,21 @@ function main() {

built_commit="$(echo "$(ost log $ref | grep "commit " | sed "s/commit //")" | head -1)"
built_version="$(ost cat $built_commit /usr/lib/os-release | grep "OSTREE_VERSION=" | sed "s/OSTREE_VERSION=//" | sed "s/'//g")"
built_pretty_name="$(ost cat $built_commit /usr/lib/os-release | grep "PRETTY_NAME=" | sed "s/PRETTY_NAME=//" | sed "s/\"//g")"

say "$(build_emj "ℹ️")\033[1;35mName: \033[0;0m$(ost cat $built_commit /usr/lib/os-release | grep "PRETTY_NAME=" | sed "s/PRETTY_NAME=//" | sed "s/\"//g")"
say "$(build_emj "ℹ️")\033[1;35mName: \033[0;0m$built_pretty_name"
say " \033[1;35mBase: \033[0;0m$(ost cat $built_commit /usr/lib/upstream-os-release | grep "PRETTY_NAME=" | sed "s/PRETTY_NAME=//" | sed "s/\"//g")"
say " \033[1;35mVersion: \033[0;0m$built_version"
say " \033[1;35mCPE: \033[0;0m$(ost cat $built_commit /usr/lib/system-release-cpe)"
say " \033[1;35mRef: \033[0;0m$(ost cat $built_commit /usr/lib/sodalite-buildinfo | grep "TREE_REF=" | sed "s/TREE_REF=//" | sed "s/\"//g")"
say " \033[1;35mCommit: \033[0;0m$built_commit"

if [[ $ex_print_github_release_table_row != "" ]]; then
echo "$(repeat "-" 80)"
github_release_table_row="| <pre><b>$ref</b></pre> | **$(echo $built_pretty_name | sed -s "s| |\&#160;|g")** | $built_version | <pre>$built_commit</pre> |"
say "$github_release_table_row"
fi

echo "$(repeat "-" 80)"

say primary "$(build_emj "βœ…")Success ($(print_time $end_time))"
Expand Down
2 changes: 1 addition & 1 deletion lib/elementary.default-settings
2 changes: 1 addition & 1 deletion lib/sodaliterocks.hacks
2 changes: 1 addition & 1 deletion src/treefiles/fedora.repo
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gpgcheck=1
metadata_expire=1d

[fedora.updates]
name=Fedora ($releasever~$basearch): Updates
name=Fedora: Updates ($releasever~$basearch)
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=updates-released-f$releasever&arch=$basearch
enabled=0
gpgcheck=1
Expand Down
Loading

0 comments on commit d12ca9b

Please sign in to comment.