Bug#623978: --binary-arch support for qemubuilder (with patch)
Hi, I think the patch as applies will not work for cowbuilder; but I believe cowbuilder may be already broken in behavior. Would you want to take a look ? At Mon, 25 Apr 2011 02:04:32 +0200, Mike Gabriel wrote: > > diff --git a/parameter.c b/parameter.c > index 1ae8eab..be522b2 100644 > --- a/parameter.c > +++ b/parameter.c > @@ -141,6 +141,10 @@ int load_config_file(const char* config, pbuilderconfig* > pc) > { > pc->debbuildopts=strdup(delim); > } > + else if (!strcmp(buf, "BINARY_ARCH")) > + { > + pc->binary_arch=1; > + } > else if (!strcmp(buf, "NO_COWDANCER_UPDATE")) > { > pc->no_cowdancer_update=1; > @@ -196,6 +200,7 @@ int cpbuilder_dumpconfig(pbuilderconfig* pc) >DUMPSTR(distribution); >DUMPSTR(components); >DUMPSTR(debbuildopts); > + DUMPINT(binary_arch); >DUMPSTRARRAY(inputfile); >DUMPSTRARRAY(outputfile); > > @@ -244,6 +249,7 @@ int parse_parameter(int ac, char** av, > {"distribution", required_argument, 0, 0}, > {"components", required_argument, 0, 0}, > {"debbuildopts", required_argument, 0, 0}, > +{"binary-arch", no_argument, 0, 0}, > {"inputfile", required_argument, 0, 0}, > {"outputfile", required_argument, 0, 0}, > {"architecture", required_argument, 0, 0}, > @@ -273,7 +279,6 @@ int parse_parameter(int ac, char** av, > {"removepackages", no_argument, 0, 'm'}, > {"override-config", no_argument, 0, 'm'}, > {"pkgname-logfile", no_argument, 0, 'm'}, > -{"binary-arch", no_argument, 0, 'm'}, > {"preserve-buildplace", no_argument, 0, 'm'}, > {"autocleanaptcache", no_argument, 0, 'm'}, > > @@ -447,6 +452,11 @@ int parse_parameter(int ac, char** av, > /* pass it for cowbuilder */ > PASS_TO_PBUILDER_WITH_PARAM > } > + else if (!strcmp(long_options[index_point].name,"binary-arch")) > + { > + pc.binary_arch=1; > + PBUILDER_ADD_PARAM(cmdstr); > + } > break; > case 'h': /* -h */ > case 'v': /* -v --version */ > diff --git a/parameter.h b/parameter.h > index 5bd253d..46adf4d 100644 > --- a/parameter.h > +++ b/parameter.h > @@ -38,6 +38,7 @@ typedef struct pbuilderconfig >char* distribution; >char* components; >char* debbuildopts; > + int binary_arch; > >/* files to be copied into the chroot, > and copied out of the chroot */ > diff --git a/qemubuilder.c b/qemubuilder.c > index ee58139..a5a02d0 100755 > --- a/qemubuilder.c > +++ b/qemubuilder.c > @@ -786,11 +786,21 @@ int cpbuilder_build(const struct pbuilderconfig* pc, > const char* dscfile) >char* hoststr=NULL; >char* hoststr2=NULL; >char* commandline=NULL; > - > - const char* buildopt="--binary-all"; /* TODO: add --binary-arch option */ > - > + char* buildopt=NULL; > + char* debbuildopts=NULL; > + > + debbuildopts=pc->debbuildopts; > + if (pc->binary_arch) { > +buildopt="--binary-arch"; > +asprintf(&debbuildopts, > +"%s -B", > +debbuildopts); > + } else { > +buildopt="--binary-all"; > + } > + >hoststr=copy_dscfile(dscfile, pc->buildplace); > - > + >asprintf(&commandline, >/* TODO: executehooks D: */ >"/usr/lib/pbuilder/pbuilder-satisfydepends --control > $PBUILDER_MOUNTPOINT/*.dsc --internal-chrootexec 'chroot . ' %s \n" > @@ -800,7 +810,7 @@ int cpbuilder_build(const struct pbuilderconfig* pc, > const char* dscfile) >"cd $PBUILDER_MOUNTPOINT/*-*/; dpkg-buildpackage -us -uc %s\n", >buildopt, >dscfile, > - pc->debbuildopts); > + debbuildopts); > >/* Obscure assumption!: assume _ is significant for package name and > no other file will have _. */ > > > --=_misv7d7acht-- -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#623978: --binary-arch support for qemubuilder (with patch)
Hi Junichi, On Mo 04 Jul 2011 00:04:33 CEST Junichi Uekawa wrote: Hi, I think the patch as applies will not work for cowbuilder; but I believe cowbuilder may be already broken in behavior. Would you want to take a look ? I haven't played with cowbuilder yet, only qemubuilder. As I have already cloned your Git and created a branch, I'd love to contribute to qemubuilder (I use it quite heavily). But for testing cowbuilder I do not feel like having the time. This might change. Will that be a show-stopper? If yes, I may put looking after cowbuilder on my list, but it will have low prio. Sorry for this half-baked answer, Mike -- DAS-NETZWERKTEAM mike gabriel, dorfstr. 27, 24245 barmissen fon: +49 (4302) 281418, fax: +49 (4302) 281419 GnuPG Key ID 0xB588399B mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb pgpz1nBInkUjS.pgp Description: Digitale PGP-Unterschrift
Bug#623978: --binary-arch support for qemubuilder (with patch)
Package: qemubuilder Version: 0.62+nmu2 The applied patch adds --binary-arch support to qemubuilder. The patch has been created against the pbuilder/cowdancer.git on git.debian.org. Thanks for taking a look at it... Mike -- DAS-NETZWERKTEAM mike gabriel, dorfstr. 27, 24245 barmissen fon: +49 (4302) 281418, fax: +49 (4302) 281419 GnuPG Key ID 0xB588399B mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb Package: qemubuilder Version: 0.62+nmu2 The applied patch adds --binary-arch support to qemubuilder. The patch has been created against the pbuilder/cowdancer.git on git.debian.org. Thanks for taking a look at it... Mike -- DAS-NETZWERKTEAM mike gabriel, dorfstr. 27, 24245 barmissen fon: +49 (4302) 281418, fax: +49 (4302) 281419 GnuPG Key ID 0xB588399B mail: mike.gabr...@das-netzwerkteam.de, http://das-netzwerkteam.de freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb diff --git a/parameter.c b/parameter.c index 1ae8eab..be522b2 100644 --- a/parameter.c +++ b/parameter.c @@ -141,6 +141,10 @@ int load_config_file(const char* config, pbuilderconfig* pc) { pc->debbuildopts=strdup(delim); } + else if (!strcmp(buf, "BINARY_ARCH")) + { + pc->binary_arch=1; + } else if (!strcmp(buf, "NO_COWDANCER_UPDATE")) { pc->no_cowdancer_update=1; @@ -196,6 +200,7 @@ int cpbuilder_dumpconfig(pbuilderconfig* pc) DUMPSTR(distribution); DUMPSTR(components); DUMPSTR(debbuildopts); + DUMPINT(binary_arch); DUMPSTRARRAY(inputfile); DUMPSTRARRAY(outputfile); @@ -244,6 +249,7 @@ int parse_parameter(int ac, char** av, {"distribution", required_argument, 0, 0}, {"components", required_argument, 0, 0}, {"debbuildopts", required_argument, 0, 0}, +{"binary-arch", no_argument, 0, 0}, {"inputfile", required_argument, 0, 0}, {"outputfile", required_argument, 0, 0}, {"architecture", required_argument, 0, 0}, @@ -273,7 +279,6 @@ int parse_parameter(int ac, char** av, {"removepackages", no_argument, 0, 'm'}, {"override-config", no_argument, 0, 'm'}, {"pkgname-logfile", no_argument, 0, 'm'}, -{"binary-arch", no_argument, 0, 'm'}, {"preserve-buildplace", no_argument, 0, 'm'}, {"autocleanaptcache", no_argument, 0, 'm'}, @@ -447,6 +452,11 @@ int parse_parameter(int ac, char** av, /* pass it for cowbuilder */ PASS_TO_PBUILDER_WITH_PARAM } + else if (!strcmp(long_options[index_point].name,"binary-arch")) + { + pc.binary_arch=1; + PBUILDER_ADD_PARAM(cmdstr); + } break; case 'h': /* -h */ case 'v': /* -v --version */ diff --git a/parameter.h b/parameter.h index 5bd253d..46adf4d 100644 --- a/parameter.h +++ b/parameter.h @@ -38,6 +38,7 @@ typedef struct pbuilderconfig char* distribution; char* components; char* debbuildopts; + int binary_arch; /* files to be copied into the chroot, and copied out of the chroot */ diff --git a/qemubuilder.c b/qemubuilder.c index ee58139..a5a02d0 100755 --- a/qemubuilder.c +++ b/qemubuilder.c @@ -786,11 +786,21 @@ int cpbuilder_build(const struct pbuilderconfig* pc, const char* dscfile) char* hoststr=NULL; char* hoststr2=NULL; char* commandline=NULL; - - const char* buildopt="--binary-all"; /* TODO: add --binary-arch option */ - + char* buildopt=NULL; + char* debbuildopts=NULL; + + debbuildopts=pc->debbuildopts; + if (pc->binary_arch) { +buildopt="--binary-arch"; +asprintf(&debbuildopts, +"%s -B", +debbuildopts); + } else { +buildopt="--binary-all"; + } + hoststr=copy_dscfile(dscfile, pc->buildplace); - + asprintf(&commandline, /* TODO: executehooks D: */ "/usr/lib/pbuilder/pbuilder-satisfydepends --control $PBUILDER_MOUNTPOINT/*.dsc --internal-chrootexec 'chroot . ' %s \n" @@ -800,7 +810,7 @@ int cpbuilder_build(const struct pbuilderconfig* pc, const char* dscfile) "cd $PBUILDER_MOUNTPOINT/*-*/; dpkg-buildpackage -us -uc %s\n", buildopt, dscfile, - pc->debbuildopts); + debbuildopts); /* Obscure assumption!: assume _ is significant for package name and no other file will have _. */ diff --git a/parameter.c b/parameter.c index 1ae8eab..be522b2 100644 --- a/parameter.c +++ b/parameter.c @@ -141,6 +141,10 @@ int load_config_file(const char* config, pbuilderconfig* pc) { pc->debbuildopts=strdup(delim); } + else if (!strcmp(buf, "BINARY_ARCH")) + { + pc->binary_arch=1; + } else if (!strcmp(buf, "NO_COWDANCER_UPDATE")) { pc->no_cowdancer_update=1; @@ -19