Annotation of www/porttest.html, Revision 1.13
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>
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>
1.11 avsm 88: <li>Verify that downloaded distfiles match the checksums recorded in the <tt>distinfo</tt> file.</li>
1.10 couderc 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&sektion=3&">
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&sektion=3&"> 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.11 avsm 159: <p>Remaining <tt>pkg/</tt> files like DESCR and MESSAGE should be checked
160: for grammar and typos. Paragraphs should be formatted using
161: <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 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">
1.11 avsm 179: <table border="0" cellpadding="3" width="90%">
1.1 couderc 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
1.11 avsm 199: missing variables, correct licensing and categories.
1.7 couderc 200: For those who are more skilled other targets can be tested like
1.11 avsm 201: <i>lib-depends-check</i>, examining patches, as well as providing
202: diffs to correct bugs, add flavors, or other enhancements.</p>
203: <p>These diffs should be done with the <tt>-uNr --exclude=CVS</tt> options.
204: <tt>cvs diff -uN</tt> can also be used to generate patches against
205: the CVS repository.</p>
1.1 couderc 206: <hr>
1.13 ! jufi 207: <small>
! 208: <p>
! 209: $OpenBSD: porttest.html,v 1.12 2002/09/21 19:16:37 jufi Exp $
! 210: <br>
1.9 avsm 211: Copyright © 2002 OpenBSD</p>
1.8 avsm 212: </small>
1.1 couderc 213: </body>
214: </html>