[Piuparts-devel] Bug#664727: piuparts: cowbuilder support

Osamu Aoki osamu at debian.org
Sat Jul 12 20:33:29 UTC 2014


Simplest thing may be extend the piuparts.py Class Chroot:

* create chroot: 

  cp -al base.cow worker.cow

... extend def create
    pick base.cow based on dist and arch

* log into chroot to run cmd:

  cd worker.cow && cow-shell cheroot cmd

... def run to have something along:
        elseif setting.cowbuilder:
            return run(["cow-shell", "chroot", self.name] + prefix + command,
   Here we should run chroot under cow-shell to protect master data
   base.cow overwritten.

* remove chroot:

   not much to do (just like pbuilder)

... def remove

This does not take advantage of local package file cache.  That is
another issue for both pbuilder and cowbuilder.  But above patch
approach enables us not to have many duplicate data in tar,gz and .cow.

As for name of base.cow, it is a bit of messs.  Bare-metal cowbuilder
and one usd from git-buildpackage use different naming convention for
template chroot directory.  So dist and arch mapping to base.cow
location needs some care.  I like git-buildpackage style naming
(=git-pbuilder style).   This is just reminder to myself.



More information about the Piuparts-devel mailing list