A utility to extract rpm package information from rpm database
Project description
A python package that extracts go build information from go based executables, go.mod and go.sum files and shared libraries. The package leverages the golang debug/buildinfo and golang.org/x/mod/modfile packages to extract the information hence relies on a shared library to do this work.
Example usage
from pyrpmdb import get_rpm_db_info
import json
def test_get_info(file):
res = get_rpm_db_info(file)
print(json.dumps(res, indent=4))
test_get_info("foo/bar")
test_get_info("/usr/bin/du")
test_get_info("/Users/auser/go/src/spire/support/oidc-discovery-provider/oidc-discovery-provider.elf")
test_get_info("/Users/auser/go/src/spire/support/oidc-discovery-provider/oidc-discovery-provider.exe")
test_get_info("/Users/auser/go/src/spire/support/oidc-discovery-provider/oidc-discovery-provider")
test_get_info("/Users/auser/go/pygobuildinfo/pybuildInfo/_pyGoBuildinfo.cpython-39-darwin.so")
test_go_mod("/Users/auser/go/src/pygobuildInfo/go.mod")
test_go_sum("/Users/auser/go/src/pygobuildInfo/go.sum")
The result returned is always a dict object for errors the dictionary returned contains a key; "error" like;
{
"error": "path error:foo/bar"
}
or
{
"error": "/usr/bin/du: could not read Go build info from /usr/bin/du: unrecognized file format"
}
on success a python list of rpm package info struct is returned of this go structure serialized
type PackageInfo struct {
Epoch *int
Name string
Version string
Release string
Arch string
SourceRpm string
Size int
License string
Vendor string
Modularitylabel string
Summary string
PGP string
SigMD5 string
DigestAlgorithm DigestAlgorithm
InstallTime int
BaseNames []string
DirIndexes []int32
DirNames []string
FileSizes []int32
FileDigests []string
FileModes []uint16
FileFlags []int32
UserNames []string
GroupNames []string
Provides []string
Requires []string
}
[
{
"Name": "package_name",
"Version": "version"
}
]
This spackage relies on a shared go library that leverages https://pkg.go.dev/github.com/knqyf263/go-rpmdb/pkg
So relies on this for database support.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for pyrpmdb-0.1.14-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87479115eeb3936d65a966d391a025541fa06e122ce42904360d8ffd3b1f073f |
|
MD5 | 6f591db35e1e283434976c137d146ab6 |
|
BLAKE2b-256 | fd98b7cf154a9a505980537b36238b16c427e5e69136593ad3311800c9cfc4cf |
Hashes for pyrpmdb-0.1.14-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2e6773306ec1fc36d68f9a3487f79698ee87a50b998d24dca96db1032b88e3e |
|
MD5 | efc06bd3cca0234f346baef688efcb49 |
|
BLAKE2b-256 | fe324cd6803d5712e135c0f724b21fa42cd82ba6eb6fe8b5bb1cdd9e2e09a992 |
Hashes for pyrpmdb-0.1.14-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d7be00489f94727c79e5544a935aa9f3734f060c152c96bf1ee7093b7c4eeacd |
|
MD5 | 820b7214f5b9031a72fa22aa66eca114 |
|
BLAKE2b-256 | cbab9dddef565ac4c70358f8e0337d7e1f2b58f24e5e8d0e24a985c67ce1982a |
Hashes for pyrpmdb-0.1.14-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8cc874e949358b7dc2f9fa65a5b98dda3a1a3d6b089d9cf3434af5e218f5306b |
|
MD5 | 7bec158144b436117935ff7fc53755e0 |
|
BLAKE2b-256 | cd7941db5efc55f845393c3dfdc2cb0191c93eed21f9b2960d10972f69e0956d |
Hashes for pyrpmdb-0.1.14-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | edd35821140eb5aee27bf910cdfdc49449e15f26717d0bde5f32f90923f4d5a8 |
|
MD5 | 25a83d940ddc157f83e22187bffeca83 |
|
BLAKE2b-256 | 05c05c67405e41a0a536805a67e0c70880dd508a85b6add13de2a69aa93ac3e4 |
Hashes for pyrpmdb-0.1.14-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ddecf9e0e1636f25eb3f7d24a45bc1293bae0ead7419f9c3ac2cbaba14f9b19 |
|
MD5 | 46287d5af7b9c4e86ca442d28b06c792 |
|
BLAKE2b-256 | 25d7a221ee8fa164a51f8f0cb95aa0704d62a7b932620c00b4bf18875b3eba0a |
Hashes for pyrpmdb-0.1.14-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 378571952d22c04e38a566038cd85062d3e714c5dd6dce44c10b7647b14e8957 |
|
MD5 | ba018fd4a8de30b4acb589ed9bd5cfcb |
|
BLAKE2b-256 | 34299c37c176791d7c2645aafc3a3b0cd0de54e6fc7ed1d1c31ab69952704b7d |
Hashes for pyrpmdb-0.1.14-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 065f1175d48c4b6eb26b042dafd2ad1d36431cce1aa6510943a1c510b306140a |
|
MD5 | b0eacf1fcf3a4bcbae6302ed9ae1a55d |
|
BLAKE2b-256 | 7ec6e09d0f58b237402cda4ca7a4bad5a165eb4b94970bf02a4720667332cc16 |
Hashes for pyrpmdb-0.1.14-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b09bf8b36d8bd1a1e2c6fefc0370a464df8c995dec05aad7a004b4032593d4d |
|
MD5 | 57d8c314d18247e227961c1acf73f96d |
|
BLAKE2b-256 | 6aa0fd4d8ea60b558fb2a895501a5ad065d81eb8fedd95a71701a05466729136 |
Hashes for pyrpmdb-0.1.14-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 356645a333fbc69d5e09534d581603a97d707fc9f7ffd39c9650b4fb067171d2 |
|
MD5 | 15a610b6b3cd1dad646aa3e749eff3e7 |
|
BLAKE2b-256 | b6ba928a9f9bd01feb50c65772692a6ee0f5d6db470d00a7f12b16c055fd3f8f |
Hashes for pyrpmdb-0.1.14-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 925fa82b7a906409d6b05c4e13656e21c5bdcddeafcd0a6d20bea83088056490 |
|
MD5 | 94688ec95bed55420c9501eb7f72be70 |
|
BLAKE2b-256 | 946a4f045618370a95209969f3555bf3c33866bf414da269e83fe0aa558a84b9 |
Hashes for pyrpmdb-0.1.14-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d213dd1ba693b7848347151cd2bc3db46e4f46f7ee6f8f20cd9f55a046b81ef |
|
MD5 | 85380c4a1998ce84cf8305e5e96682e3 |
|
BLAKE2b-256 | 3e4e16f60a27d5d9702bd6e8c3edb15bd1cce7bbd8b0755d849dc86e82fd5ee3 |
Hashes for pyrpmdb-0.1.14-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d84b4e4fa83f1d30c40511855b05281c4870c5fb7b72b305c2374743ed02ad4 |
|
MD5 | d773f105b76cd608726d4e7304e01513 |
|
BLAKE2b-256 | e2741aa7cefec67efba9361c1edd5b04aebb376e8a7b53f302ae525a9d4e1e3d |
Hashes for pyrpmdb-0.1.14-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07db77518c2035b5af19dcb77c7c0fffe5546178348f25d621840079c405af87 |
|
MD5 | 2baba8d57963697b1710bb276aa9372d |
|
BLAKE2b-256 | 3a272c8f4e5fda35402d9efaca708dee7f367c48240af2b8389f417320edd54f |
Hashes for pyrpmdb-0.1.14-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26eb5682668932984f41dddeca982c9d57a72f0744ed82930831f050a93bde11 |
|
MD5 | d62eec23c2b466207a060903abd63550 |
|
BLAKE2b-256 | 520eb71f8df4822da4b47198e5cef7c15ae9c0be0bbef5e52d5febe92f5cb056 |
Hashes for pyrpmdb-0.1.14-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 184a4f4089817645417d82f68b00bbafb489f8d920810ab097e4f16bbbb1e302 |
|
MD5 | 82e12eaadd1d8751ca8901fefa879b3e |
|
BLAKE2b-256 | 86ca2046b185b458fa3bc0219220dfe842cb7db0279a8ccee4b13b225b9b8df6 |
Hashes for pyrpmdb-0.1.14-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a131111e72c4aa1c13b439b006211012634a6df0b9e4a2aad033fac0b1faf20f |
|
MD5 | 430f024cf7e68a487b5be0095606f86a |
|
BLAKE2b-256 | b00a8c866a1ef72deb717b9f7bba43be4c6459856f9afedd7544a627b15c1052 |
Hashes for pyrpmdb-0.1.14-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e374ede80b273ddfabd79e9071d5d3694e0f6f027312ac29547093a8661c9c2 |
|
MD5 | 8457e8c1e6c6f1f4021926b93e99e2be |
|
BLAKE2b-256 | 2f49f32f4163b829ccee83d299c780f59e30d7301508bbac942d2cf340b9603f |
Hashes for pyrpmdb-0.1.14-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f445ba29651c74502d249f1356a833fbd174e50f9b8962be53c7fd34d3ee8e04 |
|
MD5 | df0c3332620b73ac9df3cd14ba208942 |
|
BLAKE2b-256 | 47d70aa7affc4a4534c1af8b9918c7e7f135c72d141e43c8f7910c269ccc47fe |
Hashes for pyrpmdb-0.1.14-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 211fa2800b816f085cf258d19cef63891c31dd7acf5785fa1b75fa03d3de3a3e |
|
MD5 | 8a92c7284f48f392e08490760dac5bc6 |
|
BLAKE2b-256 | 4e21530bfbfadf8005fa771edd50c3719ebe0ca0d717537691738f6307ff5aec |
Hashes for pyrpmdb-0.1.14-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5ec1ec5bde7a22f936bb24a4123ff3f5b83d6b65e4f60557fcbeeefe40dac67 |
|
MD5 | 8e3f01ad4cb7f13748e5cc1292f4815d |
|
BLAKE2b-256 | d7ee23e7bfa790c1c639f43cd3b773a430fcdc420504cd9d85a3632eaabb3522 |
Hashes for pyrpmdb-0.1.14-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0c436baf57e888e688705cb4a56a05e9c631d5093f5b5d1dc08d02e808872b4 |
|
MD5 | 4fad56b74eccae8586424be318150ffb |
|
BLAKE2b-256 | 1cb59c986ead98d6f828677b0f389bd1755a5f229463a5c28d6de90336c04b68 |
Hashes for pyrpmdb-0.1.14-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5d297772fa4935333a33ef86773c1604012cf85fa7ae19507a336b10bcfb115 |
|
MD5 | e05779f553fec995ba07974460f21035 |
|
BLAKE2b-256 | cdaf1cc275beacbd8a93278bee4876a29c2841014cf8ee4038733c6058800a96 |
Hashes for pyrpmdb-0.1.14-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be45fd39902eb2f6a254510b3c8eaa04b66e71b86e2715c40d50c1c365977c54 |
|
MD5 | 3018e5978e9d678ab95fe741dd8556e9 |
|
BLAKE2b-256 | 8bc76d5d0dde786172f6a83d672e408dc48629243ac96db6f5deec3069a3daec |
Hashes for pyrpmdb-0.1.14-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb890d02e6dc959aa1f6d290ea13fd9efd3178284d973578fc7470a6c5530294 |
|
MD5 | a53e8aa9d3133f43098f5ceebcadea74 |
|
BLAKE2b-256 | 3115ce31be52784a3d9438df8a709df674bbc6fae8ac3cc3ba69af7bdeb4a1a3 |
Hashes for pyrpmdb-0.1.14-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50df070f6fb0d192d7e241634edba0773a2448c814fa7614d8744c6aa15d3b8c |
|
MD5 | d58b3f0db5c320184e706386a9b58d28 |
|
BLAKE2b-256 | fab0f9dcd5d1e356928a4ba1b2dc6cbbd7bee9b199eaef00d3b098d91c4c32a3 |
Hashes for pyrpmdb-0.1.14-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3572b006b1be2e7965f40e44691ff3bd065cc674b3c769ba1db4d5c188baeacf |
|
MD5 | a51ed0f492be8f4d01bc65a687ce3864 |
|
BLAKE2b-256 | a95c0744e44f9bac6e4869f0c009b2daaf1465199a46b02b7855571319390aa6 |
Hashes for pyrpmdb-0.1.14-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fd1bd43f1db614edb585799f69b2475d30e9c0ec2af43977154f0f099eb0e27 |
|
MD5 | 28303867cf379765ece48634a84de902 |
|
BLAKE2b-256 | e220823b883df0838e14e64622e2bd7542f384fac86713a1802ba7371aafa6cd |
Hashes for pyrpmdb-0.1.14-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05dbee91cabb0558fb10144515840597d0b0e5bcf3c02890fa4d83d1ce8692ce |
|
MD5 | 89369563830805a3a1b98933c1aa68e6 |
|
BLAKE2b-256 | 16a38299ee8dbaeaf47a6d6934c64287f11ac336cdc453aeb28a2c70f5c0ba48 |