From commits-return-4031-archive-asf-public=cust-asf.ponee.io@bigtop.apache.org Thu May 31 13:11:45 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id C22F0180632 for ; Thu, 31 May 2018 13:11:44 +0200 (CEST) Received: (qmail 33577 invoked by uid 500); 31 May 2018 11:11:43 -0000 Mailing-List: contact commits-help@bigtop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bigtop-dev@bigtop.apache.org Delivered-To: mailing list commits@bigtop.apache.org Received: (qmail 33568 invoked by uid 99); 31 May 2018 11:11:43 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 May 2018 11:11:43 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7A676E0BC7; Thu, 31 May 2018 11:11:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: oflebbe@apache.org To: commits@bigtop.apache.org Message-Id: <25cb8c01067b4f94bba7572de2aac9ae@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: bigtop git commit: BIGTOP-3036: Download gradle and groovy via TLS and do signature checking on ant Date: Thu, 31 May 2018 11:11:43 +0000 (UTC) Repository: bigtop Updated Branches: refs/heads/BIGTOP-3036 [created] 19609d135 BIGTOP-3036: Download gradle and groovy via TLS and do signature checking on ant Thanks to brian m. carlson for reporting Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/19609d13 Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/19609d13 Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/19609d13 Branch: refs/heads/BIGTOP-3036 Commit: 19609d135924234d96a1922dbc8defc4162c0969 Parents: 2483b11 Author: Olaf Flebbe Authored: Wed May 30 20:47:43 2018 +0200 Committer: Olaf Flebbe Committed: Thu May 31 11:49:26 2018 +0200 ---------------------------------------------------------------------- bigtop_toolchain/manifests/ant.pp | 30 ++++++++++++++++++++++++++---- bigtop_toolchain/manifests/gradle.pp | 10 +++------- bigtop_toolchain/manifests/groovy.pp | 13 +++---------- 3 files changed, 32 insertions(+), 21 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/bigtop/blob/19609d13/bigtop_toolchain/manifests/ant.pp ---------------------------------------------------------------------- diff --git a/bigtop_toolchain/manifests/ant.pp b/bigtop_toolchain/manifests/ant.pp index c8e4327..16471e5 100644 --- a/bigtop_toolchain/manifests/ant.pp +++ b/bigtop_toolchain/manifests/ant.pp @@ -18,20 +18,42 @@ class bigtop_toolchain::ant { $ant = latest_ant_binary("1.9.[0-9]*") $apache_prefix = nearest_apache_mirror() + case $operatingsystem{ + /(?i:(centos|fedora))/: { + $pkg = "gnupg2" + } + /(?i:(SLES|opensuse))/: { + $pkg = "gpg2" + } + /(Ubuntu|Debian)/: { + $pkg = "gnupg" + } + } + exec {"/usr/bin/wget $apache_prefix/ant/binaries/$ant-bin.tar.gz": cwd => "/usr/src", unless => "/usr/bin/test -f /usr/src/$ant-bin.tar.gz", - } + } ~> + + exec {"/usr/bin/wget https://www.apache.org/dist/ant/binaries/$ant-bin.tar.gz.asc": + cwd => "/usr/src", + unless => "/usr/bin/test -f /usr/src/$ant-bin.tar.gz.asc", + } ~> + + package { $pkg: + } -> + + exec {"/usr/bin/gpg -v --verify --auto-key-retrieve --keyserver hkp://keyserver.ubuntu.com:80 $ant-bin.tar.gz.asc": + cwd => "/usr/src" + } -> exec {"/bin/tar xvzf /usr/src/$ant-bin.tar.gz": cwd => '/usr/local', creates => "/usr/local/$ant", - require => Exec["/usr/bin/wget $apache_prefix/ant/binaries/$ant-bin.tar.gz"], - } + } -> file {'/usr/local/ant': ensure => link, target => "/usr/local/$ant", - require => Exec["/bin/tar xvzf /usr/src/$ant-bin.tar.gz"], } } http://git-wip-us.apache.org/repos/asf/bigtop/blob/19609d13/bigtop_toolchain/manifests/gradle.pp ---------------------------------------------------------------------- diff --git a/bigtop_toolchain/manifests/gradle.pp b/bigtop_toolchain/manifests/gradle.pp index f09f5b7..13c6767 100644 --- a/bigtop_toolchain/manifests/gradle.pp +++ b/bigtop_toolchain/manifests/gradle.pp @@ -18,21 +18,17 @@ class bigtop_toolchain::gradle { $gradle_version = '4.0' $gradle = "gradle-${gradle_version}" - exec {"/usr/bin/wget http://services.gradle.org/distributions/${gradle}-bin.zip": + exec {"/usr/bin/wget https://services.gradle.org/distributions/${gradle}-bin.zip": cwd => "/usr/src", unless => "/usr/bin/test -f /usr/src/${gradle}-bin.zip", - } + } ~> exec {"/usr/bin/unzip -x -o /usr/src/${gradle}-bin.zip": cwd => '/usr/local', - refreshonly => true, - subscribe => Exec["/usr/bin/wget http://services.gradle.org/distributions/${gradle}-bin.zip"], - require => Exec["/usr/bin/wget http://services.gradle.org/distributions/${gradle}-bin.zip"], - } + } -> file {'/usr/local/gradle': ensure => link, target => "/usr/local/${gradle}", - require => Exec["/usr/bin/unzip -x -o /usr/src/${gradle}-bin.zip"], } } http://git-wip-us.apache.org/repos/asf/bigtop/blob/19609d13/bigtop_toolchain/manifests/groovy.pp ---------------------------------------------------------------------- diff --git a/bigtop_toolchain/manifests/groovy.pp b/bigtop_toolchain/manifests/groovy.pp index dd55d47..6b3be07 100644 --- a/bigtop_toolchain/manifests/groovy.pp +++ b/bigtop_toolchain/manifests/groovy.pp @@ -18,24 +18,17 @@ class bigtop_toolchain::groovy { $groovy_version = '2.4.10' $groovy = "apache-groovy-binary-${groovy_version}" - include bigtop_toolchain::packages - - exec {"/usr/bin/wget http://dl.bintray.com/groovy/maven/${groovy}.zip": + exec {"/usr/bin/wget https://dl.bintray.com/groovy/maven/${groovy}.zip": cwd => "/usr/src", - require => Package[$packages::pkgs], unless => "/usr/bin/test -f /usr/src/${groovy}.zip", - } + } ~> exec {"/usr/bin/unzip -x -o /usr/src/${groovy}.zip": cwd => '/usr/local', - refreshonly => true, - subscribe => Exec["/usr/bin/wget http://dl.bintray.com/groovy/maven/${groovy}.zip"], - require => Exec["/usr/bin/wget http://dl.bintray.com/groovy/maven/${groovy}.zip"], - } + } -> file {'/usr/local/groovy': ensure => link, target => "/usr/local/groovy-${groovy_version}", - require => Exec["/usr/bin/unzip -x -o /usr/src/${groovy}.zip"], } }