Debian Codegraph @

upstream/opensuse-leap-16-1/man7/dnf5-specs.7

raw
1 .\" Man page generated from reStructuredText.
2 .
3 .
4 .nr rst2man-indent-level 0
5 .
6 .de1 rstReportMargin
7 \\$1 \\n[an-margin]
8 level \\n[rst2man-indent-level]
9 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
10 -
11 \\n[rst2man-indent0]
12 \\n[rst2man-indent1]
13 \\n[rst2man-indent2]
14 ..
15 .de1 INDENT
16 .\" .rstReportMargin pre:
17 . RS \\$1
18 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
19 . nr rst2man-indent-level +1
20 .\" .rstReportMargin post:
21 ..
22 .de UNINDENT
23 . RE
24 .\" indent \\n[an-margin]
25 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
26 .nr rst2man-indent-level -1
27 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
28 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
29 ..
30 .TH "DNF5-SPECS" "7" "Apr 29, 2025" "" "dnf5"
31 .SH NAME
32 dnf5-specs \- Patterns Specification
33 .SH DESCRIPTION
34 .sp
35 Different pattern matching rules for arguments in \fB*\-spec\fP form are defined
36 for operation with each entity type in \fBDNF5\fP\&. In this section all rules are
37 described and explained in detail, with examples.
38 .SH GLOBS
39 .sp
40 Pattern specification supports the same glob pattern matching that shell does.
41 The following patterns are supported:
42 .INDENT 0.0
43 .TP
44 .B \fB*\fP
45 Matches any number of characters.
46 .TP
47 .B \fB?\fP
48 Matches any single character.
49 .TP
50 .B \fB[]\fP
51 Matches any one of the enclosed characters. A pair of characters separated
52 by a hyphen denotes a range expression; any character that falls between
53 those two characters, inclusive, is matched. If the first character
54 following the \fB[\fP is a \fB!\fP or a \fB^\fP then any character not enclosed
55 is matched.
56 .UNINDENT
57 .sp
58 Note: Curly brackets (\fB{}\fP) are not supported. You can still use them in
59 shells that support them and let the shell do the expansion, but if quoted or
60 escaped, \fBDNF5\fP will not expand them.
61 .SH NEVRA MATCHING
62 .sp
63 Each package can be uniquely identified by the \fINEVRA\fP string. It consists of
64 5 parts of information:
65 .INDENT 0.0
66 .TP
67 .B \fIName\fP
68 .nf
69 Package name.
70 .fi
71 .sp
72 .TP
73 .B \fIEpoch\fP
74 .nf
75 Epoch number.
76 It is not always included.
77 .fi
78 .sp
79 .sp
80 The epoch number overrides other version checking, so it can be used to
81 force the package upgrade over some other one.
82 .TP
83 .B \fIVersion\fP
84 .nf
85 Version string.
86 It is not strictly numeric.
87 It is intended to match the upstream software version.
88 .fi
89 .sp
90 .TP
91 .B \fIRelease\fP
92 .nf
93 Edition string.
94 .fi
95 .sp
96 .sp
97 It is an information about the particular package build, usually a number
98 increased with the newer build. It is not connected with the upstream software.
99 .TP
100 .B \fIArchitecture\fP
101 .nf
102 Target architecture string.
103 Defines the processor type the package is intended to be installed on.
104 .fi
105 .sp
106 .sp
107 It can be also a package containing source files (\fBsrc\fP) or architecture\-independent
108 package (\fBnoarch\fP).
109 .UNINDENT
110 .sp
111 When matching against NEVRAs, partial matching is supported. \fBDNF5\fP tries to match
112 the spec against the following list of NEVRA forms (in decreasing order of
113 priority):
114 .INDENT 0.0
115 .INDENT 3.5
116 .nf
117
118 \fBNAME\-[EPOCH:]VERSION\-RELEASE.ARCH\fP
119 \fBNAME.ARCH\fP
120 \fBNAME\fP
121 \fBNAME\-[EPOCH:]VERSION\-RELEASE\fP
122 \fBNAME\-[EPOCH:]VERSION\fP
123
124 .fi
125 .sp
126 .UNINDENT
127 .UNINDENT
128 .sp
129 Note that \fIname\fP can in general contain dashes (e.g. \fBpackage\-with\-dashes\fP).
130 .sp
131 The first form that matches any packages is used and the remaining forms are
132 not tried. If none of the forms match any packages, an attempt is made to match
133 the \fB<package\-spec>\fP against full package NEVRAs. This is only relevant
134 if globs are present in the \fB<package\-spec>\fP\&.
135 .sp
136 \fB<package\-spec>\fP matches NEVRAs the same way \fB<package\-name\-spec>\fP does,
137 but in case matching NEVRAs fails, it attempts to match against provides and
138 file provides of packages as well.
139 .sp
140 You can specify globs as part of any of the five NEVRA components. You can also
141 specify a glob pattern to match over multiple NEVRA components (in other words,
142 to match across the NEVRA separators). In that case, however, you need to write
143 the spec to match against full package NEVRAs, as it is not possible to split
144 such spec into NEVRA forms.
145 .SH PACKAGES
146 .sp
147 Many commands take a \fB<package\-spec>\fP parameter that selects a package for
148 the operation. The \fB<package\-spec>\fP argument is matched against package
149 NEVRAs, provides and file provides.
150 .sp
151 When \fB<package\-spec>\fP is a package name or a provide, the user can provide
152 additional restriction rules for matching the arguments. Basic version comparisons
153 can be used for this purpose (=, >, <, >=, <=), like this \fB<package\-spec> >= <version>\fP,
154 where the \fB<version>\fP argument is in a \fB[EPOCH:]VERSION[\-RELEASE]\fP format
155 as specified above in the \fI\%NEVRA matching\fP section.
156 .sp
157 To build more complex expressions, a rich dependency feature
158 is also supported, which is always enclosed in parentheses. Boolean
159 operators and nesting can be used, f.e. \fB(<spec1> or (<spec2> and <spec3>))\fP\&.
160 For more information, please see \fI\%RPM boolean dependencies\fP\&.
161 .sp
162 \fB<package\-file\-spec>\fP is similar to \fB<package\-spec>\fP, except provides
163 matching is not performed. Therefore, \fB<package\-file\-spec>\fP is matched only
164 against NEVRAs and file provides.
165 .sp
166 \fB<package\-name\-spec>\fP is matched against NEVRAs only.
167 .SH PROVIDES
168 .sp
169 \fB<provide\-spec>\fP in command descriptions means the command operates on
170 packages providing the given spec. This can either be an explicit provide, an
171 implicit provide (i.e. name of the package) or a file provide. The selection is
172 case\-sensitive and globbing is supported.
173 .SS Specifying File Provides
174 .sp
175 If a \fBspec\fP starts with either \fB/\fP or \fB*/\fP, it is considered as a potential file provide.
176 .SH COMPS
177 .sp
178 \fB<group\-spec>\(ga\(ga|\(ga\(ga<environment\-spec>\fP allows one to select groups|environments a particular
179 operation should work on. It is a case insensitive string (supporting globbing characters) that
180 is matched against a group\(aqs|environment\(aqs ID, canonical name and name translated into the
181 current \fBLC_MESSAGES\fP locale (if possible).
182 .sp
183 Comps \fBspecs\fP are prefixed by \fB@\fP for commands that also accept package \fBspecs\fP\&.
184 For example see \fBdnf5\-install(8)\fP, \fI\%Install Command\fP\&.
185 .SH MODULES
186 .sp
187 \fB<module\-spec>\fP allows one to select modules or profiles a particular operation should work
188 on.
189 .sp
190 Since \fINEVRA\fP matching form is insufficient for modules, they are uniquely identified by the
191 \fINSVCA\fP format (\fBNAME:STREAM:VERSION:CONTEXT:ARCH/PROFILE\fP). Supported partial forms are the following:
192 .INDENT 0.0
193 .INDENT 3.5
194 .nf
195
196 \fBNAME\fP
197 \fBNAME:STREAM\fP
198 \fBNAME:STREAM:VERSION\fP
199 \fBNAME:STREAM:VERSION:CONTEXT\fP
200 All above combinations with \fB::ARCH\fP (e.g. \fBNAME::ARCH\fP)
201 \fBNAME:STREAM:VERSION:CONTEXT:ARCH\fP
202 All above combinations with \fB/PROFILE\fP (e.g. \fBNAME/PROFILE\fP)
203
204 .fi
205 .sp
206 .UNINDENT
207 .UNINDENT
208 .sp
209 In case stream is not specified, the enabled or the default stream is used, in this order.
210 In case profile is not specified, the system default profile or the \(aqdefault\(aq profile is used.
211 .SH TRANSACTIONS
212 .sp
213 \fB<transaction\-spec>\fP can be in one of several forms. If it is an integer, it
214 specifies a transaction ID. Specifying \fBlast\fP is the same as specifying the ID
215 of the most recent transaction. The last form is \fBlast\-<offset>\fP, where
216 \fB<offset>\fP is a positive integer. It specifies offset\-th transaction preceding
217 the most recent transaction.
218 .SH SEE ALSO
219 .INDENT 0.0
220 .TP
221 .B RPM boolean dependencies:
222 .nf
223 \X'tty: link https://rpm-software-management.github.io/rpm/manual/boolean_dependencies.html'\fI\%https://rpm\-software\-management.github.io/rpm/manual/boolean_dependencies.html\fP\X'tty: link'
224 .fi
225 .sp
226 .UNINDENT
227 .SH AUTHOR
228 See AUTHORS.md in dnf5 source distribution.
229 .SH COPYRIGHT
230 Contributors to the dnf5 project.
231 .\" Generated by docutils manpage writer.
232 .