Bugzilla – Bug 3161
unpack md5 fixes for non-tar-rpm-zip-files/patchfiles
Last modified: 2003-10-19 23:17:42 UTC
With these fixes one can now "clean" a patchfile in PRE_BUILD by simply faking an unpack() on it. All non-tarball, zip, rpm files don't get expandedor anything, they get dropped to /dev/null (but the fixes make it so that it at least checks the md5 correctly, as currently it passes a good return value on anything non-tar-zip-rpm -- bad behaviore imho). One could probably make it "pipe" its uncompressed output with some creative fifos, but I'll settle for this. It could also be made to save the output instead of to /dev/null, to a location in the root of the build directory with the name of the $SOURCE.unpacked or stripped of .bz2 or .gz at the end. The /dev/null behavior is fine with me, however. as in: ==> default_pre_build && unpack $SOURCE2 ${MD5[1]} && [bzcat|zcat|cat] $SOURCE_CACHE/$SOURCE2 | patch -p1 <== (I tested it with compressed and uncompressed patches.) We have about 90 instances where I can add this to PRE_BUILDS and make the grimoire 100% secure. Another reason I chose unpack to run it through is so that my auditing routines don't need any modification (orthogonality).
I use this: uncompress $SOURCE_CACHE/$SOURCE `guess_compressor $SOURCE_CACHE/$SOURCE` ${MD5[0]} > ./$NAME || [ -e ./$NAME ]
merged
M_L: How would that work since if the md5 were wrong, the md5 error message would get saved to $NAME with the uncompressed file?
if any of these still have issues outstanding then they can be reopened, but most have just been overlooked/forgotten ("these" refers to the 611 fixed but not closed bugs I just found in our database)