From 9b80455bed0e0624e2b9ea226258e2445f68d3b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Wed, 10 Jul 2024 22:07:13 +0200 Subject: [PATCH 1/4] remove print statements --- modules/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/utils.py b/modules/utils.py index f6fdb15..6e31629 100644 --- a/modules/utils.py +++ b/modules/utils.py @@ -197,7 +197,7 @@ def pgp_check(file_path: Path, signature: str | bytes, public_key: str | bytes) result = bool(pub_key.verify(file_content, sig)) - print( + logging.debug( f"[pgp_check] {file_path.resolve()}: Signature is {'' if result else 'not'} valid" ) From 44ce84b13bc87b3ad4f596cbf4a92f8e8234e66e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Wed, 10 Jul 2024 22:17:48 +0200 Subject: [PATCH 2/4] Update Rescuezilla editions --- config/config.toml.default | 2 +- modules/updaters/Rescuezilla.py | 2 +- setup.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/config.toml.default b/config/config.toml.default index 98f5199..be842bd 100644 --- a/config/config.toml.default +++ b/config/config.toml.default @@ -19,7 +19,7 @@ enabled = true [DiagnosticTools.Rescuezilla] enabled = true # Available editions: -# "focal", "jammy", "kinetic" +# "bionic", "focal", "jammy", "lunar", "mantic", "noble" editions = ["jammy"] # Boot Repair diff --git a/modules/updaters/Rescuezilla.py b/modules/updaters/Rescuezilla.py index cd938a9..ec06483 100644 --- a/modules/updaters/Rescuezilla.py +++ b/modules/updaters/Rescuezilla.py @@ -27,7 +27,7 @@ class Rescuezilla(GenericUpdater): """ def __init__(self, folder_path: Path, edition: str) -> None: - self.valid_editions = ["focal", "jammy", "kinetic"] + self.valid_editions = ["bionic", "focal", "jammy", "lunar", "mantic", "noble"] self.edition = edition.lower() file_path = folder_path / FILE_NAME diff --git a/setup.py b/setup.py index c4a1f75..88021a4 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ setup( name="sisou", # Required - version="1.1.5", # Required + version="1.1.6", # Required description="A powerful tool to conveniently update all of your ISO files!", # Optional long_description=long_description, # Optional long_description_content_type="text/markdown", # Optional From 5e0ec825543999fb2ea88f4808f57bca644d9eee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Wed, 10 Jul 2024 22:40:27 +0200 Subject: [PATCH 3/4] fix: Improved SuperGrub2 hash detection --- modules/updaters/SuperGrub2.py | 9 +++++++-- modules/utils.py | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/modules/updaters/SuperGrub2.py b/modules/updaters/SuperGrub2.py index 0f53662..09f39b8 100644 --- a/modules/updaters/SuperGrub2.py +++ b/modules/updaters/SuperGrub2.py @@ -21,7 +21,7 @@ class SuperGrub2(GenericUpdater): """ - A class representing an updater for Hiren's Boot CD PE. + A class representing an updater for SuperGrub2. Attributes: download_page (requests.Response): The HTTP response containing the download page HTML. @@ -76,7 +76,12 @@ def check_integrity(self, archive_to_check: Path) -> bool: sha256_sums_tag = sha256_sums_tag[-1] sha256_checksums_str = sha256_sums_tag.getText() sha_256_checksum: str = parse_hash( - sha256_checksums_str, ["supergrub2", ".img.zip"], 0 + sha256_checksums_str, + [ + f"supergrub2-{self._get_latest_version()[0]}", + ".img.zip", + ], + 0, ) return sha256_hash_check(archive_to_check, sha_256_checksum) diff --git a/modules/utils.py b/modules/utils.py index 6e31629..f3718ee 100644 --- a/modules/utils.py +++ b/modules/utils.py @@ -220,11 +220,13 @@ def parse_hash( logging.debug( f"[parse_hash] Parsing hashes with match strings `{match_strings_in_line}` and hash position {hash_position_in_line} in those hashes:\n{hashes}" ) - return next( + hash = next( line.split()[hash_position_in_line] for line in hashes.strip().splitlines() if all(match in line for match in match_strings_in_line) ) + logging.debug(f"[parse_hash] Extracted hash: `{hash}`") + return hash def download_file(url: str, local_file: Path, progress_bar: bool = True) -> None: From fcf78ebac7096f5a3086a0e91f10a759478f42ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joshua=20Vanda=C3=ABle?= Date: Wed, 10 Jul 2024 22:42:56 +0200 Subject: [PATCH 4/4] Chore: Drop 32 bit Rescuezilla versions --- config/config.toml.default | 2 +- modules/updaters/Rescuezilla.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.toml.default b/config/config.toml.default index be842bd..762006b 100644 --- a/config/config.toml.default +++ b/config/config.toml.default @@ -19,7 +19,7 @@ enabled = true [DiagnosticTools.Rescuezilla] enabled = true # Available editions: -# "bionic", "focal", "jammy", "lunar", "mantic", "noble" +# "focal", "jammy", "lunar", "mantic", "noble" editions = ["jammy"] # Boot Repair diff --git a/modules/updaters/Rescuezilla.py b/modules/updaters/Rescuezilla.py index ec06483..1fb8183 100644 --- a/modules/updaters/Rescuezilla.py +++ b/modules/updaters/Rescuezilla.py @@ -27,7 +27,7 @@ class Rescuezilla(GenericUpdater): """ def __init__(self, folder_path: Path, edition: str) -> None: - self.valid_editions = ["bionic", "focal", "jammy", "lunar", "mantic", "noble"] + self.valid_editions = ["focal", "jammy", "lunar", "mantic", "noble"] self.edition = edition.lower() file_path = folder_path / FILE_NAME