debootstrap: Empty version for dpkg in /var/lib/dpkg/status when bootstraping woody

Bug #7379 reported by Debian Bug Importer
6
Affects Status Importance Assigned to Milestone
debootstrap (Debian)
Fix Released
Unknown
debootstrap (Ubuntu)
Invalid
High
Colin Watson

Bug Description

Automatically imported from Debian bug report #264869 http://bugs.debian.org/264869

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Automatically imported from Debian bug report #264869 http://bugs.debian.org/264869

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <20040810184001.GA2035@deb1>
Date: 10 Aug 2004 14:40:01 -0400
From: "Arcady Genkin" <email address hidden>
To: "Debian Bug Tracking System" <email address hidden>
Subject: debootstrap: Empty version for dpkg in /var/lib/dpkg/status when bootstraping woody

Package: debootstrap
Version: 0.1.17
Severity: grave
Justification: renders package unusable

I can reproduce this bug with the following versions of debootstrap
0.1.17, 0.2.39.1, 0.2.41-0.2 (the latter two built as source DEBs)
under woody. The bug exists when trying to bootstrap woody. I noticed
the bug when using debootsrap from under make-fai-nfsroot script of the
`fai' debian package, but later found that the problem exists when using
debootstrap directly.

In a nutshell, the command:

  debootstrap --arch i386 woody \
 /tmp/nfsroot file:/debmirror/debian

fails with the following error message:

I: Installing core packages...
dpkg: parse error, in file `/var/lib/dpkg/status' near line 2 package `dpkg':
 error in Version string `': version string is empty
W: Failure trying to run: chroot /tmp/nfsroot dpkg --force-depends
 --install /var/cache/apt/archives/base-files_3.0.2_i386.deb
 /var/cache/apt/archives/base-passwd_3.4.1_i386.deb

The same failure is observed when used with the official Debian
mirror (i.e. http://ftp.debian.org/debian/ instead of the file: URI),
so I don't think that this is a mirror problem.

The full output of the above invocation of debootstrap can be viewed here:
http://www.cdf.toronto.edu/~agenkin/tmp/debootstrap/debootstrap_out.txt
The full output of the above command run with "sh -x" can be viewed here:
http://www.cdf.toronto.edu/~agenkin/tmp/debootstrap/debootstrap_out.sh-x.txt

Note that I had a look at the Debian bug #193788, but the proposed
solution didn't work for me.

The below crude hack by Holger Mense seems to let me work around the problem
and get going for now, so I think that the problem is with setting the
$ver variable properly in the scripts/woody script.

=== cut ===
--- /usr/lib/debootstrap/scripts/woody.orig Wed Jun 16 15:22:39 2004
+++ /usr/lib/debootstrap/scripts/woody Wed Jun 16 15:22:46 2004
@@ -119,7 +119,7 @@

         echo \
 "Package: $pkg
-Version: $ver
+Version: 1.9.21
 Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"

         touch "$TARGET/var/lib/dpkg/info/${pkg}.list"
=== cut ===

It seems that I am not the only one observing this problem; for more
discussion, you may want to have a look at the following thread on the
FAI mailing list:

http://www.mail-archive.com/linux-fai%40rrz.uni-koeln.de/msg02029.html

-- System Information
Debian Release: 3.0
Architecture: i386
Kernel: Linux deb1 2.4.25-i386-cdf-workstation #1 Mon Apr 19 17:01:18 EDT 2004 i686
Locale: LANG=C, LC_CTYPE=C

Versions of packages debootstrap depends on:
ii libc6 2.2.5-11.5 GNU C Library: Shared libraries an
ii wget 1.9.1-3.backports.org.1 retrieves files from the web

Many thanks,
--
Arcady Genkin : CDF Systems Administrator
http://www.cdf.toronto.edu/~agenkin/contact.html

Revision history for this message
In , J.H.M. Dassen (Ray) (jdassen) wrote :

tags 264869 + woody
thanks

On Tue, Aug 10, 2004 at 14:40:01 -0400, Arcady Genkin wrote:
> Version: 0.1.17

Woody version.

> I can reproduce this bug with the following versions of debootstrap
> 0.1.17, 0.2.39.1, 0.2.41-0.2 (the latter two built as source DEBs)
> under woody.

I.e. only on woody systems, and only with the woody version of debootstrap
and with unofficial backports.
--
First they ignore you.
Then they laugh at you.
Then they fight you.
Then you win. - Gandhi

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Wed, 11 Aug 2004 08:34:18 +0200
From: "J.H.M. Dassen (Ray)" <email address hidden>
To: <email address hidden>
Subject: Re: debootstrap: Empty version for dpkg in /var/lib/dpkg/status when bootstraping woody

tags 264869 + woody
thanks

On Tue, Aug 10, 2004 at 14:40:01 -0400, Arcady Genkin wrote:
> Version: 0.1.17

Woody version.

> I can reproduce this bug with the following versions of debootstrap
> 0.1.17, 0.2.39.1, 0.2.41-0.2 (the latter two built as source DEBs)
> under woody.

I.e. only on woody systems, and only with the woody version of debootstrap
and with unofficial backports.
--
First they ignore you.
Then they laugh at you.
Then they fight you.
Then you win. - Gandhi

Revision history for this message
In , Holger Mense (hmense) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Andreas Schockenhoff pointed out in a posting to the fai mailinglist, that
this bug is related to not using the woody version of sed.
(http://www.uni-koeln.de/bin2/maillist/linux-fai/20040810.210801/165312).
Instead of sed 3, sed 4 from backports was installed, when this bug
occured.

# dpkg -l sed
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-====================-====================-========================================================
ii sed 4.0.9-2.backports.or The GNU sed stream editor

The following patch should correct the problem and decides on the sed
version number, which sed commands to use:

=== cut ===
- --- woody.orig Mon Aug 9 21:14:07 2004
+++ woody Wed Aug 18 11:03:35 2004
@@ -112,7 +112,12 @@
         local ver="$(
             ar -p "$TARGET/$deb" control.tar.gz | zcat |
                 tar -O -xf - control ./control 2>/dev/null |
- - sed -ne 's/^Version: *//Ip' | head -n 1
+ if [ `sed --version | head -1 | awk '{ print $4}' | cut -d. -f1` -gt 3 ] ; then
+ sed -ne 's/^Version: *//p' | head -n 1
+ else
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ fi
+
         )"

         mkdir -p "$TARGET/var/lib/dpkg/info"
=== cut ===

MfG Holger Mense

- --
Holger Mense
Rechnerbetrieb Mathematik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBIx61HjdfhHqYjTQRAlAaAJ4zIhvuCwWofcayl5UL3mLtNQFKMwCePKmP
8tXOM/MojD8DaPxBedPUvPE=
=iWMa
-----END PGP SIGNATURE-----

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Wed, 18 Aug 2004 11:17:36 +0200 (MEST)
From: Holger Mense <email address hidden>
To: <email address hidden>
Subject: debootstrap: Empty version for dpkg in /var/lib/dpkg/status when
 bootstraping woody

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

Andreas Schockenhoff pointed out in a posting to the fai mailinglist, that
this bug is related to not using the woody version of sed.
(http://www.uni-koeln.de/bin2/maillist/linux-fai/20040810.210801/165312).
Instead of sed 3, sed 4 from backports was installed, when this bug
occured.

# dpkg -l sed
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-====================-====================-========================================================
ii sed 4.0.9-2.backports.or The GNU sed stream editor

The following patch should correct the problem and decides on the sed
version number, which sed commands to use:

=== cut ===
- --- woody.orig Mon Aug 9 21:14:07 2004
+++ woody Wed Aug 18 11:03:35 2004
@@ -112,7 +112,12 @@
         local ver="$(
             ar -p "$TARGET/$deb" control.tar.gz | zcat |
                 tar -O -xf - control ./control 2>/dev/null |
- - sed -ne 's/^Version: *//Ip' | head -n 1
+ if [ `sed --version | head -1 | awk '{ print $4}' | cut -d. -f1` -gt 3 ] ; then
+ sed -ne 's/^Version: *//p' | head -n 1
+ else
+ sed -ne 's/^Version: *//Ip' | head -n 1
+ fi
+
         )"

         mkdir -p "$TARGET/var/lib/dpkg/info"
=== cut ===

MfG Holger Mense

- --
Holger Mense
Rechnerbetrieb Mathematik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBIx61HjdfhHqYjTQRAlAaAJ4zIhvuCwWofcayl5UL3mLtNQFKMwCePKmP
8tXOM/MojD8DaPxBedPUvPE=
=iWMa
-----END PGP SIGNATURE-----

Revision history for this message
Matt Zimmerman (mdz) wrote :

woody problem

Revision history for this message
In , Anthony Towns (aj-azure) wrote : Re: Bug#264869: debootstrap: Empty version for dpkg in /var/lib/dpkg/status when bootstrapping woody

> Andreas Schockenhoff pointed out in a posting to the fai mailinglist, that
> this bug is related to not using the woody version of sed.
> (http://www.uni-koeln.de/bin2/maillist/linux-fai/20040810.210801/165312).
> Instead of sed 3, sed 4 from backports was installed, when this bug
> occured.

Hrm. busybox sed only supports "I", not "i"; POSIX/the Open Group don't
specify either.

I think this has to go down to a bug in sed -- in this case the sed
4.0.9 backport. :( The same version (4.0.9-2) works fine for me on a
sarge box, FWIW.

Report closed with this message.

Cheers,
aj

--
Anthony Towns <email address hidden> <http://azure.humbug.org.au/~aj/>
Don't assume I speak for anyone but myself. GPG signed mail preferred.

``Like the ski resort of girls looking for husbands and husbands looking
  for girls, the situation is not as symmetrical as it might seem.''

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-ID: <email address hidden>
Date: Fri, 1 Oct 2004 20:26:51 +1000
From: Anthony Towns <email address hidden>
To: <email address hidden>
Subject: Re: Bug#264869: debootstrap: Empty version for dpkg in /var/lib/dpkg/status when
 bootstrapping woody

--rwEMma7ioTxnRzrJ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

> Andreas Schockenhoff pointed out in a posting to the fai mailinglist, that
> this bug is related to not using the woody version of sed.
> (http://www.uni-koeln.de/bin2/maillist/linux-fai/20040810.210801/165312).
> Instead of sed 3, sed 4 from backports was installed, when this bug
> occured.

Hrm. busybox sed only supports "I", not "i"; POSIX/the Open Group don't
specify either.=20

I think this has to go down to a bug in sed -- in this case the sed
4.0.9 backport. :( The same version (4.0.9-2) works fine for me on a
sarge box, FWIW.

Report closed with this message.

Cheers,
aj

--=20
Anthony Towns <email address hidden> <http://azure.humbug.org.au/~aj/>
Don't assume I speak for anyone but myself. GPG signed mail preferred.

``Like the ski resort of girls looking for husbands and husbands looking
  for girls, the situation is not as symmetrical as it might seem.''

--rwEMma7ioTxnRzrJ
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iEYEARECAAYFAkFdMOoACgkQOxe8dCpOPqoSoQCeJYZH6faoFd+qtlNbW+kTuuaj
4f8AnAjlXYoMJMWy76tiv/DaZzSgsWqm
=TqHq
-----END PGP SIGNATURE-----

--rwEMma7ioTxnRzrJ--

Revision history for this message
Daniel Robitaille (robitaille) wrote :

closed in Debian in 2004

Changed in debootstrap:
status: Unconfirmed → Rejected
Changed in debootstrap:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.