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

Annotation of www/porttest.html, Revision 1.9

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>
                     84:       </ul>
                     85:
                     86:       <li><i>extract</i>
                     87:         <ul><li>Each of the distfiles should install any dependent programs (such as bzip2) beforehand.</li></ul>
                     88:
                     89:       <li><i>patch</i>
                     90:         <ul>
                     91:          <li>Patches should apply cleanly without any warnings.
                     92:          <li>There shouldn't be any <tt>.orig</tt> files left behind in the
                     93:              <tt>patches/</tt> directory.
                     94:          <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.
                     95:         </ul>
                     96:
                     97:       <li><i>configure</i>
                     98:         <ul>
                     99:          <li>Check that configure scripts correctly detect features
                    100:              on your platform.
                    101:          <li>GNU libtool is notorious for undesired 'features' on OpenBSD,
                    102:              so check that the port is using a recent version which creates
                    103:              correct libraries on your architecture.
                    104:          <li>The configure script should not detect stray applications already
                    105:              installed on your system without explicit dependencies being
                    106:              set in the port.
                    107:         </ul>
                    108:
                    109:       <li><i>build</i>
                    110:         <ul>
                    111:          <li>Check for build errors and suspicious warnings.
                    112:          <li>Warnings about <a href=
1.6       couderc   113:       "http://www.openbsd.org/cgi-bin/man.cgi?query=tmpnam&amp;sektion=3&amp;">
1.8       avsm      114:       tmpnam(3)</a> issues should be resolved by using
                    115:       <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=mkstemp&amp;sektion=3&amp;"> mkstemp(3)</a>.</li>
                    116:          <li>Try to set the <tt>SEPARATE_BUILD</tt> variable to 'concurrent' and test if the build still works.
                    117:          <li>Make sure dependencies on GNU make are really necessary.
                    118:         </ul>
                    119:
                    120:       <li><i>fake</i>
                    121:         <ul>
                    122:          <li>This target installs the application into a fake working
                    123:          directory, to ensure that all files can be easily packaged up
                    124:          without affecting the base system.
                    125:          <li>The port should <b>never</b> install files outside of the
                    126:          fake directory (such as into <tt>/usr/local</tt>).
                    127:          <li>GNU libtool occasionally has trouble relinking libraries
                    128:          during the fake process on some architectures.
                    129:         </ul>
                    130:
                    131:       <li><i>package</i>
                    132:         <ul>
                    133:          <li>Package creation can break if pkg/PLIST* and/or
                    134:          pkg/PFRAG* are wrong.</li>
                    135:         </ul>
                    136:
                    137:       <li><i>install</i>
                    138:         <ul>
                    139:          <li>Packages should install all of the files from their packaging
                    140:          lists successfully and with the correct permissions.  Be especially
                    141:          careful of files with the setuid bits set.
                    142:          <li>Make sure that the package <tt>INSTALL</tt> script works
                    143:          correctly, and does not overwrite any files in <tt>/etc</tt>.
                    144:         </ul>
                    145:
                    146:       <li><i>deinstall</i>
                    147:         <ul>
                    148:          <li>This should remove all files installed by the package, except
                    149:          those in <tt>/etc</tt>.
                    150:          <li>Make sure that the <tt>DEINSTALL</tt> script works as expected.
                    151:         </ul>
1.1       couderc   152:     </ul>
                    153:
1.7       couderc   154:     <p>Checking of pkg/ files like DESCR, MESSAGE, INSTALL,
                    155:     DEINSTALL is also to be done</p>
1.1       couderc   156:
                    157:     <h2><a name="Commenting"><font color="#0000e0">Commenting</font></a></h2>
                    158:
                    159:     <p>At the end of the test comes the really important thing : comments.
1.7       couderc   160:     Even if the port is working fine comments must be done. If we have ten
1.3       couderc   161:     posts where people say that the port runs fine under different architectures
1.7       couderc   162:     then the commit is done faster. If it does not work then some information
                    163:     must be given.
                    164:     There are tools that can help in this task, like <a href=
1.1       couderc   165:     "http://www.openbsd.org/cgi-bin/cvsweb/ports/infrastructure/build/portslogger">
                    166:     portslogger</a>.</p>
                    167:
                    168:     <p>Example :<br>
                    169:     </p>
                    170:
                    171:     <div style="margin-left: 2em">
                    172:       <table border="0" cellpadding="3" width="100%">
                    173:         <tr>
                    174:           <td nowrap bgcolor="#EEEEEE">
                    175: <pre>
1.6       couderc   176:     # make install | /usr/ports/infrastructure/build/portslogger .
1.1       couderc   177: </pre>
                    178:           </td>
                    179:         </tr>
                    180:       </table>
                    181:     </div>
                    182:     <br>
                    183:      <br>
                    184:
                    185:
1.3       couderc   186:     <p>This will redirect the output into a log file located in the current
1.1       couderc   187:     directory.</p>
                    188:
                    189:     <h2><a name="More"><font color="#0000e0">More testing</font></a></h2>
                    190:
1.7       couderc   191:     <p>Check the port Makefile for typos, incorrect links, useless or
                    192:     missing variables, correct licensing and correct category.
                    193:     For those who are more skilled other targets can be tested like
                    194:     lib-depends-check. Patches and pkg directories deep verification
                    195:     as well as providing diffs to correct bugs, add flavors, or other
                    196:     enhancements.</p>
1.1       couderc   197:     <hr>
1.8       avsm      198:     <small>
1.9     ! avsm      199:       <p>$OpenBSD: porttest.html,v 1.8 2002/09/11 12:16:10 avsm Exp $<br>
        !           200:       Copyright &copy; 2002 OpenBSD</p>
1.8       avsm      201:     </small>
1.1       couderc   202:   </body>
                    203: </html>