updates
authorRalph Ronnquist <ralph.ronnquist@gmail.com>
Mon, 24 Oct 2022 00:59:33 +0000 (11:59 +1100)
committerRalph Ronnquist <ralph.ronnquist@gmail.com>
Mon, 24 Oct 2022 00:59:33 +0000 (11:59 +1100)
Makefile
debian/changelog
debian/rules [changed mode: 0644->0755]
libpathmap.8.adoc [deleted file]
libpathmap.so.8.adoc [new file with mode: 0644]
libtarmap.8.adoc [deleted file]
libtarmap.so.8.adoc [new file with mode: 0644]
tarmap.8.adoc [new file with mode: 0644]

index a1f3982f4e3819bb958c90e3e68bf007b64f085f..52d522a94a5c4beb0f61b835c9cd998e43bac345 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -6,21 +6,22 @@ SBINFILES = tarmap
 LIBFILES = libtarmap.so libpathmap.so
 MAN8FILES = $(addsuffix .8,$(LIBFILES) $(SBINFILES))
 HTMLDOC = $(addsuffix .html,$(MAN8FILES))
-GENFILES = $(LIBFILES) $(SBINFILES)
 
-default: $(GENFILES)
+GENFILES = $(LIBFILES) $(SBINFILES) $(MAN8FILES)
 
-# Generic rule to compile an html file from an adoc file
-%.html: %.adoc
-       asciidoc -bhtml $^
+default: $(GENFILES) 
 
 # Generic rule to compile a man page from an adoc file
 %: %.adoc
        a2x -d manpage -f manpage $^
 
+# Generic rule to compile an html file from an adoc file
+%.html: %.adoc
+       asciidoc -bhtml $^
+
 # Generic rule for making a dynamic library form a same named .c file
 %.so: %.c
-       gcc -Wall -fPIC  -Wl,-init,so_init -shared -o $$@ $$^ -ldl
+       gcc -Wall -fPIC  -Wl,-init,so_init -shared -o $$^ -ldl
 
 # Generic rule for making a binary from a same named .c file
 %: %.c
@@ -42,6 +43,10 @@ $(LIBDIR)/% $(SBINDIR)/% $(MAN8DIR)/%: %
 install: $(INSTALLTARGETS)
 
 # Target for development building of the deb package
-deb:
-       PREFIX= INCLUDE_PREFIX=/usr dpkg-buildpackage -us -uc --build=full
+pool:
+       mkdir -p pool
 
+deb: pool
+       PREFIX= INCLUDE_PREFIX=/usr XDH_OPTIONS=--destdir=pool \
+       dpkg-buildpackage -us -uc --build=full
+       mv ../pathmap_* ../libpathmap[-_]* pool
index 5a99af39ef780aa98e39b4c1e36f1c371009283d..5964214d86d020f2d10d382b787755b5b2f08456 100644 (file)
@@ -1,4 +1,3 @@
 pathmap (0.1) experimental; urgency=medium
-
-       * creation
+    * creation
  -- Ralph Ronnquist <ralph.ronnquist@gmail.com>  Mon, 29 Mar 2021 12:51:07 +1100
old mode 100644 (file)
new mode 100755 (executable)
index 9354bd2..942ae72
@@ -3,6 +3,6 @@
 %:
        dh $@
 
-#
-#override_dh_usrlocal:
-#      true
+
+override_dh_usrlocal:
+       true
diff --git a/libpathmap.8.adoc b/libpathmap.8.adoc
deleted file mode 100644 (file)
index 0430292..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-libpathmap.so(8)
-================
-:doctype: manpage
-:revdate: {sys:date "+%Y-%m-%d %H:%M:%S"}
-:COLON: :
-:EQUALS: =
-
-NAME
-----
-libpathmap.so - preload utility to redirect pathnames
-
-SYNOPSYS
---------
-+LD_PRELOAD=libpathmap.so+ _command_
-
-DESCRIPTION
------------
-
-This dynamic library, libpathmap.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
-+PATHMAPNOT+ to be the path prefixes, given as a colon separated list,
-that +libpathmap.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.
-
-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
-----
-
-However, if +prgrm+ is a dynamically linked executable, then all
-libraries
-
-ENVIRONMENT
------------
-
-PATHMAPNOT::
-
-This environment variable tells which path prefixes, given as a colon
-separated list, +libpathmap.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.
-
-EXAMPLES
---------
-
-Assume there is a directory +/home/test/extra+
-
-> env PATHMAPNOT=/home/test:/proc:/dev:/lib:/usr:/bin \
-      LD_PRELOAD=libpathmap.so \
-      ls /extra
-      
-SEE ALSO
---------
diff --git a/libpathmap.so.8.adoc b/libpathmap.so.8.adoc
new file mode 100644 (file)
index 0000000..20fe8e5
--- /dev/null
@@ -0,0 +1,69 @@
+libpathmap.so(8)
+================
+:doctype: manpage
+:revdate: {sys:date "+%Y-%m-%d %H:%M:%S"}
+:COLON: :
+:EQUALS: =
+
+NAME
+----
+libpathmap.so - preload utility to redirect pathnames
+
+SYNOPSYS
+--------
++LD_PRELOAD=libpathmap.so+ _command_
+
+DESCRIPTION
+-----------
+
+This dynamic library, libpathmap.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
++PATHMAPNOT+ to be the path prefixes, given as a colon separated list,
+that +libpathmap.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.
+
+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
+----
+
+However, if +prgrm+ is a dynamically linked executable, then all
+libraries
+
+ENVIRONMENT
+-----------
+
+PATHMAPNOT::
+
+This environment variable tells which path prefixes, given as a colon
+separated list, +libpathmap.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.
+
+EXAMPLES
+--------
+
+Assume there is a directory +/home/test/extra+
+
+----
+env PATHMAPNOT=/home/test:/proc:/dev:/lib:/usr:/bin \
+    LD_PRELOAD=libpathmap.so \
+    ls /extra
+----
+
+SEE ALSO
+--------
+
+libtarmap.so::
+
+something
+
diff --git a/libtarmap.8.adoc b/libtarmap.8.adoc
deleted file mode 100644 (file)
index 31f92bb..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-libtarmap.so(8)
-===============
-:doctype: manpage
-:revdate: {sys:date "+%Y-%m-%d %H:%M:%S"}
-:COLON: :
-:EQUALS: =
-
-NAME
-----
-libtarmap.so - preload utility to map pathnames into a tar file
-
-SYNOPSYS
---------
-+LD_PRELOAD=libtarmap.so+ +TARMAP=+_tarfile_ _command_
-
-DESCRIPTION
------------
-
-This dynamic library, libtarmap.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.
-
-+libtarmap.so+ is "configured" by setting environment variable
-+PATHMAPNOT+ to be the path prefixes, given as a colon separated list,
-that +libtarmap.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.
-
-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=libtarmap.so prgrm
-----
-
-However, if +prgrm+ is a dynamically linked executable, then all
-libraries
-
-ENVIRONMENT
------------
-
-PATHMAPNOT::
-
-This environment variable tells which path prefixes, given as a colon
-separated list, +libtarmap.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.
-
-EXAMPLES
---------
-
-Assume there is a directory +/home/test/extra+
-
-> env PATHMAPNOT=/home/test:/proc:/dev:/lib:/usr:/bin \
-      LD_PRELOAD=libtarmap.so \
-      ls /extra
-      
-SEE ALSO
---------
diff --git a/libtarmap.so.8.adoc b/libtarmap.so.8.adoc
new file mode 100644 (file)
index 0000000..ca477bc
--- /dev/null
@@ -0,0 +1,71 @@
+libtarmap.so(8)
+===============
+:doctype: manpage
+:revdate: {sys:date "+%Y-%m-%d %H:%M:%S"}
+:COLON: :
+:EQUALS: =
+
+NAME
+----
+libtarmap.so - preload utility to map pathnames into a tar file
+
+SYNOPSYS
+--------
++LD_PRELOAD=libtarmap.so+ +TARMAP=+_tarfile_ _command_
+
+DESCRIPTION
+-----------
+
+This dynamic library, libtarmap.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.
+
++libtarmap.so+ is "configured" by setting environment variable
++PATHMAPNOT+ to be the path prefixes, given as a colon separated list,
+that +libtarmap.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.
+
+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=libtarmap.so prgrm
+----
+
+However, if +prgrm+ is a dynamically linked executable, then all
+libraries
+
+ENVIRONMENT
+-----------
+
+PATHMAPNOT::
+
+This environment variable tells which path prefixes, given as a colon
+separated list, +libtarmap.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.
+
+EXAMPLES
+--------
+
+Assume there is a directory +/home/test/extra+
+
+----
+env PATHMAPNOT=/home/test:/proc:/dev:/lib:/usr:/bin \
+    LD_PRELOAD=libtarmap.so \
+    ls /extra
+----
+
+SEE ALSO
+--------
+
+tarmap::
+
+aaa
+
+libpathmap.so::
+aaa
diff --git a/tarmap.8.adoc b/tarmap.8.adoc
new file mode 100644 (file)
index 0000000..86e7961
--- /dev/null
@@ -0,0 +1,69 @@
+tarmap(8)
+=========
+:doctype: manpage
+:revdate: {sys:date "+%Y-%m-%d %H:%M:%S"}
+:COLON: :
+:EQUALS: =
+
+NAME
+----
+tarmap - run command with libtarmap.so preloading
+
+SYNOPSYS
+--------
++tarmap+ _tarfile_ _command_
+
+DESCRIPTION
+-----------
+
+TBD
+
+This dynamic library, libtarmap.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.
+
++libtarmap.so+ is "configured" by setting environment variable
++PATHMAPNOT+ to be the path prefixes, given as a colon separated list,
+that +libtarmap.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.
+
+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=libtarmap.so prgrm
+----
+
+However, if +prgrm+ is a dynamically linked executable, then all
+libraries
+
+ENVIRONMENT
+-----------
+
+PATHMAPNOT::
+
+This environment variable tells which path prefixes, given as a colon
+separated list, +libtarmap.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.
+
+EXAMPLES
+--------
+
+Assume there is a directory +/home/test/extra+
+
+SEE ALSO
+--------
+
+libtarmap.so::
+
+a
+
+libpathmap.so::
+
+b
+