Add support for packages.o.o and 32-bit builds.
Change-Id: Ia54b15359c8c7bca4b03f3f0952fa2a7ad06a5e1 Reviewed-on: https://review.openstack.org/318 Reviewed-by: James E. Blair <corvus@inaugust.com> Tested-by: Jenkins
This commit is contained in:
parent
352cdce842
commit
325649a6e4
@ -15,23 +15,22 @@ deb http://security.ubuntu.com/ubuntu $release-security main universe
|
||||
deb-src http://security.ubuntu.com/ubuntu $release-security main universe
|
||||
deb http://us.archive.ubuntu.com/ubuntu/ $release-updates main universe
|
||||
deb-src http://us.archive.ubuntu.com/ubuntu/ $release-updates main universe
|
||||
|
||||
deb http://packages.openstack.org/trunk $release main
|
||||
deb-src http://packages.openstack.org/trunk $release main
|
||||
EOF
|
||||
|
||||
#TODO: This should be packages.openstack.org once we have it.
|
||||
add-apt-repository ppa:nova-core/trunk
|
||||
|
||||
if test "${release}" != "oneiric" -a "${release}" != "natty"
|
||||
then
|
||||
add-apt-repository ppa:nova-core/build-depends
|
||||
fi
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 32EE128C
|
||||
rm -rf /etc/apt/sources.list.d/nova-core*
|
||||
else
|
||||
# Have I mentioned our lack of debian is a bit assy? Let's hope Maverick
|
||||
# works for now
|
||||
cat > "/etc/apt/sources.list.d/nova.list" << EOF
|
||||
deb http://ppa.launchpad.net/nova-core/trunk/ubuntu maverick main
|
||||
deb http://ppa.launchpad.net/nova-core/build-depends/ubuntu maverick main
|
||||
cat > "/etc/apt/sources.list.d/extras.list" << EOF
|
||||
deb http://packages.openstack.org/trunk $release main
|
||||
deb-src http://packages.openstack.org/trunk $release main
|
||||
EOF
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 2A2356C9
|
||||
rm -rf /etc/apt/sources.list.d/nova.list
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 32EE128C
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
|
@ -1,6 +1,16 @@
|
||||
define cowbuilder::cow($distro = ubuntu) {
|
||||
|
||||
$has_cow = "/usr/bin/test -d /var/cache/pbuilder/base-$name.cow"
|
||||
$has_cow_32 = "/usr/bin/test -d /var/cache/pbuilder/base-$name-i386.cow"
|
||||
case $bits {
|
||||
32: {
|
||||
$env = ["ARCH=i386", "DIST=$name","APTCACHEHARDLINK=no","HOME=/root"]
|
||||
}
|
||||
64: {
|
||||
$env = ["DIST=$name","APTCACHEHARDLINK=no","HOME=/root"]
|
||||
}
|
||||
}
|
||||
|
||||
case $distro {
|
||||
ubuntu: {
|
||||
exec { "Add base cow for $name":
|
||||
@ -13,6 +23,16 @@ define cowbuilder::cow($distro = ubuntu) {
|
||||
logoutput => on_failure,
|
||||
unless => "$has_cow",
|
||||
}
|
||||
exec { "Add 32-bit base cow for $name":
|
||||
environment => ["ARCH=i386", "DIST=$name","APTCACHEHARDLINK=no","HOME=/root"],
|
||||
command => "linux32 git-pbuilder create --distribution $name --components 'main universe' --hookdir /var/cache/pbuilder/hook.d/ --mirror='http://us.archive.ubuntu.com/ubuntu/'",
|
||||
path => "/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
user => root,
|
||||
group => root,
|
||||
timeout => 0,
|
||||
logoutput => on_failure,
|
||||
unless => "$has_cow_32",
|
||||
}
|
||||
}
|
||||
debian: {
|
||||
exec { "Add base cow for $name":
|
||||
@ -25,6 +45,16 @@ define cowbuilder::cow($distro = ubuntu) {
|
||||
logoutput => on_failure,
|
||||
unless => "$has_cow",
|
||||
}
|
||||
exec { "Add 32-bit base cow for $name":
|
||||
environment => ["ARCH=i386", "DIST=$name","APTCACHEHARDLINK=no","HOME=/root"],
|
||||
command => "linux32 git-pbuilder create --distribution $name --mirror ftp://ftp.us.debian.org/debian/ --debootstrapopts '--keyring=/usr/share/keyrings/debian-archive-keyring.gpg' --hookdir /var/cache/pbuilder/hook.d/",
|
||||
path => "/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
user => root,
|
||||
group => root,
|
||||
timeout => 0,
|
||||
logoutput => on_failure,
|
||||
unless => "$has_cow_32",
|
||||
}
|
||||
}
|
||||
}
|
||||
exec { "Update base cow for $name":
|
||||
@ -36,4 +66,13 @@ define cowbuilder::cow($distro = ubuntu) {
|
||||
logoutput => on_failure,
|
||||
onlyif => "$has_cow",
|
||||
}
|
||||
exec { "Update 32-bit base cow for $name":
|
||||
environment => ["ARCH=i386", "DIST=$name","APTCACHEHARDLINK=no","HOME=/root"],
|
||||
command => "linux32 git-pbuilder update --hookdir /var/cache/pbuilder/hook.d/",
|
||||
path => "/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
user => root,
|
||||
group => root,
|
||||
logoutput => on_failure,
|
||||
onlyif => "$has_cow_32",
|
||||
}
|
||||
}
|
||||
|
@ -3,6 +3,7 @@ class cowbuilder {
|
||||
$slave_packages = ["git-buildpackage",
|
||||
"pbuilder",
|
||||
"cowbuilder",
|
||||
"linux32",
|
||||
"debian-archive-keyring"]
|
||||
|
||||
$ubuntu_releases = [ "lucid",
|
||||
@ -39,11 +40,15 @@ class cowbuilder {
|
||||
|
||||
cowbuilder::cow { $ubuntu_releases:
|
||||
distro => 'ubuntu',
|
||||
require => [Package[debian-archive-keyring], File[cowhook]],
|
||||
require => [ Package[debian-archive-keyring],
|
||||
Package[linux32],
|
||||
File[cowhook]
|
||||
],
|
||||
}
|
||||
cowbuilder::cow { $debian_releases:
|
||||
distro => 'debian',
|
||||
require => [ Package[debian-archive-keyring],
|
||||
Package[linux32],
|
||||
File[cowhook],
|
||||
Cowbuilder::Debgpg[AED4B06F473041FA],
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user