summaryrefslogtreecommitdiffstats
path: root/docs/mock.1
blob: 078b62dc8f8a941b0bbb1d5116661fa8bde3a3ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
.TH "mock" "1" "0.7" "Seth Vidal" ""
.SH "NAME"
.LP 
mock \- build SRPMs in a chroot
.SH "SYNTAX"
.LP 
mock  [options] \fBrebuild\fR \fISRPM [\fISRPM...\fR]
.LP
mock  [options] \fBchroot\fR \fI<cmd>\fR
.LP
mock  [options] {\fBinit\fR|\fBclean\fR|\fBshell\fR}
.LP
mock  [options] installdeps {\fBSRPM\fR|\fBRPM\fR}
.LP
mock  [options] install \fBPACKAGE\fR

.SH "DESCRIPTION"
.LP 
Mock is a simple chroot/rpm building program. It doesn't do anything
terribly fancy other than populate a chroot with the contents
specified by a configuration file, then build any input SRPM(s) in
that chroot. 
.LP
The content of a chroot is specified by the configuration
specified with the \fB\-r\fR option. A default configuration file is
specified in /etc/mock/default.cfg, which is usually a symlink to one
of the installed configurations.
.SH "OPTIONS"
.LP 
.TP 
\fB\-r\fR \fICHROOT\fP
Uses specified chroot configuration as defined in
/etc/mock/<\fIchroot\fP>.cfg If none specified, uses the chroot linked
to by /etc/mock/default.cfg 
.TP 
\fB\-\-no\-clean\fR
Do not clean chroot before building package.
.TP 
\fB\-\-cleanup\-after\fR
Clean chroot after building. Use with \-\-resultdir. Only active for 'rebuild'.
.TP 
\fB\-\-no\-cleanup\-after\fR
Dont clean chroot after building. If automatic cleanup is enabled, use this to disable.
.TP 
\fB\-\-arch=\fR\fIARCH\fP
Specify target build arch.
.TP 
\fB\-\-resultdir=\fR\fIRESULTDIR\fP
Change directory where resulting files (RPMs and build logs) are written
.TP
\fB\-\-uniqueext=\fR\fItext\fP
Arbitrary, unique extension to append to buildroot directory name
.TP
\fB\-\-configdir=\fR\fICONFIGDIR\fP
Change directory where config files are found
.TP
\fB\-\-rpmbuild_timeout=\fR\fISECONDS\fP
Fail build if rpmbuild takes longer than 'timeout' seconds
.TP 
\fB\-\-help\fR
Show usage information and exit.
.TP 
\fB\-\-version\fR
Show version number and exit.
.SH "COMMANDS"
.LP
.TP 
\fBinit\fR \- initialize a chroot (install packages, setup devices, etc.)
.TP
\fBclean\fR \- purge the chroot tree
.TP
\fBrebuild\fR \- If no command is specified, rebuild is assumed. Rebuilds the specified SRPM(s)
.TP 
\fBchroot\fR|\fBshell\fR \- run the specified command within the chroot (which must already be initialized). If no command specified, /bin/sh is run.
.TP
\fBinstalldeps\fR \- find out deps for SRPM or RPM, and do a yum install to put them in the buildroot
.TP
\fBinstall\fR \- Do a yum install PACKAGE inside the buildroot
.SH "FILES"
.LP 
\fI/etc/mock/\fP \- default configuration directory
.LP
\fI/var/lib/mock\fP \- directory where chroots are created
.SH "EXAMPLES"
.LP 
To rebuild test.src.rpm under the default chroot:
.LP
.RS 5
\fBmock rebuild /path/to/test.src.rpm\fR
.RE
.LP
To specify a different chroot (which must be defined in /etc/mock):
.LP
.RS 5
\fBmock \-r fedora\-4\-i386\-core rebuild /path/to/test.src.rpm\fR
.RE
.SH "BUGS"
.LP
To report bugs in mock, go to:
.LP
.RS 5
\fIhttp://bugzilla.redhat.com/bugzilla\fR.
.RE
.LP
Select the query option, using product \fBFedora Hosted Projects\fR
and component \fBmock\fR and press the \fBStart Search\fR
button. If there is a bug similar to the one you are seeing, add your
information to the comments. If not, go to the new bug page using the
same product and component and fill in the form.
.SH "AUTHORS"
.LP 
Michael Brown <mebrown@michaels-house.net>
.LP 
Clark Williams <williams@redhat.com>
.LP 
Seth Vidal <skvidal@linux.duke.edu>
.LP
and a cast of...tens
.SH "SEE ALSO"
.LP 
yum(8) rpmbuild(8)
http://fedoraproject.org/wiki/Projects/Mock