Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Tools for inspecting RPM files in python. This module is modeled after the tarfile module.
$ python -m pip install -U rpmfile
If you want to use rpmfile
with zstd
compressed rpms, you'll need to install
the zstandard module.
zstd
also requires that you are using Python >= 3.5
$ python -m pip install -U zstandard
See the tests for more examples.
import rpmfile
with rpmfile.open('file.rpm') as rpm:
# Inspect the RPM headers
print(rpm.headers.keys())
print(rpm.headers.get('arch', 'noarch'))
# Extract a fileobject from the archive
fd = rpm.extractfile('./usr/bin/script')
print(fd.read())
for member in rpm.getmembers():
print(member)
You can use rpmfile
via it's module invocation or via rpmfile
command if
your PATH
environment variable is configured correctly. Pass --help
for all
options.
List RPM contents
curl -sfL 'https://example.com/some.rpm.gz' | gzip -d - | python -m rpmfile -l -
./path/to/file
Extract files
curl -sfL 'https://example.com/some.rpm.gz' | gzip -d - | rpmfile -xv -
./path/to/file
Extract files to directory
curl -sfL 'https://example.com/some.rpm.gz' | gzip -d - | rpmfile -xvC /tmp -
/tmp/path/to/file
Display RPM information (similar to command rpm -qip
in Linux)
curl -sfL 'https://example.com/some.rpm.gz' |gzip -d - | rpmfile -i -
Name : something
Version : 1.02
Release : 1
Architecture: noarch
Group : default
Size : 1234
License : BSD
Signature : None
Source RPM : some.src.rpm
Build Date : Tue Apr 9 08:55:16 2019
Build Host : demo
URL : http://example.com/some
Summary : Example of something
Description :
The description of something.
It can display more than one line.
The black formater should be used on all files before submitting a contribution. Version 19.10b0.
$ pip install black==19.10b0
$ black .
FAQs
Read rpm archive files
We found that rpmfile demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.