summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2019-10-22 14:18:25 +0800
committerKhem Raj <raj.khem@gmail.com>2019-10-25 10:29:51 -0700
commit89d86b96f80d8a136d38113baf69d8ccad5a5ff6 (patch)
tree17dd689c705e529f1d6193bbf259ee09f1f6b302
parentf7ba23ac80217694c25b2de5ddd11e27146ced82 (diff)
downloadmeta-openembedded-89d86b96f80d8a136d38113baf69d8ccad5a5ff6.tar.gz
postfix: split /etc from ${PN} to ${PN}-cfg for ostree
In postinst of ${PN}, call newaliases on etc may fail at do_rootfs due to host setup. If fail, the postinst will rerun at target first boot which cause update-alternatives in postinst rerun. For ostree system, /usr is readonly, /etc is writable, the update-alternatives will be failed when run on target since it needs write files in /usr. Split the postinst into two packages can fix the problem: * update-alternatives runs at do_rootfs * newaliases runs at do_rootfs or first boot, it needs write files in /etc when run at first boot, while /etc is writable for ostree. For non-ostree, everything will be OK as normal Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-networking/recipes-daemons/postfix/postfix.inc7
1 files changed, 5 insertions, 2 deletions
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index 778100533..de45e080d 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -203,7 +203,7 @@ ALTERNATIVE_LINK_NAME[newaliases.1] = "${mandir}/man1/newaliases.1"
203ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1" 203ALTERNATIVE_LINK_NAME[sendmail.1] = "${mandir}/man1/sendmail.1"
204 204
205PACKAGE_WRITE_DEPS += "postfix-native" 205PACKAGE_WRITE_DEPS += "postfix-native"
206pkg_postinst_${PN} () { 206pkg_postinst_${PN}-cfg () {
207 if [ "x$D" = "x" ]; then 207 if [ "x$D" = "x" ]; then
208 touch /etc/aliases 208 touch /etc/aliases
209 newaliases 209 newaliases
@@ -224,7 +224,10 @@ pkg_postinst_${PN} () {
224 fi 224 fi
225} 225}
226 226
227PACKAGES =+ "${PN}-cfg"
228RDEPENDS_${PN}_class-target += "${PN}-cfg"
227# Exclude .debug directories from the main package 229# Exclude .debug directories from the main package
228FILES_${PN} = "${sysconfdir} ${localstatedir} ${bindir}/* ${sbindir}/* \ 230FILES_${PN} = "${localstatedir} ${bindir}/* ${sbindir}/* \
229 ${libexecdir}/* ${systemd_unitdir}/*" 231 ${libexecdir}/* ${systemd_unitdir}/*"
232FILES_${PN}-cfg = "${sysconfdir}"
230FILES_${PN}-dbg += "${libexecdir}/postfix/.debug" 233FILES_${PN}-dbg += "${libexecdir}/postfix/.debug"