Debian Codegraph @

upstream/mageia-cauldron/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" "May 10, 2026" "" "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 PACKAGES
62 .sp
63 Many commands take a \fB<package\-spec*>\fP parameter that selects a package for
64 the operation. Depending on the command the \fB<package\-spec*>\fP argument is
65 matched against:
66 .INDENT 0.0
67 .IP \(bu 2
68 \fI\%NEVRA [N]\fP or case Insentive NEVRA [NI]
69 .IP \(bu 2
70 Provides [P]
71 .IP \(bu 2
72 \fI\%File provides [F]\fP
73 .IP \(bu 2
74 \fI\%Binaries [B]\fP
75 .UNINDENT
76 .sp
77 sequentially until a match is found.
78 .sp
79 For example \fB<package\-spec\-NP>\fP is first matched against NEVRAs and if no
80 matching NEVRA is found it is matched against Provides.
81 .sp
82 When \fB<package\-spec>\fP is a package name or a provide, the user can provide
83 additional restriction rules for matching the arguments. Basic version comparisons
84 can be used for this purpose (=, >, <, >=, <=), like this \fB<package\-spec> >= <version>\fP,
85 where the \fB<version>\fP argument is in a \fB[EPOCH:]VERSION[\-RELEASE]\fP format
86 as specified in the \fI\%NEVRA matching\fP section.
87 .sp
88 To build more complex expressions, a rich dependency feature
89 is also supported, which is always enclosed in parentheses. Boolean
90 operators and nesting can be used, f.e. \fB(<spec1> or (<spec2> and <spec3>))\fP\&.
91 For more information, please see \fI\%RPM boolean dependencies\fP\&.
92 .SS NEVRA matching
93 .sp
94 Each package can be uniquely identified by the \fINEVRA\fP string. It consists of
95 5 parts of information:
96 .INDENT 0.0
97 .TP
98 .B \fIName\fP
99 .nf
100 Package name.
101 .fi
102 .sp
103 .TP
104 .B \fIEpoch\fP
105 .nf
106 Epoch number.
107 It is not always included.
108 .fi
109 .sp
110 .sp
111 The epoch number overrides other version checking, so it can be used to
112 force the package upgrade over some other one.
113 .TP
114 .B \fIVersion\fP
115 .nf
116 Version string.
117 It is not strictly numeric.
118 It is intended to match the upstream software version.
119 .fi
120 .sp
121 .TP
122 .B \fIRelease\fP
123 .nf
124 Edition string.
125 .fi
126 .sp
127 .sp
128 It is an information about the particular package build, usually a number
129 increased with the newer build. It is not connected with the upstream software.
130 .TP
131 .B \fIArchitecture\fP
132 .nf
133 Target architecture string.
134 Defines the processor type the package is intended to be installed on.
135 .fi
136 .sp
137 .sp
138 It can be also a package containing source files (\fBsrc\fP) or architecture\-independent
139 package (\fBnoarch\fP).
140 .UNINDENT
141 .sp
142 When matching against NEVRAs, partial matching is supported. \fBDNF5\fP tries to match
143 the spec against the following list of NEVRA forms (in decreasing order of
144 priority):
145 .INDENT 0.0
146 .INDENT 3.5
147 .nf
148
149 \fBNAME\-[EPOCH:]VERSION\-RELEASE.ARCH\fP
150 \fBNAME.ARCH\fP
151 \fBNAME\fP
152 \fBNAME\-[EPOCH:]VERSION\-RELEASE\fP
153 \fBNAME\-[EPOCH:]VERSION\fP
154
155 .fi
156 .sp
157 .UNINDENT
158 .UNINDENT
159 .sp
160 Note that \fIname\fP can in general contain dashes (e.g. \fBpackage\-with\-dashes\fP).
161 .sp
162 The first form that matches any packages is used and the remaining forms are
163 not tried. If none of the forms match any packages, an attempt is made to match
164 the \fB<package\-spec>\fP against full package NEVRAs. This is only relevant
165 if globs are present in the \fB<package\-spec>\fP\&.
166 .sp
167 You can specify globs as part of any of the five NEVRA components. You can also
168 specify a glob pattern to match over multiple NEVRA components (in other words,
169 to match across the NEVRA separators). In that case, however, you need to write
170 the spec to match against full package NEVRAs, as it is not possible to split
171 such spec into NEVRA forms.
172 .SS File Provides matching
173 .sp
174 If a \fBspec\fP starts with either \fB/\fP or \fB*/\fP, it is considered as a potential file provide.
175 .SS Binaries matching
176 .sp
177 Whether to consider package binaries during matching.
178 Checks if given \fBspec\fP is a binary in \fB/usr/bin/\fP or \fB/usr/sbin/\fP\&.
179 .SH COMPS
180 .sp
181 \fB<group\-spec>\(ga\(ga|\(ga\(ga<environment\-spec>\fP allows one to select groups|environments a particular
182 operation should work on. It is a case insensitive string (supporting globbing characters) that
183 is matched against a group\(aqs|environment\(aqs ID, canonical name and name translated into the
184 current \fBLC_MESSAGES\fP locale (if possible).
185 .sp
186 Comps \fBspecs\fP are prefixed by \fB@\fP for commands that also accept package \fBspecs\fP\&.
187 For example see \fBdnf5\-install(8)\fP, \fI\%Install Command\fP\&.
188 .sp
189 The group and environment commands accept both \fB<group\-spec>\fP and \fB<environment\-spec>\fP, but
190 prefer only their corresponding type in case both groups and environments match the given argument.
191 Other commands that accept both types affect both groups and environments.
192 .SH MODULES
193 .sp
194 \fB<module\-spec>\fP allows one to select modules or profiles a particular operation should work
195 on.
196 .sp
197 Since \fINEVRA\fP matching form is insufficient for modules, they are uniquely identified by the
198 \fINSVCA\fP format (\fBNAME:STREAM:VERSION:CONTEXT:ARCH/PROFILE\fP). Supported partial forms are the following:
199 .INDENT 0.0
200 .INDENT 3.5
201 .nf
202
203 \fBNAME\fP
204 \fBNAME:STREAM\fP
205 \fBNAME:STREAM:VERSION\fP
206 \fBNAME:STREAM:VERSION:CONTEXT\fP
207 All above combinations with \fB::ARCH\fP (e.g. \fBNAME::ARCH\fP)
208 \fBNAME:STREAM:VERSION:CONTEXT:ARCH\fP
209 All above combinations with \fB/PROFILE\fP (e.g. \fBNAME/PROFILE\fP)
210
211 .fi
212 .sp
213 .UNINDENT
214 .UNINDENT
215 .sp
216 In case stream is not specified, the enabled or the default stream is used, in this order.
217 In case profile is not specified, the system default profile or the \(aqdefault\(aq profile is used.
218 .SH TRANSACTIONS
219 .sp
220 \fB<transaction\-spec>\fP can be in one of several forms. If it is an integer, it
221 specifies a transaction ID. Specifying \fBlast\fP is the same as specifying the ID
222 of the most recent transaction. The last form is \fBlast\-<offset>\fP, where
223 \fB<offset>\fP is a positive integer. It specifies offset\-th transaction preceding
224 the most recent transaction.
225 .SH SEE ALSO
226 .INDENT 0.0
227 .TP
228 .B RPM boolean dependencies:
229 .nf
230 \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'
231 .fi
232 .sp
233 .UNINDENT
234 .SH AUTHOR
235 See AUTHORS.md in dnf5 source distribution.
236 .SH COPYRIGHT
237 Contributors to the dnf5 project.
238 .\" Generated by docutils manpage writer.
239 .