0

I recently realized that the RPM packages shifted from gzip-compression to xz-compression a few years ago. I need to check is the compression type of an RPM package that I have. I also need to check what compression type is considered by my system when it is trying to unpack an RPM file.

  • 1
    Since you're using oracle-linux you should have the script /usr/lib/rpm/rpm2cpio.sh - this script works out what type of compression is used and will decompress it. You can probably use that as the basis for checking the compression your rpm package uses. – Stephen Harris Aug 31 '16 at 19:31
  • How can I figure out the compression type with this? – Alchemist Sep 1 '16 at 10:29
1

This command can be used to display the RPM package compression format:

rpm -qp --qf '%{PAYLOADCOMPRESSOR}\n' <file_name>
0

If you use rpm2cpio; you don't need to know the compression format. You can use rpm2cpio to unpack rpms like this:

rpm2cpio your.rpm | cpio -idmv

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.