From 802ab1b6d3241e778f7ce36d058d2ed82e460d7b Mon Sep 17 00:00:00 2001 From: m2 <69128853+m2Giles@users.noreply.github.com> Date: Sat, 11 May 2024 10:18:23 -0400 Subject: [PATCH] fix(dev): have ISOs build with flatpaks. clean ISOs (#1288) --- scripts/build-iso-ghcr.sh | 1 + scripts/build-iso.sh | 1 + scripts/cleanup-dir.sh | 8 ++++---- scripts/common-build-iso.sh | 6 +++++- scripts/run-iso.sh | 4 +++- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/build-iso-ghcr.sh b/scripts/build-iso-ghcr.sh index 68fe07f9212..574f21024c8 100755 --- a/scripts/build-iso-ghcr.sh +++ b/scripts/build-iso-ghcr.sh @@ -12,6 +12,7 @@ fi # Make ISO ${container_mgr} run --rm --privileged \ --volume "${workspace}"/scripts/files/output:/build-container-installer/build \ + --volume "${workspace}/${flatpak_dir_shortname}":"/build-container-installer/${flatpak_dir_shortname}" \ ghcr.io/jasonn3/build-container-installer:latest \ ARCH="x86_64" \ ENABLE_CACHE_DNF="false" \ diff --git a/scripts/build-iso.sh b/scripts/build-iso.sh index affe135b00a..b891d9458eb 100755 --- a/scripts/build-iso.sh +++ b/scripts/build-iso.sh @@ -19,6 +19,7 @@ fi ${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:latest \ ARCH="x86_64" \ diff --git a/scripts/cleanup-dir.sh b/scripts/cleanup-dir.sh index ff6aae67711..24dded07a9f 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}"/*.iso -rm -f "${project_root}"/*_flatapks/flatpaks_with_deps -rm -rf "${project_root}"/flatpak.* -rm -rf "${project_root}"/scripts/files/home/ublue-os/* \ No newline at end of file +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 diff --git a/scripts/common-build-iso.sh b/scripts/common-build-iso.sh index 67a4b78b6ea..c0f8ff1aec4 100644 --- a/scripts/common-build-iso.sh +++ b/scripts/common-build-iso.sh @@ -104,4 +104,8 @@ fi if [[ -f /.dockerenv ]]; then TEMP_FLATPAK_INSTALL_DIR=${project_root}/$(echo "${TEMP_FLATPAK_INSTALL_DIR}" | rev | cut -d / -f 1 | rev) fi -rm -rf "${TEMP_FLATPAK_INSTALL_DIR}" \ No newline at end of file +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 diff --git a/scripts/run-iso.sh b/scripts/run-iso.sh index 246794a4545..e7e00b52865 100755 --- a/scripts/run-iso.sh +++ b/scripts/run-iso.sh @@ -29,7 +29,9 @@ fi ${container_mgr} run --rm --cap-add NET_ADMIN \ --publish 127.0.0.1:8006:8006 \ - --env "DISK_SIZE=50G" \ + --env "CPU_CORES=2" \ + --env "RAM_SIZE=4G" \ + --env "DISK_SIZE=64G" \ --env "BOOT_MODE=uefi" \ --device=/dev/kvm \ --volume "${workspace}/scripts/files/output/${tag}-${version}.iso":/boot.iso \