Another path of debugging this:
Good news.
- ‘[’ whonix-host = whonix-host ‘]’
- true ‘INFO: Skipping creation of user ‘'‘user’'’ since WHONIX_BUILD_TYPE is set to whonix-host.’
Slightly bad news. There will be another build issue.
+ dpkg-divert --divert /etc/hostname.anondist-orig --rename --package anon-base-files --add /etc/hostname
Adding 'diversion of /etc/hostname to /etc/hostname.anondist-orig by anon-base-files'
dpkg-divert: error: unable to remove copied source file '/etc/hostname': Device or resource busy
....
+ true 'ERROR: Second attempt installing whonix-host-xfce-kvm-nonfreedom did not fail?!?'
But that one is understood by me. Whonix VM builds also had this issue in past. This is only about what files are mounted when and when not and in which order to install the packages which overwrite these critical files. Issue described here:
https://github.com/Whonix/Whonix/blob/master/help-steps/chroot-raw
Will work on that one.
User user creation (as already mentioned) should work.
Above issue fixed in git master.
https://github.com/Whonix/Whonix/commit/bdcbd0aa5efa402b90743fe5dd025dc7f1efffad
Included in git tag
15.0.0.4.3-developers-only
Untested.
15.0.0.4.5-developers-only
tag more tested (building packages now) but build not done yet.
What version should I try to build? Should I first continue debugging the fatal error in 1200 step?
Can be done “in parallel” (in different VMs). Or one thing after another.
Git tag 15.0.0.4.5-developers-only
should work fine for cowbuilder debugging - #3 by Patrick but the same tag should also be good for Whonix Host testing since I expect no more build bugs related to /etc/hostname and also user “user” creating being skipped.
15.0.0.4.5-developers-only
Whonix Host build successful. No build errors. But didn’t try to boot the actual Whonix Host build.
Building in a fresh Whonix-Workstation 15 VM now.
Build fails at 1120 step. Very cryptic error log.
Short log:
/home/user/Whonix/packages/genmkfile /home/user/Whonix
+ make_use_cowbuilder=false
+ make deb-cleanup
./usr/share/genmkfile/make-helper.bsh deb-cleanup
make: *** [usr/share/genmkfile/makefile-full:85: deb-cleanup] Error 1
++ errorhandlergeneral ERR
++ last_failed_exit_code=2
++ last_failed_bash_command='make_use_cowbuilder=false make deb-cleanup'
long log:
+ cat /usr/sbin/policy-rc.d
cat: /usr/sbin/policy-rc.d: No such file or directory
+ true
+ genmkfile_installation
+ pushd /home/user/Whonix/packages/genmkfile
/home/user/Whonix/packages/genmkfile /home/user/Whonix
+ make_use_cowbuilder=false
+ make deb-cleanup
./usr/share/genmkfile/make-helper.bsh deb-cleanup
make: *** [usr/share/genmkfile/makefile-full:85: deb-cleanup] Error 1
++ errorhandlergeneral ERR
++ last_failed_exit_code=2
++ last_failed_bash_command='make_use_cowbuilder=false make deb-cleanup'
++ output_cmd_set
++ '[' -o xtrace ']'
++ output_cmd=true
++ true 'INFO: Middle of function errorhandlergeneral of ././build-steps.d/1120_prepare-build-machine.'
++ errorhandlerprocessshared ERR
++ last_script=././build-steps.d/1120_prepare-build-machine
++ trap_signal_type_previous=
++ '[' '' = '' ']'
++ trap_signal_type_previous=unset
++ trap_signal_type_last=ERR
++ whonix_build_error_counter=1
+++ benchmarktimeend 1566907746
++++ date +%s
+++ benchmarktimeend=1566908131
+++ benchmark_took_seconds=385
++++ convertsecs 385
++++ local h m s
++++ (( h=385/3600 ))
++++ true
++++ (( m=(385%3600)/60 ))
++++ (( s=385%60 ))
++++ printf '%02d:%02d:%02d\n' 0 6 25
+++ echo 00:06:25
++ benchmark_took_time=00:06:25
++ processbacktracefunction
++ true 'INFO: BEGIN: processbacktracefunction'
++ '[' -o xtrace ']'
++ set +x
++ true 'INFO: END : processbacktracefunction'
++ functiontracefunction
++ true 'INFO: BEGIN: functiontracefunction'
++ '[' -o xtrace ']'
++ set +x
++ true 'INFO: END : functiontracefunction'
++ output_cmd_set
++ '[' -o xtrace ']'
++ output_cmd=true
++ true '
############################################################
ERROR in ././build-steps.d/1120_prepare-build-machine detected!
anon_dist_build_version: 15.0.0.4.5-3-g36d2cb1643831e011984fc2fa76bfd6bb8775646
(whonix_build_error_counter: 1)
(benchmark: 00:06:25)
trap_signal_type_previous: unset
trap_signal_type_last : ERR
process_backtrace_result:
1: : /sbin/init
2: : xfce4-terminal
3: : bash
4: : sudo /home/user/Whonix/whonix_build --build --redistribute --target iso --flavor whonix-host-xfce --freedom false
5: : /bin/bash /home/user/Whonix/whonix_build --build --redistribute --target iso --flavor whonix-host-xfce --freedom false
6: : /bin/bash ././build-steps.d/1120_prepare-build-machine
function_trace_result:
main (line number: 293)
main (line number: 290)
genmkfile_installation (line number: 280)
errorhandlergeneral (line number: 334)
errorhandlerprocessshared (line number: 169)
last_failed_bash_command: make_use_cowbuilder=false make deb-cleanup
last_failed_exit_code: 2
ERROR in ././build-steps.d/1120_prepare-build-machine detected!
############################################################
I did not set make_use_cowbuilder=false
Build command:
sudo ~/Whonix/whonix_build --build --redistribute --target iso --flavor whonix-host-xfce --freedom false
And retrying in the old VM (that used to work fine) failed as expected at step 1200 when building hardened_malloc package (until then it works fine).
genmkfile bootstrap bug.
For now, install manually. That should work around that bug.
sudo mkdir -p /usr/share/genmkfile
sudo cp ~/Whonix/packages/genmkfile/usr/share/genmkfile/* /usr/share/genmkfile/
sudo chmod -R o+r /usr/share/genmkfile/
I will work on a fix.
Thanks, retrying
Exact same error occured again
It requires some debugging.
If that makes sense.
And then figuring out what’s going wrong. Probably GENMKFILE_PATH not being set and then set to GENMKFILE_PATH=“/usr/share/genmkfile” which does not exist prior installation.
no, it does not how exactly can I enable debugging?
Apply that git commit and then set GENMKFILE_DEBUG=1
.
Or add
set -x
on top of
/home/user//Whonix/packages/genmkfile/usr/share/genmkfile/make-helper.bsh
below
#!/bin/bash
unconditionally.
I will probably manage to reproduce and fix that one. It’s about a VM which already has genmkfile vs one that has not. Just need to start with a very minimal VM to reproduce. Should be fixed in near future.
git tag
15.0.0.4.6-developers-only
now comes with debugging enabled by default for genmkfile_installation
But even if I started with a new VM without genmkfile installed ever previously, I still couldn’t reproduce this issue.
Please kindly get 15.0.0.4.6-developers-only
and do again. This time we’ll have debug output.
15.0.0.4.6-developers-only still fails
+ make_deb-pkg-build_shared
+ '[' false = true ']'
+ command -v debuild
+ dpkg-checkbuilddeps
+ debuild --no-lintian -sa -us -uc
dpkg-buildpackage -us -uc -ui -sa
dpkg-buildpackage: info: source package genmkfile
dpkg-buildpackage: info: source version 3:7.9-1
dpkg-buildpackage: info: source distribution unstable
dpkg-buildpackage: info: source changed by Patrick Schleizer <adrelanos@riseup.net>
dpkg-source --before-build .
dpkg-buildpackage: info: host architecture amd64
fakeroot debian/rules clean
dh clean
dh_auto_clean
make -j1 distclean
make[1]: Entering directory '/home/user/Whonix/packages/genmkfile'
./usr/share/genmkfile/make-helper.bsh distclean
make[1]: *** [usr/share/genmkfile/makefile-full:97: distclean] Error 1
make[1]: Leaving directory '/home/user/Whonix/packages/genmkfile'
dh_auto_clean: make -j1 distclean returned exit code 2
make: *** [debian/rules:9: clean] Error 2
dpkg-buildpackage: error: fakeroot debian/rules clean subprocess returned exit status 2
debuild: fatal error at line 1182:
dpkg-buildpackage -us -uc -ui -sa failed
++ error_handler_pre
++ local exit_code=29
++ local 'last_err=debuild --no-lintian -sa $make_debuild_maybe_unsigned_opts "$@"'
++ '[' '!' 1 = 1 ']'
++ '[' '' = '' ']'
++ output='## See above.'
++ '[' '!' 1 = 1 ']'
++ force_echo '
####################################################################
## BEGIN ERROR in ./usr/share/genmkfile/make-helper-one.bsh detected!
##
## ERROR LOG:
## See above.
##
## BASH_COMMAND: debuild --no-lintian -sa $make_debuild_maybe_unsigned_opts "$@"
## EXIT_CODE: 29
##
## END ERROR in ./usr/share/genmkfile/make-helper-one.bsh detected!
## Please report this bug!
####################################################################
Yes.
make_use_cowbuilder=false
is set during genmkfile_installation
because cannot use cowbuilder to initially build and install genmkfile.