Description of problem: I've got scripts that I want to use for kernel compilation, however I am seeing md5sum failures on RHEL4. I've pulled the relevant parts of my script(s) into two scripts which are attached. The scripts get a kernel.src.rpm from porkchop (wget) then install and build-prep followed by a cp from the symlink (pointing to the prepared kernel) to a new directory. Finally the md5sum is calculated for the symlinked, copied and original directories. The symlinked file reports a different md5sum than the other directories. The failure occurs with 2.6 (U2, U3) but not on 2.4 (RHEL3) machines. Also, if I use sum instead of md5sum I don't see the errors. Version-Release number of selected component (if applicable): coreutils-5.2.1-31.4 How reproducible: 100% Steps to Reproduce: 1. Install RHEL 4 U4 and start script(s) above (requires rpmbuild and probably kernel-utils.) 2. 3. Actual results: MD5SUMs do not match. Expected results: Additional info: Erm, I may be doing something wrong but I would expect behavior to be consistent across OS'es. Also, this is most likely not an md5sum problem but I thought it would be a good place to start.
Created attachment 135757 [details] RHEL4 script
Created attachment 135759 [details] RHEL3 script
Seeing as the md5sum input is just a directory listing, perhaps you could attach the actual directory listings themselves rather than asking me to compile a kernel to get them.. :-)
Created attachment 135771 [details] The copied directories md5sum
Created attachment 135772 [details] The soft linked directories md5sum listing
Created attachment 135773 [details] Original source md5sum
diff -burN copy.md5sum src-link.md5sum --- copy.md5sum 2006-09-06 11:16:08.000000000 -0400 +++ src-link.md5sum 2006-09-06 11:16:09.000000000 -0400 @@ -13752,7 +13752,7 @@ -rw-r--r-- 1 root root 1794 Oct 18 2004 uuid.h include: -total 300 +total 296 drwxr-xr-x 3 root root 4096 Oct 18 2004 acpi drwxr-xr-x 2 root root 4096 Sep 6 11:14 asm-alpha drwxr-xr-x 24 root root 4096 Oct 18 2004 asm-arm @@ -13778,7 +13778,7 @@ drwxr-xr-x 2 root root 4096 Oct 18 2004 asm-v850 drwxr-xr-x 2 root root 4096 Sep 6 11:14 asm-x86_64 drwxr-xr-x 2 root root 4096 Sep 6 11:14 keys -drwxr-xr-x 18 root root 24576 Sep 6 11:15 linux +drwxr-xr-x 18 root root 20480 Sep 6 11:15 linux drwxr-xr-x 2 root root 4096 Oct 18 2004 math-emu drwxr-xr-x 2 root root 4096 Oct 18 2004 media drwxr-xr-x 2 root root 4096 Oct 18 2004 mtd ######### It's always the linux directory that is different.
So one or more files or directories are taking up different numbers of blocks. I expect there is a sparse file or some such thing, or else the directories from the build directory are larger due to having had to accommodate the built object files etc. Please file a more specific test case if you think there really is a bug.
I'm not sure I understand you. How is one to tell if you have data corruption or some other problem(s) if you see an md5sum failure? Is md5sum useless in certain cases? Also, this is a different behavior from RHEL3; Por que? How do I help investigate the real reason for failure?
You got different md5sums because you fed md5sum different inputs -- as demonstrated by the diff in comment #7. You are md5summing the output of 'ls -lR' (for some reason!).