openpkg/makeproxy.8

Thu, 04 Oct 2012 20:30:05 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 04 Oct 2012 20:30:05 +0200
changeset 715
c10fb90893b9
permissions
-rw-r--r--

Correct out of date build configuration, porting to Solaris 11 network
link infrastructure and new libpcap logic. This additionally allows for
device drivers in subdirectories of /dev. Correct packaged nmap
personalities and signatures to work out of the box. Finally, hack
arpd logic to properly close sockets and quit on TERM by repeating
signaling in the run command script. Sadly, all this fails to correct
the run time behaviour of honeyd which fails to bind to the IP layer.

michael@428 1 .\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.22)
michael@428 2 .\"
michael@428 3 .\" Standard preamble:
michael@428 4 .\" ========================================================================
michael@428 5 .de Sp \" Vertical space (when we can't use .PP)
michael@428 6 .if t .sp .5v
michael@428 7 .if n .sp
michael@428 8 ..
michael@428 9 .de Vb \" Begin verbatim text
michael@428 10 .ft CW
michael@428 11 .nf
michael@428 12 .ne \\$1
michael@428 13 ..
michael@428 14 .de Ve \" End verbatim text
michael@428 15 .ft R
michael@428 16 .fi
michael@428 17 ..
michael@428 18 .\" Set up some character translations and predefined strings. \*(-- will
michael@428 19 .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
michael@428 20 .\" double quote, and \*(R" will give a right double quote. \*(C+ will
michael@428 21 .\" give a nicer C++. Capital omega is used to do unbreakable dashes and
michael@428 22 .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff,
michael@428 23 .\" nothing in troff, for use with C<>.
michael@428 24 .tr \(*W-
michael@428 25 .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
michael@428 26 .ie n \{\
michael@428 27 . ds -- \(*W-
michael@428 28 . ds PI pi
michael@428 29 . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
michael@428 30 . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
michael@428 31 . ds L" ""
michael@428 32 . ds R" ""
michael@428 33 . ds C`
michael@428 34 . ds C'
michael@428 35 'br\}
michael@428 36 .el\{\
michael@428 37 . ds -- \|\(em\|
michael@428 38 . ds PI \(*p
michael@428 39 . ds L" ``
michael@428 40 . ds R" ''
michael@428 41 'br\}
michael@428 42 .\"
michael@428 43 .\" Escape single quotes in literal strings from groff's Unicode transform.
michael@428 44 .ie \n(.g .ds Aq \(aq
michael@428 45 .el .ds Aq '
michael@428 46 .\"
michael@428 47 .\" If the F register is turned on, we'll generate index entries on stderr for
michael@428 48 .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
michael@428 49 .\" entries marked with X<> in POD. Of course, you'll have to process the
michael@428 50 .\" output yourself in some meaningful fashion.
michael@428 51 .ie \nF \{\
michael@428 52 . de IX
michael@428 53 . tm Index:\\$1\t\\n%\t"\\$2"
michael@428 54 ..
michael@428 55 . nr % 0
michael@428 56 . rr F
michael@428 57 .\}
michael@428 58 .el \{\
michael@428 59 . de IX
michael@428 60 ..
michael@428 61 .\}
michael@428 62 .\"
michael@428 63 .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
michael@428 64 .\" Fear. Run. Save yourself. No user-serviceable parts.
michael@428 65 . \" fudge factors for nroff and troff
michael@428 66 .if n \{\
michael@428 67 . ds #H 0
michael@428 68 . ds #V .8m
michael@428 69 . ds #F .3m
michael@428 70 . ds #[ \f1
michael@428 71 . ds #] \fP
michael@428 72 .\}
michael@428 73 .if t \{\
michael@428 74 . ds #H ((1u-(\\\\n(.fu%2u))*.13m)
michael@428 75 . ds #V .6m
michael@428 76 . ds #F 0
michael@428 77 . ds #[ \&
michael@428 78 . ds #] \&
michael@428 79 .\}
michael@428 80 . \" simple accents for nroff and troff
michael@428 81 .if n \{\
michael@428 82 . ds ' \&
michael@428 83 . ds ` \&
michael@428 84 . ds ^ \&
michael@428 85 . ds , \&
michael@428 86 . ds ~ ~
michael@428 87 . ds /
michael@428 88 .\}
michael@428 89 .if t \{\
michael@428 90 . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
michael@428 91 . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
michael@428 92 . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
michael@428 93 . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
michael@428 94 . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
michael@428 95 . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
michael@428 96 .\}
michael@428 97 . \" troff and (daisy-wheel) nroff accents
michael@428 98 .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
michael@428 99 .ds 8 \h'\*(#H'\(*b\h'-\*(#H'
michael@428 100 .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
michael@428 101 .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
michael@428 102 .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
michael@428 103 .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
michael@428 104 .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
michael@428 105 .ds ae a\h'-(\w'a'u*4/10)'e
michael@428 106 .ds Ae A\h'-(\w'A'u*4/10)'E
michael@428 107 . \" corrections for vroff
michael@428 108 .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
michael@428 109 .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
michael@428 110 . \" for low resolution devices (crt and lpr)
michael@428 111 .if \n(.H>23 .if \n(.V>19 \
michael@428 112 \{\
michael@428 113 . ds : e
michael@428 114 . ds 8 ss
michael@428 115 . ds o a
michael@428 116 . ds d- d\h'-1'\(ga
michael@428 117 . ds D- D\h'-1'\(hy
michael@428 118 . ds th \o'bp'
michael@428 119 . ds Th \o'LP'
michael@428 120 . ds ae ae
michael@428 121 . ds Ae AE
michael@428 122 .\}
michael@428 123 .rm #[ #] #H #V #F C
michael@428 124 .\" ========================================================================
michael@428 125 .\"
michael@428 126 .IX Title "MAKEPROXY 8"
michael@428 127 .TH MAKEPROXY 8 "OpenPKG" "MAKEPROXY(8)" "OpenPKG"
michael@428 128 .\" For nroff, turn off justification. Always turn off hyphenation; it makes
michael@428 129 .\" way too many mistakes in technical documents.
michael@428 130 .if n .ad l
michael@428 131 .nh
michael@428 132 .SH "NAME"
michael@428 133 openpkg makeproxy \-\- Make Proxy OpenPKG RPM Package
michael@428 134 .SH "SYNOPSIS"
michael@428 135 .IX Header "SYNOPSIS"
michael@428 136 \&\fBopenpkg makeproxy\fR
michael@428 137 [\fB\-h\fR|\fB\-\-help\fR]
michael@428 138 [\fB\-V\fR|\fB\-\-version\fR]
michael@428 139 [\fB\-d\fR|\fB\-\-debug\fR]
michael@428 140 [\fB\-v\fR|\fB\-\-verbose\fR]
michael@428 141 [\fB\-m\fR|\fB\-\-master\fR \fImaster-prefix\fR]
michael@428 142 [\fB\-s\fR|\fB\-\-slave\fR \fIslave-prefix\fR]
michael@428 143 [\fB\-t\fR|\fB\-\-tmpdir\fR \fIdirectory\fR]
michael@428 144 [\fB\-o\fR|\fB\-\-output\fR \fIdirectory\fR|\fIslave-package-file\fR|\f(CW\*(C`\-\*(C'\fR]
michael@428 145 [\fImaster-package-name\fR|\fImaster-package-file\fR|\f(CW\*(C`\-\*(C'\fR]
michael@428 146 .SH "DESCRIPTION"
michael@428 147 .IX Header "DESCRIPTION"
michael@428 148 \&\fBopenpkg makeproxy\fR creates a \fIproxy\fR binary \fBOpenPKG\fR \s-1RPM\s0 package
michael@428 149 for a \fIslave\fR \fBOpenPKG\fR instance by emulating a regular binary
michael@428 150 \&\fBOpenPKG\fR \s-1RPM\s0 package from a \fImaster\fR \fBOpenPKG\fR instance.
michael@428 151 .PP
michael@428 152 A proxy package contains (virtually) the same contents as the regular
michael@428 153 package, but in the form of a shadow tree. Such a shadow tree consists
michael@428 154 of the same physical directory structure but with all files replaced by
michael@428 155 symbolic links pointing to the regular files in the master \fBOpenPKG\fR
michael@428 156 instance.
michael@428 157 .PP
michael@428 158 A proxy package is useful if multiple closely related \fBOpenPKG\fR
michael@428 159 instances are installed on the same system. In this case lots of
michael@428 160 dependent (and this way required, although not explicitly wanted)
michael@428 161 packages have to be installed in \fIevery\fR \fBOpenPKG\fR instance. Think
michael@428 162 about packages like \fBopenssl\fR, \fBperl\fR, \fBgcc\fR, etc. This can be both
michael@428 163 very time-consuming and become a maintenance nightmare on upgrades.
michael@428 164 Instead, you can select a master \fBOpenPKG\fR instance, install those
michael@428 165 regular packages physically there only and install simple proxy packages
michael@428 166 for them in all other slave \fBOpenPKG\fR instances.
michael@428 167 .PP
michael@428 168 Keep in mind that this obviously works correctly for packages which
michael@428 169 do \fInot\fR have hard-coded dependencies to their \fBOpenPKG\fR instance
michael@428 170 (configuration files, etc). For other packages it might also work,
michael@428 171 but be at least be warned about side-effects! Additionally, make sure
michael@428 172 you always keep proxy packages in sync with the regular package by
michael@428 173 recreating the proxy packages after the regular packages have changed.
michael@428 174 .SH "SHADOW TREE"
michael@428 175 .IX Header "SHADOW TREE"
michael@428 176 The shadow tree of a proxy package \fBname\fR contain the following three
michael@428 177 types of paths:
michael@428 178 .IP "\fIslave-prefix\fR[/\fIdir\fR]" 4
michael@428 179 .IX Item "slave-prefix[/dir]"
michael@428 180 This is a physical directory for the slave \fBOpenPKG\fR instance, exactly
michael@428 181 as it exists in the regular package of the master \fBOpenPKG\fR instance.
michael@428 182 .ie n .IP "\fIslave-prefix\fR[/\fIdir\fR]/\fIfile\fR \-> \fIrevdir\fR\*(C`/.prefix\-\*(C'\fBfoo\fR[/\fIdir\fR]/\fIfile\fR" 4
michael@428 183 .el .IP "\fIslave-prefix\fR[/\fIdir\fR]/\fIfile\fR \-> \fIrevdir\fR\f(CW\*(C`/.prefix\-\*(C'\fR\fBfoo\fR[/\fIdir\fR]/\fIfile\fR" 4
michael@428 184 .IX Item "slave-prefix[/dir]/file -> revdir/.prefix-foo[/dir]/file"
michael@428 185 This is a virtual file (symbolic link) for the slave \fBOpenPKG\fR
michael@428 186 instance, indirectly pointing to the corresponding file of the regular
michael@428 187 package in the master \fBOpenPKG\fR instance. The \fIrevdir\fR is a reverse
michael@428 188 path corresponding to \fIdir\fR, i.e., for each sub-directory step in
michael@428 189 \&\fIdir\fR it contains a "\f(CW\*(C`../\*(C'\fR" parent directory step.
michael@428 190 .ie n .IP "\fIslave-prefix\fR\*(C`/.prefix\-\*(C'\fBfoo\fR \-> \fImaster-prefix\fR" 4
michael@428 191 .el .IP "\fIslave-prefix\fR\f(CW\*(C`/.prefix\-\*(C'\fR\fBfoo\fR \-> \fImaster-prefix\fR" 4
michael@428 192 .IX Item "slave-prefix/.prefix-foo -> master-prefix"
michael@428 193 This is a virtual file (symbolic link) for the slave \fBOpenPKG\fR
michael@428 194 instance, directly pointing to the prefix of the master \fBOpenPKG\fR
michael@428 195 instance. This allows one to redirect a whole package to
michael@428 196 a different \fBOpenPKG\fR instance by manually changing the
michael@428 197 \&\fIslave-prefix\fR\f(CW\*(C`/.prefix\-\*(C'\fR\fBfoo\fR symbolic link. The idea is that this
michael@428 198 link even could be automatically controlled by a higher-level facility.
michael@428 199 .SH "OPTIONS"
michael@428 200 .IX Header "OPTIONS"
michael@428 201 The following command line options and arguments are supported:
michael@428 202 .IP "\fB\-h\fR, \fB\-\-help\fR" 4
michael@428 203 .IX Item "-h, --help"
michael@428 204 Print the usage message and immediately exit.
michael@428 205 .IP "\fB\-V\fR, \fB\-\-version\fR" 4
michael@428 206 .IX Item "-V, --version"
michael@428 207 Print program version.
michael@428 208 .IP "\fB\-v\fR, \fB\-\-verbose\fR" 4
michael@428 209 .IX Item "-v, --verbose"
michael@428 210 Enable printing of verbose messages on \fIstderr\fR summarizing the internal processing.
michael@428 211 .IP "\fB\-d\fR, \fB\-\-debug\fR" 4
michael@428 212 .IX Item "-d, --debug"
michael@428 213 Enable printing of debug messages on \fIstderr\fR showing the executed shell commands.
michael@428 214 .IP "\fB\-m\fR, \fB\-\-master\fR \fImaster-prefix\fR" 4
michael@428 215 .IX Item "-m, --master master-prefix"
michael@428 216 Set the filesystem path prefix of the \fImaster\fR \fBOpenPKG\fR instance.
michael@428 217 If not specified, the prefix is determined from the master package.
michael@428 218 .IP "\fB\-s\fR, \fB\-\-slave\fR \fIslave-prefix\fR" 4
michael@428 219 .IX Item "-s, --slave slave-prefix"
michael@428 220 Set the filesystem path prefix of the \fIslave\fR \fBOpenPKG\fR instance.
michael@428 221 If not specified, the prefix defaults to the prefix of
michael@428 222 the \fBOpenPKG\fR instance the \f(CW\*(C`openpkg makeproxy\*(C'\fR command is run from.
michael@428 223 .IP "\fB\-t\fR, \fB\-\-tmpdir\fR \fIdirectory\fR" 4
michael@428 224 .IX Item "-t, --tmpdir directory"
michael@428 225 Set a particular temporary directory. The default is \f(CW$TMPDIR\fR or
michael@428 226 \&\f(CW\*(C`/tmp\*(C'\fR (in that order).
michael@428 227 .ie n .IP "\fB\-o\fR, \fB\-\-output\fR \fIdirectory\fR|\fIslave-package-file\fR|\*(C`\-\*(C'" 4
michael@428 228 .el .IP "\fB\-o\fR, \fB\-\-output\fR \fIdirectory\fR|\fIslave-package-file\fR|\f(CW\*(C`\-\*(C'\fR" 4
michael@428 229 .IX Item "-o, --output directory|slave-package-file|-"
michael@428 230 Set the location where to write the output proxy \s-1RPM\s0 package for the
michael@428 231 slave \fBOpenPKG\fR instance. The argument "\f(CW\*(C`\-\*(C'\fR" indicates that the output
michael@428 232 proxy \s-1RPM\s0 package is written to \fIstdout\fR. The default is "\f(CW\*(C`.\*(C'\fR" (the
michael@428 233 current working directory). If the output location is a directory and
michael@428 234 the regular \s-1RPM\s0 package of the master \fBOpenPKG\fR instance is named
michael@428 235 "\fIname\fR\f(CW\*(C`\-\*(C'\fR\fIversion\fR\f(CW\*(C`\-\*(C'\fR\fIrelease\fR\f(CW\*(C`.\*(C'\fR\fIarch\fR\f(CW\*(C`\-\*(C'\fR\fIos\fR\f(CW\*(C`\-\*(C'\fR\fItag1\fR\f(CW\*(C`.rp
michael@428 236 m\*(C'\fR\*(L", then the output proxy \s-1RPM\s0 package is named
michael@428 237 \&\*(R"\fIname\fR\f(CW\*(C`\-\*(C'\fR\fIversion\fR\f(CW\*(C`\-\*(C'\fR\fIrelease\fR\f(CW\*(C`+PROXY\*(C'\fR\f(CW\*(C`.\*(C'\fR\fIarch\fR\f(CW\*(C`\-\*(C'\fR\fIos\fR\f(CW\*(C`\-\*(C'\fR\fIt
michael@428 238 ag2\fR\f(CW\*(C`.rpm\*(C'\fR" in the output directory (\fItag1\fR and \fItag2\fR are the tags
michael@428 239 of the master and slave \fBOpenPKG\fR instances).
michael@428 240 .ie n .IP "\fImaster-package-file\fR|\*(C`\-\*(C'" 4
michael@428 241 .el .IP "\fImaster-package-file\fR|\f(CW\*(C`\-\*(C'\fR" 4
michael@428 242 .IX Item "master-package-file|-"
michael@428 243 Set the location where to read the input regular \s-1RPM\s0 package. The
michael@428 244 special argument "\f(CW\*(C`\-\*(C'\fR" indicates that the input regular \s-1RPM\s0 package is
michael@428 245 read from \fIstdin\fR (the default).
michael@428 246 .SH "EXAMPLE"
michael@428 247 .IX Header "EXAMPLE"
michael@428 248 Assume you have three \fBOpenPKG\fR instances on a system: \f(CW\*(C`/usr/opkg\*(C'\fR
michael@428 249 (the master instance), \f(CW\*(C`/v/foo/sw\*(C'\fR (a project instance) and \f(CW\*(C`/v/bar/sw\*(C'\fR
michael@428 250 (another project instance). Now let us install the \fBOpenPKG\fR \fBbash\fR package in
michael@428 251 all three locations, but only once physically.
michael@428 252 .PP
michael@428 253 .Vb 5
michael@428 254 \& # build and install regular binary RPM package for /usr/opkg
michael@428 255 \& $ /usr/opkg/bin/openpkg rpm \-\-rebuild \e
michael@428 256 \& bash\-3.1.17\-20060622.src.rpm
michael@428 257 \& $ /usr/opkg/bin/openpkg rpm \-Uvh \e
michael@428 258 \& /usr/opkg/RPM/PKG/bash\-3.1.17\-20060622.*.rpm
michael@428 259 \&
michael@428 260 \& # build and install proxy RPM package for /v/foo/sw
michael@428 261 \& # (using the regular binary RPM package of /usr/opkg)
michael@428 262 \& $ /v/foo/sw/bin/openpkg makeproxy \-\-output=/v/foo/RPM/PKG/ \e
michael@428 263 \& /usr/opkg/RPM/PKG/bash\-3.1.17\-20060622.*.rpm
michael@428 264 \& $ /v/foo/sw/bin/openpkg rpm \-Uvh \e
michael@428 265 \& /v/foo/RPM/PKG/bash\-3.1.17\-20060622+PROXY.*.rpm
michael@428 266 \&
michael@428 267 \& # build and install proxy RPM package for /v/bar/sw
michael@428 268 \& # (using the installed package of /usr/opkg)
michael@428 269 \& $ /v/bar/sw/bin/openpkg makeproxy \-\-output=/v/bar/RPM/PKG/ \e
michael@428 270 \& \-\-master=/usr/opkg bash
michael@428 271 \& $ /v/bar/sw/bin/openpkg rpm \-Uvh \e
michael@428 272 \& /v/bar/RPM/PKG/bash\-3.1.17\-20060622+PROXY.*.rpm
michael@428 273 .Ve
michael@428 274 .SH "SEE ALSO"
michael@428 275 .IX Header "SEE ALSO"
michael@428 276 \&\fBOpenPKG\fR http://www.openpkg.org/,
michael@428 277 \&\fBopenpkg rpm\fR, \fIln\fR\|(1).
michael@428 278 .SH "HISTORY"
michael@428 279 .IX Header "HISTORY"
michael@428 280 \&\fBopenpkg makeproxy\fR was developed in February 2002 by Ralf S.
michael@428 281 Engelschall <rse@engelschall.com> for the \fBOpenPKG\fR
michael@428 282 project after an idea for virtual packages by Thomas Lotterer
michael@428 283 <thomas@lotterer.net>. The implementation was completely
michael@428 284 worked off in August 2006.
michael@428 285 .SH "AUTHOR"
michael@428 286 .IX Header "AUTHOR"
michael@428 287 .Vb 3
michael@428 288 \& Ralf S. Engelschall
michael@428 289 \& rse@engelschall.com
michael@428 290 \& www.engelschall.com
michael@428 291 .Ve

mercurial