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

Annotation of www/porting.html, Revision 1.7

1.1       marc        1: <html>
                      2:  <head>
                      3:   <meta http-equiv="Content-Type"
                      4:        content="text/html; charset=iso-8859-1">
                      5:   <meta name="resource-type"
                      6:        content="document">
                      7:   <meta name="description"
                      8:        CONTENT="How to make an OpenBSD port">
                      9:   <meta name="keywords"
                     10:        content="openbsd,ports">
                     11:   <meta name="distribution"
                     12:        content="global">
                     13:   <meta name="copyright"
                     14:        content="This document copyright 1997 by the OpenBSD project">
                     15:   <title>Building an OpenBSD port</title>
                     16:   <link rev="made" HREF="mailto:www@openbsd.org">
                     17:  </head>
                     18:  <body text="#000000" bgcolor="#FFFFFF" link="#23238E">
1.6       pauls      19:   <img height=30 width=141 src=images/smalltitle.gif alt="[OpenBSD]" >
1.1       marc       20:
1.3       marc       21:   <h2><font color=#e00000>Building an OpenBSD port</font></h2>
1.1       marc       22:
                     23:    So you've just compiled your favorite software package on your
                     24:    OpenBSD machine and you want to share your effort by turning
                     25:    it into a standard port.  What to do?
                     26:   <p>
                     27:    This page will, when completed, provide the necessary guidance.
                     28:    Until then, however, please look at the available porting information,
                     29:    the OpenBSD porting policy, and the other helpful hints provided
                     30:    on this page.
                     31:   <p>
                     32:    If you are not capable of doing all the steps in a port, please do as
                     33:    much as you can before submitting it.  When you do submit the port,
                     34:    make sure you point out which parts you didn't do.
                     35:   <p>
                     36:   <h3><font color=#0000e0>Available Porting Information</font></h3>
                     37:   <ul>
                     38:    <li>The file <code>/usr/share/mk/bsd.port.mk</code>.  This is the
                     39:        system ports makefile included at the end of each individual
                     40:        port makefile.  Read the comments at the start of the makefile.
                     41:        They do a good job of describing the available make options.
                     42:    <li>The
                     43:        <a href="http://www.netbsd.org/Documentation/netbsd/Packages.txt">NetBSD
                     44:        Package System</a> documentation.  This document describes NetBSD's
                     45:        version of the FreeBSD ports system and is quite helpful.
1.2       marc       46:    <li>Section 17.2.5 of the
1.1       marc       47:        <a href="http://www.freebsd.org/handbook/porting.html">FreeBSD
                     48:        Handbook</a>.  This is the FreeBSD porting bible.
                     49:    <li>The OpenBSD ports mailing list,
                     50:        <a href="mailto:ports@openbsd.org">ports@OpenBSD.ORG</a>.
                     51:   </ul>
                     52:   <h3><font color=#0000e0>OpenBSD Porting Policy</font></h3>
                     53:   <ul>
                     54:    <li>OpenBSD does NOT use /usr/local/etc/rc.d.<br>
1.7     ! espie      55:        <code>/usr/local</code> is often shared between several machines
        !            56:                 thanks to NFS.  For this reason, configuration files that are specific
        !            57:                 to a given machine can't be stored under <code>/usr/local</code>,
        !            58:                 <code>/etc</code> is the central repository for per machine
        !            59:                 configuration files.  Moreover, OpenBSD policy is to never update
        !            60:                 files under <code>/etc</code> automatically.  Ports that need some
        !            61:                 specific boot setup should advise the administrator about what to do
        !            62:                 instead of blindly installing files.
1.1       marc       63:    <li>OpenBSD does NOT compress man pages.
                     64:    <li>OpenBSD does NOT require <code>-lcrypt</code>.<br>
                     65:        DES encryption is part of the standard <code>libc</code>.
                     66:    <li>OpenBSD requests all <code>mktemp</code> warnings to be fixed.
                     67:        This is not as simple as <code>s/mktemp/mkstemp/g</code>.  If
1.2       marc       68:        you are not absolutely sure of what you are doing please request
1.1       marc       69:        help from the <a href="mailto:ports@openbsd.org">ports</a> mailing
                     70:        list.
                     71:    <li>Any software to be installed as a server should be scanned
                     72:        for buffer overflows, especially unsafe use of
                     73:        <code>strcat/strcpy/strcmp/sprintf</code>.  In general,
                     74:        <code>sprintf</code> should be replaced with <code>snprintf</code>.
1.4       marc       75:    <li>Be sure to add the <code>$</code><code>OpenBSD$</code> CVS tag to
                     76:        the Makefile.  If importing a port from another system be sure to
                     77:        leave their tag in the Makefile, too.  However, replace the FreeBSD
                     78:        <code>$</code><code>Id$</code> tag with the
                     79:        <code>$</code><code>FreeBSD$</code> tag.
1.5       marc       80:    <li>Do NOT use alpha or beta code when preparing a port.  Use the
                     81:        latest regular or patch release.
                     82:    <li>The goal is to get all ported applications to support OpenBSD.  To
                     83:        achieve this goal you MUST feed any OpenBSD patches back to the
                     84:        application maintainer.
1.1       marc       85:   </ul>
                     86:   <h3><font color=#0000e0>Other Helpful Hints</font></h3>
                     87:   <ul>
                     88:    <li>Do not assume <code>/usr/local/bin</code> or
                     89:        <code>/usr/X11R6/bin</code> is in the installers path.  A good
                     90:        way to verify this is to create and install your port while
                     91:        running as <code>root</code> with only <code>/bin</code> and
                     92:        <code>/usr/bin</code> in your path.
                     93:    <li>Do NOT generate shared libraries for <code>${MACHINE_ARCH} ==
                     94:        alpha</code>
                     95:    <li>In OpenBSD <code>curses.h/libcurses/libtermlib</code> are the
                     96:        ``new curses''.  Change:<br>
                     97:        <code>ncurses.h ==> curses.h</code><br>
                     98:        <code>-lncurses ==> -lcurses</code><br>
                     99:        ``Old curses'' is available as <code>ocurses.h/libocurses</code>.
                    100:   </ul>
                    101:   <hr>
1.6       pauls     102:   <a href="index.html"><img height=24 width=24 src=back.gif border=0 alt=OpenBSD></a>
1.1       marc      103:   <a href=mailto:www@openbsd.org>www@openbsd.org</a>
1.7     ! espie     104:   <br><small>$OpenBSD: porting.html,v 1.6 1998/06/19 15:06:56 pauls Exp $</small>
1.1       marc      105:  </body>
                    106: </html>