-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix tests, update README, unique (#1)
Signed-off-by: Christian Heimes <[email protected]>
- Loading branch information
Showing
5 changed files
with
129 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,68 @@ | ||
# ELF deps | ||
|
||
Python implementation of RPM [elfdeps](https://github.com/rpm-software-management/rpm/blob/master/tools/elfdeps.c). | ||
Python implementation of RPM [`elfdeps`](https://github.com/rpm-software-management/rpm/blob/master/tools/elfdeps.c). The `elfdeps` tool can extract dependencies and provides from an ELF binary. | ||
|
||
## Example | ||
|
||
```shell-session | ||
$ elfdeps --requires /usr/bin/python3.12 | ||
libc.so.6(GLIBC_2.34)(64bit) | ||
libc.so.6(GLIBC_2.2.5)(64bit) | ||
libpython3.12.so.1.0()(64bit) | ||
libc.so.6()(64bit) | ||
rtld(GNU_HASH) | ||
$ elfdeps --provides /usr/lib64/libpython3.12.so | ||
libpython3.12.so.1.0()(64bit) | ||
``` | ||
|
||
```shell-session | ||
$ elfdeps --provides /lib64/libc.so.6 | ||
libc.so.6(GLIBC_2.2.5)(64bit) | ||
libc.so.6(GLIBC_2.2.6)(64bit) | ||
libc.so.6(GLIBC_2.3)(64bit) | ||
... | ||
libc.so.6(GLIBC_2.36)(64bit) | ||
libc.so.6(GLIBC_2.38)(64bit) | ||
libc.so.6(GLIBC_ABI_DT_RELR)(64bit) | ||
libc.so.6(GLIBC_PRIVATE)(64bit) | ||
libc.so.6()(64bit) | ||
``` | ||
|
||
## RPM | ||
|
||
In Fedora-based distributions, RPM packages provide and require virtual packages with ELF sonames and versions. The package manager can install virtual provides. | ||
|
||
The `python3` base package depends on `libpython3.12.so.1.0()(64bit)` and `libc.so.6(GLIBC_2.34)(64bit)`: | ||
|
||
```shell-session | ||
$ rpm -qR python3 | ||
libc.so.6()(64bit) | ||
libc.so.6(GLIBC_2.2.5)(64bit) | ||
libc.so.6(GLIBC_2.34)(64bit) | ||
libpython3.12.so.1.0()(64bit) | ||
... | ||
rtld(GNU_HASH) | ||
``` | ||
|
||
The `python3-libs` package virtually provides `libpython3.12.so.1.0()(64bit)`: | ||
|
||
```shell-session | ||
$ rpm -qP python3-libs | ||
bundled(libb2) = 0.98.1 | ||
libpython3.12.so.1.0()(64bit) | ||
libpython3.so()(64bit) | ||
python-libs = 3.12.3-2.fc39 | ||
python3-libs = 3.12.3-2.fc39 | ||
python3-libs(x86-64) = 3.12.3-2.fc39 | ||
python3.12-libs = 3.12.3-2.fc39 | ||
``` | ||
|
||
```shell-session | ||
$ sudo dnf install 'libc.so.6(GLIBC_2.34)(64bit)' 'libpython3.12.so.1.0()(64bit)' | ||
Package glibc-2.38-18.fc39.x86_64 is already installed. | ||
Package python3-libs-3.12.3-2.fc39.x86_64 is already installed. | ||
Dependencies resolved. | ||
Nothing to do. | ||
Complete! | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters