From d9ffbdd8361f6ac9af39b57b9023997d9c718b27 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Fri, 26 Jul 2019 09:24:35 -0700 Subject: [PATCH] Revert "change gitiles bazel version" This reverts commit aaef88247fa1d160b8233f2ae6073427c8fea54f. --- gitiles/Dockerfile | 23 ++++++++++++----------- gitiles/start.sh | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/gitiles/Dockerfile b/gitiles/Dockerfile index a7b326d..8e9bc7c 100644 --- a/gitiles/Dockerfile +++ b/gitiles/Dockerfile @@ -5,13 +5,13 @@ ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk RUN apk add --no-cache \ bash \ - ca-certificates + ca-certificates \ + openjdk8 # https://github.com/bazelbuild/bazel/releases -ENV BAZEL_VERSION 0.28.1 +ENV BAZEL_VERSION 0.12.0 # https://gerrit.googlesource.com/gitiles/ -ENV GITILES_VERSION v0.3-1 -ENV JAVA_HOME /usr/lib/jvm/default-jvm +ENV GITILES_VERSION v0.2-1 # install bazel RUN set -x \ @@ -20,10 +20,8 @@ RUN set -x \ curl \ git \ linux-headers \ - openjdk11 \ - python3 \ + python \ zip \ - && ln -snf $(which python3) /usr/bin/python \ && : install Bazel to build gitiles \ && curl -sSL "https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-dist.zip" -o /tmp/bazel.zip \ && mkdir "/tmp/bazel-${BAZEL_VERSION}" \ @@ -31,14 +29,17 @@ RUN set -x \ && rm -rf /tmp/bazel.zip \ && ( \ cd "/tmp/bazel-${BAZEL_VERSION}" \ + && : add -fpermissive compiler option to avoid compilation failure \ + && sed -i -e '/"-std=c++0x"/{h;s//"-fpermissive"/;x;G}' tools/cpp/cc_configure.bzl \ + && : add '#include ' to avoid mode_t type error \ + && sed -i -e '/#endif \/\/ COMPILER_MSVC/{h;s//#else/;G;s//#include /;G;}' third_party/ijar/common.h \ && bash compile.sh \ && cp -p output/bazel /usr/bin/ \ - ) - -RUN git clone --depth 1 --branch "${GITILES_VERSION}" https://gerrit.googlesource.com/gitiles /usr/src/gitiles \ + ) \ + && git clone --depth 1 --branch "${GITILES_VERSION}" https://gerrit.googlesource.com/gitiles /usr/src/gitiles \ && ( \ cd /usr/src/gitiles \ - && bazel build --incompatible_depset_is_not_iterable=false --sandbox_debug //:gitiles \ + && bazel build --incompatible_disallow_uncalled_set_constructor=false gitiles-dev:dev \ && cp -rL bazel-bin bin \ && rm -rf bazel-bin \ ) \ diff --git a/gitiles/start.sh b/gitiles/start.sh index ccdc6d5..585877a 100755 --- a/gitiles/start.sh +++ b/gitiles/start.sh @@ -28,4 +28,4 @@ fi PROPERTIES="$PROPERTIES --jvm_flag=-Dcom.google.gitiles.sourcePath=$ROOT" # shellcheck disable=SC2086 -exec "${ROOT}/bin/java/com/google/gitiles/dev/dev" $PROPERTIES +exec "${ROOT}/bin/gitiles-dev/dev" $PROPERTIES