diff --git a/.github/workflows/reusable-build-iso.yml b/.github/workflows/reusable-build-iso.yml index dbe9da43c8f..b81afe1d90f 100644 --- a/.github/workflows/reusable-build-iso.yml +++ b/.github/workflows/reusable-build-iso.yml @@ -140,7 +140,7 @@ jobs: docker rmi ${image} - name: Build ISOs - uses: jasonn3/build-container-installer@v1.2.0 + uses: jasonn3/build-container-installer@v1.2.1 id: build with: arch: x86_64 diff --git a/Justfile b/Justfile index c0f9f815668..9d4e92f7bd6 100644 --- a/Justfile +++ b/Justfile @@ -3,7 +3,7 @@ export git_branch := ` git branch --show-current` export gts := "39" export latest := "40" -alias run := run-booted-guest +alias run := run-container _default: @just help @@ -46,13 +46,12 @@ build image="" target="" version="": run-container image="" target="" version="": @{{ project_root }}/scripts/run-image.sh {{ image }} {{ target }} {{ version }} -# Run Booted Image Session w/ Guest -run-booted-guest image="" target="" version="": - @{{ project_root }}/scripts/run-booted-guest.sh {{ image }} {{ target }} {{ version }} - -# Run Booted Image Session w/ mounted in $USER and $HOME -run-booted-home image="" target="" version="": - @{{ project_root }}/scripts/run-booted-home.sh {{ image }} {{ target }} {{ version }} +# # Run Booted Image Session w/ Guest +# run-booted-guest image="" target="" version="": +# @{{ project_root }}/scripts/run-booted-guest.sh {{ image }} {{ target }} {{ version }} +# # Run Booted Image Session w/ mounted in $USER and $HOME +# run-booted-home image="" target="" version="": +# @{{ project_root }}/scripts/run-booted-home.sh {{ image }} {{ target }} {{ version }} # Create ISO from local dev build image build-iso image="" target="" version="": diff --git a/build_files/base/build-base.sh b/build_files/base/build-base.sh index 922d65c9e0a..1f63f51aa3d 100644 --- a/build_files/base/build-base.sh +++ b/build_files/base/build-base.sh @@ -18,4 +18,5 @@ set -ouex pipefail . /tmp/build/aurora-changes.sh . /tmp/build/branding.sh . /tmp/build/initramfs.sh +. /tmp/build/bootc.sh . /tmp/build/cleanup.sh diff --git a/build_files/base/copr-repos.sh b/build_files/base/copr-repos.sh index 24508dabb8c..6054a42bb4d 100644 --- a/build_files/base/copr-repos.sh +++ b/build_files/base/copr-repos.sh @@ -18,18 +18,12 @@ if [ "${FEDORA_MAJOR_VERSION}" -eq "39" ]; then --from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \ gtk4 \ vte291 \ - vte-profile \ libadwaita rpm-ostree install ptyxis fi # 40 Ptyxis if [ "${FEDORA_MAJOR_VERSION}" -eq "40" ]; then - rpm-ostree override replace \ - --experimental \ - --from repo=copr:copr.fedorainfracloud.org:ublue-os:staging \ - vte291 \ - vte-profile rpm-ostree install ptyxis fi diff --git a/build_files/shared/bootc.sh b/build_files/shared/bootc.sh new file mode 100644 index 00000000000..31e1db532f9 --- /dev/null +++ b/build_files/shared/bootc.sh @@ -0,0 +1,5 @@ +#!/usr/bin/bash + +if [ "$FEDORA_MAJOR_VERSION" -ge "40" ]; then + /usr/bin/bootupctl backend generate-update-metadata +fi diff --git a/build_files/shared/initramfs.sh b/build_files/shared/initramfs.sh index 033e28394ae..e58acf1a62f 100755 --- a/build_files/shared/initramfs.sh +++ b/build_files/shared/initramfs.sh @@ -4,11 +4,11 @@ set -oue pipefail # Remove nvidia specific files if [[ "${IMAGE_FLAVOR}" =~ "nvidia" ]]; then - rm /usr/lib/modprobe.d/nvk.conf - rm /usr/lib/modprobe.d/amd-legacy.conf + rm -f /usr/lib/modprobe.d/nvk.conf + rm -f /usr/lib/modprobe.d/amd-legacy.conf else - rm /usr/lib/dracut/dracut.conf.d/95-nvidia.conf - rm /usr/lib/modprobe.d/nvidia.conf + rm -f /usr/lib/dracut/dracut.conf.d/95-nvidia.conf + rm -f /usr/lib/modprobe.d/nvidia.conf fi if [[ "${AKMODS_FLAVOR}" == "surface" ]]; then diff --git a/packages.json b/packages.json index 40380495b29..786f8198b70 100644 --- a/packages.json +++ b/packages.json @@ -4,6 +4,7 @@ "all": [ "bash-color-prompt", "bcache-tools", + "bootc", "evtest", "epson-inkjet-printer-escpr", "epson-inkjet-printer-escpr2", diff --git a/scripts/build-image.sh b/scripts/build-image.sh index be6c21a5d20..e969d16bf48 100755 --- a/scripts/build-image.sh +++ b/scripts/build-image.sh @@ -21,15 +21,21 @@ container_mgr=$(just _container_mgr) base_image=$(just _base_image "${image}") tag=$(just _tag "${image}" "${target}") +# Build Command +command=( build -f Containerfile ) +if [[ ${container_mgr} == "docker" && ${TERM} == "dumb" ]]; then + command+=(--progress=plain) +fi +command+=( --build-arg="AKMODS_FLAVOR=main" ) +command+=( --build-arg="BASE_IMAGE_NAME=${base_image}" ) +command+=( --build-arg="SOURCE_IMAGE=${base_image}-main" ) +command+=( --build-arg="FEDORA_MAJOR_VERSION=${version}" ) +command+=( --build-arg="IMAGE_NAME=${tag}" ) +command+=( --build-arg="IMAGE_FLAVOR=main" ) +command+=( --build-arg="IMAGE_VENDOR=localhost" ) +command+=( --tag localhost/"${tag}:${version}-${git_branch}" ) +command+=( --target "${target}" ) +command+=( "${project_root}" ) + # Build Image -$container_mgr build -f Containerfile \ - --build-arg="AKMODS_FLAVOR=main" \ - --build-arg="BASE_IMAGE_NAME=${base_image}" \ - --build-arg="SOURCE_IMAGE=${base_image}-main" \ - --build-arg="FEDORA_MAJOR_VERSION=${version}" \ - --build-arg="IMAGE_NAME=${tag}" \ - --build-arg="IMAGE_FLAVOR=main" \ - --build-arg="IMAGE_VENDOR=localhost" \ - --tag localhost/"${tag}:${version}-${git_branch}" \ - --target "${target}" \ - "${project_root}" +$container_mgr ${command[@]} diff --git a/scripts/build-iso-installer-main.sh b/scripts/build-iso-installer-main.sh old mode 100644 new mode 100755 diff --git a/scripts/sudoif.sh b/scripts/sudoif.sh index aeb7c722972..75d825c3aa8 100644 --- a/scripts/sudoif.sh +++ b/scripts/sudoif.sh @@ -1,14 +1,16 @@ #!/usr/bin/bash function sudoif(){ - if [[ "${TERM_PROGRAM}" == "vscode" && \ + if [[ "${TERM_PROGRAM:-}" == "vscode" && \ ! -f /run/.containerenv && \ ! -f /.dockerenv ]]; then [[ $(command -v systemd-run) ]] && \ /usr/bin/systemd-run --uid=0 --gid=0 -d -E TERM="$TERM" -t -q -P -G "$@" \ || exit 1 + elif [[ $(command -v sudo) && -n ${SSH_ASKPASS:-} && ${DISPLAY:-} ]]; then + /usr/bin/sudo --askpass "$@" || exit 1 + elif [[ $(command -v sudo) ]]; then + /usr/bin/sudo "$@" || exit 1 else - [[ $(command -v sudo) ]] && \ - /usr/bin/sudo "$@" \ - || exit 1 + exit 1 fi }