postfix: Fix build with security flags and clang
PATCH 1/3 postfix: Fix build with security flags and clang
Signed-off-by Khem Raj <[email protected]>
--- ...se-native-compiler-to-build-makedefs.test.patch | 64 ++++++++++++++++++++++ .../recipes-daemons/postfix/files/icu-config.patch | 21 +++++++ .../postfix/files/postfix-install.patch | 26 +++++++++ .../recipes-daemons/postfix/postfix.inc | 2 +- .../recipes-daemons/postfix/postfix_3.2.2.bb | 3 + 5 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch create mode 100644 meta-networking/recipes-daemons/postfix/files/icu-config.patch create mode 100644 meta-networking/recipes-daemons/postfix/files/postfix-install.patch
meta-networking/recipes-daemons/postfix/files/0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch new file +64 -0
@@ -0,0 +1,64 @@ +From a0d0de10e4c5ab55bc2fa48798079e2876b1211d Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Sat, 26 Aug 2017 10:29:37 -0700 +Subject: [PATCH] makedefs: Use native compiler to build makedefs.test + +Its a binary used during build + +Signed-off-by: Khem Raj <[email protected]> +--- + makedefs | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/makedefs b/makedefs +index 9fd4bc2..5ee7747 100644 +--- a/makedefs ++++ b/makedefs +@@ -526,7 +526,7 @@ int main(int argc, char **argv) + exit(0); + } + EOF +- ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1 ++ ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c || exit 1 + rm -f makedefs.test makedefs.test.[co] + fi;; + esac +@@ -762,7 +762,7 @@ int main(int argc, char **argv) + exit(0); + } + EOF +- ${CC-gcc} -o makedefs.test makedefs.test.c || exit 1 ++ ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c || exit 1 + ./makedefs.test 2>/dev/null || + CCARGS="$CCARGS -DNO_SIGSETJMP" + rm -f makedefs.test makedefs.test.[co] +@@ -796,7 +796,7 @@ int main(int argc, char **argv) + &error) != 14); + } + EOF +- ${CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \ ++ ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \ + $icu_ldflags >/dev/null 2>&1 + if ./makedefs.test 2>/dev/null ; then + CCARGS="$CCARGS $icu_cppflags" +@@ -911,7 +911,7 @@ int main(void) + exit(ferror(stdout) ? 1 : 0); + } + EOF +- eval ${CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1 ++ eval ${BUILD_CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1 + ./makedefs.test || exit 1 + rm -f makedefs.test makedefs.test.[co] + } +@@ -1067,7 +1067,7 @@ int main(void) + exit(ferror(stdout) ? 1 : 0); + } + EOF +- eval ${CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1 ++ eval ${BUILD_CC-gcc} ${CCARGS} -o makedefs.test makedefs.test.c || exit 1 + parm_val=`./makedefs.test` || exit 1 + rm -f makedefs.test makedefs.test.[co] + eval ${parm_name}=\""\$parm_val"\" +-- +2.14.1 +
meta-networking/recipes-daemons/postfix/files/icu-config.patch new file +21 -0
@@ -0,0 +1,21 @@ +do not entertain cppflags from icu, this is because +icu-config feeds the -I path without sysroot which +caused native headers to be included and build is +corrupted in any case its just adding -I/usr/include +to the CCARGS which we loose nothing if its not +entertained. + +Signed-off-by: Khem Raj <[email protected]> + +Index: postfix-3.2.2/makedefs +=================================================================== +--- postfix-3.2.2.orig/makedefs ++++ postfix-3.2.2/makedefs +@@ -799,7 +799,6 @@ EOF + ${BUILD_CC-gcc} -o makedefs.test makedefs.test.c $icu_cppflags \ + $icu_ldflags >/dev/null 2>&1 + if ./makedefs.test 2>/dev/null ; then +- CCARGS="$CCARGS $icu_cppflags" + SYSLIBS="$SYSLIBS $icu_ldflags" + else + CCARGS="$CCARGS -DNO_EAI"
meta-networking/recipes-daemons/postfix/files/postfix-install.patch new file +26 -0
@@ -0,0 +1,26 @@ +Index: postfix-3.2.2/postfix-install +=================================================================== +--- postfix-3.2.2.orig/postfix-install ++++ postfix-3.2.2/postfix-install +@@ -843,7 +843,7 @@ IFS="$BACKUP_IFS" + # the wrong place when Postfix is being upgraded. + + case "$mail_version" in +-"") mail_version="`$POSTCONF -dhx mail_version`" || exit 1 ++"") mail_version="`$POSTCONF -c $CONFIG_DIRECTORY -dhx mail_version`" || exit 1 + esac + + # Undo MAIL_VERSION expansion at the end of a parameter value. If +Index: postfix-3.2.2/Makefile.in +=================================================================== +--- postfix-3.2.2.orig/Makefile.in ++++ postfix-3.2.2/Makefile.in +@@ -20,7 +20,7 @@ META = meta/main.cf.proto meta/master.cf + EXPAND = sed -e "s;\$${LIB_PREFIX};$(LIB_PREFIX);" \ + -e "s;\$${LIB_SUFFIX};$(LIB_SUFFIX);" + SHLIB_DIR_OVERRIDE = \ +- $${shlib_directory:-`$(SHLIB_ENV) bin/postconf -dhx shlib_directory`} ++ $${shlib_directory:-`$(SHLIB_ENV) $(POSTCONF) -dhx shlib_directory`} + + default: update +
meta-networking/recipes-daemons/postfix/postfix.inc +1 -1
@@ -73,7 +73,7 @@ export CCARGS-sasl_class-native = "" export AUXLIBS-sasl_class-native = "" # PCRE, TLS support default -export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS ${CCARGS-ldap} ${CCARGS-sasl} ${CCARGS-nonis}" +export CCARGS = "${CFLAGS} -DHAS_PCRE -DUSE_TLS -I${STAGING_INCDIR}/openssl ${CCARGS-ldap} ${CCARGS-sasl} ${CCARGS-nonis}" export AUXLIBS = "-lpcre -lssl -lcrypto ${AUXLIBS-sasl} ${AUXLIBS-ldap}" export POSTCONF = "${STAGING_DIR_NATIVE}${sbindir_native}/postconf"
meta-networking/recipes-daemons/postfix/postfix_3.2.2.bb +3 -0
@@ -10,6 +10,9 @@ SRC_URI = "ftp://ftp.porcupine.org/mirrors/postfix-release/official/postfix-${PV file://aliasesdb \ file://check_hostname.sh \ file://0001-Check-for-glibc-before-setting-CANT_USE_SEND_RECV_MS.patch \ + file://0001-makedefs-Use-native-compiler-to-build-makedefs.test.patch \ + file://postfix-install.patch \ + file://icu-config.patch \ " SRC_URI[md5sum] = "aea073a9b0bea5bdb590460a270a4aa0" SRC_URI[sha256sum] = "d06849418d119d09366997b2b481bb23f737629769b4e4a52da42fb3ad8b0576"
Signature · 1 line
2.14.1
PATCH 2/3 irssi: Upgrade to 1.0.4
Disable perl explicitly, it pokes into host
its better to disable it.
Signed-off-by Khem Raj <[email protected]>
---
.../irssi/{irssi_1.0.1.bb => irssi_1.0.4.bb} | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
rename meta-oe/recipes-connectivity/irssi/{irssi_1.0.1.bb => irssi_1.0.4.bb} (50%)meta-oe/recipes-connectivity/irssi/irssi_1.0.4.bb renamed from meta-oe/recipes-connectivity/irssi/irssi_1.0.1.bb +8 -2
@@ -6,7 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=55fdc1113306167d6ea2561404ce02f8" DEPENDS = "glib-2.0 ncurses openssl" SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/${PV}/${BP}.tar.xz" -SRC_URI[md5sum] = "f6bed196cef63ea089f5cce089784445" -SRC_URI[sha256sum] = "9428c51a3f3598ffaef438c351a8d609cf10db34f2435bdcb84456226c383ccf" +SRC_URI[md5sum] = "46d4ac2a7ab472e5dc800e5d7bd9a879" +SRC_URI[sha256sum] = "b85c07dbafe178213eccdc69f5f8f0ac024dea01c67244668f91ec1c06b986ca" inherit autotools pkgconfig + +EXTRA_OECONF += "--with-textui \ + --with-proxy \ + --with-bot \ + --with-perl=no \ + --enable-true-color"
Signature · 1 line
2.14.1
PATCH 3/3 nodejs: Upgrade to 8.4.0
In reply to Khem RajSigned-off-by Khem Raj <[email protected]>
---
...isable-running-gyp-files-for-bundled-deps.patch | 29 ++++++++++++++++++++++
...isable-running-gyp-files-for-bundled-deps.patch | 29 ++++++++++++++++++++++
.../nodejs/{nodejs_4.8.3.bb => nodejs_8.4.0.bb} | 13 +++++-----
3 files changed, 65 insertions(+), 6 deletions(-)
create mode 100644 meta-oe/recipes-devtools/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
create mode 100644 meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch
rename meta-oe/recipes-devtools/nodejs/{nodejs_4.8.3.bb => nodejs_8.4.0.bb} (88%)meta-oe/recipes-devtools/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch new file +29 -0
@@ -0,0 +1,29 @@ +From c2aff16cc196a61f4ab1cdae4a91c7926123c239 Mon Sep 17 00:00:00 2001 +From: Zuzana Svetlikova <[email protected]> +Date: Thu, 27 Apr 2017 14:25:42 +0200 +Subject: [PATCH] Disable running gyp on shared deps + +--- + Makefile | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 0a217bd893..e1229ad07f 100644 +--- a/Makefile ++++ b/Makefile +@@ -79,10 +79,9 @@ $(NODE_G_EXE): config.gypi out/Makefile + $(MAKE) -C out BUILDTYPE=Debug V=$(V) + if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi + +-out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \ +- deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \ +- deps/v8/gypfiles/features.gypi deps/v8/src/v8.gyp node.gyp \ +- config.gypi ++out/Makefile: common.gypi deps/http_parser/http_parser.gyp \ ++ deps/v8/gypfiles/toolchain.gypi deps/v8/gypfiles/features.gypi \ ++ deps/v8/src/v8.gyp node.gyp config.gypi + $(PYTHON) tools/gyp_node.py -f make + + config.gypi: configure +-- +2.12.2
meta-oe/recipes-devtools/nodejs/nodejs/0001-Disable-running-gyp-files-for-bundled-deps.patch new file +29 -0
@@ -0,0 +1,29 @@ +From c2aff16cc196a61f4ab1cdae4a91c7926123c239 Mon Sep 17 00:00:00 2001 +From: Zuzana Svetlikova <[email protected]> +Date: Thu, 27 Apr 2017 14:25:42 +0200 +Subject: [PATCH] Disable running gyp on shared deps + +--- + Makefile | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 0a217bd893..e1229ad07f 100644 +--- a/Makefile ++++ b/Makefile +@@ -79,10 +79,9 @@ $(NODE_G_EXE): config.gypi out/Makefile + $(MAKE) -C out BUILDTYPE=Debug V=$(V) + if [ ! -r $@ -o ! -L $@ ]; then ln -fs out/Debug/$(NODE_EXE) $@; fi + +-out/Makefile: common.gypi deps/uv/uv.gyp deps/http_parser/http_parser.gyp \ +- deps/zlib/zlib.gyp deps/v8/gypfiles/toolchain.gypi \ +- deps/v8/gypfiles/features.gypi deps/v8/src/v8.gyp node.gyp \ +- config.gypi ++out/Makefile: common.gypi deps/http_parser/http_parser.gyp \ ++ deps/v8/gypfiles/toolchain.gypi deps/v8/gypfiles/features.gypi \ ++ deps/v8/src/v8.gyp node.gyp config.gypi + $(PYTHON) tools/gyp_node.py -f make + + config.gypi: configure +-- +2.12.2
meta-oe/recipes-devtools/nodejs/nodejs_8.4.0.bb renamed from meta-oe/recipes-devtools/nodejs/nodejs_4.8.3.bb +7 -6
@@ -1,19 +1,19 @@ DESCRIPTION = "nodeJS Evented I/O for V8 JavaScript" HOMEPAGE = "http://nodejs.org" LICENSE = "MIT & BSD & Artistic-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=f45e9ffb97e64da46d14f462d34a039f" +LIC_FILES_CHKSUM = "file://LICENSE;md5=e4d35c6120f175e1fbe5ff908b1cf2d6" -DEPENDS = "openssl zlib" +DEPENDS = "openssl10 zlib" COMPATIBLE_MACHINE_armv4 = "(!.*armv4).*" COMPATIBLE_MACHINE_armv5 = "(!.*armv5).*" COMPATIBLE_MACHINE_mips64 = "(!.*mips64).*" SRC_URI = "http://nodejs.org/dist/v${PV}/node-v${PV}.tar.xz \ - file://no-registry.patch \ + file://0001-Disable-running-gyp-files-for-bundled-deps.patch \ " -SRC_URI[md5sum] = "dc40053a74100ce6df641a5b4c4d4d1e" -SRC_URI[sha256sum] = "d84e7544c2e31a2d0825b4f8b093d169bf8bdb1881ee8cf75ff937918e59e9cb" +SRC_URI[md5sum] = "e6c85c83001340b30671e9432e1bd337" +SRC_URI[sha256sum] = "5d5aa2a101dcc617231a475812eb8ed87cac21491f1dcc7997b9dd463563f361" S = "${WORKDIR}/node-v${PV}"
@@ -40,10 +40,11 @@ ARCHFLAGS ?= "" # Node is way too cool to use proper autotools, so we install two wrappers to forcefully inject proper arch cflags to workaround gypi do_configure () { + rm -rf ${S}/deps/openssl export LD="${CXX}" GYP_DEFINES="${GYP_DEFINES}" export GYP_DEFINES # $TARGET_ARCH settings don't match --dest-cpu settings - ./configure --prefix=${prefix} --without-snapshot --shared-openssl --shared-zlib \ + ./configure --prefix=${prefix} --without-intl --without-snapshot --shared-openssl --shared-zlib \ --dest-cpu="${@map_nodejs_arch(d.getVar('TARGET_ARCH'), d)}" \ --dest-os=linux \ ${ARCHFLAGS}
Signature · 1 line
2.14.1