Bug#516625: pbuilder: pdebuild signs wrong .changes when building with --arch=i386 on amd64

Loïc Minier lool at dooz.org
Sat Jan 2 11:41:53 UTC 2010


On Thu, Dec 31, 2009, Junichi Uekawa wrote:
> Note that qemubuilder is somewhat already client-server model, because
> we don't quite have a good communication path between inside the qemu
> session and outside the qemu session.
> 
> Inside qemu, it's a shell script using stdio (which is hooked up with serial console.)
> 
> Outside qemu, it's a C program which invokes qemu with appropriate parameter.

 Ack, I was told about this hack by the developer of "project-rootstock"
 which he used: a qemu serial port to control scripts within qemu.

> qemubuilder.c looks for pattern of 'END OF WORK EXIT CODE=' which is
> output from the shell script inside the qemu session. (used in
> obtaining the exit code and shutdown).
> I think the IPC doesn't have to be bidirectional, so in theory
> pdebuild could send something out in stdout with a special keyword.

 I thought of that, but didn't want to go that route; I found that a bit
 fragile.

 I think we can actually do bidirectional PIC with two FIFOs instead of
 a pipe + a FIFO (problem of the pipe is that it means a subshell, so
 it's hard to capture anything in the main process for later processing).

> Having a server/client model is nice as well, but probably something
> overkill for this specific bug.

 Ack; I implemented --architecture instead (for now).  I think that
 recording the ARCHITECTURE in a configfile (profile) would make the
 problem simply go away.

 Perhaps another completely different approach to the problem would be
 to use a tempdir and copy all files matching a pattern.  e.g.:
   host                           guest

1) start build
                               2) build outputs .dsc, .deb, .changes
3) copy *.dsc *.deb *.changes


 Another completely different approach would be to re-architecture
 pbuilder to have separate commands for creating a build env and doing
 the build (or running a command).  When I decided to use IPC, it was
 between the within the host and guest processes because that didn't
 change the number of processes or overall architecture too much, but if
 instead we change "create a build env, build this and destroy build
 env" into "create a build env" + "run this" + "destroy build env", we
 could run dpkg --print-architecture in the build env before build.
   That's probably sane, but a bit subtle to implement in all builders.
 It's almost the same burden as the IPC approach in terms of effort, but
 less risky/complex (but less flexible, I think).


 I'm a bit split on whether we want to rearchitect pbuilder that much.

-- 
Loïc Minier





More information about the Pbuilder-maint mailing list