From 57d51dadc7c375f857019f40b138b9d7a7d5e79c Mon Sep 17 00:00:00 2001 From: nazunalika Date: Mon, 27 Jun 2022 03:39:11 -0700 Subject: [PATCH] initial boot images should have dvd in the volid --- iso/empanadas/empanadas/common.py | 2 +- iso/empanadas/empanadas/configs/el9-beta.yaml | 2 +- iso/empanadas/empanadas/configs/el9lh.yaml | 2 +- .../empanadas/templates/buildImage.tmpl.sh | 2 +- .../empanadas/templates/isolorax.tmpl.sh | 8 ----- iso/empanadas/empanadas/util/iso_utils.py | 35 +++++++++++-------- 6 files changed, 24 insertions(+), 27 deletions(-) delete mode 100644 iso/empanadas/empanadas/templates/isolorax.tmpl.sh diff --git a/iso/empanadas/empanadas/common.py b/iso/empanadas/empanadas/common.py index e445caf..b1b4d25 100644 --- a/iso/empanadas/empanadas/common.py +++ b/iso/empanadas/empanadas/common.py @@ -54,7 +54,7 @@ class Utils: base = os.path.basename(path) # This emulates our current syncing scripts that runs stat and # sha256sum and what not with a very specific output. - return "%s: %s bytes\n%s (%s) = %s" % ( + return "%s: %s bytes\n%s (%s) = %s\n" % ( base, stat.st_size, hashtype.upper(), diff --git a/iso/empanadas/empanadas/configs/el9-beta.yaml b/iso/empanadas/empanadas/configs/el9-beta.yaml index 7d4a9bb..f5f3a07 100644 --- a/iso/empanadas/empanadas/configs/el9-beta.yaml +++ b/iso/empanadas/empanadas/configs/el9-beta.yaml @@ -2,7 +2,7 @@ '9-beta': fullname: 'Rocky Linux 9' revision: '9.1' - rclvl: 'RC1' + rclvl: 'BETA1' major: '9' minor: '1' bugurl: 'https://bugs.rockylinux.org' diff --git a/iso/empanadas/empanadas/configs/el9lh.yaml b/iso/empanadas/empanadas/configs/el9lh.yaml index 91cb818..9583886 100644 --- a/iso/empanadas/empanadas/configs/el9lh.yaml +++ b/iso/empanadas/empanadas/configs/el9lh.yaml @@ -2,7 +2,7 @@ '9-lookahead': fullname: 'Rocky Linux 9' revision: '9.1' - rclvl: 'RC1' + rclvl: 'LH1' major: '9' minor: '1' bugurl: 'https://bugs.rockylinux.org' diff --git a/iso/empanadas/empanadas/templates/buildImage.tmpl.sh b/iso/empanadas/empanadas/templates/buildImage.tmpl.sh index a17c853..bdf062b 100644 --- a/iso/empanadas/empanadas/templates/buildImage.tmpl.sh +++ b/iso/empanadas/empanadas/templates/buildImage.tmpl.sh @@ -1,6 +1,6 @@ #!/bin/bash -VOLID="{{ shortname }}-{{ major }}-{{ minor }}{{ rc }}-{{ arch }}-boot1" +VOLID="{{ shortname }}-{{ major }}-{{ minor }}{{ rc }}-{{ arch }}-dvd" VARIANT="{{ variant }}" ARCH="{{ arch }}" VERSION="{{ revision }}" diff --git a/iso/empanadas/empanadas/templates/isolorax.tmpl.sh b/iso/empanadas/empanadas/templates/isolorax.tmpl.sh deleted file mode 100644 index f08b123..0000000 --- a/iso/empanadas/empanadas/templates/isolorax.tmpl.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# You should not be running this manually. - -# everything should be logged like | tee -a {{ log_path }}/lorax-{{ arch }}-{{ date_stamp }}.log -# for the dvd, we need to rely on pulling from {{ entries_root }}/dvd-{{ arch }}-list - -# Run the base lorax steps into a work dir specific to its arch -# copy everything into BaseOS/arch/os diff --git a/iso/empanadas/empanadas/util/iso_utils.py b/iso/empanadas/empanadas/util/iso_utils.py index 0b49bd1..70244aa 100644 --- a/iso/empanadas/empanadas/util/iso_utils.py +++ b/iso/empanadas/empanadas/util/iso_utils.py @@ -824,17 +824,16 @@ class IsoBuild: # Set default variant ti.dump(treeinfo, main_variant=primary) - def discinfo_write(self): + def discinfo_write(self, file_path, arch): """ Ensure discinfo is written correctly """ - #with open(file_path, "w") as f: - # f.write("%s\n" % self.timestamp) - # f.write("%s\n" % self.fullname) - # f.write("%s\n" % self.arch) - # if disc_numbers: - # f.write("%s\n" % ",".join([str(i) for i in disc_numbers])) - print() + with open(file_path, "w+") as f: + f.write("%s\n" % self.timestamp) + f.write("%s\n" % self.fullname) + f.write("%s\n" % arch) + f.write("ALL\n") + f.close() def write_media_repo(self): """ @@ -945,12 +944,6 @@ class IsoBuild: if self.extra_iso_mode == 'podman': self._extra_iso_podman_run(arches_to_build, images_to_build, work_root) - def _extra_iso_podman_checksum(self, arch, image, work_root): - """ - Generate checksum on the fly post-podman run - """ - - def _extra_iso_local_config(self, arch, image, grafts, work_root): """ Local ISO build configuration - This generates the configuration for @@ -1099,7 +1092,6 @@ class IsoBuild: os.chmod(mock_sh_path, 0o755) os.chmod(iso_template_path, 0o755) - def _extra_iso_local_run(self, arch, image, work_root): """ Runs the actual local process using mock @@ -1248,6 +1240,19 @@ class IsoBuild: 'Building ' + i + ' completed' ) + if len(bad_exit_list) == 0: + self.log.info( + '[' + Color.BOLD + Color.GREEN + 'INFO' + Color.END + '] ' + + 'Copying ISOs over to compose directory...' + ) + print() + else: + self.log.error( + '[' + Color.BOLD + Color.RED + 'FAIL' + Color.END + '] ' + + 'There were issues with the work done. As a result, ' + + 'the ISOs will not be copied.' + ) + def _generate_graft_points( self,