From 210c1d2d4f2a8214377004eb8ab9d90705aaf979 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 22 May 2024 13:13:04 +0100 Subject: [PATCH 1/3] manpage: check in git Generating it requires a very new argparse-manpage, which is not available in Debian stable. It's not going to change often, and there's a makefile rule to regenerate it, so just check it in. --- Makefile | 2 +- docs/dlopen-notes.1 | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 docs/dlopen-notes.1 diff --git a/Makefile b/Makefile index 9643eba..e2d3d77 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ all: dlopen-notes.1: dlopen-notes.py docs/dlopen-description.man Makefile argparse-manpage \ - --output=$@ \ + --output=docs/$@ \ --pyfile=$< \ --function=make_parser \ --project-name=package-notes \ diff --git a/docs/dlopen-notes.1 b/docs/dlopen-notes.1 new file mode 100644 index 0000000..e86f6ba --- /dev/null +++ b/docs/dlopen-notes.1 @@ -0,0 +1,38 @@ +.TH DLOPEN\-NOTES.PY "1" "2024\-05\-22" "package\-notes" "Generated Python Manual" +.SH NAME +dlopen\-notes.py +.SH SYNOPSIS +.B dlopen\-notes.py +[-r] [-s] [-f [FEATURE1,FEATURE2]] [-h] filename [filename ...] +.SH DESCRIPTION +Read .note.dlopen notes from ELF files and report the contents. +.PP +ELF binaries store link-time dependencies in their headers, which can be parsed +by various tools. There is no machine-readable metadata about dependencies +loaded at build time via +.BR \%dlopen (3) +available by default. The ELF Dlopen Metadata specification aims to fill this +gap, by defining a common format. +.PP +This tool allows parsing such a note, and printing out the result in various +formats. + +.TP +\fBfilename\fR +Library file to extract notes from + +.SH OPTIONS +.TP +\fB\-r\fR, \fB\-\-raw\fR +Show the original JSON extracted from input files + +.TP +\fB\-s\fR, \fB\-\-sonames\fR +List all sonames and their priorities, one soname per line + +.TP +\fB\-f\fR \fI\,[FEATURE1,FEATURE2]\/\fR, \fB\-\-features\fR \fI\,[FEATURE1,FEATURE2]\/\fR +Describe features, can be specified multiple times + +.SH COMMENTS +If no option is specifed, \-\-raw is the default. From 60cad94059922a0655c9bc3ea08bab32333d6f7e Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Wed, 22 May 2024 13:13:26 +0100 Subject: [PATCH 2/3] makefile: install manpage too --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index e2d3d77..46f82e9 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ dlopen-notes.1: dlopen-notes.py docs/dlopen-description.man Makefile install: install -m 755 -D dlopen-notes.py $(DESTDIR)/usr/bin/dlopen-notes + install -m 644 -D docs/dlopen-notes.1 $(DESTDIR)/usr/share/man/man1/dlopen-notes.1 check: make -C test check From 84adc9d952cabf879ff9b4ad8123e67fb0755b51 Mon Sep 17 00:00:00 2001 From: Luca Boccassi Date: Tue, 21 May 2024 16:30:38 +0100 Subject: [PATCH 3/3] debian: install dlopen-notes manpage --- debian/dh-dlopenlibdeps.manpages | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/dh-dlopenlibdeps.manpages b/debian/dh-dlopenlibdeps.manpages index 87a4db4..3fb12d3 100644 --- a/debian/dh-dlopenlibdeps.manpages +++ b/debian/dh-dlopenlibdeps.manpages @@ -1 +1,2 @@ debian/dh_dlopenlibdeps.1 +usr/share/man/man1/dlopen-notes.1