michael@13: ##
michael@13: ## lsync.pod -- Access Layer Synchronization Tool (Manual Page)
michael@428: ## Copyright (c) 2000-2012 OpenPKG GmbH
michael@13: ##
michael@428: ## This software is property of the OpenPKG GmbH, DE MUC HRB 160208.
michael@428: ## All rights reserved. Licenses which grant limited permission to use,
michael@428: ## copy, modify and distribute this software are available from the
michael@428: ## OpenPKG GmbH.
michael@13: ##
michael@428: ## THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED
michael@13: ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
michael@13: ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
michael@13: ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
michael@13: ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
michael@13: ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
michael@13: ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
michael@13: ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
michael@13: ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
michael@13: ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
michael@13: ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
michael@13: ## SUCH DAMAGE.
michael@13: ##
michael@13:
michael@13: =pod
michael@13:
michael@13: =head1 NAME
michael@13:
michael@13: B - Access Layer Synchronization Tool
michael@13:
michael@13: =head1 SYNOPSIS
michael@13:
michael@13: B
michael@13: [B<--version>|B<-v>]
michael@13: [B<--help>|B<-h>]
michael@13: [B<--init>|B<-i>]
michael@13: [B<--nop>|B<-n>]
michael@13: [B<--quiet>|B<-q>]
michael@13: [B<--trace>|B<-t>]
michael@13: [B<--local>|B<-l>]
michael@13: [B<--uninstall>|B<-u>]
michael@13: [B<--root=>I]
michael@13: [B<--pkgdir=>I]
michael@13: [B<--subdirs=>I[,I,...]]
michael@13:
michael@13: =head1 DESCRIPTION
michael@13:
michael@13: This program activates software packages which were locally
michael@13: installed in a sub-directory of a package hierarchy (located under
michael@13: I/I/) by managing symbolic links in an access layer
michael@13: (located under I/) corresponding to package installation
michael@13: files (found in I/I/pkgname/subdir/) which need to be
michael@13: collected in global directories (located under I/subdir/).
michael@13:
michael@13: The purpose of this is that individual packages can be installed and
michael@13: deinstalled seperately without interfering with other packages while
michael@13: all packages as a whole still can be treated like a single package
michael@13: (installed into the access layer).
michael@13:
michael@13: The
michael@13: actual creation of symbolic links is as following ("foo" indicating an
michael@13: arbitrary file; "bar" indicating an arbitrary package name):
michael@13:
michael@13: =over 4
michael@13:
michael@13: =item IBfoo -> B<../>IB>barBfoo
michael@13:
michael@13: This activates the user executeable
michael@13: IB>IB>barB/foo as IBfoo. It can
michael@13: be found by the shell by placing IB into the environment
michael@13: variable C (BIB).
michael@13:
michael@13: =item IBfoo -> B<../>IB>barBfoo
michael@13:
michael@13: This activates the system executeable
michael@13: IB>IB>barB/foo as IBfoo. It can
michael@13: be found by the shell by placing IB into the environment
michael@13: variable C (BIB).
michael@13:
michael@13: =item IBIB>foo -> B<../>IB>barBIB>foo
michael@13:
michael@13: This activates the Unix manual page
michael@13: IB>IB>barBIB>foo as
michael@13: IBIB>foo. It can be found by the man(1) tool
michael@13: by placing IB into the environment variable C
michael@13: (BIB). Keep in mind that B
michael@13: activates any files found in the B> sub-directory of the
michael@13: package, but the man(1) tool usually requires the filename scheme
michael@13: fooB<.>I before it can find the file.
michael@13:
michael@13: =item IBfoo -> B<../>IB>barBfoo
michael@13:
michael@13: This activates the GNU info page IB>IB>barBfoo
michael@13: as IBfoo. It can be found by the info(1) and pinfo(1)
michael@13: tools by placing IB into the environment variable
michael@13: C (BIB). Keep in mind that
michael@13: B activates any files found in the B sub-directory of the
michael@13: package, but the info(1) and pinfo(1) tools usually require the filename
michael@13: scheme fooB<.info> before it can find the file.
michael@13:
michael@13: =item IBfoo -> B<../>IB>barBfoo
michael@13:
michael@13: This activates the C header IB>IB>barB/foo
michael@13: as IBfoo. It can be found by the C/C++ compilers
michael@13: by adding IB to their include search path (BIB B<...>). Keep in mind that B activates any
michael@13: files found in the B sub-directory of the package, but the
michael@13: C/C++ compiler usually by convention use the filename scheme fooB<.h>.
michael@13:
michael@13: =item IBfoo -> B<../>IB>barBfoo
michael@13:
michael@13: This activates the C library IB>IB>barB/foo
michael@13: as IBfoo. It can be found by the C/C++ compilers (and
michael@13: the linker they use) by adding IB to their library search
michael@13: path (BIB B<...>). It can be found by the Unix
michael@13: Dynamic Loader by adding IB to the environment variable
michael@13: C (BIB).
michael@13: Keep in mind that B activates any files found in the B
michael@13: sub-directory of the package, but the C/C++ compiler usually require the
michael@13: filename scheme BfooB<.a> and the Unix Dynamic Loader the filename
michael@13: scheme BfooB<.so> before they actually can use the file.
michael@13:
michael@13: =back
michael@13:
michael@13: It is obvious that more sub-directories in a package installation
michael@13: might exist -- for instance B, B, B, etc. But
michael@13: B intentionally does not link files in those directories into
michael@13: corresponding directories of the access layer, because those files do
michael@13: not require that they are located in a global area in order to be used.
michael@13: So B only creates the access layer for files where a common area
michael@13: is required for (easy) use.
michael@13:
michael@13: =head1 SPECIAL FEATURES
michael@13:
michael@13: There are two special features supported by B:
michael@13:
michael@13: =over 4
michael@13:
michael@13: =item B
michael@13:
michael@13: B on startup implicitly reads command line options from
michael@13: C<.lsyncrc> files. They are searched in all parent directories and in
michael@13: the callers home directory. Their contents is prepended to the list of
michael@13: given command line options.
michael@13:
michael@13: =item B
michael@13:
michael@13: B skips all directories under I/I/ which contain
michael@13: the pattern "-[0-9]" in their directory name. On the other hand,
michael@13: B follows also symbolic links under I/I/.
michael@13: This can be used for installing multiple versions of a package and
michael@13: switching between them. For instance, if version 1.0 of package
michael@13: "foo" is installed into directory I/I/foo-1.0,
michael@13: version 1.1 into I/I/foo-1.1 and version 1.2 into
michael@13: I/I/foo-1.2, B does skip all three. To enable
michael@13: version 1.1 one just creates a symbolic link I/I/foo
michael@13: pointing to foo-1.1. Then B picks up the files in
michael@13: I/I/foo-1.1. If you want to temporarily upgrade to
michael@13: foo-1.2, all you have to do is to change the symlink pointing from
michael@13: foo-1.1 to foo-1.2.
michael@13:
michael@13: =item B
michael@13:
michael@13: One can deactivate a package "foo" by going to I/I/foo/
michael@13: and running "openpkg lsync --local --uninstall", of course. Alternatively
michael@13: one can set the sticky bit on the directory I/I/foo.
michael@13: Then B also skips the package. Alternatively, assume
michael@13: package "foo" as a whole should not be deactivated, but its
michael@13: I/I/foo/lib directory (usually because this directory
michael@13: unfortunately contains non-library files), one just sets the sticky bit
michael@13: on I/I/foo/lib.
michael@13:
michael@13: =back
michael@13:
michael@13: =head1 OPTIONS
michael@13:
michael@13: =over 4
michael@13:
michael@13: =item B<--version>, B<-v>
michael@13:
michael@13: Display program version information only.
michael@13:
michael@13: =item B<--help>, B<-h>
michael@13:
michael@13: Display program usage information only.
michael@13:
michael@13: =item B<--init>, B<-i>
michael@13:
michael@13: Create an initial access layer hierarchy under I.
michael@13:
michael@13: =item B<--nop>, B<-n>
michael@13:
michael@13: No Operation -- causes B to not perform any filesystem
michael@13: operations. In conjunction with B<--trace> you can at least see what
michael@13: would be executed.
michael@13:
michael@13: =item B<--quiet>, B<-q>
michael@13:
michael@13: Forces B to perform the operations quietly, i.e., without any
michael@13: verbose messages.
michael@13:
michael@13: =item B<--trace>, B<-t>
michael@13:
michael@13: Forces B to show what filesystem operations are performed.
michael@13:
michael@13: =item B<--local>, B<-l>
michael@13:
michael@13: This restricts the operations to a local package area. This option can
michael@13: only be used if you are physically staying below a package sub-directory
michael@13: under I/I/. For instance, when you are staying in
michael@13: I/I/bar or I/I/bar/bin and use B<--local>,
michael@13: all operations are restricted to the package "bar".
michael@13:
michael@13: =item B<--uninstall>, B<-u>
michael@13:
michael@13: This performs only package uninstallation operations, i.e., only
michael@13: symbolic links are removed. This can be used to completely empty the
michael@13: access layer. Additionally it is very useful in combination with
michael@13: B<--local> in order to uninstall a particular package without having to
michael@13: remove its files.
michael@13:
michael@13: =item B<--root=>I
michael@13:
michael@13: Sets the root directory where the access layer and package subdirectory
michael@13: is located. The default can be determined by running C
michael@13: (see section "Current configuration").
michael@13:
michael@13: =item B<--pkgdir=>I
michael@13:
michael@13: Sets the sub-directory under the root directory where packages are
michael@13: located. The default can be determined by running C (see
michael@13: section "Current configuration").
michael@13:
michael@13: =item B<--subdirs=>I[,I,...]
michael@13:
michael@13: Sets one or more sub-directories of the access layer on which B
michael@13: should act. The default can be determined by running C
michael@13: (see section "Current configuration").
michael@13:
michael@13: =back
michael@13:
michael@13: =head1 RESULTS
michael@13:
michael@13: This program uses the following return codes on exit: 0 (operation
michael@13: successful), 1 (system error), 2 (command line error) and 3 (other user
michael@13: error).
michael@13:
michael@13: =head1 HISTORY
michael@13:
michael@13: The idea of filesystem access layers consisting of symbolic links
michael@13: pointing to actual package installation areas is a rather old one. It
michael@13: dates back to the early days of Unix and was implemented many times over
michael@13: the last decades. One of many implementation was B, written by
michael@13: Ralf S. Engelschall for sd&m GmbH & Co KG, Munich in 1992. The name
michael@13: indicates the programs purpose: to generate symbolic links in an access
michael@13: layer which was located under C. B was very flexible, but
michael@13: hence also very complex. Because of lack of documentation it was never
michael@13: released and so only used at sd&m and on all machines which were under
michael@13: control of Ralf S. Engelschall.
michael@13:
michael@13: For Cable & Wireless, Munich, the old B principle was again
michael@13: needed to manage the C area on their servers. For this in
michael@13: November 2000 the functionality of B was revised, heavily
michael@13: stripped down and finally implemented from scratch. The result is the
michael@13: current B.
michael@13:
michael@13: =head1 AUTHOR
michael@13:
michael@13: Ralf S. Engelschall
michael@13: rse@engelschall.com
michael@13: www.engelschall.com
michael@13:
michael@13: =cut
michael@13: