Annotation of www/porting.html, Revision 1.9
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>
1.9 ! marc 27: First look at the porting information on this page. Then check
! 28: out the referenced documents, especially the OpenBSD porting
! 29: checklist.
1.1 marc 30: <p>
1.9 ! marc 31: Test, then re-test, and finally test again!
! 32: <p>
! 33: Submit the port. Create a gzipped tarball of the port directory.
! 34: You can then either place it on a public FTP or HTTP server, sending
! 35: its address to <a href=mailto:ports@openbsd.org>ports@openbsd.org</a>
! 36: or send the port mime encoded to the same address. Pick whichever
! 37: method works best for you.
1.1 marc 38: <p>
39: <h3><font color=#0000e0>Available Porting Information</font></h3>
40: <ul>
41: <li>The file <code>/usr/share/mk/bsd.port.mk</code>. This is the
42: system ports makefile included at the end of each individual
43: port makefile. Read the comments at the start of the makefile.
44: They do a good job of describing the available make options.
45: <li>The
46: <a href="http://www.netbsd.org/Documentation/netbsd/Packages.txt">NetBSD
47: Package System</a> documentation. This document describes NetBSD's
48: version of the FreeBSD ports system and is quite helpful.
1.8 marc 49: <li>Section 19.2.5 of the
1.1 marc 50: <a href="http://www.freebsd.org/handbook/porting.html">FreeBSD
51: Handbook</a>. This is the FreeBSD porting bible.
1.9 ! marc 52: <li>OpenBSD porting <a href="checklist.html">checklist</a>.
1.1 marc 53: <li>The OpenBSD ports mailing list,
54: <a href="mailto:ports@openbsd.org">ports@OpenBSD.ORG</a>.
55: </ul>
56: <h3><font color=#0000e0>OpenBSD Porting Policy</font></h3>
57: <ul>
58: <li>OpenBSD does NOT use /usr/local/etc/rc.d.<br>
1.7 espie 59: <code>/usr/local</code> is often shared between several machines
1.8 marc 60: thanks to NFS. For this reason, configuration files that are specific
61: to a given machine can't be stored under <code>/usr/local</code>,
62: <code>/etc</code> is the central repository for per machine
63: configuration files. Moreover, OpenBSD policy is to never update
64: files under <code>/etc</code> automatically. Ports that need some
65: specific boot setup should advise the administrator about what to do
66: instead of blindly installing files.
1.1 marc 67: <li>OpenBSD does NOT compress man pages.
68: <li>OpenBSD does NOT require <code>-lcrypt</code>.<br>
69: DES encryption is part of the standard <code>libc</code>.
70: <li>OpenBSD requests all <code>mktemp</code> warnings to be fixed.
71: This is not as simple as <code>s/mktemp/mkstemp/g</code>. If
1.2 marc 72: you are not absolutely sure of what you are doing please request
1.1 marc 73: help from the <a href="mailto:ports@openbsd.org">ports</a> mailing
74: list.
75: <li>Any software to be installed as a server should be scanned
76: for buffer overflows, especially unsafe use of
77: <code>strcat/strcpy/strcmp/sprintf</code>. In general,
78: <code>sprintf</code> should be replaced with <code>snprintf</code>.
1.4 marc 79: <li>Be sure to add the <code>$</code><code>OpenBSD$</code> CVS tag to
80: the Makefile. If importing a port from another system be sure to
81: leave their tag in the Makefile, too. However, replace the FreeBSD
82: <code>$</code><code>Id$</code> tag with the
83: <code>$</code><code>FreeBSD$</code> tag.
1.5 marc 84: <li>Do NOT use alpha or beta code when preparing a port. Use the
85: latest regular or patch release.
86: <li>The goal is to get all ported applications to support OpenBSD. To
87: achieve this goal you MUST feed any OpenBSD patches back to the
88: application maintainer.
1.1 marc 89: </ul>
90: <h3><font color=#0000e0>Other Helpful Hints</font></h3>
91: <ul>
92: <li>Do not assume <code>/usr/local/bin</code> or
93: <code>/usr/X11R6/bin</code> is in the installers path. A good
94: way to verify this is to create and install your port while
95: running as <code>root</code> with only <code>/bin</code> and
96: <code>/usr/bin</code> in your path.
97: <li>Do NOT generate shared libraries for <code>${MACHINE_ARCH} ==
98: alpha</code>
99: <li>In OpenBSD <code>curses.h/libcurses/libtermlib</code> are the
100: ``new curses''. Change:<br>
101: <code>ncurses.h ==> curses.h</code><br>
102: <code>-lncurses ==> -lcurses</code><br>
103: ``Old curses'' is available as <code>ocurses.h/libocurses</code>.
104: </ul>
105: <hr>
1.6 pauls 106: <a href="index.html"><img height=24 width=24 src=back.gif border=0 alt=OpenBSD></a>
1.1 marc 107: <a href=mailto:www@openbsd.org>www@openbsd.org</a>
1.9 ! marc 108: <br><small>$OpenBSD: porting.html,v 1.8 1998/07/30 23:04:47 marc Exp $</small>
1.1 marc 109: </body>
110: </html>