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

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

Revision 1.6, Fri Jun 19 15:06:56 1998 UTC (25 years, 11 months ago) by pauls
Branch: MAIN
Changes since 1.5: +3 -3 lines

Much work on image size tags.

<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>
   This page will, when completed, provide the necessary guidance.
   Until then, however, please look at the available porting information,
   the OpenBSD porting policy, and the other helpful hints provided
   on this page.
  <p>
   If you are not capable of doing all the steps in a port, please do as
   much as you can before submitting it.  When you do submit the port,
   make sure you point out which parts you didn't do.
  <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 17.2.5 of the
       <a href="http://www.freebsd.org/handbook/porting.html">FreeBSD
       Handbook</a>.  This is the FreeBSD porting bible.
   <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 NFS mounted; shared between
       machines in a cluster.  For this reason per machine configuration
       files are places in <code>/etc</code>.
   <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.6 1998/06/19 15:06:56 pauls Exp $</small>
 </body>
</html>