Page MenuHomePhabricator

Build instructions, exim4 errors
Closed, ResolvedPublic

Description

exim4 causes errors when installing genmkfile. You get into a bunch of error messages saying X is not installed because Y isn't configured. If you go one-by-one dpkg --configure, it eventually installs. Am I the only one getting this?

Details

Impact
High

Event Timeline

Works for me. Please post error messages.

Install build dependencies.

cd Whonix

sudo -E ./build-steps.d/1100_prepare-build-machine --internalrun --build --target virtualbox

It's a good chance to use a Build Configuration and use cowbuilder package build method.

https://www.whonix.org/wiki/Dev/Source_Code_Intro#Build_Configuration

export make_use_cowbuilder=true
Patrick triaged this task as High priority.Jul 1 2017, 6:29 PM
Patrick added a project: build.
Patrick changed Impact from Needs Triage to High.

To compile and install in Whonix 14 workstation or GW, I have to install genmkfile...

$ sudo apt-get install genmkfile

Extracting templates from packages: 100%
Preconfiguring packages ...
Selecting previously unselected package exim4-config.
(Reading database ... 144052 files and directories currently installed.)
Preparing to unpack .../000-exim4-config_4.89-2+deb9u1_all.deb ...
Unpacking exim4-config (4.89-2+deb9u1) ...
Selecting previously unselected package exim4-base.
Preparing to unpack .../001-exim4-base_4.89-2+deb9u1_amd64.deb ...
Unpacking exim4-base (4.89-2+deb9u1) ...
Selecting previously unselected package exim4-daemon-light.
Preparing to unpack .../002-exim4-daemon-light_4.89-2+deb9u1_amd64.deb ...
Unpacking exim4-daemon-light (4.89-2+deb9u1) ...
Selecting previously unselected package libgc1c2:amd64.
Preparing to unpack .../003-libgc1c2_1%3a7.4.2-8_amd64.deb ...
Unpacking libgc1c2:amd64 (1:7.4.2-8) ...
Selecting previously unselected package at.
Preparing to unpack .../004-at_3.1.20-3_amd64.deb ...
Unpacking at (3.1.20-3) ...
Selecting previously unselected package libsigsegv2:amd64.
[...]
Setting up python-apt-common (1.4.0~beta3) ...
Setting up libpath-tiny-perl (0.100-1) ...
Setting up libnet-domain-tld-perl (1.75-1) ...
Setting up libsub-install-perl (0.928-1) ...
Setting up debian-keyring (2017.05.28) ...
Setting up libio-stringy-perl (2.111-2) ...
Setting up libsub-exporter-progressive-perl (0.001013-1) ...
Setting up libtry-tiny-perl (0.28-1) ...
Setting up libclass-method-modifiers-perl (2.12-1) ...
Setting up python-gpg (1.8.0-3+b2) ...
Setting up python3-apt (1.4.0~beta3) ...
Setting up python-chardet (2.3.0-2) ...
Setting up libarchive-zip-perl (1.59-1) ...
Setting up exim4-config (4.89-2+deb9u1) ...
Adding system-user for exim (v4)
/usr/sbin/update-exim4.conf: 467: /usr/sbin/update-exim4.conf: /usr/sbin/exim4: Operation not permitted
Invalid new configfile /var/lib/exim4/config.autogenerated.tmp, not installing
/var/lib/exim4/config.autogenerated.tmp to /var/lib/exim4/config.autogenerated
dpkg: error processing package exim4-config (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up libltdl-dev:amd64 (2.4.6-2) ...
Setting up libdistro-info-perl (0.14) ...
Setting up libio-pty-perl (1:1.08-1.1+b2) ...
Setting up libfile-which-perl (1.21-1) ...
Setting up libperlio-gzip-perl (0.19-1+b2) ...
Setting up libtext-levenshtein-perl (0.13-1) ...
Setting up gettext (0.19.8.1-2) ...
Setting up libvariable-magic-perl (0.61-1) ...
Setting up libnet-ip-perl (1.26-1) ...
Setting up libsigsegv2:amd64 (2.10-5) ...
Setting up librole-tiny-perl (2.000005-1) ...
Setting up libfile-homedir-perl (1.00-1) ...
Setting up libipc-system-simple-perl (1.25-3) ...
Setting up libfile-basedir-perl (0.07-1) ...
Setting up libstring-escape-perl (2010.002-1) ...
Setting up mysql-common (5.8+1.0.2) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up python3-magic (1:5.30-1) ...
Setting up libossp-uuid16:amd64 (1.6.2-1.5+b4) ...
Setting up libossp-uuid-perl (1.6.2-1.5+b4) ...
Setting up libgc1c2:amd64 (1:7.4.2-8) ...
Setting up libnumber-range-perl (0.12-1) ...
Setting up liblist-compare-perl (0.53-1) ...
Setting up dctrl-tools (2.24-2+b1) ...
Setting up libhttp-daemon-perl (6.01-1) ...
Setting up libmariadbclient18:amd64 (10.1.23-9+deb9u1) ...
Setting up devscripts (2.17.6) ...
Setting up m4 (1.4.18-1) ...
dpkg: dependency problems prevent configuration of exim4-base:
exim4-base depends on exim4-config (>= 4.82) | exim4-config-2; however:

Package exim4-config is not configured yet.
Package exim4-config-2 is not installed.
Package exim4-config which provides exim4-config-2 is not configured yet.

dpkg: error processing package exim4-base (--configure):
dependency problems - leaving unconfigured
Setting up at (3.1.20-3) ...
Created symlink /etc/systemd/system/multi-user.target.wants/atd.service → /lib/systemd/system/atd.service.
Setting up libsub-identify-perl (0.12-2+b1) ...
Setting up libpod-constants-perl (0.19-1) ...
Setting up libsort-versions-perl (1.62-1) ...
Setting up libfile-chdir-perl (0.1008-1) ...
Setting up libsys-hostname-long-perl (1.5-1) ...
Setting up python-debian (0.1.30) ...
Setting up libtext-glob-perl (0.10-1) ...
Setting up intltool-debian (0.35.0+20060710.4) ...
Setting up libpackage-stash-xs-perl (0.28-3+b1) ...
Setting up libstrictures-perl (2.000003-1) ...
Setting up libntlm0:amd64 (1.4-8) ...
Setting up libmail-sendmail-perl (0.79.16-2) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Setting up libsocket6-perl (0.27-1+b1) ...
Setting up patchutils (0.3.4-2) ...
Setting up autotools-dev (20161112.1) ...
Setting up python3-chardet (2.3.0-2) ...
Setting up t1utils (1.39-2) ...
Setting up dput (0.12.1) ...
Setting up libfakeroot:amd64 (1.21-3.1) ...
Setting up guile-2.0-libs:amd64 (2.0.13+1-4) ...
Setting up libscalar-list-utils-perl (1:1.47-1) ...
Processing triggers for systemd (232-25) ...
Setting up libstring-copyright-perl (0.003005-1) ...
Setting up libxml-parser-perl (2.44-2+b1) ...
Setting up libipc-run-perl (0.94-1) ...
Setting up libcgi-pm-perl (4.35-1) ...
Setting up libdevel-globaldestruction-perl (0.14-1) ...
Setting up libdigest-hmac-perl (1.03+dfsg-1) ...
Setting up libio-string-perl (1.08-3) ...
Setting up libclone-perl (0.38-2+b1) ...
Setting up wdiff (1.2.2-2) ...
Setting up libclass-xsaccessor-perl (1.19-2+b7) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libnumber-compare-perl (0.03-1) ...
dpkg: dependency problems prevent configuration of exim4-daemon-light:
exim4-daemon-light depends on exim4-base (>= 4.89); however:

Package exim4-base is not configured yet.

dpkg: error processing package exim4-daemon-light (--configure):
dependency problems - leaving unconfigured
Setting up libunicode-utf8-perl (0.60-1+b3) ...
Setting up libconvert-binhex-perl (1.125-1) ...
Setting up libio-sessiondata-perl (1.03-1) ...
Setting up libparams-util-perl (1.07-3+b1) ...
Setting up python-apt (1.4.0~beta3) ...
Setting up libsub-name-perl (0.21-1) ...
Setting up libyaml-libyaml-perl (0.63-2) ...
Setting up libparams-classify-perl (0.013-6+b1) ...
Setting up libkyotocabinet16v5:amd64 (1.2.76-4.2+b1) ...
Setting up libfcgi-perl (0.78-2) ...
Setting up python3-debian (0.1.30) ...
Setting up diffstat (1.61-1+b1) ...
Setting up autopoint (0.19.8.1-2) ...
Setting up libclass-accessor-perl (0.34-1) ...
Setting up libsort-key-perl (1.33-1+b3) ...
Setting up libclass-inspector-perl (1.31-1) ...
Setting up mailutils-common (1:3.1.1-1) ...
Setting up libmime-tools-perl (5.508-1) ...
Setting up libtask-weaken-perl (1.04-1) ...
Setting up libfile-stripnondeterminism-perl (0.034-1) ...
Setting up libtool (2.4.6-2) ...
Setting up libgsasl7 (1.8.0-8+b2) ...
Setting up libmailutils5:amd64 (1:3.1.1-1) ...
Setting up libdata-optlist-perl (0.110-1) ...
Setting up libgit-wrapper-perl (0.047-1) ...
Setting up strip-nondeterminism (0.034-1) ...
Setting up po-debconf (1.0.20) ...
Setting up libio-socket-inet6-perl (2.72-2) ...
Setting up libsoap-lite-perl (1.20-1) ...
Setting up libmodule-runtime-perl (0.014-2) ...
Setting up autoconf (2.69-10) ...
Setting up libpath-iterator-rule-perl (1.009-1) ...
Setting up libnet-dns-perl (1.07-1) ...
dpkg: dependency problems prevent configuration of mailutils:
mailutils depends on default-mta | mail-transport-agent; however:

Package default-mta is not installed.
Package exim4-daemon-light which provides default-mta is not configured yet.
Package mail-transport-agent is not installed.
Package exim4-daemon-light which provides mail-transport-agent is not configured yet.

dpkg: error processing package mailutils (--configure):
dependency problems - leaving unconfigured
Setting up fakeroot (1.21-3.1) ...
update-alternatives: using /usr/bin/fakeroot-sysv to provide /usr/bin/fakeroot (fakeroot) in auto mode
Setting up libcgi-fast-perl (1:2.12-1) ...
Setting up libsub-exporter-perl (0.986-1) ...
Setting up libxmlrpc-lite-perl (0.717-1) ...
Setting up automake (1:1.15-6) ...
update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode
Setting up libparse-debianchangelog-perl (1.2.0-12) ...
Setting up libemail-valid-perl (1.202-1) ...
Setting up libimport-into-perl (1.002005-1) ...
Setting up libmodule-implementation-perl (0.09-1) ...
Setting up libparams-validate-perl (1.26-1) ...
Setting up lintian (2.5.50.4) ...
Setting up libmoo-perl (2.002005-1) ...
Setting up libb-hooks-endofscope-perl (0.21-1) ...
Setting up libpackage-stash-perl (0.37-1) ...
Setting up libgetopt-long-descriptive-perl (0.100-1) ...
Setting up libnamespace-clean-perl (0.27-1) ...
Setting up licensecheck (3.0.29-1) ...
Setting up dh-autoreconf (14) ...
Setting up debhelper (10.2.5) ...
Setting up equivs (2.0.9+nmu1) ...
Setting up dh-strip-nondeterminism (0.034-1) ...
Setting up genmkfile (3:4.4-1) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Errors were encountered while processing:
exim4-config
exim4-base
exim4-daemon-light
mailutils
E: Sub-process /usr/bin/dpkg returned an error code (1)

$ sudo dpkg --configure exim4-config
This is successful. I think do install mailutils (not sure if that's necessary). I then do sudo make deb-all-dep, but that doesnt install build essentials, and so I install that.

Then I can do make deb-icup

JasonJAyalaP (Jason J. Ayala P.):

$ sudo apt-get install genmkfile

You missed to post the part which shows the confirmation yes/no. It's an
essential part, because it makes somewhat clearer which packages get
pulled in.

It looks like a Debian bug. A bug in some postinst script. The same
probably happens when you manually install exim4-daemon-light?

Does it happen only on Whonix 14? Or does it also happen on plain Debian
stretch?

Quite possibly some package added exim4 as Recommends:. Try installing
without Recommends:.

sudo apt-get install --no-install-recommends genmkfile

(That's also what the build script does. We only use explicit
dependencies. No Recommends:, because these are messy, because these
don't get updated when the package gets upgraded.

JasonJAyalaP (Jason J. Ayala P.):

I think do
install mailutils (not sure if that's necessary).

Unless you prefer that file manage, while would that be required?

but that doesnt install build essentials, and so I
install that.

Not a bug btw. Debian doesn't want Build-Depends: build-essential somehow.

https://lintian.debian.org/tags/build-depends-on-build-essential.html

apt-cache show build-essential
user@host:~/whonix-ws-desktop-shortcuts$ sudo apt-get install genmkfile
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  alsa-base pidgin-improved-privacy
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  at autoconf automake autopoint autotools-dev dctrl-tools debhelper
  debian-keyring devscripts dh-autoreconf dh-strip-nondeterminism diffstat
  dput equivs exim4-base exim4-config exim4-daemon-light fakeroot gettext
  guile-2.0-libs intltool-debian libarchive-zip-perl
  libb-hooks-endofscope-perl libcgi-fast-perl libcgi-pm-perl
  libclass-accessor-perl libclass-inspector-perl
  libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl
  libconvert-binhex-perl libdata-optlist-perl
  libdevel-globaldestruction-perl libdigest-hmac-perl libdistro-info-perl
  libemail-valid-perl libfakeroot libfcgi-perl libfile-basedir-perl
  libfile-chdir-perl libfile-homedir-perl libfile-stripnondeterminism-perl
  libfile-which-perl libgc1c2 libgetopt-long-descriptive-perl
  libgit-wrapper-perl libgsasl7 libhttp-daemon-perl libimport-into-perl
  libio-pty-perl libio-sessiondata-perl libio-socket-inet6-perl
  libio-string-perl libio-stringy-perl libipc-run-perl
  libipc-system-simple-perl libkyotocabinet16v5 liblist-compare-perl
  libltdl-dev libmail-sendmail-perl libmailutils5 libmariadbclient18
  libmime-tools-perl libmodule-implementation-perl libmodule-runtime-perl
  libmoo-perl libnamespace-clean-perl libnet-dns-perl libnet-domain-tld-perl
  libnet-ip-perl libntlm0 libnumber-compare-perl libnumber-range-perl
  libossp-uuid-perl libossp-uuid16 libpackage-stash-perl
  libpackage-stash-xs-perl libparams-classify-perl libparams-util-perl
  libparams-validate-perl libparse-debianchangelog-perl
  libpath-iterator-rule-perl libpath-tiny-perl libperlio-gzip-perl
  libpod-constants-perl librole-tiny-perl libscalar-list-utils-perl
  libsigsegv2 libsoap-lite-perl libsocket6-perl libsort-key-perl
  libsort-versions-perl libstrictures-perl libstring-copyright-perl
  libstring-escape-perl libsub-exporter-perl
  libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl
  libsub-name-perl libsys-hostname-long-perl libtask-weaken-perl
  libtext-glob-perl libtext-levenshtein-perl libtool libtry-tiny-perl
  libunicode-utf8-perl libvariable-magic-perl libxml-parser-perl
  libxmlrpc-lite-perl libyaml-libyaml-perl licensecheck lintian m4 mailutils
  mailutils-common mysql-common patchutils po-debconf python-apt
  python-apt-common python-chardet python-debian python-gpg python3-apt
  python3-chardet python3-debian python3-magic strip-nondeterminism t1utils
  wdiff
Suggested packages:
  autoconf-archive gnu-standards autoconf-doc debtags dh-make adequate
  autopkgtest bls-standalone build-essential check-all-the-things
  cvs-buildpackage devscripts-el diffoscope disorderfs dose-extra duck
  gnuplot how-can-i-help libauthen-sasl-perl libfile-desktopentry-perl
  libnet-smtps-perl libterm-size-perl libyaml-syck-perl mozilla-devscripts
  mutt piuparts ratt reprotest svn-buildpackage w3m mini-dinstall eximon4
  exim4-doc-html | exim4-doc-info spf-tools-perl swaks gettext-doc
  libasprintf-dev libgettextpo-dev libtool-doc uuid libscalar-number-perl
  libhtml-template-perl libxml-simple-perl libapache2-mod-perl2
  libmime-lite-perl libnet-jabber-perl libbareword-filehandles-perl
  libindirect-perl libmultidimensional-perl gfortran | fortran95-compiler
  gcj-jdk binutils-multiarch libtext-template-perl m4-doc mailutils-mh
  mailutils-doc libmail-box-perl python-apt-dbg python-apt-doc
  python3-apt-dbg wdiff-doc
The following NEW packages will be installed:
  at autoconf automake autopoint autotools-dev dctrl-tools debhelper
  debian-keyring devscripts dh-autoreconf dh-strip-nondeterminism diffstat
  dput equivs exim4-base exim4-config exim4-daemon-light fakeroot genmkfile
  gettext guile-2.0-libs intltool-debian libarchive-zip-perl
  libb-hooks-endofscope-perl libcgi-fast-perl libcgi-pm-perl
  libclass-accessor-perl libclass-inspector-perl
  libclass-method-modifiers-perl libclass-xsaccessor-perl libclone-perl
  libconvert-binhex-perl libdata-optlist-perl
  libdevel-globaldestruction-perl libdigest-hmac-perl libdistro-info-perl
  libemail-valid-perl libfakeroot libfcgi-perl libfile-basedir-perl
  libfile-chdir-perl libfile-homedir-perl libfile-stripnondeterminism-perl
  libfile-which-perl libgc1c2 libgetopt-long-descriptive-perl
  libgit-wrapper-perl libgsasl7 libhttp-daemon-perl libimport-into-perl
  libio-pty-perl libio-sessiondata-perl libio-socket-inet6-perl
  libio-string-perl libio-stringy-perl libipc-run-perl
  libipc-system-simple-perl libkyotocabinet16v5 liblist-compare-perl
  libltdl-dev libmail-sendmail-perl libmailutils5 libmariadbclient18
  libmime-tools-perl libmodule-implementation-perl libmodule-runtime-perl
  libmoo-perl libnamespace-clean-perl libnet-dns-perl libnet-domain-tld-perl
  libnet-ip-perl libntlm0 libnumber-compare-perl libnumber-range-perl
  libossp-uuid-perl libossp-uuid16 libpackage-stash-perl
  libpackage-stash-xs-perl libparams-classify-perl libparams-util-perl
  libparams-validate-perl libparse-debianchangelog-perl
  libpath-iterator-rule-perl libpath-tiny-perl libperlio-gzip-perl
  libpod-constants-perl librole-tiny-perl libscalar-list-utils-perl
  libsigsegv2 libsoap-lite-perl libsocket6-perl libsort-key-perl
  libsort-versions-perl libstrictures-perl libstring-copyright-perl
  libstring-escape-perl libsub-exporter-perl
  libsub-exporter-progressive-perl libsub-identify-perl libsub-install-perl
  libsub-name-perl libsys-hostname-long-perl libtask-weaken-perl
  libtext-glob-perl libtext-levenshtein-perl libtool libtry-tiny-perl
  libunicode-utf8-perl libvariable-magic-perl libxml-parser-perl
  libxmlrpc-lite-perl libyaml-libyaml-perl licensecheck lintian m4 mailutils
  mailutils-common mysql-common patchutils po-debconf python-apt
  python-apt-common python-chardet python-debian python-gpg python3-apt
  python3-chardet python3-debian python3-magic strip-nondeterminism t1utils
  wdiff
0 upgraded, 132 newly installed, 0 to remove and 0 not upgraded.
Need to get 53.3 MB of archives.
After this operation, 101 MB of additional disk space will be used.

I installed genmkfile on plain debian 9 (adding the whonix jessie repo) and it installed quickly, without that huge list.

I removed genmkfile, autoremoved that huge list that came with it, did apt-get install genmkfile, it recommended the huge list, I did it again with no-recommends and it showed a multi-part list (with suggested, recommends) but only 4 requirements. It installed and worked fine (make deb-icup inside a package)

Exim 4 is a MTA? oh dear. Yeah. That wasn't right at all.

@Patrick
It didn't happen to me in pure debian 9. What does that tell you? Where should I look for the bug?

Look into the postinst script. /var/lib/dpkg/exim something .postinst.
(Or another extension but probably .postinst.) See what that maintainer
script is doing and what might fail.

How did install genmkfile lead to installing a mail program like exim?

JasonJAyalaP (Jason J. Ayala P.):

JasonJAyalaP added a comment.

How did install genmkfile lead to installing a mail program like exim?

I suspect some package #genmkfile depends lists some package that
Depends: or Recommends: on some package that depends on mta and/or exim.

apt-cache show genmkfile

.

reverse-depends pkg-name

Otherwise please try asking the apt-get developers for what could be the
cause or what kind of debugging tools (to draw a Recommends: tree or
so) are available.

https://lists.debian.org/deity/

I can't reproduce this issue on my side. Tested it with the gateway and workstation 14.0.0.2.6 and with a self build gateway on 14.0.0.4.1. Installing genmkfile works in each case.
However, it depends on the version of genmkfile if exim + a lot of other packages are installed. There are two versions of genmkfile, the latest one is only present in the whonix developers repo. This version requires several packages (see Depends in the control file). One of those packages is devscripts which has the package "at" as recommends which again has some mta like exim as recommends.
The version of genmkfile in jessie, jessie-proposed-updates and testers does not depend on any package. This is also the reason why JasonJAyalaP saw no exim being installed on debian stretch with the whonix jessie repository.
So if you don't want exim etc. to be installed AND you want to use the latest genmkfile version then: use --no-install-recommends.
Otherwise use the whonix jessie repo. Not sure about the differences between the genmkfile versions though.
As already said, for me it also works with the recommended packages and whatever repo, no exim errors.
@JasonJAyalaP can you still reproduce this error on your side?

Whonix gateway 14.0.2.6 upgraded with developers repo:

install genmkfile -> 140 MB including lib-sendmail-perl, etc
install genmkfile --no-install-recommends -> 14 mb

The new genmkfile wants devscripts, but devscripts recommends 125 mb of packages that aren't necessary (i assume?) for us. Even if it did install MTAs without problems, genmkfile shouldn't put all that on our system, right?

It's painful that "recommended" cascades down into every dependency, but since genmkfile is a developer tool, we can simply always say in the wiki "use --no-install-recommends".

Whonix's build script (as well as Qubes-Whonix build) always assumes --no-install-recommends. If something was missing, it would be a missing dependency bug. So using --no-install-recommends when installing genmkfile should be fine.

JasonJAyalaP claimed this task.

Ok. If there's no objection, I'll close this issue and wherever I find "apt-get install genmkfile" in our documentation I will add no install recommends.