Package: cowbuilder
Version: 0.71
Severity: normal

Here is the error I encountered with proxyed MIRRORSITE like:
MIRRORSITE=http://[::1]:3142/ftp.jp.debian.org/debian/

(Yes, I have IPv6 and local apt-cacher-ng running.)

Invalid URL string for the download is generated.
  'http://[::1]:3142/ftp.jp.debian.org/debian/'/dists/sid/Release
This should have been:
  http://[::1]:3142/ftp.jp.debian.org/debian//dists/sid/Release

Here is the log with error:
--------------------------------------------------------------------------------------
$ grep ^MIRRORSITE /etc/pbuilderrc
MIRRORSITE=http://[::1]:3142/ftp.jp.debian.org/debian/
$ sudo rm -rf /var/cache/pbuilder/base.cow
$ sudo cowbuilder --create --dist sid --basepath /var/cache/pbuilder/base.cow
 -> Invoking pbuilder
  forking: pbuilder create --buildplace /var/cache/pbuilder/base.cow --mirror 
'http://[::1]:3142/ftp.jp.debian.org/debian/' --distribution sid --no-targz 
--extrapackages cowdancer 
W: /root/.pbuilderrc does not exist
I: Running in no-targz mode
I: Distribution is sid.
I: Current time: Sun Jun 23 13:47:00 JST 2013
I: pbuilder-time-stamp: 1371962820
I: Building the build environment
I: running debootstrap
/usr/sbin/debootstrap
I: Retrieving Release
E: unknown location 
'http://[::1]:3142/ftp.jp.debian.org/debian/'/dists/sid/Release
E: debootstrap failed
W: Aborting with an error
pbuilder create failed
  forking: rm -rf /var/cache/pbuilder/base.cow 
--------------------------------------------------------------------------------------

This is clearly something to do with wrapper string handling of
cowbuilder since pbuilder itself works fine as below

--------------------------------------------------------------------------------------
$ sudo rm -rf /var/cache/pbuilder/base.cow
$ sudo mkdir -p /var/cache/pbuilder/base.cow
$ sudo pbuilder create --buildplace /var/cache/pbuilder/base.cow --mirror 
'http://[::1]:3142/ftp.jp.debian.org/debian/' --distribution sid --no-targz 
--extrapackages cowdancer
W: /root/.pbuilderrc does not exist
I: Running in no-targz mode
I: Distribution is sid.
I: Current time: Sun Jun 23 13:51:18 JST 2013
I: pbuilder-time-stamp: 1371963078
I: Building the build environment
I: running debootstrap
/usr/sbin/debootstrap
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
... snip
--------------------------------------------------------------------------------------

cowbuilder problem does not happen for MIRROR URL:
MIRRORSITE=http://ftp.jp.debian.org/debian/

It is quite suspicious to see single quote for MIRROR URL and
corresponding error in "sudo cowbuilder --create ..." log.

--------------------------------------------------------------------------------------
$ svi /etc/pbuilderrc
$ sudo rm -rf /var/cache/pbuilder/base.cow
$ grep ^MIRRORSITE /etc/pbuilderrc
MIRRORSITE=http://ftp.jp.debian.org/debian/
$ sudo cowbuilder --create --dist sid --basepath /var/cache/pbuilder/base.cow
 -> Invoking pbuilder
  forking: pbuilder create --buildplace /var/cache/pbuilder/base.cow --mirror 
http://ftp.jp.debian.org/debian/ --distribution sid --no-targz --extrapackages 
cowdancer 
W: /root/.pbuilderrc does not exist
I: Running in no-targz mode
I: Distribution is sid.
I: Current time: Sun Jun 23 13:56:23 JST 2013
I: pbuilder-time-stamp: 1371963383
I: Building the build environment
I: running debootstrap
/usr/sbin/debootstrap
I: Retrieving Release
I: Retrieving Release.gpg
I: Checking Release signature
I: Valid Release signature (key id A1BD8E9D78F7FE5C3E65D8AF8B48AD6246925553)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
... snip
--------------------------------------------------------------------------------------

No single quotations seen on pbuilder line here and no problem.

So the problem is before printing this message.

This "forking:" message is printed by either by forkexecvp or forkexeclp in
forkexec.c.

In cowbuilder.c, I see:
$ grep -n forkexec cowbuilder.c 
1:/*BINFMTC: parameter.c forkexec.c ilistcreate.c main.c
66:  return forkexeclp("rm", "rm", "-rf", path, NULL);
185:  if (0!=forkexeclp("cp", "cp", "-al", pc->basepath, pc->buildplace, NULL))
287:  if (forkexeclp("chroot",
301:      if (forkexeclp("chroot",
351:  ret=forkexecvp(pbuildercommandline);
388:  ret=forkexecvp(pbuildercommandline);
471:  ret=forkexecvp(pbuildercommandline);
477:      if (0!=forkexeclp("chroot", "chroot", pc->buildplace, "apt-get", 
"clean", NULL))
530:  ret=forkexecvp(pbuildercommandline);
536:      if (0!=forkexeclp("chroot", "chroot", pc->buildplace, "apt-get", 
"clean", NULL))
636:  ret=forkexecvp(pbuildercommandline);

So this is from one of the 351 388 530 636.  So bug exist in how
pbuildercommandline is build.  Hmmm. cpbuilder_create seems to be the
source of problem.

(pc->mirror) should be the source.  

$ grep cpbuilder_create *
...
parameter.c:      return cpbuilder_create(&pc);
...

OK line 556:
    case pbuilder_create:
      if (av[optind])
        {
          /* extra parameter */
          fprintf(stderr, "E: too many parameters for create\n");
          return 1;
        }
      return cpbuilder_create(&pc);


This is in parse_parameter between 226-556

I think you know better than me to fix this.

Osamu

-- System Information:
Debian Release: 7.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.8-trunk-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages cowbuilder depends on:
ii  cowdancer  0.71
ii  libc6      2.13-38
ii  pbuilder   0.213

cowbuilder recommends no packages.

cowbuilder suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to