Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Switch to topgrade powered ublue-update #835

Merged
merged 1 commit into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading