Package: qemubuilder Version: 0.66 Severity: normal Tags: patch Hi,
here the requested reminder Creation stops after running the second stage of debootstrap, when apt on the target wants to update with following error: > I: Base system installed successfully. > rm: cannot remove `/etc/udev/disabled': No such file or directory > mkdir: cannot create directory `/dev/pts': File exists > I: copying /etc/hosts from temporary location > I: copying /etc/hostname from temporary location > Ign http://ftp.de.debian.org testing InRelease > Err http://ftp.de.debian.org testing Release.gpg > > Unable to connect to ftp.de.debian.org:http: > .... > W: Failed to fetch http://ftp.de.debian.org//debian/dists/testing/non\ > -free/i18n/Translation-en Unable to connect to \ > ftp.de.debian.org:http: > > E: Some index files failed to download. They have been ignored, or \ > old ones used instead. > > -> received termination message from inside qemu with exit-code 0,\ > killing child process (qemu:4786) > -> successfully killed qemu I included a patch for letting apt know about the proxy. It's not beautyful, but it works as I expect it. -- System Information: Debian Release: wheezy/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 3.0.4 (SMP w/1 CPU core) Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages qemubuilder depends on: ii debootstrap 1.0.38 ii libc6 2.13-23 ii pbuilder 0.204 ii qemu 0.15.1+dfsg-3 qemubuilder recommends no packages. qemubuilder suggests no packages. -- no debconf information -- MfG usw. Werner Mahr registered Linuxuser: 295882
commit 3462c28bcd887f942d560d38be512b1a0ca61fa3 Author: Vollstrecker <am...@vollstreckernet.de> Date: Fri Dec 23 04:11:26 2011 +0100 Add Proxy for apt in virtual machine diff --git a/parameter.c b/parameter.c index a45d2c3..782d464 100644 --- a/parameter.c +++ b/parameter.c @@ -161,6 +161,10 @@ int load_config_file(const char* config, pbuilderconfig* pc) { pc->arch_diskdevice=strdup(delim); } + else if (!strcmp(buf, "HTTP_PROXY")) + { + pc->http_proxy=strdup(delim); + } } } @@ -206,6 +210,7 @@ int cpbuilder_dumpconfig(pbuilderconfig* pc) DUMPSTR(othermirror); DUMPSTR(debbuildopts); DUMPINT(binary_arch); + DUMPSTR(http_proxy); DUMPSTRARRAY(inputfile); DUMPSTRARRAY(outputfile); diff --git a/parameter.h b/parameter.h index 2596aea..e3d8536 100644 --- a/parameter.h +++ b/parameter.h @@ -40,6 +40,7 @@ typedef struct pbuilderconfig char* othermirror; char* debbuildopts; int binary_arch; + char* http_proxy; /* files to be copied into the chroot, and copied out of the chroot */ diff --git a/qemubuilder.c b/qemubuilder.c index f25ae27..691dae8 100755 --- a/qemubuilder.c +++ b/qemubuilder.c @@ -680,6 +680,22 @@ int cpbuilder_create(const struct pbuilderconfig* pc) ); fclose(f); + if (pc->http_proxy != NULL) + { + f = create_script(pc->buildplace, "etc/apt/apt.conf"); + fprintf(f, + "Acquire\n" + "{\n" + "http \n" + "{\n" + "Proxy \"%s\";\n" + "};\n" + "};\n", + pc->http_proxy + ); + fclose(f); + } + free(s); s=0; ret=loop_umount(pc->buildplace);