Skip to content

Commit

Permalink
Rename short whonix-(gw|ws) names to their full names
Browse files Browse the repository at this point in the history
Whonix 17 use full "workstation" and "gateway" names, instead of whort
"ws" and "gw" versions. Rename all template name instances.

QubesOS/qubes-issues#1778
  • Loading branch information
marmarek committed Jul 9, 2023
1 parent 21f80c5 commit aca4377
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 13 deletions.
6 changes: 3 additions & 3 deletions org_qubes_os_initial_setup/gui/spokes/qubes_os.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,8 @@ def refresh(self):

self.choice_install_whonix.set_selected(
self.qubes_data.whonix_available
and "whonix-gw" in self.qubes_data.templates_to_install
and "whonix-ws" in self.qubes_data.templates_to_install
and "whonix-gateway" in self.qubes_data.templates_to_install
and "whonix-workstation" in self.qubes_data.templates_to_install
)

self.choice_system.set_selected(self.qubes_data.system_vms)
Expand Down Expand Up @@ -729,7 +729,7 @@ def apply(self):
if self.choice_install_debian.get_selected():
templates_to_install.append("debian")
if self.choice_install_whonix.get_selected():
templates_to_install += ["whonix-gw", "whonix-ws"]
templates_to_install += ["whonix-gateway", "whonix-workstation"]

self.qubes_data.templates_to_install = templates_to_install
for key, val in self.qubes_data.templates_aliases.items():
Expand Down
2 changes: 1 addition & 1 deletion org_qubes_os_initial_setup/service/kickstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def __init__(self):
self.skip = False

self.default_template = None
self.templates_to_install = ["fedora", "debian", "whonix-gw", "whonix-ws"]
self.templates_to_install = ["fedora", "debian", "whonix-gateway", "whonix-workstation"]

self.qubes_user = None

Expand Down
12 changes: 7 additions & 5 deletions org_qubes_os_initial_setup/service/qubes.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ def __init__(self):
super().__init__()
self.fedora_available = is_template_rpm_available("fedora")
self.debian_available = is_template_rpm_available("debian")
self.whonix_available = is_template_rpm_available(
"whonix-gw"
) and is_template_rpm_available("whonix-ws")
self.whonix_available = (
is_template_rpm_available("whonix-gateway") and
is_template_rpm_available("whonix-workstation"))

self.templates_aliases = {}
self.templates_versions = {}
Expand All @@ -96,7 +96,9 @@ def __init__(self):
)

if self.whonix_available:
self.templates_versions["whonix"] = get_template_version("whonix-ws")
self.templates_versions["whonix"] = (
get_template_version("whonix-workstation")
)
self.templates_aliases["whonix"] = (
"Whonix %s" % self.templates_versions["whonix"]
)
Expand Down Expand Up @@ -135,7 +137,7 @@ def __init__(self):
self._skip = False

self._default_template = None
self._templates_to_install = ["fedora", "debian", "whonix-gw", "whonix-ws"]
self._templates_to_install = ["fedora", "debian", "whonix-gateway", "whonix-workstation"]

self.qubes_user = None

Expand Down
5 changes: 1 addition & 4 deletions org_qubes_os_initial_setup/service/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,7 @@ def name(self):

def run(self):
template = self.template
if template.startswith("whonix"):
template_version = get_template_version("whonix-ws")
else:
template_version = get_template_version(template)
template_version = get_template_version(template)
template_name = "%s-%s" % (template, template_version)
self.report_progress("Installing TemplateVM %s" % template_name)
rpm = get_template_rpm(template)
Expand Down

0 comments on commit aca4377

Please sign in to comment.