[oe] [meta-networking][PATCH] postfix: update to 3.2.4
Yi Zhao
yi.zhao at windriver.com
Thu Nov 9 00:37:14 UTC 2017
* Update main.cf for postfix 3.x to eliminate startup warning
* Change daemon_directory from ${libexecdir} to ${libexecdir}/postfix
* Add postfix-native to PACKAGE_WRITE_DEPS to make sure newaliases and
postmap can be found in pkg_postinst
* Remove duplicate SRC_URI lines in bb file
Signed-off-by: Yi Zhao <yi.zhao at windriver.com>
---
.../postfix/files/{main.cf_2.0 => main.cf} | 5 ++++-
.../recipes-daemons/postfix/files/postfix.service | 2 +-
meta-networking/recipes-daemons/postfix/postfix.inc | 13 +++++++------
.../recipes-daemons/postfix/postfix_3.2.2.bb | 18 ------------------
.../recipes-daemons/postfix/postfix_3.2.4.bb | 9 +++++++++
5 files changed, 21 insertions(+), 26 deletions(-)
rename meta-networking/recipes-daemons/postfix/files/{main.cf_2.0 => main.cf} (97%)
delete mode 100644 meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb
create mode 100644 meta-networking/recipes-daemons/postfix/postfix_3.2.4.bb
diff --git a/meta-networking/recipes-daemons/postfix/files/main.cf_2.0 b/meta-networking/recipes-daemons/postfix/files/main.cf
similarity index 97%
rename from meta-networking/recipes-daemons/postfix/files/main.cf_2.0
rename to meta-networking/recipes-daemons/postfix/files/main.cf
index dc7feb5..e75c6fc 100644
--- a/meta-networking/recipes-daemons/postfix/files/main.cf_2.0
+++ b/meta-networking/recipes-daemons/postfix/files/main.cf
@@ -1,3 +1,6 @@
+compatibility_level = 2
+smtputf8_enable = no
+
# Configure your domain and accounts
#mydomain=sample.com
#FQDN from gethostname
@@ -30,7 +33,7 @@ queue_directory = /var/spool/postfix
mail_spool_directory = /var/spool/mail
readme_directory = no
command_directory = /usr/sbin
-daemon_directory = @LIBEXECDIR@
+daemon_directory = @LIBEXECDIR@/postfix
mail_owner = postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 450
diff --git a/meta-networking/recipes-daemons/postfix/files/postfix.service b/meta-networking/recipes-daemons/postfix/files/postfix.service
index 3a9a0a1..30d54a4 100644
--- a/meta-networking/recipes-daemons/postfix/files/postfix.service
+++ b/meta-networking/recipes-daemons/postfix/files/postfix.service
@@ -7,7 +7,7 @@ Conflicts=sendmail.service exim.service
Type=forking
PIDFile=@LOCALSTATEDIR@/spool/postfix/pid/master.pid
ExecStartPre=- at SBINDIR@/check_hostname.sh
-ExecStartPre=- at LIBEXECDIR@/aliasesdb
+ExecStartPre=- at LIBEXECDIR@/postfix/aliasesdb
ExecStart=@SBINDIR@/postfix start
ExecReload=@SBINDIR@/postfix reload
ExecStop=@SBINDIR@/postfix stop
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index a588bd3..5e11794 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -18,7 +18,7 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=64375f37431336ea1b1b3005fe3fa354"
SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
file://makedefs.patch \
file://install.patch \
- file://main.cf_2.0 \
+ file://main.cf \
file://postfix \
file://internal_recipient \
file://postfix.service \
@@ -135,7 +135,7 @@ SYSTEMD_SERVICE_${PN} = "postfix.service"
do_install () {
sh ./postfix-install 'install_root=${D}' \
'config_directory=${sysconfdir}/postfix' \
- 'daemon_directory=${libexecdir}' \
+ 'daemon_directory=${libexecdir}/postfix' \
'command_directory=${sbindir}' \
'queue_directory=${localstatedir}/spool/postfix' \
'sendmail_path=${sbindir}/sendmail.postfix' \
@@ -149,7 +149,7 @@ do_install () {
mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf
install -m 755 ${S}/bin/smtp-sink ${D}/${sbindir}/
install -d ${D}${sysconfdir}/init.d
- install -m 644 ${WORKDIR}/main.cf_2.0 ${D}${sysconfdir}/postfix/main.cf
+ install -m 644 ${WORKDIR}/main.cf ${D}${sysconfdir}/postfix/main.cf
sed -i 's#@LIBEXECDIR@#${libexecdir}#' ${D}${sysconfdir}/postfix/main.cf
install -m 755 ${WORKDIR}/check_hostname.sh ${D}${sbindir}/
@@ -163,7 +163,7 @@ do_install () {
sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/postfix.service
sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/postfix.service
- install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir}
+ install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir}/postfix
install -m 770 -d ${D}${localstatedir}/spool/postfix
chown postfix:postfix ${D}${localstatedir}/spool/postfix
@@ -231,6 +231,7 @@ ALTERNATIVE_LINK_NAME[mailq.1] = "${mandir}/man1/mailq.1"
ALTERNATIVE_LINK_NAME[newaliases.1] = "${mandir}/man1/newaliases.1"
ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1"
+PACKAGE_WRITE_DEPS += "postfix-native"
pkg_postinst_${PN} () {
if [ "x$D" = "x" ]; then
touch /etc/aliases
@@ -246,7 +247,7 @@ pkg_postinst_${PN} () {
postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then
- # /usr/lib/sendmial is required by LSB core test
+ # /usr/lib/sendmail is required by LSB core test
[ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
fi
fi
@@ -255,4 +256,4 @@ pkg_postinst_${PN} () {
# Exclude .debug directories from the main package
FILES_${PN} = "${sysconfdir} ${localstatedir} ${bindir}/* ${sbindir}/* \
${libexecdir}/* ${systemd_unitdir}/*"
-FILES_${PN}-dbg += "${libexecdir}/.debug"
+FILES_${PN}-dbg += "${libexecdir}/postfix/.debug"
diff --git a/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb b/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb
deleted file mode 100644
index 439ede9..0000000
--- a/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb
+++ /dev/null
@@ -1,18 +0,0 @@
-require postfix.inc
-
-SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
- file://makedefs.patch \
- file://install.patch \
- file://main.cf_2.0 \
- file://postfix \
- file://internal_recipient \
- file://postfix.service \
- file://aliasesdb \
- file://check_hostname.sh \
- file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \
- file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \
- file://postfix-install.patch \
- file://icu-config.patch \
- "
-SRC_URI[md5sum] = "aea073a9b0bea5bdb590460a270a4aa0"
-SRC_URI[sha256sum] = "d06849418d119d09366997b2b481bb23f737629769b4e4a52da42fb3ad8b0576"
diff --git a/meta-networking/recipes-daemons/postfix/postfix_3.2.4.bb b/meta-networking/recipes-daemons/postfix/postfix_3.2.4.bb
new file mode 100644
index 0000000..8edd035
--- /dev/null
+++ b/meta-networking/recipes-daemons/postfix/postfix_3.2.4.bb
@@ -0,0 +1,9 @@
+require postfix.inc
+
+SRC_URI += "file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \
+ file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \
+ file://postfix-install.patch \
+ file://icu-config.patch \
+ "
+SRC_URI[md5sum] = "60d8418278ef9f3c7d1251480ea84a42"
+SRC_URI[sha256sum] = "ec55ebaa2aa464792af8d5ee103eb68b27a42dc2b36a02fee42dafbf9740c7f6"
--
2.7.4
More information about the Openembedded-devel
mailing list