diff --git a/.github/workflows/build-image-latest.yml b/.github/workflows/build-image-latest.yml index 3058946e64e..78c2ff6b0f3 100644 --- a/.github/workflows/build-image-latest.yml +++ b/.github/workflows/build-image-latest.yml @@ -23,7 +23,7 @@ jobs: matrix: brand_name: ["bluefin"] with: - image_flavors: '["main", "nvidia", "hwe", "hwe-nvidia"]' + image_flavors: '["main", "nvidia", "nvidia-open", "hwe", "hwe-nvidia", "hwe-nvidia-open"]' brand_name: ${{ matrix.brand_name }} stream_name: latest # This needs splitting, right now a kernel pin will not work due to hwe kernel diff --git a/.github/workflows/build-iso-latest.yml b/.github/workflows/build-iso-latest.yml index 5e1b5525781..a6ca55211db 100644 --- a/.github/workflows/build-iso-latest.yml +++ b/.github/workflows/build-iso-latest.yml @@ -20,6 +20,6 @@ jobs: matrix: brand_name: ${{ fromJson(inputs.brand_name || '["bluefin"]') }} with: - image_flavors: '["main", "nvidia", "hwe", "hwe-nvidia"]' + image_flavors: '["main", "nvidia", "nvidia-open", "hwe", "hwe-nvidia", "hwe-nvidia-open"]' brand_name: ${{ matrix.brand_name }} stream_name: latest diff --git a/.github/workflows/reusable-build-iso.yml b/.github/workflows/reusable-build-iso.yml index 8489465cbf7..f9601a89238 100644 --- a/.github/workflows/reusable-build-iso.yml +++ b/.github/workflows/reusable-build-iso.yml @@ -4,7 +4,7 @@ on: inputs: image_flavors: description: "JSON string of flavors to build, '[main, nvidia, hwe, hwe-nvidia]'" - default: "['main', 'nvidia']" + default: "['main', 'nvidia', 'nvidia-open']" type: string brand_name: description: "The Brand Name: bluefin" diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml index f8535650cca..dd8248dcca3 100644 --- a/.github/workflows/reusable-build.yml +++ b/.github/workflows/reusable-build.yml @@ -4,7 +4,7 @@ on: inputs: image_flavors: description: "JSON string of flavors to build, '[main, nvidia, hwe, hwe-nvidia]'" - default: "['main', 'nvidia']" + default: "['main', 'nvidia', 'nvidia-open']" type: string brand_name: description: "The Brand Name: bluefin" diff --git a/Justfile b/Justfile index 64bbe3a3cf3..e70886b0938 100644 --- a/Justfile +++ b/Justfile @@ -8,12 +8,16 @@ images := '( flavors := '( [main]=main [nvidia]=nvidia + [nvidia-open]=nvidia-open [hwe]=hwe [hwe-nvidia]=hwe-nvidia + [hwe-nvidia-open]=hwe-nvidia-open [asus]=asus [asus-nvidia]=asus-nvidia + [asus-nvidia-open]=asus-nvidia-open [surface]=surface [surface-nvidia]=surface-nvidia + [surface-nvidia-open]=surface-nvidia-open )' tags := '( [gts]=gts @@ -68,17 +72,13 @@ sudo-clean: # Check if valid combo [group('Utility')] [private] -validate image="" tag="" flavor="": +validate $image $tag $flavor: #!/usr/bin/bash set -eou pipefail declare -A images={{ images }} declare -A tags={{ tags }} declare -A flavors={{ flavors }} - image={{ image }} - tag={{ tag }} - flavor={{ flavor }} - # Handle Stable Daily if [[ "${tag}" == "stable-daily" ]]; then tag="stable" @@ -126,12 +126,9 @@ sudoif command *args: # Build Image [group('Image')] -build image="bluefin" tag="latest" flavor="main" rechunk="0" ghcr="0" pipeline="0" kernel_pin="": +build $image="bluefin" $tag="latest" $flavor="main" rechunk="0" ghcr="0" pipeline="0" $kernel_pin="": #!/usr/bin/bash set -eoux pipefail - image={{ image }} - tag={{ tag }} - flavor={{ flavor }} # Validate just validate "${image}" "${tag}" "${flavor}" @@ -170,7 +167,6 @@ build image="bluefin" tag="latest" flavor="main" rechunk="0" ghcr="0" pipeline=" just verify-container "${base_image_name}-main:${fedora_version}" # Kernel Release/Pin - kernel_pin="{{ kernel_pin }}" if [[ -z "${kernel_pin:-}" ]]; then kernel_release=$(skopeo inspect --retry-times 3 docker://ghcr.io/ublue-os/${akmods_flavor}-kernel:"${fedora_version}" | jq -r '.Labels["ostree.linux"]') else @@ -183,7 +179,9 @@ build image="bluefin" tag="latest" flavor="main" rechunk="0" ghcr="0" pipeline=" if [[ "${akmods_flavor}" =~ coreos ]]; then just verify-container "akmods-zfs:${akmods_flavor}-${fedora_version}-${kernel_release}" fi - if [[ "${flavor}" =~ nvidia ]]; then + if [[ "${flavor}" =~ nvidia-open ]]; then + just verify-container "akmods-nvidia-open:${akmods_flavor}-${fedora_version}-${kernel_release}" + elif [[ "${flavor}" =~ nvidia ]]; then just verify-container "akmods-nvidia:${akmods_flavor}-${fedora_version}-${kernel_release}" fi @@ -261,14 +259,10 @@ build-pipeline image="bluefin" tag="latest" flavor="main" kernel_pin="": # Rechunk Image [group('Image')] [private] -rechunk image="bluefin" tag="latest" flavor="main" ghcr="0" pipeline="0": +rechunk $image="bluefin" $tag="latest" $flavor="main" ghcr="0" pipeline="0": #!/usr/bin/bash set -eoux pipefail - image={{ image }} - tag={{ tag }} - flavor={{ flavor }} - # Validate just validate "${image}" "${tag}" "${flavor}" @@ -414,12 +408,9 @@ load-rechunk image="bluefin" tag="latest" flavor="main": # Run Container [group('Image')] -run image="bluefin" tag="latest" flavor="main": +run $image="bluefin" $tag="latest" $flavor="main": #!/usr/bin/bash set -eoux pipefail - image={{ image }} - tag={{ tag }} - flavor={{ flavor }} # Validate just validate "${image}" "${tag}" "${flavor}" @@ -438,12 +429,9 @@ run image="bluefin" tag="latest" flavor="main": # Build ISO [group('ISO')] -build-iso image="bluefin" tag="latest" flavor="main" ghcr="0" pipeline="0": +build-iso $image="bluefin" $tag="latest" $flavor="main" ghcr="0" pipeline="0": #!/usr/bin/bash set -eoux pipefail - image={{ image }} - tag={{ tag }} - flavor={{ flavor }} # Validate just validate "${image}" "${tag}" "${flavor}" @@ -574,12 +562,9 @@ build-iso-ghcr image="bluefin" tag="latest" flavor="main": # Run ISO [group('ISO')] -run-iso image="bluefin" tag="latest" flavor="main": +run-iso $image="bluefin" $tag="latest" $flavor="main": #!/usr/bin/bash set -eoux pipefail - image={{ image }} - tag={{ tag }} - flavor={{ flavor }} # Validate just validate "${image}" "${tag}" "${flavor}" @@ -658,12 +643,9 @@ verify-container container="" registry="ghcr.io/ublue-os" key="": # Secureboot Check [group('Utility')] -secureboot image="bluefin" tag="latest" flavor="main": +secureboot $image="bluefin" $tag="latest" $flavor="main": #!/usr/bin/bash set -eoux pipefail - image={{ image }} - tag={{ tag }} - flavor={{ flavor }} # Validate just validate "${image}" "${tag}" "${flavor}" diff --git a/build_files/base/03-install-kernel-akmods.sh b/build_files/base/03-install-kernel-akmods.sh index e32c1cc61aa..a0fad0db84c 100755 --- a/build_files/base/03-install-kernel-akmods.sh +++ b/build_files/base/03-install-kernel-akmods.sh @@ -36,8 +36,8 @@ rpm-ostree install \ # RPMFUSION Dependent AKMODS rpm-ostree install \ - https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \ - https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm + https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-"$(rpm -E %fedora)".noarch.rpm \ + https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-"$(rpm -E %fedora)".noarch.rpm rpm-ostree install \ v4l2loopback /tmp/akmods/kmods/*v4l2loopback*.rpm rpm-ostree uninstall rpmfusion-free-release rpmfusion-nonfree-release @@ -45,7 +45,11 @@ rpm-ostree uninstall rpmfusion-free-release rpmfusion-nonfree-release # Nvidia AKMODS if [[ "${IMAGE_NAME}" =~ nvidia ]]; then # Fetch Nvidia RPMs - skopeo copy --retry-times 3 docker://ghcr.io/ublue-os/akmods-nvidia:"${AKMODS_FLAVOR}"-"$(rpm -E %fedora)"-"${KERNEL}" dir:/tmp/akmods-rpms + if [[ "${IMAGE_NAME}" =~ open ]]; then + skopeo copy --retry-times 3 docker://ghcr.io/ublue-os/akmods-nvidia-open:"${AKMODS_FLAVOR}"-"$(rpm -E %fedora)"-"${KERNEL}" dir:/tmp/akmods-rpms + else + skopeo copy --retry-times 3 docker://ghcr.io/ublue-os/akmods-nvidia:"${AKMODS_FLAVOR}"-"$(rpm -E %fedora)"-"${KERNEL}" dir:/tmp/akmods-rpms + fi NVIDIA_TARGZ=$(jq -r '.layers[].digest' < /tmp/akmods-rpms/manifest.json | cut -d : -f 2) tar -xvzf /tmp/akmods-rpms/"$NVIDIA_TARGZ" -C /tmp/ mv /tmp/rpms/* /tmp/akmods-rpms/ @@ -55,6 +59,7 @@ if [[ "${IMAGE_NAME}" =~ nvidia ]]; then chmod +x /tmp/nvidia-install.sh IMAGE_NAME="${BASE_IMAGE_NAME}" RPMFUSION_MIRROR="" /tmp/nvidia-install.sh rm -f /usr/share/vulkan/icd.d/nouveau_icd.*.json + ln -sf libnvidia-ml.so.1 /usr/lib64/libnvidia-ml.so fi # ZFS for gts/stable