summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/postfix/postfix.inc
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2020-04-17 17:14:09 +0800
committerKhem Raj <raj.khem@gmail.com>2020-04-17 19:05:58 -0700
commit335e0bd0cc3fa5ba058f726e7c7b93c27c3d2042 (patch)
tree53d209f43bff014dbe82985bc3623d46529406c0 /meta-networking/recipes-daemons/postfix/postfix.inc
parent1f2c4c2c67ef0d83e40a4b9b5ee73750fb94d261 (diff)
downloadmeta-openembedded-335e0bd0cc3fa5ba058f726e7c7b93c27c3d2042.tar.gz
postfix: split ${PN}-bin from ${PN} to solve recursive dependency
The commit 89d86b96f80d8a136d38113baf69d8ccad5a5ff6 which tries to fix the installation issue for ostree introduces a recursive dependency issue. When installing the postfix package on target via online repository, the postinst function for postfix-cfg package needs newaliases but this command is from postfix package which causes an error: Configuring postfix-cfg. /var/lib/opkg/info/postfix-cfg.postinst: line 9: newaliases: not found pkg_run_script: package "postfix-cfg" postinst script returned status 127. Split a new package postfix-bin from postfix and make it as the runtime dependency for postfix-cfg. Set USERADD_PACKAGES to ${PN}-bin to avoid image do_rootfs warnings when installing postfix via IMAGE_INSTALL: [log_check] warning: group postdrop does not exist - using root [log_check] warning: user postfix does not exist - using root Set ALTERNATIVE to ${PN}-bin to make sure the newaliases symbolic link is installed before installing postfix-cfg. Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-daemons/postfix/postfix.inc')
-rw-r--r--meta-networking/recipes-daemons/postfix/postfix.inc16
1 files changed, 9 insertions, 7 deletions
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index 64c20d0f5..4b9940cc7 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -20,16 +20,16 @@ CLEANBROKEN = "1"
20 20
21BBCLASSEXTEND = "native" 21BBCLASSEXTEND = "native"
22 22
23inherit update-rc.d useradd update-alternatives systemd 23inherit update-rc.d useradd update-alternatives systemd lib_package
24 24
25INITSCRIPT_NAME = "postfix" 25INITSCRIPT_NAME = "postfix"
26INITSCRIPT_PARAMS = "start 58 3 4 5 . stop 13 0 1 6 ." 26INITSCRIPT_PARAMS = "start 58 3 4 5 . stop 13 0 1 6 ."
27USERADD_PACKAGES = "${PN}" 27USERADD_PACKAGES = "${PN}-bin"
28USERADD_PARAM_${PN} = \ 28USERADD_PARAM_${PN}-bin = \
29"-d /var/spool/postfix -r -g postfix --shell /bin/false postfix; \ 29"-d /var/spool/postfix -r -g postfix --shell /bin/false postfix; \
30 -d /var/spool/vmail -r -g vmail --shell /bin/false vmail \ 30 -d /var/spool/vmail -r -g vmail --shell /bin/false vmail \
31" 31"
32GROUPADD_PARAM_${PN} = "--system postfix;--system postdrop;--system vmail" 32GROUPADD_PARAM_${PN}-bin = "--system postfix;--system postdrop;--system vmail"
33 33
34export SYSLIBS = "${LDFLAGS}" 34export SYSLIBS = "${LDFLAGS}"
35 35
@@ -185,9 +185,9 @@ do_install_append_class-native() {
185 ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq 185 ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq
186} 186}
187 187
188ALTERNATIVE_${PN} = "sendmail mailq newaliases" 188ALTERNATIVE_${PN}-bin = "sendmail mailq newaliases"
189# /usr/lib/sendmial is required by LSB core test 189# /usr/lib/sendmial is required by LSB core test
190ALTERNATIVE_${PN}_linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail" 190ALTERNATIVE_${PN}-bin_linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail"
191ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq" 191ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq"
192ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases" 192ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases"
193ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix" 193ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix"
@@ -212,9 +212,11 @@ pkg_postinst_ontarget_${PN}-cfg () {
212} 212}
213 213
214PACKAGES =+ "${PN}-cfg" 214PACKAGES =+ "${PN}-cfg"
215RDEPENDS_${PN}-cfg_class-target += "${PN}-bin"
215RDEPENDS_${PN}_class-target += "${PN}-cfg" 216RDEPENDS_${PN}_class-target += "${PN}-cfg"
216# Exclude .debug directories from the main package 217# Exclude .debug directories from the main package
217FILES_${PN} = "${localstatedir} ${bindir}/* ${sbindir}/* \ 218FILES_${PN}-bin += "${localstatedir} ${bindir}/* ${sbindir}/* \
218 ${libexecdir}/* ${systemd_unitdir}/*" 219 ${libexecdir}/* ${systemd_unitdir}/*"
219FILES_${PN}-cfg = "${sysconfdir}" 220FILES_${PN}-cfg = "${sysconfdir}"
220FILES_${PN}-dbg += "${libexecdir}/postfix/.debug" 221FILES_${PN}-dbg += "${libexecdir}/postfix/.debug"
222ALLOW_EMPTY_${PN} = "1"