ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/www/trunk/documentation/mports/policy.html
Revision: 323
Committed: Mon May 25 17:21:13 2009 UTC (14 years, 11 months ago) by laffer1
Content type: text/html
File size: 6370 byte(s)
Log Message:
Move these files from docs to documentation

File Contents

# Content
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
2 "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
6 <title>MidnightBSD :: Documentation :: mports</title>
7 <link rel="stylesheet" type="text/css" media="all" href="/css/base.css" />
8 <!-- $MidnightBSD: www/docs/mports/policy.html,v 1.13 2008/04/02 18:21:25 ctriv Exp $ -->
9 </head>
10
11 <body>
12
13 <!--#include virtual="/header.html" -->
14
15 <div id="content">
16
17 <div id="rnav">
18 <ul>
19 <li><a href="/index.html" title="Home">Home</a></li>
20 <li><a href="/about/index.html" title="About">About</a></li>
21 <li><a href="/download/index.html" title="Get MidnightBSD">Get MidnightBSD</a></li>
22 <li><a href="/docs/index.html" title="Documentation">Documentation</a></li>
23 <li><a href="/community/index.html" title="Community">Community</a></li>
24 <li><a href="/developer/index.html" title="Developers">Developers</a></li>
25 <li><a href="/support/index.html" title="Support">Support</a></li>
26 <li><a href="/wiki" title="MidnightBSD Wiki">Wiki</a></li>
27 </ul>
28
29 <p>
30 <a href="/de/index.html" title="German">DE</a>
31 <a href="/index.html" title="English">EN</a>
32 <a href="/ru/index.html" title="Russian">RU</a>
33 </p>
34
35 <p style="border-top: thin dashed silver; padding-top: 10px;"><img src="/images/feed.gif" alt="RSS Feed" />
36 <a href="http://www.justjournal.com/users/mbsd/rss">Developer Blog</a></p>
37 </div>
38
39 <h1>Mports Policies</h1>
40
41 <p>If you are working on mports, you should define the MPORT_MAINTAINER_MODE variable in your make.conf.</p>
42
43 <p>The following are guidelines for the behavior and layout of a port. <em>Any time</em> a port is updated or created, it should be checked for compliance with these guidelines. Note that this is a living document that should be checked from time to time for changes.</p>
44
45 <h2>PKGNAME</h2>
46
47 <p>(Note that PKGNAME currently includes the version, which is unfortunate and an artifact from our FreeBSD roots. In time PKGNAME will be renamed, and PKGSUBNAME will renamed to PKGNAME.)</p>
48
49 <p>Every PKGSUBNAME must be unique. This is not currently the case in the tree, but work has begun on this front.</p>
50
51 <h2>PORTREVISION</h2>
52
53 <p>The PORTREVISION variable should only be incremented when there changes that will affect:</p>
54 <ul>
55 <li>Behaviors. (used to provide the foo widget, changed this to the bar widget).
56 <li>File locations (moved configuration file to $PREFIX/etc/ instead of $PREFIX/$PKGSUBNAME/etc)</li>
57 <li>Dependencies up or down the chain. (some depend bumped a shared lib version, bump so that people will get the new version and link correctly).
58 <li>Other issuse at the port maintainer's discretion.</li>
59 </ul>
60 <p>The following are <em>not</em> cause for incrementing the PORTREVISION:</p>
61 <ul>
62 <li>Fixing a broken port. Version numbers are for tracking packages, not ports.</li>
63 <li>Setting the LICENSE variable</li>
64 <li>Stylistic changes</p>
65 </ul>
66
67 <p>PORTREVISION used to be bumped in more cases, due to the way that our cluster software used to work. The cluster now checks each port for each run.</p>
68
69 <h2>LICENSE</h2>
70
71 <p>Every port should define a LICENSE variable with a valid license. A list of valid licenses is printed by the <code>license-list</code> target. The LICENSE variable should immediately follow the COMMENT variable.</p>
72
73 <h2>INSTALLS_SHLIB</h2>
74
75 <p>No port should use the INSTALLS_SHLIB variable. Use USE_LDCONFIG instead.</p>
76
77 <h2>MASTER_SITES</h2>
78
79 <p>Every port should define at least 2 master sites.</p>
80
81 <h2>OSVERSION</h2>
82
83 <p>No port should use OSVERSION. Currently this refers to the FreeBSD version that MBSD branched from. This will not always be the case. Eventually this will refer to the MidnightBSD version. To facilitate this change, the old uses of OSVERSION must be removed.</p>
84
85 <h2>Sub Files</h2>
86
87 <p>If a file like pkg-message or pkg-install requires varible substitution, the SUB_FILES framework must be used. Do not hand roll your own.</p>
88
89 <h2>Fake Cleanups</h2>
90
91 <p>No port should run a pkg-install script, or display a package message. This should be left to pkg_add.</p>
92
93 <h2>pkg-message format</h2>
94
95 <p>The pkg-message file should be as simple in layout as possible. There should be no ascii art or lines. Eventually this message may be displayed in the GUI, do not assume that it merely needs to look good on the command line.</p>
96
97 <h2>OPTIONS</h2>
98
99 <p>Use OPTIONS if there are knobs, even if there is only one knob. The mport package system is going to be options aware, but it can't use the options if they aren't defined.</p>
100
101 <h2>Man Pages</h2>
102
103 <p>Very old FreeBSD ports do not use the MANX variables for man pages. Any such port should be changed to use the MANX variables. This is important so that package deletion will correctly remove the man pages.</p>
104
105 <h2>pre-su-install</h2>
106
107 <p>Now that su is not used in the fake process, the pre-su-install target is deprecated. Usually it can be moved to the pre-install target, but if it is doing anything with the plist the maintainer will need to use their judgement to determine the correct fix.</p>
108
109 <h2>Old Variables</h2>
110
111 <p>The following variables are no longer used (they are either totally deprecated, or needed by older FreeBSD versions):</p>
112
113 <ul>
114 <li>USE_GETOPT_LONG</li>
115 <li>USE_REINPLACE</li>
116 </ul>
117
118 <p>No port should use these variables</p>
119
120 <h2>Interactive Scripts</h2>
121
122 <p>No pkg-install or pkg-deinstall script should expect to run in an interactive envirement. They should not prompt the user or expect input from the user.</p>
123
124 <h2>Plist and Echo</h2>
125
126 <p>Don't expect to be able to echo things to the user from the plist during
127 a <code>@exec</code> or <code>@unexec</code> directive. It will work fine
128 with the old FreeBSD pkg_* tools, but the behavior is undefined under
129 libmport. The user might see what you have to say, it might not. If in
130 doubt use a pkg-install script or a pkg-message file.</p>
131
132 <h2>pkg-req</h2>
133
134 <p>Package requirement scripts are deprecated. There is only one such script at the moment and its function will be reimplemented under the mport package system.</p>
135
136 </div>
137 <!-- END CONTENT -->
138
139 <!--#include virtual="/footer.html" -->
140
141 </body>
142 </html>