bigtop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject git commit: BIGTOP-1359. fix a few issues with our puppet_toolchain code
Date Tue, 08 Jul 2014 23:20:59 GMT
Repository: bigtop
Updated Branches:
  refs/heads/master e460c974b -> 9873cc2ba


BIGTOP-1359. fix a few issues with our puppet_toolchain code


Project: http://git-wip-us.apache.org/repos/asf/bigtop/repo
Commit: http://git-wip-us.apache.org/repos/asf/bigtop/commit/9873cc2b
Tree: http://git-wip-us.apache.org/repos/asf/bigtop/tree/9873cc2b
Diff: http://git-wip-us.apache.org/repos/asf/bigtop/diff/9873cc2b

Branch: refs/heads/master
Commit: 9873cc2ba07cd98dc75df6d44e05a6e3c7087845
Parents: e460c97
Author: Roman Shaposhnik <rvs@apache.org>
Authored: Tue Jul 1 16:05:29 2014 -0700
Committer: Roman Shaposhnik <rvs@apache.org>
Committed: Tue Jul 8 16:20:54 2014 -0700

----------------------------------------------------------------------
 bigtop_toolchain/files/mrdocs-protobuf-rpm.repo | 21 --------------
 bigtop_toolchain/manifests/jdk.pp               | 25 ++++++++++------
 bigtop_toolchain/manifests/packages.pp          |  4 +--
 bigtop_toolchain/manifests/protobuf.pp          | 30 ++++++++++++++------
 4 files changed, 40 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bigtop/blob/9873cc2b/bigtop_toolchain/files/mrdocs-protobuf-rpm.repo
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/files/mrdocs-protobuf-rpm.repo b/bigtop_toolchain/files/mrdocs-protobuf-rpm.repo
deleted file mode 100644
index af7630f..0000000
--- a/bigtop_toolchain/files/mrdocs-protobuf-rpm.repo
+++ /dev/null
@@ -1,21 +0,0 @@
-# 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.
-[home_mrdocs_protobuf-rpm]
-name=home:mrdocs:protobuf-rpm (CentOS_CentOS-6)
-type=rpm-md
-baseurl=http://download.opensuse.org/repositories/home:/mrdocs:/protobuf-rpm/CentOS_CentOS-6/
-gpgcheck=1
-gpgkey=http://download.opensuse.org/repositories/home:/mrdocs:/protobuf-rpm/CentOS_CentOS-6/repodata/repomd.xml.key
-enabled=1

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9873cc2b/bigtop_toolchain/manifests/jdk.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/jdk.pp b/bigtop_toolchain/manifests/jdk.pp
index fef8b56..5bf5678 100644
--- a/bigtop_toolchain/manifests/jdk.pp
+++ b/bigtop_toolchain/manifests/jdk.pp
@@ -15,24 +15,33 @@
 
 class bigtop_toolchain::jdk {
   case $::lsbdistcodename{
-    precise: {
-      package {'python-software-properties':
+    /(precise|trusty|lucid)/: {
+      $apt_add_repo_name = $::lsbdistcodename ? {
+        'trusty'          => 'software-properties-common',
+        default           => 'python-software-properties',
+      }
+
+      package {$apt_add_repo_name:
         ensure => present,
       }
 
-      exec {'/usr/bin/apt-add-repository -y ppa:webupd8team/java':
+      exec {'add_webupd8team_ppa':
+        command => $::lsbdistcodename ? { 
+                      'lucid' => '/usr/bin/apt-add-repository    ppa:webupd8team/java',
+                      default => '/usr/bin/apt-add-repository -y ppa:webupd8team/java'
+                   },
         unless  => '/usr/bin/test -f /etc/apt/sources.list.d/webupd8team-java-precise.list',
-        require => Package['python-software-properties'],
+        require => Package[$apt_add_repo_name],
       }
 
       exec {'/usr/bin/apt-get update':
         refreshonly => true,
-        subscribe   => Exec['/usr/bin/apt-add-repository -y ppa:webupd8team/java'],
-        require     => Exec['/usr/bin/apt-add-repository -y ppa:webupd8team/java'],
+        subscribe   => Exec['add_webupd8team_ppa'],
+        require     => Exec['add_webupd8team_ppa'],
       }
 
       exec {"accept-license1":
-        command     => "echo debconf shared/accepted-oracle-license-v1-1 select true |
sudo debconf-set-selections",
+        command     => "echo debconf shared/accepted-oracle-license-v1-1 select true |
debconf-set-selections",
         path        => ["/bin", "/usr/bin"],
         require     => Exec['/usr/bin/apt-get update'],
         refreshonly => true,
@@ -40,7 +49,7 @@ class bigtop_toolchain::jdk {
       }
 
       exec {"accept-license2":
-        command     => "echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo
debconf-set-selections",
+        command     => "echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections",
         path        => ["/bin", "/usr/bin"],
         require     => Exec["accept-license1"],
         refreshonly => true,

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9873cc2b/bigtop_toolchain/manifests/packages.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/packages.pp b/bigtop_toolchain/manifests/packages.pp
index 533070a..7612de5 100644
--- a/bigtop_toolchain/manifests/packages.pp
+++ b/bigtop_toolchain/manifests/packages.pp
@@ -15,8 +15,8 @@
 
 class bigtop_toolchain::packages {
   case $operatingsystem{
-  centos: { $pkgs = [ "wget", "git", "make" , "cmake" , "rpm-build" , "lzo-devel", "redhat-rpm-config",
"openssl-devel", "asciidoc", "fuse-libs", "fuse-devel", "fuse", "gcc", "gcc-c++", "autoconf",
"automake", "libtool"] }
-  SLES: { $pkgs = [ "wget", "git", "make" , "cmake" , "rpm-devel" , "lzo-devel", "libopenssl-devel",
"asciidoc", "fuse-devel", "fuse", "gcc", "gcc-c++", "autoconf", "automake", "libtool", "pkg-config"]
}
+  /(?i:(centos|fedora))/: { $pkgs = [ "wget", "git", "make" , "cmake" , "rpm-build" , "lzo-devel",
"redhat-rpm-config", "openssl-devel", "asciidoc", "fuse-libs", "fuse-devel", "fuse", "gcc",
"gcc-c++", "autoconf", "automake", "libtool"] }
+  /(?i:(SLES|opensuse))/: { $pkgs = [ "unzip", "wget", "git", "make" , "cmake" , "rpm-devel"
, "lzo-devel", "libopenssl-devel", "asciidoc", "fuse-devel", "fuse", "gcc", "gcc-c++", "autoconf",
"automake", "libtool", "pkg-config"] }
   Ubuntu: { $pkgs = [ "liblzo2-dev", "libzip-dev", "sharutils", "libfuse-dev", "cmake", "pkg-config",
"debhelper", "devscripts", "protobuf-compiler", "build-essential", "dh-make", "reprepro",
"automake", "autoconf", "libfuse2", "libssh-dev", "asciidoc", "libjansi-java" ] }
 }
   package { $pkgs:

http://git-wip-us.apache.org/repos/asf/bigtop/blob/9873cc2b/bigtop_toolchain/manifests/protobuf.pp
----------------------------------------------------------------------
diff --git a/bigtop_toolchain/manifests/protobuf.pp b/bigtop_toolchain/manifests/protobuf.pp
index eba6989..9ddea30 100644
--- a/bigtop_toolchain/manifests/protobuf.pp
+++ b/bigtop_toolchain/manifests/protobuf.pp
@@ -38,18 +38,30 @@ class bigtop_toolchain::protobuf {
       }
 
     }
-    default:{
-      file { '/etc/yum.repos.d/mrdocs-protobuf-rpm.repo':
-        source => 'puppet:///modules/bigtop_toolchain/mrdocs-protobuf-rpm.repo',
-        ensure => present,
-        owner  => root,
-        group  => root,
-        mode   => 755,
+    default: {
+      case $operatingsystem {
+         /(?i:(centos|fedora))/: {
+           yumrepo { "protobuf":
+             baseurl => "http://download.opensuse.org/repositories/home:/mrdocs:/protobuf-rpm/CentOS_CentOS-6/",
+             descr => "Bigtop protobuf repo",
+             enabled => 1,
+             gpgcheck => 0
+           }
+           exec { 'install_mrdocs_repo':
+             command => '/bin/true',
+             require => Yumrepo['protobuf'],
+           }
+         }
+         /(?i:(SLES|opensuse))/:{
+           exec { 'install_mrdocs_repo':
+              command => '/usr/bin/zypper ar http://download.opensuse.org/repositories/home:/mrdocs:/protobuf-rpm/openSUSE_12.3/
protobuf',
+              unless => "/usr/bin/zypper lr | grep -q protobuf",
+           }
+         }
       }
-  
       package { 'protobuf-devel':
         ensure => present,
-        require => File['/etc/yum.repos.d/mrdocs-protobuf-rpm.repo'],
+        require => Exec['install_mrdocs_repo'],
       }
     }
   }


Mime
View raw message