[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#436055: marked as done (apt: Add hash support to copy: method, so apt-get source works)



Your message dated Tue, 23 Oct 2007 15:47:02 +0000
with message-id <E1IkLyA-0006NQ-LQ@ries.debian.org>
and subject line Bug#436055: fixed in apt 0.7.7
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: apt
Version: 0.7.6
Severity: normal
Tags: patch

Running apt-get source from a repository with the copy: method fails
with the error "Hash Sum mismatch".  Attached is a five-line patch to
add hash support to the copy: method, which makes it work.  (The patch
is against apt-0.7.6ubuntu1, but I'm assuming this code hasn't been
touched by anyone at Debian or Ubuntu recently.)

Example of problem:

deb-src copy:/afs/sipb.mit.edu/project/debathena/apt-new feisty debathena debathena-manual-config debathena-config

$ apt-get source debathena-discuss
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Need to get 200kB of source archives.
Get:1 copy: feisty/debathena debathena-discuss 9.4.30-0debathena3 (dsc) [659B]
Get:2 copy: feisty/debathena debathena-discuss 9.4.30-0debathena3 (tar) [195kB]
Get:3 copy: feisty/debathena debathena-discuss 9.4.30-0debathena3 (diff) [5131B]
Fetched 200kB in 0s (0B/s)         
Failed to fetch copy:/afs/sipb.mit.edu/project/debathena/apt-new/pool/debathena/d/debathena-discuss/debathena-discuss_9.4.30-0debathena3.dsc  Hash Sum mismatch
Failed to fetch copy:/afs/sipb.mit.edu/project/debathena/apt-new/pool/debathena/d/debathena-discuss/debathena-discuss_9.4.30.orig.tar.gz  Hash Sum mismatch
Failed to fetch copy:/afs/sipb.mit.edu/project/debathena/apt-new/pool/debathena/d/debathena-discuss/debathena-discuss_9.4.30-0debathena3.diff.gz  Hash Sum mismatch
E: Failed to fetch some archives.

diff -ur apt-0.7.6ubuntu1/methods/copy.cc apt-0.7.6ubuntu1andersk1/methods/copy.cc
--- apt-0.7.6ubuntu1/methods/copy.cc	2006-12-13 13:28:57.000000000 -0500
+++ apt-0.7.6ubuntu1andersk1/methods/copy.cc	2007-08-04 19:45:13.000000000 -0400
@@ -12,6 +12,7 @@
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
+#include <apt-pkg/hashes.h>
 
 #include <sys/stat.h>
 #include <utime.h>
@@ -79,6 +80,10 @@
       return _error->Errno("utime",_("Failed to set modification time"));
    }
    
+   Hashes Hash;
+   FileFd Fd(Res.Filename, FileFd::ReadOnly);
+   Hash.AddFD(Fd.Fd(), Fd.Size());
+   Res.TakeHashes(Hash);
    URIDone(Res);
    return true;
 }

--- End Message ---
--- Begin Message ---
Source: apt
Source-Version: 0.7.7

We believe that the bug you reported is fixed in the latest version of
apt, which is due to be installed in the Debian FTP archive:

apt-doc_0.7.7_all.deb
  to pool/main/a/apt/apt-doc_0.7.7_all.deb
apt-transport-https_0.7.7_i386.deb
  to pool/main/a/apt/apt-transport-https_0.7.7_i386.deb
apt-utils_0.7.7_i386.deb
  to pool/main/a/apt/apt-utils_0.7.7_i386.deb
apt_0.7.7.dsc
  to pool/main/a/apt/apt_0.7.7.dsc
apt_0.7.7.tar.gz
  to pool/main/a/apt/apt_0.7.7.tar.gz
apt_0.7.7_i386.deb
  to pool/main/a/apt/apt_0.7.7_i386.deb
libapt-pkg-dev_0.7.7_i386.deb
  to pool/main/a/apt/libapt-pkg-dev_0.7.7_i386.deb
libapt-pkg-doc_0.7.7_all.deb
  to pool/main/a/apt/libapt-pkg-doc_0.7.7_all.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 436055@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Michael Vogt <mvo@debian.org> (supplier of updated apt package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


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

Format: 1.7
Date: Tue, 23 Oct 2007 14:58:03 +0200
Source: apt
Binary: apt-utils libapt-pkg-doc libapt-pkg-dev apt-transport-https apt-doc apt
Architecture: source all i386
Version: 0.7.7
Distribution: unstable
Urgency: low
Maintainer: APT Development Team <deity@lists.debian.org>
Changed-By: Michael Vogt <mvo@debian.org>
Description: 
 apt        - Advanced front-end for dpkg
 apt-doc    - Documentation for APT
 apt-transport-https - APT https transport
 apt-utils  - APT utility programs
 libapt-pkg-dev - Development files for APT's libapt-pkg and libapt-inst
 libapt-pkg-doc - Documentation for APT development
Closes: 133421 133421 423272 436055 436425 437150 440611 441102 441942 442833 445468 446626
Changes: 
 apt (0.7.7) unstable; urgency=low
 .
   [ Michael Vogt ]
   * apt-inst/contrib/extracttar.cc:
     - fix fd leak for zero size files (thanks to Bill Broadley for
       reporting this bug)
   * apt-pkg/acquire-item.cc:
     - remove zero size files on I-M-S hit
   * methods/https.cc:
     - only send LastModified if we actually have a file
     - send range request with if-range
     - delete failed downloads
     - delete zero size I-M-S hits
   * apt-pkg/deb/dpkgpm.{cc,h}:
     - merged dpkg-log branch, this lets you specify a
       Dir::Log::Terminal file to log dpkg output to
       (ABI break)
     - fix parse error when dpkg sends unexpected data
   * merged apt--sha256 branch to fully support the new
     sha256 checksums in the Packages and Release files
     (ABI break)
   * apt-pkg/pkgcachegen.cc:
     - increase default mmap size
   * tests/local-repo:
     - added local repository testcase
   * apt-pkg/acquire.cc:
     - increase MaxPipeDepth for the internal worker<->method
       communication to 1000 for the debtorrent backend
   * make apt build with g++ 4.3
   * fix missing SetExecClose() call when the status-fd is used
   * debian/apt.cron.daily:
     - move unattended-upgrade before apt-get autoclean
   * fix "purge" commandline argument, closes: #133421
     (thanks to Julien Danjou for the patch)
   * cmdline/apt-get.cc:
     - do not change the auto-installed information if a package
       is reinstalled
   * apt-pkg/acquire-item.cc:
     - fix crash in diff acquire code
   * cmdline/apt-mark:
     - Fix chmoding after have renamed the extended-states file (LP: #140019)
       (thanks to Laurent Bigonville)
   * apt-pkg/depcache.cc:
     - set "APT::Install-Recommends" to true by default (OMG!)
   * debian/apt.cron.daily:
     - only run the cron job if apt-get check succeeds (LP: #131719)
 .
   [ Program translations ]
     - French updated
     - Basque updated. Closes: #436425
     - Fix the zh_CN translator's name in debian/changelog for 0.7.2
       Closes: #423272
     - Vietnamese updated. Closes: #440611
     - Danish updated. Closes: #441102
     - Thai added. Closes: #442833
     - Swedish updated.
     - Galician updated. Closes: #446626
 .
   [ Otavio Salvador ]
   * Add hash support to copy method. Thanks Anders Kaseorg by the patch
     (closes: #436055)
   * Reset curl options and timestamp between downloaded files. Thanks to
     Ryan Murray <rmurray@debian.org> for the patch (closes: #437150)
   * Add support to apt-key to export keys to stdout. Thanks to "Dwayne
     C. Litzenberger" <dlitz@dlitz.net> for the patch (closes: #441942)
   * Fix compilation warnings:
     - apt-pkg/indexfile.cc: conversion from string constant to 'char*';
     - apt-pkg/acquire-item.cc: likewise;
     - apt-pkg/cdrom.cc: '%lu' expects 'long unsigned int', but argument
       has type 'size_t';
     - apt-pkg/deb/dpkgpm.cc: initialization order and conversion from
       string constant to 'char*';
     - methods/gpgv.cc: conversion from string constant to 'char*';
     - methods/ftp.cc: likewise;
     - cmdline/apt-extracttemplates.cc: likewise;
     - apt-pkg/deb/debmetaindex.cc: comparison with string literal results
       in unspecified behaviour;
   * cmdline/apt-get.cc: adds 'autoremove' as a valid comment to usage
     statement of apt-get (closes: #445468).
   * cmdline/apt-get.cc: really applies Julien Danjou <acid@debian.org>
     patch to add 'purge' command line argument (closes: #133421).
 .
   [ Ian Jackson ]
   * dpkg-triggers: Deal properly with new package states.
 .
   [ Colin Watson ]
   * apt-pkg/contrib/mmap.cc:
     - don't fail if msync() returns > 0
Files: 
 f5ba936675b18bd537131d5bb09ca24b 942 admin important apt_0.7.7.dsc
 ab7657852d824d66d96bcb08a282090d 1920200 admin important apt_0.7.7.tar.gz
 033c2bab986a895e7a12a3c154bf16a4 92700 doc optional apt-doc_0.7.7_all.deb
 62457c506a857e022962f1215f80fd9d 117092 doc optional libapt-pkg-doc_0.7.7_all.deb
 41c78052538cb5fa29b8caa4b0985542 51774 admin optional apt-transport-https_0.7.7_i386.deb
 f05a7aabcfce82870b39ce37b29a4f0c 1445864 admin important apt_0.7.7_i386.deb
 4869275480edefbc5ade98ab94dd79a1 101484 libdevel optional libapt-pkg-dev_0.7.7_i386.deb
 76dd891899bf906ae9ed3a488412faa1 188588 admin important apt-utils_0.7.7_i386.deb

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

iD8DBQFHHhVrliSD4VZixzQRAifhAJ9UvCgeLaAJUPlKfGwuvb5z8aBdYQCfR2pO
/UyggrT0kJ1w2odlCibDmbc=
=W9Vr
-----END PGP SIGNATURE-----



--- End Message ---

Reply to: