Source string Read only

(itstool) path: sect2/para
182/1820
Context English State
While useful for regular bulk builds, having this default ports tree with the <citerefentry><refentrytitle>portsnap</refentrytitle><manvolnum>8</manvolnum></citerefentry> method may not be the best way to deal with local modifications for a ports contributor. As with the creation of jails, it is possible to use a different method for creating the ports tree. To add an additional ports tree for testing local modifications and ports development, checking out the tree via <application>Subversion</application> (as described above) is preferable.
The <acronym>http</acronym> and <acronym>https</acronym> methods need <package role="port">devel/subversion</package> built with the <literal>SERF</literal> option enabled. It is enabled by default.
The <literal>svn</literal> method allows extra qualifiers to tell <application>Subversion</application> exactly how to fetch data. This is explained in <citerefentry vendor="ports"><refentrytitle>poudriere</refentrytitle><manvolnum>8</manvolnum></citerefentry>. For instance, <command>poudriere ports -c -m svn+ssh -p subversive</command> uses <application>SSH</application> for the checkout.
Using Manually Managed Ports Trees with Poudriere
Depending on the workflow, it can be extremely helpful to use ports trees which are maintained manually. For instance, if there is a local copy of the ports tree in <filename>/work/ports</filename>, point <application>Poudriere</application> to the location:
For <application>Poudriere</application> older than version 3.1.20:
<prompt>#</prompt> <userinput>poudriere ports -c -F -f none -M /work/ports -p development</userinput>
For <application>Poudriere</application> version 3.1.20 and later:
<prompt>#</prompt> <userinput>poudriere ports -c -m null -M /work/ports -p development</userinput>
This will be listed in the table of known trees:
<prompt>#</prompt> <userinput>poudriere ports -l</userinput>
PORTSTREE METHOD TIMESTAMP PATH
development null 2020-07-20 05:06:33 /work/ports
The dash or <literal>null</literal> in the <literal>METHOD</literal> column means that <application>Poudriere</application> will not update or change this ports tree, ever. It is completely up to the user to maintain this tree, including all local modifications that may be used for testing new ports and submitting patches.
Keeping Poudriere Ports Trees Updated
As straightforward as with jails described earlier:
<prompt>#</prompt> <userinput>poudriere ports -u -p <replaceable>PORTSTREE</replaceable></userinput>
Will update the given <replaceable>PORTSTREE</replaceable>, one tree given by the output of <command>poudriere -l</command>, to the latest revision available on the official servers.
Ports trees without a method, see <xref linkend="testing-poudriere-ports-tree-manual"/>, cannot be updated like this. They must be updated manually by the porter.
Testing Ports
After jails and ports trees have been set up, the result of a contributor's modifications to the ports tree can be tested.
For example, local modifications to the <package role="port">www/firefox</package> port located in <filename>/work/ports/www/firefox</filename> can be tested in the previously created 11.3-RELEASE jail:
<prompt>#</prompt> <userinput>poudriere testport -j 113Ramd64 -p development -o www/firefox</userinput>
This will build all dependencies of <application>Firefox</application>. If a dependency has been built previously and is still up-to-date, the pre-built package is installed. If a dependency has no up-to-date package, one will be built with default options in a jail. Then <application>Firefox</application> itself is built.
The complete build of every port is logged to <filename>/poudriere/data/logs/bulk/113Ri386-development/<replaceable>build-time</replaceable>/logs</filename>.
The directory name <literal>113Ri386-development</literal> is derived from the arguments to <literal>-j</literal> and <literal>-p</literal>, respectively. For convenience, a symbolic link <filename>/poudriere/data/logs/bulk/113Ri386-development/latest</filename> is also maintained. The link points to the latest <replaceable>build-time</replaceable> directory. Also in this directory is an <filename>index.html</filename> for observing the build process with a web browser.
By default, <application>Poudriere</application> cleans up the jails and leaves log files in the directories mentioned above. To ease investigation, jails can be kept running after the build by adding <option>-i</option> to <command>testport</command>:
<prompt>#</prompt> <userinput>poudriere testport -j 113Ramd64 -p development -i -o www/firefox</userinput>
After the build completes, and regardless of whether it was successful, a shell is provided within the jail. The shell is used to investigate further. <application>Poudriere</application> can be told to leave the jail running after the build finishes with <option>-I</option>. <application>Poudriere</application> will show the command to run when the jail is no longer needed. It is then possible to <citerefentry><refentrytitle>jexec</refentrytitle><manvolnum>8</manvolnum></citerefentry> into it:
<prompt>#</prompt> <userinput>poudriere testport -j 113Ramd64 -p development -I -o www/firefox</userinput>
[...]
====&gt;&gt; Installing local Pkg repository to /usr/local/etc/pkg/repos
====&gt;&gt; Leaving jail 113Ramd64-development-n running, mounted at /poudriere/data/.m/113Ramd64-development/ref for interactive run testing
====&gt;&gt; To enter jail: jexec 113Ramd64-development-n env -i TERM=$TERM /usr/bin/login -fp root
====&gt;&gt; To stop jail: poudriere jail -k -j 113Ramd64 -p development
<prompt>#</prompt> <userinput>jexec 113Ramd64-development-n env -i TERM=$TERM /usr/bin/login -fp root</userinput>
<prompt>#</prompt> <userinput><replaceable>[do some stuff in the jail]</replaceable></userinput>
<prompt>#</prompt> <userinput>exit</userinput>
<prompt>#</prompt> <userinput>poudriere jail -k -j 113Ramd64 -p development</userinput>
====&gt;&gt; Umounting file systems
An integral part of the FreeBSD ports build infrastructure is the ability to tweak ports to personal preferences with options. These can be tested with <application>Poudriere</application> as well. Adding the <option>-c</option>:
<prompt>#</prompt> <userinput>poudriere testport -c -o www/firefox</userinput>
Presents the port configuration dialog before the port is built. The ports given after <option>-o</option> in the format <literal><replaceable>category</replaceable>/<replaceable>portname</replaceable></literal> will use the specified options, all dependencies will use the default options. Testing dependent ports with non-default options can be accomplished using sets, see <xref linkend="testing-poudriere-sets"/>.

Loading…

No matching activity found.

Browse all component changes

Glossary

English English
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect2/para
Flags
read-only
Source string location
book.translate.xml:19366
String age
a year ago
Source string age
a year ago
Translation file
books/porters-handbook.pot, string 4045