You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@yetus.apache.org by aw...@apache.org on 2020/09/10 19:59:03 UTC
[yetus] branch master updated: YETUS-982: Upgrade to Ubuntu Focal
and update all dependencies/built-ins (#117)
This is an automated email from the ASF dual-hosted git repository.
aw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/yetus.git
The following commit(s) were added to refs/heads/master by this push:
new edf3c45 YETUS-982: Upgrade to Ubuntu Focal and update all dependencies/built-ins (#117)
edf3c45 is described below
commit edf3c45425d4009f157b0edae0ea5b0a453c5388
Author: Allen Wittenauer <aw...@apache.org>
AuthorDate: Thu Sep 10 12:58:51 2020 -0700
YETUS-982: Upgrade to Ubuntu Focal and update all dependencies/built-ins (#117)
---
.circleci/config.yml | 1 +
.cirrus.yml | 1 +
.github/workflows/yetus.yml | 10 +-
.rubocop.yml | 2 +
.travis.yml | 1 +
Jenkinsfile | 2 +
asf-site-src/Dockerfile | 12 +-
asf-site-src/config.rb | 7 +-
asf-site-src/ruby27_fix_uri.rb | 130 +++++++++++++++++++
pom.xml | 14 +--
precommit/src/main/shell/core.d/00-yetuslib.sh | 2 +-
precommit/src/main/shell/core.d/patchfiles.sh | 2 +-
precommit/src/main/shell/core.d/reaper.sh | 2 +-
precommit/src/main/shell/personality/hbase.sh | 2 +-
.../src/main/shell/test-patch-docker/Dockerfile | 140 +++++++++++----------
.../src/main/shell/test-patch.d/checkstyle.sh | 4 +-
precommit/src/main/shell/test-patch.d/github.sh | 6 +-
precommit/src/main/shell/test-patch.d/gitlab.sh | 6 +-
precommit/src/main/shell/test-patch.d/jira.sh | 6 +-
precommit/src/main/shell/test-patch.d/spotbugs.sh | 30 ++---
precommit/src/main/shell/test-patch.sh | 8 +-
releasedocmaker/pom.xml | 6 +-
shelldocs/pom.xml | 6 +-
23 files changed, 275 insertions(+), 125 deletions(-)
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 8b9c805..0542782 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -38,6 +38,7 @@ jobs:
- run: >
~/repo/precommit/src/main/shell/test-patch.sh
--plugins=all
+ --java-home=/usr/lib/jvm/java-8-openjdk-amd64
--patch-dir=/tmp/yetus-out
--pylint=pylint2
--html-report-file=/tmp/yetus-out/report.html
diff --git a/.cirrus.yml b/.cirrus.yml
index 5f1841c..c4d5300 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -22,6 +22,7 @@ yetus_task:
${CIRRUS_WORKING_DIR}/precommit/src/main/shell/test-patch.sh
--plugins=all
--pylint=pylint2
+ --java-home=/usr/lib/jvm/java-8-openjdk-amd64
--basedir="${CIRRUS_WORKING_DIR}"
--html-report-file=/tmp/yetus-out/report.html
--console-report-file=/tmp/yetus-out/console.txt
diff --git a/.github/workflows/yetus.yml b/.github/workflows/yetus.yml
index a5f152e..03396ee 100644
--- a/.github/workflows/yetus.yml
+++ b/.github/workflows/yetus.yml
@@ -24,9 +24,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v2
+ - name: checkout
+ uses: actions/checkout@v2
with:
path: src
+ fetch-depth: 0
- name: test-patch
run: >-
"${GITHUB_WORKSPACE}/src/precommit/src/main/shell/test-patch.sh"
@@ -35,6 +37,7 @@ jobs:
--docker
--project=yetus
--pylint=pylint2
+ --java-home=/usr/lib/jvm/java-8-openjdk-amd64
--brief-report-file="${GITHUB_WORKSPACE}/out/brief.txt"
--console-report-file="${GITHUB_WORKSPACE}/out/console.txt"
--html-report-file="${GITHUB_WORKSPACE}/out/report.html"
@@ -46,7 +49,8 @@ jobs:
--tests-filter=checkstyle,javadoc,rubocop,test4tests
--docker-cache-from=apache/yetus-base:master
- name: Artifact output
- uses: actions/upload-artifact@v1
+ if: ${{ always() }}
+ uses: actions/upload-artifact@v2
with:
name: apacheyetuspatchdir
- path: out
+ path: ${{ github.workspace }}/out
diff --git a/.rubocop.yml b/.rubocop.yml
index 348aedc..c2772d0 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -13,6 +13,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
---
+AllCops:
+ NewCops: disable
Layout/LineLength:
Max: 100
Metrics/MethodLength:
diff --git a/.travis.yml b/.travis.yml
index 2e7e618..f2ecccb 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -30,6 +30,7 @@ script:
precommit/src/main/shell/test-patch.sh
--docker
--patch-dir=/tmp/yetus-out
+ --java-home=/usr/lib/jvm/java-8-openjdk-amd64
--plugins=all
--pylint=pylint2
--docker-cache-from=apache/yetus:master
diff --git a/Jenkinsfile b/Jenkinsfile
index 427db61..a7133c0 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -136,6 +136,8 @@ pipeline {
# use emoji as vote result on GitHub
YETUS_ARGS+=(--github-use-emoji-vote)
+ YETUS_ARGS+=(--java-home=/usr/lib/jvm/java-8-openjdk-amd64)
+
# enable writing back to ASF JIRA
YETUS_ARGS+=(--jira-issue-re='^YETUS-[0-9]*$')
YETUS_ARGS+=(--jira-password="${JIRA_PASSWORD}")
diff --git a/asf-site-src/Dockerfile b/asf-site-src/Dockerfile
index 2c85c04..763c562 100644
--- a/asf-site-src/Dockerfile
+++ b/asf-site-src/Dockerfile
@@ -28,8 +28,6 @@ ARG USER_NAME
# hadolint ignore=DL3008
RUN apt-get -q update \
&& apt-get -q install --no-install-recommends -y \
- gnupg2 \
- gnupg-agent \
pinentry-curses \
pinentry-tty \
subversion \
@@ -39,10 +37,6 @@ RUN apt-get -q update \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
-# we really want gpg2 to be the default gpg implementation
-# it doesn't appear Xenial supports that though
-RUN ln -s /usr/bin/gpg2 /usr/local/bin/gpg
-
RUN echo "export GPG_TTY=\$(tty)" >> /root/.bashrc
RUN groupadd --non-unique -g "${GROUP_ID}" "${USER_NAME}"
RUN useradd -g "${GROUP_ID}" -u "${USER_ID}" -k /root -m "${USER_NAME}"
@@ -62,13 +56,13 @@ ENV GEM_HOME ${BUNDLE_PATH}
# on re-launches
# hadolint ignore=DL3028
RUN gem install bundler \
- middleman:'~>3.4.0' \
+ middleman:'4.3.6' \
middleman-livereload \
middleman-syntax \
redcarpet \
therubyracer \
tzinfo-data \
- rake:10.3.1 \
- nokogiri:1.8.5
+ rake:13.0.1 \
+ nokogiri:1.10.10
CMD ["/bin/bash"]
diff --git a/asf-site-src/config.rb b/asf-site-src/config.rb
index 63393aa..5f2914e 100644
--- a/asf-site-src/config.rb
+++ b/asf-site-src/config.rb
@@ -17,6 +17,8 @@
# limitations under the License.
#
+require 'ruby27_fix_uri'
+
set :markdown_engine, :kramdown
# rubocop:disable Layout/HashAlignment
set(
@@ -215,17 +217,16 @@ after_configuration do # rubocop:disable Metrics/BlockLength
releasenotes('target', release)
if release =~ /^0.[0-8]\./
# stitch the javadoc in place
- # rubocop:disable Layout/LineLength
sitemap.register_resource_list_manipulator(
"#{release}_javadocs".to_sym,
ApiDocs.new(
sitemap,
"documentation/#{release}/audience-annotations-apidocs",
- File.expand_path("target/build-#{release}/audience-annotations-component/target/site/apidocs", # rubocop:disable Layout/LineLength
+ File.expand_path("target/build-#{release}/audience-annotations-component/target/site/apidocs", # rubocop:disable Layout/LineLength
File.dirname(__FILE__))
)
)
- # rubocop:enable Layout/LineLength
+
else
sitemap.register_resource_list_manipulator(
"#{release}_javadocs".to_sym,
diff --git a/asf-site-src/ruby27_fix_uri.rb b/asf-site-src/ruby27_fix_uri.rb
new file mode 100644
index 0000000..6d4ab45
--- /dev/null
+++ b/asf-site-src/ruby27_fix_uri.rb
@@ -0,0 +1,130 @@
+# frozen_string_literal: true
+
+#
+# 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.
+#
+
+# TODO: keep this only until this is fixed https://github.com/middleman/middleman/issues/2312
+
+require 'webrick'
+require 'middleman-core/builder'
+
+Middleman::Util.module_eval do
+ module_function
+
+ def normalize_path(path)
+ return path unless path.is_a?(String)
+
+ # The tr call works around a bug in Ruby's Unicode handling
+ WEBrick::HTTPUtils.unescape(path).sub(%r{^/}, '').tr('', '')
+ end
+end
+
+Middleman::Rack.class_eval do
+ # https://github.com/middleman/middleman/blob/master/middleman-core/lib/middleman-core/rack.rb#L90
+ def process_request(env, req, res) # rubocop:disable Metrics/AbcSize
+ start_time = Time.now
+
+ request_path = WEBrick::HTTPUtils.unescape(env['PATH_INFO'].dup)
+ request_path.force_encoding('UTF-8') if request_path.respond_to? :force_encoding
+ request_path = ::Middleman::Util.full_path(request_path, @middleman)
+ full_request_path = File.join(env['SCRIPT_NAME'], request_path) # Path including rack mount
+
+ # Run before callbacks
+ @middleman.execute_callbacks(:before)
+
+ # Get the resource object for this path
+ resource = @middleman.sitemap.find_resource_by_destination_path(request_path.gsub(' ', '%20'))
+
+ # Return 404 if not in sitemap
+ return not_found(res, full_request_path) unless resource && !resource.ignored?
+
+ # If this path is a binary file, send it immediately
+ return send_file(resource, env) if resource.binary?
+
+ res['Content-Type'] = resource.content_type || 'text/plain'
+
+ begin
+ # Write out the contents of the page
+ res.write resource.render({}, rack: { request: req })
+
+ # Valid content is a 200 status
+ res.status = 200
+ rescue Middleman::TemplateRenderer::TemplateNotFound => e
+ res.write "Error: #{e.message}"
+ res.status = 500
+ end
+
+ # End the request
+ logger.debug "== Finishing Request: #{resource.destination_path} (#{(Time.now - start_time).round(2)}s)" # rubocop:disable Layout/LineLength
+ halt res.finish
+ end
+end
+
+Middleman::Builder.class_eval do
+ def output_resource(resource) # rubocop:disable Metrics/AbcSize
+ ::Middleman::Util.instrument 'builder.output.resource', path: File.basename(resource.destination_path) do # rubocop:disable Layout/LineLength
+ output_file = @build_dir + resource.destination_path.gsub('%20', ' ')
+
+ begin
+ if resource.binary?
+ export_file!(output_file, resource.file_descriptor[:full_path])
+ else
+ response = @rack.get(::URI.encode_www_form_component(resource.request_path))
+
+ # If we get a response, save it to a tempfile.
+ if response.status == 200
+ export_file!(output_file, binary_encode(response.body))
+ else
+ trigger(:error, output_file, response.body)
+ return false
+ end
+ end
+ rescue StandardError => e
+ trigger(:error, output_file, "#{e}\n#{e.backtrace.join("\n")}")
+ return false
+ end
+
+ output_file
+ end
+ end
+end
+
+Middleman::Extensions::AssetHash.class_eval do
+ def manipulate_single_resource(resource) # rubocop:disable Metrics/AbcSize
+ return unless @exts.include?(resource.ext)
+ return if ignored_resource?(resource)
+ return if resource.ignored?
+
+ digest = if resource.binary?
+ ::Digest::SHA1.file(resource.source_file).hexdigest[0..7]
+ else
+ # Render through the Rack interface so middleware and mounted apps get a shot
+ response = @rack_client.get(
+ ::URI.encode_www_form_component(resource.destination_path),
+ 'bypass_inline_url_rewriter_asset_hash' => 'true'
+ )
+
+ raise "#{resource.path} should be in the sitemap!" unless response.status == 200
+
+ ::Digest::SHA1.hexdigest(response.body)[0..7]
+ end
+
+ path, basename, extension = split_path(resource.destination_path)
+ resource.destination_path = options.rename_proc.call(path, basename, digest, extension, options)
+ resource
+ end
+end
diff --git a/pom.xml b/pom.xml
index bf9c2ac..2ded2ec 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,7 +24,7 @@
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
- <version>21</version>
+ <version>23</version>
<relativePath/>
<!-- no parent resolution -->
</parent>
@@ -63,16 +63,16 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
- <build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
- <checkstyle.version>8.29</checkstyle.version>
+ <build-helper-maven-plugin.version>3.2.0</build-helper-maven-plugin.version>
+ <checkstyle.version>8.36</checkstyle.version>
<commons.io.version>2.6</commons.io.version>
- <exec-maven-plugin.version>1.6.0</exec-maven-plugin.version>
+ <exec-maven-plugin.version>3.0.0</exec-maven-plugin.version>
<jdiff.version>1.0.9</jdiff.version>
<jython-compile-maven-plugin.version>2.0</jython-compile-maven-plugin.version>
- <jython-shaded.version>2.7.1.1</jython-shaded.version>
+ <jython-slim.version>2.7.2</jython-slim.version>
<maven-checkstyle-plugin.version>3.1.1</maven-checkstyle-plugin.version>
- <maven-project-info-reports-plugin.version>3.0.0</maven-project-info-reports-plugin.version>
- <spotbugs-maven-plugin.version>3.1.11</spotbugs-maven-plugin.version>
+ <maven-project-info-reports-plugin.version>3.1.1</maven-project-info-reports-plugin.version>
+ <spotbugs-maven-plugin.version>4.0.4</spotbugs-maven-plugin.version>
<sourceReleaseAssemblyDescriptor>source-release-tar</sourceReleaseAssemblyDescriptor>
diff --git a/precommit/src/main/shell/core.d/00-yetuslib.sh b/precommit/src/main/shell/core.d/00-yetuslib.sh
index 0cb2e15..08335f7 100755
--- a/precommit/src/main/shell/core.d/00-yetuslib.sh
+++ b/precommit/src/main/shell/core.d/00-yetuslib.sh
@@ -211,7 +211,7 @@ function yetus_generic_columnprinter
while read -r line; do
printf "%-${maxoptsize}s %-s\\n" "${option}" "${line}"
option=" "
- done < <(echo "${giventext}"| fold -s -w ${foldsize})
+ done < <(echo "${giventext}"| fold -s -w "${foldsize}")
((i=i+1))
done
}
diff --git a/precommit/src/main/shell/core.d/patchfiles.sh b/precommit/src/main/shell/core.d/patchfiles.sh
index 8824f56..1af5966 100755
--- a/precommit/src/main/shell/core.d/patchfiles.sh
+++ b/precommit/src/main/shell/core.d/patchfiles.sh
@@ -399,7 +399,7 @@ function patchfile_apply_driver
declare patchfile=$1
declare gpg=$2
- if declare -f ${PATCH_METHOD}_apply >/dev/null; then
+ if declare -f "${PATCH_METHOD}_apply" >/dev/null; then
if ! "${PATCH_METHOD}_apply" "${patchfile}" "${gpg}"; then
return 1
fi
diff --git a/precommit/src/main/shell/core.d/reaper.sh b/precommit/src/main/shell/core.d/reaper.sh
index 0a3e88a..f4b5ace 100755
--- a/precommit/src/main/shell/core.d/reaper.sh
+++ b/precommit/src/main/shell/core.d/reaper.sh
@@ -148,7 +148,7 @@ function reaper_coproc_func
# tell our parent how many
# doing this now means killing in the background
- echo ${count}
+ echo "${count}"
if [[ ${count} -eq 0 ]]; then
rm "${PATCH_DIR}/${logfile}"
diff --git a/precommit/src/main/shell/personality/hbase.sh b/precommit/src/main/shell/personality/hbase.sh
index d9e809f..64bc258 100755
--- a/precommit/src/main/shell/personality/hbase.sh
+++ b/precommit/src/main/shell/personality/hbase.sh
@@ -222,7 +222,7 @@ function hbaseprotoc_rebuild
count=$(${GREP} -c ERROR "${logfile}")
if [[ ${count} -gt 0 ]]; then
- module_status ${i} -1 "patch-hbaseprotoc-${fn}.txt" "Patch generated "\
+ module_status "${i}" -1 "patch-hbaseprotoc-${fn}.txt" "Patch generated "\
"${count} new protoc errors in ${module}."
((result=result+1))
fi
diff --git a/precommit/src/main/shell/test-patch-docker/Dockerfile b/precommit/src/main/shell/test-patch-docker/Dockerfile
index 97c845a..86dba6e 100644
--- a/precommit/src/main/shell/test-patch-docker/Dockerfile
+++ b/precommit/src/main/shell/test-patch-docker/Dockerfile
@@ -23,7 +23,7 @@
#
###############
-FROM ubuntu:xenial
+FROM ubuntu:focal
## NOTE to committers: if this gets moved from Xenial to something else, be
## sure to also fix the gpg link in asf-site-src as appropriate
@@ -42,10 +42,13 @@ ENV DEBCONF_TERSE true
######
RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
apt-transport-https \
+ apt-utils \
ca-certificates \
curl \
dirmngr \
git \
+ gpg \
+ gpg-agent \
libffi-dev \
locales \
pkg-config \
@@ -74,8 +77,21 @@ ENV LC_ALL en_US.UTF-8
RUN apt-get -q update && apt-get -q install --no-install-recommends -y openjdk-8-jdk-headless \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
+
+####
+# OpenJDK 11 (but keeps default to JDK8)
+# NOTE: This default only works when Apache Yetus is launched
+# _in_ the container and not outside of it!
+####
+RUN apt-get -q update && apt-get -q install --no-install-recommends -y default-jre-headless openjdk-11-jdk-headless \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/* \
+ && update-java-alternatives -s java-1.8.0-openjdk-amd64 \
+ && rm -f /usr/lib/jvm/default-java \
+ && ln -s java-8-openjdk-amd64 /usr/lib/jvm/default-java
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64
+
####
# Install ant
####
@@ -93,7 +109,7 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y autoconf
####
# Install bats (TAP-capable unit testing for shell scripts)
####
-RUN git clone --branch v1.1.0 \
+RUN git clone --branch v1.2.1 \
https://github.com/bats-core/bats-core.git \
/tmp/bats-core \
&& /tmp/bats-core/install.sh /usr/local \
@@ -109,12 +125,12 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y cmake \
###
# Install docker
###
-RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
+RUN curl -sSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository -y \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
- stable"
-RUN apt-get -q update && apt-get -q install --no-install-recommends -y docker-ce \
+ stable" \
+ && apt-get -q update && apt-get -q install --no-install-recommends -y docker-ce \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
@@ -129,8 +145,8 @@ ENV FINDBUGS_HOME /usr
#####
# Install SpotBugs
#####
-RUN curl -fsSL https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/4.1.2/spotbugs-4.1.2.tgz -o spotbugs.tgz \
- && curl -fsSL https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/4.1.2/spotbugs-4.1.2.tgz.sha1 -o spotbugs.tgz.sha1 \
+RUN curl -sSL https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/4.1.2/spotbugs-4.1.2.tgz -o spotbugs.tgz \
+ && curl -sSL https://repo.maven.apache.org/maven2/com/github/spotbugs/spotbugs/4.1.2/spotbugs-4.1.2.tgz.sha1 -o spotbugs.tgz.sha1 \
&& echo -n " spotbugs.tgz" >> spotbugs.tgz.sha1 \
&& shasum -c spotbugs.tgz.sha1 \
&& mkdir -p /opt/spotbugs \
@@ -167,48 +183,47 @@ RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
######
# Install python3 and pylint3
-######
-RUN add-apt-repository -y ppa:deadsnakes/ppa
-# hadolint ignore=DL3008
-RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
- python3.7 \
- python3.7-dev \
- && apt-get clean \
- && rm -rf /var/lib/apt/lists/*
-RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
- && python3.7 get-pip.py \
- && rm /usr/local/bin/pip
# astroid and pylint go hand-in-hand. Upgrade both at the same time.
-# hadolint ignore=DL3013
-RUN pip3 install -v \
- astroid==2.3.3 \
- docker-compose==1.25.4 \
- pylint==2.4.4 \
- yamllint==1.20.0 \
- && rm -rf /root/.cache
-RUN mv /usr/local/bin/pylint /usr/local/bin/pylint3
+######
+# hadolint ignore=DL3008,DL3013
+RUN add-apt-repository -y ppa:deadsnakes/ppa \
+ && apt-get -q update && apt-get -q install --no-install-recommends -y \
+ python3 \
+ python3-dev \
+ && apt-get clean \
+ && rm -rf /var/lib/apt/lists/* \
+ && curl -sSL https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py \
+ && python3 /tmp/get-pip.py \
+ && rm /usr/local/bin/pip /tmp/get-pip.py \
+ && pip3 install -v \
+ astroid==2.4.2 \
+ docker-compose==1.26.2 \
+ pylint==2.6.0 \
+ yamllint==1.24.2 \
+ && rm -rf /root/.cache \
+ && mv /usr/local/bin/pylint /usr/local/bin/pylint3
######
# Install python, pylint2, and yamllint
######
RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
- python \
- python2.7 \
- python-pip \
+ python2 \
python-pkg-resources \
python-setuptools \
- python-wheel \
python-dev \
&& apt-get clean \
- && rm -rf /var/lib/apt/lists/*
-RUN pip2 install -v \
+ && rm -rf /var/lib/apt/lists/* \
+ && curl -sSL https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py \
+ && python2 /tmp/get-pip.py \
+ && rm /tmp/get-pip.py /usr/local/bin/pip \
+ && pip2 install -v \
astroid==1.6.5 \
configparser==4.0.2 \
isort==4.3.21 \
pylint==1.9.2 \
python-dateutil==2.7.3 \
- && rm -rf /root/.cache
-RUN mv /usr/local/bin/pylint /usr/local/bin/pylint2
+ && rm -rf /root/.cache \
+ && mv /usr/local/bin/pylint /usr/local/bin/pylint2
#####
# all of the world's python2 code stopped working, right?
@@ -218,14 +233,14 @@ RUN ln -s /usr/local/bin/pylint3 /usr/local/bin/pylint
####
# Install ruby and associated bits
###
-RUN echo 'gem: --no-rdoc --no-ri' >> /root/.gemrc
-RUN apt-get -q update && apt-get -q install --no-install-recommends -y \
- ruby \
- ruby-dev \
+RUN echo 'gem: --no-rdoc --no-ri' >> /root/.gemrc \
+ && apt-get -q update && apt-get -q install --no-install-recommends -y \
+ ruby \
+ ruby-dev \
&& apt-get clean \
- && rm -rf /var/lib/apt/lists/*
-RUN gem install rake -v 13.0.1 \
- && gem install rubocop -v 0.80.1 \
+ && rm -rf /var/lib/apt/lists/* \
+ && gem install rake -v 13.0.1 \
+ && gem install rubocop -v 0.90.0 \
&& gem install bundler -v 2.1.4 \
&& rm -rf /root/.gem
# set some reasonable defaults for ruby
@@ -236,34 +251,33 @@ ENV BUNDLE_PATH /var/tmp/.bundler-gems
####
# Install shellcheck (shell script lint)
####
-RUN curl -L -s -S \
- https://github.com/koalaman/shellcheck/releases/download/v0.7.0/shellcheck-v0.7.0.linux.x86_64.tar.xz \
- | tar --strip-components 1 --wildcards -xJf - '*/shellcheck' \
- && chmod a+rx shellcheck \
- && mv shellcheck /bin/shellcheck \
- && shasum -a 512 /bin/shellcheck \
- | awk '$1!="ccc6ffa932ab6f98dd2e14bd6175282af8f2131d5f07fe85a55a0f0058a45a55e7284b31f0c94ebb5738a80370c405094a9b0f01c342888ef2945882b18b655d" {exit(1)}'
-
+RUN curl -sSL \
+ https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz \
+ | tar --strip-components 1 --wildcards -xJf - '*/shellcheck' \
+ && chmod a+rx shellcheck \
+ && mv shellcheck /bin/shellcheck \
+ && shasum -a 512 /bin/shellcheck \
+ | awk '$1!="aae813283d49f18f95a205dca1c5184267d07534a08abc952ebea1958fee06f8a0207373b6770a083079ba875458ea9da443f2b9910a50dcd93b935048bc14f5" {exit(1)}'
###
# Install hadolint
####
-RUN curl -L -s -S \
- https://github.com/hadolint/hadolint/releases/download/v1.17.5/hadolint-Linux-x86_64 \
- -o /bin/hadolint && \
- chmod a+rx /bin/hadolint && \
- shasum -a 512 /bin/hadolint | \
- awk '$1!="550b861641866685292417c02a290853592ea5ad9845d40a6d9bfab6ecfc1b03c24a41c3a44d27154abb4fff373d80972784a148dbc191f8455de706ae331845" {exit(1)}'
+RUN curl -sSL \
+ https://github.com/hadolint/hadolint/releases/download/v1.18.0/hadolint-Linux-x86_64 \
+ -o /bin/hadolint \
+ && chmod a+rx /bin/hadolint \
+ && shasum -a 512 /bin/hadolint \
+ | awk '$1!="df27253d374c143a606483b07a26234ac7b4bca40b4eba53e79609c81aa70146e7d5c145f90dcec71d6d1aad1048b7d9d2de68d92284f48a735d04d19c5c5559" {exit(1)}'
###
# Install npm and JSHint
###
# hadolint ignore=DL3008
-RUN curl -sL https://deb.nodesource.com/setup_12.x | bash - \
+RUN curl -sSL https://deb.nodesource.com/setup_14.x | bash - \
&& apt-get -q install --no-install-recommends -y nodejs \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
- && npm install -g jshint@2.11.0 markdownlint-cli@0.22.0 \
+ && npm install -g jshint@2.12.0 markdownlint-cli@0.23.2 \
&& rm -rf /root/.npm
###
@@ -274,18 +288,18 @@ RUN add-apt-repository -y ppa:longsleep/golang-backports \
&& apt-get -q update \
&& apt-get -q install --no-install-recommends -y golang-go \
&& apt-get clean \
- && rm -rf /var/lib/apt/lists/*
-RUN go get -u github.com/mgechev/revive \
+ && rm -rf /var/lib/apt/lists/* \
+ && go get -u github.com/mgechev/revive \
&& go get -u github.com/mrtazz/checkmake \
- && (GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.24.0) \
+ && (GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.30.0) \
&& mv /root/go/bin/* /usr/local/bin \
&& rm -rf /root/go /root/.cache/go-build
-RUN curl -L -s -S \
- https://github.com/bufbuild/buf/releases/download/v0.18.1/buf-Linux-x86_64.tar.gz \
+RUN curl -sSL \
+ https://github.com/bufbuild/buf/releases/download/v0.21.0/buf-Linux-x86_64.tar.gz \
-o buf.tar.gz \
&& shasum -a 256 buf.tar.gz \
- | awk '$1!="82a35087879c35449f336a37ab4b655e43992615140f4c37f1f0187ce4e6e6db" {exit(1)}' \
+ | awk '$1!="95aba62ac0ecc5a9120cc58c65cdcc85038633a816bddfe8398c5ae3b32803f1" {exit(1)}' \
&& tar -xzf buf.tar.gz -C /usr/local --strip-components 1 \
&& rm buf.tar.gz
diff --git a/precommit/src/main/shell/test-patch.d/checkstyle.sh b/precommit/src/main/shell/test-patch.d/checkstyle.sh
index 3260482..27dec9e 100755
--- a/precommit/src/main/shell/test-patch.d/checkstyle.sh
+++ b/precommit/src/main/shell/test-patch.d/checkstyle.sh
@@ -457,9 +457,9 @@ function checkstyle_postapply
if [[ ${addpatch} -gt 0 ]] ; then
((result = result + 1))
- module_status ${i} -1 "diff-checkstyle-${fn}.txt" "${mod}: ${BUILDMODEMSG} ${statstring}"
+ module_status "${i}" -1 "diff-checkstyle-${fn}.txt" "${mod}: ${BUILDMODEMSG} ${statstring}"
elif [[ ${fixedpatch} -gt 0 ]]; then
- module_status ${i} +1 "diff-checkstyle-${fn}.txt" "${mod}: ${BUILDMODEMSG} ${statstring}"
+ module_status "${i}" +1 "diff-checkstyle-${fn}.txt" "${mod}: ${BUILDMODEMSG} ${statstring}"
summarize=false
fi
((i=i+1))
diff --git a/precommit/src/main/shell/test-patch.d/github.sh b/precommit/src/main/shell/test-patch.d/github.sh
index c813834..1621feb 100755
--- a/precommit/src/main/shell/test-patch.d/github.sh
+++ b/precommit/src/main/shell/test-patch.d/github.sh
@@ -155,17 +155,17 @@ function github_breakup_url
((pos2=count-3))
((pos1=pos2))
- GITHUB_BASE_URL=$(echo "${url}" | cut -f1-${pos2} -d/)
+ GITHUB_BASE_URL=$(echo "${url}" | cut "-f1-${pos2}" -d/)
((pos1=pos1+1))
((pos2=pos1+1))
- GITHUB_REPO=$(echo "${url}" | cut -f${pos1}-${pos2} -d/)
+ GITHUB_REPO=$(echo "${url}" | cut "-f${pos1}-${pos2}" -d/)
((pos1=pos2+2))
unset pos2
- GITHUB_ISSUE=$(echo "${url}" | cut -f${pos1}-${pos2} -d/ | cut -f1 -d.)
+ GITHUB_ISSUE=$(echo "${url}" | cut "-f${pos1}-${pos2}" -d/ | cut -f1 -d.)
else
GITHUB_BASE_URL=$(echo "${url}" | cut -f1-3 -d/)
GITHUB_REPO=$(echo "${url}" | cut -f4- -d/)
diff --git a/precommit/src/main/shell/test-patch.d/gitlab.sh b/precommit/src/main/shell/test-patch.d/gitlab.sh
index fd18cfc..3f582dd 100755
--- a/precommit/src/main/shell/test-patch.d/gitlab.sh
+++ b/precommit/src/main/shell/test-patch.d/gitlab.sh
@@ -107,17 +107,17 @@ function gitlab_breakup_url
((pos2=count-3))
((pos1=pos2))
- GITLAB_BASE_URL=$(echo "${url}" | cut -f1-${pos2} -d/)
+ GITLAB_BASE_URL=$(echo "${url}" | cut "-f1-${pos2}" -d/)
((pos1=pos1+1))
((pos2=pos1+1))
- GITLAB_REPO=$(echo "${url}" | cut -f${pos1}-${pos2} -d/)
+ GITLAB_REPO=$(echo "${url}" | cut "-f${pos1}-${pos2}" -d/)
((pos1=pos2+2))
unset pos2
- GITLAB_ISSUE=$(echo "${url}" | cut -f${pos1}-${pos2} -d/ | cut -f1 -d.)
+ GITLAB_ISSUE=$(echo "${url}" | cut "-f${pos1}-${pos2}" -d/ | cut -f1 -d.)
else
GITLAB_BASE_URL=$(echo "${url}" | cut -f1-3 -d/)
GITLAB_REPO=$(echo "${url}" | cut -f4- -d/)
diff --git a/precommit/src/main/shell/test-patch.d/jira.sh b/precommit/src/main/shell/test-patch.d/jira.sh
index d3d7737..830b9ae 100755
--- a/precommit/src/main/shell/test-patch.d/jira.sh
+++ b/precommit/src/main/shell/test-patch.d/jira.sh
@@ -309,7 +309,7 @@ function jira_determine_branch
total=${#count}
((total = total + 3 ))
until [[ ${total} -lt 3 ]]; do
- PATCH_BRANCH=$(echo "${patchnamechunk}" | cut -f3-${total} -d.)
+ PATCH_BRANCH=$(echo "${patchnamechunk}" | cut "-f3-${total}" -d.)
yetus_debug "Determine branch: ISSUE[.##].branch = ${PATCH_BRANCH}"
((total=total-1))
if [[ -n "${PATCH_BRANCH}" ]]; then
@@ -325,7 +325,7 @@ function jira_determine_branch
total=${#count}
((total = total + 3 ))
until [[ ${total} -lt 2 ]]; do
- PATCH_BRANCH=$(echo "${patchnamechunk}" | cut -f2-${total} -d.)
+ PATCH_BRANCH=$(echo "${patchnamechunk}" | cut "-f2-${total}" -d.)
yetus_debug "Determine branch: ISSUE.branch[.##] = ${PATCH_BRANCH}"
((total=total-1))
if [[ -n "${PATCH_BRANCH}" ]]; then
@@ -341,7 +341,7 @@ function jira_determine_branch
total=${#count}
((total = total + 1 ))
until [[ ${total} -lt 1 ]]; do
- PATCH_BRANCH=$(echo "${patchnamechunk}" | cut -f3- -d- | cut -f1-${total} -d. )
+ PATCH_BRANCH=$(echo "${patchnamechunk}" | cut -f3- -d- | cut "-f1-${total}" -d. )
yetus_debug "Determine branch: ISSUE-branch[.##] = ${PATCH_BRANCH}"
((total=total-1))
if [[ -n "${PATCH_BRANCH}" ]]; then
diff --git a/precommit/src/main/shell/test-patch.d/spotbugs.sh b/precommit/src/main/shell/test-patch.d/spotbugs.sh
index 45fed81..5c4def1 100755
--- a/precommit/src/main/shell/test-patch.d/spotbugs.sh
+++ b/precommit/src/main/shell/test-patch.d/spotbugs.sh
@@ -190,7 +190,7 @@ function spotbugs_runner
warnings_file="${PATCH_DIR}/${name}-${SPOTBUGS_MODE}-${fn}-warnings"
if [[ "${#files[@]}" -lt 1 ]]; then
- module_status ${i} 0 "" "${name}/${module} no ${SPOTBUGS_MODE} output file (${targetfile})"
+ module_status "${i}" 0 "" "${name}/${module} no ${SPOTBUGS_MODE} output file (${targetfile})"
((i=i+1))
popd >/dev/null || return 1
continue
@@ -215,14 +215,14 @@ function spotbugs_runner
if [[ ${retval} != 0 ]]; then
savestop=$(stop_clock)
MODULE_STATUS_TIMER[${i}]=${savestop}
- module_status ${i} -1 "" "${name}/${module} cannot run setBugDatabaseInfo from ${SPOTBUGS_MODE}"
+ module_status "${i}" -1 "" "${name}/${module} cannot run setBugDatabaseInfo from ${SPOTBUGS_MODE}"
((result=result+1))
((i=i+1))
continue
fi
if [[ ! -f "${warnings_file}.xml" ]]; then
- module_status ${i} 0 "" "${name}/${module} no data in SpotBugs/FindBugs output file (${targetfile})"
+ module_status "${i}" 0 "" "${name}/${module} no data in SpotBugs/FindBugs output file (${targetfile})"
((i=i+1))
popd >/dev/null || return 1
continue
@@ -233,7 +233,7 @@ function spotbugs_runner
"${warnings_file}.html"; then
savestop=$(stop_clock)
MODULE_STATUS_TIMER[${i}]=${savestop}
- module_status ${i} -1 "" "${name}/${module} cannot run convertXmlToText from ${SPOTBUGS_MODE}"
+ module_status "${i}" -1 "" "${name}/${module} cannot run convertXmlToText from ${SPOTBUGS_MODE}"
((result=result+1))
fi
@@ -250,7 +250,7 @@ function spotbugs_runner
((i=i+1))
done
- return ${result}
+ return "${result}"
}
## @description Track pre-existing spotbugs warnings
@@ -320,10 +320,10 @@ function spotbugs_preapply
if [[ ${module_spotbugs_warnings} -gt 0 ]] ; then
msg="${module} in ${PATCH_BRANCH} has ${module_spotbugs_warnings} extant ${SPOTBUGS_MODE} warnings."
if [[ "${SPOTBUGS_WARNINGS_FAIL_PRECHECK}" = "true" ]]; then
- module_status ${modindex} -1 "branch-${SPOTBUGS_MODE}-${fn}-warnings.html" "${msg}"
+ module_status "${modindex}" -1 "branch-${SPOTBUGS_MODE}-${fn}-warnings.html" "${msg}"
((result=result+1))
elif [[ "${BUILDMODE}" = full ]]; then
- module_status ${modindex} -1 "branch-${SPOTBUGS_MODE}-${fn}-warnings.html" "${msg}"
+ module_status "${modindex}" -1 "branch-${SPOTBUGS_MODE}-${fn}-warnings.html" "${msg}"
((result=result+1))
populate_test_table "${SPOTBUGS_MODE}" "module:${module}"
#shellcheck disable=SC2162
@@ -333,7 +333,7 @@ function spotbugs_preapply
add_test_table "" "${firstpart}:${secondpart}"
done < <("${SPOTBUGS_HOME}/bin/convertXmlToText" "${warnings_file}.xml")
else
- module_status ${modindex} 0 "branch-${SPOTBUGS_MODE}-${fn}-warnings.html" "${msg}"
+ module_status "${modindex}" 0 "branch-${SPOTBUGS_MODE}-${fn}-warnings.html" "${msg}"
fi
fi
@@ -426,7 +426,7 @@ function spotbugs_postinstall
fixedbugsbase="${PATCH_DIR}/fixed-${SPOTBUGS_MODE}-${fn}"
if [[ ! -f "${branchxml}" ]] && [[ ! -f "${patchxml}" ]]; then
- module_status ${i} 0 "" "${module} has no data from ${SPOTBUGS_MODE}"
+ module_status "${i}" 0 "" "${module} has no data from ${SPOTBUGS_MODE}"
((result=result+1))
savestop=$(stop_clock)
MODULE_STATUS_TIMER[${i}]=${savestop}
@@ -441,7 +441,7 @@ function spotbugs_postinstall
-output "${combined_xml}" \
"${branchxml}" \
"${patchxml}"; then
- module_status ${i} -1 "" "${module} cannot run computeBugHistory from ${SPOTBUGS_MODE}"
+ module_status "${i}" -1 "" "${module} cannot run computeBugHistory from ${SPOTBUGS_MODE}"
((result=result+1))
savestop=$(stop_clock)
MODULE_STATUS_TIMER[${i}]=${savestop}
@@ -462,7 +462,7 @@ function spotbugs_postinstall
"${combined_xml}" "${newbugsbase}.xml" | ${AWK} '{print $1}')
retval=$?
if [[ ${retval} != 0 ]]; then
- module_status ${i} -1 "" "${module} cannot run filterBugs (#1) from ${SPOTBUGS_MODE}"
+ module_status "${i}" -1 "" "${module} cannot run filterBugs (#1) from ${SPOTBUGS_MODE}"
((result=result+1))
savestop=$(stop_clock)
MODULE_STATUS_TIMER[${i}]=${savestop}
@@ -476,7 +476,7 @@ function spotbugs_postinstall
"${combined_xml}" "${fixedbugsbase}.xml" | ${AWK} '{print $1}')
retval=$?
if [[ ${retval} != 0 ]]; then
- module_status ${i} -1 "" "${module} cannot run filterBugs (#2) from ${SPOTBUGS_MODE}"
+ module_status "${i}" -1 "" "${module} cannot run filterBugs (#2) from ${SPOTBUGS_MODE}"
((result=result+1))
savestop=$(stop_clock)
MODULE_STATUS_TIMER[${i}]=${savestop}
@@ -489,7 +489,7 @@ function spotbugs_postinstall
if ! "${SPOTBUGS_HOME}/bin/convertXmlToText" -html "${newbugsbase}.xml" \
"${newbugsbase}.html"; then
- module_status ${i} -1 "" "${module} cannot run convertXmlToText from ${SPOTBUGS_MODE}"
+ module_status "${i}" -1 "" "${module} cannot run convertXmlToText from ${SPOTBUGS_MODE}"
((result=result+1))
savestop=$(stop_clock)
MODULE_STATUS_TIMER[${i}]=${savestop}
@@ -507,10 +507,10 @@ function spotbugs_postinstall
add_test_table "" "${firstpart}:${secondpart}"
done < <("${SPOTBUGS_HOME}/bin/convertXmlToText" "${newbugsbase}.xml")
- module_status ${i} -1 "new-${SPOTBUGS_MODE}-${fn}.html" "${module} ${statstring}"
+ module_status "${i}" -1 "new-${SPOTBUGS_MODE}-${fn}.html" "${module} ${statstring}"
((result=result+1))
elif [[ ${fixed_warnings} -gt 0 ]]; then
- module_status ${i} +1 "" "${module} ${statstring}"
+ module_status "${i}" +1 "" "${module} ${statstring}"
summarize=false
fi
savestop=$(stop_clock)
diff --git a/precommit/src/main/shell/test-patch.sh b/precommit/src/main/shell/test-patch.sh
index d83aa5e..b7f0adf 100755
--- a/precommit/src/main/shell/test-patch.sh
+++ b/precommit/src/main/shell/test-patch.sh
@@ -1964,13 +1964,13 @@ function modules_workers
if [[ ${execvalue} == 0 ]] ; then
module_status \
- ${modindex} \
+ "${modindex}" \
+1 \
"${repostatus}-${testtype}-${fn}.txt" \
"${modulesuffix} in ${repo} passed${statusjdk}."
else
module_status \
- ${modindex} \
+ "${modindex}" \
-1 \
"${repostatus}-${testtype}-${fn}.txt" \
"${modulesuffix} in ${repo} failed${statusjdk}."
@@ -3360,5 +3360,5 @@ finish_vote_table
finish_footer_table
-bugsystem_finalreport ${RESULT}
-cleanup_and_exit ${RESULT}
+bugsystem_finalreport "${RESULT}"
+cleanup_and_exit "${RESULT}"
diff --git a/releasedocmaker/pom.xml b/releasedocmaker/pom.xml
index 902a7a4..b3a30f5 100644
--- a/releasedocmaker/pom.xml
+++ b/releasedocmaker/pom.xml
@@ -35,9 +35,9 @@
<dependencies>
<dependency>
- <groupId>org.scijava</groupId>
- <artifactId>jython-shaded</artifactId>
- <version>${jython-shaded.version}</version>
+ <groupId>org.python</groupId>
+ <artifactId>jython-slim</artifactId>
+ <version>${jython-slim.version}</version>
</dependency>
<dependency>
<groupId>org.apache.yetus</groupId>
diff --git a/shelldocs/pom.xml b/shelldocs/pom.xml
index 6108eed..9899ce1 100644
--- a/shelldocs/pom.xml
+++ b/shelldocs/pom.xml
@@ -35,9 +35,9 @@
<dependencies>
<dependency>
- <groupId>org.scijava</groupId>
- <artifactId>jython-shaded</artifactId>
- <version>${jython-shaded.version}</version>
+ <groupId>org.python</groupId>
+ <artifactId>jython-slim</artifactId>
+ <version>${jython-slim.version}</version>
</dependency>
<dependency>
<groupId>org.apache.yetus</groupId>