[BACK]Return to porttest.html CVS log [TXT][DIR] Up to [local] / www

Annotation of www/porttest.html, Revision 1.10

1.1       couderc     1: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
                      2:
                      3: <html>
                      4:   <head>
                      5:     <meta http-equiv="content-type" content="text/html; charset=UTF-8">
                      6:
1.6       couderc     7:     <title>OpenBSD Port Testing Guide</title>
1.1       couderc     8:   </head>
                      9:
                     10:   <body text="#000000" bgcolor="#FFFFFF" link="#23238E">
                     11:     <a href="index.html"><img alt="[OpenBSD]" height="30" width="141" src=
                     12:     "images/smalltitle.gif" border="0"></a>
                     13:
1.6       couderc    14:     <h2><font color="#e00000">Port Testing Guide</font></h2>
1.1       couderc    15:     <hr>
                     16:
                     17:     <h2><font color="#0000e0">Index</font></h2>
                     18:
                     19:     <ul>
                     20:       <li><a href="#Introduction">Introduction</a></li>
                     21:
                     22:       <li><a href="#How">How</a></li>
                     23:
                     24:       <li><a href="#First">First step</a></li>
                     25:
                     26:       <li><a href="#Testing">Testing</a></li>
                     27:
                     28:       <li><a href="#Commenting">Commenting</a></li>
                     29:
                     30:       <li><a href="#More">More testing</a></li>
                     31:     </ul>
                     32:     <hr>
                     33:
                     34:     <h2><a name="Introduction"><font color=
                     35:     "#0000e0">Introduction</font></a></h2>
                     36:
                     37:     <p>The <a href="ports.html">ports tree</a> is an huge piece of work that
1.8       avsm       38:     permits OpenBSD users to use third-party programs without wasting time
                     39:     patching, configuring and installing each one individually. This work
1.9       avsm       40:     is done by a group of volunteers who spend their time porting and testing
                     41:     applications across the range of OpenBSD platforms. Many people think
                     42:     that they cannot help this process because they do not have enough
                     43:     knowledge; this is false because they can help porters work better and
                     44:     faster.</p>
1.1       couderc    45:
                     46:     <h2><a name="How"><font color="#0000e0">How</font></a></h2>
                     47:
1.8       avsm       48:     <p>Testing submitted updates or new ports which are posted on the
1.6       couderc    49:     <a href="mail.html">ports mailing list</a>. By doing this
1.3       couderc    50:     you reduce the latency of commits and also increase the number of ports to
                     51:     be committed (many ports are not committed because of lack of testing!).</p>
1.1       couderc    52:
                     53:     <h2><a name="First"><font color="#0000e0">First step</font></a></h2>
                     54:
1.8       avsm       55:     <p>The ports tree is developed against
                     56:     <a href="plus.html">OpenBSD-current</a>; there is no guarantee that
                     57:     new ports will work correctly on the other branches. This also means
                     58:     you should upgrade your system and ports tree to -current
                     59:     (instructions on how to do this can be found at the
                     60:     <a href="../anoncvs.html">anoncvs</a> page and in the
                     61:     <a href="./upgrade-minifaq.html">FAQ</a>).
                     62:     It is also recommended that you subscribe to the ports and ports-changes
                     63:     <a href="../mail.html">mailing-lists</a>. This way you will be notified
                     64:     about new or updated ports and about changes in the ports tree.</p>
1.7       couderc    65:
1.1       couderc    66:     <h2><a name="Testing"><font color="#0000e0">Testing</font></a></h2>
                     67:
1.8       avsm       68:     <p>There are two types of submissions on the mailing-lists; new ports
                     69:     and updates. New ports are generally posted as tarball attachments
                     70:     or urls. A good idea is to extract them into the
                     71:     <tt>/usr/ports/mystuff/</tt> directory and test from there.
                     72:     Updates are generally a diff against the -current ports tree, so it is best
                     73:     to copy the port to <tt>mystuff/</tt> and apply the diff to prevent tree
1.7       couderc    74:     breakage.</p>
1.1       couderc    75:
1.7       couderc    76:     <p>Step-by-step building is needed to verify that every target, see
1.6       couderc    77:     <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ports&amp;sektion=7&amp;">
1.7       couderc    78:     ports(7)</a>, is achieved correctly :</p>
1.1       couderc    79:
                     80:     <ul>
1.8       avsm       81:       <li><i>fetch</i>
                     82:         <ul>
                     83:          <li>Needed to verify that distfile(s) are correctly downloaded. Try to test all of the <tt>MASTER_SITES</tt> specified to make sure they are all valid sources.</li>
1.10    ! couderc    84:         </ul>
        !            85:
        !            86:       <li><i>checksum</i>
        !            87:         <ul>
        !            88:          <li>Verify that downloaded distfiles are matching.</li>
        !            89:         </ul>
1.8       avsm       90:
                     91:       <li><i>extract</i>
                     92:         <ul><li>Each of the distfiles should install any dependent programs (such as bzip2) beforehand.</li></ul>
                     93:
                     94:       <li><i>patch</i>
                     95:         <ul>
                     96:          <li>Patches should apply cleanly without any warnings.
                     97:          <li>There shouldn't be any <tt>.orig</tt> files left behind in the
                     98:              <tt>patches/</tt> directory.
                     99:          <li>Another common mistake is to include RCS tags in a patch; this will break when the port is checked into the repository and the RCS tag expanded.
                    100:         </ul>
                    101:
                    102:       <li><i>configure</i>
                    103:         <ul>
                    104:          <li>Check that configure scripts correctly detect features
                    105:              on your platform.
                    106:          <li>GNU libtool is notorious for undesired 'features' on OpenBSD,
                    107:              so check that the port is using a recent version which creates
                    108:              correct libraries on your architecture.
                    109:          <li>The configure script should not detect stray applications already
                    110:              installed on your system without explicit dependencies being
                    111:              set in the port.
                    112:         </ul>
                    113:
                    114:       <li><i>build</i>
                    115:         <ul>
                    116:          <li>Check for build errors and suspicious warnings.
                    117:          <li>Warnings about <a href=
1.6       couderc   118:       "http://www.openbsd.org/cgi-bin/man.cgi?query=tmpnam&amp;sektion=3&amp;">
1.8       avsm      119:       tmpnam(3)</a> issues should be resolved by using
                    120:       <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=mkstemp&amp;sektion=3&amp;"> mkstemp(3)</a>.</li>
                    121:          <li>Try to set the <tt>SEPARATE_BUILD</tt> variable to 'concurrent' and test if the build still works.
                    122:          <li>Make sure dependencies on GNU make are really necessary.
                    123:         </ul>
                    124:
                    125:       <li><i>fake</i>
                    126:         <ul>
                    127:          <li>This target installs the application into a fake working
                    128:          directory, to ensure that all files can be easily packaged up
                    129:          without affecting the base system.
                    130:          <li>The port should <b>never</b> install files outside of the
                    131:          fake directory (such as into <tt>/usr/local</tt>).
                    132:          <li>GNU libtool occasionally has trouble relinking libraries
                    133:          during the fake process on some architectures.
                    134:         </ul>
                    135:
                    136:       <li><i>package</i>
                    137:         <ul>
                    138:          <li>Package creation can break if pkg/PLIST* and/or
                    139:          pkg/PFRAG* are wrong.</li>
                    140:         </ul>
                    141:
                    142:       <li><i>install</i>
                    143:         <ul>
                    144:          <li>Packages should install all of the files from their packaging
                    145:          lists successfully and with the correct permissions.  Be especially
                    146:          careful of files with the setuid bits set.
                    147:          <li>Make sure that the package <tt>INSTALL</tt> script works
                    148:          correctly, and does not overwrite any files in <tt>/etc</tt>.
                    149:         </ul>
                    150:
                    151:       <li><i>deinstall</i>
                    152:         <ul>
                    153:          <li>This should remove all files installed by the package, except
                    154:          those in <tt>/etc</tt>.
                    155:          <li>Make sure that the <tt>DEINSTALL</tt> script works as expected.
                    156:         </ul>
1.1       couderc   157:     </ul>
                    158:
1.10    ! couderc   159:     <p>Remaining pkg/ files like DESCR and MESSAGE could be checked
        !           160:     for grammar and typo, no more than 70 characters per line and also
        !           161:     wording.</p>
1.1       couderc   162:
                    163:     <h2><a name="Commenting"><font color="#0000e0">Commenting</font></a></h2>
                    164:
                    165:     <p>At the end of the test comes the really important thing : comments.
1.7       couderc   166:     Even if the port is working fine comments must be done. If we have ten
1.3       couderc   167:     posts where people say that the port runs fine under different architectures
1.7       couderc   168:     then the commit is done faster. If it does not work then some information
                    169:     must be given.
                    170:     There are tools that can help in this task, like <a href=
1.1       couderc   171:     "http://www.openbsd.org/cgi-bin/cvsweb/ports/infrastructure/build/portslogger">
1.10    ! couderc   172:     portslogger</a> which is like an "intelligent tee" that redirects output into
        !           173:     a log file.</p>
1.1       couderc   174:
                    175:     <p>Example :<br>
                    176:     </p>
                    177:
                    178:     <div style="margin-left: 2em">
                    179:       <table border="0" cellpadding="3" width="100%">
                    180:         <tr>
                    181:           <td nowrap bgcolor="#EEEEEE">
                    182: <pre>
1.6       couderc   183:     # make install | /usr/ports/infrastructure/build/portslogger .
1.1       couderc   184: </pre>
                    185:           </td>
                    186:         </tr>
                    187:       </table>
                    188:     </div>
                    189:     <br>
                    190:      <br>
                    191:
                    192:
1.3       couderc   193:     <p>This will redirect the output into a log file located in the current
1.1       couderc   194:     directory.</p>
                    195:
                    196:     <h2><a name="More"><font color="#0000e0">More testing</font></a></h2>
                    197:
1.7       couderc   198:     <p>Check the port Makefile for typos, incorrect links, useless or
                    199:     missing variables, correct licensing and correct category.
                    200:     For those who are more skilled other targets can be tested like
                    201:     lib-depends-check. Patches and pkg directories deep verification
                    202:     as well as providing diffs to correct bugs, add flavors, or other
                    203:     enhancements.</p>
1.10    ! couderc   204:     <p>These diffs should be done with the -uN options (using -r for
        !           205:     recursive in directories)</p>
1.1       couderc   206:     <hr>
1.8       avsm      207:     <small>
1.10    ! couderc   208:       <p>$OpenBSD: porttest.html,v 1.9 2002/09/11 13:39:51 avsm Exp $<br>
1.9       avsm      209:       Copyright &copy; 2002 OpenBSD</p>
1.8       avsm      210:     </small>
1.1       couderc   211:   </body>
                    212: </html>