Skip to content

Commit

Permalink
feat: Switch to topgrade powered ublue-update
Browse files Browse the repository at this point in the history
chore: Drop bling repo
chore: Restore minimum battery check thanks to patched library
  • Loading branch information
KyleGospo committed Jan 26, 2024
1 parent c90900b commit a4f5575
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 16 deletions.
5 changes: 2 additions & 3 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ RUN curl -Lo /tmp/starship.tar.gz "https://github.com/starship/starship/releases
install -c -m 0755 /tmp/starship /usr/bin && \
echo 'eval "$(starship init bash)"' >> /etc/bashrc

RUN wget https://copr.fedorainfracloud.org/coprs/ublue-os/bling/repo/fedora-$(rpm -E %fedora)/ublue-os-bling-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_ublue-os-bling.repo && \
wget https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
RUN wget https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
/tmp/build.sh && \
/tmp/image-info.sh && \
pip install --prefix=/usr yafti && \
pip install --prefix=/usr topgrade && \
rpm-ostree install ublue-update && \
mkdir -p /usr/etc/flatpak/remotes.d && \
wget -q https://dl.flathub.org/repo/flathub.flatpakrepo -P /usr/etc/flatpak/remotes.d && \
cp /tmp/ublue-update.toml /usr/etc/ublue-update/ublue-update.toml && \
Expand All @@ -89,7 +89,6 @@ RUN wget https://copr.fedorainfracloud.org/coprs/ublue-os/bling/repo/fedora-$(rp
find /tmp/just -iname '*.just' -exec printf "\n\n" \; -exec cat {} \; >> /usr/share/ublue-os/just/60-custom.just && \
rm -f /etc/yum.repos.d/tailscale.repo && \
rm -f /etc/yum.repos.d/charm.repo && \
rm -f /etc/yum.repos.d/_copr_ublue-os-bling.repo && \
rm -f /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
echo "Hidden=true" >> /usr/share/applications/fish.desktop && \
echo "Hidden=true" >> /usr/share/applications/htop.desktop && \
Expand Down
1 change: 0 additions & 1 deletion packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
"stress-ng",
"tailscale",
"tmux",
"ublue-update",
"usbmuxd",
"wireguard-tools",
"xprop",
Expand Down
2 changes: 1 addition & 1 deletion usr/etc/ublue-update/ublue-update.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[checks]
min_battery_percent = 0.0
min_battery_percent = 20.0
max_cpu_load_percent = 50.0
max_mem_percent = 90.0
[notify]
Expand Down
10 changes: 2 additions & 8 deletions usr/share/ublue-os/just/10-update.just
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,5 @@ alias upgrade := update

# Update system, flatpaks, and containers all at once
update:
/usr/bin/topgrade --config /usr/share/ublue-os/topgrade.toml --yes

# Update device firmware
[no-exit-message]
update-firmware:
/usr/bin/fwupdmgr refresh --force
/usr/bin/fwupdmgr get-updates
/usr/bin/fwupdmgr update
#!/usr/bin/bash
/usr/bin/topgrade --config /usr/share/ublue-os/topgrade.toml --keep
9 changes: 6 additions & 3 deletions usr/share/ublue-os/topgrade.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
[misc]
no_self_update = true
disable = ["self_update", "toolbx", "containers"]
ignore_failures = ["distrobox", "flatpak", "brew_cask", "brew_formula", "nix", "pip3", "helm", "home_manager", "firmware"]
assume_yes = true
no_retry = true
disable = ["toolbx", "self_update"]
ignore_failures = ["distrobox", "flatpak", "brew_cask", "brew_formula", "nix", "pip3"]
no_retry = false

[linux]
rpm_ostree = true

0 comments on commit a4f5575

Please sign in to comment.