From afd8c23606bfc94294971faa691290b8ad6a7577 Mon Sep 17 00:00:00 2001 From: Ryan Bateman Date: Thu, 14 Nov 2024 23:17:31 -0900 Subject: [PATCH] fix: source LACT from copr instead of downloading from releases page (#1881) * (fix) Source LACT from copr instead of releaes page * fetch copr in containerfile * reinstate conditional to install libadwaita for silverblue stuff, and enable systemd unit in ujust * remove old lact-update stuff during topgrade --- Containerfile | 1 + .../desktop/shared/etc/ublue-os/topgrade.toml | 1 - .../shared/usr/libexec/topgrade/lact-update | 38 ------------------- .../share/ublue-os/just/82-bazzite-apps.just | 27 +++---------- 4 files changed, 7 insertions(+), 60 deletions(-) delete mode 100755 system_files/desktop/shared/usr/libexec/topgrade/lact-update diff --git a/Containerfile b/Containerfile index 6e38443d..23856644 100644 --- a/Containerfile +++ b/Containerfile @@ -218,6 +218,7 @@ RUN --mount=type=cache,dst=/var/cache/rpm-ostree \ curl -Lo /etc/yum.repos.d/_copr_rok-cdemu.repo https://copr.fedorainfracloud.org/coprs/rok/cdemu/repo/fedora-"${FEDORA_MAJOR_VERSION}"/rok-cdemu-fedora-"${FEDORA_MAJOR_VERSION}".rep && \ curl -Lo /etc/yum.repos.d/_copr_rodoma92-kde-cdemu-manager.repo https://copr.fedorainfracloud.org/coprs/rodoma92/kde-cdemu-manager/repo/fedora-"${FEDORA_MAJOR_VERSION}"/rodoma92-kde-cdemu-manager-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ curl -Lo /etc/yum.repos.d/_copr_rodoma92-rmlint.repo https://copr.fedorainfracloud.org/coprs/rodoma92/rmlint/repo/fedora-"${FEDORA_MAJOR_VERSION}"/rodoma92-rmlint-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ + curl -Lo /etc/yum.repos.d/_copr_ilyaz-lact.repo https://copr.fedorainfracloud.org/coprs/ilyaz/LACT/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ilyaz-LACT-fedora-"${FEDORA_MAJOR_VERSION}".repo && \ curl -Lo /etc/yum.repos.d/tailscale.repo https://pkgs.tailscale.com/stable/fedora/tailscale.repo && \ rpm-ostree install \ https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ diff --git a/system_files/desktop/shared/etc/ublue-os/topgrade.toml b/system_files/desktop/shared/etc/ublue-os/topgrade.toml index 490a32aa..6126ea8a 100644 --- a/system_files/desktop/shared/etc/ublue-os/topgrade.toml +++ b/system_files/desktop/shared/etc/ublue-os/topgrade.toml @@ -1,4 +1,3 @@ [commands] -"Linux AMDGPU Control Application" = "/usr/libexec/topgrade/lact-update" "Mozilla GNOME Themes" = "/usr/libexec/topgrade/mozilla-gnome-theme-update" "Third Party CSS Loader Themes" = "/usr/libexec/topgrade/third-party-css-loader-update" diff --git a/system_files/desktop/shared/usr/libexec/topgrade/lact-update b/system_files/desktop/shared/usr/libexec/topgrade/lact-update deleted file mode 100755 index 424209b1..00000000 --- a/system_files/desktop/shared/usr/libexec/topgrade/lact-update +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/bash -shopt -s nullglob - -IMAGE_INFO="/usr/share/ublue-os/image-info.json" -BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) - -echo "Looking for updates..." - -if [[ $(rpm -qa | grep lact) ]]; then - LACT_VERSION=$(curl -s https://api.github.com/repos/ilya-zlobintsev/LACT/releases/latest | jq -r '.tag_name | ltrimstr("v")') - if [[ ! $(rpm-ostree status --booted | grep lact | grep $LACT_VERSION) ]]; then - # This will check if *any* rpm-ostree pin has the newest version, so we don't update needlessly if a user just needs to reboot or is trying an older pin. - echo "Found upstream version v$LACT_VERSION, updating..." - ublue-update --wait - PACKAGE="lact" - if [[ ${BASE_IMAGE_NAME} == 'kinoite' ]]; then - echo 'Installing LACT...' - wget \ - $(curl -s https://api.github.com/repos/ilya-zlobintsev/LACT/releases/latest | \ - jq -r ".assets[] | select(.name | test(\"lact-[0-9].*fedora-$(rpm -E %fedora)\")) | .browser_download_url") \ - -O /tmp/lact.rpm - else - echo 'Installing LACT Libadwaita...' - wget \ - $(curl -s https://api.github.com/repos/ilya-zlobintsev/LACT/releases/latest | \ - jq -r ".assets[] | select(.name | test(\"lact-libadwaita.*fedora-$(rpm -E %fedora)\")) | .browser_download_url") \ - -O /tmp/lact.rpm - PACKAGE="lact-libadwaita" - fi - rpm-ostree remove "$PACKAGE" - rpm-ostree install /tmp/lact.rpm - echo "Update complete" - fi -else - echo "LACT not installed, skipping." -fi - -exit 0 diff --git a/system_files/desktop/shared/usr/share/ublue-os/just/82-bazzite-apps.just b/system_files/desktop/shared/usr/share/ublue-os/just/82-bazzite-apps.just index 8aa8cde2..ee0088cf 100644 --- a/system_files/desktop/shared/usr/share/ublue-os/just/82-bazzite-apps.just +++ b/system_files/desktop/shared/usr/share/ublue-os/just/82-bazzite-apps.just @@ -3,27 +3,12 @@ # Install LACT for overclocking & undervolting AMD GPUs install-lact: #!/usr/bin/bash - IMAGE_INFO="/usr/share/ublue-os/image-info.json" - BASE_IMAGE_NAME=$(jq -r '."base-image-name"' < $IMAGE_INFO) - ublue-update --wait - rpm-ostree kargs --append-if-missing=$(printf 'amdgpu.ppfeaturemask=0x%x\n' "$(($(cat /sys/module/amdgpu/parameters/ppfeaturemask) | 0x4000))") - if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then - echo 'Installing LACT Libadwaita...' - wget \ - $(curl -s https://api.github.com/repos/ilya-zlobintsev/LACT/releases/latest | \ - jq -r ".assets[] | select(.name | test(\"lact-libadwaita.*fedora-$(rpm -E %fedora)\")) | .browser_download_url") \ - -O /tmp/lact.rpm - else - echo 'Installing LACT...' - wget \ - $(curl -s https://api.github.com/repos/ilya-zlobintsev/LACT/releases/latest | \ - jq -r ".assets[] | select(.name | test(\"lact-[0-9].*fedora-$(rpm -E %fedora)\")) | .browser_download_url") \ - -O /tmp/lact.rpm - fi - rpm-ostree install --apply-live -y /tmp/lact.rpm - sudo systemctl enable --now lactd - rm /tmp/lact.rpm - echo 'Complete.' + if [[ ${BASE_IMAGE_NAME} == 'silverblue' ]]; then + rpm-ostree install lact-libadwaita + else + rpm-ostree install lact + fi + sudo systemctl enable --now lactd # Install CoolerControl, a GUI for viewing all your system's sensors and for creating custom fan and pump profiles based on any available temperature sensor28 install-coolercontrol: