--keyring argument breaks qemu-debootstrap

Bug #671126 reported by Alex Chiang on 2010-11-04
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
pbuilder (Debian)
Fix Released
Unknown
pbuilder (Ubuntu)
Undecided
Unassigned
qemu-kvm (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: pbuilder

The file /usr/share/pbuilder/pbuilderrc defines:

# Set the debootstrap variant to 'buildd' type.
DEBOOTSTRAPOPTS=(
    '--variant=buildd'
    '--keyring' '/usr/share/keyrings/ubuntu-archive-keyring.gpg'
    )

When we create an armel chroot using pbuilder create, we call build-arm-chroot / qemu-debootstrap. The DEBOOTSTRAPOPTS arg is passed, and it turns out that qemu-debootstrap has trouble parsing the command line arguments if there is a space between the option and the value. This in turn causes the chroot creation to fail later, as we attempt to run debootstrap in the chroot:

http://pastebin.ubuntu.com/525893/

Arguably, the command line parsing of qemu-debootstrap should be fixed, but there's nothing wrong or hacky about using the --option=value style of passing arguments to debootstrap. debootstrap itself can handle both styles.

Related branches

Alex Chiang (achiang) wrote :

Change how we pass --keyring.

Alex Chiang (achiang) wrote :

After examining the debootstrap --help output and man page, it seems like all debootstrap arguments are in the form of:

--option=value

I don't see anywhere that: '--option value' is accepted (even if debootstrap implementation can correctly parse it).

Since qemu-debootstrap is merely supposed to be a wrapper around real debootstrap, and there is no way for it to know if the user is passing:

--option value vs. --singleton-option

there thus is no sane way to add support for '--option value' handling in qemu-debootstrap. The only sensible solution is to ensure that we call qemu-debootstrap with '--option=value' arguments.

I am attaching v2 of a debdiff, which now properly sets the series to natty, not maverick.

Loïc Minier (lool) wrote :

We could patch qemu-debootstrap to keep a list of debootstrap options which expect an argument and the ones which do not, but this ia a bit ugly

Right. I don't think that teaching qemu-debootstrap about all the
possible debootstrap args makes sense at all.

That is why I think patching pbuilder so it doesn't pass
confusing input to qemu-debuilder is a better solution.

Thanks.

Clint Byrum (clint-fewbar) wrote :

Alex, given what you've said thus far, it seems that there is no problem in qemu-debootstrap, it is just being more stringent than debootstrap in parsing the documented argument passing format. Would you agree? If so, this should be marked as Invalid in qemu-kvm.

Alex Chiang (achiang) wrote :

Clint, I agree that this isn't really a problem with
qemu-debootstrap. There is no sane way for qemu-debootstrap to
deal with all the possible debootstrap arguments unless you
completely replicate debootstrap command line parsing in the
wrapper, which doesn't make sense.

I agree that this bug should be Invalid in qemu-kvm.

Changed in qemu-kvm (Ubuntu):
status: New → Invalid
Marc Deslauriers (mdeslaur) wrote :

Thanks for the debdiff. Uploading now.

Changed in pbuilder (Ubuntu):
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pbuilder - 0.199ubuntu2

---------------
pbuilder (0.199ubuntu2) natty; urgency=low

  * pbuilderrc: change how we pass keyring in DEBOOTSTRAPOPTS (LP: #671126)
 -- Alex Chiang <email address hidden> Thu, 04 Nov 2010 13:23:04 -0600

Changed in pbuilder (Ubuntu):
status: Fix Committed → Fix Released
Changed in pbuilder (Debian):
status: Unknown → New
Changed in pbuilder (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.