summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2017-10-26 14:43:31 -0700
committerJoe MacDonald <joe_macdonald@mentor.com>2018-01-08 11:51:21 -0500
commite1221e7aa4c66dbd279f4460f3314679f720287f (patch)
tree8d51e7d52f53772f412e7f95c1f795d8e3599a89 /meta-networking
parentd338d219dfbcbbdd133c7d4364bc8a1b19835e0b (diff)
downloadmeta-openembedded-e1221e7aa4c66dbd279f4460f3314679f720287f.tar.gz
postfix: fix send mail failure and eliminate warning
* Update main.cf for postfix 3.x to eliminate startup warning * Set daemon_directory from ${libexecdir} to ${libexecdir}/postfix * Using absolute path for newaliases and postmap to generate the correct db file in pkg_postinst * Remove duplicate SRC_URI lines in postfix_3.2.2.bb (LOCAL REV: NOT UPSTREAM) -- will sent to oe-devel later Signed-off-by: Yi Zhao <yi.zhao@windriver.com> * Move use of newaliases and postmap on host to install phase because absolute path might not exist at rootfs build time. Signed-off-by: Joe Slater <jslater@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking')
-rw-r--r--meta-networking/recipes-daemons/postfix/files/main.cf (renamed from meta-networking/recipes-daemons/postfix/files/main.cf_2.0)3
-rw-r--r--meta-networking/recipes-daemons/postfix/postfix.inc28
-rw-r--r--meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb17
3 files changed, 22 insertions, 26 deletions
diff --git a/meta-networking/recipes-daemons/postfix/files/main.cf_2.0 b/meta-networking/recipes-daemons/postfix/files/main.cf
index dc7feb57b..2371ace6e 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 @@
1compatibility_level = 2
2smtputf8_enable = no
3
1# Configure your domain and accounts 4# Configure your domain and accounts
2#mydomain=sample.com 5#mydomain=sample.com
3#FQDN from gethostname 6#FQDN from gethostname
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index a588bd347..8dad45f85 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"
18SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ 18SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
19 file://makedefs.patch \ 19 file://makedefs.patch \
20 file://install.patch \ 20 file://install.patch \
21 file://main.cf_2.0 \ 21 file://main.cf \
22 file://postfix \ 22 file://postfix \
23 file://internal_recipient \ 23 file://internal_recipient \
24 file://postfix.service \ 24 file://postfix.service \
@@ -135,7 +135,7 @@ SYSTEMD_SERVICE_${PN} = "postfix.service"
135do_install () { 135do_install () {
136 sh ./postfix-install 'install_root=${D}' \ 136 sh ./postfix-install 'install_root=${D}' \
137 'config_directory=${sysconfdir}/postfix' \ 137 'config_directory=${sysconfdir}/postfix' \
138 'daemon_directory=${libexecdir}' \ 138 'daemon_directory=${libexecdir}/postfix' \
139 'command_directory=${sbindir}' \ 139 'command_directory=${sbindir}' \
140 'queue_directory=${localstatedir}/spool/postfix' \ 140 'queue_directory=${localstatedir}/spool/postfix' \
141 'sendmail_path=${sbindir}/sendmail.postfix' \ 141 'sendmail_path=${sbindir}/sendmail.postfix' \
@@ -149,8 +149,8 @@ do_install () {
149 mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf 149 mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf
150 install -m 755 ${S}/bin/smtp-sink ${D}/${sbindir}/ 150 install -m 755 ${S}/bin/smtp-sink ${D}/${sbindir}/
151 install -d ${D}${sysconfdir}/init.d 151 install -d ${D}${sysconfdir}/init.d
152 install -m 644 ${WORKDIR}/main.cf_2.0 ${D}${sysconfdir}/postfix/main.cf 152 install -m 644 ${WORKDIR}/main.cf ${D}${sysconfdir}/postfix/main.cf
153 sed -i 's#@LIBEXECDIR@#${libexecdir}#' ${D}${sysconfdir}/postfix/main.cf 153 sed -i 's#@LIBEXECDIR@#${libexecdir}/postfix#' ${D}${sysconfdir}/postfix/main.cf
154 154
155 install -m 755 ${WORKDIR}/check_hostname.sh ${D}${sbindir}/ 155 install -m 755 ${WORKDIR}/check_hostname.sh ${D}${sbindir}/
156 156
@@ -159,11 +159,11 @@ do_install () {
159 159
160 install -d ${D}${systemd_unitdir}/system 160 install -d ${D}${systemd_unitdir}/system
161 install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system 161 install -m 0644 ${WORKDIR}/postfix.service ${D}${systemd_unitdir}/system
162 sed -i -e 's#@LIBEXECDIR@#${libexecdir}#g' ${D}${systemd_unitdir}/system/postfix.service 162 sed -i -e 's#@LIBEXECDIR@#${libexecdir}/postfix#g' ${D}${systemd_unitdir}/system/postfix.service
163 sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/postfix.service 163 sed -i -e 's#@LOCALSTATEDIR@#${localstatedir}#g' ${D}${systemd_unitdir}/system/postfix.service
164 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/postfix.service 164 sed -i -e 's#@SBINDIR@#${sbindir}#g' ${D}${systemd_unitdir}/system/postfix.service
165 165
166 install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir} 166 install -m 0755 ${WORKDIR}/aliasesdb ${D}${libexecdir}/postfix
167 167
168 install -m 770 -d ${D}${localstatedir}/spool/postfix 168 install -m 770 -d ${D}${localstatedir}/spool/postfix
169 chown postfix:postfix ${D}${localstatedir}/spool/postfix 169 chown postfix:postfix ${D}${localstatedir}/spool/postfix
@@ -217,6 +217,12 @@ do_install_append_class-native() {
217do_install_append_class-target() { 217do_install_append_class-target() {
218 # Remove references to buildmachine paths in target makedefs.out 218 # Remove references to buildmachine paths in target makedefs.out
219 sed -i 's:-fdebug-prefix-map[^ ]*::g; s:--sysroot=${STAGING_DIR_TARGET}::g' ${D}/etc/postfix/makedefs.out 219 sed -i 's:-fdebug-prefix-map[^ ]*::g; s:--sysroot=${STAGING_DIR_TARGET}::g' ${D}/etc/postfix/makedefs.out
220 # Since we are building recipe postfix, newaliases and postmap come from our sysroot_native.
221 touch ${D}/etc/aliases
222 newaliases -C ${D}/etc/postfix/main.cf -oA${D}/etc/aliases
223 touch ${D}/etc/postfix/virtual_alias
224 postmap -c ${D}/etc/postfix ${D}/etc/postfix/virtual_alias
225
220} 226}
221 227
222NATIVE_INSTALL_WORKS = "1" 228NATIVE_INSTALL_WORKS = "1"
@@ -240,13 +246,8 @@ pkg_postinst_${PN} () {
240 touch /etc/postfix/virtual_alias 246 touch /etc/postfix/virtual_alias
241 postmap /etc/postfix/virtual_alias 247 postmap /etc/postfix/virtual_alias
242 else 248 else
243 touch $D/etc/aliases
244 newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases
245 touch $D/etc/postfix/virtual_alias
246 postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
247
248 if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then 249 if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then
249 # /usr/lib/sendmial is required by LSB core test 250 # /usr/lib/sendmail is required by LSB core test
250 [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/ 251 [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
251 fi 252 fi
252 fi 253 fi
@@ -255,4 +256,5 @@ pkg_postinst_${PN} () {
255# Exclude .debug directories from the main package 256# Exclude .debug directories from the main package
256FILES_${PN} = "${sysconfdir} ${localstatedir} ${bindir}/* ${sbindir}/* \ 257FILES_${PN} = "${sysconfdir} ${localstatedir} ${bindir}/* ${sbindir}/* \
257 ${libexecdir}/* ${systemd_unitdir}/*" 258 ${libexecdir}/* ${systemd_unitdir}/*"
258FILES_${PN}-dbg += "${libexecdir}/.debug" 259CONFFILES_${PN} = "/etc/aliases /etc/postfix/virtual_alias*"
260FILES_${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
index 439ede9b6..89af406ac 100644
--- a/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb
+++ b/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb
@@ -1,18 +1,9 @@
1require postfix.inc 1require postfix.inc
2 2
3SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \ 3SRC_URI += "file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \
4 file://makedefs.patch \ 4 file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \
5 file://install.patch \ 5 file://postfix-install.patch \
6 file://main.cf_2.0 \ 6 file://icu-config.patch \
7 file://postfix \
8 file://internal_recipient \
9 file://postfix.service \
10 file://aliasesdb \
11 file://check_hostname.sh \
12 file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \
13 file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \
14 file://postfix-install.patch \
15 file://icu-config.patch \
16 " 7 "
17SRC_URI[md5sum] = "aea073a9b0bea5bdb590460a270a4aa0" 8SRC_URI[md5sum] = "aea073a9b0bea5bdb590460a270a4aa0"
18SRC_URI[sha256sum] = "d06849418d119d09366997b2b481bb23f737629769b4e4a52da42fb3ad8b0576" 9SRC_URI[sha256sum] = "d06849418d119d09366997b2b481bb23f737629769b4e4a52da42fb3ad8b0576"