Mon, 28 Jan 2013 17:37:18 +0100
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 "DEV 8"
127 .TH DEV 8 "OpenPKG" "DEV(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 \&\fBopenpkg dev\fR \- OpenPKG Package Development Tool
133 .SH "DESCRIPTION"
134 .IX Header "DESCRIPTION"
135 \&\fBopenpkg dev\fR is a package development tool for \fBOpenPKG\fR.
136 .SS "\s-1SOURCE\s0 \s-1PACKAGE\s0 \s-1HANDLING\s0"
137 .IX Subsection "SOURCE PACKAGE HANDLING"
138 .ie n .IP "\fBopenpkg dev unpack\fR [\*(C`\-l\*(C' \fIlayout\fR] [\*(C`\-b\*(C' \fIbasedir\fR] [\*(C`\-s\*(C'] [\*(C`\-d\*(C'] \fIname\fR\*(C`\-\*(C'\fIversion\fR\*(C`\-\*(C'\fIrelease\fR\*(C`.src.rpm\*(C'" 4
139 .el .IP "\fBopenpkg dev unpack\fR [\f(CW\*(C`\-l\*(C'\fR \fIlayout\fR] [\f(CW\*(C`\-b\*(C'\fR \fIbasedir\fR] [\f(CW\*(C`\-s\*(C'\fR] [\f(CW\*(C`\-d\*(C'\fR] \fIname\fR\f(CW\*(C`\-\*(C'\fR\fIversion\fR\f(CW\*(C`\-\*(C'\fR\fIrelease\fR\f(CW\*(C`.src.rpm\*(C'\fR" 4
140 .IX Item "openpkg dev unpack [-l layout] [-b basedir] [-s] [-d] name-version-release.src.rpm"
141 Unpacks an OpenPKG source \s-1RPM\s0 package
142 \&\fIname\fR\f(CW\*(C`\-\*(C'\fR\fIversion\fR\f(CW\*(C`\-\*(C'\fR\fIrelease\fR\f(CW\*(C`.src.rpm\*(C'\fR into \fIbasedir\fR
143 (default is \fIname\fR\f(CW\*(C`\-\*(C'\fR\fIversion\fR\f(CW\*(C`\-\*(C'\fR\fIrelease\fR)
144 using \fIlayout\fR (default is \fIstructured\fR).
145 Additionally,
146 \&\fIfile-rpmmacros\fR
147 configuration file is generated where
148 \&\f(CW\*(C`\-s\*(C'\fR enables shared mode and
149 \&\f(CW\*(C`\-d\*(C'\fR enables debug mode, see \fIfile-rpmmacros\fR.
150 .SS "\s-1SOURCE\s0 \s-1PACKAGE\s0 \s-1DEVELOPMENT\s0"
151 .IX Subsection "SOURCE PACKAGE DEVELOPMENT"
152 .IP "\fBopenpkg dev shell\fR" 4
153 .IX Item "openpkg dev shell"
154 This is a convenience command which enters an interactive \fB\s-1GNU\s0 Bash\fR
155 shell which provides the following work environment:
156 .RS 4
157 .IP "\fBEnvironment Variables:\fR" 4
158 .IX Item "Environment Variables:"
159 .Vb 5
160 \& OPENPKG_PREFIX "<prefix>"
161 \& PS1 "\e\e[\e\ee[31;1m\e\e]\e\eu\e\e[\e\ee[0m\e\e]@\e\eh:\e\ew [OPENPKG_PREFIX=$OPENPKG_PREFIX]\en\e\e\e$ "
162 \& T %{_tmppath}
163 \& S %{_specdir}
164 \& D %{_sourcedir}
165 .Ve
166 .IP "\fBCommand-Line Aliases:\fR" 4
167 .IX Item "Command-Line Aliases:"
168 .Vb 2
169 \& openpkg "${OPENPKG_PREFIX}/bin/openpkg"
170 \& opd "${OPENPKG_PREFIX}/bin/openpkg dev"
171 .Ve
172 .IP "\fBCommand-Line Keystrokes:\fR" 4
173 .IX Item "Command-Line Keystrokes:"
174 .Vb 10
175 \& ESC+x "opd unpack\en"
176 \& ESC+v "opd edit\en"
177 \& ESC+t "opd build \-s track\en"
178 \& ESC+f "opd build \-s fetch\en"
179 \& ESC+b "opd build\en"
180 \& ESC+1 "opd build \-s prep\en"
181 \& ESC+2 "opd build \-s compile\en"
182 \& ESC+3 "opd build \-s install\en"
183 \& ESC+4 "opd build \-s binary\en"
184 \& ESC+s "opd build \-s source\en"
185 \& ESC+p "opd peek\en"
186 \& ESC+d "opd diff\en"
187 \& ESC+i "opd install\en"
188 \& ESC+e "opd erase\en"
189 \& ESC+l "opd lint\en"
190 \& ESC+r "opd release\en"
191 .Ve
192 .RE
193 .RS 4
194 .Sp
195 If option \f(CW\*(C`\-s\*(C'\fR is passed to \fBopenpkg dev shell\fR and \fIscreen\fR\|(1) is
196 available in \f(CW$PATH\fR, the interactive development shell is started up
197 in a convenient virtual screen environment.
198 .RE
199 .IP "\fBopenpkg dev edit\fR" 4
200 .IX Item "openpkg dev edit"
201 Load spec file into editor.
202 .RS 4
203 .IP "\fBEnvironment Variables:\fR" 4
204 .IX Item "Environment Variables:"
205 .Vb 1
206 \& EDITOR "vi"
207 .Ve
208 .RE
209 .RS 4
210 .RE
211 .ie n .IP "\fBopenpkg dev build\fR [\*(C`\-s\*(C' \fIstep\fR] [\*(C`\-D\*(C' \fIdefine\fR[=\fIvalue\fR]] [\*(C`\-w\*(C' \fIvariant\fR]" 4
212 .el .IP "\fBopenpkg dev build\fR [\f(CW\*(C`\-s\*(C'\fR \fIstep\fR] [\f(CW\*(C`\-D\*(C'\fR \fIdefine\fR[=\fIvalue\fR]] [\f(CW\*(C`\-w\*(C'\fR \fIvariant\fR]" 4
213 .IX Item "openpkg dev build [-s step] [-D define[=value]] [-w variant]"
214 Builds package steps. Default \fIstep\fR is \f(CW\*(C`all\*(C'\fR. Option \f(CW\*(C`\-D\*(C'\fR translated
215 into "\f(CW\*(C`\-\-define \*(Aq\f(CIdefine\f(CW \f(CIvalue\f(CW\*(Aq\*(C'\fR" while option \f(CW\*(C`\-w\*(C'\fR translated
216 into "\f(CW\*(C`\-\-with\*(C'\fR \fIvariant\fR". The \fIstep\fR arguments translate into the
217 following \s-1RPM\s0 options:
218 .Sp
219 .Vb 8
220 \& track: \-bt
221 \& fetch: \-bf
222 \& prep: \-bp
223 \& compile: \-bc \-\-short\-circuit
224 \& install: \-bi \-\-short\-circuit
225 \& binary: \-bb \-\-short\-circuit
226 \& source: \-bs
227 \& all: \-ba
228 .Ve
229 .IP "\fBopenpkg dev peek\fR" 4
230 .IX Item "openpkg dev peek"
231 Peeks file list from package and tags configuration and documentation files.
232 .IP "\fBopenpkg dev diff\fR" 4
233 .IX Item "openpkg dev diff"
234 Shows modifications with the help of a possibly underlying Version
235 Control System (\s-1VCS\s0) like \s-1CVS\s0, Subversion, Monotone, Git, Mercurial or
236 (as a fallback ) \s-1OSSP\s0 svs.
237 .ie n .IP "\fBopenpkg dev install\fR [\*(C`\-f\*(C'] [\*(C`\-o\*(C'] [\*(C`\-n\*(C'] [\*(C`\-s\*(C']" 4
238 .el .IP "\fBopenpkg dev install\fR [\f(CW\*(C`\-f\*(C'\fR] [\f(CW\*(C`\-o\*(C'\fR] [\f(CW\*(C`\-n\*(C'\fR] [\f(CW\*(C`\-s\*(C'\fR]" 4
239 .IX Item "openpkg dev install [-f] [-o] [-n] [-s]"
240 Installs package.
241 Option
242 \&\f(CW\*(C`\-f\*(C'\fR adds \f(CW\*(C`\-\-force\*(C'\fR,
243 \&\f(CW\*(C`\-n\*(C'\fR adds \f(CW\*(C`\-\-nodeps\*(C'\fR and
244 \&\f(CW\*(C`\-o\*(C'\fR adds \f(CW\*(C`\-\-oldpackage\*(C'\fR
245 to the underlying \f(CW\*(C`rpm\*(C'\fR call.
246 Option \f(CW\*(C`\-s\*(C'\fR prefixes the command with \fIsudo\fR\|(1).
247 .ie n .IP "\fBopenpkg dev erase\fR [\*(C`\-f\*(C'] [\*(C`\-o\*(C'] [\*(C`\-a\*(C'] [\*(C`\-s\*(C']" 4
248 .el .IP "\fBopenpkg dev erase\fR [\f(CW\*(C`\-f\*(C'\fR] [\f(CW\*(C`\-o\*(C'\fR] [\f(CW\*(C`\-a\*(C'\fR] [\f(CW\*(C`\-s\*(C'\fR]" 4
249 .IX Item "openpkg dev erase [-f] [-o] [-a] [-s]"
250 Erases package.
251 Option
252 \&\f(CW\*(C`\-f\*(C'\fR adds \f(CW\*(C`\-\-force\*(C'\fR,
253 \&\f(CW\*(C`\-n\*(C'\fR adds \f(CW\*(C`\-\-nodeps\*(C'\fR and
254 \&\f(CW\*(C`\-a\*(C'\fR adds \f(CW\*(C`\-\-allmatches\*(C'\fR
255 to the underlying \f(CW\*(C`rpm\*(C'\fR call.
256 Option \f(CW\*(C`\-s\*(C'\fR prefixes the command with \fIsudo\fR\|(1).
257 .ie n .IP "\fBopenpkg dev lint\fR [\*(C`\-v\*(C'] [\*(C`\-b\*(C']" 4
258 .el .IP "\fBopenpkg dev lint\fR [\f(CW\*(C`\-v\*(C'\fR] [\f(CW\*(C`\-b\*(C'\fR]" 4
259 .IX Item "openpkg dev lint [-v] [-b]"
260 Lints package sources \f(CW\*(C`*.spec\*(C'\fR, \f(CW\*(C`fsl.*\*(C'\fR, \f(CW\*(C`rc.*\*(C'\fR and binary package files.
261 Option \f(CW\*(C`\-v\*(C'\fR enables verboseness.
262 Option \f(CW\*(C`\-b\*(C'\fR disables the linting of an existing binary package file.
263 .ie n .IP "\fBopenpkg dev release\fR [\*(C`\-m\*(C' \fImessage\fR] [\*(C`\-n\*(C']" 4
264 .el .IP "\fBopenpkg dev release\fR [\f(CW\*(C`\-m\*(C'\fR \fImessage\fR] [\f(CW\*(C`\-n\*(C'\fR]" 4
265 .IX Item "openpkg dev release [-m message] [-n]"
266 Releases package specification to the repository. Unlike previous
267 incarnations of \*(L"openpkg dev\*(R" this one is not tied to any repository or
268 structure. The default message is created using the difference between
269 the previous and current version of the package specification. In order
270 to grab the previous version, the working directory and three levels
271 towards root are checked for signs of \s-1CVS\s0, Subversion, Monotone, Git,
272 Mercurial or \s-1SVS\s0 information, in that order. The appropriate command is
273 then executed to retrieve the data and the \s-1VCS\s0 found is passed to the
274 actual release command.
275 .Sp
276 Finally, the command specified by the environment variable
277 \&\f(CW\*(C`OPENPKG_DEV_RELEASE\*(C'\fR or, if omitted, specified by the rpm macro
278 \&\f(CW\*(C`%{openpkg_dev_release}\*(C'\fR is run and passed the following positional
279 arguments:
280 .RS 4
281 .Sp
282 .Vb 12
283 \& openpkg\-prefix
284 \& spec\-dir
285 \& source\-dir
286 \& binary\-rpm\-file
287 \& source\-rpm\-file
288 \& package\-name
289 \& package\-version
290 \& package\-release
291 \& package\-version\-old
292 \& package\-release\-old
293 \& commit\-message
294 \& vcs
295 .Ve
296 .RE
297 .RS 4
298 .Sp
299 For a dry run, set \f(CW$OPENPKG_DEV_RELEASE\fR to \*(L"echo\*(R" or use option "\f(CW\*(C`\-n\*(C'\fR".
300 .RE
301 .SH "UNPACKED SOURCE RPM PACKAGE FILESYSTEM LAYOUT"
302 .IX Header "UNPACKED SOURCE RPM PACKAGE FILESYSTEM LAYOUT"
303 When an OpenPKG source \s-1RPM\s0 package
304 \&\fIname\fR\f(CW\*(C`\-\*(C'\fR\fIversion\fR\f(CW\*(C`\-\*(C'\fR\fIrelease\fR\f(CW\*(C`.src.rpm\*(C'\fR is unpacked to the
305 filesystem, the following distinct filesystem layouts are known:
306 .IP "\fBglobal\fR" 4
307 .IX Item "global"
308 .RS 4
309 .PD 0
310 .ie n .IP "\fIprefix\fR\*(C`/RPM/SRC/\*(C'\fIname\fR\*(C`/.openpkg/rpmmacros\*(C'" 4
311 .el .IP "\fIprefix\fR\f(CW\*(C`/RPM/SRC/\*(C'\fR\fIname\fR\f(CW\*(C`/.openpkg/rpmmacros\*(C'\fR" 4
312 .IX Item "prefix/RPM/SRC/name/.openpkg/rpmmacros"
313 .ie n .IP "\fIprefix\fR\*(C`/RPM/SRC/\*(C'\fIname\fR\*(C`/\*(C'\fIname\fR\*(C`.spec\*(C'" 4
314 .el .IP "\fIprefix\fR\f(CW\*(C`/RPM/SRC/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`.spec\*(C'\fR" 4
315 .IX Item "prefix/RPM/SRC/name/name.spec"
316 .ie n .IP "\fIprefix\fR\*(C`/RPM/SRC/\*(C'\fIname\fR\*(C`/\*(C'\fIpackaging-source-file\fR" 4
317 .el .IP "\fIprefix\fR\f(CW\*(C`/RPM/SRC/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIpackaging-source-file\fR" 4
318 .IX Item "prefix/RPM/SRC/name/packaging-source-file"
319 .ie n .IP "\fIprefix\fR\*(C`/RPM/SRC/\*(C'\fIname\fR\*(C`/\*(C'\fIthirdparty-distribution-file\fR" 4
320 .el .IP "\fIprefix\fR\f(CW\*(C`/RPM/SRC/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIthirdparty-distribution-file\fR" 4
321 .IX Item "prefix/RPM/SRC/name/thirdparty-distribution-file"
322 .ie n .IP "\fIprefix\fR\*(C`/RPM/PKG/\*(C'\fIbinary-rpm-package-file\fR" 4
323 .el .IP "\fIprefix\fR\f(CW\*(C`/RPM/PKG/\*(C'\fR\fIbinary-rpm-package-file\fR" 4
324 .IX Item "prefix/RPM/PKG/binary-rpm-package-file"
325 .ie n .IP "\fIprefix\fR\*(C`/RPM/PKG/\*(C'\fIsource-rpm-package-file\fR" 4
326 .el .IP "\fIprefix\fR\f(CW\*(C`/RPM/PKG/\*(C'\fR\fIsource-rpm-package-file\fR" 4
327 .IX Item "prefix/RPM/PKG/source-rpm-package-file"
328 .ie n .IP "\fIprefix\fR\*(C`/RPM/TMP/\*(C'\fItemporary-file\fR" 4
329 .el .IP "\fIprefix\fR\f(CW\*(C`/RPM/TMP/\*(C'\fR\fItemporary-file\fR" 4
330 .IX Item "prefix/RPM/TMP/temporary-file"
331 .RE
332 .RS 4
333 .PD
334 .Sp
335 This is just the \*(L"simple\*(R" filesystem layout (see below) with the
336 \&\fIbase-dir\fR set to \fIprefix\fR\f(CW\*(C`/RPM/SRC/\*(C'\fR.
337 .Sp
338 This is the filesystem layout used by default for building OpenPKG
339 packages during \f(CW\*(C`openpkg build\*(C'\fR or the underlying \f(CW\*(C`openpkg rpm
340 \&\-\-rebuild\*(C'\fR commands.
341 .RE
342 .IP "\fBlocal\fR" 4
343 .IX Item "local"
344 .RS 4
345 .PD 0
346 .ie n .IP "\fIbase-dir\fR\*(C`/.openpkg/rpmmacros\*(C'" 4
347 .el .IP "\fIbase-dir\fR\f(CW\*(C`/.openpkg/rpmmacros\*(C'\fR" 4
348 .IX Item "base-dir/.openpkg/rpmmacros"
349 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`.spec\*(C'" 4
350 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`.spec\*(C'\fR" 4
351 .IX Item "base-dir/name.spec"
352 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIpackaging-source-file\fR" 4
353 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIpackaging-source-file\fR" 4
354 .IX Item "base-dir/packaging-source-file"
355 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIthirdparty-distribution-file\fR" 4
356 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIthirdparty-distribution-file\fR" 4
357 .IX Item "base-dir/thirdparty-distribution-file"
358 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIbinary-rpm-package-file\fR" 4
359 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIbinary-rpm-package-file\fR" 4
360 .IX Item "base-dir/binary-rpm-package-file"
361 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIsource-rpm-package-file\fR" 4
362 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIsource-rpm-package-file\fR" 4
363 .IX Item "base-dir/source-rpm-package-file"
364 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fItemporary-file\fR" 4
365 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fItemporary-file\fR" 4
366 .IX Item "base-dir/temporary-file"
367 .RE
368 .RS 4
369 .PD
370 .Sp
371 This puts everything into one directory.
372 .RE
373 .IP "\fBsimple\fR" 4
374 .IX Item "simple"
375 .RS 4
376 .PD 0
377 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/.openpkg/rpmmacros\*(C'" 4
378 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/.openpkg/rpmmacros\*(C'\fR" 4
379 .IX Item "base-dir/name/.openpkg/rpmmacros"
380 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/\*(C'\fIname\fR\*(C`.spec\*(C'" 4
381 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`.spec\*(C'\fR" 4
382 .IX Item "base-dir/name/name.spec"
383 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/\*(C'\fIpackaging-source-file\fR" 4
384 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIpackaging-source-file\fR" 4
385 .IX Item "base-dir/name/packaging-source-file"
386 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/\*(C'\fIthirdparty-distribution-file\fR" 4
387 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIthirdparty-distribution-file\fR" 4
388 .IX Item "base-dir/name/thirdparty-distribution-file"
389 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIbinary-rpm-package-file\fR" 4
390 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIbinary-rpm-package-file\fR" 4
391 .IX Item "base-dir/binary-rpm-package-file"
392 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIsource-rpm-package-file\fR" 4
393 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIsource-rpm-package-file\fR" 4
394 .IX Item "base-dir/source-rpm-package-file"
395 .ie n .IP "\fI\fI$TMPDIR\fI\fR\*(C`/openpkg/\*(C'\fItemporary-file\fR" 4
396 .el .IP "\fI\f(CI$TMPDIR\fI\fR\f(CW\*(C`/openpkg/\*(C'\fR\fItemporary-file\fR" 4
397 .IX Item "$TMPDIR/openpkg/temporary-file"
398 .RE
399 .RS 4
400 .PD
401 .Sp
402 This is the simple filesystem layout of an unpacked
403 OpenPKG package. All files are simply put into a sub-directory with the
404 \&\fIname\fR of the package.
405 .Sp
406 This is the filesystem layout used for the quick patching of a single
407 OpenPKG package in a stand-alone environment.
408 .RE
409 .IP "\fBstructured\fR" 4
410 .IX Item "structured"
411 .RS 4
412 .PD 0
413 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/.openpkg/rpmmacros\*(C'" 4
414 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/.openpkg/rpmmacros\*(C'\fR" 4
415 .IX Item "base-dir/name/.openpkg/rpmmacros"
416 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/src/\*(C'\fIname\fR\*(C`.spec\*(C'" 4
417 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/src/\*(C'\fR\fIname\fR\f(CW\*(C`.spec\*(C'\fR" 4
418 .IX Item "base-dir/name/src/name.spec"
419 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/src/\*(C'\fIpackaging-source-file\fR" 4
420 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/src/\*(C'\fR\fIpackaging-source-file\fR" 4
421 .IX Item "base-dir/name/src/packaging-source-file"
422 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/dst/\*(C'\fIthirdparty-distribution-file\fR" 4
423 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/dst/\*(C'\fR\fIthirdparty-distribution-file\fR" 4
424 .IX Item "base-dir/name/dst/thirdparty-distribution-file"
425 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/pkg/\*(C'[\*(C`bin/\*(C']\fIbinary-rpm-package-file\fR" 4
426 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/pkg/\*(C'\fR[\f(CW\*(C`bin/\*(C'\fR]\fIbinary-rpm-package-file\fR" 4
427 .IX Item "base-dir/name/pkg/[bin/]binary-rpm-package-file"
428 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/pkg/\*(C'[\*(C`src/\*(C']\fIsource-rpm-package-file\fR" 4
429 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/pkg/\*(C'\fR[\f(CW\*(C`src/\*(C'\fR]\fIsource-rpm-package-file\fR" 4
430 .IX Item "base-dir/name/pkg/[src/]source-rpm-package-file"
431 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\fIname\fR\*(C`/tmp/\*(C'\fItemporary-file\fR" 4
432 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`/tmp/\*(C'\fR\fItemporary-file\fR" 4
433 .IX Item "base-dir/name/tmp/temporary-file"
434 .RE
435 .RS 4
436 .PD
437 .Sp
438 This is the structured (and default) filesystem layout of an unpacked
439 OpenPKG package. A top-level sub-directory with the \fIname\fR of the
440 package is created. There the package specification and all packaging
441 source files are put into the sub-directory \fIsrc\fR and all the
442 third-party distribution files are put into the sub-directory \fIdst\fR.
443 .Sp
444 This is the filesystem layout used for the development of a single
445 OpenPKG package in a stand-alone environment.
446 .RE
447 .IP "\fBdistributed\fR" 4
448 .IX Item "distributed"
449 .RS 4
450 .PD 0
451 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`.openpkg/rpmmacros\*(C'" 4
452 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`.openpkg/rpmmacros\*(C'\fR" 4
453 .IX Item "base-dir/.openpkg/rpmmacros"
454 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`src/\*(C'\fIname\fR\*(C`/\*(C'\fIname\fR\*(C`.spec\*(C'" 4
455 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`src/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIname\fR\f(CW\*(C`.spec\*(C'\fR" 4
456 .IX Item "base-dir/src/name/name.spec"
457 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`src/\*(C'\fIname\fR\*(C`/\*(C'\fIpackaging-source-file\fR" 4
458 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`src/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIpackaging-source-file\fR" 4
459 .IX Item "base-dir/src/name/packaging-source-file"
460 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`dst/\*(C'\fIname\fR\*(C`/\*(C'\fIthirdparty-distribution-file\fR" 4
461 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`dst/\*(C'\fR\fIname\fR\f(CW\*(C`/\*(C'\fR\fIthirdparty-distribution-file\fR" 4
462 .IX Item "base-dir/dst/name/thirdparty-distribution-file"
463 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`pkg/\*(C'[\*(C`bin/\*(C']\fIbinary-rpm-package-file\fR" 4
464 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`pkg/\*(C'\fR[\f(CW\*(C`bin/\*(C'\fR]\fIbinary-rpm-package-file\fR" 4
465 .IX Item "base-dir/pkg/[bin/]binary-rpm-package-file"
466 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`pkg/\*(C'[\*(C`src/\*(C']\fIsource-rpm-package-file\fR" 4
467 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`pkg/\*(C'\fR[\f(CW\*(C`src/\*(C'\fR]\fIsource-rpm-package-file\fR" 4
468 .IX Item "base-dir/pkg/[src/]source-rpm-package-file"
469 .ie n .IP "\fIbase-dir\fR\*(C`/\*(C'\*(C`tmp/\*(C'\fItemporary-file\fR" 4
470 .el .IP "\fIbase-dir\fR\f(CW\*(C`/\*(C'\fR\f(CW\*(C`tmp/\*(C'\fR\fItemporary-file\fR" 4
471 .IX Item "base-dir/tmp/temporary-file"
472 .RE
473 .RS 4
474 .PD
475 .Sp
476 This is the distributed filesystem layout of an unpacked OpenPKG
477 package. It is similar to the structured filesystem layout but the
478 \&\f(CW\*(C`src\*(C'\fR and \f(CW\*(C`dst\*(C'\fR directories and the \fIname\fR directory are swapped,
479 mainly with the intention of bundling together all third-party
480 distribution files of a large number of packages.
481 .Sp
482 This is the filesystem layout used for regular OpenPKG package
483 development.
484 .RE
485 .SH "LOCAL RPM MACROS FILE (.openpkg/rpmmacros)"
486 .IX Header "LOCAL RPM MACROS FILE (.openpkg/rpmmacros)"
487 OpenPKG supports local \s-1RPM\s0 macros files \fI.openpkg/rpmmacros\fR which
488 can be used to configure \s-1RPM\s0 in a local scope. This is especially
489 interesting to configure a local (even per-package) build environment
490 with the help of the \f(CW%openpkg_layout\fR macro.
491 .PP
492 \&\f(CW%openpkg_layout\fR
493 [\f(CW\*(C`macrosfile=\*(C'\fR\fIfilename\fR]
494 [\f(CW\*(C`basedir=\*(C'\fR\fIdirectory\fR]
495 [\f(CW\*(C`specdir=\*(C'\fR\fIdirectory\fR]
496 [\f(CW\*(C`sourcedir=\*(C'\fR\fIdirectory\fR]
497 [\f(CW\*(C`builddir=\*(C'\fR\fIdirectory\fR]
498 [\f(CW\*(C`tmpdir=\*(C'\fR\fIdirectory\fR]
499 [\f(CW\*(C`binrpmdir=\*(C'\fR\fIdirectory\fR]
500 [\f(CW\*(C`srcrpmdir=\*(C'\fR\fIdirectory\fR]
501 [\f(CW\*(C`shared=\*(C'\fR\fIyes-or-no\fR]
502 [\f(CW\*(C`debug=\*(C'\fR\fIyes-or-no\fR]
503 .ie n .IP "\*(C`macrosfile=\*(C'\fIfilename\fR" 4
504 .el .IP "\f(CW\*(C`macrosfile=\*(C'\fR\fIfilename\fR" 4
505 .IX Item "macrosfile=filename"
506 Absolute file path of the \f(CW\*(C`.openpkg/rpmmacros\*(C'\fR file where this
507 \&\f(CW%openpkg_layout\fR macro is defined. Usually, the intended usage is to
508 leverage from OpenPKG \s-1RPM\s0's special \f(CW\*(C`%{macrosfile}\*(C'\fR macro by simply
509 using \f(CW\*(C`macrosfile=%{macrosfile}\*(C'\fR. This parameter is important as
510 the default \f(CW\*(C`basename\*(C'\fR is derived from it.
511 .ie n .IP "\*(C`basedir=\*(C'\fIdirectory\fR" 4
512 .el .IP "\f(CW\*(C`basedir=\*(C'\fR\fIdirectory\fR" 4
513 .IX Item "basedir=directory"
514 Absolute directory path where the \f(CW\*(C`.openpkg/rpmmacros\*(C'\fR file is
515 located under. Usually, the intended usage is to not explicitly
516 set this parameter but let it be determined indirectly via
517 \&\f(CW\*(C`macrosfile\*(C'\fR. The effective default value is equal to a value like
518 \&\f(CW\*(C`%{realpath:%{dirname:%{realpath:%{macrosfile}}}/..}\*(C'\fR This parameter is
519 important as all standard filesystem layouts (see parameter \f(CW\*(C`layout\*(C'\fR)
520 are always at least partially based on this base directory in order
521 to provide absolute-path-independent flexible filesystem layouts.
522 .ie n .IP "\*(C`layout=\*(C'\fIlayout\fR" 4
523 .el .IP "\f(CW\*(C`layout=\*(C'\fR\fIlayout\fR" 4
524 .IX Item "layout=layout"
525 The name of the filesystem layout type to use. The following standard
526 filesystem layout types are pre-defined: \f(CW\*(C`global\*(C'\fR, \f(CW\*(C`local\*(C'\fR, \f(CW\*(C`simple\*(C'\fR,
527 \&\f(CW\*(C`structured\*(C'\fR (default) and \f(CW\*(C`distributed\*(C'\fR.
528 .Sp
529 .Vb 8
530 \& global macrosdir <openpkg_prefix>/etc/openpkg
531 \& global macrosfile <openpkg_prefix>/etc/openpkg/rpmmacros
532 \& global specdir <openpkg_prefix>/RPM/SRC/$name
533 \& global sourcedir <openpkg_prefix>/RPM/SRC/$name
534 \& global builddir <openpkg_prefix>/RPM/TMP
535 \& global tmpdir <openpkg_prefix>/RPM/TMP
536 \& global binrpmdir <openpkg_prefix>/RPM/PKG
537 \& global srcrpmdir <openpkg_prefix>/RPM/PKG
538 \&
539 \& local macrosdir <basedir>/.openpkg
540 \& local macrosfile <basedir>/.openpkg/rpmmacros
541 \& local specdir <basedir>
542 \& local sourcedir <basedir>
543 \& local builddir <basedir>
544 \& local tmpdir <basedir>
545 \& local binrpmdir <basedir>
546 \& local srcrpmdir <basedir>
547 \&
548 \& simple macrosdir <basedir>/.openpkg
549 \& simple macrosfile <basedir>/.openpkg/rpmmacros
550 \& simple specdir <basedir>
551 \& simple sourcedir <basedir>
552 \& simple builddir <tmpdir>
553 \& simple tmpdir <tmpdir>
554 \& simple binrpmdir <basedir>/..
555 \& simple srcrpmdir <basedir>/..
556 \&
557 \& structured macrosdir <basedir>/.openpkg
558 \& structured macrosfile <basedir>/.openpkg/rpmmacros
559 \& structured specdir <basedir>/src
560 \& structured sourcedir <basedir>/dst
561 \& structured builddir <basedir>/tmp
562 \& structured tmpdir <basedir>/tmp
563 \& structured binrpmdir <basedir>/pkg/bin
564 \& structured srcrpmdir <basedir>/pkg/src
565 \&
566 \& distributed macrosdir <basedir>/.openpkg
567 \& distributed macrosfile <basedir>/.openpkg/rpmmacros
568 \& distributed specdir <basedir>/src/<name>
569 \& distributed sourcedir <basedir>/dst/<name>
570 \& distributed builddir <basedir>/tmp
571 \& distributed tmpdir <basedir>/tmp
572 \& distributed binrpmdir <basedir>/pkg/bin
573 \& distributed srcrpmdir <basedir>/pkg/src
574 .Ve
575 .ie n .IP "\*(C`specdir=\*(C'\fIdirectory-list\fR" 4
576 .el .IP "\f(CW\*(C`specdir=\*(C'\fR\fIdirectory-list\fR" 4
577 .IX Item "specdir=directory-list"
578 .PD 0
579 .ie n .IP "\*(C`sourcedir=\*(C'\fIdirectory-list\fR" 4
580 .el .IP "\f(CW\*(C`sourcedir=\*(C'\fR\fIdirectory-list\fR" 4
581 .IX Item "sourcedir=directory-list"
582 .ie n .IP "\*(C`builddir=\*(C'\fIdirectory-list\fR" 4
583 .el .IP "\f(CW\*(C`builddir=\*(C'\fR\fIdirectory-list\fR" 4
584 .IX Item "builddir=directory-list"
585 .ie n .IP "\*(C`tmpdir=\*(C'\fIdirectory-list\fR" 4
586 .el .IP "\f(CW\*(C`tmpdir=\*(C'\fR\fIdirectory-list\fR" 4
587 .IX Item "tmpdir=directory-list"
588 .ie n .IP "\*(C`binrpmdir=\*(C'\fIdirectory-list\fR" 4
589 .el .IP "\f(CW\*(C`binrpmdir=\*(C'\fR\fIdirectory-list\fR" 4
590 .IX Item "binrpmdir=directory-list"
591 .ie n .IP "\*(C`srcrpmdir=\*(C'\fIdirectory-list\fR" 4
592 .el .IP "\f(CW\*(C`srcrpmdir=\*(C'\fR\fIdirectory-list\fR" 4
593 .IX Item "srcrpmdir=directory-list"
594 .PD
595 These parameters correspond to the six individual directories provided
596 by a standard layout and allow you to selectively adjust parts of a
597 standard layout to local needs and without having to define a full
598 standard layout yourself.
599 .Sp
600 The \fIdirectory-list\fR is a whitespace-separated list of
601 \&\fIdirectory\fR[\f(CW\*(C`:\*(C'\fR[\f(CW\*(C`+\*(C'\fR]\fIdirectory\fR] specifications which are
602 \&\*(L"first-match\*(R" searched for existence. The last directory in the list
603 is always taken as the fallback and if it is not existing it is
604 even created on-the-fly. The \fIdirectory-check\fR\f(CW\*(C`:\*(C'\fR\fIdirectory-use\fR
605 syntax variant allows the existence test to use \fIdirectory-check\fR,
606 but expands to \fIdirectory-use\fR (replace mode). The
607 \&\fIdirectory-check\fR\f(CW\*(C`:+\*(C'\fR\fIdirectory-use\fR syntax variant allows
608 the existence test to use \fIdirectory-check\fR, but expands to
609 \&\fIdirectory-check\fR\fIdirectory-use\fR (append mode). For instance
610 \&\f(CW\*(C`tmpdir="%{getenv:HOME)/tmp:+/openpkg %{getenv:TMPDIR}:+/openpkg
611 /tmp/%(echo $LOGNAME)/openpkg"\*(C'\fR will first check for ~/tmp (and then use
612 ~/tmp/openpkg), then for \f(CW$TMPDIR\fR (and use \f(CW$TMPDIR\fR/openpkg) and finally
613 it will use /tmp/$LOGNAME/openpkg at last resort.
614 .Sp
615 Paths are usually assembled by using \s-1RPM\s0 macros like
616 \&\f(CW\*(C`%{l_prefix}\*(C'\fR (the instance prefix), \f(CW\*(C`%{_\|_openpkg_basename}\*(C'\fR (the
617 \&\fIbasename\fR parameter), \f(CW\*(C`%{realpath:<path\*(C'\fR} (path resolution),
618 \&\f(CW\*(C`%{dirname:<path\*(C'\fR} (directory name extraction), \f(CW\*(C`%{basename:<path\*(C'\fR}
619 (file name extraction), etc.
620 .ie n .IP "\*(C`shared=\*(C'\fIyes-or-no\fR" 4
621 .el .IP "\f(CW\*(C`shared=\*(C'\fR\fIyes-or-no\fR" 4
622 .IX Item "shared=yes-or-no"
623 This enables the \fIsubdir\fR components in the standard filesystem
624 layouts by setting it to an automatically generated sub-directory named
625 \&\fIhost\fR\f(CW\*(C`\-\*(C'\fR\fIarch\fR\-\fIos\fR. This allows one to build the same OpenPKG
626 package in parallel on multiple hosts in a shared environment (usually
627 on an \s-1NFS\s0 based filesystem).
628 .ie n .IP "\*(C`debug=\*(C'\fIyes-or-no\fR" 4
629 .el .IP "\f(CW\*(C`debug=\*(C'\fR\fIyes-or-no\fR" 4
630 .IX Item "debug=yes-or-no"
631 This enables debug outputs which shows the effectively used directory
632 paths.
633 .PP
634 The generated \f(CW\*(C`.openpkg/rpmmacros\*(C'\fR file contains the generic filesystem
635 layout glue configuration for the particular filesystem \fIlayout\fR.
636 .ie n .IP "\*(C`%openpkg_layout macrosfile=%{macrosfile} layout=\*(C'\fItype\fR" 1
637 .el .IP "\f(CW\*(C`%openpkg_layout macrosfile=%{macrosfile} layout=\*(C'\fR\fItype\fR" 1
638 .IX Item "%openpkg_layout macrosfile=%{macrosfile} layout=type"
639 .SH "CONFIGURATION"
640 .IX Header "CONFIGURATION"
641 .Vb 3
642 \& OPENPKG_NAME="Ralf S. Engelschall"
643 \& OPENPKG_MAIL="rse@openpkg.net"
644 \& OPENPKG_MODE="developer"
645 \&
646 \& OPENPKG_PREFIX="/openpkg"
647 \& OPENPKG_TMPDIR="${TMPDIR\-/tmp}/openpkg"
648 \&
649 \& OPENPKG_VCS="cvs ci \-m \*(Aq<msg>\*(Aq ."
650 \& OPENPKG_UPLD="scp <srpm> openpkg\-ftp@ftp.openpkg.org:/current/SRC/00UPLOAD/"
651 .Ve
652 .SH "ABOUT"
653 .IX Header "ABOUT"
654 OpenPKG \fBdev\fR is Ralf S. Engelschall's Perl-based clean-room partial
655 re-implementation of 2008 for OpenPKG 4.0 of Thomas Lotterer's original
656 OpenPKG \fBdev\fR Bash-based shell from 2002.