Skip to content

Commit 4e2a02d

Browse files
committed
Install prod keyring from yum-test alongside the dev or staging keyring in bootstrap_keyring.py in order to satisfy dependencies.
1 parent aef1cc5 commit 4e2a02d

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ assert-keyring-%: ## Correct keyring pkg installed
4242
fi \
4343
fi
4444

45-
# This installs the (dev or staging) keyring package.
46-
# To uninstall, remove the package and delete the .repo file
45+
# This installs the (dev or staging) keyring package along with the prod package.
46+
# To uninstall, remove the dev or staging package and delete the file
4747
# /etc/yum.repos.d/securedrop-workstation-keyring-{dev|staging}.repo.
4848
bootstrap-%: assert-dom0 ## Configure the keyring
4949
@./scripts/bootstrap-keyring.py --env $*

scripts/bootstrap-keyring.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,15 @@ def is_key_imported(rpm_id: str):
4848
return False
4949

5050

51-
def dom0_install_keyring(env: str):
52-
"""Use qubes-dom0-update to install correct keyring package."""
53-
package_name = f"{KEYRING_PACKAGENAME}-{env}"
51+
def dom0_install_keyring(env: str|None):
52+
"""Use qubes-dom0-update to install keyring package."""
5453
args = ["sudo", "qubes-dom0-update", "-y"]
55-
args.append(f"--enablerepo={package_name}")
54+
55+
if env:
56+
package_name = f"{KEYRING_PACKAGENAME}-{env}"
57+
args.append(f"--enablerepo={package_name}")
58+
else:
59+
package_name = KEYRING_PACKAGENAME
5660
args.append(package_name)
5761
subprocess.check_call(args)
5862

@@ -88,7 +92,7 @@ def main():
8892
["sudo", "install", "-m", "0644", str(repo_file_path), str(repo_dest_path)]
8993
)
9094

91-
# Install keyring package
95+
# Install environment-specific keyring package
9296
rpm_import(key_file)
9397

9498
if not is_key_imported(TEST_KEY_RPMID):
@@ -101,6 +105,9 @@ def main():
101105

102106
dom0_install_keyring(args.env)
103107

108+
# Install prod keyring hosted in yum-test to satisfy dom0 config dependency.
109+
# When the prod keyring reaches Qubes-Contrib, this can be removed.
110+
dom0_install_keyring()
104111

105112
if __name__ == "__main__":
106113
main()

0 commit comments

Comments
 (0)