From f4c7679a2e8bc954ed185b4069f6fba246fda392 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Tue, 7 May 2024 14:49:02 -0400 Subject: [PATCH 01/24] feat: add bootc --- packages.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages.json b/packages.json index 437a3211012..4b8eff9091c 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", From 0b4fcd396f3e2252f069f6987fae2f7e5f36cc43 Mon Sep 17 00:00:00 2001 From: Noel Miller Date: Thu, 9 May 2024 15:40:31 -0500 Subject: [PATCH 02/24] chore: test bootc --- packages.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages.json b/packages.json index 437a3211012..4b8eff9091c 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", From 66cea9124015c06d214811948ea025ac884ecd70 Mon Sep 17 00:00:00 2001 From: Noel Miller Date: Thu, 9 May 2024 15:43:31 -0500 Subject: [PATCH 03/24] chore: switch to main to test bootc --- .github/workflows/reusable-build-iso.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-iso.yml b/.github/workflows/reusable-build-iso.yml index 475cedae88d..bb3a2ce3061 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@main id: build with: arch: x86_64 From 30059e4d6c49e7c0fc2838cfd1a1f6e35a8af7fb Mon Sep 17 00:00:00 2001 From: Noel Miller Date: Thu, 9 May 2024 16:46:27 -0500 Subject: [PATCH 04/24] fix: add bootupctl command to generate metadata --- build_files/base/bootc.sh | 6 ++++++ build_files/base/build-base.sh | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 build_files/base/bootc.sh diff --git a/build_files/base/bootc.sh b/build_files/base/bootc.sh new file mode 100644 index 00000000000..b53c855d23d --- /dev/null +++ b/build_files/base/bootc.sh @@ -0,0 +1,6 @@ +#!/usr/bin/bash + +set -ouex pipefail + +# Transforms /usr/lib/ostree-boot into a bootupd-compatible update payload +/usr/bin/bootupctl backend generate-update-metadata diff --git a/build_files/base/build-base.sh b/build_files/base/build-base.sh index 17ec29c4481..58aac61bae1 100644 --- a/build_files/base/build-base.sh +++ b/build_files/base/build-base.sh @@ -16,4 +16,5 @@ set -ouex pipefail . /tmp/build/aurora-changes.sh . /tmp/build/branding.sh . /tmp/build/initramfs.sh -. /tmp/build/cleanup.sh \ No newline at end of file +. /tmp/build/bootc.sh +. /tmp/build/cleanup.sh From 0be1784a0dcf462d900e2a11f354b1947f76a6af Mon Sep 17 00:00:00 2001 From: Noel Miller Date: Thu, 9 May 2024 17:52:06 -0500 Subject: [PATCH 05/24] chore: test bootc updates --- packages.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages.json b/packages.json index 4b8eff9091c..07310e2dde1 100644 --- a/packages.json +++ b/packages.json @@ -33,6 +33,7 @@ "samba-winbind-clients", "samba-winbind-modules", "samba", + "sl", "solaar", "stress-ng", "tailscale", From 70b1d17f2ddbeb979543d33417ac2613684015cc Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sat, 11 May 2024 19:12:38 +0000 Subject: [PATCH 06/24] chore: test bootc before initramfs generation --- Justfile | 4 +++ build_files/base/build-base.sh | 2 +- packages.json | 1 - scripts/build-iso-intstaller-main.sh | 37 ++++++++++++++++++++++++++++ 4 files changed, 42 insertions(+), 2 deletions(-) create mode 100755 scripts/build-iso-intstaller-main.sh diff --git a/Justfile b/Justfile index 4c1e2d9c7b3..9028dbf958a 100644 --- a/Justfile +++ b/Justfile @@ -55,6 +55,10 @@ run-booted-home image="" target="" version="": build-iso image="" target="" version="": @{{ project_root }}/scripts/build-iso.sh {{ image }} {{ target }} {{ version }} +# Create ISO from local dev build image - use build-container-installer:main +build-iso-installer-main image="" target="" version="": + @{{ project_root }}/scripts/build-iso-intstaller-main.sh {{ image }} {{ target }} {{ version }} + # Run ISO from local dev build image run-iso image="" target="" version="": @{{ project_root }}/scripts/run-iso.sh {{ image }} {{ target }} {{ version }} diff --git a/build_files/base/build-base.sh b/build_files/base/build-base.sh index 58aac61bae1..b89749711fb 100644 --- a/build_files/base/build-base.sh +++ b/build_files/base/build-base.sh @@ -15,6 +15,6 @@ set -ouex pipefail . /tmp/build/bluefin-changes.sh . /tmp/build/aurora-changes.sh . /tmp/build/branding.sh -. /tmp/build/initramfs.sh . /tmp/build/bootc.sh +. /tmp/build/initramfs.sh . /tmp/build/cleanup.sh diff --git a/packages.json b/packages.json index 07310e2dde1..4b8eff9091c 100644 --- a/packages.json +++ b/packages.json @@ -33,7 +33,6 @@ "samba-winbind-clients", "samba-winbind-modules", "samba", - "sl", "solaar", "stress-ng", "tailscale", diff --git a/scripts/build-iso-intstaller-main.sh b/scripts/build-iso-intstaller-main.sh new file mode 100755 index 00000000000..e6c4505050c --- /dev/null +++ b/scripts/build-iso-intstaller-main.sh @@ -0,0 +1,37 @@ +#!/usr/bin/bash +#shellcheck disable=SC2154 + +if [[ -z ${project_root} ]]; then + project_root=$(git rev-parse --show-toplevel) +fi + +# Common Build ISO +# shellcheck disable=SC1091 +. "${project_root}/scripts/common-build-iso.sh" + +if [[ ${container_mgr} =~ "podman" ]]; then + api_socket=/run/podman/podman.sock +elif [[ ${container_mgr} =~ "docker" ]]; then + api_socket=/var/run/docker.sock +fi + +# Make ISO +${container_mgr} run --rm --privileged \ + --volume "${api_socket}":/var/run/docker.sock \ + --volume "${workspace}"/scripts/files/build-iso-makefile-patch:/build-container-installer/container/Makefile \ + --volume "${workspace}/${flatpak_dir_shortname}":"/build-container-installer/${flatpak_dir_shortname}" \ + --volume "${workspace}"/scripts/files/output:/build-container-installer/build \ + ghcr.io/jasonn3/build-container-installer:main \ + ARCH="x86_64" \ + ENABLE_CACHE_DNF="false" \ + ENABLE_CACHE_SKOPEO="false" \ + ENABLE_FLATPAK_DEPENDENCIES="false" \ + ENROLLMENT_PASSWORD="ublue-os" \ + FLATPAK_REMOTE_REFS_DIR="${flatpak_dir_shortname}" \ + IMAGE_NAME="${tag}" \ + IMAGE_REPO="localhost" \ + IMAGE_TAG="${version}" \ + ISO_NAME="build/${tag}-${version}.iso" \ + SECURE_BOOT_KEY_URL='https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' \ + VARIANT="${variant}" \ + VERSION="${version}" \ No newline at end of file From 9776d69d85c742e7e34d264d1826836af8c9349a Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sat, 11 May 2024 21:18:54 +0000 Subject: [PATCH 07/24] feat: brew during build fix: iso permissions for cleanup --- build_files/base/brew.sh | 7 +++++++ build_files/base/systemd.sh | 1 + scripts/build-iso-ghcr.sh | 4 +++- scripts/build-iso.sh | 4 +++- scripts/cleanup-dir.sh | 4 ++-- scripts/common-build-iso.sh | 4 ++-- .../lib/systemd/system/brew-overlay.service | 20 +++++++++++++++++++ .../shared/usr/lib/tmpfiles.d/linuxbrew.conf | 3 +++ 8 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 build_files/base/brew.sh create mode 100644 system_files/shared/usr/lib/systemd/system/brew-overlay.service create mode 100644 system_files/shared/usr/lib/tmpfiles.d/linuxbrew.conf diff --git a/build_files/base/brew.sh b/build_files/base/brew.sh new file mode 100644 index 00000000000..2447e74c478 --- /dev/null +++ b/build_files/base/brew.sh @@ -0,0 +1,7 @@ +#!/usr/bin/bash + +curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh > /tmp/brew.sh +chmod +x /tmp/brew.sh +mkdir /var/home +ln -s /usr/lib/homebrew /var/home/linuxbrew +env CLI=1 NONINTERACTIVE=1 /tmp/brew.sh \ No newline at end of file diff --git a/build_files/base/systemd.sh b/build_files/base/systemd.sh index 910cc12327f..114a88fc567 100644 --- a/build_files/base/systemd.sh +++ b/build_files/base/systemd.sh @@ -10,5 +10,6 @@ systemctl enable ublue-update.timer systemctl enable ublue-system-setup.service systemctl enable ublue-etc-merge.service systemctl enable ublue-guest-user.service +systemctl enable brew-overlay.service systemctl --global enable ublue-user-setup.service systemctl --global enable podman-auto-update.timer \ No newline at end of file diff --git a/scripts/build-iso-ghcr.sh b/scripts/build-iso-ghcr.sh index 574f21024c8..0f5ad54f27d 100755 --- a/scripts/build-iso-ghcr.sh +++ b/scripts/build-iso-ghcr.sh @@ -26,4 +26,6 @@ ${container_mgr} run --rm --privileged \ ISO_NAME="build/${ghcr_tag}-${version}-ghcr.iso" \ SECURE_BOOT_KEY_URL='https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' \ VARIANT="${variant}" \ - VERSION="${version}" \ No newline at end of file + VERSION="${version}" + +sudo chown -R "${USER}:${USER}" "${project_root}/scripts/files/output" \ No newline at end of file diff --git a/scripts/build-iso.sh b/scripts/build-iso.sh index b891d9458eb..fef5312f126 100755 --- a/scripts/build-iso.sh +++ b/scripts/build-iso.sh @@ -34,4 +34,6 @@ ${container_mgr} run --rm --privileged \ ISO_NAME="build/${tag}-${version}.iso" \ SECURE_BOOT_KEY_URL='https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' \ VARIANT="${variant}" \ - VERSION="${version}" \ No newline at end of file + VERSION="${version}" + +sudo chown -R "${USER}:${USER}" "${project_root}/scripts/files/output" \ No newline at end of file diff --git a/scripts/cleanup-dir.sh b/scripts/cleanup-dir.sh index 24dded07a9f..54ed00da9f6 100755 --- a/scripts/cleanup-dir.sh +++ b/scripts/cleanup-dir.sh @@ -6,7 +6,7 @@ fi set -euox pipefail #shellcheck disable=SC2154 -rm -f "${project_root}"/scripts/files/output/* #ISOs +sudo rm -f "${project_root}"/scripts/files/output/* #ISOs rm -f "${project_root}"/*_flatapks/flatpaks_with_deps #Flatpak Deps rm -rf "${project_root}"/flatpak.* #Flatpak Tempdir -rm -rf "${project_root}"/scripts/files/home/ublue-os/* #Test User Home \ No newline at end of file +sudo rm -rf "${project_root}"/scripts/files/home/ublue-os/* #Test User Home \ No newline at end of file diff --git a/scripts/common-build-iso.sh b/scripts/common-build-iso.sh index c0f8ff1aec4..45ce5e4fd7d 100644 --- a/scripts/common-build-iso.sh +++ b/scripts/common-build-iso.sh @@ -107,5 +107,5 @@ fi rm -rf "${TEMP_FLATPAK_INSTALL_DIR}" # Remove old ISO if present -rm -f "${project_root}/scripts/files/output/${tag}-${version}.iso" -rm -f "${project_root}/scripts/files/output/${tag}-${version}.iso-CHECKSUM" \ No newline at end of file +sudo rm -f "${project_root}/scripts/files/output/${tag}-${version}.iso" +sudo rm -f "${project_root}/scripts/files/output/${tag}-${version}.iso-CHECKSUM" \ No newline at end of file diff --git a/system_files/shared/usr/lib/systemd/system/brew-overlay.service b/system_files/shared/usr/lib/systemd/system/brew-overlay.service new file mode 100644 index 00000000000..9a53136ba8c --- /dev/null +++ b/system_files/shared/usr/lib/systemd/system/brew-overlay.service @@ -0,0 +1,20 @@ +[Unit] +Description=Setup overlay mount for brew +ConditionPathExists=/usr/share/homebrew +After=local-fs.target + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/mkdir -p /var/home/linuxbrew +ExecStart=/usr/bin/mkdir -p %S/homebrew +ExecStart=-/usr/bin/rm -rf %C/homebrew/* +ExecStart=-/usr/bin/rm -rf %C/homebrew/.* +ExecStart=/usr/bin/mkdir -p %C/homebrew +ExecStart=/usr/bin/mount -t overlay overlay -o lowerdir=/usr/lib/homebrew,upperdir=%S/homebrew,workdir=%S/homebrew-workdir /var/home/linuxbrew +ExecStop=/usr/bin/umount /var/home/linuxbrew +ExecStop=-/usr/bin/rm -rf %C/homebrew/* +ExecStop=-/usr/bin/rm -rf %C/homebrew/.* + +[Install] +WantedBy=default.target multi-user.target \ No newline at end of file diff --git a/system_files/shared/usr/lib/tmpfiles.d/linuxbrew.conf b/system_files/shared/usr/lib/tmpfiles.d/linuxbrew.conf new file mode 100644 index 00000000000..32fc74d444d --- /dev/null +++ b/system_files/shared/usr/lib/tmpfiles.d/linuxbrew.conf @@ -0,0 +1,3 @@ +d /var/lib/homebrew 0755 1000 1000 - - +d /var/cache/homebrew 0755 1000 1000 - - +d /var/home/linuxbrew 0755 1000 1000 - - \ No newline at end of file From 0bdd50acbd82197c6a4267dc9003261d4f59aae7 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sat, 11 May 2024 21:24:43 +0000 Subject: [PATCH 08/24] fix: add brew.sh in the build process --- build_files/base/build-base.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build_files/base/build-base.sh b/build_files/base/build-base.sh index b89749711fb..3c1669d849b 100644 --- a/build_files/base/build-base.sh +++ b/build_files/base/build-base.sh @@ -6,6 +6,7 @@ set -ouex pipefail . /tmp/build/copr-repos.sh . /tmp/build/install-akmods.sh . /tmp/build/packages.sh +. /tmp/build/brew.sh . /tmp/build/nvidia.sh . /tmp/build/image-info.sh . /tmp/build/fetch-install.sh From a044d8e6f27637ed6f17f0908260abb5c972a4bc Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Sat, 11 May 2024 18:03:51 -0400 Subject: [PATCH 09/24] fix: link to var/home --- build_files/base/brew.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build_files/base/brew.sh b/build_files/base/brew.sh index 2447e74c478..035c7f84d62 100644 --- a/build_files/base/brew.sh +++ b/build_files/base/brew.sh @@ -2,6 +2,5 @@ curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh > /tmp/brew.sh chmod +x /tmp/brew.sh -mkdir /var/home -ln -s /usr/lib/homebrew /var/home/linuxbrew +ln -s /usr/lib/homebrew /var/home env CLI=1 NONINTERACTIVE=1 /tmp/brew.sh \ No newline at end of file From c5258b966932dc189e195bfa45049c65c0e72ca7 Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Sat, 11 May 2024 18:27:30 -0400 Subject: [PATCH 10/24] fix: brew installer --- build_files/base/brew.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_files/base/brew.sh b/build_files/base/brew.sh index 035c7f84d62..e5c8483ca91 100644 --- a/build_files/base/brew.sh +++ b/build_files/base/brew.sh @@ -2,5 +2,5 @@ curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh > /tmp/brew.sh chmod +x /tmp/brew.sh -ln -s /usr/lib/homebrew /var/home -env CLI=1 NONINTERACTIVE=1 /tmp/brew.sh \ No newline at end of file +env CLI=1 NONINTERACTIVE=1 /tmp/brew.sh +cp -R /home/linuxbrew/.linuxbrew /usr/lib/homebrew \ No newline at end of file From 747805b6ae2b3d2f89d267df1159865fb47b8cea Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Sat, 11 May 2024 18:35:39 -0400 Subject: [PATCH 11/24] fix: brew installer --- build_files/base/brew.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/build_files/base/brew.sh b/build_files/base/brew.sh index e5c8483ca91..0b52756e0ea 100644 --- a/build_files/base/brew.sh +++ b/build_files/base/brew.sh @@ -2,5 +2,6 @@ curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh > /tmp/brew.sh chmod +x /tmp/brew.sh +rm -f /home env CLI=1 NONINTERACTIVE=1 /tmp/brew.sh cp -R /home/linuxbrew/.linuxbrew /usr/lib/homebrew \ No newline at end of file From 1775e1d0458051f8fd4a1739cce4fad41d0d6b0e Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Sat, 11 May 2024 18:44:00 -0400 Subject: [PATCH 12/24] fix: brew installer --- build_files/base/brew.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_files/base/brew.sh b/build_files/base/brew.sh index 0b52756e0ea..392d87a66c1 100644 --- a/build_files/base/brew.sh +++ b/build_files/base/brew.sh @@ -2,6 +2,6 @@ curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh > /tmp/brew.sh chmod +x /tmp/brew.sh -rm -f /home +rm -f /home /root env CLI=1 NONINTERACTIVE=1 /tmp/brew.sh cp -R /home/linuxbrew/.linuxbrew /usr/lib/homebrew \ No newline at end of file From 5a9649210b5c338b8b7056cb9a95b3e6dbb3378a Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sun, 12 May 2024 17:22:32 +0000 Subject: [PATCH 13/24] fix: remove brew stuff. --- build_files/base/brew.sh | 7 ------- build_files/base/build-base.sh | 1 - build_files/base/systemd.sh | 1 - .../lib/systemd/system/brew-overlay.service | 20 ------------------- .../shared/usr/lib/tmpfiles.d/linuxbrew.conf | 3 --- 5 files changed, 32 deletions(-) delete mode 100644 build_files/base/brew.sh delete mode 100644 system_files/shared/usr/lib/systemd/system/brew-overlay.service delete mode 100644 system_files/shared/usr/lib/tmpfiles.d/linuxbrew.conf diff --git a/build_files/base/brew.sh b/build_files/base/brew.sh deleted file mode 100644 index 392d87a66c1..00000000000 --- a/build_files/base/brew.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/bash - -curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh > /tmp/brew.sh -chmod +x /tmp/brew.sh -rm -f /home /root -env CLI=1 NONINTERACTIVE=1 /tmp/brew.sh -cp -R /home/linuxbrew/.linuxbrew /usr/lib/homebrew \ No newline at end of file diff --git a/build_files/base/build-base.sh b/build_files/base/build-base.sh index 3c1669d849b..b89749711fb 100644 --- a/build_files/base/build-base.sh +++ b/build_files/base/build-base.sh @@ -6,7 +6,6 @@ set -ouex pipefail . /tmp/build/copr-repos.sh . /tmp/build/install-akmods.sh . /tmp/build/packages.sh -. /tmp/build/brew.sh . /tmp/build/nvidia.sh . /tmp/build/image-info.sh . /tmp/build/fetch-install.sh diff --git a/build_files/base/systemd.sh b/build_files/base/systemd.sh index 114a88fc567..910cc12327f 100644 --- a/build_files/base/systemd.sh +++ b/build_files/base/systemd.sh @@ -10,6 +10,5 @@ systemctl enable ublue-update.timer systemctl enable ublue-system-setup.service systemctl enable ublue-etc-merge.service systemctl enable ublue-guest-user.service -systemctl enable brew-overlay.service systemctl --global enable ublue-user-setup.service systemctl --global enable podman-auto-update.timer \ No newline at end of file diff --git a/system_files/shared/usr/lib/systemd/system/brew-overlay.service b/system_files/shared/usr/lib/systemd/system/brew-overlay.service deleted file mode 100644 index 9a53136ba8c..00000000000 --- a/system_files/shared/usr/lib/systemd/system/brew-overlay.service +++ /dev/null @@ -1,20 +0,0 @@ -[Unit] -Description=Setup overlay mount for brew -ConditionPathExists=/usr/share/homebrew -After=local-fs.target - -[Service] -Type=oneshot -RemainAfterExit=yes -ExecStart=/usr/bin/mkdir -p /var/home/linuxbrew -ExecStart=/usr/bin/mkdir -p %S/homebrew -ExecStart=-/usr/bin/rm -rf %C/homebrew/* -ExecStart=-/usr/bin/rm -rf %C/homebrew/.* -ExecStart=/usr/bin/mkdir -p %C/homebrew -ExecStart=/usr/bin/mount -t overlay overlay -o lowerdir=/usr/lib/homebrew,upperdir=%S/homebrew,workdir=%S/homebrew-workdir /var/home/linuxbrew -ExecStop=/usr/bin/umount /var/home/linuxbrew -ExecStop=-/usr/bin/rm -rf %C/homebrew/* -ExecStop=-/usr/bin/rm -rf %C/homebrew/.* - -[Install] -WantedBy=default.target multi-user.target \ No newline at end of file diff --git a/system_files/shared/usr/lib/tmpfiles.d/linuxbrew.conf b/system_files/shared/usr/lib/tmpfiles.d/linuxbrew.conf deleted file mode 100644 index 32fc74d444d..00000000000 --- a/system_files/shared/usr/lib/tmpfiles.d/linuxbrew.conf +++ /dev/null @@ -1,3 +0,0 @@ -d /var/lib/homebrew 0755 1000 1000 - - -d /var/cache/homebrew 0755 1000 1000 - - -d /var/home/linuxbrew 0755 1000 1000 - - \ No newline at end of file From cb304da771afdb986a32c796e7e206de1011f385 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sat, 22 Jun 2024 10:51:13 -0400 Subject: [PATCH 14/24] chore: add bootc items. --- build_files/base/build-base.sh | 1 + build_files/dx/build-dx.sh | 1 + build_files/shared/bootc.sh | 5 +++++ build_files/shared/initramfs.sh | 8 ++++---- 4 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 build_files/shared/bootc.sh 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/dx/build-dx.sh b/build_files/dx/build-dx.sh index c6e43823a87..81c742be57a 100644 --- a/build_files/dx/build-dx.sh +++ b/build_files/dx/build-dx.sh @@ -13,5 +13,6 @@ sysctl -p . /tmp/build/fetch-install-dx.sh . /tmp/build/workarounds.sh . /tmp/build/systemd-dx.sh +. /tmp/build/bootc.sh . /tmp/build/branding-dx.sh . /tmp/build/cleanup-dx.sh 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 From b71eaaa3583c33bdc5d25c8bf58cae9be6a75e81 Mon Sep 17 00:00:00 2001 From: "Jorge O. Castro" Date: Sat, 22 Jun 2024 18:26:37 -0400 Subject: [PATCH 15/24] chore: bump ISO action version to 1.2.1 --- .github/workflows/reusable-build-iso.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 80190fbbc864d8e1b80d67a386117a703a3019de Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Thu, 20 Jun 2024 09:41:23 -0400 Subject: [PATCH 16/24] chore: remove fish brew completions link (#1408) --- system_files/shared/usr/share/fish/vendor_conf.d/brew.fish | 5 ----- 1 file changed, 5 deletions(-) diff --git a/system_files/shared/usr/share/fish/vendor_conf.d/brew.fish b/system_files/shared/usr/share/fish/vendor_conf.d/brew.fish index d8040a1d85c..bb6d10d8889 100644 --- a/system_files/shared/usr/share/fish/vendor_conf.d/brew.fish +++ b/system_files/shared/usr/share/fish/vendor_conf.d/brew.fish @@ -3,11 +3,6 @@ if status --is-interactive if [ -d /home/linuxbrew/.linuxbrew ] eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" - if [ -w /home/linuxbrew/.linuxbrew ] - if [ ! -L (brew --prefix)/share/fish/vendor_completions.d/brew.fish ] - brew completions link > /dev/null - end - end if test -d (brew --prefix)/share/fish/completions set -p fish_complete_path (brew --prefix)/share/fish/completions end From 26135ee3b973bb0bb30a4b49fc116d6aa2b43e02 Mon Sep 17 00:00:00 2001 From: "Jorge O. Castro" Date: Sat, 22 Jun 2024 11:01:40 -0400 Subject: [PATCH 17/24] fix(just): installer typo (#1418) --- Justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Justfile b/Justfile index e5576f84c55..c0f9f815668 100644 --- a/Justfile +++ b/Justfile @@ -60,7 +60,7 @@ build-iso image="" target="" version="": # Create ISO from local dev build image - use build-container-installer:main build-iso-installer-main image="" target="" version="": - @{{ project_root }}/scripts/build-iso-intstaller-main.sh {{ image }} {{ target }} {{ version }} + @{{ project_root }}/scripts/build-iso-installer-main.sh {{ image }} {{ target }} {{ version }} # Run ISO from local dev build image run-iso image="" target="" version="": From c1658ae27b06cb0012833cc1d19d57e091a39235 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sat, 22 Jun 2024 18:49:54 -0400 Subject: [PATCH 18/24] chore: Update reusable build iso to support bootc --- Justfile | 15 +++++++-------- build_files/dx/build-dx.sh | 1 - scripts/build-image.sh | 28 +++++++++++++++++----------- scripts/build-iso-installer-main.sh | 0 scripts/sudoif.sh | 10 ++++++---- 5 files changed, 30 insertions(+), 24 deletions(-) mode change 100644 => 100755 scripts/build-iso-installer-main.sh 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/dx/build-dx.sh b/build_files/dx/build-dx.sh index 81c742be57a..c6e43823a87 100644 --- a/build_files/dx/build-dx.sh +++ b/build_files/dx/build-dx.sh @@ -13,6 +13,5 @@ sysctl -p . /tmp/build/fetch-install-dx.sh . /tmp/build/workarounds.sh . /tmp/build/systemd-dx.sh -. /tmp/build/bootc.sh . /tmp/build/branding-dx.sh . /tmp/build/cleanup-dx.sh 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 } From 0345f3f615248c8c8360b07fcdf00687a63f9d29 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sat, 22 Jun 2024 18:55:24 -0400 Subject: [PATCH 19/24] chore: make git work --- .github/workflows/reusable-build-iso.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-build-iso.yml b/.github/workflows/reusable-build-iso.yml index b81afe1d90f..dbe9da43c8f 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.1 + uses: jasonn3/build-container-installer@v1.2.0 id: build with: arch: x86_64 From b2ac4c1e88573a516e4d311a06e0623e71d58353 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sat, 22 Jun 2024 19:05:25 -0400 Subject: [PATCH 20/24] chore: cleanup for pr --- .github/workflows/reusable-build-iso.yml | 2 +- build_files/base/build-base.sh | 1 - scripts/build-iso-ghcr.sh | 2 -- scripts/build-iso.sh | 5 ----- 4 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/reusable-build-iso.yml b/.github/workflows/reusable-build-iso.yml index 63abdcafad4..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@main + uses: jasonn3/build-container-installer@v1.2.1 id: build with: arch: x86_64 diff --git a/build_files/base/build-base.sh b/build_files/base/build-base.sh index bc04eaea97b..1f63f51aa3d 100644 --- a/build_files/base/build-base.sh +++ b/build_files/base/build-base.sh @@ -17,7 +17,6 @@ set -ouex pipefail . /tmp/build/bluefin-changes.sh . /tmp/build/aurora-changes.sh . /tmp/build/branding.sh -. /tmp/build/bootc.sh . /tmp/build/initramfs.sh . /tmp/build/bootc.sh . /tmp/build/cleanup.sh diff --git a/scripts/build-iso-ghcr.sh b/scripts/build-iso-ghcr.sh index e2d1994740c..6e959af5f85 100755 --- a/scripts/build-iso-ghcr.sh +++ b/scripts/build-iso-ghcr.sh @@ -27,5 +27,3 @@ ${container_mgr} run --rm --privileged \ SECURE_BOOT_KEY_URL='https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' \ VARIANT="${variant}" \ VERSION="${version}" - -sudo chown -R "${USER}:${USER}" "${project_root}/scripts/files/output" diff --git a/scripts/build-iso.sh b/scripts/build-iso.sh index f00c90950f9..e0f839b7cca 100755 --- a/scripts/build-iso.sh +++ b/scripts/build-iso.sh @@ -38,8 +38,3 @@ ${container_mgr} run --rm --privileged \ SECURE_BOOT_KEY_URL='https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' \ VARIANT="${variant}" \ VERSION="${version}" -<<<<<<< testing - -sudo chown -R "${USER}:${USER}" "${project_root}/scripts/files/output" -======= ->>>>>>> main From 52b7544a77037cbaa2ffd6d35c89aa7b2685120e Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sat, 22 Jun 2024 19:07:21 -0400 Subject: [PATCH 21/24] chore: cleanup for pr --- scripts/build-iso-intstaller-main.sh | 37 ---------------------------- 1 file changed, 37 deletions(-) delete mode 100755 scripts/build-iso-intstaller-main.sh diff --git a/scripts/build-iso-intstaller-main.sh b/scripts/build-iso-intstaller-main.sh deleted file mode 100755 index e6c4505050c..00000000000 --- a/scripts/build-iso-intstaller-main.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/bash -#shellcheck disable=SC2154 - -if [[ -z ${project_root} ]]; then - project_root=$(git rev-parse --show-toplevel) -fi - -# Common Build ISO -# shellcheck disable=SC1091 -. "${project_root}/scripts/common-build-iso.sh" - -if [[ ${container_mgr} =~ "podman" ]]; then - api_socket=/run/podman/podman.sock -elif [[ ${container_mgr} =~ "docker" ]]; then - api_socket=/var/run/docker.sock -fi - -# Make ISO -${container_mgr} run --rm --privileged \ - --volume "${api_socket}":/var/run/docker.sock \ - --volume "${workspace}"/scripts/files/build-iso-makefile-patch:/build-container-installer/container/Makefile \ - --volume "${workspace}/${flatpak_dir_shortname}":"/build-container-installer/${flatpak_dir_shortname}" \ - --volume "${workspace}"/scripts/files/output:/build-container-installer/build \ - ghcr.io/jasonn3/build-container-installer:main \ - ARCH="x86_64" \ - ENABLE_CACHE_DNF="false" \ - ENABLE_CACHE_SKOPEO="false" \ - ENABLE_FLATPAK_DEPENDENCIES="false" \ - ENROLLMENT_PASSWORD="ublue-os" \ - FLATPAK_REMOTE_REFS_DIR="${flatpak_dir_shortname}" \ - IMAGE_NAME="${tag}" \ - IMAGE_REPO="localhost" \ - IMAGE_TAG="${version}" \ - ISO_NAME="build/${tag}-${version}.iso" \ - SECURE_BOOT_KEY_URL='https://github.com/ublue-os/akmods/raw/main/certs/public_key.der' \ - VARIANT="${variant}" \ - VERSION="${version}" \ No newline at end of file From 48080ef41f0c15e5f2b45e3046a0436a0da9b956 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sat, 22 Jun 2024 19:18:47 -0400 Subject: [PATCH 22/24] chore: remove duplicate file --- build_files/base/bootc.sh | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 build_files/base/bootc.sh diff --git a/build_files/base/bootc.sh b/build_files/base/bootc.sh deleted file mode 100644 index b53c855d23d..00000000000 --- a/build_files/base/bootc.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/bash - -set -ouex pipefail - -# Transforms /usr/lib/ostree-boot into a bootupd-compatible update payload -/usr/bin/bootupctl backend generate-update-metadata From 473429d11fc4ba55015a7b61ae716e39a0ef9d9e Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sat, 22 Jun 2024 19:32:45 -0400 Subject: [PATCH 23/24] chore: remove overrides no longer needed on F40 --- build_files/base/copr-repos.sh | 5 ----- 1 file changed, 5 deletions(-) diff --git a/build_files/base/copr-repos.sh b/build_files/base/copr-repos.sh index 24508dabb8c..bef0a0e06fb 100644 --- a/build_files/base/copr-repos.sh +++ b/build_files/base/copr-repos.sh @@ -25,11 +25,6 @@ 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 From ccf114dbbe0c3b6f9a2f54514333a5f3ae771248 Mon Sep 17 00:00:00 2001 From: m2Giles <69128853+m2Giles@users.noreply.github.com> Date: Sat, 22 Jun 2024 19:44:36 -0400 Subject: [PATCH 24/24] chore: fix F39 vte-profile --- build_files/base/copr-repos.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/build_files/base/copr-repos.sh b/build_files/base/copr-repos.sh index bef0a0e06fb..6054a42bb4d 100644 --- a/build_files/base/copr-repos.sh +++ b/build_files/base/copr-repos.sh @@ -18,7 +18,6 @@ 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