Annotation of www/porttest.html, Revision 1.14
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
1.12 jufi 60: <a href="anoncvs.html">anoncvs</a> page and in the
61: <a href="faq/upgrade-minifaq.html">FAQ</a>).
1.8 avsm 62: It is also recommended that you subscribe to the ports and ports-changes
1.12 jufi 63: <a href="mail.html">mailing-lists</a>. This way you will be notified
1.8 avsm 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&sektion=7&">
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>
1.14 ! couderc 83: <li>Needed to verify that distfile(s) are correctly downloaded. Try
! 84: to test all of the <tt>MASTER_SITES</tt> specified to make sure they
! 85: are all valid sources.</li>
1.10 couderc 86: </ul>
87:
88: <li><i>checksum</i>
89: <ul>
1.14 ! couderc 90: <li>Verify that downloaded distfiles match the checksums recorded
! 91: in the <tt>distinfo</tt> file.</li>
1.10 couderc 92: </ul>
1.8 avsm 93:
94: <li><i>extract</i>
1.14 ! couderc 95: <ul><li>Each of the distfiles should install any dependent programs
! 96: (such as bzip2) beforehand.</li></ul>
1.8 avsm 97:
98: <li><i>patch</i>
99: <ul>
100: <li>Patches should apply cleanly without any warnings.
101: <li>There shouldn't be any <tt>.orig</tt> files left behind in the
102: <tt>patches/</tt> directory.
1.14 ! couderc 103: <li>Another common mistake is to include RCS tags in a patch; this
! 104: will break when the port is checked into the repository and the RCS
! 105: tag expanded.
1.8 avsm 106: </ul>
107:
108: <li><i>configure</i>
109: <ul>
110: <li>Check that configure scripts correctly detect features
111: on your platform.
112: <li>GNU libtool is notorious for undesired 'features' on OpenBSD,
113: so check that the port is using a recent version which creates
114: correct libraries on your architecture.
115: <li>The configure script should not detect stray applications already
116: installed on your system without explicit dependencies being
117: set in the port.
118: </ul>
119:
120: <li><i>build</i>
121: <ul>
122: <li>Check for build errors and suspicious warnings.
123: <li>Warnings about <a href=
1.6 couderc 124: "http://www.openbsd.org/cgi-bin/man.cgi?query=tmpnam&sektion=3&">
1.8 avsm 125: tmpnam(3)</a> issues should be resolved by using
1.14 ! couderc 126: <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=mkstemp&sektion=3&">
! 127: mkstemp(3)</a>.</li>
! 128: <li>Try to set the <tt>SEPARATE_BUILD</tt> variable to 'concurrent'
! 129: and test if the build still works.
1.8 avsm 130: <li>Make sure dependencies on GNU make are really necessary.
131: </ul>
132:
1.14 ! couderc 133: <li><i>regress</i>
! 134: <ul>
! 135: <li>Check for errors (empty tests means okay).
! 136: </ul>
! 137:
! 138:
1.8 avsm 139: <li><i>fake</i>
140: <ul>
141: <li>This target installs the application into a fake working
142: directory, to ensure that all files can be easily packaged up
143: without affecting the base system.
144: <li>The port should <b>never</b> install files outside of the
145: fake directory (such as into <tt>/usr/local</tt>).
146: <li>GNU libtool occasionally has trouble relinking libraries
147: during the fake process on some architectures.
148: </ul>
149:
150: <li><i>package</i>
151: <ul>
152: <li>Package creation can break if pkg/PLIST* and/or
153: pkg/PFRAG* are wrong.</li>
154: </ul>
155:
156: <li><i>install</i>
157: <ul>
158: <li>Packages should install all of the files from their packaging
159: lists successfully and with the correct permissions. Be especially
160: careful of files with the setuid bits set.
161: <li>Make sure that the package <tt>INSTALL</tt> script works
162: correctly, and does not overwrite any files in <tt>/etc</tt>.
163: </ul>
164:
165: <li><i>deinstall</i>
166: <ul>
167: <li>This should remove all files installed by the package, except
168: those in <tt>/etc</tt>.
169: <li>Make sure that the <tt>DEINSTALL</tt> script works as expected.
170: </ul>
1.1 couderc 171: </ul>
172:
1.11 avsm 173: <p>Remaining <tt>pkg/</tt> files like DESCR and MESSAGE should be checked
174: for grammar and typos. Paragraphs should be formatted using
175: <a href="http://www.openbsd.org/cgi-bin/man.cgi?query=fmt&sektion=1&format=html">fmt(1)</a> and wrapped at 70 characters.</p>
1.1 couderc 176:
177: <h2><a name="Commenting"><font color="#0000e0">Commenting</font></a></h2>
178:
179: <p>At the end of the test comes the really important thing : comments.
1.7 couderc 180: Even if the port is working fine comments must be done. If we have ten
1.3 couderc 181: posts where people say that the port runs fine under different architectures
1.7 couderc 182: then the commit is done faster. If it does not work then some information
183: must be given.
184: There are tools that can help in this task, like <a href=
1.1 couderc 185: "http://www.openbsd.org/cgi-bin/cvsweb/ports/infrastructure/build/portslogger">
1.14 ! couderc 186: portslogger</a> which is like an "intelligent tee" that redirects output
! 187: into a log file.</p>
1.1 couderc 188:
189: <p>Example :<br>
190: </p>
191:
192: <div style="margin-left: 2em">
1.11 avsm 193: <table border="0" cellpadding="3" width="90%">
1.1 couderc 194: <tr>
195: <td nowrap bgcolor="#EEEEEE">
196: <pre>
1.6 couderc 197: # make install | /usr/ports/infrastructure/build/portslogger .
1.1 couderc 198: </pre>
199: </td>
200: </tr>
201: </table>
202: </div>
203: <br>
204: <br>
205:
206:
1.3 couderc 207: <p>This will redirect the output into a log file located in the current
1.1 couderc 208: directory.</p>
209:
210: <h2><a name="More"><font color="#0000e0">More testing</font></a></h2>
211:
1.7 couderc 212: <p>Check the port Makefile for typos, incorrect links, useless or
1.11 avsm 213: missing variables, correct licensing and categories.
1.7 couderc 214: For those who are more skilled other targets can be tested like
1.11 avsm 215: <i>lib-depends-check</i>, examining patches, as well as providing
216: diffs to correct bugs, add flavors, or other enhancements.</p>
217: <p>These diffs should be done with the <tt>-uNr --exclude=CVS</tt> options.
218: <tt>cvs diff -uN</tt> can also be used to generate patches against
219: the CVS repository.</p>
1.1 couderc 220: <hr>
1.13 jufi 221: <small>
222: <p>
1.14 ! couderc 223: $OpenBSD: porttest.html,v 1.13 2002/10/10 11:26:50 jufi Exp $
1.13 jufi 224: <br>
1.9 avsm 225: Copyright © 2002 OpenBSD</p>
1.8 avsm 226: </small>
1.1 couderc 227: </body>
228: </html>