Skip to content

Commit

Permalink
Merge pull request #15 from ublue-os/main
Browse files Browse the repository at this point in the history
[pull] main from ublue-os:main
  • Loading branch information
pull[bot] authored Oct 29, 2024
2 parents 29cf604 + 01a39ed commit cba6af4
Show file tree
Hide file tree
Showing 9 changed files with 143 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
is_latest_version: true
is_stable_version: true
kernel_flavor: bazzite # must match a kernel_flavor from akmods repo
kernel_version: 6.11.5-306.bazzite.fc41.x86_64 # must match a cached version of the above flavor
kernel_version: 6.11.5-307.bazzite.fc41.x86_64 # must match a cached version of the above flavor
exclude:
- base_name: bazzite
target_nvidia_flavor: nvidia
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ jobs:
curl -Lo ${{ github.workspace }}/bazzite.repo https://copr.fedorainfracloud.org/coprs/kylegospo/bazzite/repo/fedora-${{ matrix.major_version }}/kylegospo-bazzite-fedora-${{ matrix.major_version }}.repo
- name: Build ISOs
uses: jasonn3/build-container-installer@v1.2.2
uses: jasonn3/build-container-installer@f41
id: build
with:
arch: x86_64
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
CHANGELOG_FORMAT = """\
{handwritten}
Visit [bazzite.gg](https://bazzite.gg) for more information and to download Bazzite.
From previous `{target}` version `{prev}` there have been the following changes. **One package per new version shown.**
### Major packages
Expand All @@ -59,7 +57,7 @@
{changes}
### How to update
### How to rebase
For current users, type the following to rebase to this version:
```bash
# For this branch (if latest):
Expand Down Expand Up @@ -400,6 +398,9 @@ def main():
# Tags cannot include / anyway.
target = args.target.split('/')[-1]

if target == "main":
target = "stable"

manifests = get_manifests(target)
prev, curr = get_tags(target, manifests)
print(f"Previous tag: {prev}")
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/comment-filter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Comment filter
uses: DecimalTurn/Comment-Filter@9683f002007cc8739893f27123f6d3d857ea7808 #v0.1.4
uses: DecimalTurn/Comment-Filter@f0aa7694eca5172825c4b5a502dc110b5fe8603a #v0.2.1
18 changes: 13 additions & 5 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
--from repo=updates \
libv4l \
|| true && \
rpm-ostree override replace \
--experimental \
--from repo=updates \
elfutils-libelf \
elfutils-libs \
|| true && \
if grep -q "kinoite" <<< "${BASE_IMAGE_NAME}"; then \
rpm-ostree override replace \
--experimental \
Expand Down Expand Up @@ -270,11 +276,13 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \
mv -vf /tmp/linux-firmware-galileo/* /usr/lib/firmware/qca/ && \
rm -rf /tmp/linux-firmware-galileo && \
rm -rf /usr/share/alsa/ucm2/conf.d/acp5x/Valve-Jupiter-1.conf && \
ln -s /usr/local/lib/firmware/aw87xxx_acf.bin /usr/lib/firmware/aw87xxx_acf.bin && \
ln -s /usr/local/lib/firmware/aw87xxx_acf_air1s.bin /usr/lib/firmware/aw87xxx_acf_air1s.bin && \
ln -s /usr/local/lib/firmware/aw87xxx_acf_kun.bin /usr/lib/firmware/aw87xxx_acf_kun.bin && \
ln -s /usr/local/lib/firmware/aw87xxx_acf_minipro.bin /usr/lib/firmware/aw87xxx_acf_minipro.bin && \
ln -s /usr/local/lib/firmware/aw87xxx_acf_orangepi.bin /usr/lib/firmware/aw87xxx_acf_orangepi.bin && \
ln -s /usr/local/firmware/aw87xxx_acf.bin /usr/lib/firmware/aw87xxx_acf.bin && \
ln -s /usr/local/firmware/aw87xxx_acf_air1s.bin /usr/lib/firmware/aw87xxx_acf_air1s.bin && \
ln -s /usr/local/firmware/aw87xxx_acf_kun.bin /usr/lib/firmware/aw87xxx_acf_kun.bin && \
ln -s /usr/local/firmware/aw87xxx_acf_minipro.bin /usr/lib/firmware/aw87xxx_acf_minipro.bin && \
ln -s /usr/local/firmware/aw87xxx_acf_orangepi.bin /usr/lib/firmware/aw87xxx_acf_orangepi.bin && \
ln -s /usr/local/firmware/aw87xxx_acf_airplus.bin /usr/lib/firmware/aw87xxx_acf_airplus.bin && \
ln -s /usr/local/firmware/aw87xxx_acf_flip.bin /usr/lib/firmware/aw87xxx_acf_flip.bin && \
if [[ "${IMAGE_FLAVOR}" =~ "asus" ]]; then \
curl -Lo /etc/yum.repos.d/_copr_lukenukem-asus-linux.repo https://copr.fedorainfracloud.org/coprs/lukenukem/asus-linux/repo/fedora-$(rpm -E %fedora)/lukenukem-asus-linux-fedora-$(rpm -E %fedora).repo && \
rpm-ostree install \
Expand Down
Binary file added press_kit/art/Bazzite_41_Announcement.webp
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,21 @@ restore-input-remapper:
cp /usr/share/applications/input-remapper-gtk.desktop ~/.local/share/applications/input-remapper-gtk.desktop && \
sed -i '/NoDisplay=true/d' ~/.local/share/applications/input-remapper-gtk.desktop

# Install firmware files needed for ayaneo and orangepi speakers
install-speaker-firmare:
#!/bin/bash
BASE_DIR="https://raw.githubusercontent.com/hhd-dev/hwinfo/master/firmware/"
INSTALL_DIR="/usr/local/firmware"
if [ ! -d "$INSTALL_DIR" ]; then
sudo mkdir -p $INSTALL_DIR
fi
sudo wget -O $INSTALL_DIR/aw87xxx_acf_air1s.bin $BASE_DIR/awinic/aw87xxx_acf_air1s.bin
sudo wget -O $INSTALL_DIR/aw87xxx_acf_airplus.bin $BASE_DIR/awinic/aw87xxx_acf_airplus.bin
sudo wget -O $INSTALL_DIR/aw87xxx_acf_flip.bin $BASE_DIR/awinic/aw87xxx_acf_flip.bin
sudo wget -O $INSTALL_DIR/aw87xxx_acf_kun.bin $BASE_DIR/awinic/aw87xxx_acf_kun.bin
sudo wget -O $INSTALL_DIR/aw87xxx_acf_minipro.bin $BASE_DIR/awinic/aw87xxx_acf_minipro.bin
sudo wget -O $INSTALL_DIR/aw87xxx_acf_orangepi.bin $BASE_DIR/awinic/aw87xxx_acf_orangepi.bin

# Install hhd main branch locally until reboot, helpful for hhd testing and debugging. (rename to install-hhd-dev if we unhide)
_hhd-dev:
#!/usr/bin/bash
Expand Down
149 changes: 107 additions & 42 deletions system_files/desktop/shared/usr/bin/bazzite-rollback-helper
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

image="$(echo $2 | cut -d ':' -f1)"
branch="$(echo $2 | cut -d ':' -f2)"
image="$(echo "$2" | cut -d ':' -f1)"
branch="$(echo "$2" | cut -d ':' -f2)"

IMAGE_INFO="/usr/share/ublue-os/image-info.json"
DEFAULT_IMAGE=$(jq -r '."image-name"' < $IMAGE_INFO)
Expand All @@ -17,10 +17,10 @@ This tool aims to help with rollbacks and rebases
Usage: bazzite-rollback-helper [OPTION] [ARGUMENT]
Options:
list List available Bazzite images, Default is "$DEFAULT_BRANCH"
rollback Rolls back to previously installed Bazzite image. alias for "rpm-ostree rollback"
current Show currently active Bazzite image
rebase Rebase/rollback to specified Bazzite image, Default is $DEFAULT_IMAGE:$DEFAULT_BRANCH
list [BRANCH] List available Bazzite images, Default is "$DEFAULT_BRANCH"
rollback Rolls back to previously installed Bazzite image. alias for "rpm-ostree rollback"
current Show currently active Bazzite image
rebase Rebase/rollback to specified Bazzite image, Default is $DEFAULT_IMAGE:$DEFAULT_BRANCH
Examples:
bazzite-rollback-helper list stable
Expand All @@ -38,50 +38,115 @@ EOF
)


if [[ "$1" == "list" ]]; then
if [ -z "$2" ]; then
echo "Listing images for $DEFAULT_BRANCH"
skopeo list-tags docker://ghcr.io/ublue-os/bazzite | grep -E "\"$DEFAULT_BRANCH-[0-9]+\.[0-9]+|-$DEFAULT_BRANCH-[0-9]+" | sort -rV
else
echo "Listing images for $2"
skopeo list-tags docker://ghcr.io/ublue-os/bazzite | grep -E "\"$2-[0-9]+\.[0-9]+|-$2-[0-9]+" | sort -rV
function list_images() {
local _help="\
List images with a specified tag
INPUTS:
\$1: branch Branch we want to get tags from.
Fallbacks to \"$DEFAULT_BRANCH\"
"
if [[ $* =~ --help ]]; then
echo "$_help" && return
fi
local branch=${1:-$DEFAULT_BRANCH}
local regex='.Tags[]'
regex="$regex"\ ' | select(test("^PLACEHOLDER|^PLACEHOLDER-(?:\\d+\\.\\d+|\\d+)"))'
regex=${regex//PLACEHOLDER/$branch}
echo -e >&2 "Listing images for $branch\nThis can take a bit of time..."
skopeo list-tags docker://ghcr.io/ublue-os/bazzite | jq -r "$regex"
}

function current() {
local _help="\
Show currently active Bazzite image"
if [[ $* =~ --help ]]; then
echo "$_help" && return
fi

elif [[ "$1" == "rollback" ]]; then
rpm-ostree rollback
echo "Reboot for changes to take effect"
rpm-ostree status -vb
}

elif [[ "$1" == "current" ]]; then
# current image
rpm-ostree status | grep ●
# current version
rpm-ostree status | grep -A 5 "" | tail -n +2
function rollback() {
local _help="Rolls back to previously installed Bazzite image. alias for \"rpm-ostree rollback\""
if [[ $* =~ --help ]]; then
echo "$_help" && return
fi

elif [[ "$1" == "rebase" ]]; then
base_image=ostree-image-signed:docker://ghcr.io/ublue-os
rebase_target=$DEFAULT_IMAGE:$DEFAULT_BRANCH

if [ -z "$2" ]; then
rebase_target=$DEFAULT_IMAGE:$DEFAULT_BRANCH
else
if [ "$image" == "$branch" ]; then
# only branch was provided as an arg, use default image
rebase_target=$DEFAULT_IMAGE:$branch
else
rebase_target=$image:$branch
fi
rpm-ostree rollback && \
echo >&2 "Reboot for changes to take effect"
}

function rebase() {
local _help="\
Rebase/rollback to specified Bazzite image, Default is $DEFAULT_IMAGE:$DEFAULT_BRANCH
INPUTS:
\$1: branch Branch we want to rebase. Format must be
one of the following:
- ostree-image (ex.: 'ostree-image-signed:docker://ghcr.io/ublue-os/bazzite:stable')
- NAME:TAG (ex.: 'bazzite:stable-40')
- TAG (ex.: 'testing')
Fallbacks to \"$DEFAULT_BRANCH\"\
"
if [[ $* =~ --help ]]; then
local _help
echo "$_help" && return
fi
full_image_path=$base_image/$rebase_target

question=$(cat <<EOF
Rebasing to $full_image_path. Continue? [y/N]:
EOF
)
read -p "$question" yn
# Fetch our image reference prefix (ex.: ostree-image-signed:docker://ghcr.io/ublue-os)
# from rpm-ostree
local base_img_pfx
base_img_pfx=$(rpm-ostree status -b --json | jq -r '.deployments[]["container-image-reference"]')
base_img_pfx=${base_img_pfx///${DEFAULT_IMAGE}*/}

local img_ref # Final image ref string to rebase
local usr_inpt="$1"
case "$usr_inpt" in
"") echo >&2 "$_help"; return ;;
ostree-image-*)
# ostree-image
echo >&2 "Format detected"
img_ref=$usr_inpt
;;
*:*)
# IMG_NAME:TAG
echo >&2 "Format detected: IMG_NAME:TAG"
img_ref="$base_img_pfx"/"$usr_inpt"
;;
*)
# TAG
echo >&2 "Format detected: TAG"
img_ref="$base_img_pfx"/"$DEFAULT_IMAGE":"$usr_inpt"
;;
esac

# Ask for confirmation. If is okay, rebase.
local question="\
Rebasing to $img_ref. Continue? [y/N]: "
read -rp "$question" yn
case $yn in
[Yy]) echo "rebasing to $rebase_target" && rpm-ostree rebase $full_image_path && echo "Reboot for changes to take effect";;
*) echo "Unknown option, exiting.";;
# Finally, rebase
[yY]) rpm-ostree rebase "$img_ref" ;;
*) echo >&2 "Canceling..."; return ;;
esac
}

if [[ "$1" == "list" ]]; then
list_images "${@:2}"
exit

elif [[ "$1" == "rollback" ]]; then
rollback "${@:2}"
exit

elif [[ "$1" == "current" ]]; then
current "${@:2}"
exit

elif [[ "$1" == "rebase" ]]; then
rebase "${@:2}"
exit

# display the helptext
elif [[ "$1" == "-h" || "$1" == "--h" || "$1" == "-help" || "$1" == "--help" || "$1" == "help" || -z "$1" ]]; then
Expand Down
1 change: 1 addition & 0 deletions system_files/desktop/shared/usr/bin/brh

0 comments on commit cba6af4

Please sign in to comment.