Skip to contentSkip to conversation

postfix: add sendmail to ALTERNATIVE_${PN}

PATCH New [email protected] 1 participant 2 messages Sep 5, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 postfix: add sendmail to ALTERNATIVE_${PN}

From: Mingli Yu <[email protected]>

There are several packages provide ${sbindir}/sendmail and should add sendmail to ALTERNATIVE_${PN} to make it work well.

And the sendmail is removed from ALTERNATIVE_${PN} in below commit:
===
commit 7b500488115c67d657312135b48027a1c26e0955

Author: Lei Maohui <[email protected]>
Date:   Fri Aug 17 18:19:53 2018 -0700

postfix,esmtp: Fix confilct error in do_rootfs

Error: Transaction check error:
file /usr/bin/mailq conflicts between attempted installs of esmtp-1.2-r0.x86_64 and postfix-3.2.2-r0.x86_64 file /usr/bin/newaliases conflicts between attempted installs of esmtp-1.2-r0.x86_64 and postfix-3.2.2-r0.x86_64

===

Add it back to make sendmail works normally

before adding it back:

 # mime-construct --to root --subject mail-20826 --encoding 7bit --string mail_content

sendmail: account default not found: no configuration file available Error closing sendmail: non-zero exit (78) at /usr/bin/mime-construct line 572.

 # echo $?
 78

After adding it back:

 # mime-construct --to root --subject mail-20826 --encoding 7bit --string mail_content
 # echo $?
 0
---
 meta-networking/recipes-daemons/postfix/postfix.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-networking/recipes-daemons/postfix/postfix.inc +3 -1
index 389136b..49f9f7b 100644
@@ -214,9 +214,11 @@ do_install_append_class-native() {
     ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq
 }
 
-ALTERNATIVE_${PN} += "mailq newaliases"
+ALTERNATIVE_${PN} += "sendmail mailq newaliases"
 ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq"
 ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases"
+ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix"
+ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
 
 ALTERNATIVE_PRIORITY = "120"
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH 2/2 esmtp: add sendmail to ALTERNATIVE_${PN}

From: Mingli Yu <[email protected]>

There are several packages provide ${sbindir}/sendmail and should add sendmail to ALTERNATIVE_${PN} to make it work well.

And the sendmail is removed from ALTERNATIVE_${PN} in below commit:
===
commit 7b500488115c67d657312135b48027a1c26e0955

Author: Lei Maohui <[email protected]>
Date:   Fri Aug 17 18:19:53 2018 -0700

postfix,esmtp: Fix confilct error in do_rootfs

Error: Transaction check error:
file /usr/bin/mailq conflicts between attempted installs of esmtp-1.2-r0.x86_64 and postfix-3.2.2-r0.x86_64 file /usr/bin/newaliases conflicts between attempted installs of esmtp-1.2-r0.x86_64 and postfix-3.2.2-r0.x86_64

===

Add it back to make sendmail works normally

---
 meta-networking/recipes-support/esmtp/esmtp_1.2.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta-networking/recipes-support/esmtp/esmtp_1.2.bb +3 -1
index 9fb817b..663161a 100644
@@ -18,9 +18,11 @@ EXTRA_OECONF = "--with-libesmtp=${STAGING_EXECPREFIXDIR}"
 
 inherit autotools update-alternatives
 
-ALTERNATIVE_${PN} += "mailq newaliases"
+ALTERNATIVE_${PN} += "sendmail mailq newaliases"
 ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq"
 ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases"
+ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_TARGET[sendmail] = "${bindir}/esmtp"
 
 ALTERNATIVE_PRIORITY = "10"
 
Signature · 1 line
2.7.4