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 2015/10/21 16:14:28 UTC
[2/2] bigtop git commit: BIGTOP-2088: Support protobuf installation
for OPENPOWER
BIGTOP-2088: Support protobuf installation for OPENPOWER
Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/2c2579cf
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/2c2579cf
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/2c2579cf
Branch: refs/heads/master
Commit: 2c2579cf5d1a3dc8589543298318e5c2757bab67
Parents: 2bf76ff
Author: Olaf Flebbe <of...@oflebbe.de>
Authored: Tue Oct 13 22:26:48 2015 +0200
Committer: Olaf Flebbe <of...@oflebbe.de>
Committed: Wed Oct 21 16:12:26 2015 +0200
----------------------------------------------------------------------
bigtop_toolchain/manifests/protobuf.pp | 41 ++++++++++++++++-------------
1 file changed, 23 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/bigtop/blob/2c2579cf/bigtop_toolchain/manifests/protobuf.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/protobuf.pp b/bigtop_toolchain/manifests/protobuf.pp
index e69d909..ca5ec27 100644
--- a/bigtop_toolchain/manifests/protobuf.pp
+++ b/bigtop_toolchain/manifests/protobuf.pp
@@ -19,35 +19,40 @@ class bigtop_toolchain::protobuf {
case $operatingsystem{
/Ubuntu|Debian/: {
- exec { '/usr/bin/wget https://launchpad.net/ubuntu/+archive/primary/+files/libprotobuf8_2.5.0-9ubuntu1_amd64.deb':
+ case $architecture {
+ 'amd64' : { $url = "https://launchpad.net/ubuntu/+archive/primary/+files"
+ $arch= "amd64" }
+ 'ppc64le' : { $url = "https://bintray.com/artifact/download/oflebbe/bigtop-protobuf"
+ $arch= "ppc64el" }
+ }
+ }
+ }
+
+ case $operatingsystem{
+ /Ubuntu|Debian/: {
+ exec { "/usr/bin/wget $url/libprotobuf8_2.5.0-9ubuntu1_$arch.deb":
cwd => "/usr/src",
- require => Package[$packages::pkgs],
- unless => "/usr/bin/test -f /usr/src/libprotobuf8_2.5.0-9ubuntu1_amd64.deb",
+ creates => "/usr/src/libprotobuf8_2.5.0-9ubuntu1_$arch.deb",
}
- exec { '/usr/bin/wget https://launchpad.net/ubuntu/+archive/primary/+files/libprotoc8_2.5.0-9ubuntu1_amd64.deb':
+ exec { "/usr/bin/wget $url/libprotoc8_2.5.0-9ubuntu1_$arch.deb":
cwd => "/usr/src",
- require => Package[$packages::pkgs],
- unless => "/usr/bin/test -f /usr/src/libprotoc8_2.5.0-9ubuntu1_amd64.deb",
+ creates => "/usr/src/libprotoc8_2.5.0-9ubuntu1_$arch.deb",
}
- exec { '/usr/bin/wget https://launchpad.net/ubuntu/+archive/primary/+files/protobuf-compiler_2.5.0-9ubuntu1_amd64.deb':
+ exec { "/usr/bin/wget $url/protobuf-compiler_2.5.0-9ubuntu1_$arch.deb":
cwd => "/usr/src",
- require => Package[$packages::pkgs],
- unless => "/usr/bin/test -f /usr/src/protobuf-compiler_2.5.0-9ubuntu1_amd64.deb",
+ creates => "/usr/src/protobuf-compiler_2.5.0-9ubuntu1_$arch.deb",
}
- exec {'/usr/bin/dpkg -i protobuf-compiler_2.5.0-9ubuntu1_amd64.deb':
- unless => "/usr/bin/test -f /usr/bin/protoc",
+ exec {"/usr/bin/dpkg -i protobuf-compiler_2.5.0-9ubuntu1_$arch.deb":
cwd => "/usr/src",
- require => [ EXEC["/usr/bin/dpkg -i libprotoc8_2.5.0-9ubuntu1_amd64.deb"],EXEC["/usr/bin/wget https://launchpad.net/ubuntu/+archive/primary/+files/protobuf-compiler_2.5.0-9ubuntu1_amd64.deb"] ]
+ require => [ EXEC["/usr/bin/dpkg -i libprotoc8_2.5.0-9ubuntu1_$arch.deb"],EXEC["/usr/bin/wget $url/protobuf-compiler_2.5.0-9ubuntu1_$arch.deb"] ]
}
- exec {'/usr/bin/dpkg -i libprotoc8_2.5.0-9ubuntu1_amd64.deb':
- unless => "/usr/bin/test -f /usr/bin/protoc",
+ exec {"/usr/bin/dpkg -i libprotoc8_2.5.0-9ubuntu1_$arch.deb":
cwd => "/usr/src",
- require => [ EXEC["/usr/bin/dpkg -i libprotobuf8_2.5.0-9ubuntu1_amd64.deb"],EXEC["/usr/bin/wget https://launchpad.net/ubuntu/+archive/primary/+files/libprotoc8_2.5.0-9ubuntu1_amd64.deb"] ]
+ require => [ EXEC["/usr/bin/dpkg -i libprotobuf8_2.5.0-9ubuntu1_$arch.deb"],EXEC["/usr/bin/wget $url/libprotoc8_2.5.0-9ubuntu1_$arch.deb"] ]
}
- exec {'/usr/bin/dpkg -i libprotobuf8_2.5.0-9ubuntu1_amd64.deb':
- unless => "/usr/bin/test -f /usr/bin/protoc",
+ exec {"/usr/bin/dpkg -i libprotobuf8_2.5.0-9ubuntu1_$arch.deb":
cwd => "/usr/src",
- require => EXEC["/usr/bin/wget https://launchpad.net/ubuntu/+archive/primary/+files/libprotobuf8_2.5.0-9ubuntu1_amd64.deb"],
+ require => EXEC["/usr/bin/wget $url/libprotobuf8_2.5.0-9ubuntu1_$arch.deb"],
}
}
default: {