You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by of...@apache.org on 2018/05/31 11:11:43 UTC
bigtop git commit: BIGTOP-3036: Download gradle and groovy via TLS
and do signature checking on ant
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 <of...@oflebbe.de>
Authored: Wed May 30 20:47:43 2018 +0200
Committer: Olaf Flebbe <of...@oflebbe.de>
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"],
}
}