Annotation of www/porttest.html, Revision 1.8
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
! 40: is done by a few volunteers who spend hours making your favorite
! 41: applications work fine on your system. Many people think that they
! 42: cannot help our project because they do not have enough knowledge;
! 43: this is false because they can help porters work better and faster.</p>
1.1 couderc 44:
45: <h2><a name="How"><font color="#0000e0">How</font></a></h2>
46:
1.8 ! avsm 47: <p>Testing submitted updates or new ports which are posted on the
1.6 couderc 48: <a href="mail.html">ports mailing list</a>. By doing this
1.3 couderc 49: you reduce the latency of commits and also increase the number of ports to
50: be committed (many ports are not committed because of lack of testing!).</p>
1.1 couderc 51:
52: <h2><a name="First"><font color="#0000e0">First step</font></a></h2>
53:
1.8 ! avsm 54: <p>The ports tree is developed against
! 55: <a href="plus.html">OpenBSD-current</a>; there is no guarantee that
! 56: new ports will work correctly on the other branches. This also means
! 57: you should upgrade your system and ports tree to -current
! 58: (instructions on how to do this can be found at the
! 59: <a href="../anoncvs.html">anoncvs</a> page and in the
! 60: <a href="./upgrade-minifaq.html">FAQ</a>).
! 61: It is also recommended that you subscribe to the ports and ports-changes
! 62: <a href="../mail.html">mailing-lists</a>. This way you will be notified
! 63: about new or updated ports and about changes in the ports tree.</p>
1.7 couderc 64:
1.1 couderc 65: <h2><a name="Testing"><font color="#0000e0">Testing</font></a></h2>
66:
1.8 ! avsm 67: <p>There are two types of submissions on the mailing-lists; new ports
! 68: and updates. New ports are generally posted as tarball attachments
! 69: or urls. A good idea is to extract them into the
! 70: <tt>/usr/ports/mystuff/</tt> directory and test from there.
! 71: Updates are generally a diff against the -current ports tree, so it is best
! 72: to copy the port to <tt>mystuff/</tt> and apply the diff to prevent tree
1.7 couderc 73: breakage.</p>
1.1 couderc 74:
1.7 couderc 75: <p>Step-by-step building is needed to verify that every target, see
1.6 couderc 76: <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=ports&sektion=7&">
1.7 couderc 77: ports(7)</a>, is achieved correctly :</p>
1.1 couderc 78:
79: <ul>
1.8 ! avsm 80: <li><i>fetch</i>
! 81: <ul>
! 82: <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>
! 83: </ul>
! 84:
! 85: <li><i>extract</i>
! 86: <ul><li>Each of the distfiles should install any dependent programs (such as bzip2) beforehand.</li></ul>
! 87:
! 88: <li><i>patch</i>
! 89: <ul>
! 90: <li>Patches should apply cleanly without any warnings.
! 91: <li>There shouldn't be any <tt>.orig</tt> files left behind in the
! 92: <tt>patches/</tt> directory.
! 93: <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.
! 94: </ul>
! 95:
! 96: <li><i>configure</i>
! 97: <ul>
! 98: <li>Check that configure scripts correctly detect features
! 99: on your platform.
! 100: <li>GNU libtool is notorious for undesired 'features' on OpenBSD,
! 101: so check that the port is using a recent version which creates
! 102: correct libraries on your architecture.
! 103: <li>The configure script should not detect stray applications already
! 104: installed on your system without explicit dependencies being
! 105: set in the port.
! 106: </ul>
! 107:
! 108: <li><i>build</i>
! 109: <ul>
! 110: <li>Check for build errors and suspicious warnings.
! 111: <li>Warnings about <a href=
1.6 couderc 112: "http://www.openbsd.org/cgi-bin/man.cgi?query=tmpnam&sektion=3&">
1.8 ! avsm 113: tmpnam(3)</a> issues should be resolved by using
! 114: <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=mkstemp&sektion=3&"> mkstemp(3)</a>.</li>
! 115: <li>Try to set the <tt>SEPARATE_BUILD</tt> variable to 'concurrent' and test if the build still works.
! 116: <li>Make sure dependencies on GNU make are really necessary.
! 117: </ul>
! 118:
! 119: <li><i>fake</i>
! 120: <ul>
! 121: <li>This target installs the application into a fake working
! 122: directory, to ensure that all files can be easily packaged up
! 123: without affecting the base system.
! 124: <li>The port should <b>never</b> install files outside of the
! 125: fake directory (such as into <tt>/usr/local</tt>).
! 126: <li>GNU libtool occasionally has trouble relinking libraries
! 127: during the fake process on some architectures.
! 128: </ul>
! 129:
! 130: <li><i>package</i>
! 131: <ul>
! 132: <li>Package creation can break if pkg/PLIST* and/or
! 133: pkg/PFRAG* are wrong.</li>
! 134: </ul>
! 135:
! 136: <li><i>install</i>
! 137: <ul>
! 138: <li>Packages should install all of the files from their packaging
! 139: lists successfully and with the correct permissions. Be especially
! 140: careful of files with the setuid bits set.
! 141: <li>Make sure that the package <tt>INSTALL</tt> script works
! 142: correctly, and does not overwrite any files in <tt>/etc</tt>.
! 143: </ul>
! 144:
! 145: <li><i>deinstall</i>
! 146: <ul>
! 147: <li>This should remove all files installed by the package, except
! 148: those in <tt>/etc</tt>.
! 149: <li>Make sure that the <tt>DEINSTALL</tt> script works as expected.
! 150: </ul>
1.1 couderc 151: </ul>
152:
1.7 couderc 153: <p>Checking of pkg/ files like DESCR, MESSAGE, INSTALL,
154: DEINSTALL is also to be done</p>
1.1 couderc 155:
156: <h2><a name="Commenting"><font color="#0000e0">Commenting</font></a></h2>
157:
158: <p>At the end of the test comes the really important thing : comments.
1.7 couderc 159: Even if the port is working fine comments must be done. If we have ten
1.3 couderc 160: posts where people say that the port runs fine under different architectures
1.7 couderc 161: then the commit is done faster. If it does not work then some information
162: must be given.
163: There are tools that can help in this task, like <a href=
1.1 couderc 164: "http://www.openbsd.org/cgi-bin/cvsweb/ports/infrastructure/build/portslogger">
165: portslogger</a>.</p>
166:
167: <p>Example :<br>
168: </p>
169:
170: <div style="margin-left: 2em">
171: <table border="0" cellpadding="3" width="100%">
172: <tr>
173: <td nowrap bgcolor="#EEEEEE">
174: <pre>
1.6 couderc 175: # make install | /usr/ports/infrastructure/build/portslogger .
1.1 couderc 176: </pre>
177: </td>
178: </tr>
179: </table>
180: </div>
181: <br>
182: <br>
183:
184:
1.3 couderc 185: <p>This will redirect the output into a log file located in the current
1.1 couderc 186: directory.</p>
187:
188: <h2><a name="More"><font color="#0000e0">More testing</font></a></h2>
189:
1.7 couderc 190: <p>Check the port Makefile for typos, incorrect links, useless or
191: missing variables, correct licensing and correct category.
192: For those who are more skilled other targets can be tested like
193: lib-depends-check. Patches and pkg directories deep verification
194: as well as providing diffs to correct bugs, add flavors, or other
195: enhancements.</p>
1.1 couderc 196: <hr>
1.8 ! avsm 197: <small>
! 198: <p>$OpenBSD: porttest.html,v 1.7 2002/09/11 09:31:13 couderc Exp $<br>
1.4 couderc 199: OpenBSD Copyright © 2002 OpenBSD</p>
1.8 ! avsm 200: </small>
1.1 couderc 201: </body>
202: </html>