Please check integrity of downloaded files

Bug #176753 reported by era
2
Affects Status Importance Assigned to Milestone
apt-file (Ubuntu)
Fix Released
Wishlist
Daniel Hahler

Bug Description

Binary package hint: apt-file

I installed apt-file yesterday, and would have expected it to work by today (the computer has been running for all this time). However, it doesn't, mostly.

vnix$ time apt-file search nosuchfile

gzip: /var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-updates_Contents-i386.gz: not in gzip format

gzip: /var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-updates_Contents-i386.gz: not in gzip format

gzip: /var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-updates_Contents-i386.gz: not in gzip format

gzip: /var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-backports_Contents-i386.gz: not in gzip format

gzip: /var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-proposed_Contents-i386.gz: not in gzip format

real 0m21.708s
user 0m19.381s
sys 0m0.696s

vnix$ uptime
 21:43:01 up 2 days, 19:24, 5 users, load average: 1.23, 0.74, 0.38

In other words, the system is not under extremely heavy load or anything, and the operation takes forever. Running "sudo apt-file update" didn't clear this up, either.

However, this does appear to be just a transient problem:

vnix$ ls -l /var/cache/apt/apt-file
total 13608
-rw-r--r-- 1 root root 6170 2006-04-07 16:04 fi.archive.ubuntu.com_ubuntu_dists_gutsy-backports_Contents-i386.gz
-rw-r--r-- 1 root root 13888467 2007-10-17 06:11 fi.archive.ubuntu.com_ubuntu_dists_gutsy_Contents-i386.gz
-rw-r--r-- 1 root root 6170 2006-04-07 16:04 fi.archive.ubuntu.com_ubuntu_dists_gutsy-proposed_Contents-i386.gz
-rw-r--r-- 1 root root 6170 2006-04-07 16:04 fi.archive.ubuntu.com_ubuntu_dists_gutsy-updates_Contents-i386.gz

vnix$ file /var/cache/apt/apt-file/*
/var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-backports_Contents-i386.gz: HTML document text
/var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy_Contents-i386.gz: gzip compressed data, from Unix, max compression
/var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-proposed_Contents-i386.gz: HTML document text
/var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-updates_Contents-i386.gz: HTML document text

vnix$ head /var/cache/apt/apt-file/fi.archive.ubuntu.com_ubuntu_dists_gutsy-proposed_Contents-i386.gz
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> 404 File was not found in NIC </title>
</head>
<body bgcolor="#ffffff">

<center>
<!-- <img src="http://www.funet.fi/funet/ftp/hamster-transparent-logo.gif">-->

It would be nice, though, if apt-file could check that the downloaded files are in the expected format before committing them.

Revision history for this message
era (era) wrote :

See also bug #176754 for the problem with the Funet mirror.

Daniel Hahler (blueyed)
Changed in apt-file:
assignee: nobody → blueyed
importance: Undecided → Wishlist
status: New → In Progress
Revision history for this message
era (era) wrote :

Actually, as pointed out in that bug report, the real problem is that gutsy-proposed etc are lacking these Changes-ARCH.gz files; the mirror is set up correctly. I guess this falls under the umbrella of bug 179420 -- at least partly.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package apt-file - 2.0.8.2ubuntu3

---------------
apt-file (2.0.8.2ubuntu3) hardy; urgency=low

  * Improved "need to run apt-file update" experience (LP: #154180)
    - debian/apt-file.postinst:
      - Do not call apt-file update anymore directly
      - install update-notifier hook
    - debian/control: Depend on "menu" for su-to-root
    - apt-file: test if the cache directory is empty for actions
      search/find and show/list.
  * apt-file: reverted removal of leading slash in pattern and implement
    logic to match both without slash at the beginning and with slash
    inside (LP: #181600). Apply the same logic to regexp patterns (-x).
  * debian/rules:
    - moved DH_COMPAT=3 to debian/compat (increased to 5)
    - Fixed debian-rules-ignores-make-clean-error
    - Dropped binary-arch target
  * Fix typos/wording in README
  * apt-file.conf: Add integrity check for fetched files (LP: #176753)
  * apt-file: find_command: remove leading spaces and open parentheses
    before looking for the command, so that the new defaults in
    apt-file.conf work
  * apt-file: print output from command after executing it, so that
    errors and notes from there get to the user
  * debian/apt-file.postrm: added DEBHELPER marker
  * debian/control:
    - Dropped Build-Depends-Indep: debhelper (>> 3.0.0)
    - Build-Depends: debhelper (>= 5), cdbs
    - Standards-Version: 3.7.3
    - Recommend "file", which gets used optionally for the integrity check
  * apt-file.bash_completion: filename/directory completion for "search",
    patch taken from Debian bug #448358
  * apt-file/do_grep: only search in all cache files once (LP: #174134)
  * apt-file: fix display of warning in purge_cache, if the file cannot be
    deleted
  * Applied patches from Kevin Glynn in a lot of places, see Debian bug
    #382312). Thanks!
  * Support files in /etc/apt/sources.list.d/ (LP: #190602) (Closes: #353275)
    Patches from Amos Shapira and Andrew Schulman.

 -- Daniel Hahler <email address hidden> Fri, 15 Feb 2008 00:18:52 +0100

Changed in apt-file:
status: In Progress → 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.