Building From Source Issues

I had another topic here mentioning a build issue where the username “user” was hard coded into the build script. I am not building my Whonix VM modules under that username. Hence in attempting to build from source I have again run into a step where the process attempts to create files in /home/user. Here is the recent error:
/usr/share/genmkfile/makefile-full:68 recipe for target deb-icup failed.

It’s trying to create /home/user/whonix_binary because line 68 of makefile-full refers to make-helper.bsh. Inside that file there are two lines hard coded for username “user” at lines 366 and 367 of the file. This comes during build step 1200_create-debian-packages The make-helper.bsh file originates at genmkfile/make-helper.bsh at master · Kicksecure/genmkfile · GitHub if that helps.

Is the username “user” hard coded into much of the build scripts for Whonix 14? I think I will take a look at the rest of the build steps to see how much more the username is hard coded. I am hoping once the hard coded username issues get resolved it will build successfully.

Sorry if I placed this in the wrong section. I am trying to build for target qcow2 (KVM), but I imagine username “user” is hard coded for all build targets?

Edit: I checked the rest of the build step scripts and none of the others have username “user” hard coded in. So hopefully if make-helper.bsh can be fixed maybe I can get a successful build?

Edit 2: I tried changing the value of lines 366 and 367 in make-helper.bsh, but they keep getting overwritten to the hard coded username value. Where is this coming from? I’m trying to dig into the code, but lost at this point.

No worries. I think it is a hardcoded value indeed. Reason is we think a generic widely used username ensures no private info leaks by mistake in logs or file metadata. Nonetheless if you want to make customizations like this it should be possible depending on how much work changing the buildscript on our end.

@Patrick your thoughts?

@HulaHoop thanks for your reply. I am fine with the Whonix Gateway and Workstation modules having “user” as the default username. Patrick had changed some of the build script files to allow one to build the Whonix modules on the host system under any arbitrarily chosen username. The make-helper.bsh file in question that I mentioned above seems to be overwritten by deb-icup? That is referenced in build step 1200_create-debian-packages on lines 193 - 195 :

pushd “$WHONIX_SOURCE_FOLDER/packages/anon-shared-build-apt-sources.tpo”
sudo $SUDO_OPTS -E make deb-icup

and then again in makefile-full on line 68 where it appears to be used in part for adding contents into the make-helper.bsh file if I’m reading it correctly. The build script points to line 68 as the point where the build process failed and said it involved deb-icup.

When I look at anon-shared-build-apt-sources.tpo directory, I don’t see any reference to a hard coded username value. I’ll keep looking about though. I even tried using the allow-uncommitted and allow-untagged switches for building, but the make-helper.bsh file referenced above keeps getting overwritten to hard coded values of /home/user for where to create the “whonix_binary” directory. Again though, thank you for replying.

When you find a fix, I am happy to consider a pull request.

There’s a lot cases to cover.

  • runs from Whonix/Whonix
  • runs standalone
  • runs as root
  • runs as non-root

Therefore hard to have dynamically set username.

Maybe genmkfile should use the same logic as function
user_name_detection in Whonix/Whonix help-steps/variables.

First @Patrick thank you for replying regarding my concern.

I was able to successfully build Whonix 13 Gateway and Workstation on my host Debian system at the time under a different username other than “user”. So it was possible to have a dynamic username for successfully building the Whonix 13 Gateway and Workstation. I don’t know why that changed for Whonix 14, but OK.


Whonix 13 is deprecated.