1 .\" $OpenBSD: packages-specs.7,v 1.24 2012/10/12 16:17:02 jmc Exp $
3 .\" Copyright (c) 2001 Marc Espie
5 .\" All rights reserved.
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
16 .\" THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR
17 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19 .\" IN NO EVENT SHALL THE DEVELOPERS BE LIABLE FOR ANY DIRECT, INDIRECT,
20 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 .Dd $Mdocdate: November 21 2011 $
32 .Nd binary package names specifications
34 Each package has a name consisting of at most three parts:
35 .Bd -literal -offset indent
36 stem-version[-flavors]
41 part identifies the package.
42 It may contain some dashes, but its form is mostly conventional.
43 For instance, japanese packages usually
51 part starts at the first digit that follows a
53 and goes on up to the following
55 or to the end of the package name, whichever comes first.
57 It is followed by the (possibly empty)
61 Thus, version numbers should always start with a digit and cannot contain
64 whereas flavors should never start with a digit.
66 All packages must have a version number.
67 Normally, the version number directly matches the original software
68 distribution version number, or release date.
69 In case there are substantial changes in the
71 package, a patch level marker should be appended, e.g.,
74 For example, assuming that the screen package for release 2.8 was
77 and that an important security patch led to a newer package,
78 the new package would be called
80 Obviously, these specific markers are reserved for
88 Version comparison is done using the dewey notation with a few specific rules.
91 The version number is cut into separate parts on each dot
94 Comparison checks each part in turn, the first part that differs yields
97 If parts are numbers they are compared numerically.
99 Parts can also be numbers with an optional letter appended.
100 The numbers are compared numerically, and in case of equality, the letter
101 makes the difference.
103 Other parts are compared alphabetically.
105 The last part may contain an extra suffix matching
114 These correspond to traditional notations for
115 .Sq release candidate ,
119 and are ordered accordingly, e.g.,
125 are next (and non-comparable to one another),
126 then normal version, and finally
130 "foo-1.01" is equal to "foo-1.1", which can lead to surprises..
132 "foo-1.001" is older than "foo-1.002", which in turns is older than "foo-1.0010"
134 "foo-1.0rc2" is not comparable to "foo-1.0pre3"
136 "bar-1.0beta3" is older than "bar-1.0rc1"
138 "baz-1.0" is older than "baz-1.0pl1"
142 In some rare cases, version numbering changes completely upstream.
143 A version style marker, of the form
146 can be appended to the version number (after the patch level)
147 to denote the new numbering scheme.
153 Flavored packages will also contain a list of flavors after the version
154 identifier, in a canonical order determined by
156 in the corresponding port's
158 For instance, kterm has an xaw3d flavor:
161 Note that, to uniquely identify the version part, no flavor shall ever
163 Usually, flavored packages are slightly different versions of the same
164 package that offer very similar functionalities.
166 Most conflicts between packages are handled on a package name basis.
167 Unless the packages have been specially prepared, it is
168 normally not possible to install two packages with the same
184 .Qq openldap-client-2.0.7
191 Packages may depend on other packages, as specified by their port's
199 .Bd -literal -offset indent
205 part of the dependency is always used to obtain the default dependency for
206 the given package (the package that will be built and installed if no package
208 The corresponding package name is also used as a package specification,
209 after removing any version and flavor requirements.
213 part, by default, any package with the right stem will do: in effect,
219 the dependent port may override this default, and set
221 to achieve a more restrictive default, for instance,
224 .Qq PKGSPEC = db->=3,<4
225 to avoid collision with
226 .Pa databases/db/v4 .
227 Be extra cautious with this functionality: this tweaks the depends line for
228 any including package, thus usually requiring a version bump, and is in
229 general only required for very messy cases where several incompatible versions
230 of the same software coexist as packages with the same stem.
232 An explicit specification such as
234 may be used to ask for a more specific version number.
235 Version numbers may also include ranges, separated by commas, so for
238 would match any foo with version at least 1.3, and
240 would match any version of foo between 1.3 and 1.5, inclusive.
242 As a convenience, the ports tree recognizes a specification that starts
243 with STEM, and will replace this with the correct stem, which can be useful
244 for embarrassingly long package names.
246 As another convenience, the ports tree recognizes constructs like
247 .Qq graphics/png>=1.2.0
248 and transforms it into
249 .Qq STEM->=1.2.0:graphics/png .
250 More specifically, package paths never contain <, >, or =, and those
251 characters trigger the transform.
253 If the flavor specification is left blank, any flavor will do.
254 Note that most default package names don't contain flavor specification,
255 which means that any flavor will do
257 .Bd -literal -offset indent
258 LIB_DEPENDS = graphics/aalib
266 To restrict the specification to packages that match flavor
270 To restrict the specification to packages that do not match flavor
274 In the preceding case, one may use
275 .Bd -literal -offset indent
276 LIB_DEPENDS = aalib-*-!no_x11:graphics/aalib
279 to ensure the no_x11 flavor is not picked.
280 .Sh DEPENDENCIES RESOLUTION
281 Several packages may be specified for a dependency:
283 will match either any version of package foo, or any version of package bar.
284 In the general case, each package holds a tree of dependencies.
287 time, and all dependencies are tracked only as far as needed.
289 For instance, if package
301 will first check whether
306 If either is there, the
308 dependency will never be examined.
309 It would only be used in the case where neither
315 would decide to bring in
317 and so would check on
322 .Xr library-specs 7 ,
327 Support for a more complex form of those package specifications first
330 The current simplified form was introduced in