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
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
pathmap (0.1) experimental; urgency=medium
-
- * creation
+ * creation
-- Ralph Ronnquist <ralph.ronnquist@gmail.com> Mon, 29 Mar 2021 12:51:07 +1100
%:
dh $@
-#
-#override_dh_usrlocal:
-# true
+
+override_dh_usrlocal:
+ true
+++ /dev/null
-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
---------
--- /dev/null
+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
+
+++ /dev/null
-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
---------
--- /dev/null
+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
--- /dev/null
+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
+