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

Diff for /www/Attic/checklist.html between version 1.21 and 1.22

version 1.21, 2000/03/11 07:43:53 version 1.22, 2000/03/11 18:49:19
Line 6 
Line 6 
 <meta name="description" CONTENT="How to make/update an OpenBSD port.">  <meta name="description" CONTENT="How to make/update an OpenBSD port.">
 <meta name="keywords" content="openbsd,ports">  <meta name="keywords" content="openbsd,ports">
 <meta name="distribution" content="global">  <meta name="distribution" content="global">
 <meta name="copyright" content="This document copyright 1998 by OpenBSD.">  <meta name="copyright" content="This document copyright 1998-2000 by OpenBSD.">
   
 <title>OpenBSD Porting Checklist</title>  <title>OpenBSD Porting Checklist</title>
  </head>   </head>
   
 <body text="#000000" bgcolor="#FFFFFF" link="#23238E">  <body text=Black bgcolor=White link="#23238E">
 <img height=30 width=141 src=images/smalltitle.gif alt="[OpenBSD]" >  <img height=30 width=141 src=images/smalltitle.gif alt="[OpenBSD]" >
   
 <h2><font color="#e00000">OpenBSD Porting Checklist</font></h2>  <h2><font color="#e00000">OpenBSD Porting Checklist</font></h2>
Line 24 
Line 24 
 <hr>  <hr>
 <ol>  <ol>
   
 <p><li>  <li>
 If you want to be a maintainer, subscribe to  If you want to be a maintainer, subscribe to
 <a href="mailto:ports@openbsd.org"> ports@openbsd.org.</a>  <a href="mailto:ports@openbsd.org"> ports@openbsd.org.</a>
 <ul><li>  <ul><li>
Line 36 
Line 36 
 good advice or test ports for you.  good advice or test ports for you.
 </ul>  </ul>
   
 <p><li>  <br><li>
 Check out a copy of the ports tree from cvs.  Check out a copy of the ports tree from cvs.
 You can find instructions to do this at  You can find instructions to do this at
 <a href="http://www.openbsd.org/anoncvs.html">  <a href="http://www.openbsd.org/anoncvs.html">
 http://www.openbsd.org/anoncvs.html</a>.  http://www.openbsd.org/anoncvs.html</a>.
   
 <p><li>  <br><br><li>
 Pick a place to put your port and create the basic  Pick a place to put your port and create the basic
 infrastructure there.  Use the template Makefile at  infrastructure there.  Use the template Makefile at
 <code>/usr/ports/infrastructure/templates/Makefile.template</code>.  <code>/usr/ports/infrastructure/templates/Makefile.template</code>.
Line 52 
Line 52 
 Create these empty files <code>pkg/COMMENT, pkg/DESCR, pkg/PLIST</code>  Create these empty files <code>pkg/COMMENT, pkg/DESCR, pkg/PLIST</code>
 </ul>  </ul>
   
 <p><li>  <br><li>
 Add the fetch portions of the Makefile.  Add the fetch portions of the Makefile.
 <ul><li>  <ul><li>
 Fill in EXTRACT_SUFFIX if its anything besides .tar.gz.  Other examples are  Fill in EXTRACT_SUFFIX if its anything besides .tar.gz.  Other examples are
Line 61 
Line 61 
 Fill in DISTNAME which is the name of the file minus the extract suffix.  E.g. if you have foo-1.0.tar.gz, DISTNAME is foo-1.0.  Fill in DISTNAME which is the name of the file minus the extract suffix.  E.g. if you have foo-1.0.tar.gz, DISTNAME is foo-1.0.
 <li>  <li>
 Fill in MASTER_SITES which is a URL to the directory where the distfile  Fill in MASTER_SITES which is a URL to the directory where the distfile
 is kept.  E.g. ftp://ftp.openbsd.org/pub/OpenBSD/distfiles/  <b>Don't forget  is kept.  E.g. ftp://ftp.openbsd.org/pub/OpenBSD/distfiles/ . <strong>Don't forget
 the trailing slash.</b>  Try to have at least three distinct sites as well.  the trailing slash.</strong> Try to have at least three distinct sites as well.
 Place the most easily accessible first as they are traversed in order.  Place the most easily accessible first as they are traversed in order.
 <li>  <li>
 Keep in mind that fetch references the file as  Keep in mind that fetch references the file as
Line 76 
Line 76 
 For more complex ports, you have more options and tools available to you:  For more complex ports, you have more options and tools available to you:
 <ul><li>  <ul><li>
 You also have the variable PATCHFILES available.  This is a list of vendor  You also have the variable PATCHFILES available.  This is a list of vendor
 (not openbsd) patches to the port.  Common uses are things like security  (not OpenBSD) patches to the port.  Common uses are things like security
 or reliability fixes.  or reliability fixes.
 <li>  <li>
 If your ports are available over large public mirrors such as GNU, SunSite, or  If your ports are available over large public mirrors such as GNU, SunSite, or
Line 107 
Line 107 
 mirror-distfiles will fetch those supplementary files that the casual user doesn't need.  mirror-distfiles will fetch those supplementary files that the casual user doesn't need.
 </ul>  </ul>
   
 <p><li>  <br><li>
 Create a checksum in <i>files/md5</i> by typing <b>make makesum</b>.  Create a checksum in <i>files/md5</i> by typing <b>make makesum</b>.
 Then verify the checksum is correct by typing <b>make checksum</b>  Then verify the checksum is correct by typing <b>make checksum</b>
 <ul><li>  <ul><li>
Line 125 
Line 125 
 Patches that need specific treatment should be mentioned in DISTFILES, and removed from EXTRACT_ONLY, for historic reasons.  Patches that need specific treatment should be mentioned in DISTFILES, and removed from EXTRACT_ONLY, for historic reasons.
 </ul>  </ul>
   
 <p><li>  <br><li>
 Extract the port with <b>make extract</b>.  Pay attention to where the base  Extract the port with <b>make extract</b>.  Pay attention to where the base
 of the sources are.  Usually, its <i>work/DISTNAME</i> You may need to modify  of the sources are.  Usually, its <i>work/DISTNAME</i> You may need to modify
 the Makefile's WRKDIST variable if it is different.  the Makefile's WRKDIST variable if it is different.
   
 <p><li>  <br><br><li>
 Read the installation documentation and note what you have to do to build  Read the installation documentation and note what you have to do to build
 the port and any special options that might be needed.  the port and any special options that might be needed.
 <p><li>  
   <br><br><li>
 Now is also a good time to figure out what kind of licensing restrictions  Now is also a good time to figure out what kind of licensing restrictions
 apply to your port.  Many are freely redistribution but then again, quite  apply to your port.  Many are freely redistribution but then again, quite
 a few are not.  We need four questions answered to distribute ports  a few are not.  We need four questions answered to distribute ports
Line 152 
Line 153 
 later on.  E.g. some ports require to install a copy of the license.  We  later on.  E.g. some ports require to install a copy of the license.  We
 recommend you place the license in <code>/usr/local/share/DISTNAME/</code>.  recommend you place the license in <code>/usr/local/share/DISTNAME/</code>.
   
 <p><li>  <br><br><li>
 Add configuration options to Makefile and/or create the configuration script.  Add configuration options to Makefile and/or create the configuration script.
 <ul><li>  <ul><li>
 You can add a port configuration script named `configure' to a directory  You can add a port configuration script named `configure' to a directory
Line 169 
Line 170 
 overwrite it.  overwrite it.
 </ul>  </ul>
   
 <p><li>  <br><li>
 Try building the port with <b>make build</b>.  Try building the port with <b>make build</b>.
 <ul><li>  <ul><li>
 If you're lucky, the port will go all the way through without errors.  If you're lucky, the port will go all the way through without errors.
Line 183 
Line 184 
 and patch your port.  and patch your port.
 </ul>  </ul>
   
 <p><li>  <br><li>
 Begin and cycle of <b>make build</b>, generate a patch, and  Begin and cycle of <b>make build</b>, generate a patch, and
 <b>make clean patch</b>.  <b>make clean patch</b>.
 <ul><li>  <ul><li>
Line 211 
Line 212 
 <b>Please</b> feed your patches back to the author of that piece of software.  <b>Please</b> feed your patches back to the author of that piece of software.
 </ul>  </ul>
   
 <p><li>  <br><li>
 Try setting <code>SEPARATE_BUILD</code><br>  Try setting <code>SEPARATE_BUILD</code><br>
 <ul><li>  <ul><li>
 If the port can build with object files outside its source tree,  If the port can build with object files outside its source tree,
Line 222 
Line 223 
 restart the cycle at <code>configure</code> most of the time.  restart the cycle at <code>configure</code> most of the time.
 </ul>  </ul>
   
 <p><li>  <br><li>
 Peruse the output (if any) and tweak any options in the Makefile.  Peruse the output (if any) and tweak any options in the Makefile.
 To repeat issue the command `<b>make clean configure</b>'.  To repeat issue the command `<b>make clean configure</b>'.
 <p>  <p>
 Note: make sure host dependent files go in <i>/etc</i> or  Note: make sure host dependent files go in <i>/etc</i> or
 <i>/etc/&lt;name&gt;</i>, but <b>NEVER REPLACE OR MODIFY</b> existing files  <i>/etc/&lt;name&gt;</i>, but <strong>NEVER REPLACE OR MODIFY</strong> existing files
 in <i>/etc</i>.  Best to have install place  in <i>/etc</i>.  Best to have install place
 in <i>/usr/local/share/&lt;name&gt;</i> and then copy to  in <i>/usr/local/share/&lt;name&gt;</i> and then copy to
 <i>/etc</i> or <i>/etc/&lt;name&gt;</i> only if the files do not exist.  <i>/etc</i> or <i>/etc/&lt;name&gt;</i> only if the files do not exist.
Line 253 
Line 254 
    misc documentation:                  /usr/local/share/doc/&lt;name&gt;     misc documentation:                  /usr/local/share/doc/&lt;name&gt;
 </pre>  </pre>
   
 <p><li>  <li>
 Begin a cycle of makes until the port is ready.  Patch (see above)  Begin a cycle of makes until the port is ready.  Patch (see above)
 clean, and make until the port is generated.  Get rid of all warnings  clean, and make until the port is generated.  Get rid of all warnings
 if possible, especially security related warnings.  if possible, especially security related warnings.
 <p><li>  
   <br><br><li>
 Control SEPARATE_BUILD semantics.  Control SEPARATE_BUILD semantics.
 You have to do this only if the port builds with  You have to do this only if the port builds with
 SEPARATE_BUILD defined.  SEPARATE_BUILD defined.
Line 271 
Line 273 
 distinct arches simultaneously may meet with problems, as some  distinct arches simultaneously may meet with problems, as some
 source files may be regenerated at awkward moments.  source files may be regenerated at awkward moments.
   
 <p><li>  <br><br><li>
 Edit <i>pkg/DESCR</i>, <i>pkg/COMMENT</i>, <i>pkg/PLIST</i>.  Edit <i>pkg/DESCR</i>, <i>pkg/COMMENT</i>, <i>pkg/PLIST</i>.
 <ul>  <ul>
 <li>  <li>
Line 286 
Line 288 
 PLIST is kept empty at this point.  PLIST is kept empty at this point.
 </ul>  </ul>
   
 <p><li>  <br><li>
 Install the application with <b>make install</b>  Install the application with <b>make install</b>
 <p>  <p>
 If the port installs dynamic libraries, check their symbol tables  If the port installs dynamic libraries, check their symbol tables
 with <code>nm</code>, as some mistaken software strips dynamic libraries,  with <code>nm</code>, as some mistaken software strips dynamic libraries,
 which may lead to weird failures later.  which may lead to weird failures later.
   
 <p><li>  <br><br><li>
 <strong>Check port for security holes again</strong>. This is  <strong>Check port for security holes again</strong>. This is
 especially important for network and setuid programs. See  especially important for network and setuid programs. See
 <a href="porting.html#security">our security recommendations</a>  <a href="porting.html#security">our security recommendations</a>
Line 311 
Line 313 
       The server makes extensive use of strlcpy/strlcat/snprintf.        The server makes extensive use of strlcpy/strlcat/snprintf.
 </pre>  </pre>
   
 <p><li>  <li>
 Create pkg/PLIST.  After the install is complete use the developer's command,  Create pkg/PLIST.  After the install is complete use the developer's command,
 <b>make plist</b> which makes the file PLIST-auto in the <i>pkg</i> directory.  <b>make plist</b> which makes the file PLIST-auto in the <i>pkg</i> directory.
 This file is a candidate packing list.  This file is a candidate packing list.
Line 351 
Line 353 
 shared libraries.  shared libraries.
 </ul>  </ul>
   
 <p><li>  <br><li>
 Keep repeating uninstall and reinstall until perfect.<br>  Keep repeating uninstall and reinstall until perfect.<br>
 <em>Perfect</em> is when everything installs and uninstalls  <em>Perfect</em> is when everything installs and uninstalls
 in its proper location.  `pkg_delete &lt;pkg_name&gt;' is  in its proper location.  `pkg_delete &lt;pkg_name&gt;' is
Line 361 
Line 363 
 <p><code>find /usr/local -newer work/.install_started -print</code>  <p><code>find /usr/local -newer work/.install_started -print</code>
 <p>should only list standard directory names.  <p>should only list standard directory names.
   
 <p><li>  <br><br><li>
 Test the packaging:<br>  Test the packaging:<br>
 After the port installs correctly issue the command  After the port installs correctly issue the command
 <code>make package</code> to create a package.  To test the  <code>make package</code> to create a package.  To test the
Line 369 
Line 371 
 <code>pkg_add</code>   The results after an add should EXACTLY  <code>pkg_add</code>   The results after an add should EXACTLY
 match the results after a `make install'.  match the results after a `make install'.
   
 <p><li>  <br><br><li>
 Mail <a href="mailto:ports@openbsd.org">ports@openbsd.org</a> with a short  Mail <a href="mailto:ports@openbsd.org">ports@openbsd.org</a> with a short
 note asking for comments and testing.  Attach the port to this email and  note asking for comments and testing.  Attach the port to this email and
 sent it out.  If you don't get any comments, send email to  sent it out.  If you don't get any comments, send email to
Line 378 
Line 380 
 Try to get others to test it on a variety of platforms for you.  Try to get others to test it on a variety of platforms for you.
 <ul><li>  <ul><li>
 The DEC Alpha is good  because it has only static libraries and because  The DEC Alpha is good  because it has only static libraries and because
 sizeof(int) != sizeof(long)  <code>sizeof(int) != sizeof(long)</code>
 <li>  <li>
 Sun SPARC is good because it is very common and because its byte order is  Sun SPARC is good because it is very common and because its byte order is
 the reverse of i386; if you developed on SPARC, of course, you'd want it  the reverse of i386; if you developed on SPARC, of course, you'd want it
 tested on i386).  tested on i386).
 <p>  
 </ul>  </ul>
   
 <p><li>  <br><li>
 Incorporate any feedback you get. Test it again on your platform.  Incorporate any feedback you get. Test it again on your platform.
 Get those who gave you feedback to test it again from your new port.  Get those who gave you feedback to test it again from your new port.
   
 <p><li>  <br><br><li>
 Finally, include it in the "ports" tree.  Finally, include it in the "ports" tree.
 <p>  <p>
 If you do not have CVS access, ask someone on  If you do not have CVS access, ask someone on
Line 398 
Line 399 
 about me, <a href="turan@openbsd.org">turan@openbsd.org</a> if no one  about me, <a href="turan@openbsd.org">turan@openbsd.org</a> if no one
 picks it up.  picks it up.
   
 <p><li>  <br><br><li>
 If you are a developer with CVS access, check it in.  If you are a developer with CVS access, check it in.
 We normally use "import" for a new port,  We normally use "import" for a new port,
 rather than adding a zillion (or a dozen) files individually.  rather than adding a zillion (or a dozen) files individually.
Line 452 
Line 453 
 $  $
 </pre>  </pre>
   
 <p><li>  <li>
 Last but not least, add a one-line entry for the new port  Last but not least, add a one-line entry for the new port
 in its parent directory's makefile, i.e., for ports/lang/kaffe1,  in its parent directory's makefile, i.e., for ports/lang/kaffe1,
 add it to ports/lang/Makefile.  add it to ports/lang/Makefile.
   
 <p><li>  <br><br><li>
 Maintain the port!  As time goes by, problems may arise, or new versions  Maintain the port!  As time goes by, problems may arise, or new versions
 of the software may be released. You should strive to keep your port up  of the software may be released. You should strive to keep your port up
 to date.  In other words - iterate, test, test, iterate, ...  to date.  In other words - iterate, test, test, iterate...
 </ul>  </ol>
   
 Thank you for supporting the OpenBSD "ports" process!  Thank you for supporting the OpenBSD "ports" process!
 <hr>  <hr>

Legend:
Removed from v.1.21  
changed lines
  Added in v.1.22