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]
14 .IR path1 : path2 : ... ]
16 .IR arch1 : arch2 : ... ]
19 .RB [ specfile | srcrpm ]
27 \fBbuild\fR is a tool to build SuSE Linux RPMs in a safe and clean way.
29 will install a minimal SuSE Linux as build system into some directory
30 and will chroot to this system to compile the package.
31 This way you don't risk to corrupt your working system (due to a broken spec
32 file for example), even if the package does not use BuildRoot.
35 searches the spec file for a
37 line; if such a line is found, all the specified rpms are installed.
38 Otherwise a selection of default packages are used. Note that
40 doesn't automatically resolve missing dependencies, so the specified
41 rpms have to be sufficient for the build.
43 If a spec file is specified on the command line,
45 will use this file and all other files in the directory for building
46 the package. If a srcrpm is specified,
48 automatically unpacks it for the build.
51 will use all the specfiles in the current directory.
56 remove the build system and reinitialize it from scratch.
59 skip the build system initialization and start with build immediately.
62 list rpms that would be used to create a fresh build root.
63 Does not create the build root or perform a build.
65 .BI "\-\-rpms " path1 : path2 : path3\fR...\fP
66 Where build can find the SuSE Linux RPMs needed to create the
67 build system. This option overrides the BUILD_RPMS environment
70 .BI "\-\-arch " arch1 : arch2 : arch3\fR...\fP
71 What architectures to select from the RPMs.
73 automatically sets this to a sensible value for your host if you
74 don't specify this option.
76 .BI "\-\-repo " url_or_dir
77 Also use the specified repository to create the build system.
78 The repositories may be either of type rpmmd, yast2 (susetags),
79 or a simple directory. Multiple --repo options may be given.
80 As a special form, 'zypp://reponame' can be used to specify
81 a system repository. 'zypp://' selects all enabled system
82 repositories. This is also the default if BUILD_RPMS is not
83 set and no --rpms or --repo option is used.
85 .BI "\-\-root " buildroot
86 Specifies where the build system is set up. Overrides the
87 BUILD_ROOT enviroment variable.
90 Tell build not to do dependency expansion, but to extract the
91 list of packages to install from "# usedforbuild" lines or, if none
92 are found, from all "BuildRequires" lines. This option is useful
93 if you want to re-build a package from a srcrpm with exactly the
94 same packages used for the srcrpm build.
100 Print a short help text.
103 verify the files in an existing build system.
105 .BI "\-\--dist " distribution
106 Set the distribution. If this option is not given, build tries to
107 calculate the distribution by looking at the rpm package used in the
109 The specified distribution can either be a string
110 like "11.2" or "sles9", or the pathname of the build configuration to
113 .SH .spec FILE OPTIONS
116 command interprets some special control comments in the specfile:
120 .B # needsrootforbuild
126 in the build system to do the build. For non-SUSE distros as well as
127 since SUSE 10.2, the default build user is
129 For 10.2 and before, the default build user is
131 These two flags in the spec file allow to deviate from the defaults
132 and force-set the build user to
136 .RI "(for " "#\ norootforbuild" " and " "#\ needsrootforbuild" " respectively."
138 .B # needsbinariesforbuild
139 provide the binary rpms that have been used to set up the build root
142 within the build root.
146 The directory where build should install the chrooted build system.
147 "/var/tmp/build-root" is used by default.
150 Where build can find the SuSE Linux RPMs. build needs them to create the
153 .B BUILD_RPM_BUILD_STAGE
154 The rpm build stage (-ba, -bb, ...). This is just passed through to
155 rpm, check the rpm manpage for a complete list and descriptions.
156 "-ba" is the default.
157 You can use this to add more options to RPM.
163 .I http://www.rpm.org/max-rpm/
165 .BR "cross distribution packaging":
166 .I http://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
168 .BR "openSUSE packaging standards and guidelines":
169 .I http://en.opensuse.org/Portal:Packaging