Hardcoded template names in Qubes scripts

Just stumbled on this while troubleshooting unrelated issue.

Examples:
tests: workaround time desynchronization issues on Whonix · QubesOS/qubes-app-linux-split-gpg@ead80b1 · GitHub
tests: exclude Whonix Gateway · QubesOS/qubes-app-linux-split-gpg@1a22a2f · GitHub

These assume that Whonix templates are named whonix-gw and whonix-ws. In fact, my Whonix templates have always had custom names. Isn’t it a bad idea to hardcode template names? Would be better to use existing Whonix identification system, ie /usr/share/anon-<gw|ws>-base-files

Thank you for your diligence. That looking around often leads to squashing some bugs. :slight_smile:

Yes, there are various marker files that seem better suited for that.

  • /usr/share/whonix/marker
  • /usr/share/anon-gw-base-files/gateway
  • /usr/share/anon-ws-base-files/workstation

Feel free to open a Qubes issue.
Issues · QubesOS/qubes-issues · GitHub

Submitted: Harcoded Whonix template names used in Qubes scripts · Issue #2490 · QubesOS/qubes-issues · GitHub

1 Like