[HOME] [DOWNLOAD] [DOCS] [NEWS] [SUPPORT] [TIPS] [ISSUES] [CONTRIBUTE] [DONATE]

dist-base-files.postinst Aborted on ppc64el

Trying to upgrade packages in Whonix 16 Gateway on ppc64el (distro-morphed from Debian Bullseye) fails when configuring dist-base-files:

user@host:~$ sudo DEBDEBUG=1 apt dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  extrepo flatpak initramfs-tools-core klibc-utils libcryptx-perl libklibc
  libplymouth5 libu2f-udev libyaml-libyaml-perl zsh zsh-common
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-5.10.0-8-powerpc64le
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
11 not fully installed or removed.
After this operation, 253 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 254249 files and directories currently installed.)
Removing linux-image-5.10.0-8-powerpc64le (5.10.46-5) ...
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found background image: /usr/share/images/desktop-base/desktop-grub.png
Found linux image: /boot/vmlinux-5.15.0-0.bpo.3-powerpc64le
Found initrd image: /boot/initrd.img-5.15.0-0.bpo.3-powerpc64le
Found linux image: /boot/vmlinux-5.14.0-trunk-powerpc64le
Found initrd image: /boot/initrd.img-5.14.0-trunk-powerpc64le
Found linux image: /boot/vmlinux-5.15.0-0.bpo.3-powerpc64le
Found initrd image: /boot/initrd.img-5.15.0-0.bpo.3-powerpc64le
Found linux image: /boot/vmlinux-5.14.0-trunk-powerpc64le
Found initrd image: /boot/initrd.img-5.14.0-trunk-powerpc64le
  Failed to set up async io, using sync io.
done
Setting up dist-base-files (3:8.1-1) ...
++ '[' '' = true ']'
++ colors
++ '[' vt220 = '' ']'
++ [[ -t 2 ]]
+++ type -t errorhandlergeneral
++ '[' '' = function ']'
+++ trap -p ERR
++ '[' '' = '' ']'
++ trap error_handler_pre ERR
++ bash -n /usr/libexec/helper-scripts/pre.bsh
++ bash -n /var/lib/dpkg/info/dist-base-files.postinst
++ own_filename=dist-base-files.postinst
++ source_config_folder
++ '[' dist-base-files = '' ']'
++ pre_bsh_settings_folder=dist-base-files_maint.d
++ shopt -s nullglob
++ local i
++ true 'folder 1: /etc/dist-base-files_maint.d/*.conf'
++ true 'folder 2: /usr/local/etc/dist-base-files_maint.d/*.conf'
++ shopt -u nullglob
++ check_scripts_to_skip
++ local skip_script
+ set -e
+ true '
#####################################################################
## INFO: BEGIN: dist-base-files postinst configure' '3:8.0-1
#####################################################################
'
+ user_to_be_created=user
+ account_to_be_locked=root
+ case "$1" in
+ true 'INFO: Configuring dist-base-files...'
+ build_version_file=/var/lib/dist-base-files/build_version
+ '[' '!' -f /var/lib/dist-base-files/build_version ']'
+ id user
/var/lib/dpkg/info/dist-base-files.postinst: line 22: 39663 Aborted                 (core dumped) id "$user_to_be_created" &>
 /dev/null
+ command -v qubesdb-read
+ password=aTayYxVyw5kDo
+ adduser --no-create-home --disabled-login --gecos '' user
adduser: The user `user' already exists.
++ error_handler_pre
++ local exit_code=1
++ local 'last_err=adduser --no-create-home --disabled-login --gecos "" "$user_to_be_created"'
++ '[' '!' 1 = 1 ']'
++ '[' '' = '' ']'
++ output='## See above.'
++ force_output '
####################################################################
## BEGIN ERROR in /var/lib/dpkg/info/dist-base-files.postinst detected!
##
## ERROR LOG:
## See above.
##
## BASH_COMMAND: adduser --no-create-home --disabled-login --gecos "" "$user_to_be_created"
## EXIT_CODE: 1
##
## END ERROR in /var/lib/dpkg/info/dist-base-files.postinst detected!
## Please report this bug!
####################################################################
'
++ '[' '' = true ']'
++ echo '
####################################################################
## BEGIN ERROR in /var/lib/dpkg/info/dist-base-files.postinst detected!
##
## ERROR LOG:
## See above.
##
## BASH_COMMAND: adduser --no-create-home --disabled-login --gecos "" "$user_to_be_created"
## EXIT_CODE: 1
##
## END ERROR in /var/lib/dpkg/info/dist-base-files.postinst detected!
## Please report this bug!
####################################################################
'

####################################################################
## BEGIN ERROR in /var/lib/dpkg/info/dist-base-files.postinst detected!
##
## ERROR LOG:
## See above.
##
## BASH_COMMAND: adduser --no-create-home --disabled-login --gecos "" "$user_to_be_created"
## EXIT_CODE: 1
##
## END ERROR in /var/lib/dpkg/info/dist-base-files.postinst detected!
## Please report this bug!
####################################################################

++ '[' '' = true ']'
++ rm -f /tmp/tmp.ZE7jrKsNNU
++ exit 1
dpkg: error processing package dist-base-files (--configure):
 installed dist-base-files package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of kicksecure-dependencies-cli:
 kicksecure-dependencies-cli depends on dist-base-files; however:
  Package dist-base-files is not configured yet.

dpkg: error processing package kicksecure-dependencies-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of non-qubes-whonix-gateway-cli:
 non-qubes-whonix-gateway-cli depends on kicksecure-dependencies-cli; however:
  Package kicksecure-dependencies-cli is not configured yet.

dpkg: error processing package non-qubes-whonix-gateway-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of whonix-shared-packages-dependencies-cli:
 whonix-shared-packages-dependencies-cli depends on dist-base-files; however:
  Package dist-base-files is not configured yet.

dpkg: error processing package whonix-shared-packages-dependencies-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of systemcheck:
 systemcheck depends on dist-base-files; however:
  Package dist-base-files is not configured yet.

dpkg: error processing package systemcheck (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of whonix-shared-packages-recommended-cli:
 whonix-shared-packages-recommended-cli depends on kicksecure-dependencies-cli; however:
  Package kicksecure-dependencies-cli is not configured yet.
 whonix-shared-packages-recommended-cli depends on systemcheck; however:
  Package systemcheck is not configured yet.

dpkg: error processing package whonix-shared-packages-recommended-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of whonix-gateway-packages-dependencies-pre:
 whonix-gateway-packages-dependencies-pre depends on dist-base-files; however:
  Package dist-base-files is not configured yet.

dpkg: error processing package whonix-gateway-packages-dependencies-pre (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of anon-gw-anonymizer-config:
 anon-gw-anonymizer-config depends on dist-base-files; however:
  Package dist-base-files is not configured yet.

dpkg: error processing package anon-gw-anonymizer-config (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of whonix-gateway-packages-dependencies-cli:
 whonix-gateway-packages-dependencies-cli depends on anon-gw-anonymizer-config; however:
  Package anon-gw-anonymizer-config is not configured yet.
 whonix-gateway-packages-dependencies-cli depends on whonix-gateway-packages-dependencies-pre; however:
  Package whonix-gateway-packages-dependencies-pre is not configured yet.

dpkg: error processing package whonix-gateway-packages-dependencies-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of non-qubes-whonix-gateway-xfce:
 non-qubes-whonix-gateway-xfce depends on non-qubes-whonix-gateway-cli; however:
  Package non-qubes-whonix-gateway-cli is not configured yet.

dpkg: error processing package non-qubes-whonix-gateway-xfce (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of kicksecure-recommended-cli:
 kicksecure-recommended-cli depends on systemcheck; however:
  Package systemcheck is not configured yet.

dpkg: error processing package kicksecure-recommended-cli (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 dist-base-files
 kicksecure-dependencies-cli
 non-qubes-whonix-gateway-cli
 whonix-shared-packages-dependencies-cli
 systemcheck
 whonix-shared-packages-recommended-cli
 whonix-gateway-packages-dependencies-pre
 anon-gw-anonymizer-config
 whonix-gateway-packages-dependencies-cli
 non-qubes-whonix-gateway-xfce
 kicksecure-recommended-cli
E: Sub-process /usr/bin/dpkg returned an error code (1)

If I’m reading the log right (not sure that I am), the relevant line seems to be id user, which works fine when I type it into a terminal:

user@host:~$ id user
uid=1000(user) gid=1000(user) groups=1000(user),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),109(net
dev),114(lpadmin),117(scanner),121(console),122(debian-tor)

I’m not sure how to narrow this down further. Is there maybe some kind of sandboxing that I can selectively disable in order to see if that’s causing the problem? I tried commenting out the seccomp apt sandboxing from security-misc and it didn’t seem to help.

(Not sure whether this belongs in KVM or Development subforum, feel free to move it if I picked wrong.)

1 Like

Could you please keep running

sudo journalctl -f

while this issue is happening? Hopefully systemd journal will tell more.

No.

You’ve already located https://github.com/Whonix/security-misc/blob/master/etc/apt/apt.conf.d/40sandbox which is the only thing that I am aware of. There should be no other sandboxing.


There’s a feature to unblock your issue based on:
https://github.com/Whonix/helper-scripts/blob/master/usr/libexec/helper-scripts/pre.bsh#L50

Commands:

sudo mkdir -p /etc/dist-base-files.d/*.conf
echo "set +e" | sudo tee /etc/dist-base-files.d/50_user.conf

It disables bash error checking.
(You most likely know that but my answers are supposed to compatible with users too that don’t speak /bin/bash too.)


Developer discussion:

Adding || true to the adduser command in the script to ignore this might not be a great idea… Similar to disabling error checking. Would reset password, re-add groups which might be unwanted.

If adduser fails, skip the rest of the code path? But if really fails during Whonix build process, could leak to lots of strange follow-up issues.

user@host:~$ sudo journalctl -f
-- Journal begins at Sat 2021-09-11 03:04:43 UTC. --
Feb 26 05:17:02 host vanguards[872]: WARNING[Sat Feb 26 05:17:02 2022]: We've been disconnected from the Tor network for 240 
seconds!
Feb 26 05:17:17 host vanguards[872]: WARNING[Sat Feb 26 05:17:17 2022]: We've been disconnected from the Tor network for 255 
seconds!
Feb 26 05:17:24 host sudo[47605]: pam_unix(sudo:session): session closed for user root
Feb 26 05:17:32 host vanguards[872]: WARNING[Sat Feb 26 05:17:32 2022]: We've been disconnected from the Tor network for 270 
seconds!
Feb 26 05:17:47 host vanguards[872]: WARNING[Sat Feb 26 05:17:47 2022]: We've been disconnected from the Tor network for 285 
seconds!
Feb 26 05:17:56 host sudo[47607]:     user : TTY=pts/0 ; PWD=/home/user ; USER=root ; ENV=DEBDEBUG=1 ; COMMAND=/usr/bin/apt d
ist-upgrade
Feb 26 05:17:56 host sudo[47607]: pam_unix(sudo:session): session opened for user root(uid=0) by (uid=1000)
Feb 26 05:18:02 host vanguards[872]: WARNING[Sat Feb 26 05:18:02 2022]: We've been disconnected from the Tor network for 300 
seconds!
Feb 26 05:18:17 host vanguards[872]: WARNING[Sat Feb 26 05:18:17 2022]: We've been disconnected from the Tor network for 315 
seconds!
Feb 26 05:18:32 host vanguards[872]: WARNING[Sat Feb 26 05:18:32 2022]: We've been disconnected from the Tor network for 330 
seconds!
Feb 26 05:18:38 host sudo[47649]:     user : TTY=hvc0 ; PWD=/home/user ; USER=root ; COMMAND=/usr/bin/journalctl -f
Feb 26 05:18:38 host sudo[47649]: pam_unix(sudo:session): session opened for user root(uid=0) by user(uid=1000)
Feb 26 05:18:47 host vanguards[872]: WARNING[Sat Feb 26 05:18:47 2022]: We've been disconnected from the Tor network for 345 
seconds!
Feb 26 05:19:02 host vanguards[872]: WARNING[Sat Feb 26 05:19:02 2022]: We've been disconnected from the Tor network for 360 
seconds!
Feb 26 05:19:17 host vanguards[872]: WARNING[Sat Feb 26 05:19:17 2022]: We've been disconnected from the Tor network for 375 
seconds!
Feb 26 05:19:32 host vanguards[872]: WARNING[Sat Feb 26 05:19:32 2022]: We've been disconnected from the Tor network for 390 
seconds!
Feb 26 05:19:47 host vanguards[872]: WARNING[Sat Feb 26 05:19:47 2022]: We've been disconnected from the Tor network for 405 
seconds!
Feb 26 05:19:59 host sudo[47607]: pam_unix(sudo:session): session closed for user root
Feb 26 05:20:02 host vanguards[872]: WARNING[Sat Feb 26 05:20:02 2022]: We've been disconnected from the Tor network for 420 
seconds!
Feb 26 05:20:17 host vanguards[872]: WARNING[Sat Feb 26 05:20:17 2022]: We've been disconnected from the Tor network for 435 
seconds!
Feb 26 05:20:32 host vanguards[872]: WARNING[Sat Feb 26 05:20:32 2022]: We've been disconnected from the Tor network for 450 
seconds!
Feb 26 05:20:47 host vanguards[872]: WARNING[Sat Feb 26 05:20:47 2022]: We've been disconnected from the Tor network for 465 
seconds!

I don’t see anything jumping out of the journalctl -f log. I assume the vanguards warnings are unrelated.

Suggestions on what I should do next to debug? I’m not opposed to implementing your set +e workaround in my own VM’s so that I can get useful work done in those VM’s, but I’d really like to get this fixed properly.

1 Like

Could you please try to build the minimal-package from source code and attempt to install it?

Posted it here a while ago:
ppc64 architecture

Expected outcome:

/var/lib/dpkg/info/minimal-pacakge.postinst: line xx: xxxxx Aborted

But then we have something simple enough to be able to contact the APT developers. Then no need to mention any of the complexity of Whonix, dist-base-files, etc.

[Imprint] [Privacy Policy] [Cookie Policy] [Terms of Use] [E-Sign Consent] [DMCA] [Contributors] [Investors] [Priority Support] [Professional Support]