I am working on a non-redhat based machine and I need to extract Version: x.y.z and Release: a.b.c information from some .rpms that pass across the machine.
Typically one would do:
rpm -qip ./Foo.x.y.z.rpm | grep Version | awk ...
But this isn't a redhat-based machine so I don't have rpm
and I don't really want to install a 2nd package manager anyway.
I thought that if I did:
rpm2cpio ./Foo.x.y.z.rpm | cpio -idmv
Then when the cpio was extracted I would find some file named .preamble
or something that would have the data in it. But no luck. Anyone know another way?