1pbuilder(8) pbuilder pbuilder(8)
2
3
4
6 pbuilder - personal package builder
7
9 pbuilder create [options]
10
11 pbuilder update [options]
12
13 pbuilder build [options] .dsc-file
14
15 pbuilder clean
16
17 pbuilder login [options]
18
19 pbuilder execute [options] -- script [script options]
20
21 pbuilder dumpconfig
22
23 pbuilder debuild [options]
24
26 Front end program to the pbuilder suite of programs, used for creating
27 and maintaining chroot environment and building Debian package in the
28 chroot environment.
29
30
32 create
33 Creates a base.tgz for the specified distribution.
34
35
36 update
37 up
38 u
39 Updates the base.tgz for the specified distribution. Also, by
40 specifying the --override-config option, it is possible to
41 install a new apt-line using the given options and settings in
42 the configuration file for the base.tgz.
43
44 For example, to switch the distribution of an existing base.tgz
45 to sid, specify the --distribution sid --override-config options
46 to update.
47
48
49 build
50 b
51 Builds the package specified by .dsc-file in the chroot environ‐
52 ment created using the base.tgz
53
54
55 clean
56 Cleans up the directory specified by the configuration BUILD‐
57 PLACE and APTCACHE specified in /etc/pbuilderrc
58
59
60 login
61 l
62 Logs into the chroot, and cleaned up afterwards. Any changes
63 you make will not be kept. Only use this for temporary and
64 debugging purposes. Do not bind-mount filesystems directly
65 inside the chroot. Use --bindmounts option to mount.
66
67
68 execute
69 e
70 Execute a script or command inside the chroot, in a similar man‐
71 ner to login
72
73 The file specified in the command-line argument will be copied
74 into the chroot, and invoked.
75
76 The remaining arguments are passed on to the script.
77
78
79 dumpconfig
80 Dumps configuration information, used for debugging.
81
82
83 debuild
84 Builds a Debian package from the Debian source directory. The
85 current directory should have the usual debian/ directory.
86
87 Same as pdebuild --use-pdebuild-internal
88
89
91 The command is followed by options of the form --option name which will
92 modify the semantics as explained below. They are applied from left-
93 to-right, and when there are conflicting options, the rightmost options
94 will have effect.
95
96
97 --basetgz [basetgz-location]
98 Specifies the location of base.tgz
99
100 This option will define the default distribution and apt-lines
101 when used in pbuilder update and pbuilder create
102
103
104 --buildplace [location of build]
105 Specifies the location where building and base.tgz updating and
106 creation takes place. This is a temporary work directory.
107
108 A subdirectory of that directory using the current PID of the
109 process is used.
110
111
112 --buildresult [location to put build result]
113 Specifies the location the build result gets into after build‐
114 ing. The deb files and other files that have resulted from
115 build is copied there. Note that the default value is not the
116 current directory, or .. but another place,
117 /var/cache/pbuilder/result This is to avoid overwriting already
118 existing deb files with the newly generated ones.
119
120
121 --mirror [mirror location]
122 Specifies the URL of Debian mirror to be specified in
123 sources.list inside the chroot. This option is only valid when
124 distribution is being specified, for update and build targets.
125 The format is something like: http://http.us.debian.org/debian
126 which should point to your favourite mirror.
127
128 This option can optionally be omitted, and left blank, in which
129 case, this part is skipped.
130
131 Note that these URLs specified to pbuilder will be used from
132 within the chroot, and specifying file:/somewhere/ will most
133 probably fail.
134
135
136 --othermirror [deb http://xxx/xxx/ ./ | other deb lines... ]
137 The lines which is added to the sources.list, delimited with |
138 Like deb http://local/mirror stable main|deb
139 file:/usr/local/mirror ./
140
141 The deb lines here are the ones that will appear at the top of
142 the sources.list inside the chroot. Be sure to follow the syn‐
143 tax rules of sources.list(5). These lines appear at the begin‐
144 ning of the constructed sources file, so this is the place to
145 list your local mirror sites; apt will then use them in prefer‐
146 ence to the ones listed in --mirror .
147
148
149 --distribution [distribution]
150 Specifies the distribution used. The supported values are the
151 ones debootstrap supports, plus experimental which is special
152 cased in pbuilder. For instance you may use: sid or experimen‐
153 tal .
154
155
156 --architecture [architecture]
157 Specifies the build architecture (as described in dpkg-architec‐
158 ture(1)). It'll be the architecture used when creating the
159 chroot, defaults to the system one. The supported values are
160 the ones debootstrap supports.
161
162
163 --host-arch [architecture]
164 Specifies the host architecture (as described in dpkg-architec‐
165 ture(1)). Defaults to the build architecture. Use this flag if
166 you are interested in doing a cross architecture build.
167 pbuilder will make sure the environment is correctly set up,
168 including adding nocheck to DEB_BUILD_OPTIONS and DEB_BUILD_PRO‐
169 FILES.
170
171
172 --no-auto-cross
173 Suppress automatic addition of nocheck to DEB_BUILD_OPTIONS and
174 DEB_BUILD_PROFILES in case of cross-building. All the other
175 configuration (adding the architecture to dpkg, updating the apt
176 cache, installing the cross toolchain, passing --host-arch to
177 dpkg-buildpackage, etc) is done nonetheless; specify this flag
178 twice to prevent that from happening too.
179
180
181 --components [components]
182 Specifies the default distribution components to use. eg. "main
183 contrib non-free". Default is "main".
184
185
186 --override-config
187 Specify to use different apt set up inside the chroot than it
188 was used for creating the base.tgz. Specify this when you want
189 to do pbuilder update with a different distribution target set
190 up.
191
192 --distribution , --components , --mirror , --othermirror options
193 are only valid when --override-config option is specified in
194 update target, or when pbuilder create is being called.
195
196
197 --http-proxy [proxy]
198 Specifies the http proxy URL. Something like
199 http://xxx.xxx.xxx.xxx:8080/ should do.
200
201
202 --use-network [yes|no]
203 Specify yes when you do not want to disable network access dur‐
204 ing build. Network is not available on a Debian buildd, so you
205 might want to keep the default of no. Disabling network access
206 currently only works on Linux.
207
208
209 --aptcache [location of retrieved package files]
210 Specifies the location where the packages downloaded by apt
211 should be cached. Use --aptcache "" if you want caching to be
212 turned off.
213
214
215 --debdelta
216 This option is used in the update target, and enable the use of
217 debdelta (if it is already installed, otherwise will be
218 installed the first time this option is used).
219
220
221 --configfile [configuration file to load]
222 Additional configuration file to read after all other configura‐
223 tion files have been read.
224
225
226
227 --hookdir [location of user scripts]
228 Specifies the location where scripts for user intervention dur‐
229 ing the create and update process are stored. Scripts are exe‐
230 cuted inside the chroot. The script names must be in the form
231 X<digit><digit><whatever-else-you-want> much like boot scripts.
232 The scripts must be executable and may be either binaries or
233 interpreted scripts. If it is a script in other than Bourne
234 Shell or Perl, it is up to the user to ensure the interpreter
235 was previously installed in the chrooted environment. Files end‐
236 ing in ~ or .bak are ignored.
237
238 Although it may not seem necessary, pbuilder --update does not
239 invoke the hooks if --hookdir is empty, so if you want to avoid
240 running hooks, run pbuilder with --hookdir ""
241
242 If there is a distribution hook, for example, if there was a
243 file sid inside the hook directory, and the script was creating
244 the chroot for sid distribution, pbuilder will call debootstrap
245 with that as the 4th parameter in the chroot creation process.
246 This allows for use of custom debootstrap hook script.
247
248 A<digit><digit><whatever-else-you-want> is for build target. It
249 is executed before build starts; after unpacking the build sys‐
250 tem, and unpacking the source, and satisfying the build-depen‐
251 dency.
252
253 B<digit><digit><whatever-else-you-want> is executed after build
254 system finishes building, successfully, before copying back the
255 build result.
256
257 C<digit><digit><whatever-else-you-want> is executed after build
258 failure, before cleanup.
259
260 D<digit><digit><whatever-else-you-want> is executed before
261 unpacking the source inside the chroot, after setting up the
262 chroot environment. Create $TMP, and $TMPDIR if necessary.
263
264 This is called before build-dependency is satisfied. Also use‐
265 ful for calling apt-get update
266
267 E<digit><digit><whatever-else-you-want> is executed after
268 pbuilder update
269 and pbuilder create finishes apt-get work with the chroot,
270 before umounting kernel file systems (/proc) and creating the
271 tarball from the chroot.
272
273 F<digit><digit><whatever-else-you-want> is executed just before
274 user logs in, or program starts executing, after chroot is cre‐
275 ated in login or execute target.
276
277 G<digit><digit><whatever-else-you-want> is executed just after
278 debootstrap finishes, and configuration is loaded, and pbuilder
279 starts mounting /proc and invoking apt-get install in create
280 target.
281
282 H<digit><digit><whatever-else-you-want> is executed just after
283 unpacking the chroot, mounting proc and any bind mount specified
284 in BINDMOUNTS. It's executed for every target that requires the
285 unpacked chroot. It's useful if you want to dynamically change
286 the chroot guts before anything starts using it.
287
288 I<digit><digit><whatever-else-you-want> is executed after build
289 system finishes building, successfully, after copying back the
290 build results.
291
292 In your hook the following environment variables are available:
293 PBUILDER_OPERATION a string indicating which of the pbuilder
294 command has been called. Possible values are build, clean,
295 create, debuild, dumpconfig, execute, login, update.
296 BUILDDIR the place where the build happens, the sources are
297 inside a directory named <package>-<version>.
298 DISTRIBUTION the name of the used distribution, as provided by
299 the DISTRIBUTION config value, or the --distribution command
300 line flag.
301 BUILD_ARCH contains the build architecture, the architecture
302 the package is building on.
303 HOST_ARCH contains the host architecture, the architecture the
304 package is building for.
305
306
307
308 --debbuildopts [options]
309
310 List of options that are passed on to dpkg-buildpackage. Multi‐
311 ple flags are additive and are appended to the value of DEBBUIL‐
312 DOPTS as specified in pbuilderrc. To clear the list of options,
313 pass the empty string, e.g. --debbuildopts "".
314
315 Multiple options are delimited with spaces, like --debbuildopts
316 "-j100 -E"
317
318
319 --profiles [profile1[,profile2]]
320 Comma-separated list of build profiles to use during the build.
321 It overrides a possible DEB_BUILD_PROFILES environment variable
322 already defined.
323
324
325 --logfile [file to log]
326 Specifies the logfile to create. The messages generated during
327 execution will be written to the specified file, and the stan‐
328 dard output.
329
330
331 --loglevel I
332 Specify how much output you want from pbuilder, valid values are
333 E (errors only), W (errors and warnings), I (errors, warnings
334 and informational) and D (everything including some debug mes‐
335 sages).
336
337
338 --binary-arch
339
340 Specify to build only architecture specific targets instead of
341 all targets. This instructs pbuilder to respect only Build-
342 Depends, Build-Depends-Arch, Build-Conflicts, Build-Conflicts-
343 Arch source relationships, and calls dpkg-buildpackage with -B.
344
345 Setting --debbuildopts after this option will re-set some parts
346 of the effects.
347
348 Use this option rather than using --debbuildopts -B.
349
350
351 --binary-indep
352
353 Specify to build only architecture independent targets instead
354 of all targets. This instructs pbuilder to respect only Build-
355 Depends, Build-Depends-Indep, Build-Conflicts, Build-Conflicts-
356 Indep source relationships, and calls dpkg-buildpackage with -A.
357
358 Setting --debbuildopts after this option will re-set some parts
359 of the effect.
360
361 Use this option rather than using --debbuildopts -A.
362
363
364 --source-only-changes, --no-source-only-changes
365 Specify whether or not to generate an additional .changes file
366 for a source-only upload, whilst still producing a full .changes
367 file for any binary packages built.
368
369
370 --bin-nmu [changelog message]
371 Specify to build a binary-NMU instead of a standard package.
372 This option takes the changelog message to pass to the binary-
373 NMU package as parameter.
374
375
376 --bin-nmu-maintainer [maintainer]
377 Specify the maintainer name and email address to be displayed in
378 the changes file. If no maintainer is provided, it defaults to
379 the last uploader.
380
381
382 --bin-nmu-version [version number]
383 Specify the number to append to the version in the binary-NMU
384 package. If no number is provided, it defaults to 1.
385
386
387 --bin-nmu-timestamp [timestamp]
388 Specify the timestamp to use in the generated chagnelog entry.
389 If no timestamp is provided, it defaults to current time. If
390 you want to specify the time as a number of seconds since
391 1970-01-01 00:00:00 UTC, prepend an at sign (@) like
392 @1478786376.
393
394
395 --bindmounts bind-mount-points
396 Bind-mount the specified directories to inside the chroot.
397 bind-mount-points is a space-delimited list of directories to
398 bind-mount which should be specified in a space-delimited man‐
399 ner, surrounded in double quotations, like: "/srv /somedir
400 /someotherdir"
401
402
403 --debootstrapopts --variant=buildd --keyring
404 /usr/share/keyrings/debian-archive-keyring.gpg
405 Add extra command-line options to debootstrap.
406
407 Specify multiple options through multiple instance of this
408 option, for example:
409
410 --debootstrapopts --arch=arm --debootstrapopts --variant=buildd
411
412
413 --debootstrap debootstrap
414 Use specified debootstrap implementation as debootstrap. Known
415 implementations are cdebootstrap and debootstrap and default is
416 to use debootstrap.
417
418
419 --allow-untrusted
420 Allow untrusted (no key installed) and unsigned repositories.
421 Warning: Enabling this option may allow remote attackers to com‐
422 promise the system. Better use signed repositories and
423 --keyring to add the key(s).
424
425
426 --keyring path/to/keyring
427 Additional keyrings to use for package verification with apt,
428 not used for debootstrap (use --debootstrapopts). Use this to
429 add (local) signed repositories. By default the debian-archive-
430 keyring package inside the chroot is used. Can be specified mul‐
431 tiple times.
432
433 Keyrings are copied into /etc/apt/trusted.gpg.d in the chroot.
434 APT supports it since version 0.7.25.1, firstly available in the
435 Debian release codenamed "squeeze" (released on 2011). For
436 older chroots, use a G hook to run apt-key manually.
437
438
439 --save-after-login
440
441 --save-after-exec
442 Save the chroot image after exiting from the chroot instead of
443 deleting changes. Effective for login and execute session.
444
445
446 --autocleanaptcache
447 Clean apt cache automatically, to run apt-get autoclean to only
448 keep the packages which are required for the version of Debian.
449 This is useful when you keep a aptcache directory for each dis‐
450 tribution and want to keep the size of the aptcache down.
451
452
453 --help
454
455 Show a brief help message.
456
457
459 Some options are more involved to pbuilder internal than others. The
460 following options are available.
461
462
463 --removepackages [packages to remove]
464 Removes the packages on creating the base.tgz. Use this option
465 to remove potentially dangerous or undesirable packages, like
466 lilo which nobody will need to have inside a chroot.
467
468 Packages should be specified in a space-delimited manner, sur‐
469 rounded in double quotations, like "lilo gcc mawk"
470
471
472 --extrapackages [packages to add]
473 Adds packages specified as an addition to the default, which is
474 build-essential by default. This is used in build and create
475 (after successfully creating the initial chroot) and update.
476
477 The packages should be specified as a space-delimited list, or
478 by specifying --extrapackages multiple times.
479
480
481 --debemail [maintainer-name <email-address>]
482
483 Specifies that dpkg-buildpackage be called with -mmaintainer-
484 name <email-address> instead of default value specified in the
485 environment variable, or pbuilderrc
486
487 This option is almost obsolete, use --debbuildopts instead
488
489
490 --pkgname-logfile
491 Alternative option to --logfile option. Automatically creates a
492 logfile that is named by the .dsc file name, only really appli‐
493 cable for build target.
494
495 The file extension is specified by PKGNAME_LOGFILE_EXTENSION in
496 pbuilderrc
497
498
499 --aptconfdir [APT configuration directory to use]
500 Uses the apt configuration file found in the specified directory
501 as the chroot configuration. /etc/apt is one example, so that
502 the same configuration can be used inside the chroot.
503
504 This option overrides other options, and may cause some incon‐
505 sistency problems.
506
507
508 --timeout [timeout in sleep time]
509 Time out building after sleeping set time. Specify something
510 like --timeout 10h in the command line. Default is no timeout.
511
512
513 --no-targz
514 Not using base.tgz for operation. The --buildplace will not be
515 deleted and reconstructed from a .tar.gz file. Also, pbuilder
516 will not add its process ID to the --buildplace as it usually
517 would.
518
519 Useful when experimenting with chroots, or trying to create
520 chroots outside control of pbuilder.
521
522
523 --compressprog
524 Program to use for compression of the base.tgz. The default is
525 to use gzip, and any program that can be used to compress data
526 using a pipe can be used.
527
528 If set to "pigz", compression and decompression is gzip compati‐
529 ble but will use all available CPUs.
530 If set to "cat", there will be no compression at all (so com‐
531 pression/decompression will be a lot faster but takes much more
532 space on the disk).
533
534 --twice
535 Build the package twice in a row. Useful to ensure the package
536 cleans up properly. The resulting packages are the ones from
537 the second build.
538
539
540 --preserve-buildplace
541 Do not clean the --buildplace if it has the same contents as the
542 .tar.gz file, and no modifications are done.
543
544 For preserving the build place for create and update targets,
545 see debug option.
546
547 As with --no-targz, suppresses appending pbuilder's process ID
548 to the --buildplace.
549
550 This is useful if you want to attempt to build a large number of
551 packages successively, but you expect that many of them cannot
552 have their build dependencies satisfied.
553
554 It will clean up the build place on failure, or after a success‐
555 ful build.
556
557
558 --debug
559
560 Turn on Debug mode of pbuilder, to be verbose about errors, and
561 try to avoid cleanup processing when error happens in update and
562 create targets.
563
564
565 --inputfile filename
566
567 Add extra file to be copied to BUILDDIR inside the build envi‐
568 ronment.
569
570 available in build and login and execute targets.
571
572
574 /etc/pbuilderrc
575 The system-wide configuration file for pbuilder.
576
577
578 /usr/share/pbuilder/pbuilderrc
579 The default settings for pbuilder, used as fallback for all val‐
580 ues that is not specified in /etc/pbuilderrc.
581
582
583 ${HOME}/.pbuilderrc
584 The personal configuration file for pbuilder, which overrides
585 settings set in other configuration files.
586
587 Note that ${HOME} is usually /root (if you are running pbuilder
588 through sudo).
589
590
592 pbuilder create
593
594 # pbuilder create
595 Distribution is sid.
596 Building the build environment
597 -> running debootstrap
598 /usr/sbin/debootstrap
599 I: Retrieving Release
600 I: Retrieving Packages
601 I: Validating Packages
602 .
603 .
604
605
606 pbuilder update
607
608 # pbuilder update
609 W: /home/dancer/.pbuilderrc does not exist
610 Building the build Environment
611 -> extracting base tarball [/var/cache/pbuilder/base.tgz]
612 .
613 .
614
615
616 pbuilder build
617
618 # pbuilder build dsh_*.dsc
619 I: using fakeroot in build.
620 Current time: Sat Jan 20 12:03:34 JST 2007
621 pbuilder-time-stamp: 1169262214
622 Building the build Environment
623 -> extracting base tarball [/home/dancer/DEBIAN/pbuilder/pbuilder/testsuite/tmp.FeeAX18779/testimage]
624 -> creating local configuration
625 .
626 .
627
628
630 This program is starting to have too many options already.
631
632
634 Initial coding, and main maintenance is done by Junichi Uekawa
635 <dancer@debian.org>. User hooks code added by Dale Amon <amon@vnl.com>
636
637 The homepage is available at https://pbuilder.alioth.debian.org
638
639
640
642 /usr/share/doc/pbuilder/pbuilder-doc.html, pdebuild(1), pbuilderrc(5)
643
644
645
646
647
648
649Debian 2016 March pbuilder(8)