[buildd-tools-devel] Bug#607228: Bug#607228: no way to run setup command inside a chroot
Geoffrey Thomas
gthomas at mokafive.com
Wed Feb 13 21:28:39 UTC 2013
On Mon, 3 Jan 2011, Roger Leigh wrote:
> On Wed, Dec 15, 2010 at 04:36:46PM -0500, Sam Hartman wrote:
>> When --setup-hook was implemented in terms of --chroot-setup-commands,
>> the user it is run as changed. Previously it was run as root; now it is
>> run as the build user.
>>
>> That's problematic because there no longer seems to be a way a to run
>> commands as root in the chroot.
>
> Yes, this looks like a regression, and we'll fix that so this continues
> to work for you. We might need to have setup commands that run as
> root, and some as non-root. I'll discuss it with Andres Mejia, who
> wrote these features.
Has there been progress on this? Note that Ubuntu is carrying a patch to
make --chroot-setup-commands run as root, which seems to be suboptimal for
lots of reasons (e.g., I run Debian on my laptop and Ubuntu on some work
machines, and generally expect sbuild to work fine on both provided the
chroots are clean).
>> My use case is as follows. I'm building a related set of packages that
>> inter-depend on each other under the control of a buildbot. The build
>> slave (which runs sbuild) doesn't have the permissions necessary to
>> install into any apt archive. So, I want to modify the chroot to have
>> an additional apt source. The location of that source will depend on
>> which build slave it is, and so I'm running a setup hook to do this.
>
> You might like to look at the most recent sbuild in unstable (or git).
> We create a local apt archive during the build (when using the apt or
> aptitude build-dep resolvers) and set this up and use it. These are
> ephemeral (they only last for the duration of the build), but the
> logic to do the archive setup could be reused to do what you want.
> We only use it to serve a couple of packages, but it might be useful
> for your uses as well.
Oh hey. Sam, this is exactly what I implemented in #700522. Want to try my
git branch and see if that works for your use case?
--
Geoffrey Thomas
gthomas at mokafive.com
More information about the Buildd-tools-devel
mailing list