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-pp310-pypy310_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c1594dfb8514ed108378554d25b071d32f00679174dfc3a07ad770f99e012e7 |
|
MD5 | be0062bd4cbcec68b53b37bcd9418aad |
|
BLAKE2b-256 | dc38f1211343fd241374df151ff77a5588d60dc8f5979553ca33a4b2a857cd87 |
Hashes for pyrpmdb-0.1-pp310-pypy310_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae541738cab828690d9521e1bfbfbafcf4df8460997db90f9f6385c06b1eea8d |
|
MD5 | e02f9bf52a23ac2176baf021208ea965 |
|
BLAKE2b-256 | de417a9b893c7aa70653474897610c0e32d9408eba981d3211a61aad2ca6f9e9 |
Hashes for pyrpmdb-0.1-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 18e8b285bbdf6bf8e49ff95a8f7fd7a30a760adbc262506a36e320db30069885 |
|
MD5 | 821cbbbd87f7d2cd1772c01ffcffb2e0 |
|
BLAKE2b-256 | 032eefcda276f5142a66fe9c6fb6e9b1f452f640298593bd43ac990ba7fc3aea |
Hashes for pyrpmdb-0.1-pp39-pypy39_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4391eec21533513a9b0526e9419047c88dd256dcdba8ef97dc3d47241379f2ab |
|
MD5 | 477285ce5f0b6b1589acfe2877d40342 |
|
BLAKE2b-256 | 21f8760bcceccc54a7dab2056d02cb64a5c1b0f162f37b8e9720ca52c8b089e2 |
Hashes for pyrpmdb-0.1-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80539c837737618ba1d322283378250959d2a926427a1af1a416601aa93a964e |
|
MD5 | f1732d5f3931f81307e02c6b30b5c9f4 |
|
BLAKE2b-256 | 546d920b811e58d11120c8501462d275dd080f2482b9c77efa1d5f02bb7eeade |
Hashes for pyrpmdb-0.1-pp38-pypy38_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf814b2af3b13b63c32f7cecde5a60cac505044d28fd194ade86687fdc54a00b |
|
MD5 | 8d20c4f5da7bc03583d58beee07d4a78 |
|
BLAKE2b-256 | 5f730054c42a3824b3b705fd24284b3e9170bbc71f04578a0953b12acf726e0a |
Hashes for pyrpmdb-0.1-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f1776c3da6a9c68c0e49c791abea2ce736940ee889eb464da26635912f26875 |
|
MD5 | 807595c5fa947f21ec102adb40c1cc60 |
|
BLAKE2b-256 | 227b1fda6c874dc25c3f39acfd70504e343367fdb7b16a7011343d0f2353d7ed |
Hashes for pyrpmdb-0.1-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08d5460d7b8ca8c792ff32e7aae22e805a05dd987309caf6a6c2def8f44d8085 |
|
MD5 | 962804c7da3ba5a56bf784cfe3d8fd47 |
|
BLAKE2b-256 | 38344f6efbae8ec3714c49b3bbb0cacfe9703c4f371b88478b3100a1618d558d |
Hashes for pyrpmdb-0.1-cp312-cp312-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49bc1de128018d769ab3873838a83818a9e03613bb2ecfe569f277dd772c19c3 |
|
MD5 | f275f82a5449bc1fd9df432b2f6789df |
|
BLAKE2b-256 | 83099953cb6a3fd8966bbf63a7bad961343cdcc27afd93e281207b27cde4e609 |
Hashes for pyrpmdb-0.1-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d1d993c33c8d336368dfe75ead33dc7bfb0a36093bf5ff8b1548c47ac5b50ea |
|
MD5 | 83f9364f11a715917f2e7d907d6f7d7b |
|
BLAKE2b-256 | 55bcbdfa26b8b8ed84c27062f84c117ebb20585ac9170446f09204e5d1a1581f |
Hashes for pyrpmdb-0.1-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b633e7cd0ec5db6f481da2334b1e5dd0dc01607a93337886d6f34e21512024c |
|
MD5 | c1ad6f5babdd4defe2ff882b4df8242c |
|
BLAKE2b-256 | c210605e286bed0afe141d4bf4ab23129bdcb08187623d54e893f2a6199066d1 |
Hashes for pyrpmdb-0.1-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3aafcbc95af496d6ecfe08d8b7d242e210ee029902415eeecd2a501bffa51bb6 |
|
MD5 | f828c52c55eb4fbbf3dd175885d17c65 |
|
BLAKE2b-256 | 30425b75089fa229bcd0325cbc07bc3bba00b2ecc7de9def6a8a5f9eb869ff7f |
Hashes for pyrpmdb-0.1-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d90d8153813f88f13ef263c30eefa92b741dcb72361721e7571815d083957485 |
|
MD5 | 792e392799b50aaa70a860c214a3b898 |
|
BLAKE2b-256 | aeeb330fc7836388b6de043c13462b6c108af4da3bbd2d23ad7001f68415475c |
Hashes for pyrpmdb-0.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32c442529c4ac76273946c612abd528a1db734bf90a2664efda8d7f20b8312b3 |
|
MD5 | 55f4852f2701db32c71739901c1ff9c3 |
|
BLAKE2b-256 | 0183c526f1c06a96a515f2d0cc710fc73d7525ed244bb58445fac1ca8faec88c |
Hashes for pyrpmdb-0.1-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b5f49615dd54e6d51117c1737b0d306c39b6f82b88536ed49867022d798d318 |
|
MD5 | c46be49dae2e7211b08e81a1ce0ee157 |
|
BLAKE2b-256 | c393269eacc07f7738a30af9cc4729ff2d62a4ebb8130046b83b4be114fdc9cd |
Hashes for pyrpmdb-0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 975ffd956c0c7b796b7fdb26d70408d13a644055c7203989dfa6e62dbd44c479 |
|
MD5 | cbe44379c8e0207b681a5eb01842dbfe |
|
BLAKE2b-256 | 35a0d4d662eddb3bfbebae1a003793a28448fc21f3d7f0378bbdcdd3f293034e |
Hashes for pyrpmdb-0.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d24dc6d7fc58e30566afe72eb379562b5ee4c0ce147d2f63240de58609f19af2 |
|
MD5 | 54a8a790ee95313654a900d87a935892 |
|
BLAKE2b-256 | 1c1621dbb3de6c6b802c2f754396222716c518a88304d083d19aa0fbbac6cc48 |
Hashes for pyrpmdb-0.1-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e92099c416345ba57fc0d07257ae7817024104e17af024b92f20c804ee1f60e2 |
|
MD5 | fd642897580d521fdd56531615fe09e0 |
|
BLAKE2b-256 | b80218c8fa9d15ccd46fec4b9900daa6e5b0d39d56a9cab168bcaf56c6e2d778 |
Hashes for pyrpmdb-0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 88be019f378801bc96f213f628a400c562a664dadfa686c7ccc358d2553e36fb |
|
MD5 | b214224c42a163ddfe866b973ef4309b |
|
BLAKE2b-256 | 10c84a18b8aacc78c2117883839f36abb7db85f86a865f1f584e3a336686b56b |
Hashes for pyrpmdb-0.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2982211b995499494575bfbeecc568464cb52a722b8796fb8de6a7ff2adde701 |
|
MD5 | 63b93824cc13e39dbbe3983ac6717aeb |
|
BLAKE2b-256 | bfba2108d45d6563da04db590ab65953288efecdaf3edc6cf261e24b112e70ba |
Hashes for pyrpmdb-0.1-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5417333b307a3abef14e10f81b2dbdc3845bd150d17d096a918f03c04f98767 |
|
MD5 | 104ded05cd9262ea0b5a6181b09900e8 |
|
BLAKE2b-256 | 13d4b393f4ebeba5798929358b8ddcb65dd37b6d6b79c10edb4d9f5168f002b7 |
Hashes for pyrpmdb-0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1ff6c554ca93b557af2109cae8b3f61b8deeffb76941ac704b67741c6d96e3e |
|
MD5 | 7df00089ab1b4774d5ca9ab2230bfdc5 |
|
BLAKE2b-256 | 2b616a20451a0a30a7314f7ac3301e0b6c0a014ac1852080b7e2546aab3e5993 |
Hashes for pyrpmdb-0.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3ab5b673b554ac87d715467d472aebd6fbd3c1dd1c8b92697251763c70b913ce |
|
MD5 | db181c47b2fabfcbeb2b74324e4097fd |
|
BLAKE2b-256 | a2d2748156caea58a155ec610dd718e4ef2304e42d500ba3e442aed59347af4a |
Hashes for pyrpmdb-0.1-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7d1f435f07f5658c543cee7f952f0568dd0555473a63ccd1a460d539ce89cf93 |
|
MD5 | 4680323b61e079557c2247eeecd0cac7 |
|
BLAKE2b-256 | 0fb66e0e61f63888ca0d7ba8c811c9eb743fc55ce48bf74d9fe07db029325d66 |
Hashes for pyrpmdb-0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5642dfdb2a2a315f249f859631163f5247d0d6eee6842eb85fe3a056c6e217c5 |
|
MD5 | 2b28091e55cffc018a44eeb2489019ff |
|
BLAKE2b-256 | deb0b56b70c02bc61ecbe1219a37dadca6bde316e80829eb8754f49500525cc3 |
Hashes for pyrpmdb-0.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec279abc44170bbd53af55ed34ace79140a6ffecdf26cfd9915131a63dee058a |
|
MD5 | 929a57e4e42efb5cfdc84d0920d1eef2 |
|
BLAKE2b-256 | 530f7c6c1adfd7cfa7fd975557b66c5622a9230d07853367109ba5c711b520bd |
Hashes for pyrpmdb-0.1-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9bfa7f8f555d14f05507328bc3a9faa6705d7e778e3e617c0e12f7be6b1cf063 |
|
MD5 | 1bea5300a3e3a778c27204ca2e1c97be |
|
BLAKE2b-256 | ba2f6af6d1fda597ef3a08d7d6af9b8cb87ef11b1f6442363576d0d994b09c52 |
Hashes for pyrpmdb-0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca0ae49164406d99f3f28e6d3d0dab68ca760508abec2ed6252ed857b4847e50 |
|
MD5 | 25fc634331c95af2fdc2deef58650f28 |
|
BLAKE2b-256 | fbb7c9c23d7477f6961003a8d444ed347faac5eb8ac915a3b2c7f973628d4e38 |
Hashes for pyrpmdb-0.1-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a61feacb8fc4e268bf3dc1748ff7791e59fd6dcb6dcf9d257716851003de74cd |
|
MD5 | 2c5bb5bf8764e82eefd1b052458678b0 |
|
BLAKE2b-256 | 3fa6678ac44284ed312a4f1c8ffc63f75dbbbf6c75e8da0bcd20349fa785671d |