apt-ftparchive generates corrupt Sources stanzas for .dsc files without Checksums-* fields

Bug #633967 reported by Colin Watson
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Critical
Unassigned
Lucid
Critical
Unassigned
Maverick
Critical
Unassigned

Bug Description

Binary package hint: apt

TEST CASE:
1. use lucid
2. run ( cd /tmp ; apt-get source -d appconfig ; apt-ftparchive sources .)
3. verify that there is a empty line between Checksums-Sha1 and Checksums-Sha256

4. instal apt from lucid-proposed
5. repeat step 2
6. verify that the empty line is gone

The Ubuntu master archive system was recently upgraded to lucid, and now our Sources files are corrupt in places. It appears to happen to source packages that are old enough not to have Checksums-* fields in their .dsc files, so apt-ftparchive has to synthesise them. The stanzas look like this:

Package: appconfig
Binary: libappconfig-perl
Version: 1.56-2
Priority: optional
Section: interpreters
Maintainer: Stefan Hornburg (Racke) <email address hidden>
Build-Depends: perl (>= 5.6.0-16), debhelper (>= 3.0.18)
Architecture: all
Standards-Version: 3.6.1.0
Format: 1.0
Directory: pool/main/a/appconfig
Files:
 732e037fe9182c2081aac4ffdc9707dd 713 appconfig_1.56-2.dsc
 b65cd919279777ce55eebb3ab4994e7b 54410 appconfig_1.56.orig.tar.gz
 4c8153d70c670b7a105108cb35ca325f 72366 appconfig_1.56-2.diff.gz
Checksums-Sha1:
 e7ea3cb3eb178191662baa4dc4cc9c8d35fab828 713 appconfig_1.56-2.dsc

Checksums-Sha256:
 6a50dc97fa795000fb5f069aa89f7321aa90c73794daad4c50ec66bb382a2f5a 713 appconfig_1.56-2.dsc

The blank lines after Checksums-Sha1: and Checksums-Sha256: contain a single space.

Revision history for this message
Colin Watson (cjwatson) wrote :

apt-ftparchive on maverick has the same bug. To reproduce:

  apt-get -d source appconfig
  apt-ftparchive sources .

Revision history for this message
Colin Watson (cjwatson) wrote :

Possible patch. The resulting Sources stanza looks like this:

Package: appconfig
Binary: libappconfig-perl
Version: 1.56-2
Maintainer: Stefan Hornburg (Racke) <email address hidden>
Build-Depends: perl (>= 5.6.0-16), debhelper (>= 3.0.18)
Architecture: all
Standards-Version: 3.6.1.0
Format: 1.0
Files:
 732e037fe9182c2081aac4ffdc9707dd 713 appconfig_1.56-2.dsc
 b65cd919279777ce55eebb3ab4994e7b 54410 appconfig_1.56.orig.tar.gz
 4c8153d70c670b7a105108cb35ca325f 72366 appconfig_1.56-2.diff.gz

... which seems better - it doesn't seem hugely useful to add Checksums-* fields for the .dsc when they aren't there for the other source package elements.

Changed in apt (Ubuntu):
importance: Undecided → Critical
Michael Vogt (mvo)
Changed in apt (Ubuntu Maverick):
status: New → In Progress
Changed in apt (Ubuntu Lucid):
importance: Undecided → Critical
status: New → In Progress
Revision history for this message
Michael Vogt (mvo) wrote :
description: updated
Revision history for this message
Colin Watson (cjwatson) wrote : Please test proposed package

Accepted apt into lucid-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in apt (Ubuntu Lucid):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
LaMont Jones (lamont) wrote :

running 9.2 from lucid-proposed on an otherwise lucid (amd64) machine and the test case in the initial report, the resulting Sources file shows:
==========================================
...
 4c8153d70c670b7a105108cb35ca325f 72366 appconfig_1.56-2.diff.gz
Checksums-Sha1: <89>r<94>ÅÇ^?

==========================================

Which would be incorrect.

lamont

Revision history for this message
LaMont Jones (lamont) wrote :

9.3 works much better. +1 here in all my testing.

Revision history for this message
Steve Langasek (vorlon) wrote :

apt 0.7.25.3ubuntu9.3 accepted.

Revision history for this message
Jean-Baptiste Lallement (jibel) wrote :

SRU verification for Lucid:
I have reproduced the problem with apt 0.7.25.3ubuntu9.1 in lucid-updates and have verified that the version of apt 0.7.25.3ubuntu9.3 in -proposed fixes the issue.

$ apt-ftparchive sources .
  appconfig has no source override entry
  appconfig has no binary override entry either
Package: appconfig
Binary: libappconfig-perl
Version: 1.56-2
Maintainer: Stefan Hornburg (Racke) <email address hidden>
Build-Depends: perl (>= 5.6.0-16), debhelper (>= 3.0.18)
Architecture: all
Standards-Version: 3.6.1.0
Format: 1.0
Files:
 732e037fe9182c2081aac4ffdc9707dd 713 appconfig_1.56-2.dsc
 b65cd919279777ce55eebb3ab4994e7b 54410 appconfig_1.56.orig.tar.gz
 4c8153d70c670b7a105108cb35ca325f 72366 appconfig_1.56-2.diff.gz

I've also run the regression test for apt without failure.

Marking as verification-done

tags: added: verification-done
removed: verification-needed
Revision history for this message
Michael Vogt (mvo) wrote :

This was done a couple of days ago in maverick:

apt (0.8.3ubuntu2) maverick; urgency=low

  * ftparchive/writer.cc:
    - write out {Files,Checksum-Sha1,Checksum-Sha256} only if
      available LP: #633967. Thanks to Colin Watson

 -- Michael Vogt <email address hidden> Thu, 09 Sep 2010 15:30:19 +0200

Changed in apt (Ubuntu Maverick):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt - 0.7.25.3ubuntu9.3

---------------
apt (0.7.25.3ubuntu9.3) lucid-proposed; urgency=low

  * ftparchive/writer.cc:
    - port changes from maverick to remove size limit for
      Files,Checksum-Sha1,Checksum-Sha256

apt (0.7.25.3ubuntu9.2) lucid-proposed; urgency=low

  * ftparchive/writer.cc:
    - write out {Files,Checksum-Sha1,Checksum-Sha256} only if
      available LP: #633967. Thanks to Colin Watson
 -- Michael Vogt <email address hidden> Thu, 09 Sep 2010 18:49:09 +0200

Changed in apt (Ubuntu Lucid):
status: Fix Committed → Fix Released
tags: added: testcase
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers