RPM
m (Add Kaitai Struct schema) |
(Add references. Note specifically that rpm2cpio is often used in conjunction with other software. Add examples using star.) |
||
Line 8: | Line 8: | ||
'''RPM''' (originally Red Hat Package Manager) is a format for software distribution used primarily with Linux. The .rpm file is the distribution archive, while .spec files are used in the development process to create RPM files. | '''RPM''' (originally Red Hat Package Manager) is a format for software distribution used primarily with Linux. The .rpm file is the distribution archive, while .spec files are used in the development process to create RPM files. | ||
− | The "payload" of the format is (usually) a [[cpio]] archive, compressed originally with [[gzip]] (but sometimes with other archiving formats in later versions). Headers and a signature are added. | + | The "payload" of the format is (usually) a [[cpio]] archive, compressed originally with [[gzip]] (but sometimes with other archiving formats in later versions).<ref>[https://stackoverflow.com/a/25986787 linux - How do I extract the contents of an rpm? - Ancient rpm2cpio script - Stack Overflow]</ref><ref>[https://stackoverflow.com/questions/18787375/how-do-i-extract-the-contents-of-an-rpm#comment131039986_25933557 linux - How do I extract the contents of an rpm? - ZSTD compressed RPM comment - Stack Overflow]</ref> Headers and a signature are added. |
Spec files contain the information needed to build the archive, and are used by the rpmbuild tool. In the SRPM variety of RPM file, the spec file is included and has details on how to build the package so that it can be self-installing. | Spec files contain the information needed to build the archive, and are used by the rpmbuild tool. In the SRPM variety of RPM file, the spec file is included and has details on how to build the package so that it can be self-installing. | ||
Line 19: | Line 19: | ||
* [http://rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html RPM File Format] | * [http://rpm.org/max-rpm/s1-rpm-file-format-rpm-file-format.html RPM File Format] | ||
* [http://rpm.org/wiki/DevelDocs/FileFormat RPM container file format specification] | * [http://rpm.org/wiki/DevelDocs/FileFormat RPM container file format specification] | ||
+ | |||
+ | == Examples with rpm2cpio and [[Tar#Software|star]] == | ||
+ | ''[[Cpio|cpio]] archives may contain extra metadata such as user/group ID, similar to [[Tar|tarballs]]. However, at the same time, working with <code>.rpm</code> that was compressed with various compressors can prove to be tricky.<ref>[https://stackoverflow.com/a/25986787 linux - How do I extract the contents of an rpm? - Ancient rpm2cpio script - Stack Overflow]</ref> Here is one way using star.'' | ||
+ | |||
+ | List the contents of <code>example.rpm</code>: | ||
+ | rpm2cpio example.rpm | star -tv | ||
+ | Extract the contents of <code>example.rpm</code>: | ||
+ | rpm2cpio example.rpm | star -x | ||
== Software == | == Software == | ||
* [http://rpm.org/wiki/Download RPM] | * [http://rpm.org/wiki/Download RPM] | ||
− | ** <code>rpm2cpio</code> - Can help to open RPM files without installing them | + | ** <code>rpm2cpio</code> - Can help to open RPM files without installing them. Typically combined with a stream decompressor (e.g. Gzip), [[Cpio]] or [[Tar#Software|star]]. |
* [[7-Zip]] | * [[7-Zip]] | ||
* [[Konvertor]] | * [[Konvertor]] | ||
Line 31: | Line 39: | ||
== Sample files == | == Sample files == | ||
* {{DexvertSamples|archive/rpm}} | * {{DexvertSamples|archive/rpm}} | ||
+ | |||
+ | == References == | ||
+ | <references/> | ||
== Links == | == Links == |
Revision as of 22:05, 6 August 2025
RPM (originally Red Hat Package Manager) is a format for software distribution used primarily with Linux. The .rpm file is the distribution archive, while .spec files are used in the development process to create RPM files.
The "payload" of the format is (usually) a cpio archive, compressed originally with gzip (but sometimes with other archiving formats in later versions).[1][2] Headers and a signature are added.
Spec files contain the information needed to build the archive, and are used by the rpmbuild tool. In the SRPM variety of RPM file, the spec file is included and has details on how to build the package so that it can be self-installing.
Contents |
Identification
Files begin with signature bytes ED AB EE DB
.
Specifications
Examples with rpm2cpio and star
cpio archives may contain extra metadata such as user/group ID, similar to tarballs. However, at the same time, working with .rpm
that was compressed with various compressors can prove to be tricky.[3] Here is one way using star.
List the contents of example.rpm
:
rpm2cpio example.rpm | star -tv
Extract the contents of example.rpm
:
rpm2cpio example.rpm | star -x
Software
Sample files
References
- ↑ linux - How do I extract the contents of an rpm? - Ancient rpm2cpio script - Stack Overflow
- ↑ linux - How do I extract the contents of an rpm? - ZSTD compressed RPM comment - Stack Overflow
- ↑ linux - How do I extract the contents of an rpm? - Ancient rpm2cpio script - Stack Overflow