Welcome to mirror list, hosted at ThFree Co, Russian Federation.

poudriere.8 « bin « src - github.com/freebsd/poudriere.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 444c2f18f91c3c87febd5c1b1dd7e9a0d393e71e (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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
.\" Copyright (c) 2012 Baptiste Daroussin <bapt@FreeBSD.org>
.\" Copyright (c) 2012-2014 Bryan Drewery <bdrewery@FreeBSD.org>
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\"    notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\"    notice, this list of conditions and the following disclaimer in the
.\"    documentation and/or other materials provided with the distribution.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
.\" $FreeBSD$
.\"
.\" Note: The date here should be updated whenever a non-trivial
.\" change is made to the manual page.
.Dd March 11, 2017
.Dt POUDRIERE 8
.Os
.Sh NAME
.Nm poudriere
.Nd bulk package builder and port tester
.Sh SYNOPSIS
.Nm
.Cm command
.Cm subcommand
.Op Ar options
.Sh DESCRIPTION
The
.Nm
tool is used to build packages from the ports tree.
It can also be used to test a single port.
.Sh GLOBAL OPTIONS
.Nm
accepts a global option:
.Bl -tag -width "-f conffile"
.It Fl e Ar etcdir
Path to the directory where poudriere will find its configuration data.
See 
.Sx FILES
and
.Sx ENVIRONMENT
for more information.
.It Fl N
Disable color support.
.It Fl v
This will show more information during the build.
Specify twice to enable debug output.
.El
.Sh COMMANDS
The first argument to
.Nm
must be a
.Cm command
from the following list:
.Bl -tag -width "-f conffile"
.It bulk
This command makes a ready-to-export package tree, and fills it with
binary packages built from a given list of ports.
During the build, hit ^T to send
.Dv SIGINFO
and get stats and progress back.
.It jail
This command allows you to manage the jails used by
.Nm
which are building environments differing by OS version and architecture.
.It ports
This command allows you to manage different portstrees which will be used
by
.Nm
(create, update and delete portstrees).
.It testport
This command, mainly targeted at ports developers, launches a
test on a given port (useful before submitting/committing a port).
.It options
This command allows to configure the options for a given port
.It distclean
This command will cleanup old distfiles
.It pkgclean
This command will cleanup old and unwanted packages
.It queue
This command allows a non-root user to queue
.Nm
commands.
It is currently
.Sy EXPERIMENTAL .
Using it requires starting
.Sy poudriered
via the provided rc script.
.It status
This command shows status of current and previous builds
.It version
Show version of poudriere.
.Nm.
.El
.Sh SUBCOMMANDS
Here are the list of subcommands and associated options supported by
.Nm ,
sorted by
.Cm command
order.
.Ss bulk
.Pp
These subcommands are mutually exclusive.
.Bl -tag -width "-f conffile"
.It Fl a
Build all ports in the tree.
.It Fl f Ar file
Absolute path to a file which contains the list of ports to build.
Ports must be specified in the form
.Ar category/port
and shell-style comments are allowed.
Multiple
.Fl f Ar file
arguments may be specified at once.
.It cat/port cat/port2 ...
A list of ports can be specified directly.
.El
.Pp
See
.Sx CUSTOMISATION
to know how to build binary packages with options that differs from
defaults.
.Pp
Here are the options associated with the
.Cm bulk
command.
.Bl -tag -width "-f conffile"
.It Fl B Ar name
Specify which buildname to use.
By default 
.Ar YYYY-MM-DD_HH:MM:SS
will be used.
This can be used to resume a previous build and use the same log and URL paths.
Resuming a build will not retry built/failed/skipped/ignored packages.
.It Fl c
Clean
.Em all
previously built packages and logs.
.It Fl C
Clean only the packages specified on the command line or in in the file given in
.Fl f Ar file
.
.It Fl F
Only fetch from original MASTER_SITES.
Skip FreeBSD mirrors.
.It Fl j Ar name
Run the bulk build on the jail named
.Ar name .
.It Fl J Ar number[:number]
This argument specifies how many
.Ar number
jobs will run in parallel for a bulk build.
The optional second
.Ar number
is the number of jobs used for the steps before the build, they are more IO
bound than CPU bound, so you may want to use a different number.
The default pre-build value is 1.25 times the value of the build value.
.It Fl i
Interactive mode.
Enter jail for interactive testing and automatically cleanup when done.
A local
.Xr pkg.conf 5
repository configuration will be installed to
.Pa LOCALBASE/etc/pkg/repos/local.conf
so that
.Xr pkg 8
can be used with any existing packages built for the jail.
The FreeBSD repository will be disabled by default.
.It Fl I
Advanced Interactive mode.
Leaves jail running with ports installed after test.
When done with the jail you will need to manually shut it down:
.Dl "poudriere jail -k -j JAILNAME" .
As with
.Fl i
this will install a
.Xr pkg.conf 5
file for
.Xr pkg 8
usage.
.It Fl n
Dry run. Show what would be done, but do not actually build or delete any
packages.
.It Fl N
Do not build package repository or INDEX when build is completed.
.It Fl p Ar tree
This flag specifies on which ports
.Ar tree
the bulk build will be done.
.It Fl R
Clean RESTRICTED packages after building.
.It Fl s
Skip incremental rebuild and sanity checks.
Sanity tests are made to check if the ports exists,
does not have an increased version number, packaged dependencies match,
pkgname matches, if the compiled options match the current options from the
.Pa make.conf
files and
.Pa /usr/local/etc/poudriere.d/options ,
and that its own dependencies did not require rebuild as well.
.It Fl S
Don't recursively rebuild packages affected by other packages requiring
incremental rebuild.
This is a subset of
.Fl s .
This may result in broken packages if the ones they depend on are updated
and are not ABI-compatible.
.It Fl t
Add some testing to the specified ports.
Add
.Fl r
to recursively test all port dependencies as well.
Currently uninstalls the port, and disable parallel
jobs for make.
When used with
.Fl a
then
.Fl rk
are implied.
.It Fl r
Recursively test all dependencies as well.
This flag is automatically set when using
.Fl at .
.It Fl k
When using
.Fl t
do not consider failures as fatal.
Do not skip dependent ports on findings.
This flag is automatically set when using
.Fl at .
.It Fl T
Try building BROKEN ports by defining TRYBROKEN for the build.
.It Fl w
Save WRKDIR on build failure.
The WRKDIR will be tarred up into
.Sy ${POUDRIERE_DATA}/wrkdirs .
.It Fl v
This will show more information during the build.
Specify twice to enable debug output.
.It Fl z Ar set
This specifies which SET to use for the build.
See
.Sx CUSTOMISATION
for examples of how this is used.
.El
.Ss jail
.Pp
These subcommands are mutually exclusive.
.Bl -tag -width "-f conffile"
.It Fl c
Creates a jail.
.It Fl d
Deletes a jail.
.It Fl i
Show information about a jail.
See also
.Cm status .
.It Fl l
List all poudriere jails.
.It Fl n
When combined with
.Fl l ,
only display jail name.
.It Fl s
Starts a jail.
.It Fl k
Kills a jail (stops it).
.It Fl r Ar name
Rename a jail to
.Ar name .
.It Fl u
Update a jail.
.El
.Pp
Except for
.Fl l ,
all of the subcommands require the
.Fl j
option (see below).
.Pp
Here are the options associated with the
.Cm jail
command.
.Bl -tag -width "-f conffile"
.It Fl b
Build the source provided with the -m src=PATH option.
.It Fl J Ar number
The
.Ar number
of make jobs will run in parallel for buildworld.
Defaults to the number of CPUs reported by:  sysctl hw.ncpu.
.It Fl q
Remove the header when
.Fl l
is the specified mandatory option.
Otherwise, it has no effect.
.It Fl j Ar name
Specifies the
.Ar name
of the jail.
.It Fl v Ar version
Specifies which
.Ar version
of FreeBSD to use in the jail.
If you are using method ftp then the
.Ar version
should in the form of: 9.0-RELEASE.
If you are using method of svn then the
.Ar version
should be in the form of git or svn branches: stable/9 or head for CURRENT.
Other methods only use the value for display.
.It Fl a Ar architecture
Specifies which
.Ar architecture
of FreeBSD to use in the jail. (Default: same as host)
.It Fl m Ar method
Specifies which
.Ar method
to use to create the jail.
(default:
.Sy http )
.Pp
Pre-built distribution options:
.Bl -tag -width "ftp-archiveXX"
.It Sy allbsd
Use
.Lk www.allbsd.org.
.It Sy ftp Sy http
Fetch from configured
.Sy FREEBSD_HOST
variable from
.Pa poudriere.conf .
.It Sy ftp-archive
Fetch from
.Lk ftp-archive.freebsd.org.
.It Sy null
This option can be used to import an existing directory that already contains an installed system.
The path must be specified with
.Fl M Ar path .
It is expected that this directory be installed to with the following:
.Bd -literal -offset indent
/usr/src# make installworld DESTDIR=PATH DB_FROM_SRC=1
/usr/src# make distrib-dirs DESTDIR=PATH DB_FROM_SRC=1
/usr/src# make distribution DESTDIR=PATH DB_FROM_SRC=1
.Ed
.Pp
The path will be null-mounted during builds.
It will not be copied at the time of running
.Nm jail .
Deleting the jail will attempt to revert any files changed by poudriere.
.It Sy src=PATH
Install from the given src directory at
.Sy PATH .
This directory will not be built from.
It is expected that it is already built and maps to a corresponding
.Pa /usr/obj
directory.
.It Sy tar=PATH
Install from the tarball at the given
.Sy PATH .
Note that this method requires the tarball contains the
.Pa /usr/src
files as well if you plan to build any port containing modules.
.It Sy url=PATH
Fetch from given
.Sy PATH .
Any URL supported by
.Xr fetch 1
can be used.
For example:
.Dl "url=file:///mirror/10.0"
.El
.Pp
Build from source options:
.Bl -tag -width "ftp-archiveXX"
.It Sy git Sy git+http Sy git+https Sy git+ssh
Will use git, the -v flag to set the branch name and the
.Sy GIT_BASEURL
variable in
.Pa poudriere.conf .
.It Sy src=PATH
With the
.Fl b
flag, the src tree will be copied into the jail and built.
.It Sy svn Sy svn+file Sy svn+http Sy svn+https
Will use SVN and the
.Sy SVN_HOST
variable in
.Pa poudriere.conf .
.El
.It Fl f Ar filesystem
Specifies the
.Ar filesystem
name (${ZPOOL}/jails/filesystem).
.It Fl K Ar kernelname
Install the jail with a kernel.
If the
.Ar kernelname
is an empty string GENERIC will be used.
If installing from ftp then the default kernel will be installed what ever the
.Ar kernelname
value is.
.It Fl M Ar mountpoint
Gives an alternative
.Ar mountpoint
when creating jail.
.It Fl p Ar name
This specifies which port tree to start/stop the jail with.
.It Fl P Ar patch
Apply the specified
.Ar patch
to the source tree before building the jail.
.It Fl S Ar srcpath
Use the specified
.Ar srcpath
as the FreeBSD source tree mounted inside the jail.
.It Fl t Ar version
instead of upgrading to the latest security fix of the jail version, you can
jump to the new specified
.Ar version .
.It Fl z Ar set
This specifies which SET to start/stop the jail with.
.It Fl x
Build the native-xbuild target and copy this into the jail.
Used exclusively
for cross building a ports set, typically via qemu-user tools.
.El
.Ss ports
.Pp
These subcommands are mutually exclusive.
.Bl -tag -width "-f conffile"
.It Fl c
Creates a ports tree.
.It Fl d
Deletes a ports tree.
.It Fl l
List all available ports trees.
.It Fl u
Update a ports tree.
.El
.Pp
Except for
.Fl l ,
all of the subcommands require the
.Fl p
switch (see below).
.Pp
Here are the options associated with the
.Cm ports
command.
.Bl -tag -width "-f conffile"
.It Fl B Ar branch
Specifies which
.Ar branch
to checkout when using the
.Sy svn
or
.Sy git
methods.
(Default: head/master)
.It Fl F
When used with
.Fl c ,
only create the needed file systems (for ZFS) and directories, but do
not populate them.
.It Fl M Ar mountpoint
Path to the source of a ports tree.
.It Fl f Ar filesystem
The name of the
.Ar filesystem
to create for the ports tree.
If 'none' then do not create a filesystem.
Defaults to poudriere/ports/default.
.It Fl k
When used with
.Fl d ,
only unregister the ports tree without removing the files.
.It Fl m Ar method
When used with
.Fl c ,
specify which
.Ar method
to use to create the ports tree.
Could be portsnap, git, none, svn{,+http,+https,+file,+ssh}.
The default is portsnap.
.It Fl n
When combined with
.Fl l ,
only display the name of the ports tree.
.It Fl p Ar name
Specifies the
.Ar name
of the ports tree to use.
.It Fl q
When used with
.Fl l ,
remove the header in the list view.
.It Fl v
Show more verbose output.
.El
.Ss testport
.Pp
The specified port will be tested for build and packaging problems.
All missing dependencies will first be built in parallel.
.Ev TRYBROKEN=yes
is automatically defined in the environment to test ports marked as
.Ev BROKEN .
.Pp
.Bl -tag -width "-f conffile"
.It Fl Oo o Oc Ar origin
Specifies an origin in the ports tree
.El
.Pp
Here are the options associated with the
.Cm testport
command.
.Bl -tag -width "-f conffile"
.It Fl c
Run make config for the given port.
.It Fl i
Interactive mode.
Enter jail for interactive testing and automatically cleanup when done.
A local
.Xr pkg.conf 5
repository configuration will be installed to
.Pa LOCALBASE/etc/pkg/repos/local.conf
so that
.Xr pkg 8
can be used with any existing packages built for the jail.
The FreeBSD repository will be disabled by default.
.It Fl I
Advanced Interactive mode.
Leaves jail running with port installed after test.
When done with the jail you will need to manually shut it down:
.Dl "poudriere jail -k -j JAILNAME" .
As with
.Fl i
this will install a
.Xr pkg.conf 5
file for
.Xr pkg 8
usage.
.It Fl j Ar name
Runs only inside the jail named
.Ar name .
.It Fl J Ar number[:number]
This argument specifies how many
.Ar number
jobs will run in parallel for building the dependencies.
The optional second
.Ar number
is the number of jobs used for the steps before the build, they are more IO
bound than CPU bound, so you may want to use a different number.
The default pre-build value is 1.25 times the value of the build value.
.It Fl k
Do not consider failures as fatal.
Find all failures.
.It Fl P
Use custom prefix.
.It Fl N
Do not build package repository or INDEX when build of dependencies is completed.
.It Fl p Ar tree
Specifies which ports
.Ar tree
to use.
.It Fl s
Skip incremental rebuild and sanity checks.
Sanity tests are made to check if the ports exists,
does not have an increased version number, packaged dependencies match,
pkgname matches, if the compiled options match the current options from the
.Pa make.conf
files and
.Pa /usr/local/etc/poudriere.d/options ,
and that its own dependencies did not require rebuild as well.
.It Fl S
Don't recursively rebuild packages affected by other packages requiring
incremental rebuild.
This is a subset of
.Fl s .
This may result in broken packages if the ones they depend on are updated
and are not ABI-compatible.
.It Fl v
This will show more information during the build.
Specify twice to enable debug output.
.It Fl w
Save WRKDIR on build failure.
The WRKDIR will be tarred up into
.Sy ${POUDRIERE_DATA}/wrkdirs .
.It Fl z Ar set
This specifies which SET to use for the build.
See
.Sx CUSTOMISATION
for examples of how this is used.
.El
.Ss distclean
This command accepts the following options:
.Bl -tag -width "-f conffile"
.It Fl J Ar number
This argument specifies how many
.Ar number
jobs will run in parallel for gathering distfile information.
.It Fl n
Dry run, do not actually delete anything.
.It Fl p Ar tree
Specifies which ports
.Ar tree
to use.
This can be specified multiple times to consider multiple tress.
.It Fl y
Assume yes, do not confirm and just delete the files.
.It Fl v
This will show more information during the build.
Specify twice to enable debug output.
.El
.Pp
.Ss pkgclean
This command is used to delete all packages not specified to build.
.Pp
These subcommands are mutually exclusive.
.Bl -tag -width "-f conffile"
.It Fl a
Keep all ports in the tree.
.It Fl f Ar file
Absolute path to a file which contains the list of ports to keep.
Ports must be specified in the form
.Ar category/port
and shell-style comments are allowed.
Multiple
.Fl f Ar file
arguments may be specified at once.
.It cat/port cat/port2 ...
A list of ports can be specified directly.
.El
.Pp
Here are the options associated with the
.Cm pkgclean
command.
This command accepts the following options:
.Bl -tag -width "-f conffile"
.It Fl j Ar name
Jail to use for the packages to inspect.
.It Fl J Ar number
This argument specifies how many
.Ar number
jobs will run in parallel for gathering package information.
.It Fl n
Dry run, do not actually delete anything.
.It Fl N
Do not build package repository or INDEX when done cleaning.
.It Fl p Ar tree
Specifies which ports
.Ar tree
to use.
.It Fl R
Also clean restricted packages.
.It Fl y
Assume yes, do not confirm and just delete the files.
.It Fl v
This will show more information during the build.
Specify twice to enable debug output.
.It Fl z Ar set
SET to use for the packages to inspect.
.El
.Pp
.Ss options
This command accepts the following parameters:
.Bl -tag -width "-f conffile"
.It Fl f Ar file
Absolute path to a file which contains the list of ports to configure.
Ports must be specified in the form
.Ar category/port
and shell-style comments are allowed.
.It cat/port cat/port2 ...
A list of ports can be specified directly.
.El
.Pp
This command accepts the following options:
.Bl -tag -width "-f conffile"
.It Fl c
Use 'config' target, which will always show the dialog for the given ports.
.It Fl C
Use 'config-conditional' target, which will only bring up the dialog on new options for the given ports.
(This is the default)
.It Fl j Ar jailname
If given, configure the options only for the given jail.
.It Fl p Ar portstree
Run the configuration inside the given ports tree (by default uses default)
.It Fl n
Do not be recursive
.It Fl r
Remove port options instead of configuring them
.It Fl s
Show port options instead of configuring them
.It Fl z Ar set
This specifies which SET to use for the build.
See
.Sx CUSTOMISATION
for examples of how this is used.
.El
.Pp
The
.Cm options
subcommand can also take the list of ports to configure through command line
arguments instead of the using a file list.
.Ss queue
.Pp
This command takes a
.Nm
command in argument.
.Pp
There are no options associated with the
.Cm queue
command.
.Ss status
.Nm status
sorts by SETNAME, PORTSTREE, JAILNAME and then BUILDNAME.
.Pp
This command accepts the following options:
.Bl -tag -width "-f conffile"
.It Fl a
Show all builds, not just latest.
This implies
.Fl f .
.It Fl b
Show details about what each builder for the matched builds are doing.
.It Fl B Ar name
Specifies which buildname to match on.
This supports shell globbing.
Defaults to "latest".
Specifying this implies the
.Fl f
flag.
.It Fl c
Show a more compact output and do not include some columns.
.It Fl f
Show finished builds, not just currently running.
This is implied by the
.Fl a ,
.Fl B
and
.Fl r
flags.
.It Fl H
Do not print headers and separate fields by a single tab instead of arbitrary
white space.
.It Fl j Ar name
Specifies the
.Ar name
of the jail to filter by.
.It Fl l
Show logs instead of URL.
.It Fl p Ar tree
This flag specifies which ports
.Ar tree
to filter builds by.
.It Fl r
Show build results.
This implies the
.Fl f
flag.
.It Fl z Ar set
This specifies which SET to filter builds by.
Use
.Sy 0
to match on empty SET.
.El
.Pp
.Sh ENVIRONMENT
The
.Nm
command may use the following environment variable:
.Bl -tag -width "POUDRIERE_ETC"
.It Pa POUDRIERE_ETC
If specified, the path to poudriere's config directory.
Defaults to /usr/local/etc.
.El
.Sh FILES
.Bl -tag -width ".Pa POUDRIERE_ETC/poudriere.d/poudriere.conf" -compact
.It Pa POUDRIERE_ETC/poudriere.conf
See self-documented
.Ar /usr/local/etc/poudriere.conf.sample
for example.
.It Pa POUDRIERE_ETC/poudriere.d/poudriere.conf
The configuration can be stored in the poudriere.d directory as well.
.It Pa POUDRIERE_ETC/poudriere.d
This directory contains various configuration files for the different jails.
.El
.Sh EXIT STATUS
.Ex -std
.Sh EXAMPLES
.Ss bulk build of binary packages
This first example provides a guide on how to use
.Nm
for bulk build packages.
.Pp
.Bq Prepare infrastructure
.Pp
First you have to create a jail, which will hold all the building
infrastructure needs.
.Pp
.Dl "poudriere jail -c -v 8.2-RELEASE -a amd64 -j 82amd64"
.Pp
A jail will take approximately 3GB of space.
.Pp
Of course you can use another version of FreeBSD, regarless on what
version you are running.
amd64 users can choose i386 arch like in this
example:
.Pp
.Dl "poudriere jail -c -v 8.1-RELEASE -a i386 -j 81i386"
.Pp
This command will fetch and install a minimal jail, small (~400MB) so
you can create a lot of them.
It will install the jail under the pool
you have chosen, at poudriere/jailname.
.Pp
You also need to have at least one ports tree to build packages from it,
so let us take the default configuration by creating a ports tree.
.Pp
.Dl "poudriere ports -c"
.Pp
A ports tree will take approximately 4GB of space.
.Pp
.Bq Specify a list of ports you want to build
.Pp
Create a flat text file in which you put the ports you want to see
built by poudriere.
.Pp
.Dl "echo 'sysutils/screen' > ~/pkglist"
.Dl "echo 'editors/vim' >> ~/pkglist"
.Pp
Any line starting with the hash sign will be treated as a comment.
.Pp
.Bq Launch the bulk build
.Pp
Now you can launch the bulk build.
You can specify to build for only one
arch/version ; by default it will make the bulk build on all the jails
created by poudriere.
.Dl "poudriere bulk -f ~/pkglist -j 81i386"
.Pp
.Bq Find your packages
.Pp
Once the bulk build is over, you can meet your shiny new packages here:
.Pp
.Dl "/usr/local/poudriere/data/packages/81i386"
.Pp
with 81i386 as the name of the jail.
.Ss test a single port
This second example show how to use
.Nm
for a single port.
.Pp
Let's take the example of building a single port;
.Pp
.Dl "poudriere testport -o category/port -j myjail"
.Pp
all the tests will be done in myjail.
.Pp
It starts the jail, then mount the ports tree (nullfs), then mounts the
package dir (pourdriere/data/packages/<jailname>-<tree>-<setname>), then it mounts the
~/ports-cvs/mybeautifulporttotest (nullfs) it builds all the dependencies
(except runtime ones) and log it to
poudriere/data/logs/testport/jailname/default/mybeautifulporttotest.log).
.Pp
If packages for the dependencies already exists it will use them
.Pp
When all the dependencies are built, packages for them are created so
that next time it will be faster.
.Pp
All the dependency phase is done with PREFIX == LOCALBASE.
.Pp
After that it will build the port itself with LOCALBASE != PREFIX
and log the build to
poudriere/data/logs/testport/jailname/default/mybeautifulporttotest.log
.Pp
It will try to:
install it,
create a package from it,
deinstall it,
check for cruft left behind and
propose the line to add to pkg-plist if needed.
.Pp
It is very easy to extend it so that we can easily add other tests if
wanted.
.Sh CUSTOMISATION
For bulk building, you can customize binary packages produced by
.Nm
by changing build options port by port, and you can also specify
building directives in a make.conf file.
.Ss Custom build options
Before building a package,
.Nm
can mount a directory containing option files if available.
.Nm
will check for any of these directories in this order:
.Pp
.Dl /usr/local/etc/poudriere.d/<jailname>-<tree>-<setname>-options
.Dl /usr/local/etc/poudriere.d/<jailname>-<setname>-options
.Dl /usr/local/etc/poudriere.d/<jailname>-<tree>-options
.Dl /usr/local/etc/poudriere.d/<setname>-options
.Dl /usr/local/etc/poudriere.d/<tree>-options
.Dl /usr/local/etc/poudriere.d/<jailname>-options
.Dl /usr/local/etc/poudriere.d/options
.Pp
If a directory with this name exists, it is null-mounted into the
/var/db/ports/ directory of the jail, thus allowing to build package
with custom OPTIONS.
.Pp
The
.Cm options
subcommand can be used to easily configure options in the correct directory.
.Pp
This directory has the usual layout for options: it contains one directory per
port (the name of the port) containing an 'options' file with lines similar to:
.Pp
.Dl WITH_FOO=true
.Dl WITHOUT_BAR=true
.Pp
As a starter, you may want to copy an existing /var/db/ports/ to
/usr/local/etc/poudriere.d/options.
.Ss Blacklist ports
You can also specify a blacklist which will disallow the lists port origins
from building on the matched jail.
Any of the following are allowed and will all be used in the order shown:
.Pp
.Dl /usr/local/etc/poudriere.d/blacklist
.Dl /usr/local/etc/poudriere.d/<setname>-blacklist
.Dl /usr/local/etc/poudriere.d/<tree>-blacklist
.Dl /usr/local/etc/poudriere.d/<jailname>-blacklist
.Dl /usr/local/etc/poudriere.d/<jailname>-<tree>-blacklist
.Dl /usr/local/etc/poudriere.d/<jailname>-<setname>-blacklist
.Dl /usr/local/etc/poudriere.d/<jailname>-<tree>-<setname>-blacklist
.Pp
If QEMU is being used then a special qemu blacklist is also loaded.
.Dl /usr/local/etc/poudriere.d/qemu-blacklist
.Ss Create optional poudriere.conf
You can also specify an optional poudriere.conf that is pulled in
depending on the build.
Any of the following are allowed and will all be used in the order shown:
.Pp
.Dl /usr/local/etc/poudriere.d/poudriere.conf
.Dl /usr/local/etc/poudriere.d/<setname>-poudriere.conf
.Dl /usr/local/etc/poudriere.d/<tree>-poudriere.conf
.Dl /usr/local/etc/poudriere.d/<jailname>-poudriere.conf
.Dl /usr/local/etc/poudriere.d/<jailname>-<tree>-poudriere.conf
.Dl /usr/local/etc/poudriere.d/<jailname>-<setname>-poudriere.conf
.Dl /usr/local/etc/poudriere.d/<jailname>-<tree>-<setname>-poudriere.conf
.Ss Create optional make.conf
You can also specify a global make.conf which will be used for all the
jails.
Any of the following are allowed and will all be used in the order shown:
.Pp
.Dl /usr/local/etc/poudriere.d/make.conf
.Dl /usr/local/etc/poudriere.d/<setname>-make.conf
.Dl /usr/local/etc/poudriere.d/<tree>-make.conf
.Dl /usr/local/etc/poudriere.d/<jailname>-make.conf
.Dl /usr/local/etc/poudriere.d/<jailname>-<tree>-make.conf
.Dl /usr/local/etc/poudriere.d/<jailname>-<setname>-make.conf
.Dl /usr/local/etc/poudriere.d/<jailname>-<tree>-<setname>-make.conf
.Ss Create optional src.conf
You can also specify a global src.conf which will be used for building
jails with the
.Cm jail -c
subcommand.
Any of the following are allowed and will all be used in the order shown:
.Pp
.Dl /usr/local/etc/poudriere.d/src.conf
.Dl /usr/local/etc/poudriere.d/<setname>-src.conf
.Dl /usr/local/etc/poudriere.d/<jailname>-src.conf
.Sh CAVEATS
.Ss Jailname
.Fl j ,
.Fl z
and
.Fl p
are all used in the name of the jail.
.Pp
Be careful to respect the names supported by jail(8):
.Pp
.Bd -literal
    "This is an arbitrary string that identifies a jail (except it
     may not contain a '.')"
.Ed
.Pp
Be also careful to not begin the name of the jail by a number if you are
not in -stable or current:
.Pp
.Lk http://svn.freebsd.org/viewvc/base?view=revision&revision=209820
.Sh BUGS
In case of bugs, feel free to file a report:
.Pp
.Lk https://github.com/freebsd/poudriere/issues
.Sh AUTHORS
.An Baptiste Daroussin Aq bapt@FreeBSD.org
.An Bryan Drewery Aq bdrewery@FreeBSD.org