Skip to content
This repository has been archived by the owner on Jun 5, 2020. It is now read-only.

Commit

Permalink
(RE-812) Update mock template with temporary band-aid
Browse files Browse the repository at this point in the history
Since RHEL7 isn't really a released, baked, finished thing yet,
we have to reference the beta. This has a few caveats:
- x86_64 only
- None of the existing mock templates quite work

For the time being, support is being provided via a 'bandaid',
which simply declares a file resource for the mock config if a
RHEL7 host is to be built. This scaffold/band-aid/kludge will
be rolled back/removed/killed with fire when RHEL7 gets its wish
and the Blue Fairy makes it a real release.
  • Loading branch information
mckern committed Jan 16, 2014
1 parent fb4f64c commit f549297
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 15 deletions.
47 changes: 32 additions & 15 deletions manifests/mock/pl_mocks.pp
Expand Up @@ -5,21 +5,38 @@
$mock_root = undef,
) {

rpmbuilder::mock::create_mock { "pl-${dist}-${name}-i386":
dist => $dist,
release => $name,
proxy => $proxy,
vendor => $vendor,
arch => "i386",
mock_root => $mock_root,
}
# This is absolutely a bandaid; it's just here to stub
# out support for EL7, using the beta release. When EL7
# is a fully baked thing then this will reverted/updated
# to be 87% less hacky. For now we're also only using
# x86_64 as an arch, because EL7 beta is only x64_64.
if ($name == '7') and ($dist == 'el') {
file { 'pl-el-7-x86_64':
path => "/etc/mock/pl-el-7-x86_64.cfg",
owner => "root",
group => "mock",
ensure => present,
content => template("rpmbuilder/el7-bandaid.erb"),
mode => "0644",
}

} else {
rpmbuilder::mock::create_mock { "pl-${dist}-${name}-i386":
dist => $dist,
release => $name,
proxy => $proxy,
vendor => $vendor,
arch => "i386",
mock_root => $mock_root,
}

rpmbuilder::mock::create_mock { "pl-${dist}-${name}-x86_64":
dist => $dist,
release => $name,
proxy => $proxy,
vendor => $vendor,
arch => "x86_64",
mock_root => $mock_root,
rpmbuilder::mock::create_mock { "pl-${dist}-${name}-x86_64":
dist => $dist,
release => $name,
proxy => $proxy,
vendor => $vendor,
arch => "x86_64",
mock_root => $mock_root,
}
}
}
38 changes: 38 additions & 0 deletions templates/el7-bandaid.erb
@@ -0,0 +1,38 @@
# **********************************
# Puppet Labs mock configuration
# pl-el-7-x86_64
# Managed by Puppet
# **********************************

config_opts['root'] = 'pl-el-7-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
config_opts['dist'] = '7' # only useful for --resultdir variable subst
config_opts['macros']['%_host_vendor'] = 'Puppet User'
config_opts['macros']['%rhel'] = '7'

config_opts['yum.conf'] = """
[main]
cachedir=/var/cache/yum
debuglevel=1
logfile=/var/log/yum.log
reposdir=/dev/null
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
syslog_ident=mock
syslog_device=
proxy=http://modi.puppetlabs.lan:3128

[beta]
name=beta
baseurl=http://ftp.redhat.com/redhat/rhel/beta/7/x86_64/os/

[epel-el-7-x86_64]
name=epel-el-7-x86_64
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=epel-7&arch=x86_64
failovermethod=priority
includepkgs=ccache
"""

0 comments on commit f549297

Please sign in to comment.