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

File: [local] / www / Attic / porting.html (download) (as text)

Revision 1.9, Wed Aug 12 22:13:02 1998 UTC (25 years, 10 months ago) by marc
Branch: MAIN
Changes since 1.8: +12 -9 lines

update porting page: how to submit a port; update port status

<html>
 <head>
  <meta http-equiv="Content-Type"
	content="text/html; charset=iso-8859-1">
  <meta name="resource-type"
	content="document">
  <meta name="description"
	CONTENT="How to make an OpenBSD port">
  <meta name="keywords"
	content="openbsd,ports">
  <meta name="distribution"
	content="global">
  <meta name="copyright"
	content="This document copyright 1997 by the OpenBSD project">
  <title>Building an OpenBSD port</title>
  <link rev="made" HREF="mailto:www@openbsd.org">
 </head>
 <body text="#000000" bgcolor="#FFFFFF" link="#23238E">
  <img height=30 width=141 src=images/smalltitle.gif alt="[OpenBSD]" >

  <h2><font color=#e00000>Building an OpenBSD port</font></h2>

   So you've just compiled your favorite software package on your
   OpenBSD machine and you want to share your effort by turning
   it into a standard port.  What to do?
  <p>
   First look at the porting information on this page.  Then check
   out the referenced documents, especially the OpenBSD porting
   checklist.
  <p>
   Test, then re-test, and finally test again!
  <p>
   Submit the port.  Create a gzipped tarball of the port directory.
   You can then either place it on a public FTP or HTTP server, sending
   its address to <a href=mailto:ports@openbsd.org>ports@openbsd.org</a>
   or send the port mime encoded to the same address.  Pick whichever
   method works best for you.
  <p>
  <h3><font color=#0000e0>Available Porting Information</font></h3>
  <ul>
   <li>The file <code>/usr/share/mk/bsd.port.mk</code>.  This is the
       system ports makefile included at the end of each individual
       port makefile.  Read the comments at the start of the makefile.
       They do a good job of describing the available make options.
   <li>The
       <a href="http://www.netbsd.org/Documentation/netbsd/Packages.txt">NetBSD
       Package System</a> documentation.  This document describes NetBSD's
       version of the FreeBSD ports system and is quite helpful.
   <li>Section 19.2.5 of the
       <a href="http://www.freebsd.org/handbook/porting.html">FreeBSD
       Handbook</a>.  This is the FreeBSD porting bible.
   <li>OpenBSD porting <a href="checklist.html">checklist</a>.
   <li>The OpenBSD ports mailing list,
       <a href="mailto:ports@openbsd.org">ports@OpenBSD.ORG</a>.
  </ul>
  <h3><font color=#0000e0>OpenBSD Porting Policy</font></h3>
  <ul>
   <li>OpenBSD does NOT use /usr/local/etc/rc.d.<br>
       <code>/usr/local</code> is often shared between several machines 
	 thanks to NFS.  For this reason, configuration files that are specific
	 to a given machine can't be stored under <code>/usr/local</code>,
	 <code>/etc</code> is the central repository for per machine
	 configuration files.  Moreover, OpenBSD policy is to never update 
	 files under <code>/etc</code> automatically.  Ports that need some
	 specific boot setup should advise the administrator about what to do
	 instead of blindly installing files.
   <li>OpenBSD does NOT compress man pages.
   <li>OpenBSD does NOT require <code>-lcrypt</code>.<br>
       DES encryption is part of the standard <code>libc</code>.
   <li>OpenBSD requests all <code>mktemp</code> warnings to be fixed.
       This is not as simple as <code>s/mktemp/mkstemp/g</code>.  If
       you are not absolutely sure of what you are doing please request
       help from the <a href="mailto:ports@openbsd.org">ports</a> mailing
       list.
   <li>Any software to be installed as a server should be scanned
       for buffer overflows, especially unsafe use of
       <code>strcat/strcpy/strcmp/sprintf</code>.  In general,
       <code>sprintf</code> should be replaced with <code>snprintf</code>.
   <li>Be sure to add the <code>$</code><code>OpenBSD$</code> CVS tag to
       the Makefile.  If importing a port from another system be sure to
       leave their tag in the Makefile, too.  However, replace the FreeBSD
       <code>$</code><code>Id$</code> tag with the
       <code>$</code><code>FreeBSD$</code> tag.
   <li>Do NOT use alpha or beta code when preparing a port.  Use the
       latest regular or patch release.
   <li>The goal is to get all ported applications to support OpenBSD.  To
       achieve this goal you MUST feed any OpenBSD patches back to the
       application maintainer.
  </ul>
  <h3><font color=#0000e0>Other Helpful Hints</font></h3>
  <ul>
   <li>Do not assume <code>/usr/local/bin</code> or
       <code>/usr/X11R6/bin</code> is in the installers path.  A good
       way to verify this is to create and install your port while
       running as <code>root</code> with only <code>/bin</code> and
       <code>/usr/bin</code> in your path.
   <li>Do NOT generate shared libraries for <code>${MACHINE_ARCH} ==
       alpha</code>
   <li>In OpenBSD <code>curses.h/libcurses/libtermlib</code> are the
       ``new curses''.  Change:<br>
       <code>ncurses.h ==> curses.h</code><br>
       <code>-lncurses ==> -lcurses</code><br>
       ``Old curses'' is available as <code>ocurses.h/libocurses</code>.
  </ul>
  <hr>
  <a href="index.html"><img height=24 width=24 src=back.gif border=0 alt=OpenBSD></a> 
  <a href=mailto:www@openbsd.org>www@openbsd.org</a>
  <br><small>$OpenBSD: porting.html,v 1.9 1998/08/12 22:13:02 marc Exp $</small>
 </body>
</html>