diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a356a17f9fc..a236fe95b72 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -49,6 +49,13 @@ jobs: else echo "IMAGE_NAME=${{ format('{0}-{1}', matrix.base_name, matrix.image_flavor) }}" >> $GITHUB_ENV fi + if [[ "${{ matrix.image_flavor }}" =~ "asus" ]]; then + echo "AKMODS_FLAVOR=asus" >> $GITHUB_ENV + elif [[ "${{ matrix.image_flavor }}" =~ "surface" ]]; then + echo "AKMODS_FLAVOR=surface" >> $GITHUB_ENV + else + echo "AKMODS_FLAVOR=main" >> $GITHUB_ENV + fi - name: Generate tags id: generate-tags @@ -126,6 +133,7 @@ jobs: IMAGE_FLAVOR=${{ matrix.image_flavor }} FEDORA_MAJOR_VERSION=${{ matrix.major_version }} TARGET_BASE=${{ matrix.target_base }} + AKMODS_FLAVOR=${{ env.AKMODS_FLAVOR }} labels: ${{ steps.meta.outputs.labels }} oci: false # TODO(GH-280) diff --git a/Containerfile b/Containerfile index 16161ff2f1d..2ee457fdde0 100644 --- a/Containerfile +++ b/Containerfile @@ -1,5 +1,6 @@ ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME:-silverblue}" ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}" +ARG AKMODS_FLAVOR="${AKMODS_FLAVOR:-main}" ARG SOURCE_IMAGE="${SOURCE_IMAGE:-$BASE_IMAGE_NAME-$IMAGE_FLAVOR}" ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-38}" @@ -10,8 +11,9 @@ FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS bluefin ARG IMAGE_NAME="${IMAGE_NAME}" ARG IMAGE_VENDOR="ublue-os" -ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}" +ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}" +ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}" ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}" ARG PACKAGE_LIST="bluefin" @@ -25,9 +27,8 @@ COPY image-info.sh /tmp/image-info.sh COPY usr/etc/ublue-update/ublue-update.toml /tmp/ublue-update.toml # Add ublue kmods, add needed negativo17 repo and then immediately disable due to incompatibility with RPMFusion -COPY --from=ghcr.io/ublue-os/akmods:main-${FEDORA_MAJOR_VERSION} /rpms /tmp/akmods-rpms -RUN if [[ "${IMAGE_FLAVOR}" = "main" || "${IMAGE_NAME}" = "nvidia" ]]; then \ - sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \ +COPY --from=ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION} /rpms /tmp/akmods-rpms +RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \ wget https://negativo17.org/repos/fedora-multimedia.repo -O /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \ if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then \ rpm-ostree install \ @@ -43,8 +44,7 @@ RUN if [[ "${IMAGE_FLAVOR}" = "main" || "${IMAGE_NAME}" = "nvidia" ]]; then \ ; fi && \ sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \ mkdir -p /etc/akmods-rpms/ && \ - mv /tmp/akmods-rpms/kmods/*steamdeck*.rpm /etc/akmods-rpms/steamdeck.rpm \ -; fi + mv /tmp/akmods-rpms/kmods/*steamdeck*.rpm /etc/akmods-rpms/steamdeck.rpm # GNOME VRR RUN wget https://copr.fedorainfracloud.org/coprs/kylegospo/gnome-vrr/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-gnome-vrr-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/_copr_kylegospo-gnome-vrr.repo && \ diff --git a/just/custom.just b/just/custom.just index d8fd1f8e347..05eceece4a0 100644 --- a/just/custom.just +++ b/just/custom.just @@ -107,7 +107,8 @@ distrobox-universal: # Switch to the fish shell fish: - sudo lchsh $USER /usr/bin/fish + sudo usermod $USER --shell /usr/bin/fish + printf "${USER}'s shell is now %s." "$(cat /etc/passwd | grep ":$UID:" | cut '-d:' '-f7')" # Install recommended GNOME extensions gnome-extensions: @@ -155,7 +156,8 @@ nix-devbox-global: podmansh: sudo mkdir -p /etc/containers/systemd/users/${UID} sudo cp /usr/share/ublue-os/quadlets/podmansh.container /etc/containers/systemd/users/${UID}/podmansh.container - sudo lchsh $USER /usr/bin/podmansh + sudo usermod $USER --shell /usr/bin/podmansh + printf "${USER}'s shell is now %s." "$(cat /etc/passwd | grep ":$UID:" | cut '-d:' '-f7')" podman pull ghcr.io/ublue-os/ubuntu-toolbox:latest systemctl --user daemon-reload @@ -215,7 +217,8 @@ yafti: # Switch to the zsh shell zsh: - sudo lchsh $USER /usr/bin/zsh + sudo usermod $USER --shell /usr/bin/zsh + printf "${USER}'s shell is now %s." "$(cat /etc/passwd | grep ":$UID:" | cut '-d:' '-f7')" docker: sudo systemctl enable --now docker diff --git a/usr/bin/ublue-system-flatpak-manager b/usr/bin/ublue-system-flatpak-manager index a503caaa8ee..d4c3fca76cb 100755 --- a/usr/bin/ublue-system-flatpak-manager +++ b/usr/bin/ublue-system-flatpak-manager @@ -11,8 +11,6 @@ if [[ -f $VER_FILE && $VER = $VER_RAN ]]; then exit 0 fi -notify-send "Flatpak installer" "Currently installing system flatpaks" --app-name="Flatpak installer" -u NORMAL - # Remove fedora flatpak repo if grep -qz 'fedora' <<< $(flatpak remotes); then flatpak remote-delete --user fedora --force @@ -27,13 +25,14 @@ REMOVE_LIST=$(cat /etc/flatpak/system/remove) if [[ -n $INSTALL_LIST ]]; then for flatpak in $INSTALL_LIST; do if grep -qvz $flatpak <<< $FLATPAK_LIST; then - flatpak install --system --noninteractive flathub $flatpak + if ! flatpak install --system --noninteractive flathub $flatpak; then + # exit on error + exit 1 + fi fi done fi -notify-send "Flatpak installer" "Finished installing system flatpaks" --app-name="Flatpak installer" -u NORMAL - # Remove flatpaks in list if [[ -n $REMOVE_LIST ]]; then for flatpak in $REMOVE_LIST; do @@ -58,5 +57,7 @@ fi # Disable the system variant of the flathub repo flatpak remote-modify flathub --disable --system +notify-send "Flatpak installer" "Finished installing system flatpaks" --app-name="Flatpak installer" -u NORMAL + mkdir -p /etc/ublue echo $VER > $VER_FILE diff --git a/usr/bin/ublue-user-flatpak-manager b/usr/bin/ublue-user-flatpak-manager index 95d9b5eacd8..21abfafa427 100755 --- a/usr/bin/ublue-user-flatpak-manager +++ b/usr/bin/ublue-user-flatpak-manager @@ -19,20 +19,18 @@ FLATPAK_LIST=$(flatpak list --columns=application) INSTALL_LIST=$(cat /etc/flatpak/user/install) REMOVE_LIST=$(cat /etc/flatpak/user/remove) -notify-send "Flatpak installer" "Currently installing user flatpaks" --app-name="Flatpak installer" -u NORMAL - # Install flatpaks in list if [[ -n $INSTALL_LIST ]]; then for flatpak in $INSTALL_LIST; do if grep -qvz $flatpak <<< $FLATPAK_LIST; then - flatpak install --user --noninteractive flathub $flatpak + if ! flatpak install --user --noninteractive flathub $flatpak; then + # exit on error + exit 1 + fi fi done fi -notify-send "Flatpak installer" "Finished installing user flatpaks" --app-name="Flatpak installer" -u NORMAL - - # Remove flatpaks in list if [[ -n $REMOVE_LIST ]]; then for flatpak in $REMOVE_LIST; do @@ -42,4 +40,6 @@ if [[ -n $REMOVE_LIST ]]; then done fi +notify-send "Flatpak installer" "Finished installing user flatpaks" --app-name="Flatpak installer" -u NORMAL + echo $VER > $VER_FILE diff --git a/usr/etc/flatpak/system/remove b/usr/etc/flatpak/system/remove index e69de29bb2d..2dc7caf66af 100644 --- a/usr/etc/flatpak/system/remove +++ b/usr/etc/flatpak/system/remove @@ -0,0 +1,2 @@ +org.gnome.Cheese +org.gnome.eog diff --git a/usr/etc/flatpak/user/remove b/usr/etc/flatpak/user/remove index 2dc7caf66af..e69de29bb2d 100644 --- a/usr/etc/flatpak/user/remove +++ b/usr/etc/flatpak/user/remove @@ -1,2 +0,0 @@ -org.gnome.Cheese -org.gnome.eog diff --git a/usr/lib/systemd/system/ublue-system-flatpak-manager.service b/usr/lib/systemd/system/ublue-system-flatpak-manager.service index 41fe8ebd3bb..d3e1fe08ff5 100644 --- a/usr/lib/systemd/system/ublue-system-flatpak-manager.service +++ b/usr/lib/systemd/system/ublue-system-flatpak-manager.service @@ -8,6 +8,8 @@ After=network-online.target ublue-system-setup.service Type=oneshot ExecStart=/usr/bin/ublue-system-flatpak-manager Restart=on-failure +RestartSec=30 +StartLimitInterval=0 [Install] WantedBy=multi-user.target diff --git a/usr/lib/systemd/user/ublue-user-flatpak-manager.service b/usr/lib/systemd/user/ublue-user-flatpak-manager.service index 1398e805ca0..f900fbca9e6 100644 --- a/usr/lib/systemd/user/ublue-user-flatpak-manager.service +++ b/usr/lib/systemd/user/ublue-user-flatpak-manager.service @@ -8,6 +8,8 @@ After=network-online.target Type=oneshot ExecStart=/usr/bin/ublue-user-flatpak-manager Restart=on-failure +RestartSec=30 +StartLimitInterval=0 [Install] WantedBy=default.target