Whonix on Mac M1 (ARM) - User Support (still unsupported at time of writing)

No further logs required.

Well tried building 17.0.9.1-developers-only using the command:

$ ~/derivative-maker/derivative-maker --flavor whonix-gateway-xfce --target utm --arch arm64 --tb open --repo true --vmsize 15G

still get the same error. Tell me if you need any logs from me or anything i can do to make this work. Or if i should wait until this is resolved.

Tried with build 17.0.9.6-developers-only got a new fault.

+ sudo --non-interactive --preserve-env=tbb_version,tb_onion,tpo_downloader_debug,tb_disable_anon_ws_dnf_conf,anon_shared_inst_tb,SKIP_SCRIPTS,SOURCE_DATE_EPOCH,dist_aptgetopt_file,dist_build_sources_list_primary,dist_mmdebstrap_build_sources_list_primary,dist_build_sources_list_primary_contents,dist_build_apt_sources_mirror,dist_build_apt_stable_release,dist_build_target_arch,dist_grml_mount_point,dist_source_help_steps_folder,dist_build_multiarch_package_item,dist_build_unsafe_io,dist_build_version,derivative_maker,user_name,LD_PRELOAD,LANG,LC_ALL,TZ,DEBDEBUG,XZ_OPT,REPO_PROXY,APTGETOPT,apt_unattended_opts,DERIVATIVE_APT_REPOSITORY_OPTS,DEBOOTSTRAP,http_proxy,https_proxy,ALL_PROXY,DEBIAN_FRONTEND,DEBIAN_PRIORITY,DEBCONF_NOWARNINGS,APT_LISTCHANGES_FRONTEND,INITRD apt-get -o Acquire::http::Proxy=http://127.0.0.1:3142 -o Acquire::https::Proxy=http://127.0.0.1:3142 -o Acquire::tor::Proxy=http://127.0.0.1:3142 -o APT::Update::Error-Mode=any -o Acquire::Languages=none -o Acquire::IndexTargets::deb::Contents-deb::DefaultEnabled=false -o Apt::Install-Recommends=false -o Acquire::Retries=5 -o Dpkg::Options::=--force-confnew -o Dir::Etc::sourcelist=/home/parallels/derivative-maker/build_sources/debian_stable_current_clearnet.list -o Dir::Etc::sourceparts=- --no-install-recommends --yes install signify-openbsd osslsigncode systemd-container sudo ronn diffutils debhelper dctrl-tools dialog haveged devscripts git reprepro libfile-fcntllock-perl config-package-dev dh-apparmor dh-python build-essential lintian gawk bash-completion grep debian-archive-keyring vbindiff lsb-release pv python3-all-dev python3-stdeb time cowbuilder strip-nondeterminism mktorrent transmission-cli apt-transport-tor python3 gnupg2 apt-cacher-ng fakeroot mmdebstrap arch-test fakechroot fakeroot gpg libdistro-info-perl mount uidmap apt-transport-https apt-transport-tor apt-utils binfmt-support ca-certificates debootstrap distro-info-data dpkg-dev perl-doc proot qemu-user qemu-user-static squashfs-tools-ng squashfs-tools xorriso grub-efi-amd64-bin grub-efi-amd64-signed mtools grml-debootstrap kpartx mksh parted qemu-utils dosfstools zerofree signify-openbsd codecrypt curl moreutils rsstail rsync stunnel4 socat fasttrack-archive-keyring lsof coreutils live-build
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package grub-efi-amd64-bin is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package grub-efi-amd64-signed is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'grub-efi-amd64-bin' has no installation candidate
E: Package 'grub-efi-amd64-signed' has no installation candidate
++ exception_handler_general ERR
++ last_failed_exit_code=100
++ last_failed_bash_command='$SUDO_TO_ROOT apt-get ${APTGETOPT[@]} -o Dir::Etc::sourcelist="$dist_build_sources_list_primary" -o Dir::Etc::sourceparts="-" $apt_unattended_opts --no-install-recommends --yes install $packages_to_be_installed'
++ output_cmd_set
++ '[' -o xtrace ']'
++ output_cmd=true
++ true 'INFO: Middle of function exception_handler_general of ././build-steps.d/1200_prepare-build-machine.'
++ exception_handler_process_shared ERR
++ last_script=././build-steps.d/1200_prepare-build-machine
++ trap_signal_type_previous=
++ '[' '' = '' ']'
++ trap_signal_type_previous=unset
++ trap_signal_type_last=ERR
++ dist_build_error_counter=1
+++ benchmarktimeend 1702253016
++++ date +%s
+++ benchmarktimeend=1702253021
+++ benchmark_took_seconds=5
++++ convertsecs 5
++++ local h m s
++++ (( h=5/3600 ))
++++ true
++++ (( m=(5%3600)/60 ))
++++ true
++++ (( s=5%60 ))
++++ printf '%02d:%02d:%02d\n' 0 0 5
+++ echo 00:00:05
++ benchmark_took_time=00:00:05
++ local first
++ read -r first _
++ process_backtrace_function
++ true 'INFO: BEGIN: process_backtrace_function'
++ '[' -o xtrace ']'
++ set +x
++ true 'INFO: END  : process_backtrace_function'
++ function_trace_function
++ true 'INFO: BEGIN: function_trace_function'
++ '[' -o xtrace ']'
++ set +x
++ true 'INFO: END  : function_trace_function'
++ output_cmd_set
++ '[' -o xtrace ']'
++ output_cmd=true
++ true '

Seems the script is trying to download grub-efi-amd64-bin when i am building this on a arm system. And using --arch arm64 as a flag. Not sure if this is supposed to happen?

I didn’t say it’s fixed.

Guess i will wait a bit and follow the development forward.

2 posts were merged into an existing topic: Whonix on Mac M1 (ARM) - Development Discussion

Managed to build on version 17.1.0.2-developers-only just wanted to mention it and managed to make it work after some utm problems. I have not tried to build the newest version yet. But will try in a few days.

Hopefully in the future a virtualbox vm will be available to apple silicon chipset in the future (That is stable). But for now at least i just got to live with UTM.

That being said, maybe one time i might try to build this for KVM just to see what really is the difference in settings compared too UTM. Sounds interesting. But i hope virtualbox will be done soonish.

1 Like

Okay tried to build 17.1.1.4-developers-only and tor browser failed to download. Tried to use the command: update-torbrowser --resume and it tried to download 13.0.8 of the arm port of tor browser. But it gets a 404. I went and checked sourceforge for the repository where arm tor browser is. And on Tor Browser Ports by holind. There are no 13.0.8 at the moment i tried to download it. Only 13.0.6. Is this a fault from my end? or something else went wrong?

No.

The service you’re looking for, that is free, up-to-date Tor Browser ARM64 builds is not provided by anyone on the internet.

I see, well just reporting that the build is trying to download a version that does not exist anywhere.

What I could do is for non-redistributable builds setting the default to:

  • A) --tb none (not attempt to download Tor Browser), or
  • B) --tb open (attempt to download but do not consider download failure a reason to break the build process. The latter would be bad for reproducible builds as this can lead to inconsistent (with or without Tor Browser) images but not an issue for the foreseeable future.

I had the exact same issue. Here’s how to fix it.

Check the latest version here: (remove space)
sourceforge. net/projects/tor-browser-ports/files/

Now use that specific version:

tbb_version=13.0.6 update-torbrowser

That worked well and installed it without any issues.

Was implemented.

  • Will be the default in the next version after 17.1.1.5.
  • Not yet in 17.1.1.5.

I see, will see and wait then. But been a while since the repo has last been taged. So reason for me not saying much. Also thanks Dmitry, knew of way to get tor-browser to work again. Just want to make it work out of the box.

Wait for what? Not a big deal. Just read and use:

i know that i can build the project without the browser, but i want to check when it does build with it. If i just needed something that work then i would have just build without then installed it manually.

Did test/build 17.1.1.8-developers-only and it worked perfectly on m1.

2 Likes

idk if this is a place to share stuff like this. But just wanna share how i build projects now. As i am doing this all the time. All i do is now to have a updated debian 12 vm. With user with sudo privileges with no password. Then i have this in my bashrc that will make sure i have all dependencies, build the project and clean up stuff. Maybe not the best way to do stuff and have no implemented a way to only run when the git repository is signed.

function whonix () {
	WHONIX_VERSION=$1
	VERSION_NUMBER="${WHONIX_VERSION%%-*}"

	if [ -z "$1" ]; then
		echo "Error: Missing whonix version. Please provide an whonix version."
		return 1
	fi

	echo "Starting whonix build function"
	rm -rf $HOME/derivative-maker
	rm -rf $HOME/derivative-binary
	rm -rf $HOME/whonix-binary
	rm -rf $HOME/build-log
	touch $HOME/build-log
	echo "Ready to build whonix version $WHONIX_VERSION now?"
	read -n 1 -s -r -p "Press any key to continue"
	echo ""
	echo "Too follow build use tail on the build log"

	echo "Starting whonix build" >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1
	sudo apt update -y >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1
	sudo apt upgrade -y >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1
	sudo apt autoremove -y >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1
	sudo apt install -y git time curl apt-cacher-ng lsb-release fakeroot fasttrack-archive-keyring >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1

	echo "Git clone whonix version $WHONIX_VERSION" >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1
	git clone --depth=1 --branch $WHONIX_VERSION --jobs=4 --recurse-submodules --shallow-submodules https://github.com/Whonix/derivative-maker.git >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1
	cd $HOME/derivative-maker >> ~/build-log 2>&1
	echo "Change directory too $(pwd)" >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1
	echo "Check if repository version matches and verify gpg signature" >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1
	git describe >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1

	GIT_VERSION=$(git describe --tags --abbrev=0)

    	if [ "$GIT_VERSION" == "$WHONIX_VERSION" ]; then
        	echo "Git version matches the desired version ($WHONIX_VERSION)." >> ~/build-log 2>&1
    	else
        	echo "Git version does not match the desired version ($WHONIX_VERSION)." >> ~/build-log 2>&1
		echo "Build failed because desired whonix version did not match the git repository"
		return 2
    	fi

	git verify-tag $WHONIX_VERSION >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1

	echo "Building gateway" >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1
	~/derivative-maker/derivative-maker --flavor whonix-gateway-xfce --target utm --arch arm64 --tb open --repo true --vmsize 15G >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1

	echo "Building workstation" >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1
	~/derivative-maker/derivative-maker --flavor whonix-workstation-xfce --target utm --arch arm64 --tb open --repo true --vmsize 25G >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1

	mkdir $HOME/whonix-binary >> ~/build-log 2>&1
	cp -vr $HOME/derivative-binary/$VERSION_NUMBER/*.utm.tar.gz $HOME/whonix-binary >> ~/build-log 2>&1
	echo "" >> ~/build-log 2>&1
	echo "Build of whonix version $WHONIX_VERSION is finished" >> ~/build-log 2>&1

	cp $HOME/build-log $HOME/whonix-binary/
	echo "Build function finished, please check log"
	cd $HOME
}

Then i run this on the command line to build a project. Basically calling the function whonix then add as argument the tag you want to build. Just a fast way to build both project fast. And copies all the files i care about in its own folders so i can scp it out.

$ whonix 17.1.1.8-developers-only

If anyone wants to (or care too) improve this simple function then do please tell me.

2 Likes

I recommend to quote variables, use shellcheck, set -o nounset, set -e, git.

Maybe useful for you to have user/developer specific helper scripts here?

Not sure that would be useful for you.

1 Like