jenkins-debian-glue icon indicating copy to clipboard operation
jenkins-debian-glue copied to clipboard

using pbuilder (instead of cowbuilder)

Open lurdan opened this issue 11 years ago • 9 comments

Please provide options to switch between builders.

Though tt seems that j-d-g assumes build tool is cowbuilder only, I want to use pbuilder on slave kfreebsd node... (cowbuilder doesn't support that architecture)

lurdan avatar Jan 30 '14 02:01 lurdan

Can you please provide details about your setup, like:

  • How does your pbuilder configuration (pbuilderrc) look like?
  • How do you invoke pbuilder (manually)?

mika avatar Jan 30 '14 07:01 mika

Master node: amd64 box, build-and-provide-package successfully builds amd64/i386 using cowbuilder. /etc/pbuliderrc only sets MIRRORSITE.

Slave node: kfreebsd-amd64 box, set up as faq/#foreign_arch_builds. Combination settings calls this node for kfreebsd arch, and build-and-provide-package fails (because of lacking cowbuilder on kfreebsd). /etc/pbuilderrc sets MIRRORSITE and USEDEVFS=yes (which is requirement for kfreebsd arch.) Also, I can execute pbuilder manually and it successfully builds packages on kfreebsd node.

lurdan avatar Jan 30 '14 10:01 lurdan

Ok, I see. Could you please be so kind and share the command lines you used to set up the initial pbuilder environment on the kfreebsd-amd64 box (pbuilder --create ...) and which cmdline(s) you're using for building (pbuilder --build ...)? If I can reproduce your environment I might be able to provide the according pbuilder integration in j-d-g.

mika avatar Jan 30 '14 11:01 mika

Because I've used long living old image for manual pdebuild, so I've tried some test.

On the kfreebsd-amd64 box (sid):

$ sudo pbuilder --create --basetgz base-sid-kfreebsd-amd64.tgz
$ sudo pbuilder --create --architecture kfreebsd-i386 --basetgz base-sid-kfreebsd-i386.tgz 

will make the base taballs. It requires USEDEVFS=no in pbuilderrc. Without it, --create fails its last stage mounting /dev.

When building packages with images created above,

$ sudo pbuilder --build --basetgz base-sid-kfreebsd-amd64.tgz package.dsc
$ sudo pbuilder --build --basetgz base-sid-kfreebsd-i386.tgz  package.dsc

will work fine. But this time it requires USEDEVFS=yes in pbuilderrc. Without it, build fails because it can't mount /dev.

I don't know in details, though its odd behavior seems to be related to this bts... http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630813

lurdan avatar Feb 01 '14 08:02 lurdan

I see, thanks for providing the instructions, I'll see whether I can locate time to implement pbuilder support for it.

mika avatar Feb 03 '14 15:02 mika

Hi, I'd lke to use dpkg-buildpackage as builder for deb, when use docker as jenkins slaves.

As far as I know, multiple instance of pbuilder running at the same time could lead some problems. I think I could avoid it with dpkg-buildpackage and docker.

ghost avatar Aug 11 '14 07:08 ghost

Multiple instances of cowbuilder at the same time aren't a problem, there's just one problem with multiple instances running the "--update" option at the same time, I tried to address that in branch mika/flock (ping @zeha) though I haven't had the time to verify that yet.

JFTR: I welcome any patches adding support for further build tools.

mika avatar Aug 11 '14 07:08 mika

I also would like pbuilder support, since I want to mount a tmpfs at /var/cache/pbuilder/build. Cowbuilder tries to use hardlinks, which won't work across filesystems.

heftig avatar Sep 05 '14 07:09 heftig

@heftig what you can do though is using whole /var/cache/pbuilder/ in a tmpfs (which I'm doing, and by using an rsync script to disk running between reboots it's getting persistent)

mika avatar Sep 05 '14 15:09 mika