Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Full overhaul with tests

This commit is an almost complete refactor of the previous module. It removes
some of the levers and switches with the repos and instead of using the name of
a mock config to figure out how it is laid out, this uses the parameters of a
mock config to determine its name. The entry point of init.pp now collects some
common params and hands them down to the other manifests if provided.
  • Loading branch information...
commit 40e21201f8c8d3741565d7083b99357156dd208f 1 parent 1ae07ff
@haus haus authored
Showing with 577 additions and 936 deletions.
  1. +2 −1  Rakefile
  2. +25 −3 manifests/init.pp
  3. +20 −0 manifests/mock/create_mock.pp
  4. +0 −31 manifests/mock/pe_config.pp
  5. +16 −0 manifests/mock/pe_mock.pp
  6. +27 −289 manifests/mock/pe_mocks.pp
  7. +8 −0 manifests/mock/pe_mockset.pp
  8. +0 −33 manifests/mock/pl_config.pp
  9. +48 −0 manifests/mock/pl_mocks.pp
  10. +20 −261 manifests/mock/puppetlabs_mocks.pp
  11. +6 −6 manifests/packages/essential.pp
  12. +1 −1  manifests/repos.pp
  13. +4 −5 spec/classes/packages_essential_spec.rb
  14. +1 −1  spec/classes/packages_extra_spec.rb
  15. +33 −35 spec/classes/pe_mocks_spec.rb
  16. +40 −24 spec/classes/puppetlabs_mocks_spec.rb
  17. +48 −9 spec/classes/rpmbuilder_spec.rb
  18. +0 −25 spec/defines/config_spec.rb
  19. +43 −0 spec/defines/create_mock_spec.rb
  20. +43 −0 spec/defines/pe_mock_spec.rb
  21. +16 −0 spec/defines/pe_mockset_spec.rb
  22. +0 −32 spec/defines/pl_config_spec.rb
  23. +48 −0 spec/defines/pl_mocks_spec.rb
  24. +10 −1 spec/spec_helper.rb
  25. +70 −0 templates/mock-config.erb
  26. +48 −0 templates/pe-mock-config.erb
  27. +0 −104 templates/pl-mock-config.erb
  28. +0 −75 templates/pupent-mock-config.erb
View
3  Rakefile
@@ -1,2 +1,3 @@
-require 'rubygems'
+require 'rake'
+require 'rspec/core/rake_task'
require 'puppetlabs_spec_helper/rake_tasks'
View
28 manifests/init.pp
@@ -1,6 +1,28 @@
-class rpmbuilder {
+class rpmbuilder(
+ $fedora_releases = undef,
+ $el_releases = undef,
+ $vendor = undef,
+ $mock_root = undef,
+ $proxy = undef,
+ $pe = false,
+ $pe_vers = undef,
+) {
include rpmbuilder::repos
include rpmbuilder::packages::essential
- include rpmbuilder::packages::extra
- include rpmbuilder::mock::puppetlabs_mocks
+
+ class { rpmbuilder::mock::puppetlabs_mocks:
+ fedora_releases => $fedora_releases,
+ el_releases => $el_releases,
+ vendor => $vendor,
+ proxy => $proxy,
+ mock_root => $mock_root,
+ }
+
+ if $pe {
+ include rpmbuilder::packages::extra
+ class { rpmbuilder::mock::pe_mocks:
+ pe_vers => $pe_vers,
+ mock_root => $mock_root,
+ }
+ }
}
View
20 manifests/mock/create_mock.pp
@@ -0,0 +1,20 @@
+define rpmbuilder::mock::create_mock (
+ $dist = undef,
+ $release = undef,
+ $proxy = false,
+ $vendor = "Puppet User",
+ $arch = undef,
+ $dev = false,
+ $mock_root = "/etc/mock",
+) {
+
+ file { $name:
+ path => "${mock_root}/${name}.cfg",
+ owner => "root",
+ group => "mock",
+ ensure => present,
+ content => template("rpmbuilder/mock-config.erb"),
+ mode => "0644",
+ }
+
+}
View
31 manifests/mock/pe_config.pp
@@ -1,31 +0,0 @@
-define rpmbuilder::mock::pe_config (
- $config,
- $build_root,
- $target_arch,
- $legal_host_arches = "'i386','i586','i686','x86_64'",
- $chroot_setup_cmd = "install bash bzip2 coreutils cpio curl cvs diffutils\
- fedpkg findutils gawk gcc gcc-c++ gnupg grep gzip info make patch redhat-release\
- redhat-release-server redhat-rpm-config rpm-build sed shadow-utils tar unzip\
- util-linux-ng which xz buildsys-macros",
- $dist,
- $ccache_enable = 'False',
- $dist_macro = undef,
- $base_repo_baseurl = undef,
- $base_mirrorlist = undef,
- $updates_repo_baseurl = undef,
- $updates_repo_enabled = '1',
- $updates_mirrorlist = undef,
- $pe_repo_baseurl,
- $extras_repo_baseurl = undef,
- $failover_priority = undef,
-) {
-
- file { "${config}":
- ensure => present,
- mode => '0644',
- owner => 'root',
- group => 'root',
- content => template("rpmbuilder/pupent-mock-config.erb"),
- require => Package['mock'],
- }
-}
View
16 manifests/mock/pe_mock.pp
@@ -0,0 +1,16 @@
+define rpmbuilder::mock::pe_mock(
+ $pe_ver,
+ $dist = "el",
+ $release,
+ $arch,
+ $mock_root = "/etc/mock"
+) {
+ file { $name:
+ path => "${mock_root}/${name}.cfg",
+ owner => "root",
+ group => "mock",
+ ensure => present,
+ content => template("rpmbuilder/pe-mock-config.erb"),
+ mode => "0644",
+ }
+}
View
316 manifests/mock/pe_mocks.pp
@@ -1,299 +1,37 @@
-class rpmbuilder::mock::pe_mocks {
-
- $mock_path = '/etc/mock'
- Package['mock'] -> Rpmbuilder::Mock::Pe_config<| |>
-
- rpmbuilder::mock::pe_config { 'pupent-1.1-el4-i386-cve.cfg':
- config => "${mock_path}/pupent-1.1-el4-i386-cve.cfg",
- build_root => 'pupent-1.1-el4-i386-cve',
- target_arch => 'i386',
- dist => 'el4',
- dist_macro => '.el4',
- base_repo_baseurl => 'http://vault.centos.org/4.9/os/i386',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/1.1/repos/el-4-i386',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-1.1-el4-x86_64-cve.cfg':
- config => "${mock_path}/pupent-1.1-el4-x86_64-cve.cfg",
- build_root => 'pupent-1.1-el4-x86_64-cve',
- target_arch => 'x86_64',
- dist => 'el4',
- dist_macro => '.el4',
- base_repo_baseurl => 'http://vault.centos.org/4.9/os/x86_64/',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/1.1/repos/el-4-x86_64',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-1.1-el5-i386-cve.cfg':
- config => "${mock_path}/pupent-1.1-el5-i386-cve.cfg",
- build_root => 'pupent-1.1-el5-i386-cve',
- target_arch => 'i386',
- dist => 'el5',
- dist_macro => '.el5',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent5latestserver-i386/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/1.1/repos/el-5-i386/',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-1.1-el5-x86_64-cve.cfg':
- config => "${mock_path}/pupent-1.1-el5-x86_64-cve.cfg",
- build_root => 'pupent-1.1-el5-x86_64-cve',
- target_arch => 'x86_64',
- dist => 'el5',
- dist_macro => '.el5',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent5latestserver-x86_64/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/1.1/repos/el-5-x86_64',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-1.1-el6-i386-cve.cfg':
- config => "${mock_path}/pupent-1.1-el6-i386-cve.cfg",
- build_root => 'pupent-1.1-el6-i386-cve',
- target_arch => 'i386',
- dist => 'el6',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent6latestserver-i386/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/1.1/repos/el-6-i386',
- failover_priority => 'base',
- }
- rpmbuilder::mock::pe_config { 'pupent-1.1-el6-x86_64-cve.cfg':
- config => "${mock_path}/pupent-1.1-el6-x86_64-cve.cfg",
- build_root => 'pupent-1.1-el6-x86_64-cve',
- target_arch => 'x86_64',
- dist => 'el6',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent6latestserver-x86_64/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/1.1/repos/el-6-x86_64',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-1.2-el4-i386-cve.cfg':
- config => "${mock_path}/pupent-1.2-el4-i386-cve.cfg",
- build_root => 'pupent-1.2-el4-i386-cve',
- target_arch => 'i386',
- dist => 'el4',
- dist_macro => '.el4',
- base_repo_baseurl => 'http://vault.centos.org/4.9/os/i386',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/1.2/repos/el-4-i386',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-1.2-el4-x86_64-cve.cfg':
- config => "${mock_path}/pupent-1.2-el4-x86_64-cve.cfg",
- build_root => 'pupent-1.2-el4-x86_64-cve',
- target_arch => 'x86_64',
- dist => 'el4',
- dist_macro => '.el4',
- base_repo_baseurl => 'http://vault.centos.org/4.9/os/x86_64/',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/1.2/repos/el-4-x86_64',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-1.2-el5-i386-cve.cfg':
- config => "${mock_path}/pupent-1.2-el5-i386-cve.cfg",
- build_root => 'pupent-1.2-el5-i386-cve',
- target_arch => 'i386',
- dist => 'el5',
- dist_macro => '.el5',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent5latestserver-i386/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/1.2/repos/el-5-i386/',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-1.2-el5-x86_64-cve.cfg':
- config => "${mock_path}/pupent-1.2-el5-x86_64-cve.cfg",
- build_root => 'pupent-1.2-el5-x86_64-cve',
- target_arch => 'x86_64',
- dist => 'el5',
- dist_macro => '.el5',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent5latestserver-x86_64/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/1.2/repos/el-5-x86_64',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-1.2-el6-i386-cve.cfg':
- config => "${mock_path}/pupent-1.2-el6-i386-cve.cfg",
- build_root => 'pupent-1.2-el6-i386-cve',
- target_arch => 'i386',
- dist => 'el6',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent6latestserver-i386/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/1.2/repos/el-6-i386',
- failover_priority => 'base',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-1.2-el6-x86_64-cve.cfg':
- config => "${mock_path}/pupent-1.2-el6-x86_64-cve.cfg",
- build_root => 'pupent-1.2-el6-x86_64-cve',
- target_arch => 'x86_64',
- dist => 'el6',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent6latestserver-x86_64/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/1.2/repos/el-6-x86_64',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-2.0-el4-i386-cve.cfg':
- config => "${mock_path}/pupent-2.0-el4-i386-cve.cfg",
- build_root => 'pupent-2.0-el4-i386-cve',
- target_arch => 'i386',
- dist => 'el4',
- dist_macro => '.el4',
- base_repo_baseurl => 'http://vault.centos.org/4.9/os/i386',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.0/repos/el-4-i386',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-2.0-el4-x86_64-cve.cfg':
- config => "${mock_path}/pupent-2.0-el4-x86_64-cve.cfg",
- build_root => 'pupent-2.0-el4-x86_64-cve',
- target_arch => 'x86_64',
- dist => 'el4',
- dist_macro => '.el4',
- base_repo_baseurl => 'http://vault.centos.org/4.9/os/x86_64/',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.0/repos/el-4-x86_64',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-2.0-el5-i386-cve.cfg':
- config => "${mock_path}/pupent-2.0-el5-i386-cve.cfg",
- build_root => 'pupent-2.0-el5-i386-cve',
- target_arch => 'i386',
- dist => 'el5',
- dist_macro => '.el5',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent5latestserver-i386/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.0/repos/el-5-i386/',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-2.0-el5-x86_64-cve.cfg':
- config => "${mock_path}/pupent-2.0-el5-x86_64-cve.cfg",
- build_root => 'pupent-2.0-el5-x86_64-cve',
- target_arch => 'x86_64',
- dist => 'el5',
- dist_macro => '.el5',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent5latestserver-x86_64/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.0/repos/el-5-x86_64',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-2.0-el6-i386-cve.cfg':
- config => "${mock_path}/pupent-2.0-el6-i386-cve.cfg",
- build_root => 'pupent-2.0-el6-i386-cve',
- target_arch => 'i386',
- dist => 'el6',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent6latestserver-i386/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.0/repos/el-6-i386',
- failover_priority => 'base',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-2.0-el6-x86_64-cve.cfg':
- config => "${mock_path}/pupent-2.0-el6-x86_64-cve.cfg",
- build_root => 'pupent-2.0-el6-x86_64-cve',
- target_arch => 'x86_64',
- dist => 'el6',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent6latestserver-x86_64/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.0/repos/el-6-x86_64',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-el4-i386.cfg':
- config => "${mock_path}/pupent-el4-i386.cfg",
- build_root => 'pupent-el4-i386',
- target_arch => 'i386',
- dist => 'el4',
- base_repo_baseurl => 'http://vault.centos.org/4.9/os/i386',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.0/repos/el-4-i386',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-el4-x86_64.cfg':
- config => "${mock_path}/pupent-el4-x86_64.cfg",
- build_root => 'pupent-el4-x86_64',
- target_arch => 'x86_64',
- dist => 'el4',
- base_repo_baseurl => 'http://vault.centos.org/4.9/os/x86_64/',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.0/repos/el-4-x86_64',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-el5-i386.cfg':
- config => "${mock_path}/pupent-el5-i386.cfg",
- build_root => 'pupent-el5-i386',
- target_arch => 'i386',
- dist => 'el5',
- dist_macro => '.el5',
- base_repo_baseurl => 'http://mirrors.cat.pdx.edu/centos/5/os/i386/',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.5/repos/el-5-i386/',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-el5-x86_64.cfg':
- config => "${mock_path}/pupent-el5-x86_64.cfg",
- build_root => 'pupent-el5-x86_64',
- target_arch => 'x86_64',
- dist => 'el5',
- dist_macro => '.el5',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent5latestserver-x86_64/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.5/repos/el-5-x86_64',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-el6-i386.cfg':
- config => "${mock_path}/pupent-el6-i386.cfg",
- build_root => 'pupent-el6-i386',
- target_arch => 'i386',
- dist => 'el6',
- base_repo_baseurl => 'http://mirrors.cat.pdx.edu/centos/6/os/i386/',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.5/repos/el-6-i386',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-el6-x86_64.cfg':
- config => "${mock_path}/pupent-el6-x86_64.cfg",
- build_root => 'pupent-el6-x86_64',
- target_arch => 'x86_64',
- dist => 'el6',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent6latestserver-x86_64/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.5/repos/el-6-x86_64',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-extras-el5-i386.cfg':
- config => "${mock_path}/pupent-extras-el5-i386.cfg",
- build_root => 'pupent-extras-el5-i386',
- target_arch => 'i386',
- dist => 'el5',
- dist_macro => '.el5',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent5latestserver-i386/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.5/repos/el-5-i386/',
- extras_repo_baseurl => 'http://neptune.puppetlabs.lan/2.5/repos/yum-enterprise/el/5/extras/i386',
- }
-
- rpmbuilder::mock::pe_config { 'pupent-extras-el5-x86_64.cfg':
- config => "${mock_path}/pupent-extras-el5-x86_64.cfg",
- build_root => 'pupent-extras-el5-x86_64',
- target_arch => 'x86_64',
- dist => 'el5',
- dist_macro => '.el5',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent5latestserver-x86_64/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.5/repos/el-5-x86_64',
- extras_repo_baseurl => 'http://neptune.puppetlabs.lan/2.5/repos/yum-enterprise/el/5/extras/x86_64',
+class rpmbuilder::mock::pe_mocks(
+ $pe_vers = ["1.2","2.0","2.5","2.6","2.7"],
+ $mock_root = '/etc/mock'
+) {
+ # Default PE mocks for PE 1.2 through 2.7
+ rpmbuilder::mock::pe_mockset { $pe_vers:
+ mock_root => $mock_root,
}
- rpmbuilder::mock::pe_config { 'pupent-extras-el6-i386.cfg':
- config => "${mock_path}/pupent-extras-el6-i386.cfg",
- build_root => 'pupent-extras-el6-i386',
- target_arch => 'i386',
- dist => 'el6',
- base_mirrorlist => 'http://mirrorlist.centos.org/?release=6&arch=i386&repo=os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.5/repos/el-6-i386',
- extras_repo_baseurl => 'http://neptune.puppetlabs.lan/2.5/repos/yum-enterprise/el/6/extras/i386',
+ rpmbuilder::mock::pe_mock { 'pupent-extras-el5-i386':
+ pe_ver => "2.5",
+ release => "5",
+ arch => "i386",
+ mock_root => $mock_root,
}
- rpmbuilder::mock::pe_config { 'pupent-extras-el6-x86_64.cfg':
- config => "${mock_path}/pupent-extras-el6-x86_64.cfg",
- build_root => 'pupent-extras-el6-x86_64',
- target_arch => 'x86_64',
- dist => 'el6',
- base_repo_baseurl => 'http://yo.puppetlabs.lan/cent6latestserver-x86_64/RPMS.os',
- pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.5/repos/el-6-x86_64',
- extras_repo_baseurl => 'http://neptune.puppetlabs.lan/2.5/repos/yum-enterprise/el/6/extras/x86_64',
+ rpmbuilder::mock::pe_mock { 'pupent-extras-el5-x86_64':
+ pe_ver => "2.5",
+ release => "5",
+ arch => "x86_64",
+ mock_root => $mock_root,
}
- rpmbuilder::mock::pe_config { 'pupent-fc15-i386.cfg':
- config => "${mock_path}/pupent-fc15-i386.cfg",
- build_root => 'pupent-fc15-i386',
- target_arch => 'i386',
- legal_host_arches => 'i386',
- dist => 'fc15',
- base_repo_baseurl => 'http://localhost/os/fc/15/i386',
- pe_repo_baseurl => 'file:///tmp/output/pe/fc/15/i386',
+ rpmbuilder::mock::pe_mock { 'pupent-extras-el6-i386':
+ pe_ver => "2.5",
+ release => "6",
+ arch => "i386",
+ mock_root => $mock_root,
}
- rpmbuilder::mock::pe_config { 'pupent-fc15-x86_64.cfg':
- config => "${mock_path}/pupent-fc15-x86_64.cfg",
- build_root => 'pupent-fc15-x86_64',
- target_arch => 'x86_64',
- legal_host_arches => 'x86_64',
- dist => 'fc15',
- base_repo_baseurl => 'http://localhost/os/fc/15/x86_64',
- pe_repo_baseurl => 'file:///tmp/output/pe/fc/15/x86_64',
+ rpmbuilder::mock::pe_mock { 'pupent-extras-el6-x86_64':
+ pe_ver => "2.5",
+ release => "6",
+ arch => "x86_64",
+ mock_root => $mock_root,
}
}
View
8 manifests/mock/pe_mockset.pp
@@ -0,0 +1,8 @@
+define rpmbuilder::mock::pe_mockset(
+ mock_root = "/etc/mock",
+) {
+ rpmbuilder::mock::pe_mock { "pupent-${name}-el5-i386": pe_ver => $name, release => '5', arch => 'i386', mock_root => $mock_root, }
+ rpmbuilder::mock::pe_mock { "pupent-${name}-el5-x86_64": pe_ver => $name, release => '5', arch => 'x86_64', mock_root => $mock_root, }
+ rpmbuilder::mock::pe_mock { "pupent-${name}-el6-i386": pe_ver => $name, release => '6', arch => 'i386', mock_root => $mock_root, }
+ rpmbuilder::mock::pe_mock { "pupent-${name}-el6-x86_64": pe_ver => $name, release => '6', arch => 'x86_64', mock_root => $mock_root, }
+}
View
33 manifests/mock/pl_config.pp
@@ -1,33 +0,0 @@
-define rpmbuilder::mock::pl_config (
- $config,
- $build_root,
- $target_arch,
- $legal_host_arches = "'i386','i586','i686','x86_64'",
- $chroot_setup_cmd = "groupinstall buildsys-build",
- $dist,
- $dist_macro = undef,
- $base_repo_baseurl = undef,
- $base_mirrorlist = undef,
- $base_debug_mirrorlist = undef,
- $updates_repo_baseurl = undef,
- $updates_mirrorlist = undef,
- $updates_debug_mirrorlist = undef,
- $updates_repo_enabled = '1',
- $debug_mirrorlist = undef,
- $puppet_prod_baseurl = undef,
- $puppet_deps_baseurl = undef,
- $puppet_dev_baseurl = undef,
- $epel_repo_mirrorlist = undef,
- $failover_priority = undef,
- $is_vendor_puppetlabs = undef,
-) {
-
- file { "${config}":
- ensure => present,
- mode => '0644',
- owner => 'root',
- group => 'root',
- content => template("rpmbuilder/pl-mock-config.erb"),
- require => Package['mock'],
- }
-}
View
48 manifests/mock/pl_mocks.pp
@@ -0,0 +1,48 @@
+define rpmbuilder::mock::pl_mocks (
+ $dist = undef,
+ $vendor = "Puppet User",
+ $proxy = undef,
+ $mock_root = undef,
+) {
+
+ rpmbuilder::mock::create_mock { "pl-${dist}-${name}-i386":
+ dist => $dist,
+ release => $name,
+ proxy => $proxy,
+ vendor => $vendor,
+ arch => "i386",
+ dev => false,
+ mock_root => $mock_root,
+ }
+
+ rpmbuilder::mock::create_mock { "pl-${dist}-${name}-x86_64":
+ dist => $dist,
+ release => $name,
+ proxy => $proxy,
+ vendor => $vendor,
+ arch => "x86_64",
+ dev => false,
+ mock_root => $mock_root,
+ }
+
+ rpmbuilder::mock::create_mock { "pl-${dist}-${name}-i386-dev":
+ dist => $dist,
+ release => $name,
+ proxy => $proxy,
+ vendor => $vendor,
+ arch => "i386",
+ dev => true,
+ mock_root => $mock_root,
+ }
+
+ rpmbuilder::mock::create_mock { "pl-${dist}-${name}-x86_64-dev":
+ dist => $dist,
+ release => $name,
+ proxy => $proxy,
+ vendor => $vendor,
+ arch => "x86_64",
+ dev => true,
+ mock_root => $mock_root,
+ }
+
+}
View
281 manifests/mock/puppetlabs_mocks.pp
@@ -1,263 +1,22 @@
-class rpmbuilder::mock::puppetlabs_mocks {
-
- $mock_path = '/etc/mock'
-
- Package['mock'] -> Rpmbuilder::Mock::Pl_config<| |>
-
- rpmbuilder::mock::pl_config { 'pl-5-i386.cfg':
- config => "${mock_path}/pl-5-i386.cfg",
- build_root => 'pl-5-i386',
- target_arch => 'i386',
- dist => 'el5',
- dist_macro => '.el5',
- base_mirrorlist => 'http://mirrorlist.centos.org/?release=5&arch=i386&repo=os',
- updates_mirrorlist => 'http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/el/5/products/i386',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/el/5/dependencies/i386',
- epel_repo_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=i386',
- failover_priority => 'base',
- }
-
- rpmbuilder::mock::pl_config { 'pl-5-i386-dev.cfg':
- config => "${mock_path}/pl-5-i386-dev.cfg",
- build_root => 'pl-5-i386-dev',
- target_arch => 'i386',
- dist => 'el5',
- dist_macro => '.el5',
- base_mirrorlist => 'http://mirrorlist.centos.org/?release=5&arch=i386&repo=os',
- updates_mirrorlist => 'http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/el/5/products/i386',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/el/5/dependencies/i386',
- epel_repo_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=i386',
- failover_priority => 'base',
- }
-
- rpmbuilder::mock::pl_config { 'pl-5-x86_64.cfg':
- config => "${mock_path}/pl-5-x86_64.cfg",
- build_root => 'pl-5-x86_64',
- target_arch => 'x86_64',
- dist => 'el5',
- dist_macro => '.el5',
- base_mirrorlist => 'http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os',
- updates_mirrorlist => 'http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=updates',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/el/5/products/x86_64',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/el/5/dependencies/x86_64',
- epel_repo_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=x86_64',
- failover_priority => 'base',
- }
-
- rpmbuilder::mock::pl_config { 'pl-5-x86_64-dev.cfg':
- config => "${mock_path}/pl-5-x86_64-dev.cfg",
- build_root => 'pl-5-x86_64-dev',
- target_arch => 'x86_64',
- dist => 'el5',
- dist_macro => '.el5',
- base_mirrorlist => 'http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os',
- updates_mirrorlist => 'http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=updates',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/el/5/products/x86_64/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/el/5/dependencies/x86_64/',
- puppet_dev_baseurl => 'http://yum.puppetlabs.com/el/5/devel/x86_64/',
- epel_repo_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=x86_64',
- failover_priority => 'base',
- }
-
- rpmbuilder::mock::pl_config { 'pl-6-i386.cfg':
- config => "${mock_path}/pl-6-i386.cfg",
- build_root => 'pl-6-i386',
- target_arch => 'i386',
- dist => 'el6',
- base_mirrorlist => 'http://mirrorlist.centos.org/?release=6&arch=i386&repo=os',
- updates_mirrorlist => 'http://mirrorlist.centos.org/?release=6&arch=i386&repo=updates',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/el/6/products/i386',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/el/6/dependencies/i386',
- epel_repo_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=i386',
- failover_priority => 'base',
- }
-
- rpmbuilder::mock::pl_config { 'pl-6-i386-dev.cfg':
- config => "${mock_path}/pl-6-i386-dev.cfg",
- build_root => 'pl-6-i386-dev',
- target_arch => 'i386',
- dist => 'el6',
- base_mirrorlist => 'http://mirrorlist.centos.org/?release=6&arch=i386&repo=os',
- updates_mirrorlist => 'http://mirrorlist.centos.org/?release=6&arch=i386&repo=updates',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/el/6/products/i386',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/el/6/dependencies/i386',
- epel_repo_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=i386',
- failover_priority => 'base',
- }
-
- rpmbuilder::mock::pl_config { 'pl-6-x86_64.cfg':
- config => "${mock_path}/pl-6-x86_64.cfg",
- build_root => 'pl-6-x86_64',
- target_arch => 'x86_64',
- dist => 'el6',
- base_mirrorlist => 'http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os',
- updates_mirrorlist => 'http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/el/6/products/x86_64',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/el/6/dependencies/x86_64',
- epel_repo_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=x86_64',
- failover_priority => 'base',
- }
-
- rpmbuilder::mock::pl_config { 'pl-6-x86_64-dev.cfg':
- config => "${mock_path}/pl-6-x86_64-dev.cfg",
- build_root => 'pl-6-x86_64-dev',
- target_arch => 'x86_64',
- dist => 'el6',
- base_mirrorlist => 'http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=os',
- updates_mirrorlist => 'http://mirrorlist.centos.org/?release=6&arch=x86_64&repo=updates',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/el/6/products/x86_64/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/el/6/dependencies/x86_64/',
- puppet_dev_baseurl => 'http://yum.puppetlabs.com/el/6/devel/x86_64/',
- epel_repo_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-6&arch=x86_64',
- failover_priority => 'base',
- }
-
- rpmbuilder::mock::pl_config { 'pl-fc15-i386.cfg':
- config => "${mock_path}/pl-fc15-i386.cfg",
- build_root => 'pl-fc15-i386',
- target_arch => 'i686',
- dist => 'fc15',
- base_repo_baseurl => 'http://mirrors.cat.pdx.edu/fedora/linux/releases/15/Fedora/i386/os/',
- updates_repo_baseurl => 'http://mirrors.cat.pdx.edu/fedora/linux/updates/15/i386',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/fedora/f15/products/i386/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/fedora/f15/dependencies/i386/',
- }
-
- rpmbuilder::mock::pl_config { 'pl-fc15-i386-dev.cfg':
- config => "${mock_path}/pl-fc15-i386-dev.cfg",
- build_root => 'pl-fc15-i386-dev',
- target_arch => 'i686',
- dist => 'fc15',
- base_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-15&arch=i386',
- updates_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f15&arch=i386',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/fedora/f15/products/i386/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/fedora/f15/dependencies/i386/',
- puppet_dev_baseurl => 'http://yum.puppetlabs.com/fedora/f15/devel/i386/',
- }
-
- rpmbuilder::mock::pl_config { 'pl-fc15-x86_64.cfg':
- config => "${mock_path}/pl-fc15-x86_64.cfg",
- build_root => 'pl-fc15-x86_64',
- target_arch => 'x86_64',
- dist => 'fc15',
- base_repo_baseurl => 'http://mirrors.cat.pdx.edu/fedora/linux/releases/15/Fedora/x86_64/os/',
- updates_repo_baseurl => 'http://mirrors.cat.pdx.edu/fedora/linux/updates/15/x86_64',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/fedora/f15/products/x86_64/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/fedora/f15/dependencies/x86_64/',
- }
-
- rpmbuilder::mock::pl_config { 'pl-fc15-x86_64-dev.cfg':
- config => "${mock_path}/pl-fc15-x86_64-dev.cfg",
- build_root => 'pl-fc15-x86_64-dev',
- target_arch => 'x86_64',
- dist => 'fc15',
- base_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-15&arch=x86_64',
- updates_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f15&arch=x86_64',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/fedora/f15/products/x86_64/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/fedora/f15/dependencies/x86_64/',
- puppet_dev_baseurl => 'http://yum.puppetlabs.com/fedora/f15/devel/x86_64/',
- }
-
- rpmbuilder::mock::pl_config { 'pl-fc16-i386.cfg':
- config => "${mock_path}/pl-fc16-i386.cfg",
- build_root => 'pl-fc16-i386',
- target_arch => 'i386',
- dist => 'fc16',
- base_repo_baseurl => 'http://mirrors.cat.pdx.edu/fedora/linux/releases/16/Fedora/i386/os/',
- updates_repo_baseurl => 'http://mirrors.cat.pdx.edu/fedora/linux/updates/16/i386',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/fedora/f16/products/i386/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/fedora/f16/dependencies/i386/',
- }
-
- rpmbuilder::mock::pl_config { 'pl-fc16-i386-dev.cfg':
- config => "${mock_path}/pl-fc16-i386-dev.cfg",
- build_root => 'pl-fc16-i386-dev',
- target_arch => 'x86_64',
- dist => 'i686',
- base_repo_baseurl => 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-16&arch=i386',
- updates_repo_baseurl => 'http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f16&arch=i386',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/fedora/f16/products/i386/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/fedora/f16/dependencies/i386/',
- puppet_dev_baseurl => 'http://yum.puppetlabs.com/fedora/f16/devel/i386/',
- }
-
- rpmbuilder::mock::pl_config { 'pl-fc16-x86_64.cfg':
- config => "${mock_path}/pl-fc16-x86_64.cfg",
- build_root => 'pl-fc16-x86_64',
- target_arch => 'x86_64',
- dist => 'fc16',
- base_repo_baseurl => 'http://mirrors.cat.pdx.edu/fedora/linux/releases/16/Fedora/x86_64/os/',
- updates_repo_baseurl => 'http://mirrors.cat.pdx.edu/fedora/linux/updates/16/x86_64',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/fedora/f16/products/x86_64/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/fedora/f16/dependencies/x86_64/',
- }
-
- rpmbuilder::mock::pl_config { 'pl-fc16-x86_64-dev.cfg':
- config => "${mock_path}/pl-fc16-x86_64-dev.cfg",
- build_root => 'pl-fc17-x86_64',
- target_arch => 'x86_64',
- dist => 'fc16',
- base_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-16&arch=x86_64',
- updates_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f16&arch=x86_64',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/fedora/f16/products/x86_64/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/fedora/f16/dependencies/x86_64/',
- puppet_dev_baseurl => 'http://yum.puppetlabs.com/fedora/f16/devel/x86_64/',
- }
-
- rpmbuilder::mock::pl_config { 'pl-fc17-i386.cfg':
- config => "${mock_path}/pl-fc17-i386.cfg",
- build_root => 'pl-fc17-i386',
- target_arch => 'i686',
- dist => 'fc17',
- base_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-17&arch=i386',
- base_debug_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-17&arch=i386',
- updates_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f17&arch=i386',
- updates_debug_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f17&arch=i386',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/fedora/f17/products/i386/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/fedora/f17/dependencies/i386/',
- }
-
- rpmbuilder::mock::pl_config { 'pl-fc17-i386-dev.cfg':
- config => "${mock_path}/pl-fc17-i386-dev.cfg",
- build_root => 'pl-fc17-i386-dev',
- target_arch => 'i686',
- dist => 'fc17',
- base_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-17&arch=i386',
- base_debug_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-17&arch=i386',
- updates_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f17&arch=i386',
- updates_debug_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f17&arch=i386',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/fedora/f17/products/i386/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/fedora/f17/dependencies/i386/',
- puppet_dev_baseurl => 'http://yum.puppetlabs.com/fedora/f17/devel/i386/',
- }
-
- rpmbuilder::mock::pl_config { 'pl-fc17-x86_64.cfg':
- config => "${mock_path}/pl-fc17-x86_64.cfg",
- build_root => 'pl-fc-17-x86_64',
- target_arch => 'x86_64',
- dist => 'fc17',
- base_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-17&arch=x86_64',
- base_debug_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-17&arch=x86_64',
- updates_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f17&arch=x86_64',
- updates_debug_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f17&arch=x86_64',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/fedora/f17/products/x86_64/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/fedora/f17/dependencies/x86_64/',
- }
-
- rpmbuilder::mock::pl_config { 'pl-fc17-x86_64-dev.cfg':
- config => "${mock_path}/pl-fc17-x86_64-dev.cfg",
- build_root => 'pl-fc17-x86_64-dev',
- target_arch => 'x86_64',
- dist => 'fc17',
- base_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-17&arch=x86_64',
- base_debug_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-debug-17&arch=i386',
- updates_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f17&arch=x86_64',
- updates_debug_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-debug-f17&arch=i386',
- puppet_prod_baseurl => 'http://yum.puppetlabs.com/fedora/f17/products/x86_64/',
- puppet_deps_baseurl => 'http://yum.puppetlabs.com/fedora/f17/dependencies/x86_64/',
- puppet_dev_baseurl => 'http://yum.puppetlabs.com/fedora/f17/devel/x86_64/',
+class rpmbuilder::mock::puppetlabs_mocks (
+ $fedora_releases = ["15","16","17"],
+ $el_releases = ["5","6"],
+ $vendor = undef,
+ $proxy = undef,
+ $mock_root = undef,
+) {
+
+ rpmbuilder::mock::pl_mocks { $fedora_releases:
+ dist => "fedora",
+ vendor => $vendor,
+ proxy => $proxy,
+ mock_root => $mock_root,
+ }
+
+ rpmbuilder::mock::pl_mocks { $el_releases:
+ dist => "el",
+ vendor => $vendor,
+ proxy => $proxy,
+ mock_root => $mock_root,
}
}
-
View
12 manifests/packages/essential.pp
@@ -1,4 +1,7 @@
class rpmbuilder::packages::essential {
+ Package {
+ require => Class['rpmbuilder::repos']
+ }
$builder_pkgs = [
'autoconf',
@@ -6,7 +9,7 @@
'createrepo',
'fedora-packager',
'gcc',
- 'gnupg',
+ 'gnupg2',
'make',
'mock',
'rpmdevtools',
@@ -20,14 +23,11 @@
package { $builder_pkgs:
ensure => installed,
- require => Class['rpmbuilder::repos'],
}
+
case $operatingsystem {
- /(CentOS|RedHat)/: { }
'Fedora': {
- package { 'rpm-sign': ensure => installed }
- package { 'keychain': ensure => installed }
+ package { 'rpm-sign': ensure => installed }
}
}
}
-
View
2  manifests/repos.pp
@@ -18,7 +18,7 @@
if $::osfamily == 'RedHat' and $::operatingsystem != 'Fedora' {
include epel
- }
+ }
yumrepo { 'puppetlabs-products':
baseurl => "http://yum.puppetlabs.com/${baseurlOS}/${os_version}/products/${::architecture}",
View
9 spec/classes/packages_essential_spec.rb
@@ -10,7 +10,7 @@
'createrepo',
'fedora-packager',
'gcc',
- 'gnupg',
+ 'gnupg2',
'make',
'mock',
'rpmdevtools',
@@ -22,9 +22,8 @@
'yum-utils',]
packages.each do|pkg|
- it { should contain_package("#{pkg}").with_ensure('installed') }
+ it { should contain_package(pkg).with_ensure('installed') }
end
-
end
context "On a Fedora OS" do
@@ -32,10 +31,10 @@
packages = [
'rpm-sign',
- 'keychain',]
+ ]
packages.each do|pkg|
- it { should contain_package("#{pkg}").with_ensure('installed') }
+ it { should contain_package(pkg).with_ensure('installed') }
end
end
end
View
2  spec/classes/packages_extra_spec.rb
@@ -12,7 +12,7 @@
]
packages.each do|pkg|
- it { should contain_package("#{pkg}").with_ensure('installed').with_require('Class[Rpmbuilder::Repos]') }
+ it { should contain_package(pkg).with_ensure('installed').with_require('Class[Rpmbuilder::Repos]') }
end
end
end
View
68 spec/classes/pe_mocks_spec.rb
@@ -2,43 +2,41 @@
describe 'rpmbuilder::mock::pe_mocks', :type => 'class' do
- context 'Each Puppet Labs Enterprise mock configuration file should be present' do
+ [{
+ :pe_vers => ["1.2","2.0","2.5","2.6","2.7"],
+ :mock_root => "/etc/mock",
+ },
+ {
+ :pe_vers => ["2.8","2.9"],
+ :mock_root => "/opt/mock",
+ }].each do |param_set|
+ describe "when #{param_set[:mock_root] == "/etc/mock" ? "using default params" : "specifying parameters"}" do
+ context 'Each Puppet Labs Enterprise mock configuration file should be present' do
- configs = [
- 'pupent-1.1-el4-i386-cve.cfg',
- 'pupent-1.1-el4-x86_64-cve.cfg',
- 'pupent-1.1-el5-i386-cve.cfg',
- 'pupent-1.1-el5-x86_64-cve.cfg',
- 'pupent-1.1-el6-i386-cve.cfg',
- 'pupent-1.1-el6-x86_64-cve.cfg',
- 'pupent-1.2-el4-i386-cve.cfg',
- 'pupent-1.2-el4-x86_64-cve.cfg',
- 'pupent-1.2-el5-i386-cve.cfg',
- 'pupent-1.2-el5-x86_64-cve.cfg',
- 'pupent-1.2-el6-i386-cve.cfg',
- 'pupent-1.2-el6-x86_64-cve.cfg',
- 'pupent-2.0-el4-i386-cve.cfg',
- 'pupent-2.0-el4-x86_64-cve.cfg',
- 'pupent-2.0-el5-i386-cve.cfg',
- 'pupent-2.0-el5-x86_64-cve.cfg',
- 'pupent-2.0-el6-i386-cve.cfg',
- 'pupent-2.0-el6-x86_64-cve.cfg',
- 'pupent-el4-i386.cfg',
- 'pupent-el4-x86_64.cfg',
- 'pupent-el5-i386.cfg',
- 'pupent-el5-x86_64.cfg',
- 'pupent-el6-i386.cfg',
- 'pupent-el6-x86_64.cfg',
- 'pupent-extras-el5-i386.cfg',
- 'pupent-extras-el5-x86_64.cfg',
- 'pupent-extras-el6-i386.cfg',
- 'pupent-extras-el6-x86_64.cfg',
- 'pupent-fc15-i386.cfg',
- 'pupent-fc15-x86_64.cfg'
- ]
+ let(:params) do
+ param_set
+ end
- configs.each do|config|
- it { should contain_Rpmbuilder__mock__Pe_config("#{config}") }
+ param_set[:pe_vers].each do | pe_mock |
+ it do should contain_Rpmbuilder__mock__pe_mockset(pe_mock).with({
+ :mock_root => param_set[:mock_root],
+ })
+ end
+ end
+
+ [5,6].each do |rel|
+ ["i386","x86_64"].each do |arch|
+ describe "Should have an extras config for el#{rel.to_s}-#{arch}" do
+ it { should contain_Rpmbuilder__mock__Pe_Mock("pupent-extras-el#{rel.to_s}-#{arch}").with({
+ :pe_ver => "2.5",
+ :arch => arch,
+ :release => rel.to_s,
+ :mock_root => param_set[:mock_root],
+ })}
+ end
+ end
+ end
+ end
end
end
end
View
64 spec/classes/puppetlabs_mocks_spec.rb
@@ -1,33 +1,49 @@
require 'spec_helper'
describe 'rpmbuilder::mock::puppetlabs_mocks', :type => 'class' do
+ [{},
+ { :vendor => "Puppet Labs" },
+ { :proxy => "http://proxy.puppetlabs.com:1234" },
+ { :fedora_releases => ["18"] },
+ { :el_releases => ["7"] },
+ ].each do |param_set|
+ describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do
+ default_params = {
+ :vendor => "Puppet User",
+ :proxy => nil,
+ :fedora_releases => ["15","16","17"],
+ :el_releases => ["5","6"],
+ }
- context 'Each Puppet Labs mock configuration file should be present' do
+ param_hash = default_params.merge(param_set)
- configs = [
- 'pl-5-i386.cfg',
- 'pl-5-i386-dev.cfg',
- 'pl-5-x86_64.cfg',
- 'pl-5-x86_64-dev.cfg',
- 'pl-6-i386.cfg',
- 'pl-6-i386-dev.cfg',
- 'pl-6-x86_64.cfg',
- 'pl-6-x86_64-dev.cfg',
- 'pl-fc15-i386.cfg',
- 'pl-fc15-x86_64.cfg',
- 'pl-fc15-x86_64-dev.cfg',
- 'pl-fc16-i386.cfg',
- 'pl-fc16-i386-dev.cfg',
- 'pl-fc16-x86_64.cfg',
- 'pl-fc17-i386.cfg',
- 'pl-fc17-i386-dev.cfg',
- 'pl-fc17-x86_64.cfg',
- 'pl-fc17-x86_64-dev.cfg'
- ]
+ let :params do
+ param_set
+ end
- configs.each do|config|
- it { should contain_Rpmbuilder__Mock__Pl_config("#{config}") }
+ context 'Each Puppet Labs mock configuration file should be present' do
+ param_hash[:fedora_releases].each do |fedora|
+ it do
+ should contain_Rpmbuilder__Mock__Pl_mocks(fedora).with(
+ {
+ :vendor => param_hash[:vendor],
+ :proxy => param_hash[:proxy],
+ :dist => "fedora",
+ })
+ end
+ end
+
+ param_hash[:el_releases].each do |el|
+ it do
+ should contain_Rpmbuilder__Mock__Pl_mocks(el).with(
+ {
+ :vendor => param_hash[:vendor],
+ :proxy => param_hash[:proxy],
+ :dist => "el",
+ })
+ end
+ end
+ end
end
end
end
-
View
57 spec/classes/rpmbuilder_spec.rb
@@ -1,19 +1,58 @@
require 'spec_helper'
describe 'rpmbuilder', :type => 'class' do
+ let(:default_params) do
+ {
+ :fedora_releases => nil,
+ :el_releases => nil,
+ :vendor => nil,
+ :mock_root => nil,
+ :proxy => nil,
+ :pe => false,
+ :pe_vers => nil,
+ }
+ end
- context "The minimum components that should be included" do
+ [{},
+ {
+ :fedora_releases => ["15","16","17"],
+ :el_releases => ["5","6"],
+ :vendor => "Puppet Labs",
+ :mock_root => "/usr/mock",
+ :proxy => "http://proxy.puppetlabs.com:1234",
+ :pe => true,
+ :pe_vers => ["1.2","lance"],
+ }].each do |param_set|
+ let(:param_hash) do
+ default_params.merge(param_set)
+ end
- it { should include_class("rpmbuilder::repos") }
- it { should include_class("rpmbuilder::packages::essential") }
+ let(:params) do
+ param_set
+ end
- end
+ describe "Using #{param_set == {} ? "default params" : "specifying params"}" do
+ it { should contain_Rpmbuilder__Repos }
+ it { should contain_Rpmbuilder__Packages__Essential }
- context "Extra components that may be included" do
+ it { should contain_Rpmbuilder__Mock__Puppetlabs_Mocks.with({
+ :fedora_releases => param_hash[:fedora_releases],
+ :el_releases => param_hash[:el_releases],
+ :vendor => param_hash[:vendor],
+ :mock_root => param_hash[:mock_root],
+ :proxy => param_hash[:proxy],
+ })
+ }
- let(:pre_condition) { 'class rpmbuilder::packages::extra {}' }
- let(:pre_condition) { 'class mock::puppetlabs_mocks {}' }
- it { should include_class("rpmbuilder::packages::extra") }
- it { should include_class("rpmbuilder::mock::puppetlabs_mocks") }
+ it do
+ if param_hash[:pe]
+ should contain_Rpmbuilder__Packages__Extra
+ should contain_Rpmbuilder__Mock__Pe_mocks.with({
+ :pe_vers => param_hash[:pe_vers],
+ :mock_root => param_hash[:mock_root],
+ })
+ end
+ end
+ end
end
end
View
25 spec/defines/config_spec.rb
@@ -1,25 +0,0 @@
-require 'spec_helper'
-
-describe 'rpmbuilder::mock::pe_config', :type => 'define' do
-
- let(:title) { 'pe_mock' }
- context 'Given some parameters, a configuration should be created' do
-
- let(:params) {{
- :config => '/etc/mock/pupent-2.0-el6-i386-cve.cfg',
- :build_root => 'pupent-2.0-el6-i386-cve',
- :target_arch => 'i386',
- :dist => 'el6',
- :base_repo_baseurl => 'http://yo.puppetlabs.lan/cent6latestserver-i386/RPMS.os',
- :pe_repo_baseurl => 'http://neptune.puppetlabs.lan/2.0/repos/el-6-i386',
- :failover_priority => 'base'
- }}
-
- it 'should generate valid content for the mock configuration file' do
- content = catalogue.resource('file', "#{params[:config]}").send(:parameters)[:content]
- content.should_not be_empty
- end
-
- it { should contain_file("#{params[:config]}").with_ensure('present') }
- end
-end
View
43 spec/defines/create_mock_spec.rb
@@ -0,0 +1,43 @@
+require 'spec_helper'
+
+describe 'rpmbuilder::mock::create_mock', :type => 'define' do
+ context "Mock should create a correct mock config for a given dist, release and arch" do
+ [{
+ :dist => "el",
+ :release => "12",
+ :proxy => nil,
+ :vendor => "Puppet User",
+ :arch => "sparc",
+ :dev => false,
+ :mock_root => "/etc/mock",
+ },
+ {
+ :dist => "fedpalooza",
+ :release => "6",
+ :proxy => "http://proxy.puppetlabs.com:1234",
+ :vendor => "Puppet Labs",
+ :arch => "i386",
+ :dev => true,
+ :mock_root => "/usr/mock",
+ }].each do |param_set|
+ describe "With mock_root set to #{param_set[:mock_root]}" do
+ let :params do
+ param_set
+ end
+
+
+ let(:title) { "abcdefg" }
+
+ it { should contain_file(title).with(
+ {
+ :path => "#{param_set[:mock_root]}/#{title}.cfg",
+ :owner => "root",
+ :group => "mock",
+ :ensure => "present",
+ :mode => "0644",
+ }
+ )}
+ end
+ end
+ end
+end
View
43 spec/defines/pe_mock_spec.rb
@@ -0,0 +1,43 @@
+require 'spec_helper'
+
+describe 'rpmbuilder::mock::pe_mock', :type => 'define' do
+ context "PE mock should create a correct mock config for a given pe_version, dist and arch" do
+
+ [
+ { :mock_root => "/etc/mock",
+ :pe_ver => "2.7",
+ :dist => "el",
+ :release => "5",
+ :arch => "i386",
+ },
+ { :mock_root => "/opt/mock",
+ :pe_ver => "3.0",
+ :dist => "something",
+ :release => "6",
+ :arch => "x86_64",
+ }
+ ].each do |param_set|
+ describe "when #{param_set[:mock_root] == "/etc/mock" ? "using default" : "specifying"} class parameters" do
+ let :params do
+ param_set
+ end
+
+
+ let(:title) { "pupent-#{param_set[:pe_ver]}-#{param_set[:dist]}-#{param_set[:arch]}" }
+ let(:expected_pe_repo) { "http:\/\/neptune.puppetlabs.lan\/#{param_set[:pe_ver]}\/repos\/#{param_set[:dist]}-#{param_set[:release]}-#{param_set[:arch]}"
+ }
+
+ it { should contain_file(title).with(
+ {
+ :path => "#{param_set[:mock_root]}/#{title}.cfg",
+ :owner => "root",
+ :group => "mock",
+ :ensure => "present",
+ :mode => "0644",
+ :content => /#{expected_pe_repo}/,
+ }
+ )}
+ end
+ end
+ end
+end
View
16 spec/defines/pe_mockset_spec.rb
@@ -0,0 +1,16 @@
+require 'spec_helper'
+
+describe 'rpmbuilder::mock::pe_mockset', :type => 'define' do
+ ["/etc/mock", "/opt/mock"].each do |param|
+ describe "when #{param == "/etc/mock" ? "using default" : "specifying"} parameters" do
+ let(:title) {"lance"}
+ let(:params) do { :mock_root => param } end
+
+ ["el5","el6"].each do |dist|
+ ["i386","x86_64"].each do |arch|
+ it { should contain_Rpmbuilder__Mock__Pe_mock("pupent-#{title}-#{dist}-#{arch}") }
+ end
+ end
+ end
+ end
+end
View
32 spec/defines/pl_config_spec.rb
@@ -1,32 +0,0 @@
-require 'spec_helper'
-
-describe 'rpmbuilder::mock::pl_config', :type => 'define' do
-
- let(:title) { 'pl-mock' }
- context 'Given some parameters, a configuration should be created' do
-
- let(:params) {{
- :config => '/etc/mock/pl-5-i386.cfg-test',
- :build_root => 'pl-5-i386',
- :target_arch => 'i386',
- :dist => 'el5',
- :dist_macro => '.el5',
- :base_mirrorlist => 'http://mirrorlist.centos.org/?release=5&arch=i386&repo=os',
- :updates_mirrorlist => 'http://mirrorlist.centos.org/?release=5&arch=i386&repo=updates',
- :puppet_prod_baseurl => 'http://yum.puppetlabs.com/el/5/products/i386',
- :puppet_deps_baseurl => 'http://yum.puppetlabs.com/el/5/dependencies/i386',
- :epel_repo_mirrorlist => 'http://mirrors.fedoraproject.org/mirrorlist?repo=epel-5&arch=i386',
- :failover_priority => 'base',
- }}
-
- it 'should generate valid content for the mock configuration file' do
- content = catalogue.resource('file', "#{params[:config]}").send(:parameters)[:content]
- content.should_not be_empty
- end
-
- it do should contain_file("#{params[:config]}").with({
- 'ensure' => 'present',
- 'require' => 'Package[mock]'
- }) end
- end
-end
View
48 spec/defines/pl_mocks_spec.rb
@@ -0,0 +1,48 @@
+require 'spec_helper'
+
+describe 'rpmbuilder::mock::pl_mocks', :type => 'define' do
+ let(:default_params) do
+ { :dist => nil,
+ :vendor => "Puppet User",
+ :proxy => nil,
+ }
+ end
+
+ [{},
+ {
+ :dist => "5",
+ :vendor => "Puppet Labs",
+ :proxy => "http://proxy.puppetlabs.com:1234",
+ }].each do |param_set|
+ let(:param_hash) do
+ default_params.merge(param_set)
+ end
+
+ let(:params) do
+ param_set
+ end
+
+ ["i386","x86_64"].each do |arch|
+ [true,false].each do |dev|
+ describe "With arch of #{arch} and dev set to #{dev.to_s}" do
+ let(:title) do "solaris" end
+ let(:mock_title) do
+ "pl-#{param_hash[:dist]}-#{title}-#{arch}#{dev ? "-dev" : ""}"
+ end
+
+ it { should contain_Rpmbuilder__Mock__Create_mock(mock_title).with(
+ {
+ :dist => param_hash[:dist],
+ :release => title,
+ :proxy => param_hash[:proxy],
+ :vendor => param_hash[:vendor],
+ :arch => arch,
+ :dev => dev,
+ })
+ }
+ end
+ end
+ end
+
+ end
+end
View
11 spec/spec_helper.rb
@@ -1,2 +1,11 @@
-require 'rubygems'
require 'rspec-puppet'
+require 'puppetlabs_spec_helper/module_spec_helper'
+
+=begin
+fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures'))
+
+RSpec.configure do |c|
+ c.module_path = File.join(fixture_path, 'modules')
+ c.manifest_dir = File.join(fixture_path, 'manifests')
+end
+=end
View
70 templates/mock-config.erb
@@ -0,0 +1,70 @@
+<%
+ # Set up internal variables for fedora and centos mirrors, which vary greatly in format.
+ if dist == "fedora"
+ tag = "fc"
+ prefix = "f"
+ mirrorlist_os = "http://mirrors.fedoraproject.org/mirrorlist?repo=fedora-#{release}&arch=#{arch}"
+ mirrorlist_updates = "http://mirrors.fedoraproject.org/mirrorlist?repo=updates-released-f#{release}&arch=#{arch}"
+ elsif dist == "el"
+ tag = "el"
+ mirrorlist_os = "http://mirrorlist.centos.org/?release=#{release}&arch=#{arch}&repo=os"
+ mirrorlist_updates = "http://mirrorlist.centos.org/?release=#{release}&arch=#{arch}&repo=updates"
+ end
+%>
+
+config_opts['root'] = '<%=name%>'
+config_opts['target_arch'] = '<%=arch%>'
+config_opts['legal_host_arches'] = (<%= if arch =~ /i\d86/ then "'i386', 'i586', 'i686', 'x86_64'" else "x86_64" end %>)
+config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
+config_opts['dist'] = '<%=dist%>' # only useful for --resultdir variable subst
+config_opts['macros']['%_host_vendor'] = '<%=vendor%>'
+<% if dist == "el" and release.to_i == 5 %>
+config_opts['macros']['%dist'] = '.<%=dist%><%=release%>'
+<% end %>
+
+config_opts['yum.conf'] = """
+[main]
+cachedir=/var/cache/yum
+debuglevel=1
+reposdir=/dev/null
+logfile=/var/log/yum.log
+retries=20
+obsoletes=1
+gpgcheck=0
+assumeyes=1
+syslog_ident=mock
+syslog_device=
+proxy=<%=proxy%>
+
+# OS Repo
+[<%="#{dist}-#{release}-#{arch}" %>-os]
+name=<%="#{dist}-#{release}-#{arch}" %>-os
+mirrorlist=<%=mirrorlist_os%>
+failovermethod=priority
+
+# Updates Repo
+[<%="#{dist}-#{release}-#{arch}" %>-updates]
+name=<%="#{dist}-#{release}-#{arch}" %>-updates
+mirrorlist=<%=mirrorlist_updates%>
+failovermethod=priority
+
+# Puppetlabs Products
+[puppetlabs-products]
+name=yum.puppetlabs-products
+baseurl=http://yum.puppetlabs.com/<%=dist%>/<%=prefix%><%=release%>/products/<%=arch%>/
+enabled=1
+
+# Puppetlabs Dependencies
+[puppetlabs-dependencies]
+name=yum.puppetlabs-dependencies
+baseurl=http://yum.puppetlabs.com/<%=dist%>/<%=prefix%><%=release%>/dependencies/<%=arch%>/
+enabled=1
+
+<% if dev == true %>
+# Puppetlabs Development
+[puppetlabs-devel]
+name=yum.puppetlabs-devel
+baseurl=http://yum.puppetlabs.com/<%=dist%>/<%=prefix%><%=release%>/devel/<%=arch%>/
+enabled=1
+<% end %>
+"""
View
48 templates/pe-mock-config.erb
@@ -0,0 +1,48 @@
+# **********************************
+# Puppet Labs pe mock configuration
+# <%=name%>
+# Managed by Puppet
+# **********************************
+
+config_opts['root'] = '<%=name-%>'
+config_opts['target_arch'] = '<%=arch-%>'
+config_opts['legal_host_arches'] = (<%= if arch =~ /i\d86/ then "'i386', 'i586', 'i686', 'x86_64'" else "x86_64" end %>)
+config_opts['chroot_setup_cmd'] = 'install bash bzip2 coreutils cpio curl cvs diffutils fedpkg findutils gawk gcc gcc-c++ gnupg grep gzip info make patch redhat-release redhat-release-server redhat-rpm-config rpm-build sed shadow-utils tar unzip util-linux-ng which xz buildsys-macros'
+config_opts['dist'] = '<%=dist-%><%=release-%>' # only useful for --resultdir variable subst
+config_opts['plugin_conf']['ccache_enable'] = False
+config_opts['macros']['%dist'] = '.<%=dist-%><%=release-%>'
+config_opts['yum.conf'] = """
+
+[main]
+cachedir=/var/cache/yum
+debuglevel=1
+reposdir=/dev/null
+logfile=/var/log/yum.log
+retries=20
+obsoletes=1
+gpgcheck=0
+assumeyes=1
+syslog_ident=mock
+syslog_device=
+proxy=http://modi.puppetlabs.lan:3128/
+
+# repos
+[os]
+name=centos<%=release-%>-<%=arch-%>-os
+enabled=1
+mirrorlist=http://mirrorlist.centos.org/?release=<%=release-%>&arch=<%=arch-%>&repo=os
+baseurl=http://yo.puppetlabs.lan/cent<%=release-%>latestserver-<%=arch-%>/RPMS.os/
+
+[updates]
+name=centos<%=release-%>-<%=arch-%>-updates
+enabled=0
+mirrorlist=http://mirrorlist.centos.org/?release=<%=release-%>&arch=<%=arch-%>&repo=updates
+baseurl=http://yo.puppetlabs.lan/cent<%=release-%>latestserver-<%=arch-%>/RPMS.updates/
+
+[pe]
+name=pe
+enabled=1
+baseurl=http://neptune.puppetlabs.lan/<%=pe_ver-%>/repos/<%=dist-%>-<%=release-%>-<%=arch-%>/
+skip_if_unavailable=1
+proxy=_none_
+"""
View
104 templates/pl-mock-config.erb
@@ -1,104 +0,0 @@
-# **********************************
-# Puppet Labs mock configuration
-<%= "# #{config}" %>
-# Managed by Puppet
-# **********************************
-
-config_opts['root'] = '<%= build_root %>'
-config_opts['target_arch'] = '<%= target_arch %>'
-config_opts['legal_host_arches'] = (<%= legal_host_arches %>)
-config_opts['chroot_setup_cmd'] = '<%= chroot_setup_cmd %>'
-config_opts['dist']= '<%= dist %>'
-<% if @dist_macro -%>
-config_opts['macros']['%dist'] = '<%= dist_macro %>'
-<% end -%>
-<% if @is_vendor_puppetlabs -%>
-config_opts['macros']['%_host_vendor'] = 'Puppet Labs'
-<%end -%>
-
-config_opts['yum.conf'] = """
-
-[main]
-cachedir=/var/cache/yum
-debuglevel=1
-reposdir=/dev/null
-logfile=/var/log/yum.log
-retries=20
-obsoletes=1
-gpgcheck=0
-assumeyes=1
-syslog_ident=mock
-syslog_device=
-<% if @base_repo_baseurl or @base_mirrorlist -%>
-
-[base]
-name=BaseOS
-<% if @base_repo_baseurl -%>
-baseurl=<%= base_repo_baseurl %>
-<% end -%>
-<% if @base_mirrorlist -%>
-mirrorlist=<%= base_mirrorlist %>
-<% end -%>
-enabled=1
-<% if @failover_priority == "base" -%>
-failovermethod=priority
-<% end -%>
-<% end -%>
-<% if @updates_repo_baseurl or @updates_mirrorlist -%>
-
-[updates]
-name=<%= dist %>-<%= target_arch %>-updates
-<% if @updates_repo_baseurl -%>
-baseurl=<%= updates_repo_baseurl %>
-<% end -%>
-<% if @updates_mirrorlist -%>
-mirrorlist=<%= updates_mirrorlist %>
-<% end -%>
-enabled=<%= updates_repo_enabled %>
-<% if @failover_priority == "updates" -%>
-failovermethod=priority
-<% end -%>
-<% end -%>
-<% if @base_debug_mirrorlist -%>
-
-[base-debug]
-name=<% dist %>-debug-base
-mirrorlist=<%= base_debug_mirrorlist %>
-enabled=1
-<% end -%>
-<% if @updates_debug_mirrorlist -%>
-
-[updates-debug]
-name=<% dist %>-debug-updates
-mirrorlist=<%= updates_debug_mirrorlist %>
-enabled=1
-<% end -%>
-<% if @puppet_prod_baseurl -%>
-
-[puppet]
-name=yum.puppetlabs-prod
-baseurl=<%= puppet_prod_baseurl %>
-enabled=1
-<% end -%>
-<% if @puppet_deps_baseurl -%>
-
-[puppet-deps]
-name=yum.puppetlabs-deps
-baseurl=<%= puppet_deps_baseurl %>
-enabled=1
-<% end -%>
-<% if @puppet_dev_baseurl -%>
-
-[puppet-dev]
-name=yum.puppetlabs-dev
-baseurl=<%= puppet_dev_baseurl %>
-enabled=1
-<% end -%>
-<% if @epel_repo_mirrorlist -%>
-
-[epel]
-name=epel
-mirrorlist=<%= epel_repo_mirrorlist %>
-includepkgs=epel-release ccache
-<% end -%>
-"""
View
75 templates/pupent-mock-config.erb
@@ -1,75 +0,0 @@
-# ************************************
-# Puppet Enterprise mock configuration
-<%= "# #{config}" %>
-# Managed by Puppet
-# ************************************
-
-config_opts['root'] = '<%= build_root %>'
-config_opts['target_arch'] = '<%= target_arch %>'
-config_opts['legal_host_arches'] = (<%= legal_host_arches %>)
-config_opts['chroot_setup_cmd'] = '<%= chroot_setup_cmd %>'
-config_opts['dist']= '<%= dist %>'
-config_opts['plugin_conf']['ccache_enable'] = <%= ccache_enable %>
-<% if @dist_macro -%>
-config_opts['macros']['%dist'] = '<%= dist_macro %>'
-<% end -%>
-config_opts['yum.conf'] = """
-
-[main]
-cachedir=/var/cache/yum
-debuglevel=1
-reposdir=/dev/null
-logfile=/var/log/yum.log
-retries=20
-obsoletes=1
-gpgcheck=0
-assumeyes=1
-syslog_ident=mock
-syslog_device=
-proxy=http://modi.puppetlabs.lan:3128/
-<% if @base_repo_baseurl or @base_mirrorlist -%>
-
-[base]
-name=BaseOS
-enabled=1
-<% if @base_repo_baseurl -%>
-baseurl=<%= base_repo_baseurl %>
-<% end -%>
-<% if @base_mirrorlist -%>
-mirrorlist=<%= base_mirrorlist %>
-<% end -%>
-<% if @failover_priority == "base" -%>
-failovermethod=priority
-<% end -%>
-<% end -%>
-<% if @updates_repo_baseurl or @updates_mirrorlist -%>
-
-[updates]
-name=<%= dist %>-<%= target_arch %>-updates
-enabled=<%= updates_repo_enabled %>
-<% if @updates_repo_baseurl -%>
-baseurl=<%= updates_repo_baseurl %>
-<% end -%>
-<% if @updates_mirrorlist -%>
-mirrorlist=<%= updates_mirrorlist %>
-<% end -%>
-<% if @failover_priority == "updates" -%>
-failovermethod=priority
-<% end -%>
-<% end -%>
-
-[pe]
-name=pe
-enabled=1
-baseurl=<%= pe_repo_baseurl %>
-skip_if_unavailable=1
-proxy=_none_
-<% if @extras_repo_baseurl -%>
-[pe_extras]
-name=pe_extras
-enabled=1
-baseurl=<%= extras_repo_baseurl %>
-skip_if_unavailable=1
-proxy=_none_
-<% end -%>
-"""

0 comments on commit 40e2120

Please sign in to comment.
Something went wrong with that request. Please try again.