summaryrefslogtreecommitdiffstats
path: root/meta-networking
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2017-08-26 18:28:28 -0700
committerJoe MacDonald <joe_macdonald@mentor.com>2017-09-12 10:55:06 -0400
commit407b28f8f287d56ee60d3697dc1cbd7b43a997ea (patch)
tree34b7263fb553688fe2fe2871e666764d44ad4aea /meta-networking
parent7da4103d4a6ac2af8285e2c9d66ac138bfb071f9 (diff)
downloadmeta-openembedded-407b28f8f287d56ee60d3697dc1cbd7b43a997ea.tar.gz
postfix: Fix build with security flags and clang
Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Martin Jansa <Martin.Jansa@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/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch64
-rw-r--r--meta-networking/recipes-daemons/postfix/files/icu-config.patch21
-rw-r--r--meta-networking/recipes-daemons/postfix/files/postfix-install.patch26
-rw-r--r--meta-networking/recipes-daemons/postfix/postfix.inc2
-rw-r--r--meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb3
5 files changed, 115 insertions, 1 deletions
diff --git a/meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch b/meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch
new file mode 100644
index 000000000..763a4a9b9
--- /dev/null
+++ b/meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch
@@ -0,0 +1,64 @@
1From a0d0de10e4c5ab55bc2fa48798079e2876b1211d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 26 Aug 2017 10:29:37 -0700
4Subject: [PATCH] makedefs: Use native compiler to build makedefs.test
5
6Its a binary used during build
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9---
10 makedefs | 10 +++++-----
11 1 file changed, 5 insertions(+), 5 deletions(-)
12
13diff --git a/makedefs b/makedefs
14index 9fd4bc2..5ee7747 100644
15--- a/makedefs
16+++ b/makedefs
17@@ -526,7 +526,7 @@ int main(int argc, char **argv)
18 exit(0);
19 }
20 EOF
21- ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1
22+ ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c || exit 1
23 rm -f makedefs.test makedefs.test.[co]
24 fi;;
25 esac
26@@ -762,7 +762,7 @@ int main(int argc, char **argv)
27 exit(0);
28 }
29 EOF
30- ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1
31+ ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c || exit 1
32 ./makedefs.test 2>/dev/null ||
33 CCARGS="$CCARGS -DNO_SIGSETJMP"
34 rm -f makedefs.test makedefs.test.[co]
35@@ -796,7 +796,7 @@ int main(int argc, char **argv)
36 &error) != 14);
37 }
38 EOF
39- ${CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \
40+ ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \
41 $icu_ldflags >/dev/null 2>&1
42 if ./makedefs.test 2>/dev/null ; then
43 CCARGS="$CCARGS $icu_cppflags"
44@@ -911,7 +911,7 @@ int main(void)
45 exit(ferror(stdout) ? 1 : 0);
46 }
47 EOF
48- eval ${CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
49+ eval ${BUILD_CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
50 ./makedefs.test || exit 1
51 rm -f makedefs.test makedefs.test.[co]
52 }
53@@ -1067,7 +1067,7 @@ int main(void)
54 exit(ferror(stdout) ? 1 : 0);
55 }
56 EOF
57- eval ${CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
58+ eval ${BUILD_CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1
59 parm_val=`./makedefs.test` || exit 1
60 rm -f makedefs.test makedefs.test.[co]
61 eval ${parm_name}=\""\$parm_val"\"
62--
632.14.1
64
diff --git a/meta-networking/recipes-daemons/postfix/files/icu-config.patch b/meta-networking/recipes-daemons/postfix/files/icu-config.patch
new file mode 100644
index 000000000..9bd9c2f03
--- /dev/null
+++ b/meta-networking/recipes-daemons/postfix/files/icu-config.patch
@@ -0,0 +1,21 @@
1do not entertain cppflags from icu, this is because
2icu-config feeds the -I path without sysroot which
3caused native headers to be included and build is
4corrupted in any case its just adding -I/usr/include
5to the CCARGS which we loose nothing if its not
6entertained.
7
8Signed-off-by: Khem Raj <raj.khem@gmail.com>
9
10Index: postfix-3.2.2/makedefs
11===================================================================
12--- postfix-3.2.2.orig/makedefs
13+++ postfix-3.2.2/makedefs
14@@ -799,7 +799,6 @@ EOF
15 ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \
16 $icu_ldflags >/dev/null 2>&1
17 if ./makedefs.test 2>/dev/null ; then
18- CCARGS="$CCARGS $icu_cppflags"
19 SYSLIBS="$SYSLIBS $icu_ldflags"
20 else
21 CCARGS="$CCARGS -DNO_EAI"
diff --git a/meta-networking/recipes-daemons/postfix/files/postfix-install.patch b/meta-networking/recipes-daemons/postfix/files/postfix-install.patch
new file mode 100644
index 000000000..45479bd52
--- /dev/null
+++ b/meta-networking/recipes-daemons/postfix/files/postfix-install.patch
@@ -0,0 +1,26 @@
1Index: postfix-3.2.2/postfix-install
2===================================================================
3--- postfix-3.2.2.orig/postfix-install
4+++ postfix-3.2.2/postfix-install
5@@ -843,7 +843,7 @@ IFS="$BACKUP_IFS"
6 # the wrong place when Postfix is being upgraded.
7
8 case "$mail_version" in
9-"") mail_version="`$POSTCONF -dhx mail_version`" || exit 1
10+"") mail_version="`$POSTCONF -c $CONFIG_DIRECTORY -dhx mail_version`" || exit 1
11 esac
12
13 # Undo MAIL_VERSION expansion at the end of a parameter value. If
14Index: postfix-3.2.2/Makefile.in
15===================================================================
16--- postfix-3.2.2.orig/Makefile.in
17+++ postfix-3.2.2/Makefile.in
18@@ -20,7 +20,7 @@ META = meta/main.cf.proto meta/master.cf
19 EXPAND = sed -e "s;\$${LIB_PREFIX};$(LIB_PREFIX);" \
20 -e "s;\$${LIB_SUFFIX};$(LIB_SUFFIX);"
21 SHLIB_DIR_OVERRIDE = \
22- $${shlib_directory:-`$(SHLIB_ENV) bin/postconf -dhx shlib_directory`}
23+ $${shlib_directory:-`$(SHLIB_ENV) $(POSTCONF) -dhx shlib_directory`}
24
25 default: update
26
diff --git a/meta-networking/recipes-daemons/postfix/postfix.inc b/meta-networking/recipes-daemons/postfix/postfix.inc
index cb9d59f93..a588bd347 100644
--- a/meta-networking/recipes-daemons/postfix/postfix.inc
+++ b/meta-networking/recipes-daemons/postfix/postfix.inc
@@ -73,7 +73,7 @@ export CCARGS-sasl_class-native = ""
73export AUXLIBS-sasl_class-native = "" 73export AUXLIBS-sasl_class-native = ""
74 74
75# PCRE, TLS support default 75# PCRE, TLS support default
76export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS ${CCARGS-ldap} ${CCARGS-sasl} ${CCARGS-nonis}" 76export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS -I${STAGING_INCDIR}/openssl ${CCARGS-ldap} ${CCARGS-sasl} ${CCARGS-nonis}"
77export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}" 77export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}"
78export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf" 78export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf"
79 79
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 1118b2ed4..439ede9b6 100644
--- a/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb
+++ b/meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb
@@ -10,6 +10,9 @@ SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV
10 file://aliasesdb \ 10 file://aliasesdb \
11 file://check_hostname.sh \ 11 file://check_hostname.sh \
12 file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \ 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 \
13 " 16 "
14SRC_URI[md5sum] = "aea073a9b0bea5bdb590460a270a4aa0" 17SRC_URI[md5sum] = "aea073a9b0bea5bdb590460a270a4aa0"
15SRC_URI[sha256sum] = "d06849418d119d09366997b2b481bb23f737629769b4e4a52da42fb3ad8b0576" 18SRC_URI[sha256sum] = "d06849418d119d09366997b2b481bb23f737629769b4e4a52da42fb3ad8b0576"