Page MenuHomePhabricator

add --target qubes
Closed, ResolvedPublic

Description

Using --target root works, but it's non-ideal. Using --target qubes would allow more freedom. Required for T296.

Details

Impact
Normal

Event Timeline

Patrick created this task.May 10 2015, 8:36 PM
Patrick updated the task description. (Show Details)
Patrick raised the priority of this task from to Normal.
Patrick claimed this task.
Patrick set Impact to Normal.
Patrick added subscribers: Patrick, nrgaway.

implemented --target qubes - https://phabricator.whonix.org/T298:
https://github.com/Whonix/Whonix/commit/705bae959e157db951d698f9e9d73dc1aa279b31

cleanup, checking for "$ANON_BUILD_INSTALL_TO_ROOT" = "1" or "$WHONIX_BUILD_QUBES" = "true" in function check-virtualbox-vm-exists not required, because function is only called if "$WHONIX_BUILD_VIRTUALBOX" = "true" anyhow:
https://github.com/Whonix/Whonix/commit/0043a466b4fe2b9a17f5cffbc52101735f7bd81a

implemented WHONIX_BUILD_QUBES=true environment variable support - https://phabricator.whonix.org/T298:
https://github.com/Whonix/anon-base-files/commit/698ba10c7554a020891d619bcdd61b01014c4245

implemented WHONIX_BUILD_QUBES=true environment variable support - https://phabricator.whonix.org/T298:
https://github.com/Whonix/whonix-developer-meta-files/commit/ed05f096b9d3e2f69a40a3ce1d28dd980d1047c0

whonix-gateway and whonix-workstation package no longer depend on anon-shared-build-fix-grub because it has been made a weak dependency for better physical isolation and Qubes support:
https://github.com/Whonix/anon-meta-packages/commit/f400f82ad493befede7a78356e026b297d2ec7ba

code simplification, removed support for environment variable ANON_BUILD_INSTALL_TO_ROOT=true because anon-shared-build-fix-grub now gets only installed on required platforms:
https://github.com/Whonix/anon-shared-build-fix-grub/commit/bec926b41f7d8c2f9edfcb29ab6ead6f062076c3

Patrick changed the task status from Open to Review.May 11 2015, 12:29 AM
Patrick closed this task as Resolved.May 16 2015, 2:59 AM

With --target qubes I get following error:

+ true 'INFO: Would build form untagged commits.'
+ export whonix_build_ignore_untagged=true
+ whonix_build_ignore_untagged=true
+ shift 2
+ :
+ case $1 in
+ '[' false = true ']'
+ '[' false = false ']'
+ true 'INFO: Sanity tests false.'
+ export 'SKIP_SCRIPTS+= 20_sanity_checks '
+ SKIP_SCRIPTS+=' 20_sanity_checks '
+ shift 2
+ :
+ case $1 in
+ '[' '' = '' ']'
+ true
+ break
+ '[' ' linux-image-amd64' = '' ']'
+ '[' ' linux-headers-amd64' = '' ']'
+ '[' amd64 = '' ']'
+ '[' '!' '' = 1 ']'
+ '[' '!' 1 = 1 ']'
+ '[' 1 -gt 1 ']'
+ '[' 1 -le 0 ']'
+ '[' '' = 1 ']'
+ '[' '' = true ']'
+ '[' '' = true ']'
+ '[' '' = true ']'
+ parse_cmd_target_error
+ echo 'ERROR: --target must be either virtualbox, root or qcow2 and can be used multiple times.'
ERROR: --target must be either virtualbox, root or qcow2 and can be used multiple times.

although the first test passes:

+ case $1 in
+ true 'INFO: --target qubes chosen.'
+ '[' qubes = virtualbox ']'
+ '[' qubes = root ']'
+ '[' qubes = qcow2 ']'
+ '[' qubes = qubes ']'
+ build_target_counter=1
+ export WHONIX_BUILD_QUBES=true
+ WHONIX_BUILD_QUBES=true
+ shift 2
+ :
+ case $1 in

Looks like some code is missing in parse-cmd at aprox line 745:

elif [ "$WHONIX_BUILD_QUBES" = "true" ]; then
   true
nrgaway reopened this task as Open.May 16 2015, 3:01 AM

Will fix this soon.

Actually using this has time. Explanation and ticket for the actual switch: T307