To show the package contents of an RPM package, we use rpm2cpio to convert the package to a cpio archive, which is piped to cpio. cpio takes in the archive data and prints the contents because of -t argument.
rpm2cpio google-chrome-stable-137.0.7151.119-1.x86_64.rpm | cpio -t
./etc/cron.daily/google-chrome
./opt/google/chrome
./opt/google/chrome/CHROME_VERSION_EXTRA
./opt/google/chrome/MEIPreload
./opt/google/chrome/MEIPreload/manifest.json
And to show the contents of a specific file inside the package, same principle above for piping the cpio package data to the cpio command, but this time we extract the specific file from the cpio package data, print it to standard output, and “prettify” it with jq.
rpm2cpio google-chrome-stable-137.0.7151.119-1.x86_64.rpm | cpio -i --to-stdout ./opt/google/chrome/MEIPreload/manifest.json | jq .
{
"name": "MEI Preload",
"icons": {},
"version": "1.0.7.1652906823",
"manifest_version": 2,
"update_url": "https://clients2.google.com/service/update2/crx",
"description": "Contains preloaded data for Media Engagement"
}
756389 blocks