md5sum broken?

Chuck Kuecker ckuecker at ckent.org
Sat May 29 13:03:45 UTC 2010


Robert P. J. Day wrote:
> On Sat, 29 May 2010, Chuck Kuecker wrote:
>
>   
>> Hello,
>>
>> I am developing an embedded Linux project using Ubuntu 9.10 as a
>> workstation. I need to produce an md5 checksum file of a patch I need to
>> modify to make the build run. The command is:
>>
>> ckuecker at ckenterprises:/opt/Freescale/ltib$ md5sum
>> /opt/freescale/pkgs/mtd-utils-20060302-cf-byteswap_h-1.patch >
>> /opt/freescale/pkgs/mtd-utils-20060302-cf-byteswap_h-1.patch.md5
>>
>> Up until last week, this worked fine. Now, I get this error when I run
>> my build script:
>>
>> Processing: mtd-utils
>> =======================
>> Error: corrupt md5 file:
>> /opt/freescale/pkgs/mtd-utils-20060302-cf-byteswap_h-1.patch.md5,
>> renamed to
>> /opt/freescale/pkgs/mtd-utils-20060302-cf-byteswap_h-1.patch.md5.bad
>>
>> Ubuntu did an update since the last time I ran md5sum successfully.
>> md5sum --v shows 7.4, and is dated in 2009.
>>
>> Anyone seen anything similar? I am wondering if the build script is
>> accessing a different version of md5sum, and the Ubuntu version got
>> updated. The build script has its' own paths, which I need to trace out.
>>     
>
>   what *is* the contents of that md5 file?  really, an md5 file has a
> pretty simple internal structure, something like:
>
> 076a49bab813ccefac44d5727e840536  /etc/passwd
>
> it's just a text file that you can examine, so it should be easy to
> tell if it still matches the original file.
>
>   what's in that file?
>
> rday
>
> --
The file that md5sum produced looks correct - a string of hex, and the 
path to the file.

Perhaps an "AHA" - if I run md5sum on the file, and I am not in the 
directory with the file, the whole path and filename gets put into the 
md5 file. If the build script uses a shorter path, the file won't match.

Experiment time. Moved into the directory with the patch file and made 
another md5 file - the filename is now stripped of the absolute path.

That might be the problem, solved. I'll report back after the build runs.

Chuck Kuecker







More information about the ubuntu-users mailing list