The translation is temporarily closed for contributions due to maintenance, please come back later.

Source string Read only

(itstool) path: sect3/para
Context English State
The <filename></filename> Script
Prior to FreeBSD 9.0-RELEASE, <filename>src/release/Makefile</filename> was updated to support <citerefentry><refentrytitle>bsdinstall</refentrytitle><manvolnum>8</manvolnum></citerefentry>, and the <filename>src/release/</filename> script was introduced as a wrapper to automate invoking the <citerefentry><refentrytitle>release</refentrytitle><manvolnum>7</manvolnum></citerefentry> targets.
Prior to FreeBSD 9.2-RELEASE, <filename>src/release/</filename> was introduced, which heavily based on <filename>src/release/</filename> included support to specify configuration files to override various options and environment variables. Support for configuration files provided support for cross building each architecture for a release by specifying a separate configuration file for each invocation.
As a brief example of using <filename>src/release/</filename> to build a single release in <filename class="directory">/scratch</filename>:
<prompt>#</prompt> <userinput>/bin/sh /usr/src/release/</userinput>
As a brief example of using <filename>src/release/</filename> to build a single, cross-built release using a different target directory, create a custom <filename>release.conf</filename> containing:
# configuration for powerpc/powerpc64
Then invoke <filename>src/release/</filename> as:
<prompt>#</prompt> <userinput>/bin/sh /usr/src/release/ -c <replaceable>$HOME/release.conf</replaceable></userinput>
See <citerefentry><refentrytitle>release</refentrytitle><manvolnum>7</manvolnum></citerefentry> and <filename>src/release/release.conf.sample</filename> for more details and example usage.
The <filename></filename> Wrapper Script
In order to make cross building the full set of architectures supported on a given branch faster, easier, and reduce human error factors, a wrapper script around <filename>src/release/</filename> was written to iterate through the various combinations of architectures and invoke <filename>src/release/</filename> using a configuration file specific to that architecture.
The wrapper script is called <filename></filename>, which is available in the FreeBSD Subversion repository at <literal>svn://</literal>, in addition to configuration files used to build <literal>head/</literal> and <literal>stable/<replaceable>12</replaceable>/</literal> development snapshots.
Using <filename></filename> is covered in <xref linkend="releng-build-snapshot"/> and <xref linkend="releng-build-release"/>.
Each architecture and individual kernel have their own configuration file used by <filename></filename>. Each branch has its own <filename>defaults-X.conf</filename> configuration which contains entries common throughout each architecture, where overrides or special variables are set and/or overridden in the per-build files.
The per-build configuration file naming scheme is in the form of <filename>${revision}-${TARGET_ARCH}-${KERNCONF}-${type}.conf</filename>, where the uppercase variables are equivalent to what <citerefentry><refentrytitle>make</refentrytitle><manvolnum>1</manvolnum></citerefentry> uses in the build system, and lowercase variables are set within the configuration files, mapping to the major version of the respective branch.
Each branch also has its own <filename>builds-X.conf</filename> configuration, which is used by <filename></filename>. The <filename></filename> script iterates through each ${revision}, ${TARGET_ARCH}, ${KERNCONF}, and ${type} value, creating a master list of what to build. However, a given combination from the list will only be built if the respective configuration file exists, which is where the naming scheme above is relevant.
There are two paths of file sourcing:
<filename>builds-<replaceable>12</replaceable>.conf</filename> -&gt; <filename>main.conf</filename>
This controls <filename></filename> behavior
<filename><replaceable>12</replaceable>-<replaceable>amd64</replaceable>-<replaceable>GENERIC</replaceable>-<replaceable>snap</replaceable>.conf</filename> -&gt; <filename>defaults-<replaceable>12</replaceable>.conf</filename> -&gt; <filename>main.conf</filename>
This controls <filename>release/</filename> behavior within the build <citerefentry><refentrytitle>chroot</refentrytitle><manvolnum>8</manvolnum></citerefentry>
The <filename>builds-<replaceable>12</replaceable>.conf</filename>, <filename>defaults-<replaceable>12</replaceable>.conf</filename>, and <filename>main.conf</filename> configuration files exist to reduce repetition between the various per-build files.
Building FreeBSD Development Snapshots
The official release build machines have a specific filesystem layout, which using <acronym>ZFS</acronym>, <filename></filename> takes heavy advantage of with clones and snapshots, ensuring a pristine build environment.
The build scripts reside in <filename class="directory">/releng/scripts-snapshot/scripts</filename> or <filename class="directory">/releng/scripts-release/scripts</filename> respectively, to avoid collisions between an <literal>RC</literal> build from a releng branch versus a <literal>STABLE</literal> snapshot from the respective stable branch.
A separate dataset exists for the final build images, <filename class="directory">/snap/ftp</filename>. This directory contains both snapshots and releases directories. They are only used if the <literal>EVERYTHINGISFINE</literal> variable is defined in <filename>main.conf</filename>.
The <literal>EVERYTHINGISFINE</literal> variable name was chosen to avoid colliding with a variable that might be possibly set in the user environment, accidentally enabling the behavior that depends on it being defined.
As <filename></filename> iterates through the master list of combinations and locates the per-build configuration file, a <acronym>ZFS</acronym> dataset is created under <filename class="directory">/releng</filename>, such as <filename class="directory">/releng/12-amd64-GENERIC-snap</filename>. The <literal>src/</literal>, <literal>ports/</literal>, and <literal>doc/</literal> trees are checked out to separate <acronym>ZFS</acronym> datasets, such as <filename class="directory">/releng/12-src-snap</filename>, which are then cloned and mounted into the respective build datasets. This is done to avoid checking out a given tree more than once.
Assuming these filesystem paths, <filename></filename> would be invoked as:
<prompt>#</prompt> <userinput>cd /releng/scripts-snapshot/scripts</userinput>
<prompt>#</prompt> <userinput>./ -b <literal>stable/<replaceable>12</replaceable>/</literal></userinput>
<prompt>#</prompt> <userinput>./ -c ./builds-<replaceable>12</replaceable>.conf</userinput>
<prompt>#</prompt> <userinput>./ -c ./builds-<replaceable>12</replaceable>.conf</userinput>


No matching activity found.

Browse all component changes

Source information

Source string comment
(itstool) path: sect3/para
Source string location
String age
a year ago
Source string age
a year ago
Translation file
articles/freebsd-releng.pot, string 241