Skip to content

Commit

Permalink
Merge pull request #12 from apyrgio/main
Browse files Browse the repository at this point in the history
 Publish Dangerzone 0.4.2 rpms
  • Loading branch information
eloquence authored Aug 8, 2023
2 parents 6fd2316 + 0fb205b commit 8cc7c9d
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 28 deletions.
3 changes: 0 additions & 3 deletions dangerzone/f36/dangerzone-0.4.1-1.noarch.rpm

This file was deleted.

3 changes: 0 additions & 3 deletions dangerzone/f36/dangerzone-0.4.1-1.src.rpm

This file was deleted.

3 changes: 0 additions & 3 deletions dangerzone/f37/dangerzone-0.4.1-1.noarch.rpm

This file was deleted.

3 changes: 0 additions & 3 deletions dangerzone/f37/dangerzone-0.4.1-1.src.rpm

This file was deleted.

3 changes: 3 additions & 0 deletions dangerzone/f37/dangerzone-0.4.2-1.noarch.rpm
Git LFS file not shown
3 changes: 3 additions & 0 deletions dangerzone/f37/dangerzone-0.4.2-1.src.rpm
Git LFS file not shown
3 changes: 0 additions & 3 deletions dangerzone/f38/dangerzone-0.4.1-1.noarch.rpm

This file was deleted.

3 changes: 0 additions & 3 deletions dangerzone/f38/dangerzone-0.4.1-1.src.rpm

This file was deleted.

3 changes: 3 additions & 0 deletions dangerzone/f38/dangerzone-0.4.2-1.noarch.rpm
Git LFS file not shown
3 changes: 3 additions & 0 deletions dangerzone/f38/dangerzone-0.4.2-1.src.rpm
Git LFS file not shown
24 changes: 14 additions & 10 deletions scripts/publish.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,16 @@ def import_key(key_id, db_path):
fail(f"Error importing key: {e}")


def get_all_rpms():
rpms = []
for root, dirs, files in os.walk(RPM_DIR):
for name in files:
if not name.endswith(".rpm"):
continue
rpms.append(os.path.join(root, name))
return rpms


def verify_sig_rpm(path, key_id):
print(f">> Verifying {path}")
try:
Expand All @@ -51,12 +61,8 @@ def verify_sig_rpm(path, key_id):


def verify_all_rpms(key_id):
for root, dirs, files in os.walk(RPM_DIR):
for name in files:
if not name.endswith(".rpm"):
continue
path = os.path.join(root, name)
verify_sig_rpm(path, key_id)
for rpm in get_all_rpms():
verify_sig_rpm(rpm, key_id)


def sign_rpm(path, key_id):
Expand All @@ -72,10 +78,8 @@ def sign_rpm(path, key_id):


def sign_all_rpms(key_id):
for root, dirs, files in os.walk(RPM_DIR):
for name in files:
path = os.path.join(root, name)
sign_rpm(path, key_id)
for rpm in get_all_rpms():
sign_rpm(rpm, key_id)


def fail(msg):
Expand Down

0 comments on commit 8cc7c9d

Please sign in to comment.