Annotation of www/porting.html, Revision 1.8
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.8 ! marc 46: <li>Section 19.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.
1.8 ! marc 49: <li>Marc's porting <a href="checklist.html">checklist</a>.
1.1 marc 50: <li>The OpenBSD ports mailing list,
51: <a href="mailto:ports@openbsd.org">ports@OpenBSD.ORG</a>.
52: </ul>
53: <h3><font color=#0000e0>OpenBSD Porting Policy</font></h3>
54: <ul>
55: <li>OpenBSD does NOT use /usr/local/etc/rc.d.<br>
1.7 espie 56: <code>/usr/local</code> is often shared between several machines
1.8 ! marc 57: thanks to NFS. For this reason, configuration files that are specific
! 58: to a given machine can't be stored under <code>/usr/local</code>,
! 59: <code>/etc</code> is the central repository for per machine
! 60: configuration files. Moreover, OpenBSD policy is to never update
! 61: files under <code>/etc</code> automatically. Ports that need some
! 62: specific boot setup should advise the administrator about what to do
! 63: instead of blindly installing files.
1.1 marc 64: <li>OpenBSD does NOT compress man pages.
65: <li>OpenBSD does NOT require <code>-lcrypt</code>.<br>
66: DES encryption is part of the standard <code>libc</code>.
67: <li>OpenBSD requests all <code>mktemp</code> warnings to be fixed.
68: This is not as simple as <code>s/mktemp/mkstemp/g</code>. If
1.2 marc 69: you are not absolutely sure of what you are doing please request
1.1 marc 70: help from the <a href="mailto:ports@openbsd.org">ports</a> mailing
71: list.
72: <li>Any software to be installed as a server should be scanned
73: for buffer overflows, especially unsafe use of
74: <code>strcat/strcpy/strcmp/sprintf</code>. In general,
75: <code>sprintf</code> should be replaced with <code>snprintf</code>.
1.4 marc 76: <li>Be sure to add the <code>$</code><code>OpenBSD$</code> CVS tag to
77: the Makefile. If importing a port from another system be sure to
78: leave their tag in the Makefile, too. However, replace the FreeBSD
79: <code>$</code><code>Id$</code> tag with the
80: <code>$</code><code>FreeBSD$</code> tag.
1.5 marc 81: <li>Do NOT use alpha or beta code when preparing a port. Use the
82: latest regular or patch release.
83: <li>The goal is to get all ported applications to support OpenBSD. To
84: achieve this goal you MUST feed any OpenBSD patches back to the
85: application maintainer.
1.1 marc 86: </ul>
87: <h3><font color=#0000e0>Other Helpful Hints</font></h3>
88: <ul>
89: <li>Do not assume <code>/usr/local/bin</code> or
90: <code>/usr/X11R6/bin</code> is in the installers path. A good
91: way to verify this is to create and install your port while
92: running as <code>root</code> with only <code>/bin</code> and
93: <code>/usr/bin</code> in your path.
94: <li>Do NOT generate shared libraries for <code>${MACHINE_ARCH} ==
95: alpha</code>
96: <li>In OpenBSD <code>curses.h/libcurses/libtermlib</code> are the
97: ``new curses''. Change:<br>
98: <code>ncurses.h ==> curses.h</code><br>
99: <code>-lncurses ==> -lcurses</code><br>
100: ``Old curses'' is available as <code>ocurses.h/libocurses</code>.
101: </ul>
102: <hr>
1.6 pauls 103: <a href="index.html"><img height=24 width=24 src=back.gif border=0 alt=OpenBSD></a>
1.1 marc 104: <a href=mailto:www@openbsd.org>www@openbsd.org</a>
1.8 ! marc 105: <br><small>$OpenBSD: porting.html,v 1.7 1998/07/30 14:58:43 espie Exp $</small>
1.1 marc 106: </body>
107: </html>