apt-zip MD5 check breaks with apt SHA256 checks

Bug #203994 reported by Rich Rudnick
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt-zip (Ubuntu)
Confirmed
Undecided
Unassigned
Nominated for Hardy by goofy66

Bug Description

Binary package hint: apt-zip

Since apt-get --print-uris now returns SHA256 rather than MD5 checksums, the generated package fetch script will fail. This bug has been fixed upstream in apt-file 0.18, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=455577 with a 2 line change to the wget method.

This bug appears in hardy (0.17) and gutsy (0.15), not checked in prior releases.

Using --no-md5 is a temporary work around, but does prevent verifying the download.

Revision history for this message
Mario Splivalo (mariosplivalo) wrote :

One could change fetch script generated by apt-zip to use 'sha256sum' instead of 'md5sum' to check for the checksum. Here is the changed check() function inside the fetch script:

check(){
    [ ! -r "$1" ] && return 1
    [ "`type sha256sum`" ] &&
        if [ "`sha256sum $1 | cut -d' ' -f1`" = "`echo $2 | cut -d':' -f2`" ]
        then return 0
        else err $1 "wrong MD5"; return 1
        fi
    [ "`type gzip`" ] &&
        if ar p $1 data.tar.gz | gzip -t
        then return 0
        else err $1 "wrong contents"; return 1
        fi
    return $3
}

I have used this to fetch the .debs for the two boxes while doing 7.10 -> 8.04 upgrade.

Revision history for this message
Matteo Croce (teknoraver) wrote :

This new downloader script fixes it and does check with all available algoritms.

Changed in apt-zip:
status: New → Confirmed
Revision history for this message
Matteo Croce (teknoraver) wrote :

And here there is a patch against the script creator

Revision history for this message
James E. LaBarre (jamesl-bestweb) wrote :

I thought this bug was fixed? Because in 12.04/Precise Pangolin, the checksumming still fails. Only now the script is designed to look for sha256 sums, but the download list is showing MD5 sums.

Seems as though two people must have fixed the same bug, and thereby swapped the problem to wher eit fails in the opposite fashion now..

Revision history for this message
Mario Splivalo (mariosplivalo) wrote :

This is now obsolete as in 14.04 this works as expected.

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.