MAILPROG binary '/usr/sbin/sendmail' does not exist or is not executable

Bug #1859010 reported by Leonidas S. Barbosa
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
sbuild (Ubuntu)
Triaged
Medium
Unassigned
Focal
Triaged
Medium
Unassigned

Bug Description

[Release info]
sb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Focal Fossa (development branch)
Release: 20.04
Codename: focal

[Issue/BUG?]
While build anything in a schroot, sbuild fails because sendmail is not installed

[Scenario]
I'm having this issue in Focal when trying to build anything in a schroot env.
Even if I try to see sbuild version the error happens:

sbuild --version
Error reading configuration: MAILPROG binary '/usr/sbin/sendmail' does not exist or is not executable at /usr/share/perl5/Sbuild/ConfBase.pm line 59.

Here is while trying to build pkg:

sbuild command is: /usr/bin/sbuild --chroot-setup-commands /tmp/umt-gcedvijf --no-apt-update --no-apt-upgrade --no-apt-distupgrade -d precise-esm-amd64 -A --build-dep-resolver=aptitude php5_5.3.10-1ubuntu3.41.dsc
Error reading configuration: MAILPROG binary '/usr/sbin/sendmail' does not exist or is not executable at /usr/share/perl5/Sbuild/ConfBase.pm line 59.

[Fix/Workround]
Problem can be fixed/workrounded installing sendmail in the host machine, but it's weirdo that sbuild needs sendmail, and if so, why?

Changed in sbuild (Ubuntu Focal):
milestone: ubuntu-20.04 → none
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in sbuild (Ubuntu):
status: New → Confirmed
Revision history for this message
Brian Murray (brian-murray) wrote :

I've been unable to recreate this on a Focal machine which I just installed sbuild on.

bdmurray@clean-focal-amd64:~$ sbuild --version
sbuild (Debian sbuild) 0.78.1 (09 February 2019)

Written by Roman Hodek, James Troup, Ben Collins, Ryan Murray, Rick
Younie, Francesco Paolo Lovergine, Michael Banck, Roger Leigh and
Andres Mejia.
...
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
bdmurray@clean-focal-amd64:~$ apt-cache policy sbuild
sbuild:
  Installed: 0.78.1-2ubuntu1
  Candidate: 0.78.1-2ubuntu1
  Version table:
 *** 0.78.1-2ubuntu1 500
        500 http://192.168.10.7/ubuntu focal/main amd64 Packages
        500 http://192.168.10.7/ubuntu focal/main i386 Packages
        100 /var/lib/dpkg/status
bdmurray@clean-focal-amd64:~$ ls -lh /usr/sbin/sendmail
ls: cannot access '/usr/sbin/sendmail': No such file or directory

Can you give us any more details about your configuration?

Changed in sbuild (Ubuntu Focal):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for sbuild (Ubuntu Focal) because there has been no activity for 60 days.]

Changed in sbuild (Ubuntu Focal):
status: Incomplete → Expired
Revision history for this message
Colin Watson (cjwatson) wrote :

This seems to be partially non-deterministic, which explains why Brian couldn't reproduce it. Firstly, you'll need to have $mailto set in .sbuildrc. After that, Sbuild::ConfBase::read generates an initialisation script that sets keys in the order returned by $conf->get_keys(), which is keys(%{$self->{'KEYS'}}) so depends on hash iteration order. You'll only hit this if MAILTO is set before MAILPROG.

libsbuild-perl now only declares "Suggests: default-mta | mail-transport-agent" while it used to declare "Recommends: exim4 | mail-transport-agent", so I think the intent is for this to be optional unless you've set $mailto, which doesn't seem entirely unreasonable. The main bug here seems to be the non-determinism, which makes the behaviour extremely confusing.

Changed in sbuild (Ubuntu):
status: Expired → Triaged
Changed in sbuild (Ubuntu Focal):
status: Expired → Triaged
Revision history for this message
rdbert (tohyf-w) wrote :

can confirm it is indeterministic. Running the sbuild command a few times can see sometimes it hit the bug and sometimes won't. Running on ubuntu jammy 22.04.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.