Building Debian Packages In Scratchbox

Every week I spend half an hour wondering why I can't build Debian packages inside Scratchbox. The error is "you must be root" which is solved with fakeroot, but I'm already running debuild with fakeroot...

That, of course, is the problem. debuild will clean the environment before starting dpkg-buildpackage, which wipes all traces of the Scratchbox magic away, breaking fakeroot. Despite debuild being an essential wrapper around dpkg-buildpackage in the normal Debian world, in a Scratchbox it's a big no no. I really must remember this!

NP: Debut, Björk

16:53 Tuesday, 11 Apr 2006 [#] [computers] (2 comments)

Posted by Tommi Komulainen at Tue Apr 11 17:42:24 2006:
So someone just needs to go and fix /scratchbox/devkits/debian/bin/debuild ? :)
Posted by Simon Ruggier at Fri Dec 28 22:15:53 2007:
As crazy as it is that Nokia hasn't done something to make debuild usable even with OS2008, one can hack around it by adding the following to ~/.devscripts:

DEBUILD_PRESERVE_ENVVARS=PATH
DEBUILD_PRESERVE_ENV=yes


It's not exactly debuild if it no longer cleans the environment, but at least one doesn't have to type dpkg-buildpackage -rfakeroot...

Name:


E-mail:


URL:


Add 7 and 3 (required):


Comment: