[Bug 4310] New: at-3.1.8-r1-do_compile: fails when no mail transport agent found

bugzilla-daemon at amethyst.openembedded.net bugzilla-daemon at amethyst.openembedded.net
Sun May 25 14:09:07 UTC 2008


http://bugs.openembedded.net/show_bug.cgi?id=4310

           Summary: at-3.1.8-r1-do_compile: fails when no mail transport
                    agent found
    Classification: Unclassified
           Product: Openembedded
           Version: Angstrom 2008.x
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: org.openembedded.dev
        AssignedTo: openembedded-issues at lists.openembedded.org
        ReportedBy: c.romain at laposte.net


_BuildLog_:
i586-angstrom-linux-gcc -march=i586 -c
-isystem/home/me/oe/tmp/staging/i586-angstrom-linux/usr/include
-fexpensive-optimizations -frename-registers -fomit-frame-pointer -Os
-DHAVE_CONFIG_H -DVERSION=\"3.1.8\" -DETCDIR=\"/etc\" -DLOADAVG_MX=0.8
-DDAEMON_USERNAME=\"daemon\" -DDAEMON_GROUPNAME=\"daemon\"
-DLFILE=\"/var/spool/cron/atjobs/.SEQ\" -Wall atd.c
atd.c:452:2: error: #error "No mail command specified."
make: *** [atd.o] Error 1
FATAL: oe_runmake failed
ERROR: Function do_compile failed

_Problem_:
The at package actually has a build time dependency with a mail transport agent
(see below the atd.c code chunk), but such dependency is missing in the recipe.

---8<---8<---
static void
run_file(const char *filename, uid_t uid, gid_t gid)
{
/* Run a file by by spawning off a process which redirects I/O,
 * spawns a subshell, then waits for it to complete and sends
 * mail to the user.
 */

<snip>

#if defined(SENDMAIL)
            execl(SENDMAIL, "sendmail", mailname, (char *) NULL);
#elif  defined(MAILC)
            execl(MAILC, "mail", mailname, (char *) NULL);
#elif  defined(MAILX)
            execl(MAILX, "mailx", mailname, (char *) NULL);
#else
#error      "No mail command specified."
#endif
            perr("Exec failed for mail command");

<snip>
}
---8<---8<---

_WhatOtherDistroDo_:
Debian makes at depending on a virtual mail-tranport-agent package.
http://packages.debian.org/source/etch/at
Gentoo also use a virtual/mta package
http://www.gentoo-portage.com/sys-process/at (the ebuilds has the same flaw
though because at should DEPENDS on virtual/mta, not RDEPENDS. I suspect at
will  fail to build if no mta is available at build time!)

_Solutions_:
I can see the following solutions:

1) The ugly: installing on my host a package providing a sendmail compatible
interface, so that I can fool the build process

2) The bad: patching the atd.c file with something like s/#error/perr()/. But
at won't be able to send mail at runtime (even if one is installed!) if no mail
transport agent is found at build time

3) The good: adding "virtual/mta" in oe metadata, and make at depends on it.
If we go for this solution we need to look for provider in oe metadata, i.e.
packages that provides a sendmail compatible interface. The possible packages
are: esmtp, msmtp, postfix, masqmail, clamsmtp, ssmtp

4) Alternative: creating a script called at runtime by at that is able to find
(+ forward arguments to) an installed mail transport agent.

Any other solutions are welcome!

-- 
Configure bugmail: http://bugs.openembedded.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.




More information about the Openembedded-issues mailing list