* pbuilder-dist: allow any foreign chroot (may not work, but we can try)

* docs/pbuilder-dist.1: update manpage to indicate general architecture
This commit is contained in:
Emmet Hikory 2010-03-08 18:54:54 +09:00
parent 510cdbd726
commit e5862f49c9
3 changed files with 19 additions and 20 deletions

4
debian/changelog vendored
View File

@ -7,8 +7,10 @@ ubuntu-dev-tools (0.94) UNRELEASED; urgency=low
[ Emmet Hikory ] [ Emmet Hikory ]
* mk-sbuild: switch to use qemu-debootstrap for foreign chroots * mk-sbuild: switch to use qemu-debootstrap for foreign chroots
* mk-sbuild: allow any foreign chroot (may not work, but we can try) * mk-sbuild: allow any foreign chroot (may not work, but we can try)
* pbuilder-dist: allow any foreign chroot (may not work, but we can try)
* docs/pbuilder-dist.1: update manpage to indicate general architecture
-- Emmet Hikory <persia@ubuntu.com> Mon, 08 Mar 2010 17:56:30 +0900 -- Emmet Hikory <persia@ubuntu.com> Mon, 08 Mar 2010 18:51:19 +0900
ubuntu-dev-tools (0.93) lucid; urgency=low ubuntu-dev-tools (0.93) lucid; urgency=low

View File

@ -4,10 +4,10 @@
pbuilder\-dist, cowbuilder\-dist \- multi-distribution pbuilder/cowbuilder wrapper pbuilder\-dist, cowbuilder\-dist \- multi-distribution pbuilder/cowbuilder wrapper
.SH SYNOPSIS .SH SYNOPSIS
\fBpbuilder\-dist\fP \fIdistribution\fR [\fBi386\fP|\fBamd64\fP|\fBarmel\fP] [\fBmainonly\fP] \fBpbuilder\-dist\fP \fIdistribution\fR [\fIarchitecture\fR] [\fBmainonly\fP]
\fIoperation\fR [\fI...\fR] \fIoperation\fR [\fI...\fR]
\fBcowbuilder\-dist\fP \fIdistribution\fR [\fBi386\fP|\fBamd64\fP|\fBarmel\fP] [\fBmainonly\fP] \fBcowbuilder\-dist\fP \fIdistribution\fR [\fIarchitecture\fR] [\fBmainonly\fP]
\fIoperation\fR [\fI...\fR] \fIoperation\fR [\fI...\fR]
.SH DESCRIPTION .SH DESCRIPTION
@ -15,8 +15,8 @@ pbuilder\-dist, cowbuilder\-dist \- multi-distribution pbuilder/cowbuilder wrapp
versions of Ubuntu and/or Debian. versions of Ubuntu and/or Debian.
.PP .PP
It is common to symlink this script in order to give it many names in the form of It is common to symlink this script in order to give it many names in the form of
\fBpbuilder\-\fIdistribution\fP\fR (\fBpbuilder\-\fIdistribution\fR\-\fIarchitecture\fP\fR on amd64 \fBpbuilder\-\fIdistribution\fP\fR or \fBpbuilder\-\fIdistribution\fR\-\fIarchitecture\fP\fR,
systems), like for example \fBpbuilder\-feisty\fP, \fBpbuilder\-sid\fP, \fBpbuilder\-gutsy\-i386\fP, etc. like for example \fBpbuilder\-feisty\fP, \fBpbuilder\-sid\fP, \fBpbuilder\-gutsy\-i386\fP, etc.
.PP .PP
The same applies to \fBcowbuilder\-dist\fP, which uses cowbuilder. The main The same applies to \fBcowbuilder\-dist\fP, which uses cowbuilder. The main
difference between both is that pbuilder compresses the created chroot as a difference between both is that pbuilder compresses the created chroot as a
@ -33,12 +33,13 @@ the name also contains \-\fIarchitecture\fR.
\fBdistribution\fP \fBdistribution\fP
Replace this with the codename of the version of Ubuntu or Debian you want to use. Replace this with the codename of the version of Ubuntu or Debian you want to use.
.TP .TP
\fBi386\fP / \fBamd64\fP / \fBarmel\fP \fBarchitecture\fP
Only available on i386 and amd64 systems. This optional parameter will attempt to construct a chroot in a foreign
This is optional; default is the native architecture architecture. For some architecture pairs (e.g. i386 on an amd64 install),
If \fBi386\fP is specified, an i386 environment will be used. the chroot will be created natively. For others (e.g. armel on an i386
If \fBarmel\fP is specified, an armel environment will be used. install), qemu-static and binfmt-misc will be used. Note that some
Note that there is no support for amd64 chroots on i386 systems combinations (e.g. amd64 on an i386 install) require special separate
kernel handling, and may break in unexpected ways.
.TP .TP
\fBmainonly\fP \fBmainonly\fP
If you specify \fBmainonly\fP, only packages from the main (in Debian) or If you specify \fBmainonly\fP, only packages from the main (in Debian) or

View File

@ -310,20 +310,16 @@ def main():
if len(parts) > 2: if len(parts) > 2:
requested_arch = parts[2] requested_arch = parts[2]
elif len(args) > 0 and args[0] in ('i386', 'amd64', 'armel'): elif len(args) > 0 and args[0] in ("alpha", "amd64", "arm", "armeb", "armel", "i386", "lpia", "m68k", "mips", "mipsel", "powerpc", "ppc64", "sh4", "sh4eb", "sparc", "sparc64"):
requested_arch = args.pop(0) requested_arch = args.pop(0)
else: else:
requested_arch = None requested_arch = None
if requested_arch: if requested_arch:
if requested_arch in ('i386', 'amd64') and app.system_architecture == 'amd64':
app.build_architecture = requested_arch app.build_architecture = requested_arch
elif requested_arch == 'armel' and app.system_architecture in ('i386', 'amd64'): # For some foreign architectures we need to use qemu
app.build_architecture = requested_arch if requested_arch != app.system_architecture and (requested_arch, app.system_architecture) not in (("amd64", "i386"), ("amd64", "lpia"), ("arm", "armel"), ("armel", "arm"), ("i386", "lpia"), ("lpia", "i386"), ("powerpc", "ppc64"), ("ppc64", "powerpc"), ("sparc", "sparc64"), ("sparc64", "sparc")):
args.append('--debootstrap build-arm-chroot') args.append('--debootstrap qemu-debootstrap')
else:
print 'Error: Architecture switching is not supported on your system; wrong filename.'
sys.exit(1)
if 'mainonly' in sys.argv: if 'mainonly' in sys.argv:
app.extra_components = False app.extra_components = False