From 27199528d936b8b420f3d2d90dc20745f114d1e7 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Tue, 25 Oct 2022 22:47:39 +1100 Subject: [PATCH] fixes b to please lintian --- Makefile | 23 ++++++++--------- debian/control | 14 ++++++++++- debian/files | 8 ++++-- debian/libpathmap-0.install | 2 ++ debian/libpathmap-0.triggers | 0 debian/libtarmap-0.install | 2 ++ debian/libtarmap-0.triggers | 0 debian/lintian-overrides | 2 -- debian/tarmap.install | 2 ++ libpathmap.c => libpathmap-0.c | 0 libpathmap.so.8.adoc => libpathmap0.so.8.adoc | 25 ++++++++----------- libtarmap.c => libtarmap-0.c | 0 libtarmap.so.8.adoc => libtarmap0.so.8.adoc | 6 ++--- 13 files changed, 50 insertions(+), 34 deletions(-) create mode 100644 debian/libpathmap-0.install create mode 100644 debian/libpathmap-0.triggers create mode 100644 debian/libtarmap-0.install create mode 100644 debian/libtarmap-0.triggers create mode 100644 debian/tarmap.install rename libpathmap.c => libpathmap-0.c (100%) rename libpathmap.so.8.adoc => libpathmap0.so.8.adoc (72%) rename libtarmap.c => libtarmap-0.c (100%) rename libtarmap.so.8.adoc => libtarmap0.so.8.adoc (80%) diff --git a/Makefile b/Makefile index 5e75dfd..aaa5174 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,8 @@ SBINDIR = $(DESTDIR)/usr/sbin MAN8DIR = $(DESTDIR)/usr/share/man/man8 SBINFILES = tarmap -LIBFILES = libtarmap.so libpathmap.so -MAN8FILES = $(addsuffix .8,$(LIBFILES) $(SBINFILES)) +LIBFILES = libtarmap-0.so libpathmap-0.so +MAN8FILES = libpathmap0.so.8 libtarmap0.so.8 tarmap.8 HTMLDOC = $(addsuffix .html,$(MAN8FILES)) GENFILES = $(LIBFILES) $(SBINFILES) $(MAN8FILES) @@ -20,16 +20,15 @@ default: $(GENFILES) asciidoc -bhtml $^ # Generic rule for making a dynamic library form a same named .c file -V := .0 %.so: %.c - gcc -Wall -fPIC -Wl,-init,so_init,-soname,$@$V -shared -o $@$V $^ -ldl + gcc -g -Wall -fPIC -Wl,-init,so_init,-soname,$@ -shared -o $@ $^ -ldl # Generic rule for making a binary from a same named .c file %: %.c - gcc -Wall -fPIC -o $@ $^ -ldl + gcc -g -Wall -fPIC -o $@ $^ -ldl clean: - rm -f $(GENFILES) + rm -f $(GENFILES) pool/* # Installation targets @@ -38,11 +37,7 @@ INSTALLTARGETS = $(addprefix $(LIBDIR)/,$(LIBFILES)) INSTALLTARGETS += $(addprefix $(MAN8DIR)/,$(MAN8FILES)) # Generic rule to install bmo the install command without renaming -$(LIBDIR)/%: % - install -D -T $<$V $@$V - ln -s $<$V $@ - -$(SBINDIR)/% $(MAN8DIR)/%: % +$(LIBDIR)/% $(SBINDIR)/% $(MAN8DIR)/%: % install -D -T $< $@ install: $(INSTALLTARGETS) @@ -54,4 +49,8 @@ pool: deb: pool PREFIX= INCLUDE_PREFIX=/usr XDH_OPTIONS=--destdir=pool \ dpkg-buildpackage -us -uc --build=full - mv ../pathmap_* ../libpathmap[-_]* pool + mv ../pathmap_* pool + mv ../libpathmap-0[-_]* pool + mv ../libtarmap-0[-_]* pool + mv ../tarmap[-_]* pool + lintian --profile=devuan pool/*.deb diff --git a/debian/control b/debian/control index a57ab17..fd49ea6 100644 --- a/debian/control +++ b/debian/control @@ -8,9 +8,21 @@ Build-Depends: debhelper-compat (= 12), Standards-Version: 4.3.0 Vcs-Git: repo@borta.rrq.au:ralph/pathmap.git -Package: libpathmap +Package: libpathmap-0 +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: preload libraries for path mapping + LD_PRELOAD library that overrides file replace the path prefix. + +Package: libtarmap-0 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: preload libraries for path mapping LD_PRELOAD library that overrides file access so as to offer files from a given tar/tgz archive first. + +Package: tarmap +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends}, libtarmap +Description: preload libraries for path mapping + Utility to run bash with a libtarmap preloaded. diff --git a/debian/files b/debian/files index 4be8d51..99eee85 100644 --- a/debian/files +++ b/debian/files @@ -1,3 +1,7 @@ -libpathmap-dbgsym_0.1_amd64.deb debug optional automatic=yes -libpathmap_0.1_amd64.deb admin optional +libpathmap-0-dbgsym_0.1_amd64.deb debug optional automatic=yes +libpathmap-0_0.1_amd64.deb admin optional +libtarmap-0-dbgsym_0.1_amd64.deb debug optional automatic=yes +libtarmap-0_0.1_amd64.deb admin optional pathmap_0.1_amd64.buildinfo admin optional +tarmap-dbgsym_0.1_amd64.deb debug optional automatic=yes +tarmap_0.1_amd64.deb admin optional diff --git a/debian/libpathmap-0.install b/debian/libpathmap-0.install new file mode 100644 index 0000000..b28dd8f --- /dev/null +++ b/debian/libpathmap-0.install @@ -0,0 +1,2 @@ +libpathmap-0.so usr/lib +libpathmap.so.8 usr/share/man/man8 diff --git a/debian/libpathmap-0.triggers b/debian/libpathmap-0.triggers new file mode 100644 index 0000000..e69de29 diff --git a/debian/libtarmap-0.install b/debian/libtarmap-0.install new file mode 100644 index 0000000..7faf019 --- /dev/null +++ b/debian/libtarmap-0.install @@ -0,0 +1,2 @@ +libtarmap-0.so usr/lib +libtarmap.so.8 usr/share/man/man8 diff --git a/debian/libtarmap-0.triggers b/debian/libtarmap-0.triggers new file mode 100644 index 0000000..e69de29 diff --git a/debian/lintian-overrides b/debian/lintian-overrides index e13b204..e69de29 100644 --- a/debian/lintian-overrides +++ b/debian/lintian-overrides @@ -1,2 +0,0 @@ -libpathmap: link-to-shared-library-in-wrong-package -libpathmap: package-name-doesnt-match-sonames diff --git a/debian/tarmap.install b/debian/tarmap.install new file mode 100644 index 0000000..b5db554 --- /dev/null +++ b/debian/tarmap.install @@ -0,0 +1,2 @@ +tarmap usr/bin +tarmap.8 usr/share/man/man8 diff --git a/libpathmap.c b/libpathmap-0.c similarity index 100% rename from libpathmap.c rename to libpathmap-0.c diff --git a/libpathmap.so.8.adoc b/libpathmap0.so.8.adoc similarity index 72% rename from libpathmap.so.8.adoc rename to libpathmap0.so.8.adoc index 7b93dce..ff8be3d 100644 --- a/libpathmap.so.8.adoc +++ b/libpathmap0.so.8.adoc @@ -1,4 +1,4 @@ -libpathmap.so(8) +libpathmap0.so(8) ================ :doctype: manpage :revdate: {sys:date "+%Y-%m-%d %H:%M:%S"} @@ -7,24 +7,24 @@ libpathmap.so(8) NAME ---- -libpathmap.so - preload utility to redirect pathnames +libpathmap0.so - preload utility to redirect pathnames SYNOPSYS -------- -+LD_PRELOAD=libpathmap.so+ _command_ ++LD_PRELOAD=libpathmap0.so+ _command_ DESCRIPTION ----------- -This dynamic library, libpathmap.so, is intended to be used as a +This dynamic library, libpathmap0.so, is intended to be used as a "preload" library for programs for which pathnames are to be mapped to a different common prefix. The effect is somewhat similar to +chroot+ in that absolute pathnames, which normally are from the root of the file system, get mapped to be relative to the choosen prefix point. -+libpathmap.so+ is "configured" by setting environment variable ++libpathmap0.so+ is "configured" by setting environment variable +PATHMAPNOT+ to be the path prefixes, given as a colon separated list, -that +libpathmap.so+ should be concerned with. The first of them is +that +libpathmap0.so+ should be concerned with. The first of them is then used as the prefix to add to the program's pathnames (when opening files) except to those pathnames that start with any of the prefixes in the list, including the first. @@ -33,12 +33,12 @@ For example, if the prefix +/elsewhere+ should be added to all pathnames for a program _prgrm_ then the command line might be: ---- -PATHMAPNOT=/elsewhere LD_PRELOAD=libpathmap.so prgrm +PATHMAPNOT=/elsewhere LD_PRELOAD=libpathmap0.so prgrm ---- Note however that dynamically linked libraries are loaded via statically linked function calls and they are therefore not handled -via libpathmap.so. +via libpathmap0.so. ENVIRONMENT ----------- @@ -46,7 +46,7 @@ ENVIRONMENT PATHMAPNOT:: This environment variable tells which path prefixes, given as a colon -separated list, +libpathmap.so+ should be concerned with. The first +separated list, +libpathmap0.so+ should be concerned with. The first prefix is the one to add to all pathnames except to those of any of the prefixes in the list. @@ -57,14 +57,11 @@ Assume there is a directory +/home/test/extra+ ---- env PATHMAPNOT=/home/test:/proc:/dev:/lib:/usr:/bin \ - LD_PRELOAD=libpathmap.so \ + LD_PRELOAD=libpathmap0.so \ ls /extra ---- SEE ALSO -------- -libtarmap.so:: - -something - +libtarmap0.so, tarmap diff --git a/libtarmap.c b/libtarmap-0.c similarity index 100% rename from libtarmap.c rename to libtarmap-0.c diff --git a/libtarmap.so.8.adoc b/libtarmap0.so.8.adoc similarity index 80% rename from libtarmap.so.8.adoc rename to libtarmap0.so.8.adoc index 6fe8cff..107893b 100644 --- a/libtarmap.so.8.adoc +++ b/libtarmap0.so.8.adoc @@ -1,4 +1,4 @@ -libtarmap.so(8) +libtarmap0.so(8) =============== :doctype: manpage :revdate: {sys:date "+%Y-%m-%d %H:%M:%S"} @@ -7,11 +7,11 @@ libtarmap.so(8) NAME ---- -libtarmap.so - preload utility to map pathnames into a tar file +libtarmap0.so - preload utility to map pathnames into a tar file SYNOPSYS -------- -LD_PRELOAD=libtarmap.so TARMAP=_tarfile_ _command_ +LD_PRELOAD=libtarmap0.so TARMAP=_tarfile_ _command_ DESCRIPTION ----------- -- 2.47.2