bookmark

Inspecting and extracting RPM package contents - Packagecloud Blog


Description

rpm2cpio ./packagecloud-test-1.1-1.x86_64.rpm | cpio -idmv

An RPM package is simply a header structure on top of a CPIO archive. The package itself is comprised of four sections: a header with a leading identifier (magic number) that identifies the file as an RPM package, a signature to verify the integrity of the package, the header or ‘tagged’ data containing package information, version numbers, and copyright messaging, and the archive containing the actual program files.

In the example above, we use cpio with the -i flag to extract the files from the archive, -d to create the leading directories where needed, and -m to preserve the file modification times when creating files. The -v flag (verbose) is to list the files processed for the sake of this example.

Preview

Tags

Users

  • @jil

Comments and Reviews