Rupert
Pure Ruby RPM Library
Installation
Add this line to your application's Gemfile:
gem 'rupert'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rupert
Usage
Parsing an RPM
You can read an RPM simply with:
rpm = Rupert::RPM.load('rpm-4.8.0-32.el6.x86_64.rpm')
or just check if a specific file is an RPM with:
Rupert::RPM.rpm? 'iamtrollingyou' # false
(note that loading a file that is not an RPM generates an exception)
Verifying RPM for corruption
You can verify if an RPM is corrupted after loading it with:
rpm.intact?
Note that this only verifies if the MD5 stored in RPM metadata corresponds to the MD5 calculated over the content and metadata itself. It doesn't provide any warranty that the packages has been maliciously altered. For this, you need to check package signature.
List of installed files
The list of installed files is returned as an array of absolute filenames with:
rpm.filenames
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Changelog
See Changelog.md