diff options
| author | Li xin <lixin.fnst@cn.fujitsu.com> | 2015-06-19 16:58:03 +0800 |
|---|---|---|
| committer | Joe MacDonald <joe_macdonald@mentor.com> | 2015-07-16 11:14:40 -0400 |
| commit | 13335849c35fb61660248d6b4c0d8da4031f3635 (patch) | |
| tree | 64f1b20cb99d5c6b75133bc93a741728961103e8 /meta-networking/recipes-daemons/postfix | |
| parent | 8e642c32bb59e4b93f514174bb8203d9aee93d2e (diff) | |
| download | meta-openembedded-13335849c35fb61660248d6b4c0d8da4031f3635.tar.gz | |
postfix: upgrade from 2.11.1 to 3.0.1
1.Remove postfix-add-db6-support.patch which is not needed,
since it is backported from upstream.
2.update install.patch and makedefs.patch that context changes.
3.Install smtp-sink which listens on the named host (or address) and port.
It takes SMTP messages from the network and throws them away.
Ref: http://www.postfix.org/smtp-sink.1.html
Signed-off-by: Li Xin <lixin.fnst@cn.fujitsu.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-daemons/postfix')
6 files changed, 73 insertions, 68 deletions
diff --git a/meta-networking/recipes-daemons/postfix/files/install.patch b/meta-networking/recipes-daemons/postfix/files/install.patch index a3fe089c22..d023680f3b 100644 --- a/meta-networking/recipes-daemons/postfix/files/install.patch +++ b/meta-networking/recipes-daemons/postfix/files/install.patch | |||
| @@ -1,14 +1,20 @@ | |||
| 1 | Change fixed postconf to a variable for cross-compiling | 1 | From 190650e1cd5700cd6950ead3fcb17ebcec192a2e Mon Sep 17 00:00:00 2001 |
| 2 | From: Li xin <lixin.fnst@cn.fujitsu.com> | ||
| 3 | Date: Fri, 19 Jun 2015 17:14:58 +0900 | ||
| 4 | Subject: [PATCH] Change fixed postconf to a variable for cross-compiling | ||
| 2 | 5 | ||
| 3 | Upstreamstatus: Inappropriate [embedded specific] | 6 | Upstreamstatus: Inappropriate [embedded specific] |
| 4 | 7 | ||
| 5 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | 8 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> |
| 6 | --- | 9 | --- |
| 10 | postfix-install | 18 ++++++++++-------- | ||
| 11 | 1 file changed, 10 insertions(+), 8 deletions(-) | ||
| 12 | |||
| 7 | diff --git a/postfix-install b/postfix-install | 13 | diff --git a/postfix-install b/postfix-install |
| 8 | index 49225ac..2e4c292 100644 | 14 | index 1662c3d..d11fa12 100644 |
| 9 | --- a/postfix-install | 15 | --- a/postfix-install |
| 10 | +++ b/postfix-install | 16 | +++ b/postfix-install |
| 11 | @@ -201,8 +201,8 @@ test -z "$non_interactive" -a ! -t 0 && { | 17 | @@ -226,8 +226,8 @@ test -z "$non_interactive" -a ! -t 0 && { |
| 12 | exit 1 | 18 | exit 1 |
| 13 | } | 19 | } |
| 14 | 20 | ||
| @@ -19,7 +25,16 @@ index 49225ac..2e4c292 100644 | |||
| 19 | exit 1 | 25 | exit 1 |
| 20 | } | 26 | } |
| 21 | 27 | ||
| 22 | @@ -363,7 +363,7 @@ HTML files. Specify \"no\" if you do not want to install these files." | 28 | @@ -248,7 +248,7 @@ do |
| 29 | case "$junk" in | ||
| 30 | *MAIL_VERSION*) | ||
| 31 | case "$mail_version" in | ||
| 32 | - "") mail_version="`bin/postconf -dhx mail_version`" || exit 1 | ||
| 33 | + "") mail_version="`$POSTCONF -dhx mail_version`" || exit 1 | ||
| 34 | esac | ||
| 35 | val=`echo "$junk" | sed 's/MAIL_VERSION$/'"$mail_version/g"` || exit 1 | ||
| 36 | case "$val" in | ||
| 37 | @@ -434,7 +434,7 @@ template files main.cf.proto and master.cf.proto." | ||
| 23 | 38 | ||
| 24 | : ${install_root=/} | 39 | : ${install_root=/} |
| 25 | : ${tempdir=`pwd`} | 40 | : ${tempdir=`pwd`} |
| @@ -28,39 +43,51 @@ index 49225ac..2e4c292 100644 | |||
| 28 | 43 | ||
| 29 | # Find out the location of installed configuration files. | 44 | # Find out the location of installed configuration files. |
| 30 | 45 | ||
| 31 | @@ -433,7 +433,7 @@ test -f $CONFIG_DIRECTORY/main.cf && { | 46 | @@ -500,7 +500,7 @@ test -f $CONFIG_DIRECTORY/main.cf && { |
| 32 | case "$junk" in | 47 | case "$junk" in |
| 33 | "") eval unset $name;; | 48 | "") eval unset $name;; |
| 34 | esac | 49 | esac |
| 35 | - eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -h $name\`} || | 50 | - eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -hx $name\`} || |
| 36 | + eval : \${$name=\`$POSTCONF -c $CONFIG_DIRECTORY -h $name\`} || | 51 | + eval : \${$name=\`$POSTCONF -c $CONFIG_DIRECTORY -hx $name\`} || |
| 37 | exit 1 | 52 | exit 1 |
| 38 | done | 53 | done |
| 39 | } | 54 | } |
| 40 | @@ -446,7 +446,7 @@ do | 55 | @@ -513,7 +513,7 @@ do |
| 41 | case "$junk" in | 56 | case "$junk" in |
| 42 | "") eval unset $name;; | 57 | "") eval unset $name;; |
| 43 | esac | 58 | esac |
| 44 | - eval : \${$name=\`bin/postconf -c conf -d -h $name\`} || exit 1 | 59 | - eval : \${$name=\`bin/postconf -c conf -d -hx $name\`} || exit 1 |
| 45 | + eval : \${$name=\`$POSTCONF -c conf -d -h $name\`} || exit 1 | 60 | + eval : \${$name=\`$POSTCONF -c conf -d -hx $name\`} || exit 1 |
| 46 | done | 61 | done |
| 47 | 62 | ||
| 48 | # Override settings manually. | 63 | # Override settings manually. |
| 49 | @@ -565,6 +565,8 @@ HTML_DIRECTORY=$install_root$html_directory | 64 | @@ -639,6 +639,8 @@ README_DIRECTORY=$install_root$readme_directory |
| 50 | MANPAGE_DIRECTORY=$install_root$manpage_directory | 65 | SHLIB_DIRECTORY=$install_root$shlib_directory |
| 51 | README_DIRECTORY=$install_root$readme_directory | 66 | META_DIRECTORY=$install_root$meta_directory |
| 52 | 67 | ||
| 53 | +test "x$POSTCONF" != "x" || POSTCONF="bin/postconf" | 68 | +test "x$POSTCONF" != "x" || POSTCONF="bin/postconf" |
| 54 | + | 69 | + |
| 55 | # Avoid repeated tests for existence of these; default permissions suffice. | 70 | # Avoid repeated tests for existence of these; default permissions suffice. |
| 56 | 71 | ||
| 57 | test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1 | 72 | test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1 |
| 58 | @@ -724,7 +726,7 @@ do | 73 | @@ -810,7 +812,7 @@ IFS="$BACKUP_IFS" |
| 59 | # Postfix releases, and software should not suddenly be installed in | ||
| 60 | # the wrong place when Postfix is being upgraded. | 74 | # the wrong place when Postfix is being upgraded. |
| 61 | 75 | ||
| 76 | case "$mail_version" in | ||
| 77 | -"") mail_version="`bin/postconf -dhx mail_version`" || exit 1 | ||
| 78 | +"") mail_version="`$POSTCONF -dhx mail_version`" || exit 1 | ||
| 79 | esac | ||
| 80 | |||
| 81 | # Undo MAIL_VERSION expansion at the end of a parameter value. If | ||
| 82 | @@ -830,7 +832,7 @@ do | ||
| 83 | esac | ||
| 84 | done | ||
| 85 | |||
| 62 | -bin/postconf -c $CONFIG_DIRECTORY -e \ | 86 | -bin/postconf -c $CONFIG_DIRECTORY -e \ |
| 63 | +"$POSTCONF" -c $CONFIG_DIRECTORY -e \ | 87 | +"$POSTCONF" -c $CONFIG_DIRECTORY -e \ |
| 64 | "daemon_directory = $daemon_directory" \ | 88 | "daemon_directory = $daemon_directory" \ |
| 65 | "data_directory = $data_directory" \ | 89 | "data_directory = $data_directory" \ |
| 66 | "command_directory = $command_directory" \ | 90 | "command_directory = $command_directory" \ |
| 91 | -- | ||
| 92 | 1.8.4.2 | ||
| 93 | |||
diff --git a/meta-networking/recipes-daemons/postfix/files/makedefs.patch b/meta-networking/recipes-daemons/postfix/files/makedefs.patch index ea1e994b03..98d5f7ed60 100644 --- a/meta-networking/recipes-daemons/postfix/files/makedefs.patch +++ b/meta-networking/recipes-daemons/postfix/files/makedefs.patch | |||
| @@ -1,4 +1,7 @@ | |||
| 1 | 1)remove RANLIB, SYSLIBS, AR and get them from env. | 1 | From 4f49e2ce420fb3c17415937530493158ef312733 Mon Sep 17 00:00:00 2001 |
| 2 | From: Li xin <lixin.fnst@cn.fujitsu.com> | ||
| 3 | Date: Fri, 19 Jun 2015 16:45:54 +0900 | ||
| 4 | Subject: [PATCH] 1)remove RANLIB, SYSLIBS, AR and get them from env. | ||
| 2 | 5 | ||
| 3 | 2)reference sysroot when searching header files | 6 | 2)reference sysroot when searching header files |
| 4 | 3)include sysroot path instead of absolute include path | 7 | 3)include sysroot path instead of absolute include path |
| @@ -10,22 +13,25 @@ for Linux2 and Linux3 systems. | |||
| 10 | Upstreamstatus: Inappropriate [embedded specific] | 13 | Upstreamstatus: Inappropriate [embedded specific] |
| 11 | 14 | ||
| 12 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | 15 | Signed-off-by: Yao Zhao <yao.zhao@windriver.com> |
| 16 | --- | ||
| 17 | makedefs | 27 +++++++++++---------------- | ||
| 18 | 1 file changed, 11 insertions(+), 16 deletions(-) | ||
| 13 | 19 | ||
| 14 | 5)add Linux 4.0 support | 20 | diff --git a/makedefs b/makedefs |
| 15 | 21 | index 8b84e47..893fb0d 100644 | |
| 16 | --- a/makedefs 2015-05-30 13:38:50.346033228 +0200 | 22 | --- a/makedefs |
| 17 | +++ b/makedefs 2015-05-30 13:40:19.375364795 +0200 | 23 | +++ b/makedefs |
| 18 | @@ -87,9 +87,6 @@ | 24 | @@ -170,9 +170,6 @@ echo "# pie=$pie" |
| 19 | 25 | ||
| 20 | # Defaults for most sane systems | 26 | # Defaults for most sane systems |
| 21 | 27 | ||
| 22 | -RANLIB=ranlib | 28 | -RANLIB=ranlib |
| 23 | -SYSLIBS= | 29 | -SYSLIBS= |
| 24 | -AR=ar | 30 | -AR=ar |
| 25 | ARFL=rv | 31 | ARFL=rv |
| 26 | 32 | ||
| 27 | # Ugly function to make our error message more visible among the | 33 | # Ugly function to make our error message more visible among the |
| 28 | @@ -293,12 +290,12 @@ case "$SYSTEM.$RELEASE" in | 34 | @@ -424,12 +421,12 @@ case "$SYSTEM.$RELEASE" in |
| 29 | case "$CCARGS" in | 35 | case "$CCARGS" in |
| 30 | *-DNO_DB*) ;; | 36 | *-DNO_DB*) ;; |
| 31 | *-DHAS_DB*) ;; | 37 | *-DHAS_DB*) ;; |
| @@ -41,7 +47,7 @@ Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | |||
| 41 | else | 47 | else |
| 42 | # No, we're not going to try db1 db2 db3 etc. | 48 | # No, we're not going to try db1 db2 db3 etc. |
| 43 | # On a properly installed system, Postfix builds | 49 | # On a properly installed system, Postfix builds |
| 44 | @@ -307,12 +304,12 @@ case "$SYSTEM.$RELEASE" in | 50 | @@ -438,12 +435,12 @@ case "$SYSTEM.$RELEASE" in |
| 45 | echo "Install the appropriate db*-devel package first." 1>&2 | 51 | echo "Install the appropriate db*-devel package first." 1>&2 |
| 46 | exit 1 | 52 | exit 1 |
| 47 | fi | 53 | fi |
| @@ -56,7 +62,7 @@ Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | |||
| 56 | do | 62 | do |
| 57 | test -e $lib/lib$name.a -o -e $lib/lib$name.so && { | 63 | test -e $lib/lib$name.a -o -e $lib/lib$name.so && { |
| 58 | SYSLIBS="$SYSLIBS -l$name" | 64 | SYSLIBS="$SYSLIBS -l$name" |
| 59 | @@ -332,7 +329,7 @@ case "$SYSTEM.$RELEASE" in | 65 | @@ -463,7 +460,7 @@ case "$SYSTEM.$RELEASE" in |
| 60 | if [ `expr "X$CCARGS" : "X.*-DNO_EPOLL"` -gt 0 ] | 66 | if [ `expr "X$CCARGS" : "X.*-DNO_EPOLL"` -gt 0 ] |
| 61 | then | 67 | then |
| 62 | : | 68 | : |
| @@ -65,7 +71,7 @@ Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | |||
| 65 | then | 71 | then |
| 66 | echo CCARGS="$CCARGS -DNO_EPOLL" | 72 | echo CCARGS="$CCARGS -DNO_EPOLL" |
| 67 | else | 73 | else |
| 68 | @@ -356,22 +353,20 @@ | 74 | @@ -487,8 +484,6 @@ int main(int argc, char **argv) |
| 69 | } | 75 | } |
| 70 | EOF | 76 | EOF |
| 71 | ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1 | 77 | ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1 |
| @@ -74,9 +80,7 @@ Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | |||
| 74 | rm -f makedefs.test makedefs.test.[co] | 80 | rm -f makedefs.test makedefs.test.[co] |
| 75 | fi;; | 81 | fi;; |
| 76 | esac | 82 | esac |
| 77 | ;; | 83 | @@ -504,12 +499,12 @@ EOF |
| 78 | - Linux.3*) SYSTYPE=LINUX3 | ||
| 79 | + Linux.3*|Linux.4*) SYSTYPE=LINUX3 | ||
| 80 | case "$CCARGS" in | 84 | case "$CCARGS" in |
| 81 | *-DNO_DB*) ;; | 85 | *-DNO_DB*) ;; |
| 82 | *-DHAS_DB*) ;; | 86 | *-DHAS_DB*) ;; |
| @@ -92,7 +96,7 @@ Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | |||
| 92 | else | 96 | else |
| 93 | # On a properly installed system, Postfix builds | 97 | # On a properly installed system, Postfix builds |
| 94 | # by including <db.h> and by linking with -ldb | 98 | # by including <db.h> and by linking with -ldb |
| 95 | @@ -379,7 +374,7 @@ EOF | 99 | @@ -517,12 +512,12 @@ EOF |
| 96 | echo "Install the appropriate db*-devel package first." 1>&2 | 100 | echo "Install the appropriate db*-devel package first." 1>&2 |
| 97 | exit 1 | 101 | exit 1 |
| 98 | fi | 102 | fi |
| @@ -101,12 +105,12 @@ Signed-off-by: Yao Zhao <yao.zhao@windriver.com> | |||
| 101 | ;; | 105 | ;; |
| 102 | esac | 106 | esac |
| 103 | for name in nsl resolv | 107 | for name in nsl resolv |
| 104 | @@ -415,7 +410,7 @@ EOF | ||
| 105 | esac | ||
| 106 | for name in nsl resolv | ||
| 107 | do | 108 | do |
| 108 | - for lib in /usr/lib64 /lib64 /usr/lib /lib | 109 | - for lib in /usr/lib64 /lib64 /usr/lib /usr/lib/* /lib /lib/* |
| 109 | + for lib in $BUILD_SYSROOT_NSL_PATH | 110 | + for lib in $BUILD_SYSROOT_NSL_PATH |
| 110 | do | 111 | do |
| 111 | test -e $lib/lib$name.a -o -e $lib/lib$name.so && { | 112 | test -e $lib/lib$name.a -o -e $lib/lib$name.so && { |
| 112 | SYSLIBS="$SYSLIBS -l$name" | 113 | SYSLIBS="$SYSLIBS -l$name" |
| 114 | -- | ||
| 115 | 1.8.4.2 | ||
| 116 | |||
diff --git a/meta-networking/recipes-daemons/postfix/files/postfix-add-db6-support.patch b/meta-networking/recipes-daemons/postfix/files/postfix-add-db6-support.patch deleted file mode 100644 index e3e28c8430..0000000000 --- a/meta-networking/recipes-daemons/postfix/files/postfix-add-db6-support.patch +++ /dev/null | |||
| @@ -1,26 +0,0 @@ | |||
| 1 | Subject: [PATCH] add db6 support db6 | ||
| 2 | |||
| 3 | Upstream-Status: Backport | ||
| 4 | |||
| 5 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
| 6 | --- | ||
| 7 | src/util/dict_db.c | 3 ++- | ||
| 8 | 1 files changed, 2 insertions(+), 1 deletions(-) | ||
| 9 | |||
| 10 | diff --git a/src/util/dict_db.c b/src/util/dict_db.c | ||
| 11 | index 93ee480..f1ae66b 100644 | ||
| 12 | --- a/src/util/dict_db.c | ||
| 13 | +++ b/src/util/dict_db.c | ||
| 14 | @@ -693,7 +693,8 @@ static DICT *dict_db_open(const char *class, const char *path, int open_flags, | ||
| 15 | msg_fatal("set DB cache size %d: %m", dict_db_cache_size); | ||
| 16 | if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0) | ||
| 17 | msg_fatal("set DB hash element count %d: %m", DICT_DB_NELM); | ||
| 18 | -#if DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0) | ||
| 19 | +#if DB_VERSION_MAJOR == 6 || DB_VERSION_MAJOR == 5 || \ | ||
| 20 | + (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0) | ||
| 21 | if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0) | ||
| 22 | FREE_RETURN(dict_surrogate(class, path, open_flags, dict_flags, | ||
| 23 | "open database %s: %m", db_path)); | ||
| 24 | -- | ||
| 25 | 1.7.1 | ||
| 26 | |||
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc index cd768ccb20..0740f0fa96 100644 --- a/meta-networking/recipes-daemons/postfix/postfix.inc +++ b/meta-networking/recipes-daemons/postfix/postfix.inc | |||
| @@ -140,6 +140,7 @@ do_install () { | |||
| 140 | -non-interactive | 140 | -non-interactive |
| 141 | rm -rf ${D}${localstatedir}/spool/postfix | 141 | rm -rf ${D}${localstatedir}/spool/postfix |
| 142 | mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf | 142 | mv ${D}${sysconfdir}/postfix/main.cf ${D}${sysconfdir}/postfix/sample-main.cf |
| 143 | install -m 755 ${S}/bin/smtp-sink ${D}/${sbindir}/ | ||
| 143 | install -d ${D}${sysconfdir}/init.d | 144 | install -d ${D}${sysconfdir}/init.d |
| 144 | install -m 644 ${WORKDIR}/main.cf_2.0 ${D}${sysconfdir}/postfix/main.cf | 145 | install -m 644 ${WORKDIR}/main.cf_2.0 ${D}${sysconfdir}/postfix/main.cf |
| 145 | sed -i 's#@LIBEXECDIR@#${libexecdir}#' ${D}${sysconfdir}/postfix/main.cf | 146 | sed -i 's#@LIBEXECDIR@#${libexecdir}#' ${D}${sysconfdir}/postfix/main.cf |
diff --git a/meta-networking/recipes-daemons/postfix/postfix_2.11.1.bb b/meta-networking/recipes-daemons/postfix/postfix_2.11.1.bb deleted file mode 100644 index 8f237dc2ee..0000000000 --- a/meta-networking/recipes-daemons/postfix/postfix_2.11.1.bb +++ /dev/null | |||
| @@ -1,6 +0,0 @@ | |||
| 1 | require postfix.inc | ||
| 2 | |||
| 3 | SRC_URI += "file://postfix-add-db6-support.patch" | ||
| 4 | |||
| 5 | SRC_URI[md5sum] = "56ac1f1a79737c4ac1e24535a122a4a6" | ||
| 6 | SRC_URI[sha256sum] = "487f98a73b95a5799409caf21ec065efea91c1dcdfb84c038a0e3a265d6489e2" | ||
diff --git a/meta-networking/recipes-daemons/postfix/postfix_3.0.1.bb b/meta-networking/recipes-daemons/postfix/postfix_3.0.1.bb new file mode 100644 index 0000000000..04b81c8914 --- /dev/null +++ b/meta-networking/recipes-daemons/postfix/postfix_3.0.1.bb | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | require postfix.inc | ||
| 2 | |||
| 3 | |||
| 4 | SRC_URI[md5sum] = "3ec1416e7d4fba9566297c8fcf7a348c" | ||
| 5 | SRC_URI[sha256sum] = "cd2bd6447fe3368bb1a39f482f8dd1eec87c63067a0eb75f9aec8e4eadd21328" | ||
