Skip to content

Commit

Permalink
Merge branch 'unstable' into fix-yafti-again
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleGospo authored Nov 1, 2024
2 parents 58cbd3a + 4eb59f6 commit 81e6509
Show file tree
Hide file tree
Showing 6 changed files with 98 additions and 225 deletions.
91 changes: 38 additions & 53 deletions .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-307.bazzite.fc41.x86_64 # must match a cached version of the above flavor
kernel_version: 6.11.5-310.bazzite.fc41.x86_64 # must match a cached version of the above flavor
exclude:
- base_name: bazzite
target_nvidia_flavor: nvidia
Expand Down Expand Up @@ -172,7 +172,7 @@ jobs:
sudo podman pull ${{ env.IMAGE_REGISTRY }}/akmods-${{ matrix.target_nvidia_flavor }}:${{ matrix.kernel_flavor}}-${{ matrix.fedora_version }}-${{ matrix.kernel_version }}
# Add rechunk as well to remove this source of failure
sudo podman pull ghcr.io/hhd-dev/rechunk:v0.8.3
sudo podman pull ghcr.io/hhd-dev/rechunk:v1.0.1
- name: Get source versions
id: labels
Expand Down Expand Up @@ -268,16 +268,35 @@ jobs:
echo "Generated the following:"
cat $GITHUB_OUTPUT
- name: Check Secureboot
shell: bash
run: |
set -x
if [[ ! $(command -v sbverify) || ! $(command -v curl) || ! $(command -v openssl) ]]; then
sudo apt update
sudo apt install sbsigntool curl openssl
fi
TMP=$(sudo podman create raw-img bash)
sudo podman cp $TMP:/usr/lib/modules/${{ matrix.kernel_version }}/vmlinuz .
sudo podman rm $TMP
sudo chmod 666 vmlinuz # might not be needed
sbverify --list vmlinuz
curl --retry 3 -Lo kernel-sign.der https://github.com/ublue-os/kernel-cache/raw/main/certs/public_key.der
curl --retry 3 -Lo akmods.der https://github.com/ublue-os/kernel-cache/raw/main/certs/public_key_2.der
openssl x509 -in kernel-sign.der -out kernel-sign.crt
openssl x509 -in akmods.der -out akmods.crt
sbverify --cert kernel-sign.crt vmlinuz || exit 1
sbverify --cert akmods.crt vmlinuz || exit 1
# Reprocess raw-img using rechunker which will delete it
- name: Run Rechunker
id: rechunk
uses: hhd-dev/rechunk@v0.8.6
uses: hhd-dev/rechunk@v1.0.1
with:
rechunk: 'ghcr.io/hhd-dev/rechunk:v0.8.3'
rechunk: 'ghcr.io/hhd-dev/rechunk:v1.0.1'
ref: 'raw-img'
prev-ref: '${{ steps.generate-prev-ref.outputs.ref }}'
version: '${{ steps.generate-version.outputs.tag }}'
skip_compression: 1
labels: |
io.artifacthub.package.logo-url=https://raw.githubusercontent.com/ublue-os/bazzite/main/repo_content/logo.png
io.artifacthub.package.readme-url=https://docs.bazzite.gg
Expand Down Expand Up @@ -352,36 +371,6 @@ jobs:
done
echo "alias_tags=${BUILD_TAGS[*]}" >> $GITHUB_OUTPUT
# Pull oci-dir image, remove oci dir to make space, and then tag appropriately
- name: Load in podman and tag
run: |
IMAGE=$(podman pull ${{ steps.rechunk.outputs.ref }})
sudo rm -rf ${{ steps.rechunk.outputs.output }}
for tag in ${{ steps.generate-tags.outputs.alias_tags }}; do
podman tag $IMAGE ${{ env.IMAGE_NAME }}:$tag
done
# keep for secureboot check
podman tag $IMAGE rechunked-img
- name: Check Secureboot
shell: bash
run: |
set -x
if [[ ! $(command -v sbverify) || ! $(command -v curl) || ! $(command -v openssl) ]]; then
sudo apt update
sudo apt install sbsigntool curl openssl
fi
TMP=$(podman create rechunked-img bash)
podman cp $TMP:/usr/lib/modules/${{ matrix.kernel_version }}/vmlinuz .
podman rm $TMP
sbverify --list vmlinuz
curl --retry 3 -Lo kernel-sign.der https://github.com/ublue-os/kernel-cache/raw/main/certs/public_key.der
curl --retry 3 -Lo akmods.der https://github.com/ublue-os/kernel-cache/raw/main/certs/public_key_2.der
openssl x509 -in kernel-sign.der -out kernel-sign.crt
openssl x509 -in akmods.der -out akmods.crt
sbverify --cert kernel-sign.crt vmlinuz || exit 1
sbverify --cert akmods.crt vmlinuz || exit 1
# Workaround bug where capital letters in your GitHub username make it impossible to push to GHCR.
# https://github.com/macbre/push-to-ghcr/issues/12
- name: Lowercase Registry
Expand All @@ -395,21 +384,22 @@ jobs:
uses: Wandalen/[email protected]
id: push
if: github.event_name != 'pull_request'
env:
REGISTRY_USER: ${{ github.actor }}
REGISTRY_PASSWORD: ${{ github.token }}
with:
action: redhat-actions/push-to-registry@v2
attempt_limit: 3
attempt_delay: 15000
with: |
image: ${{ env.IMAGE_NAME }}
tags: ${{ steps.generate-tags.outputs.alias_tags }}
registry: ${{ steps.registry_case.outputs.lowercase }}
username: ${{ env.REGISTRY_USER }}
password: ${{ env.REGISTRY_PASSWORD }}
extra-args: |
--compression-format=zstd:chunked
command: |
echo "${{ secrets.GITHUB_TOKEN }}" | sudo podman login ghcr.io -u ${{ github.actor }} --password-stdin
for tag in ${{ steps.generate-tags.outputs.alias_tags }}; do
sudo skopeo copy ${{ steps.rechunk.outputs.ref }} docker://${{ steps.registry_case.outputs.lowercase }}/${{ env.IMAGE_NAME }}:$tag
done
- name: Get Image Digest
id: digest
run: |
# Get digest for signing
DIGEST=$(sudo skopeo inspect --format '{{.Digest}}' ${{ steps.rechunk.outputs.ref }})
echo "Digest is: $DIGEST"
echo "digest=${DIGEST}" >> $GITHUB_OUTPUT
- name: Sign container image
uses: EyeCantCU/cosign-action/[email protected]
Expand All @@ -418,12 +408,7 @@ jobs:
containers: ${{ env.IMAGE_NAME }}
registry-token: ${{ secrets.GITHUB_TOKEN }}
signing-secret: ${{ secrets.SIGNING_SECRET }}
tags: ${{ steps.push.outputs.outputs && fromJSON(steps.push.outputs.outputs).digest }}

- name: Echo outputs
if: github.event_name != 'pull_request'
run: |
echo "${{ toJSON(steps.push.outputs) }}"
tags: ${{ steps.digest.outputs.digest }}

generate_release:
name: Generate Release
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_iso.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
- bazzite-gnome-asus-nvidia
- bazzite-asus-nvidia-open
- bazzite-gnome-asus-nvidia-open
major_version: [40]
major_version: [41]
steps:

- name: Free Disk Space (Ubuntu)
Expand Down 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/[email protected].2
uses: jasonn3/[email protected].3
id: build
with:
arch: x86_64
Expand Down
6 changes: 3 additions & 3 deletions spec_files/steamdeck-dsp/bazzite.patch
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ index ac7adb6..d46bb14 100755
for cffile in "$prpath"/"$confd"/*.conf
do
- [ -f "$cffile" ] && cp -av "$cffile" $runconf/"$confd"
+ [ -f "$cffile" ] && /usr/bin/cp -avf "$cffile" $confdir/"$confd"
+ [ -f "$cffile" ] && /usr/bin/cp -avf "$cffile" $confdir/"$confd" || true
done
fi
done
Expand Down Expand Up @@ -90,14 +90,14 @@ index 3f03354..1e43489 100755
for cffile in "$prpath"/"$confd"/*.lua
do
- [ -f "$cffile" ] && cp -av "$cffile" $runconf/"$confd"
+ [ -f "$cffile" ] && /usr/bin/cp -avf "$cffile" $confdir/"$confd"
+ [ -f "$cffile" ] && /usr/bin/cp -avf "$cffile" $confdir/"$confd" || true
done
;;
*.conf.d)
for cffile in "$prpath"/"$confd"/*.conf
do
- [ -f "$cffile" ] && cp -av "$cffile" $runconf/"$confd"
+ [ -f "$cffile" ] && /usr/bin/cp -avf "$cffile" $confdir/"$confd"
+ [ -f "$cffile" ] && /usr/bin/cp -avf "$cffile" $confdir/"$confd" || true
done
;;
esac
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,26 +89,6 @@ enable-ryzenadj-max-performance:
sudo udevadm control --reload-rules
echo 'installation complete. Reboot to take effect'

# toggles password prompt feedback in terminal, where sudo password prompts will display asterisks when enabled
toggle-password-feedback ACTION="":
#!/usr/bin/bash
PWFEEDBACK_FILE="/etc/sudoers.d/enable-pwfeedback"
OPTION={{ ACTION }}

if [ "$OPTION" = "on" ]; then
echo 'Defaults pwfeedback' | sudo tee $PWFEEDBACK_FILE
echo "enabled, restart terminal to see changes"
elif [ "$OPTION" = "off" ]; then
sudo rm -f $PWFEEDBACK_FILE
echo "disabled pwfeedback. restart your terminal to see changes"
elif sudo test -f $PWFEEDBACK_FILE; then
sudo rm -f $PWFEEDBACK_FILE
echo "disabled pwfeedback. restart your terminal to see changes"
else
echo 'Defaults pwfeedback' | sudo tee $PWFEEDBACK_FILE
echo "enabled, restart terminal to see changes"
fi

# disables ryzenadj --max-performance on AC power
disable-ryzenadj-max-performance:
#/bin/bash
Expand Down
Loading

0 comments on commit 81e6509

Please sign in to comment.