Skip to content

Commit

Permalink
✨ release 4.1hf3 to current
Browse files Browse the repository at this point in the history
  • Loading branch information
electricduck committed Mar 5, 2023
2 parents f5298c7 + 4b282d3 commit 6764c55
Show file tree
Hide file tree
Showing 18 changed files with 102 additions and 69 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,6 @@
[submodule "lib/workstation-ostree-config_f37"]
path = lib/workstation-ostree-config_f37
url = https://pagure.io/workstation-ostree-config
[submodule "lib/workstation-ostree-config"]
path = lib/workstation-ostree-config
url = https://pagure.io/workstation-ostree-config
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ All code submitted into this repository will be [licensed as MIT](https://github
* This could be a filename (no extension), directory, or function name.
* For more specificness, add a "parent" area in brackets (e.g. `child-thingy (parent-thingy):`).
* `message`: Brief message of changes.
* Written in lowercase (unless a proper noun); written in present tense (e.g. `modify` not `modified`); begin with a verb.
* Written in lowercase (unless a proper noun)
* Written in the present tense (e.g. `modify` not `modified`)
* Begin with a verb
* Some messages use a certain format:
* **Branch merges** (with 🔀 emoji), use `from_branch → to_branch`.
* **PR merges** (with 🔀 emoji), use `PR #123 (pr_branch)`.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ _(todo)_
### Miscellaneous

* The [Sodalite mineral](https://en.wikipedia.org/wiki/Sodalite), for the name. [It's a mineral, not a rock, Jesus](https://www.youtube.com/watch?v=r1yYJBzf1VQ)!
* The [Omicron variant of SARS-CoV-2](https://en.wikipedia.org/wiki/SARS-CoV-2_Omicron_variant), for giving [Ducky](https://github.com/electriduck) the initial free time to make this thing
* The [Omicron variant of SARS-CoV-2](https://en.wikipedia.org/wiki/SARS-CoV-2_Omicron_variant), for giving [Ducky](https://github.com/electricduck) the initial free time to make this thing

## 👀 See Also

Expand Down
48 changes: 21 additions & 27 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,28 @@
_PLUGIN_TITLE="Sodalite Builder"
_PLUGIN_DESCRIPTION=""
_PLUGIN_OPTIONS=(
"tree;t;\tTreefile from ./src/treefiles (default: custom)"
"tree;t;\tTreefile from ./src/treefiles (default: custom);string"
"container;c;Build tree inside Podman container"
"working-dir;w;Directory to output build artifacts to (default: ./build)"
"working-dir;w;Directory to output build artifacts to (default: ./build);string"
"buildinfo-anon;;Do not print sensitive information into buildinfo file"
"git-version;;\tExecute latest version of $_PLUGIN_TITLE from Git"
"serve;;\tServe repository after successful build"
"serve-port;;\tPort to serve on when using --serve (default: 8080)"
"serve-port;;\tPort to serve on when using --serve (default: 8080);int"
"skip-cleanup;;Skip cleaning up on exit"
"skip-tests;;\tSkip executing tests"
"unified-core;;Use --unified-core option with rpm-ostree"
"vendor;;\tVendor to use in CPE (default: \$USER)"
"vendor;;\tVendor to use in CPE (default: \$USER);string"
"ex-container-args;;"
"ex-container-hostname;;"
"ex-container-image;;"
"ex-git-version-branch;;"
"ex-log;;"
"ex-ntfy;;"
"ex-ntfy-endpoint;;"
"ex-ntfy-password;;"
"ex-ntfy-topic;;"
"ex-ntfy-username;;"
"ex-remote-version;;"
"ex-remote-version-branch;;"
"ex-override-starttime;;"
"ex-test-print;;"
)
_PLUGIN_ROOT="true"

Expand Down Expand Up @@ -292,7 +291,7 @@ function build_sodalite() {
buildinfo_build_host_os="$(get_property /usr/lib/os-release "PRETTY_NAME")"
buildinfo_build_tool="rpm-ostree $(echo "$(rpm-ostree --version)" | grep "Version:" | sed "s/ Version: //" | tr -d "'")+$(echo "$(rpm-ostree --version)" | grep "Git:" | sed "s/ Git: //")"

if [[ $buildinfo_anon == "true" ]]; then
if [[ $buildinfo_anon != "" ]]; then
buildinfo_build_host_kernel="(Undisclosed)"
buildinfo_build_host_name="(Undisclosed)"
buildinfo_build_host_os="(Undisclosed)"
Expand All @@ -305,14 +304,14 @@ function build_sodalite() {
\nBUILD_HOST_NAME=\"$buildinfo_build_host_name\"
\nBUILD_HOST_OS=\"$buildinfo_build_host_os\"
\nBUILD_TOOL=\"$buildinfo_build_tool\"
\nBUILD_UNIFIED=$unified
\nGIT_COMMIT=$git_commit
\nGIT_TAG=$git_tag
\nOS_ARCH=\"$ref_arch\"
\nOS_CHANNEL=\"$ref_channel\"
\nOS_REF=\"$ref\"
\nOS_UNIFIED=$unified
\nOS_VARIANT=\"$ref_variant\"
\nTREEFILE=\"$(basename "$treefile")\"
\nTREE_FILENAME=\"$(basename "$treefile")\"
\nTREE_REF=\"$ref\"
\nTREE_REF_ARCH=\"$ref_arch\"
\nTREE_REF_CHANNEL=\"$ref_channel\"
\nTREE_REF_VARIANT=\"$ref_variant\"
\nVENDOR=\"$vendor\""

echo -e $buildinfo_content > $buildinfo_file
Expand Down Expand Up @@ -409,7 +408,7 @@ function main() {
[[ "$ex_ntfy_username" == "true" ]] && build_die "--ex-ntfy-username needs a value (example: theduckster)"
[[ "$ex_override_starttime" == "true" ]] && build_die "--ex-override-starttime needs a value (example: 1640551980)"

[[ "$ex_remote_version_branch" == "true" ]] || [[ -z "$ex_remote_version_branch" ]] && ex_remote_version_branch="main"
[[ "$ex_git_version_branch" == "true" ]] || [[ -z "$ex_git_version_branch" ]] && ex_git_version_branch="main"
[[ "$serve_port" == "true" ]] || [[ -z "$serve_port" ]] && serve_port=8080
[[ "$tree" == "true" ]] || [[ -z "$tree" ]] && tree="custom"
[[ "$working_dir" == "true" ]] || [[ -z "$working_dir" ]] && working_dir="$src_dir/build"
Expand All @@ -428,9 +427,9 @@ function main() {

[[ ! -d "$working_dir" ]] && mkdir -p "$working_dir"

if [[ $ex_remote_version != "" ]]; then
online_file_branch="$(echo $ex_remote_version_branch | sed "s|/|__|g")"
online_file="https://raw.githubusercontent.com/sodaliterocks/sodalite/main/build.sh"
if [[ $git_version != "" ]]; then
online_file_branch="$(echo $ex_git_version_branch | sed "s|/|__|g")"
online_file="https://raw.githubusercontent.com/sodaliterocks/sodalite/$ex_git_version_branch/build.sh"
downloaded_file="$src_dir/$me_filename+$online_file_branch"

me_md5sum="$(cat "$src_dir/$me_filename" | md5sum | cut -d ' ' -f1)"
Expand All @@ -441,9 +440,9 @@ function main() {
curl -sL $online_file > "$downloaded_file"
chmod +x "$downloaded_file"

say primary "$(emj "🌐")Executing remote version ($online_file_branch)..."
say primary "$(emj "🌐")Executing Git version ($online_file_branch)..."

bash -c "$downloaded_file $(echo $options | sed "s|--ex-remote-version||")"
bash -c "$downloaded_file $(echo $options | sed "s|--git-version||")"
downloaded_file_result="$?"

rm -f "$downloaded_file"
Expand All @@ -454,11 +453,6 @@ function main() {
fi
fi

if [[ $ex_test_print != "" ]]; then
echo "4"
exit 0
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)
Expand Down Expand Up @@ -571,9 +565,9 @@ function main() {

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 " \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;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 "REF=" | sed "s/OSTREE_VERSION=//" | 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"

echo "$(repeat "-" 80)"
Expand Down
2 changes: 1 addition & 1 deletion lfs
Submodule lfs updated from 4035c8 to 798ccb
2 changes: 1 addition & 1 deletion lib/elementary.icons
Submodule elementary.icons updated 298 files
1 change: 1 addition & 0 deletions lib/workstation-ostree-config
Submodule workstation-ostree-config added at b2ed24
2 changes: 1 addition & 1 deletion lib/workstation-ostree-config_f38
Submodule workstation-ostree-config_f38 updated from b2ed24 to 3ff6ec
6 changes: 6 additions & 0 deletions src/packages/essential.yaml → src/cores/bases/f37.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
include: [
"../../../lib/workstation-ostree-config_f37/fedora-common-ostree-pkgs.yaml"
]

releasever: "37"

packages:
- distribution-gpg-keys
- fedora-release
Expand Down
40 changes: 40 additions & 0 deletions src/cores/bases/f38.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
include: [
"../../../lib/workstation-ostree-config_f38/fedora-common-ostree-pkgs.yaml"
]

releasever: "38"

packages:
- distribution-gpg-keys
- fedora-release
- fedora-release-ostree-desktop
- fedora-repos-archive
- fedora-repos-ostree
- elfutils-libelf-devel
- firewalld
- glibc-devel
- hfsplus-tools
- kernel-devel
- lvm2
- rpm-ostree
- xdg-user-dirs-gtk
packages-x86_64:
- efibootmgr
- grub2-efi-ia32
- grub2-efi-x64
- grub2-pc
- hyperv-daemons
- mcelog
- microcode_ctl
- open-vm-tools-desktop
- ostree-grub2
- shim-ia32
- shim-x64
- thermald
- virtualbox-guest-additions
- xorg-x11-drv-amdgpu
- xorg-x11-drv-intel
- xorg-x11-drv-vesa
- xorg-x11-drv-vmware
exclude-packages:
- PackageKit
4 changes: 1 addition & 3 deletions src/cores/common.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
include: [
"../../lib/workstation-ostree-config_f37/fedora-common-ostree-pkgs.yaml",
"../packages/essential.yaml",
"bases/f37.yaml",
"../packages/flatpak.yaml",
"../packages/fonts.yaml",
"../packages/tools.yaml",
Expand Down Expand Up @@ -103,7 +102,6 @@ add-files: [
["../../lfs/wallpapers/max-okhrimenko-R-CoXmMrWFk-unsplash.jpg", "/usr/share/backgrounds/default/max-okhrimenko-R-CoXmMrWFk-unsplash.jpg"],
["../../lfs/wallpapers/nathan-dumlao-y_qtd7IizFE-unsplash.jpg", "/usr/share/backgrounds/default/nathan-dumlao-y_qtd7IizFE-unsplash.jpg"],
["../../lfs/wallpapers/phil-botha-a0TJ3hy-UD8-unsplash.jpg", "/usr/share/backgrounds/default/phil-botha-a0TJ3hy-UD8-unsplash.jpg"],
["../../lfs/wallpapers/phil-botha-a0TJ3hy-UD8-unsplash~devel.jpg", "/usr/share/backgrounds/devel-wallpaper.jpg"],
["../../lfs/wallpapers/piermanuele-sberni-9jVmJ_mBRE8-unsplash~3967x2645.jpg", "/usr/share/backgrounds/default/piermanuele-sberni-9jVmJ_mBRE8-unsplash~3967x2645.jpg"],
["../../lfs/wallpapers/ryan-stone-U3cctUBucn0-unsplash.jpg", "/usr/share/backgrounds/default/ryan-stone-U3cctUBucn0-unsplash.jpg"],
["../../lfs/wallpapers/smaran-alva-hno1wDtV1X4-unsplash.jpg", "/usr/share/backgrounds/default/smaran-alva-hno1wDtV1X4-unsplash.jpg"],
Expand Down
1 change: 1 addition & 0 deletions src/packages/flatpak.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
packages:
- flatpak
- xdg-desktop-portal
- xdg-desktop-portal-gtk
2 changes: 1 addition & 1 deletion src/packages/pantheon.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ packages:
- gvfs-mtp
- gvfs-nfs
- gvfs-smb
- light-locker
- onboard
- pantheon-agent-geoclue2
- pantheon-agent-polkit
Expand Down Expand Up @@ -64,7 +65,6 @@ packages:
- wingpanel-indicator-power
- wingpanel-indicator-session
- wingpanel-indicator-sound
- xdg-desktop-portal-gnome
#- xdg-desktop-portal-pantheon # provided by decathorpe/elementary-staging repo, which no longer exists as of 24-Feb-2023
- zeitgeist-libs
exclude-packages:
Expand Down
2 changes: 2 additions & 0 deletions src/packages/tools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ packages:
- distrobox
- ffmpeg
- git-core
- git-core-doc
- gstreamer1-plugins-good-gtk
- lm_sensors
- meson
- ncurses
- podman
- scrcpy
- skopeo
Expand Down
1 change: 1 addition & 0 deletions src/scripts/10-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function get_codename() {
case "$1" in
"4.0"*) echo "Nubia" ;;
"4.1"*) echo "Toniki" ;;
"4.2"*) echo "Bantu" ;;
"5.0"*) echo "Iberia" ;;
esac
}
Expand Down
25 changes: 10 additions & 15 deletions src/scripts/70-wallpaper.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
#!/usr/bin/env bash

_devel_wallpaper="devel-wallpaper"
_fallback_wallpaper="phil-botha-a0TJ3hy-UD8-unsplash"
_wallpaper_dir="/usr/share/backgrounds/default"

wallpaper=""
pantheon_system_background=""

case $_os_version_id in
"4.0"*) wallpaper="default/jeremy-gerritsen-_iviuukstI4-unsplash" ;;
"4.1"*) wallpaper="default/dustin-humes-OrO_HSqlZMY-unsplash" ;;
"5.0"*) wallpaper="default/zara-walker-_pC5hT6aXfs-unsplash" ;;
*)
wallpaper="$_devel_wallpaper"
pantheon_system_background="phil-botha-a0TJ3hy-UD8-unsplash"
;;
"4.0"*) wallpaper="jeremy-gerritsen-_iviuukstI4-unsplash" ;;
"4.1"*) wallpaper="dustin-humes-OrO_HSqlZMY-unsplash" ;;
"4.2"*) wallpaper="piermanuele-sberni-9jVmJ_mBRE8-unsplash~3967x2645" ;;
"5.0"*) wallpaper="zara-walker-_pC5hT6aXfs-unsplash" ;;
*) wallpaper="$_fallback_wallpaper" ;;
esac

[[ $pantheon_system_background == "" ]] && pantheon_system_background="$wallpaper"
[[ $wallpaper != $_devel_wallpaper ]] && rm "/usr/share/backgrounds/${_devel_wallpaper}.jpg"

if [[ -f "/usr/share/backgrounds/$wallpaper.jpg" ]]; then
set_property /usr/share/glib-2.0/schemas/00_sodalite.gschema.override picture-uri "'file:\/\/\/usr\/share\/backgrounds\/$(echo $wallpaper | sed "s|/|\\\/|g").jpg'"
if [[ -f "${_wallpaper_dir}/$wallpaper.jpg" ]]; then
set_property /usr/share/glib-2.0/schemas/00_sodalite.gschema.override picture-uri "'file:\/\/$(echo "${_wallpaper_dir}/$wallpaper" | sed "s|/|\\\/|g").jpg'"

if [[ $_os_core == "pantheon" ]]; then
ln -s /usr/share/backgrounds/$pantheon_system_background.jpg /usr/share/backgrounds/elementaryos-default
ln -s "${_wallpaper_dir}/$wallpaper.jpg" /usr/share/backgrounds/elementaryos-default
fi
fi
16 changes: 8 additions & 8 deletions src/shared/post.sh
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,17 @@ if [[ $(cat $_buildinfo_file) != "" ]]; then
[[ ! -z $(get_property $_buildinfo_file "GIT_TAG") ]] && \
_git_tag="$(get_property $_buildinfo_file "GIT_TAG")"

[[ ! -z $(get_property $_buildinfo_file "OS_ARCH") ]] && \
_os_arch="$(get_property $_buildinfo_file "OS_ARCH")"
[[ ! -z $(get_property $_buildinfo_file "TREE_REF") ]] && \
_os_ref="$(get_property $_buildinfo_file "TREE_REF")"

[[ ! -z $(get_property $_buildinfo_file "OS_CHANNEL") ]] && \
_os_channel="$(get_property $_buildinfo_file "OS_CHANNEL")"
[[ ! -z $(get_property $_buildinfo_file "TREE_REF_ARCH") ]] && \
_os_arch="$(get_property $_buildinfo_file "TREE_REF_ARCH")"

[[ ! -z $(get_property $_buildinfo_file "OS_REF") ]] && \
_os_ref="$(get_property $_buildinfo_file "OS_REF")"
[[ ! -z $(get_property $_buildinfo_file "TREE_REF_CHANNEL") ]] && \
_os_channel="$(get_property $_buildinfo_file "TREE_REF_CHANNEL")"

[[ ! -z $(get_property $_buildinfo_file "OS_VARIANT") ]] && \
_os_variant="$(get_property $_buildinfo_file "OS_VARIANT")"
[[ ! -z $(get_property $_buildinfo_file "TREE_REF_VARIANT") ]] && \
_os_variant="$(get_property $_buildinfo_file "TREE_REF_VARIANT")"

[[ ! -z $(get_property $_buildinfo_file "VENDOR") ]] && \
_vendor="$(get_property $_buildinfo_file "VENDOR")"
Expand Down
10 changes: 0 additions & 10 deletions tests/is-correct-fedora-release.sh

This file was deleted.

0 comments on commit 6764c55

Please sign in to comment.