diff --git a/.travis.yml b/.travis.yml index 05789c2570..8e3c53c515 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,3 +20,6 @@ install: script: - mvn test -B + +arch: + - ppc64le diff --git a/bigtop-packages/src/common/zeppelin/do-component-build b/bigtop-packages/src/common/zeppelin/do-component-build index dc170b429a..0559af5864 100644 --- a/bigtop-packages/src/common/zeppelin/do-component-build +++ b/bigtop-packages/src/common/zeppelin/do-component-build @@ -45,6 +45,16 @@ BUILD_OPTS="-Dhadoop3.2.version=${HADOOP_VERSION} \ -Phadoop3 \ -Pbuild-distr" +if [ $HOSTTYPE = "powerpc64le" ] ; then + mvn install:install-file -DgroupId=com.google.protobuf -DartifactId=protoc -Dversion=3.5.0 \ + -Dclassifier=linux-ppcle_64 -Dpackaging=exe -Dfile=/usr/local/protobuf-3.5.1.1/bin/protoc + + mvn install:install-file -DgroupId=io.grpc -DartifactId=protoc-gen-grpc-java -Dversion=1.28.0 -Dclassifier=linux-ppcle_64 -Dpackaging=exe -Dfile=/usr/src/grpc-java-1.28.0/compiler/build/exe/java_plugin/protoc-gen-grpc-java +sed -i "s|v12.3.1|v12.22.1|" pom.xml +sed -i "s|6.9.0|6.14.12|" pom.xml + +fi + if [ "$ZEPPELIN_RUN_TESTS" = "true" ]; then BUILD_OPTS="$BUILD_OPTS -DskipTests=false" else diff --git a/bigtop-packages/src/common/zeppelin/patch2-ppc64le.diff b/bigtop-packages/src/common/zeppelin/patch2-ppc64le.diff new file mode 100644 index 0000000000..fabfe33bc7 --- /dev/null +++ b/bigtop-packages/src/common/zeppelin/patch2-ppc64le.diff @@ -0,0 +1,25 @@ +diff --git a/zeppelin-web/package.json b/zeppelin-web/package.json +index de83a629d..619a04d0c 100644 +--- a/zeppelin-web/package.json ++++ b/zeppelin-web/package.json +@@ -7,7 +7,7 @@ + }, + "scripts": { + "clean": "rimraf dist && rimraf .tmp", +- "postinstall": "bower install --silent", ++ "postinstall": "bower install --silent --allow-root", + "prebuild": "npm-run-all clean lint:once", + "build:dist": "npm-run-all prebuild && grunt pre-webpack-dist && webpack && grunt post-webpack-dist", + "build:ci": "npm-run-all prebuild && grunt pre-webpack-ci && webpack && grunt post-webpack-dist", +diff --git a/zeppelin-web/pom.xml b/zeppelin-web/pom.xml +index 54e97053d..2433addd5 100644 +--- a/zeppelin-web/pom.xml ++++ b/zeppelin-web/pom.xml +@@ -83,7 +83,7 @@ + + + ${web.e2e.enabled} +- install --no-lockfile ++ install --no-lockfile --unsafe-perm + + diff --git a/bigtop_toolchain/files/grpc-java-1.28.0-add-support-for-ppc64le.patch b/bigtop_toolchain/files/grpc-java-1.28.0-add-support-for-ppc64le.patch new file mode 100644 index 0000000000..e40fd3a902 --- /dev/null +++ b/bigtop_toolchain/files/grpc-java-1.28.0-add-support-for-ppc64le.patch @@ -0,0 +1,12 @@ +diff --git a/compiler/build.gradle b/compiler/build.gradle +index 60d3a43..55acee0 100644 +--- a/compiler/build.gradle ++++ b/compiler/build.gradle +@@ -105,7 +105,6 @@ model { + // Link other (system) libraries dynamically. + // Clang under OSX doesn't support these options. + linker.args "-Wl,-Bstatic", "-lprotoc", "-lprotobuf", "-static-libgcc", +- "-static-libstdc++", + "-Wl,-Bdynamic", "-lpthread", "-s" + } + addEnvArgs("LDFLAGS", linker.args) diff --git a/bigtop_toolchain/manifests/grpc.pp b/bigtop_toolchain/manifests/grpc.pp new file mode 100644 index 0000000000..bb7f2f8f73 --- /dev/null +++ b/bigtop_toolchain/manifests/grpc.pp @@ -0,0 +1,47 @@ +# 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. + +class bigtop_toolchain::grpc { + + require bigtop_toolchain::jdk + require bigtop_toolchain::protobuf + + $grpc_version = '1.28.0' + $proto_version = '3.5.1.1' + $proto_home = "/usr/local/protobuf-3.5.1.1" + + if ($architecture == 'ppc64le') { + + exec { "download grpc-java ${grpc_version}": + cwd => "/usr/src", + command => "/usr/bin/wget https://github.com/grpc/grpc-java/archive/refs/tags/v${grpc_version}.tar.gz && mkdir -p grpc-java-${grpc_version} && /bin/tar -xvzf v${grpc_version}.tar.gz -C grpc-java-${grpc_version} --strip-components=1", + creates => "/usr/src/grpc-java-${grpc_version}", + } + + file { "/usr/src/grpc-java-${grpc_version}/grpc-java-${grpc_version}-add-support-for-ppc64le.patch": + source => "puppet:///modules/bigtop_toolchain/grpc-java-${grpc_version}-add-support-for-ppc64le.patch", + require => Exec["download grpc-java ${grpc_version}"], + } + + exec { "build grpc-java ${grpc_version}": + cwd => "/usr/src/grpc-java-${grpc_version}", + command => "/usr/bin/patch -p1 < grpc-java-${grpc_version}-add-support-for-ppc64le.patch && export LDFLAGS=-L/${proto_home}/lib && export CXXFLAGS=-I/${proto_home}/include && export LD_LIBRARY_PATH=/${proto_home}/lib && cd compiler && ../gradlew java_pluginExecutable -PskipAndroid=true", + creates => "/usr/local/grpc-java-${grpc_version}", + require => File["/usr/src/grpc-java-${grpc_version}/grpc-java-${grpc_version}-add-support-for-ppc64le.patch"], + timeout => 3000 + } + } + +} diff --git a/bigtop_toolchain/manifests/installer.pp b/bigtop_toolchain/manifests/installer.pp index 8a09490df7..bcf9ee72e0 100644 --- a/bigtop_toolchain/manifests/installer.pp +++ b/bigtop_toolchain/manifests/installer.pp @@ -23,6 +23,7 @@ include bigtop_toolchain::env include bigtop_toolchain::user include bigtop_toolchain::renv + include bigtop_toolchain::grpc stage { 'last': require => Stage['main'],