[Lsb-messages] /var/www/bzr/lsb/devel/puppet-lsb r247: Make the wrapper work generally, and make sure it gets installed correctly.
Jeff Licquia
licquia at linuxfoundation.org
Thu Mar 15 00:31:58 UTC 2012
------------------------------------------------------------
revno: 247
committer: Jeff Licquia <licquia at linuxfoundation.org>
branch nick: puppet-lsb
timestamp: Wed 2012-03-14 20:31:58 -0400
message:
Make the wrapper work generally, and make sure it gets installed correctly.
renamed:
modules/buildbot/files/chroot/gcc-wrapper => modules/buildbot/templates/gcc-wrapper.erb
modified:
modules/buildbot/manifests/slave.pp
modules/buildbot/manifests/slavechroot.pp
modules/buildbot/templates/gcc-wrapper.erb
-------------- next part --------------
=== modified file 'modules/buildbot/manifests/slave.pp'
--- a/modules/buildbot/manifests/slave.pp 2012-03-13 23:07:31 +0000
+++ b/modules/buildbot/manifests/slave.pp 2012-03-15 00:31:58 +0000
@@ -242,4 +242,39 @@
Exec['make-slave'] ],
}
+ # Special: for small-word chroot build slaves, we need to force
+ # small-word builds (31- or 32-bit builds). The source for gcc-wrapper
+ # is actually created by buildbot::slavechroot; see its definition there.
+
+ if $chroot == 'small' {
+
+ file { '/usr/bin/gcc-wrapper':
+ source => 'puppet:///modules/buildbot/gcc-wrapper',
+ mode => 0755,
+ }
+
+ exec { 'move-gcc':
+ command => '[ -f /usr/bin/gcc ] && mv /usr/bin/gcc /usr/bin/gcc.REAL',
+ path => [ '/bin', '/sbin', '/usr/bin', '/usr/sbin' ],
+ }
+
+ exec { 'move-g++':
+ command => '[ -f /usr/bin/g++ ] && mv /usr/bin/gcc /usr/bin/g++.REAL',
+ path => [ '/bin', '/sbin', '/usr/bin', '/usr/sbin' ],
+ }
+
+ file { '/usr/bin/gcc':
+ ensure => link,
+ target => 'gcc-wrapper',
+ require => [ File['/usr/bin/gcc-wrapper'], Exec['move-gcc'] ],
+ }
+
+ file { '/usr/bin/g++':
+ ensure => link,
+ target => 'gcc-wrapper',
+ require => [ File['/usr/bin/gcc-wrapper'], Exec['move-g++'] ],
+ }
+
+ }
+
}
=== modified file 'modules/buildbot/manifests/slavechroot.pp'
--- a/modules/buildbot/manifests/slavechroot.pp 2012-03-14 14:31:47 +0000
+++ b/modules/buildbot/manifests/slavechroot.pp 2012-03-15 00:31:58 +0000
@@ -14,6 +14,18 @@
$bigwordchroot = '/data/chroots/sles11-64bit'
+ # We need to force small-word builds on the small-word chroots.
+
+ $smallwordarch = $architecture ? {
+ 's390x' => 's390',
+ 'ppc64' => 'ppc32',
+ }
+
+ $gccsmallword = $architecture ? {
+ 's390x' => '-m31',
+ 'ppc64' => '-m32',
+ }
+
# Within a chroot, we do the chroot setup by copying a
# Puppet config into it and using "puppet apply" to apply
# it. We do this b/c the Puppet master/agent setup
@@ -71,6 +83,11 @@
require => File['/etc/puppet-chroot/modules/buildbot/files'],
}
+ file { '/etc/puppet-chroot/modules/buildbot/files/gcc-wrapper':
+ content => template('buildbot/gcc-wrapper.erb'),
+ require => File['/etc/puppet-chroot/modules/buildbot/files'],
+ }
+
# Other modules. The way that works here: we link to the general
# modules directory, and pull in modules explicitly here.
=== renamed file 'modules/buildbot/files/chroot/gcc-wrapper' => 'modules/buildbot/templates/gcc-wrapper.erb'
--- a/modules/buildbot/files/chroot/gcc-wrapper 2012-03-14 22:42:27 +0000
+++ b/modules/buildbot/templates/gcc-wrapper.erb 2012-03-15 00:31:58 +0000
@@ -1,7 +1,7 @@
#!/bin/bash
-if [ `arch` == "s390" ]; then
- ${0##/*/}.REAL -m31 "$@"
+if [ `arch` == "<%= smallwordarch %>" ]; then
+ ${0##/*/}.REAL <%= gccsmallword %> "$@"
else
${0##/*/}.REAL "$@"
fi
More information about the lsb-messages
mailing list