1 .de TQ \"follow a TP item with several TQ items to define several
2 . \"entities with one shared description.
7 .TH build 1 "(c) 1997-2008 SuSE Linux AG Nuernberg, Germany"
9 build \- build SuSE Linux RPMs in a chroot environment
12 .RB [ --clean | --no-init]
26 \fBbuild\fR is a tool to build binary packages in a safe and reproducible
28 The default is to build in a chroot sandbox, but \fBbuild\fP also supports
29 building in a virtual machine for better security.
31 If a recipe file is specified on the command line,
33 will use this file and all other files in the directory for building
34 the package. If no recipe argument is provided, build will search the
35 current directory for a file.
39 tool understands the following recipe file types:
42 A specfile used to generate rpms.
45 A source rpm, which will be unpacked for the build.
48 A kiwi config file used to generate a kiwi image.
51 A dsc file used to generate Debian binary packages.
54 A file used to generate Arch Linux binary packages.
59 Remove the build system and reinitialize it from scratch.
62 Skip the build system initialization and start with build immediately.
64 .BI "\-\-repo " dir_or_url
65 Either a directory containing binary packages (optionally with repository
66 metadata), or a url pointing to some remote repository. Multiple
67 \fB--repo\fP options can be used so create a specific repository
68 layering. Note that packages are searched in the specified repository
69 order, i.e. the first repository containing a package with a specific
70 name wins regardless of the version.
71 As a special form, 'zypp://reponame' can be used to specify
72 a system repository. 'zypp://' selects all enabled system
73 repositories. This is also the default if BUILD_RPMS is not
74 set and no \fB--rpms\fP or \fB--repo\fP option is used.
76 .BI "\-\-dist " distribution
77 Set the distribution. If this option is not given, build tries to
78 guess the distribution by looking at the available packages.
79 The specified distribution can either be a string
80 like "11.2" or "sles9", "debian7", or the pathname of the build
83 .BI "\-\-root " buildroot
84 Specifies where the build system is set up. Overrides the
85 BUILD_ROOT enviroment variable.
88 Print a short help text.
91 Force building with user \fRabuild\fP. Otherwise, \fBbuild\fP searches
92 the recipe file for a "needsrootforbuild" hint to decide what user
96 list packages that would be used to create a fresh build root.
97 Does not create the build root or perform a build.
99 .BI "\-\-rpms " path1 : path2 : path3\fR...\fP
100 Where build can find the packages needed to create the
101 build system. This option overrides the BUILD_RPMS environment
102 variable. This option is deprecated, use \fB--repo\fP instead.
104 .BI "\-\-arch " arch1 : arch2 : arch3\fR...\fP
105 What architectures to select from the RPMs.
107 automatically sets this to a sensible value for your host if you
108 do not specify this option so you should almost never need it.
110 .SH RPM BUILD SPECIFIC OPTIONS
113 Tell build not to do dependency expansion, but to extract the
114 list of packages to install from "# usedforbuild" lines or, if none
115 are found, from all "BuildRequires" lines. This option is useful
116 if you want to re-build a package from a srcrpm with exactly the
117 same packages used for the srcrpm build.
120 Pass a stage option to rpmbuild. The default is \fB-ba\fP.
123 Call rpmbuild with a target option. This can be used for cross building.
126 Verify the files in an existing build system.
128 .SH VIRTUAL MACHINE SPECIFIC OPTIONS
130 .B "--xen --kvm --uml --qemu --emulator --zvm --lxc"
131 Sets a specific vm type.
133 .BI "--vm-type " type
136 .BI "--vm-disk " file
137 Specifies the location of the disk image to use. If this option is not
138 given, \fIbuildroot\fP\fB.img\fP is used (e.g. /var/tmp/build-root.img).
140 .BI "--vm-disk-size " size_in_mb
141 Specify the size of the disk image to create.
143 .BI "--vm-disk-filesystem " type
144 Sets the filesystem type to use when creating the disk image. The default
145 is to use the ext3 filesystem.
147 .BI "--vm-swap " file
148 Specifies the location of the swap file to use. If this option is not
149 given, \fIbuildroot\fP\fB.swap\fP is used (e.g. /var/tmp/build-root.swap).
151 .BI "--vm-swap-size " size_in_mb
152 Specify the size of the swap file to create.
154 .BI "--vm-memory " size_in_mb
155 Sets the desired memory size of the virtual machine.
157 .BI "--vm-kernel " kernel_file
158 Set a specific kernel to boot in the virtual machine.
160 .BI "--vm-initrd " initrd_file
161 Set a specific kernel to boot in the virtual machine.
164 Force the recreation of the disk image.
166 .SH RECIPE FILE OPTIONS
169 command interprets some special control comments in the recipe file:
173 .B # needsrootforbuild
179 in the build system to do the build. For non-SUSE distros as well as
180 since SUSE 10.2, the default build user is
182 For 10.2 and before, the default build user is
184 These two flags in the spec file allow to deviate from the defaults
185 and force-set the build user to
189 .RI "(for " "#\ norootforbuild" " and " "#\ needsrootforbuild" " respectively."
191 .B # needsbinariesforbuild
192 provide the binary rpms that have been used to set up the build root
195 within the build root.
199 The directory where build should install the chrooted build system.
200 "/var/tmp/build-root" is used by default. See the \fB--root\fP option.
203 This can be used instead of the \fB--rpms\fP option. Deprecated.
205 .B BUILD_RPM_BUILD_STAGE
206 The rpm build stage (-ba, -bb, ...). This is just passed through to
207 rpm, check the rpm manpage for a complete list and descriptions.
208 "-ba" is the default. You should probably use the \fB--stage\fP
212 .BR rpm (8), dpkg (8), pacman (8), kiwi (8)
215 .I http://www.rpm.org/max-rpm/
217 .BR "cross distribution packaging":
218 .I http://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
220 .BR "openSUSE packaging standards and guidelines":
221 .I http://en.opensuse.org/Portal:Packaging