xz file, the compressed data could vary without affecting the contents.ĮDIT I've been looking into this further, and wrote this script to test the PyLZMA Python2.x module and the lzma Python3.x built in module from _future_ import print_function I would not be concerned about the differences in the compressed files - depending on the container format and the checksum type used in the. I've also verified it using the regular sha256sum as well (when I wrote the data to file). If f1sum.hexdigest() = f2sum.hexdigest(): Here's my test code to confirm this: # I have created two identical text files with some random phrasesį1sum.update(f1_xzbuf) f2sum.update(f2_xzbuf) Not sure if it helps, but I made sure the LZMA Python module in my repository wasn't installed to avoid possible name conflicts. ![]() UPDATE: I found a fix for it by installing the backport (from Python 3.3) via peterjc's Git repository ( link here), and now it's showing identical checksums. Out_file = open('/home/ki2ne/Desktop/', 'wb')Īnd I noticed there were two different checksums (MD5 and SHA256) from the resulting file compared to when I used the plain xz (although I could decompress fine with either method - the checksums of the decompressed versions of both files were the same). In_file = open('/home/ki2ne/Desktop/song.wav', 'rb')Ĭompressed_data = xz.compress(input_data) My code used during the experiment was: import lzma as xz Users of older Fedora releases who wish to use RPMs built in Fedora 12 will need at least rpm-4.6.x from Fedora 10 or later.I'm experimenting with the lzma module in Python 2.7.6 to see if I could create compressed files using the XZ format for a future project that will make use of it. RPM in Fedora 12 has switched to using XZ compression ( ) in its packages to allow for better compression and smaller downloads for users. Note that currently you can use this configuration only with rpm-4.7.0 or higher which is present in Fedora 11 or rawhide.Īlso note that deltarpms between builds with different payload compression formats, while functional, usually save little bandwidth. However, since source RPMs consist almost entirely of precompressed source archives, changing this has little effect, and will not be done for this feature. The %_source_payload macro can be used to change the payload compression for source RPMs. This macro isn't defined by default and if undefined gzip compression is used. This enables XZ payload compression level 7 (suggested default by upstream) for binary RPMs. In order to turn on XZ payload compression for binary RPMS one could define following macros in /usr/lib/rpm/macros globally or in ~/.rpmmacros file locally: If a mass rebuild has been done, another one would need done to rebuild with gzip payloads. The contingency plan is to continue using gzipped payloads. The XZ library is in beta, but the file format has been finalized (it is why we are using XZ instead of the not-finalized LZMA). XZ package needs to be added to Fedora, and RPM built against it. Users should see smaller packages and downloads. This can be done by checking for the rpmlib(PayloadIsXz) dependency in the package itself.Ĭheck the dependencies of RPM itself, make sure it's linked against the XZ library, and that it provides the 'rpmlib(PayloadIsXz) dependency.Ĭheck successful extraction of RPM payload by installing or extracting contents of XZ compressed RPMs via rpm2cpio utility.Ĭheck that deltarpms can still be successfully created, and that the resulting RPM can be reassembled. Query built rpms, make sure they are using the new payload format. The final step is not required to support new payloads, but it is what provides the most benefit to Fedora users. Rebuild the distribution - DONE (in general).Change the default payload in redhat-rpm-config - DONE.rebuild RPM 4.6.1 for Koji to link against it (for the build system) - DONE.rebuild RPM 4.6.1 in F-10 to link against it (for upgrades). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |