openpkg/lsync.8

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 13
cb59d6afeb61
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

     1 .\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.22)
     2 .\"
     3 .\" Standard preamble:
     4 .\" ========================================================================
     5 .de Sp \" Vertical space (when we can't use .PP)
     6 .if t .sp .5v
     7 .if n .sp
     8 ..
     9 .de Vb \" Begin verbatim text
    10 .ft CW
    11 .nf
    12 .ne \\$1
    13 ..
    14 .de Ve \" End verbatim text
    15 .ft R
    16 .fi
    17 ..
    18 .\" Set up some character translations and predefined strings.  \*(-- will
    19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
    20 .\" double quote, and \*(R" will give a right double quote.  \*(C+ will
    21 .\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
    22 .\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
    23 .\" nothing in troff, for use with C<>.
    24 .tr \(*W-
    25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
    26 .ie n \{\
    27 .    ds -- \(*W-
    28 .    ds PI pi
    29 .    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
    30 .    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
    31 .    ds L" ""
    32 .    ds R" ""
    33 .    ds C` 
    34 .    ds C' 
    35 'br\}
    36 .el\{\
    37 .    ds -- \|\(em\|
    38 .    ds PI \(*p
    39 .    ds L" ``
    40 .    ds R" ''
    41 'br\}
    42 .\"
    43 .\" Escape single quotes in literal strings from groff's Unicode transform.
    44 .ie \n(.g .ds Aq \(aq
    45 .el       .ds Aq '
    46 .\"
    47 .\" If the F register is turned on, we'll generate index entries on stderr for
    48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
    49 .\" entries marked with X<> in POD.  Of course, you'll have to process the
    50 .\" output yourself in some meaningful fashion.
    51 .ie \nF \{\
    52 .    de IX
    53 .    tm Index:\\$1\t\\n%\t"\\$2"
    54 ..
    55 .    nr % 0
    56 .    rr F
    57 .\}
    58 .el \{\
    59 .    de IX
    60 ..
    61 .\}
    62 .\"
    63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
    64 .\" Fear.  Run.  Save yourself.  No user-serviceable parts.
    65 .    \" fudge factors for nroff and troff
    66 .if n \{\
    67 .    ds #H 0
    68 .    ds #V .8m
    69 .    ds #F .3m
    70 .    ds #[ \f1
    71 .    ds #] \fP
    72 .\}
    73 .if t \{\
    74 .    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
    75 .    ds #V .6m
    76 .    ds #F 0
    77 .    ds #[ \&
    78 .    ds #] \&
    79 .\}
    80 .    \" simple accents for nroff and troff
    81 .if n \{\
    82 .    ds ' \&
    83 .    ds ` \&
    84 .    ds ^ \&
    85 .    ds , \&
    86 .    ds ~ ~
    87 .    ds /
    88 .\}
    89 .if t \{\
    90 .    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
    91 .    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
    92 .    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
    93 .    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
    94 .    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
    95 .    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
    96 .\}
    97 .    \" troff and (daisy-wheel) nroff accents
    98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
    99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
   100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
   101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
   102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
   103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
   104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
   105 .ds ae a\h'-(\w'a'u*4/10)'e
   106 .ds Ae A\h'-(\w'A'u*4/10)'E
   107 .    \" corrections for vroff
   108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
   109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
   110 .    \" for low resolution devices (crt and lpr)
   111 .if \n(.H>23 .if \n(.V>19 \
   112 \{\
   113 .    ds : e
   114 .    ds 8 ss
   115 .    ds o a
   116 .    ds d- d\h'-1'\(ga
   117 .    ds D- D\h'-1'\(hy
   118 .    ds th \o'bp'
   119 .    ds Th \o'LP'
   120 .    ds ae ae
   121 .    ds Ae AE
   122 .\}
   123 .rm #[ #] #H #V #F C
   124 .\" ========================================================================
   125 .\"
   126 .IX Title "LSYNC 8"
   127 .TH LSYNC 8 "OpenPKG" "LSYNC(8)" "OpenPKG"
   128 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
   129 .\" way too many mistakes in technical documents.
   130 .if n .ad l
   131 .nh
   132 .SH "NAME"
   133 openpkg lsync \- Access Layer Synchronization Tool
   134 .SH "SYNOPSIS"
   135 .IX Header "SYNOPSIS"
   136 \&\fBopenpkg lsync\fR
   137 [\fB\-\-version\fR|\fB\-v\fR]
   138 [\fB\-\-help\fR|\fB\-h\fR]
   139 [\fB\-\-init\fR|\fB\-i\fR]
   140 [\fB\-\-nop\fR|\fB\-n\fR]
   141 [\fB\-\-quiet\fR|\fB\-q\fR]
   142 [\fB\-\-trace\fR|\fB\-t\fR]
   143 [\fB\-\-local\fR|\fB\-l\fR]
   144 [\fB\-\-uninstall\fR|\fB\-u\fR]
   145 [\fB\-\-root=\fR\fIroot\fR]
   146 [\fB\-\-pkgdir=\fR\fIpkgdir\fR]
   147 [\fB\-\-subdirs=\fR\fIsubdir\fR[,\fIsubdir\fR,...]]
   148 .SH "DESCRIPTION"
   149 .IX Header "DESCRIPTION"
   150 This program activates software packages which were locally
   151 installed in a sub-directory of a package hierarchy (located under
   152 \&\fIroot\fR/\fIpkgdir\fR/) by managing symbolic links in an access layer
   153 (located under \fIroot\fR/) corresponding to package installation
   154 files (found in \fIroot\fR/\fIpkgdir\fR/pkgname/subdir/) which need to be
   155 collected in global directories (located under \fIroot\fR/subdir/).
   156 .PP
   157 The purpose of this is that individual packages can be installed and
   158 deinstalled seperately without interfering with other packages while
   159 all packages as a whole still can be treated like a single package
   160 (installed into the access layer).
   161 .PP
   162 The
   163 actual creation of symbolic links is as following (\*(L"foo\*(R" indicating an
   164 arbitrary file; \*(L"bar\*(R" indicating an arbitrary package name):
   165 .IP "\fIroot\fR\fB/bin/\fRfoo \-> \fB../\fR\fIpkgdir\fR\fB/\fRbar\fB/bin/\fRfoo" 4
   166 .IX Item "root/bin/foo -> ../pkgdir/bar/bin/foo"
   167 This activates the user executeable
   168 \&\fIroot\fR\fB/\fR\fIpkgdir\fR\fB/\fRbar\fB/bin\fR/foo as \fIroot\fR\fB/bin/\fRfoo. It can
   169 be found by the shell by placing \fIroot\fR\fB/bin\fR into the environment
   170 variable \f(CW\*(C`PATH\*(C'\fR (\fBPATH="..:\fR\fIroot\fR\fB/bin:.."\fR).
   171 .IP "\fIroot\fR\fB/sbin/\fRfoo \-> \fB../\fR\fIpkgdir\fR\fB/\fRbar\fB/sbin/\fRfoo" 4
   172 .IX Item "root/sbin/foo -> ../pkgdir/bar/sbin/foo"
   173 This activates the system executeable
   174 \&\fIroot\fR\fB/\fR\fIpkgdir\fR\fB/\fRbar\fB/sbin\fR/foo as \fIroot\fR\fB/sbin/\fRfoo. It can
   175 be found by the shell by placing \fIroot\fR\fB/sbin\fR into the environment
   176 variable \f(CW\*(C`PATH\*(C'\fR (\fBPATH="..:\fR\fIroot\fR\fB/sbin:.."\fR).
   177 .IP "\fIroot\fR\fB/man/man\fR\fIN\fR\fB/\fRfoo \-> \fB../\fR\fIpkgdir\fR\fB/\fRbar\fB/man/man\fR\fIN\fR\fB/\fRfoo" 4
   178 .IX Item "root/man/manN/foo -> ../pkgdir/bar/man/manN/foo"
   179 This activates the Unix manual page
   180 \&\fIroot\fR\fB/\fR\fIpkgdir\fR\fB/\fRbar\fB/man/man\fR\fIN\fR\fB/\fRfoo as
   181 \&\fIroot\fR\fB/man/man\fR\fIN\fR\fB/\fRfoo. It can be found by the \fIman\fR\|(1) tool
   182 by placing \fIroot\fR\fB/man\fR into the environment variable \f(CW\*(C`MANPATH\*(C'\fR
   183 (\fBMANPATH="..:\fR\fIroot\fR\fB/man:.."\fR). Keep in mind that \fBopenpkg lsync\fR
   184 activates any files found in the \fBman/man\f(BIN\fB\fR sub-directory of the
   185 package, but the \fIman\fR\|(1) tool usually requires the filename scheme
   186 foo\fB.\fR\fIN\fR before it can find the file.
   187 .IP "\fIroot\fR\fB/info/\fRfoo \-> \fB../\fR\fIpkgdir\fR\fB/\fRbar\fB/info/\fRfoo" 4
   188 .IX Item "root/info/foo -> ../pkgdir/bar/info/foo"
   189 This activates the \s-1GNU\s0 info page \fIroot\fR\fB/\fR\fIpkgdir\fR\fB/\fRbar\fB/info/\fRfoo
   190 as \fIroot\fR\fB/info/\fRfoo. It can be found by the \fIinfo\fR\|(1) and \fIpinfo\fR\|(1)
   191 tools by placing \fIroot\fR\fB/info\fR into the environment variable
   192 \&\f(CW\*(C`INFOPATH\*(C'\fR (\fBINFOPATH="..:\fR\fIroot\fR\fB/info:.."\fR). Keep in mind that
   193 \&\fBopenpkg lsync\fR activates any files found in the \fBinfo/\fR sub-directory of the
   194 package, but the \fIinfo\fR\|(1) and \fIpinfo\fR\|(1) tools usually require the filename
   195 scheme foo\fB.info\fR before it can find the file.
   196 .IP "\fIroot\fR\fB/include/\fRfoo \-> \fB../\fR\fIpkgdir\fR\fB/\fRbar\fB/include/\fRfoo" 4
   197 .IX Item "root/include/foo -> ../pkgdir/bar/include/foo"
   198 This activates the C header \fIroot\fR\fB/\fR\fIpkgdir\fR\fB/\fRbar\fB/include\fR/foo
   199 as \fIroot\fR\fB/include/\fRfoo. It can be found by the C/\*(C+ compilers
   200 by adding \fIroot\fR\fB/include\fR to their include search path (\fBcc ..
   201 \&\-I\fR\fIroot\fR\fB/include\fR \fB...\fR). Keep in mind that \fBopenpkg lsync\fR activates any
   202 files found in the \fBinclude/\fR sub-directory of the package, but the
   203 C/\*(C+ compiler usually by convention use the filename scheme foo\fB.h\fR.
   204 .IP "\fIroot\fR\fB/lib/\fRfoo \-> \fB../\fR\fIpkgdir\fR\fB/\fRbar\fB/lib/\fRfoo" 4
   205 .IX Item "root/lib/foo -> ../pkgdir/bar/lib/foo"
   206 This activates the C library \fIroot\fR\fB/\fR\fIpkgdir\fR\fB/\fRbar\fB/lib\fR/foo
   207 as \fIroot\fR\fB/lib/\fRfoo. It can be found by the C/\*(C+ compilers (and
   208 the linker they use) by adding \fIroot\fR\fB/lib\fR to their library search
   209 path (\fBcc .. \-L\fR\fIroot\fR\fB/lib\fR \fB...\fR). It can be found by the Unix
   210 Dynamic Loader by adding \fIroot\fR\fB/lib\fR to the environment variable
   211 \&\f(CW\*(C`LD_LIBRARY_PATH\*(C'\fR (\fBLD_LIBRARY_PATH="..:\fR\fIroot\fR\fB/lib:.."\fR).
   212 Keep in mind that \fBopenpkg lsync\fR activates any files found in the \fBlib/\fR
   213 sub-directory of the package, but the C/\*(C+ compiler usually require the
   214 filename scheme \fBlib\fRfoo\fB.a\fR and the Unix Dynamic Loader the filename
   215 scheme \fBlib\fRfoo\fB.so\fR before they actually can use the file.
   216 .PP
   217 It is obvious that more sub-directories in a package installation
   218 might exist \*(-- for instance \fBshare/\fR, \fBvar/\fR, \fBlibexec/\fR, etc. But
   219 \&\fBopenpkg lsync\fR intentionally does not link files in those directories into
   220 corresponding directories of the access layer, because those files do
   221 not require that they are located in a global area in order to be used.
   222 So \fBopenpkg lsync\fR only creates the access layer for files where a common area
   223 is required for (easy) use.
   224 .SH "SPECIAL FEATURES"
   225 .IX Header "SPECIAL FEATURES"
   226 There are two special features supported by \fBopenpkg lsync\fR:
   227 .IP "\fBRun-Command Files\fR" 4
   228 .IX Item "Run-Command Files"
   229 \&\fBopenpkg lsync\fR on startup implicitly reads command line options from
   230 \&\f(CW\*(C`.lsyncrc\*(C'\fR files. They are searched in all parent directories and in
   231 the callers home directory. Their contents is prepended to the list of
   232 given command line options.
   233 .IP "\fBMultiple Package Versions\fR" 4
   234 .IX Item "Multiple Package Versions"
   235 \&\fBopenpkg lsync\fR skips all directories under \fIroot\fR/\fIpkgdir\fR/ which contain
   236 the pattern \*(L"\-[0\-9]\*(R" in their directory name. On the other hand,
   237 \&\fBopenpkg lsync\fR follows also symbolic links under \fIroot\fR/\fIpkgdir\fR/.
   238 This can be used for installing multiple versions of a package and
   239 switching between them. For instance, if version 1.0 of package
   240 \&\*(L"foo\*(R" is installed into directory \fIroot\fR/\fIpkgdir\fR/foo\-1.0,
   241 version 1.1 into \fIroot\fR/\fIpkgdir\fR/foo\-1.1 and version 1.2 into
   242 \&\fIroot\fR/\fIpkgdir\fR/foo\-1.2, \fBopenpkg lsync\fR does skip all three. To enable
   243 version 1.1 one just creates a symbolic link \fIroot\fR/\fIpkgdir\fR/foo
   244 pointing to foo\-1.1. Then \fBopenpkg lsync\fR picks up the files in
   245 \&\fIroot\fR/\fIpkgdir\fR/foo\-1.1. If you want to temporarily upgrade to
   246 foo\-1.2, all you have to do is to change the symlink pointing from
   247 foo\-1.1 to foo\-1.2.
   248 .IP "\fBTemporarily Deactivated Package\fR" 4
   249 .IX Item "Temporarily Deactivated Package"
   250 One can deactivate a package \*(L"foo\*(R" by going to \fIroot\fR/\fIpkgdir\fR/foo/
   251 and running \*(L"openpkg lsync \-\-local \-\-uninstall\*(R", of course. Alternatively
   252 one can set the sticky bit on the directory \fIroot\fR/\fIpkgdir\fR/foo.
   253 Then \fBopenpkg lsync\fR also skips the package. Alternatively, assume
   254 package \*(L"foo\*(R" as a whole should not be deactivated, but its
   255 \&\fIroot\fR/\fIpkgdir\fR/foo/lib directory (usually because this directory
   256 unfortunately contains non-library files), one just sets the sticky bit
   257 on \fIroot\fR/\fIpkgdir\fR/foo/lib.
   258 .SH "OPTIONS"
   259 .IX Header "OPTIONS"
   260 .IP "\fB\-\-version\fR, \fB\-v\fR" 4
   261 .IX Item "--version, -v"
   262 Display program version information only.
   263 .IP "\fB\-\-help\fR, \fB\-h\fR" 4
   264 .IX Item "--help, -h"
   265 Display program usage information only.
   266 .IP "\fB\-\-init\fR, \fB\-i\fR" 4
   267 .IX Item "--init, -i"
   268 Create an initial access layer hierarchy under \fIroot\fR.
   269 .IP "\fB\-\-nop\fR, \fB\-n\fR" 4
   270 .IX Item "--nop, -n"
   271 No Operation \*(-- causes \fBopenpkg lsync\fR to not perform any filesystem
   272 operations. In conjunction with \fB\-\-trace\fR you can at least see what
   273 would be executed.
   274 .IP "\fB\-\-quiet\fR, \fB\-q\fR" 4
   275 .IX Item "--quiet, -q"
   276 Forces \fBopenpkg lsync\fR to perform the operations quietly, i.e., without any
   277 verbose messages.
   278 .IP "\fB\-\-trace\fR, \fB\-t\fR" 4
   279 .IX Item "--trace, -t"
   280 Forces \fBopenpkg lsync\fR to show what filesystem operations are performed.
   281 .IP "\fB\-\-local\fR, \fB\-l\fR" 4
   282 .IX Item "--local, -l"
   283 This restricts the operations to a local package area. This option can
   284 only be used if you are physically staying below a package sub-directory
   285 under \fIroot\fR/\fIpkgdir\fR/. For instance, when you are staying in
   286 \&\fIroot\fR/\fIpkgdir\fR/bar or \fIroot\fR/\fIpkgdir\fR/bar/bin and use \fB\-\-local\fR,
   287 all operations are restricted to the package \*(L"bar\*(R".
   288 .IP "\fB\-\-uninstall\fR, \fB\-u\fR" 4
   289 .IX Item "--uninstall, -u"
   290 This performs only package uninstallation operations, i.e., only
   291 symbolic links are removed. This can be used to completely empty the
   292 access layer. Additionally it is very useful in combination with
   293 \&\fB\-\-local\fR in order to uninstall a particular package without having to
   294 remove its files.
   295 .IP "\fB\-\-root=\fR\fIroot\fR" 4
   296 .IX Item "--root=root"
   297 Sets the root directory where the access layer and package subdirectory
   298 is located. The default can be determined by running \f(CW\*(C`openpkg lsync \-\-help\*(C'\fR
   299 (see section \*(L"Current configuration\*(R").
   300 .IP "\fB\-\-pkgdir=\fR\fIpkgdir\fR" 4
   301 .IX Item "--pkgdir=pkgdir"
   302 Sets the sub-directory under the root directory where packages are
   303 located. The default can be determined by running \f(CW\*(C`openpkg lsync \-\-help\*(C'\fR (see
   304 section \*(L"Current configuration\*(R").
   305 .IP "\fB\-\-subdirs=\fR\fIsubdirs\fR[,\fIsubdir\fR,...]" 4
   306 .IX Item "--subdirs=subdirs[,subdir,...]"
   307 Sets one or more sub-directories of the access layer on which \fBopenpkg lsync\fR
   308 should act. The default can be determined by running \f(CW\*(C`openpkg lsync \-\-help\*(C'\fR
   309 (see section \*(L"Current configuration\*(R").
   310 .SH "RESULTS"
   311 .IX Header "RESULTS"
   312 This program uses the following return codes on exit: 0 (operation
   313 successful), 1 (system error), 2 (command line error) and 3 (other user
   314 error).
   315 .SH "HISTORY"
   316 .IX Header "HISTORY"
   317 The idea of filesystem access layers consisting of symbolic links
   318 pointing to actual package installation areas is a rather old one. It
   319 dates back to the early days of Unix and was implemented many times over
   320 the last decades. One of many implementation was \fBGenOPT\fR, written by
   321 Ralf S. Engelschall for sd&m GmbH & Co \s-1KG\s0, Munich in 1992. The name
   322 indicates the programs purpose: to generate symbolic links in an access
   323 layer which was located under \f(CW\*(C`/opt\*(C'\fR. \fBGenOPT\fR was very flexible, but
   324 hence also very complex. Because of lack of documentation it was never
   325 released and so only used at sd&m and on all machines which were under
   326 control of Ralf S. Engelschall.
   327 .PP
   328 For Cable & Wireless, Munich, the old \fBGenOPT\fR principle was again
   329 needed to manage the \f(CW\*(C`/cw/local\*(C'\fR area on their servers. For this in
   330 November 2000 the functionality of \fBGenOPT\fR was revised, heavily
   331 stripped down and finally implemented from scratch. The result is the
   332 current \fBopenpkg lsync\fR.
   333 .SH "AUTHOR"
   334 .IX Header "AUTHOR"
   335 .Vb 3
   336 \& Ralf S. Engelschall
   337 \& rse@engelschall.com
   338 \& www.engelschall.com
   339 .Ve

mercurial