Debian Codegraph @

upstream/debian-unstable/man7/dnf5-specs.7

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