From 5753913436b72fb3f1844c25ea559d4bc02cff30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stig=20Rohde=20D=C3=B8ssing?= Date: Wed, 13 Dec 2017 16:47:31 +0100 Subject: [PATCH] STORM-2858: Fix worker-launcher build by erroring out if asprintf fails to allocate memory. Replace make-maven-plugin with a build shell script. --- storm-core/pom.xml | 79 +++++++++++-------- .../src/resources/compile-worker-launcher.sh | 21 +++++ 2 files changed, 66 insertions(+), 34 deletions(-) create mode 100644 storm-core/src/resources/compile-worker-launcher.sh diff --git a/storm-core/pom.xml b/storm-core/pom.xml index 7c6f310fa4b..02d60c96fe5 100644 --- a/storm-core/pom.xml +++ b/storm-core/pom.xml @@ -31,6 +31,7 @@ /etc/storm + ${project.build.directory}/native/worker-launcher @@ -144,7 +145,7 @@ java.jmx ${java_jmx.version} - + commons-io @@ -343,7 +344,7 @@ src/jvm - test/jvm + test/jvm ../conf @@ -1028,13 +1029,11 @@ org.codehaus.mojo exec-maven-plugin - 1.2.1 + 1.6.0 generate-sources exec - - sh @@ -1042,50 +1041,62 @@ mkdir -p ${project.build.directory}/; cp -rufv ${basedir}/src/native/ ${project.build.directory}/ - - - org.codehaus.mojo - make-maven-plugin - 1.0-beta-1 - + compile compile - autoreconf - configure - make-install + exec + + sh + + compile-worker-launcher.sh + + ${worker-launcher.build.dir} + test test - test + exec - - - - ${project.build.directory}/native/worker-launcher + make - -i + check - - - - - CFLAGS - -DEXEC_CONF_DIR=${worker-launcher.conf.dir} ${worker-launcher.additional_cflags} - - - ${project.build.directory}/native/worker-launcher - /usr/local - - - ${project.build.directory}/native/target - + ${worker-launcher.build.dir} + + + + + org.apache.maven.plugins + maven-resources-plugin + 3.0.2 + + + copy-build-scripts + process-resources + + copy-resources + + + + + src/resources + + compile-worker-launcher.sh + + true + + + ${worker-launcher.build.dir} + + + diff --git a/storm-core/src/resources/compile-worker-launcher.sh b/storm-core/src/resources/compile-worker-launcher.sh new file mode 100644 index 00000000000..dffe2854a8f --- /dev/null +++ b/storm-core/src/resources/compile-worker-launcher.sh @@ -0,0 +1,21 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +autoreconf -i +export CFLAGS=-DEXEC_CONF_DIR=${worker-launcher.conf.dir} ${worker-launcher.additional_cflags} +./configure --prefix=/usr/local +export DESTDIR=${project.build.directory}/native/target +make install \ No newline at end of file