- Update with recent kris overhaul
This commit is contained in:
parent
ba676b9c02
commit
c9251f2c32
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=32568
1 changed files with 129 additions and 58 deletions
|
@ -121,45 +121,28 @@
|
|||
<para>Package builds are performed in a
|
||||
<literal>chroot</literal> populated by the
|
||||
<filename>portbuild</filename> script using the
|
||||
<filename><replaceable>${arch}</replaceable>/<replaceable>${branch}</replaceable>/tarballs/bindist.tar</filename>
|
||||
file. This tarball is created by the
|
||||
<command>mkbindist</command> script which reads the
|
||||
<filename><replaceable>${arch}</replaceable>/<replaceable>${branch}</replaceable>/mkbindist.conf</filename>
|
||||
file to decide how to create the tarball.</para>
|
||||
<filename><replaceable>${arch}</replaceable>/<replaceable>${branch}</replaceable>/builds/<replaceable>${buildid}</replaceable>/bindist.tar</filename>
|
||||
file.</para>
|
||||
|
||||
<para>The script should be run as <username>root</username>
|
||||
with the following command:</para>
|
||||
|
||||
<screen>/var/portbuild&prompt.root; <userinput>scripts/mkbindist <replaceable>${arch}</replaceable> <replaceable>${branch}</replaceable></userinput></screen>
|
||||
|
||||
<para>If <literal>ftp=1</literal> in
|
||||
<filename>mkbindist.conf</filename> then a pre-built release
|
||||
will be downloaded via FTP from the location specified by
|
||||
ftp://<replaceable>${ftpserver}</replaceable>/<replaceable>${ftpurl}</replaceable>/<replaceable>${rel}</replaceable>.
|
||||
If <literal>ftp=0</literal> and
|
||||
<literal>buildworld=1</literal> then
|
||||
<command>mkbindist</command> will call
|
||||
<command>makeworld</command> to build a new world
|
||||
[<literal>XXX</literal> This is currently broken].</para>
|
||||
|
||||
<para>If both <literal>ftp=0</literal> and
|
||||
<literal>buildworld=0</literal> then
|
||||
<command>mkbindist</command> will use the pre-existing
|
||||
contents of <replaceable>${worlddir}</replaceable> to
|
||||
create <filename>bindist.tar</filename>. In practice
|
||||
this means that you must have already installed a world
|
||||
in ${worlddir}, which is typically installed with the
|
||||
<command>makeworld</command> script:</para>
|
||||
|
||||
<screen>/var/portbuild&prompt.root; <userinput>scripts/makeworld <replaceable>${arch}</replaceable> <replaceable>${branch}</replaceable> [-nocvs]</userinput></screen>
|
||||
|
||||
<para>This command builds a world from the
|
||||
<para>The following command builds a world from the
|
||||
<filename><replaceable>${arch}</replaceable>/<replaceable>${branch}</replaceable>/src</filename>
|
||||
tree and installs it into
|
||||
<replaceable>${worlddir}</replaceable>. The tree will
|
||||
be updated first unless <literal>-nocvs</literal> is
|
||||
specified.</para>
|
||||
|
||||
<screen>/var/portbuild&prompt.root; <userinput>scripts/makeworld <replaceable>${arch}</replaceable> <replaceable>${branch}</replaceable> [-nocvs]</userinput></screen>
|
||||
|
||||
<para>The <filename>bindist.tar</filename> tarball is created from the
|
||||
previously installed world by the <command>mkbindist</command>
|
||||
script. It should be run as <username>root</username> with the following
|
||||
command:</para>
|
||||
|
||||
<screen>/var/portbuild&prompt.root; <userinput>scripts/mkbindist <replaceable>${arch}</replaceable> <replaceable>${branch}</replaceable> <replaceable>${buildid}</replaceable></userinput></screen>
|
||||
|
||||
<para>The per-machine tarballs are located in
|
||||
<filename><replaceable>${arch}</replaceable>/clients</filename>.</para>
|
||||
|
||||
<para>The <filename>bindist.tar</filename> file is extracted
|
||||
onto each client at client boot time, and at the start of
|
||||
each pass of the <command>dopackages</command>
|
||||
|
@ -170,6 +153,20 @@
|
|||
<sect1 id="starting">
|
||||
<title>Starting the Build</title>
|
||||
|
||||
<para>Several separate builds for each architecture - branch combination
|
||||
are supported. All data private to a build (ports tree, src tree,
|
||||
packages, distfiles, log files, bindist, Makefile, etc) are located under
|
||||
<filename><replaceable>${arch}</replaceable>/<replaceable>${branch}</replaceable>/builds/<replaceable>${buildid}</replaceable></filename>.
|
||||
The last created build can be alternatively referenced under buildid
|
||||
<literal>latest</literal>, the one before is called
|
||||
<literal>previous</literal>.</para>
|
||||
|
||||
<para>New builds are cloned from the <literal>latest</literal>, which is
|
||||
fast since it uses ZFS.</para>
|
||||
|
||||
<sect2 id="build-dopackages">
|
||||
<title><command>dopackages</command> scripts</title>
|
||||
|
||||
<para>The <filename>scripts/dopackages*</filename> scripts
|
||||
are used to perform the builds. Most useful are:</para>
|
||||
|
||||
|
@ -227,12 +224,20 @@
|
|||
following:</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>-keep</literal> - Do not delete this build in the
|
||||
future, when it would be normally deleted as part of the
|
||||
<literal>latest</literal> - <literal>previous</literal> cycle.
|
||||
Don't forget to clean it up manually when you no longer need it.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>-nofinish</literal> - Do not perform
|
||||
post-processing once the build is complete. Useful
|
||||
if you expect that the build will need to be restarted
|
||||
once it finishes. This option should always be used
|
||||
for normal build operations.
|
||||
once it finishes. If you use this option, don't forget to cleanup
|
||||
the clients when you don't need the build anymore.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -242,6 +247,13 @@
|
|||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>-nocleanup</literal> - By default, when the
|
||||
<literal>-finish</literal> stage of the build is complete, the build
|
||||
data will be deleted from the clients. This option will prevent
|
||||
that.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>-restart</literal> - Restart an interrupted
|
||||
(or non-<literal>finish</literal>ed) build from the
|
||||
|
@ -311,16 +323,30 @@
|
|||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>-nocvs</literal> - Do not
|
||||
<command>cvs update</command> the
|
||||
<literal>src</literal> tree during preprocessing.
|
||||
<para><literal>-nosrc</literal> - Do not update the
|
||||
<literal>src</literal> tree from the ZFS snapshot, keep the tree from
|
||||
previous build instead.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>-noportscvs</literal> - Do not
|
||||
<command>cvs update</command> the
|
||||
<literal>ports</literal> tree during preprocessing.
|
||||
<para><literal>-srccvs</literal> - Do not update the
|
||||
<literal>src</literal> tree from the ZFS snapshot, update it with
|
||||
<literal>cvs update</literal> instead.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>-noports</literal> - Do not update the
|
||||
<literal>ports</literal> tree from the ZFS snapshot, keep the tree from
|
||||
previous build instead.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>-portscvs</literal> - Do not update the
|
||||
<literal>ports</literal> tree from the ZFS snapshot, update it with
|
||||
<literal>cvs update</literal> instead.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -352,9 +378,13 @@
|
|||
</itemizedlist>
|
||||
|
||||
<para>If the last build finished cleanly you do not need to delete
|
||||
anything; if it was interrupted you just need to run
|
||||
<literal>dosetupnodes</literal> on all clients for the
|
||||
the relevant branch. <filename>errors/</filename>,
|
||||
anything. If it was interrupted, or you selected
|
||||
<literal>-nocleanup</literal>, you need to clean up clients by running
|
||||
</para>
|
||||
|
||||
<para><command>build cleanup <replaceable>${arch}</replaceable> <replaceable>${branch}</replaceable> <replaceable>${buildid}</replaceable> -full</command></para>
|
||||
|
||||
<para><filename>errors/</filename>,
|
||||
<filename>logs/</filename>, <filename>packages/</filename>, and so
|
||||
forth, are cleaned by the scripts. If you are short of space,
|
||||
you can also clean out <filename>ports/distfiles/</filename>.
|
||||
|
@ -409,13 +439,13 @@
|
|||
<example>
|
||||
<title>Update the i386-6 tree and do a complete build</title>
|
||||
|
||||
<para><command>dopackages.6 i386 -nocvs -norestr -nofinish</command></para>
|
||||
<para><command>dopackages.6 i386 -nosrc -norestr -nofinish</command></para>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
<title>Restart an interrupted amd64-8 build without updating</title>
|
||||
|
||||
<para><command>dopackages.8 amd64 -nocvs -noportscvs -norestr -continue -noindex -noduds -nofinish</command></para>
|
||||
<para><command>dopackages.8 amd64 -nosrc -noports -norestr -continue -noindex -noduds -nofinish</command></para>
|
||||
</example>
|
||||
|
||||
<example>
|
||||
|
@ -423,6 +453,53 @@
|
|||
|
||||
<para><command>dopackages.7 sparc64 -finish</command></para>
|
||||
</example>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="build-command">
|
||||
<title><command>build</command> command</title>
|
||||
|
||||
<para>You may need to manipulate the build data before starting it,
|
||||
especially for experimental builds. This is done with
|
||||
<command>build</command> command.</para>
|
||||
|
||||
<itemizedlist>
|
||||
<listitem>
|
||||
<para><literal>build list <replaceable>arch</replaceable>
|
||||
<replaceable>branch</replaceable></literal> - Shows the current set
|
||||
of build ids.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>build clone <replaceable>arch</replaceable>
|
||||
<replaceable>branch</replaceable> <replaceable>oldid</replaceable>
|
||||
[<replaceable>newid</replaceable>]</literal> - Clones
|
||||
<replaceable>oldid</replaceable> to
|
||||
<replaceable>newid</replaceable> (or a datestamp if not specified).
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>build srcupdate <replaceable>arch</replaceable>
|
||||
<replaceable>branch</replaceable>
|
||||
<replaceable>buildid</replaceable</literal>> - Replaces the src
|
||||
tree with a new ZFS snapshot. Don't forget to use
|
||||
<literal>-nosrc</literal> flag to <command>dopackages</command>
|
||||
later!
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para><literal>build portsupdate <replaceable>arch</replaceable>
|
||||
<replaceable>branch</replaceable></literal> - Replaces the ports
|
||||
tree with a new ZFS snapshot. Don't forget to use
|
||||
<literal>-noports</literal> flag to <command>dopackages</command>
|
||||
later!
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="anatomy">
|
||||
|
@ -434,14 +511,14 @@
|
|||
|
||||
<orderedlist>
|
||||
<listitem>
|
||||
<para>A CVS update of the current <literal>ports</literal>
|
||||
tree [*]
|
||||
<para>An update of the current <literal>ports</literal>
|
||||
tree from the ZFS snapshot [*]
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>A CVS update of the running branch's
|
||||
<literal>src</literal> tree [*]
|
||||
<para>An update of the running branch's
|
||||
<literal>src</literal> tree from the ZFS snapshot [*]
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -537,15 +614,9 @@
|
|||
processes, they'll keep going (or respawn) until they've built their
|
||||
package.</para>
|
||||
|
||||
<para>To free up resources, you will need to clean up by running
|
||||
<command>dosetupnode</command> on each client machine. For example,
|
||||
in &man.csh.1;:
|
||||
<screen>&prompt.user; <userinput>cd ~/loads; foreach i (*); /var/portbuild/scripts/dosetupnode i386 6-exp $i -norsync &; done</userinput></screen>
|
||||
|
||||
The <literal>-norsync</literal> says not to bother resyncing the
|
||||
entire build data (ports tree, etc) on any remote machines, and it
|
||||
will just clean up old <literal>chroot</literal>s and then reset the
|
||||
build queue for that machine.</para>
|
||||
<para>To free up resources, you will need to clean up client machines by
|
||||
running <command>build cleanup</command> command. For example:
|
||||
<screen>&prompt.user; <userinput>/var/portbuild/scripts/build cleanup i386 6-exp 20080714120411 -full</userinput></screen>
|
||||
|
||||
<para>If you forget to do this, then the old build
|
||||
<literal>chroot</literal>s will not be cleaned up for 24 hours, and no
|
||||
|
|
Loading…
Reference in a new issue