summaryrefslogtreecommitdiffstats
path: root/external/meta-openembedded/meta-networking/recipes-daemons/postfix
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
commit1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch)
treecd70a267a5ef105ba32f200aa088e281fbd85747 /external/meta-openembedded/meta-networking/recipes-daemons/postfix
parent4204309872da5cb401cbb2729d9e2d4869a87f42 (diff)
recipes
Diffstat (limited to 'external/meta-openembedded/meta-networking/recipes-daemons/postfix')
-rw-r--r--external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc62
-rw-r--r--external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.3.1.bb12
-rw-r--r--external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb18
3 files changed, 39 insertions, 53 deletions
diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc b/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
index 3d4f1df4..4b9940cc 100644
--- a/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -14,33 +14,22 @@ DEPENDS = "db icu libpcre libnsl2 openssl postfix-native \
LICENSE = "IPL-1.0 | EPL-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=b181651ad99a7dc4cc8c4ce2f491ed1a"
-SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV}.tar.gz \
- file://makedefs.patch \
- file://install.patch \
- file://main.cf \
- file://postfix \
- file://internal_recipient \
- file://postfix.service \
- file://aliasesdb \
- file://check_hostname.sh \
-"
-
S = "${WORKDIR}/postfix-${PV}"
CLEANBROKEN = "1"
BBCLASSEXTEND = "native"
-inherit update-rc.d useradd update-alternatives systemd
+inherit update-rc.d useradd update-alternatives systemd lib_package
INITSCRIPT_NAME = "postfix"
INITSCRIPT_PARAMS = "start 58 3 4 5 . stop 13 0 1 6 ."
-USERADD_PACKAGES = "${PN}"
-USERADD_PARAM_${PN} = \
+USERADD_PACKAGES = "${PN}-bin"
+USERADD_PARAM_${PN}-bin = \
"-d /var/spool/postfix -r -g postfix --shell /bin/false postfix; \
-d /var/spool/vmail -r -g vmail --shell /bin/false vmail \
"
-GROUPADD_PARAM_${PN} = "--system postfix;--system postdrop;--system vmail"
+GROUPADD_PARAM_${PN}-bin = "--system postfix;--system postdrop;--system vmail"
export SYSLIBS = "${LDFLAGS}"
@@ -196,11 +185,15 @@ do_install_append_class-native() {
ln -sf ../sbin/sendmail.postfix ${D}${bindir}/mailq
}
-ALTERNATIVE_${PN} += "sendmail mailq newaliases"
+ALTERNATIVE_${PN}-bin = "sendmail mailq newaliases"
+# /usr/lib/sendmial is required by LSB core test
+ALTERNATIVE_${PN}-bin_linuxstdbase = "sendmail mailq newaliases usr-lib-sendmail"
ALTERNATIVE_TARGET[mailq] = "${bindir}/mailq"
ALTERNATIVE_TARGET[newaliases] = "${bindir}/newaliases"
ALTERNATIVE_TARGET[sendmail] = "${sbindir}/sendmail.postfix"
ALTERNATIVE_LINK_NAME[sendmail] = "${sbindir}/sendmail"
+ALTERNATIVE_TARGET[usr-lib-sendmail] = "${sbindir}/sendmail.postfix"
+ALTERNATIVE_LINK_NAME[usr-lib-sendmail] = "/usr/lib/sendmail"
ALTERNATIVE_PRIORITY = "120"
@@ -209,34 +202,21 @@ 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
- newaliases
+pkg_postinst_ontarget_${PN}-cfg () {
+ touch /etc/aliases
+ newaliases
- # generate virtual_alias, default is hash
- touch /etc/postfix/virtual_alias
- postmap /etc/postfix/virtual_alias
- else
- if ${@'true' if 'linuxstdbase' in d.getVar('DISTROOVERRIDES', False) else 'false'}; then
- # /usr/lib/sendmail is required by LSB core test
- [ ! -L $D/usr/lib/sendmail ] && ln -sf ${sbindir}/sendmail $D/usr/lib/
- fi
-
- touch $D/etc/aliases
- # This can fail depending on host setup
- if ! newaliases -C $D/etc/postfix/main.cf -oA$D/etc/aliases; then
- $INTERCEPT_DIR/postinst_intercept delay_to_first_boot ${PKG} mlprefix=${MLPREFIX}
- else
- touch $D/etc/postfix/virtual_alias
- postmap -c $D/etc/postfix $D/etc/postfix/virtual_alias
- fi
-
- fi
+ # generate virtual_alias, default is hash
+ touch /etc/postfix/virtual_alias
+ postmap /etc/postfix/virtual_alias
}
+PACKAGES =+ "${PN}-cfg"
+RDEPENDS_${PN}-cfg_class-target += "${PN}-bin"
+RDEPENDS_${PN}_class-target += "${PN}-cfg"
# Exclude .debug directories from the main package
-FILES_${PN} = "${sysconfdir} ${localstatedir} ${bindir}/* ${sbindir}/* \
+FILES_${PN}-bin += "${localstatedir} ${bindir}/* ${sbindir}/* \
${libexecdir}/* ${systemd_unitdir}/*"
+FILES_${PN}-cfg = "${sysconfdir}"
FILES_${PN}-dbg += "${libexecdir}/postfix/.debug"
+ALLOW_EMPTY_${PN} = "1"
diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.3.1.bb b/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.3.1.bb
deleted file mode 100644
index 6718b7ef..00000000
--- a/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.3.1.bb
+++ /dev/null
@@ -1,12 +0,0 @@
-require postfix.inc
-
-SRC_URI += "file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \
- file://postfix-install.patch \
- file://icu-config.patch \
- file://0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \
- "
-
-SRC_URI[md5sum] = "4381c6492f415e4a69cf5099d4acea76"
-SRC_URI[sha256sum] = "54f514dae42b5275cb4bc9c69283f16c06200b71813d0bb696568c4ba7ae7e3b"
-
-UPSTREAM_CHECK_REGEX = "postfix\-(?P<pver>3\.3(\.\d+)+).tar.gz"
diff --git a/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb b/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb
new file mode 100644
index 00000000..db5b41bf
--- /dev/null
+++ b/external/meta-openembedded/meta-networking/recipes-daemons/postfix/postfix_3.4.12.bb
@@ -0,0 +1,18 @@
+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 \
+ file://postfix \
+ file://internal_recipient \
+ file://postfix.service \
+ file://aliasesdb \
+ file://check_hostname.sh \
+ file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \
+ file://postfix-install.patch \
+ file://icu-config.patch \
+ file://0001-makedefs-add-lnsl-and-lresolv-to-SYSLIBS-by-default.patch \
+ "
+SRC_URI[sha256sum] = "18555183ae8b52a9e76067799279c86f9f2770cdef3836deb8462ee0a0855dec"
+UPSTREAM_CHECK_REGEX = "postfix\-(?P<pver>3\.3(\.\d+)+).tar.gz"