From beebdaa105d1468724f8e7be5bd30f8b4fe1c96d Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Wed, 13 Jul 2022 20:01:23 -0700 Subject: [PATCH] fix up script --- iso/empanadas/empanadas/configs/el9.yaml | 1 + .../empanadas/templates/minimal/9/aarch64 | 38 ++++++++++++++++++ .../empanadas/templates/minimal/9/ppc64le | 33 ++++++++++++++++ .../empanadas/templates/minimal/9/s390x | 29 ++++++++++++++ .../empanadas/templates/minimal/9/x86_64 | 39 +++++++++++++++++++ iso/empanadas/empanadas/util/iso_utils.py | 15 +++++-- sync/sync-to-prod-9.sh | 6 ++- 7 files changed, 157 insertions(+), 4 deletions(-) create mode 100644 iso/empanadas/empanadas/templates/minimal/9/aarch64 create mode 100644 iso/empanadas/empanadas/templates/minimal/9/ppc64le create mode 100644 iso/empanadas/empanadas/templates/minimal/9/s390x create mode 100644 iso/empanadas/empanadas/templates/minimal/9/x86_64 diff --git a/iso/empanadas/empanadas/configs/el9.yaml b/iso/empanadas/empanadas/configs/el9.yaml index 6ab9ccc..f67f28c 100644 --- a/iso/empanadas/empanadas/configs/el9.yaml +++ b/iso/empanadas/empanadas/configs/el9.yaml @@ -52,6 +52,7 @@ - 'minimal' - 'BaseOS' variant: 'minimal' + volname: 'dvd' BaseOS: disc: False isoskip: True diff --git a/iso/empanadas/empanadas/templates/minimal/9/aarch64 b/iso/empanadas/empanadas/templates/minimal/9/aarch64 new file mode 100644 index 0000000..b5f2eae --- /dev/null +++ b/iso/empanadas/empanadas/templates/minimal/9/aarch64 @@ -0,0 +1,38 @@ +@minimal-environment +@core +@standard +@base +@guest-agents +kernel +lvm2 +bubblewrap +efibootmgr +efi-filesystem +efivar-libs +flashrom +fwupd +fwupd-plugin-flashrom +gdisk +glibc-langpack-en +grub2 +grub2-efi-aa64 +langpacks-core-en +langpacks-en +libatasmart +libblockdev +libblockdev-crypto +libblockdev-fs +libblockdev-loop +libblockdev-mdraid +libblockdev-part +libblockdev-swap +libblockdev-utils +libbytesize +libgcab1 +libjcat +libudisks2 +libxmlb +mokutil +shim-aa64 +udisks2 +volume_key-libs diff --git a/iso/empanadas/empanadas/templates/minimal/9/ppc64le b/iso/empanadas/empanadas/templates/minimal/9/ppc64le new file mode 100644 index 0000000..62fc6c9 --- /dev/null +++ b/iso/empanadas/empanadas/templates/minimal/9/ppc64le @@ -0,0 +1,33 @@ +@minimal-environment +@core +@standard +@base +@guest-agents +kernel +lvm2 +bubblewrap +efi-filesystem +flashrom +fwupd +fwupd-plugin-flashrom +gdisk +glibc-langpack-en +grub2 +langpacks-core-en +langpacks-en +libatasmart +libblockdev +libblockdev-crypto +libblockdev-fs +libblockdev-loop +libblockdev-mdraid +libblockdev-part +libblockdev-swap +libblockdev-utils +libbytesize +libgcab1 +libjcat +libudisks2 +libxmlb +udisks2 +volume_key-libs diff --git a/iso/empanadas/empanadas/templates/minimal/9/s390x b/iso/empanadas/empanadas/templates/minimal/9/s390x new file mode 100644 index 0000000..8317cf1 --- /dev/null +++ b/iso/empanadas/empanadas/templates/minimal/9/s390x @@ -0,0 +1,29 @@ +@minimal-environment +@core +@standard +@base +kernel +lvm2 +bubblewrap +efi-filesystem +fwupd +gdisk +glibc-langpack-en +langpacks-core-en +langpacks-en +libatasmart +libblockdev +libblockdev-crypto +libblockdev-fs +libblockdev-loop +libblockdev-mdraid +libblockdev-part +libblockdev-swap +libblockdev-utils +libbytesize +libgcab1 +libjcat +libudisks2 +libxmlb +udisks2 +volume_key-libs diff --git a/iso/empanadas/empanadas/templates/minimal/9/x86_64 b/iso/empanadas/empanadas/templates/minimal/9/x86_64 new file mode 100644 index 0000000..1d550a2 --- /dev/null +++ b/iso/empanadas/empanadas/templates/minimal/9/x86_64 @@ -0,0 +1,39 @@ +@minimal-environment +@core +@standard +@base +@guest-agents +kernel +lvm2 +bubblewrap +efibootmgr +efi-filesystem +efivar-libs +flashrom +fwupd +fwupd-plugin-flashrom +gdisk +glibc-langpack-en +grub2 +grub2-efi-x64 +langpacks-core-en +langpacks-en +libatasmart +libblockdev +libblockdev-crypto +libblockdev-fs +libblockdev-loop +libblockdev-mdraid +libblockdev-part +libblockdev-swap +libblockdev-utils +libbytesize +libgcab1 +libjcat +libsmbios +libudisks2 +libxmlb +mokutil +shim-x64 +udisks2 +volume_key-libs diff --git a/iso/empanadas/empanadas/util/iso_utils.py b/iso/empanadas/empanadas/util/iso_utils.py index 70846d5..a098791 100644 --- a/iso/empanadas/empanadas/util/iso_utils.py +++ b/iso/empanadas/empanadas/util/iso_utils.py @@ -718,6 +718,15 @@ class IsoBuild: self.log.info(Color.WARN + 'Skipping ' + y + ' image') continue + # Kind of hacky, but if we decide to have more than boot/dvd iso's, + # we need to make sure volname matches the initial lorax image, + # which the volid contains "dvd". AKA, file name doesn't always + # equate to volume ID + if 'volname' in self.iso_map['images'][y]: + volname = self.iso_map['images'][y]['volname'] + else: + volname = y + for a in arches_to_build: lorax_path = os.path.join(self.lorax_work_dir, a, 'lorax', '.treeinfo') image_path = os.path.join(self.lorax_work_dir, a, y, '.treeinfo') @@ -734,7 +743,7 @@ class IsoBuild: y, self.iso_map['images'][y]['repos'], ) - self._extra_iso_local_config(a, y, grafts, work_root) + self._extra_iso_local_config(a, y, grafts, work_root, volname) if self.extra_iso_mode == 'local': self._extra_iso_local_run(a, y, work_root) @@ -747,7 +756,7 @@ class IsoBuild: if self.extra_iso_mode == 'podman': self._extra_iso_podman_run(arches_to_build, images_to_build, work_root) - def _extra_iso_local_config(self, arch, image, grafts, work_root): + def _extra_iso_local_config(self, arch, image, grafts, work_root, volname): """ Local ISO build configuration - This generates the configuration for both mock and podman entries @@ -798,7 +807,7 @@ class IsoBuild: self.minor_version, rclevel, arch, - image + volname ) isoname = '{}-{}.{}{}-{}-{}.iso'.format( diff --git a/sync/sync-to-prod-9.sh b/sync/sync-to-prod-9.sh index 54accd4..22dd4af 100644 --- a/sync/sync-to-prod-9.sh +++ b/sync/sync-to-prod-9.sh @@ -13,10 +13,12 @@ ret_val=$? if [ $ret_val -eq "0" ]; then TARGET="${PRODUCTION_ROOT}/${CATEGORY_STUB}/${REV:0:3}" mkdir -p "${TARGET}" + echo "Syncing ${REVISION}" sudo -l && time fpsync -o '-av --numeric-ids --no-compress --chown=10004:10005' -n 18 -t /mnt/compose/partitions "${STAGING_ROOT}/${CATEGORY_STUB}/${REV}/" "${TARGET}/" # Full file list update for production root - cd "${PRODUCTION_ROOT}/" || echo { echo "Failed to change directory"; exit 1; } + cd "${PRODUCTION_ROOT}/" || { echo "Failed to change directory"; exit 1; } + echo "Getting a full file list for the root dir" find . > fullfilelist if [[ -f /usr/local/bin/create-filelist ]]; then # We're already here, but Justin Case wanted this @@ -28,7 +30,9 @@ if [ $ret_val -eq "0" ]; then # Full file list update for rocky linux itself cd "${PRODUCTION_ROOT}/${CATEGORY_STUB}/" || { echo "Failed to change directory"; exit 1; } # Hardlink everything except xml files + echo "Hard linking" hardlink -x '.*\.xml.*' "${REVISION}" + echo "Getting a full file list for the rocky dir" find . > fullfilelist if [[ -f /usr/local/bin/create-filelist ]]; then # We're already here, but Justin Case wanted this