0

I was a bit surprised today to find the following on a Debian installation:

$ sudo apt-get install mdadm
...
The following NEW packages will be installed:
  exim4-base exim4-config exim4-daemon-light guile-2.0-libs libfribidi0
  libgc1c2 libgsasl7 libkyotocabinet16v5 libltdl7 liblzo2-2 libmailutils5
  libmariadbclient18 libntlm0 libpython2.7 libpython2.7-minimal
  libpython2.7-stdlib mailutils mailutils-common mdadm mysql-common psmisc
...
After this operation, 44.7 MB of additional disk space will be used.

There are a lot of dependencies here that don't seem to be related to managing a RAID array. I can see perhaps a very loose dependency to send an email when the RAID array fails, but beyond that, the above list doesn't make sense to me. It's 45 MB of dependencies.

What's the reason for these dependencies?

  • Coming from something else - just checked on a Stretch machine with base install, mdadm doesn't ask for any of those, and I don't have several/many/most of those libs already installed. – ivanivan Apr 6 '18 at 14:17
  • try apt-get install --no-install-recommends mdadm . Leaner isn't it? – A.B Apr 6 '18 at 17:59
1

None of the above, except for exim4 (via default-mta), is part of mdadm's dependency tree.

It is however part of smartmontools dependency tree. Many daemons themselves generate an RFC x822 email message and feed it to /usr/sbin/sendmail, but the smartd_warning.sh script included with smartmontools is simpler and just runs the mail command.

mail has several sources, including s-nail and bsd-mailx, but by default Debian installs it from the GNU mailutils package.

  • Some mail/mailx clients, including the one from mailutils, support accessing remote POP3 and IMAP servers (as opposed to local mail spools only), and practically any modern IMAP client will require a SASL implementation. The one used by mailutils is Cyrus SASL, which has an optional "server-side" module for Berkeley DB account storage.
  • Mailutils includes POP3 and IMAP servers along with the client, and those support storing user accounts in a SQL database. Debian has split those daemons off into their own packages, as is usually done to avoid lots of dependencies – but for some reason, the unnecessary dependencies weren't removed from the main package. There's a Debian bug report.
  • The maidag tool for filtering mail (similar to procmail) incorporates Python and Scheme (guile) scripting support. Again, it seems like this was split into a separate package but the dependencies weren't removed.

Investigated using:

  1. apt rdepends mailutils
  2. debtree smartmontools | dot -T png -o debtree.png

enter image description here

  • But smartmontools is not a dependency of mdadm. Why would it be pulled in? – Roxy Apr 6 '18 at 17:19
  • Good question. On standard Debian, it is not pulled in. – grawity Apr 6 '18 at 20:09

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.