Permalink
Browse files

Add debian pbuilder modules

  • Loading branch information...
1 parent f1a40b4 commit 06d45255cbdc45aa1275a4c752669aeda82f270e @GregSutcliffe committed Oct 5, 2012
@@ -0,0 +1,34 @@
+# uses a (slightly modified) 3rd-party pbuilder module to create
+# tgz images of the specified OSs, as well as a hook script and an
+# execution script. This can be use to build a package.
+#
+class debian {
+
+ debian::pbuilder_setup {
+ "squeeze64":
+ ensure => present,
+ arch => 'amd64',
+ release => 'squeeze',
+ apturl => 'http://ftp.de.debian.org/debian',
+ aptcontent => "deb http://ftp.uk.debian.org/debian/ squeeze main non-free contrib\ndeb-src http://ftp.uk.debian.org/debian/ squeeze main non-free contrib\n";
+ "squeeze32":
+ ensure => present,
+ arch => 'i386',
+ release => 'squeeze',
+ apturl => 'http://ftp.de.debian.org/debian',
+ aptcontent => "deb http://ftp.uk.debian.org/debian/ squeeze main non-free contrib\ndeb-src http://ftp.uk.debian.org/debian/ squeeze main non-free contrib\n";
+ "precise64":
+ ensure => present,
+ arch => 'amd64',
+ release => 'precise',
+ apturl => 'http://gb.archive.ubuntu.com/ubuntu',
+ aptcontent => "deb http://gb.archive.ubuntu.com/ubuntu/ precise main restricted\ndeb-src http://gb.archive.ubuntu.com/ubuntu/ precise main restricted\n";
+ "precise32":
+ ensure => present,
+ arch => 'i386',
+ release => 'precise',
+ apturl => 'http://gb.archive.ubuntu.com/ubuntu',
+ aptcontent => "deb http://gb.archive.ubuntu.com/ubuntu/ precise main restricted\ndeb-src http://gb.archive.ubuntu.com/ubuntu/ precise main restricted\n";
+ }
+
+}
@@ -0,0 +1,46 @@
+define debian::pbuilder_setup (
+ $ensure = present,
+ $arch,
+ $release,
+ $apturl,
+ $aptcontent,
+) {
+
+ pbuilder { $name:
+ ensure => $ensure,
+ arch => $arch,
+ release => $release,
+ methodurl => $apturl,
+ }
+
+ file { "/etc/pbuilder/${name}/apt.config/debian.list":
+ ensure => $ensure,
+ notify => Exec["update_pbuilder_${name}"],
+ content => $aptcontent,
+ }
+
+ file { "/usr/local/bin/pdebuild-${name}":
+ ensure => $ensure,
+ mode => 0775,
+ content => "#!/bin/bash\n pdebuild --use-pdebuild-internal --configfile /etc/pbuilder/${name}/pbuilderrc --architecture ${arch}\n"
+ }
+
+ file { "/etc/pbuilder/${name}/hooks/F70aptupdate":
+ ensure => $ensure,
+ mode => 0775,
+ content => "#!/bin/sh
+
+# F<digit><digit><whatever-else-you-want> is executed just before
+# user logs in, or program starts executing, after chroot is created
+# in --login or --execute target.
+
+# Use local results of previous builds - not needed (yet)
+#cd /var/cache/pbuilder/result/
+#/usr/bin/dpkg-scanpackages . /dev/null >> /var/cache/pbuilder/result/Packages
+
+# Update apt
+/usr/bin/apt-get update\n"
+ }
+
+
+}
@@ -0,0 +1,21 @@
+0.04 (2009-07-24):
+ - let users deal with their own apt sources
+
+0.03 (2007-09-17):
+ - do not use links anymore, create script to allow different configuration
+ directories for various pbuilders
+ - use "mkdir -p" execs to create root directories
+ - do not use virtual resources anymore, depend on the pbuilder::common class
+ instead for the package and group
+ - add $bindir, $confdir, $cachedir and $chrootdir arguments to the pbuilder
+ type
+
+0.02 (2007-09-14):
+ - change lots of configuration directories
+ - manage multiple instances of pbuilder with virtual resources for general
+ files
+ - automatically create/update pbuilders
+ - add ensure argument to allow purging pbuilders
+
+0.01 (2007-09-13):
+ Initial release
Oops, something went wrong.

0 comments on commit 06d4525

Please sign in to comment.