Skip to content

Commit

Permalink
Merge pull request #9 from JoshuaVandaele/2024-7-maintenance
Browse files Browse the repository at this point in the history
2024 7 maintenance
  • Loading branch information
JoshuaVandaele authored Jul 10, 2024
2 parents 8aa34c7 + fcf78eb commit 69fc154
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion config/config.toml.default
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ enabled = true
[DiagnosticTools.Rescuezilla]
enabled = true
# Available editions:
# "focal", "jammy", "kinetic"
# "focal", "jammy", "lunar", "mantic", "noble"
editions = ["jammy"]

# Boot Repair
Expand Down
2 changes: 1 addition & 1 deletion modules/updaters/Rescuezilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ["focal", "jammy", "lunar", "mantic", "noble"]
self.edition = edition.lower()

file_path = folder_path / FILE_NAME
Expand Down
9 changes: 7 additions & 2 deletions modules/updaters/SuperGrub2.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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)
Expand Down
6 changes: 4 additions & 2 deletions modules/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 69fc154

Please sign in to comment.