mock and sha256 rpms

Dennis Gilmore dennis at ausil.us
Thu May 28 16:14:00 UTC 2009


On Thursday 28 May 2009 10:49:57 am Mike McLean wrote:
> If you use mock for building, then you may be in the position of having
> the main system rpm use sha256 checksums (e.g. on F11) but create
> chroots that contain an older rpm that does not.
>
> If you create a source rpm using the newer rpm and pass it to mock to
> build in a chroot with an older rpm, you will get an error like the
>
> following:
> > DEBUG util.py:256:  error: unpacking of archive failed on file
> > /builddir/build/SOURCES/INIT.2008-02-02.tgz;4a1e5c21: cpio: MD5 sum
> > mismatch DEBUG util.py:319:  Child returncode was: 1
>
> I think the simplest way to work around this is to have mock pass
> --nomd5 to rpm when installing the srpm in the chroot.
>
> Of course, this is dropping an integrity check, so could possibly add a
> check outside the chroot to verify this data. Granted, I'm not sure what
> the best way to do that is.
>
> Thoughts? Concerns?
>
> --
> Fedora-buildsys-list mailing list
> Fedora-buildsys-list at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-buildsys-list


Makefile.common has 

# to make srpms on F-11 and newer for older releases use old hashes
# F-10's rpm supports both styles F-9 is the only current release
# outside of rhel that needs old hasnes
ifeq ($(DISTVAR),rhel)
RPM_DEFINES := $(RPM_DEFINES) \
                --define "_source_filedigest_algorithm md5" \
                --define "_binary_filedigest_algorithm md5"
endif
ifeq ($(DISTVAL),9)
RPM_DEFINES := $(RPM_DEFINES) \
                --define "_source_filedigest_algorithm md5" \
                --define "_binary_filedigest_algorithm md5"
endif


this will allow you to create useable srpms   with make srpm   for scratch 
building

Dennis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/fedora-buildsys-list/attachments/20090528/b4307de0/attachment.sig>


More information about the Fedora-buildsys-list mailing list