Introduction to using Poudriere supplied by Christopher J. Ruwe
<cjr@cruwe.de>. Edited version of supplied file. Reviewed by: bapt
This commit is contained in:
parent
3f358b5736
commit
bf2c7c969e
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=44016
1 changed files with 157 additions and 0 deletions
|
@ -1541,6 +1541,163 @@ The deinstallation will free 229 kB
|
|||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="ports-poudriere">
|
||||
<title>Building Packages with
|
||||
<application>Poudriere</application></title>
|
||||
|
||||
<para><application>Poudriere</application> uses &os; jails to set
|
||||
up isolated compilation environments. Inside, ports are
|
||||
compiled and packaged using standard &man.make.1; targets and
|
||||
&man.pkg.8;.</para>
|
||||
|
||||
<sect2 xml:id="poudriere-installation-and-configuration">
|
||||
<title>Installation and Configuration</title>
|
||||
|
||||
<para>Install <application>Poudriere</application> from the
|
||||
Ports Collection
|
||||
(<package role="port">ports-mgmt/poudriere</package>).</para>
|
||||
|
||||
<para>Configuration files are
|
||||
<filename>/usr/local/etc/poudriere.conf</filename> and
|
||||
<filename>/usr/local/etc/poudriere.d/</filename>. Example
|
||||
settings are shown in
|
||||
<filename>/usr/local/etc/poudriere.conf.sample</filename>.</para>
|
||||
|
||||
<para>Using <acronym>ZFS</acronym> is not required,
|
||||
but beneficial. When <acronym>ZFS</acronym> is used, the
|
||||
<varname>ZPOOL</varname> for
|
||||
<application>Poudriere</application>'s datasets must be
|
||||
specified. Set <varname>FREEBSD_HOST</varname> to a nearby
|
||||
mirror. Defaults for the other values are adequate. Defining
|
||||
<varname>CCACHE_DIR</varname> enables the use of
|
||||
<package role="port">devel/ccache</package> to cache
|
||||
compilation. This will reduce build times for
|
||||
frequently-compiled code. It is convenient to put
|
||||
<application>Poudriere</application> datasets in an isolated
|
||||
tree mounted at
|
||||
<filename class="directory">/poudriere</filename>. That is
|
||||
not a functional modification, but a matter of taste.</para>
|
||||
|
||||
<para>The number of processor cores detected is used to define
|
||||
how many builds should run in parallel. Supply enough virtual
|
||||
memory, either with <acronym>RAM</acronym> or swap space. If
|
||||
virtual memory runs out, compiling jails will stop and be torn
|
||||
down, resulting in weird error messages.</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 xml:id="poudriere-initialization">
|
||||
<title>Initialize Jails and Port Trees</title>
|
||||
|
||||
<para>Initially, it is sufficient to install a &os; tree and a
|
||||
ports tree. Creating a simple setup only requires supplying a
|
||||
name with <option>-j</option> and a version with
|
||||
<option>-v</option>. On systems running &os;/&arch.amd64;,
|
||||
the architecture can be set with <option>-a</option> to
|
||||
either <literal>i386</literal> or <literal>amd64</literal>.
|
||||
The default is the architecture shown by
|
||||
<command>uname</command>.</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>poudriere jail -c -j <replaceable>10amd64</replaceable> -v <replaceable>10.0-RELEASE</replaceable></userinput>
|
||||
====>> Creating 10amd64 fs... done
|
||||
====>> Fetching base.txz for FreeBSD 10.0-RELEASE amd64
|
||||
/poudriere/jails/10amd64/fromftp/base.txz 100% of 59 MB 1470 kBps 00m42s
|
||||
====>> Extracting base.txz... done
|
||||
====>> Fetching src.txz for FreeBSD 10.0-RELEASE amd64
|
||||
/poudriere/jails/10amd64/fromftp/src.txz 100% of 107 MB 1476 kBps 01m14s
|
||||
====>> Extracting src.txz... done
|
||||
====>> Fetching games.txz for FreeBSD 10.0-RELEASE amd64
|
||||
/poudriere/jails/10amd64/fromftp/games.txz 100% of 865 kB 734 kBps 00m01s
|
||||
====>> Extracting games.txz... done
|
||||
====>> Fetching lib32.txz for FreeBSD 10.0-RELEASE amd64
|
||||
/poudriere/jails/10amd64/fromftp/lib32.txz 100% of 14 MB 1316 kBps 00m12s
|
||||
====>> Extracting lib32.txz... done
|
||||
====>> Cleaning up... done
|
||||
====>> Jail 10amd64 10.0-RELEASE amd64 is ready to be used</screen>
|
||||
|
||||
<screen>&prompt.root; <userinput>poudriere ports -c -p <replaceable>local</replaceable></userinput>
|
||||
====>> Creating local fs... done
|
||||
====>> Extracting portstree "local"...
|
||||
Looking up portsnap.FreeBSD.org mirrors... 7 mirrors found.
|
||||
Fetching public key from ec2-eu-west-1.portsnap.freebsd.org... done.
|
||||
Fetching snapshot tag from ec2-eu-west-1.portsnap.freebsd.org... done.
|
||||
Fetching snapshot metadata... done.
|
||||
Fetching snapshot generated at Tue Feb 11 01:07:15 CET 2014:
|
||||
94a3431f0ce567f6452ffde4fd3d7d3c6e1da143efec76100% of 69 MB 1246 kBps 00m57s
|
||||
Extracting snapshot... done.
|
||||
Verifying snapshot integrity... done.
|
||||
Fetching snapshot tag from ec2-eu-west-1.portsnap.freebsd.org... done.
|
||||
Fetching snapshot metadata... done.
|
||||
Updating from Tue Feb 11 01:07:15 CET 2014 to Tue Feb 11 16:05:20 CET 2014.
|
||||
Fetching 4 metadata patches... done.
|
||||
Applying metadata patches... done.
|
||||
Fetching 0 metadata files... done.
|
||||
Fetching 48 patches.
|
||||
(48/48) 100.00% done.
|
||||
done.
|
||||
Applying patches...
|
||||
done.
|
||||
Fetching 1 new ports or files... done.
|
||||
/poudriere/ports/tester/CHANGES
|
||||
/poudriere/ports/tester/COPYRIGHT
|
||||
|
||||
[...]
|
||||
|
||||
Building new INDEX files... done.</screen>
|
||||
|
||||
<para>On a single computer, <application>Poudriere</application>
|
||||
can build ports with multiple configurations, in multiple
|
||||
jails, and from different port trees. Custom configurations
|
||||
for these combinations are called <emphasis>sets</emphasis>.
|
||||
See the CUSTOMIZATION section of &man.poudriere.8; for
|
||||
detail.</para>
|
||||
|
||||
<para>The basic configuration shown here puts a single jail-,
|
||||
port-, and set-specific <filename>make.conf</filename> in
|
||||
<filename
|
||||
class="directory">/usr/local/etc/poudriere.d</filename>.
|
||||
The filename in this example is created by combining the jail
|
||||
name, port name, and set name:
|
||||
<filename><replaceable>10amd64-local-workstation</replaceable>-make.conf</filename>.
|
||||
The system <filename>make.conf</filename> and this new file
|
||||
are combined at build time to create the
|
||||
<filename>make.conf</filename> used by the build jail.</para>
|
||||
|
||||
<para>Packages to be built are entered in
|
||||
<filename><replaceable>10amd64-local-workstation</replaceable>-pkglist</filename>:</para>
|
||||
|
||||
<programlisting>editors/emacs
|
||||
devel/git
|
||||
ports-mgmt/pkg
|
||||
...</programlisting>
|
||||
|
||||
<para>Options and dependencies for the specified ports are
|
||||
configured:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>poudriere options -j <replaceable>10amd64</replaceable> -p <replaceable>local</replaceable> -z <replaceable>workstation</replaceable> -f <replaceable>workstation-pkglist</replaceable></userinput></screen>
|
||||
|
||||
<para>Finally, packages are built and a &man.pkg.8; repository
|
||||
is created:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>poudriere bulk -j <replaceable>10amd64</replaceable> -p <replaceable>local</replaceable> -z <replaceable>workstation</replaceable> -f <replaceable>workstation-pkglist</replaceable></userinput></screen>
|
||||
|
||||
<para><keycombo
|
||||
action="simul"><keycap>Ctrl</keycap><keycap>t</keycap></keycombo>
|
||||
displays the current state.
|
||||
<application>Poudriere</application> also builds files in
|
||||
<filename>/poudriere/logs/bulk/<replaceable>jailname</replaceable></filename>
|
||||
that can be used with a web server to display build
|
||||
information.</para>
|
||||
|
||||
<para>Packages are now available for installation from the
|
||||
<application>Poudriere</application> repository.</para>
|
||||
|
||||
<para>For more information on
|
||||
<application>Poudriere</application>, see &man.poudriere.8;
|
||||
and the main web site, <link
|
||||
xlink:href="https://fossil.etoilebsd.net/poudriere/doc/trunk/doc/index.wiki"></link>.</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 xml:id="ports-nextsteps">
|
||||
<title>Post-Installation Considerations</title>
|
||||
|
||||
|
|
Loading…
Reference in a new issue