3 %bcond_without yum_compatibility # Add yum plugins provides
4 %bcond_without yum_utils # Build yum-utils replacement package dnf-utils
6 Summary: Core Plugins for DNF
11 Source0: https://github.com/rpm-software-management/dnf-plugins-core/archive/%{version}/%{name}-%{version}.tar.gz
12 # Source0-md5: 7f18b00a45508782256690c3a02fc8fc
14 Patch1: migrate3.patch
15 URL: https://github.com/rpm-software-management/dnf-plugins-core
16 BuildRequires: cmake >= 2.4
17 BuildRequires: dnf >= 4.11.0
18 BuildRequires: gettext
19 BuildRequires: python3-dbus
20 BuildRequires: python3-devel
21 BuildRequires: python3-nose
22 BuildRequires: sphinx-pdg
23 Requires: dnf >= 4.11.0
24 Requires: python3-dateutil
25 Requires: python3-dbus
26 Requires: python3-hawkey >= 0.46.1
27 %if %{with yum_compatibility}
28 Provides: yum-plugin-auto-update-debug-info = %{version}-%{release}
29 Provides: yum-plugin-changelog = %{version}-%{release}
30 Provides: yum-plugin-copr = %{version}-%{release}
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 Core Plugins for DNF. This package enhances DNF with builddep,
37 config-manager, copr, debug, debuginfo-install, download,
38 needs-restarting, groups-manager, repoclosure, repograph, repomanage,
39 reposync, changelog and repodiff commands. Additionally provides
40 generate_completion_cache passive plugin.
43 Summary: Yum-utils CLI compatibility layer
44 Requires: %{name} = %{version}-%{release}
45 Provides: yum-utils = %{version}-%{release}
47 %description -n dnf-utils
48 As a Yum-utils CLI compatibility layer, supplies in CLI shims for
49 debuginfo-install, repograph, package-cleanup, repoclosure,
50 repomanage, repoquery, reposync, repotrack, repodiff, builddep,
51 config-manager, debug, download and yum-groups-manager that use new
52 implementations using DNF.
54 %package -n dnf-plugin-leaves
55 Summary: Leaves Plugin for DNF
56 Requires: %{name} = %{version}-%{release}
58 %description -n dnf-plugin-leaves
59 Leaves Plugin for DNF. List all installed packages not required by any
60 other installed package.
62 %package -n dnf-plugin-local
63 Summary: Local Plugin for DNF
64 Requires: %{name} = %{version}-%{release}
65 Requires: createrepo_c
67 %description -n dnf-plugin-local
68 Local Plugin for DNF. Automatically copy all downloaded packages to a
69 repository on the local filesystem and generating repo metadata.
71 %package -n dnf-plugin-migrate
72 Summary: Migrate Plugin for DNF
73 Requires: %{name} = %{version}-%{release}
76 %description -n dnf-plugin-migrate
77 Migrate Plugin for DNF. Migrates history, group and yumdb data from
80 %package -n dnf-plugin-modulesync
81 Summary: Download module metadata and packages and create repository
82 Requires: createrepo_c >= 0.17.4
83 Requires: %{name} = %{version}-%{release}
84 Provides: dnf-command(modulesync)
86 %description -n dnf-plugin-modulesync
87 Download module metadata from all enabled repositories, module
88 artifacts and profiles of matching modules and create repository.
90 %package -n dnf-plugin-post-transaction-actions
91 Summary: Post transaction actions Plugin for DNF
92 Requires: %{name} = %{version}-%{release}
94 %description -n dnf-plugin-post-transaction-actions
95 Post transaction actions Plugin for DNF. Plugin runs actions (shell
96 commands) after transaction is completed. Actions are defined in
99 %package -n dnf-plugin-show-leaves
100 Summary: Show-leaves Plugin for DNF
101 Requires: %{name} = %{version}-%{release}
102 Requires: dnf-plugin-leaves = %{version}-%{release}
104 %description -n dnf-plugin-show-leaves
105 Show-leaves Plugin for DNF. List all installed packages that are no
106 longer required by any other installed package after a transaction.
108 %package -n dnf-plugin-versionlock
109 Summary: Version Lock Plugin for DNF
110 Requires: %{name} = %{version}-%{release}
111 %if %{with yum_compatibility}
112 Provides: yum-plugin-versionlock = %{version}-%{release}
115 %description -n dnf-plugin-versionlock
116 Version lock plugin takes a set of name/versions for packages and
117 excludes all other versions of those packages. This allows you to e.g.
118 protect packages from being updated by newer versions.
130 -DPYTHON_DESIRED:FILEPATH=%{__python3} \
131 -DPYTHON_INSTALL_DIR:PATH=%{py3_sitescriptdir}
137 rm -rf $RPM_BUILD_ROOT
138 install -d $RPM_BUILD_ROOT%{_var}/cache/dnf
140 %{__make} -C build install \
141 DESTDIR=$RPM_BUILD_ROOT
143 :> $RPM_BUILD_ROOT%{_var}/cache/dnf/packages.db
145 %if %{with yum_utils}
146 install -d $RPM_BUILD_ROOT%{_bindir}
147 for p in debuginfo-install needs-restarting find-repos-of-install repo-graph \
148 package-cleanup repoclosure repodiff repomanage repoquery \
149 reposync repotrack yum-builddep yum-config-manager yum-debug-dump \
150 yum-debug-restore yum-groups-manager yumdownloader; do
151 ln -sr $RPM_BUILD_ROOT%{_libexecdir}/dnf-utils $RPM_BUILD_ROOT%{_bindir}/$p
153 # These commands don't have a dedicated man page, so let's just point them
154 # to the utils page which contains their descriptions.
155 for m in find-repos-of-install.1 repoquery.1 repotrack.1; do
156 echo ".so dnf-utils.1" > $RPM_BUILD_ROOT%{_mandir}/man1/$m
158 %{__mv} $RPM_BUILD_ROOT%{_libexecdir}/dnf-utils-3 $RPM_BUILD_ROOT%{_libexecdir}/dnf-utils
162 for m in debuginfo-install needs-restarting repo-graph repoclosure repodiff \
163 repomanage reposync yum-builddep yum-config-manager \
164 yum-debug-dump yum-debug-restore yum-groups-manager \
165 yumdownloader package-cleanup dnf-utils yum-utils; do
166 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/${m}.1*
168 %{__rm} $RPM_BUILD_ROOT%{_libexecdir}/dnf-utils-*
171 %if %{without yum_compatibility}
172 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/yum-changelog.1*
173 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man5/yum-versionlock.5*
174 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/{yum-copr.8*,yum-versionlock.8*}
177 for d in $RPM_BUILD_ROOT%{py3_sitescriptdir}/{dnf-plugins,dnfpluginsextras}; do
185 rm -rf $RPM_BUILD_ROOT
187 %files -f %{name}.lang
188 %defattr(644,root,root,755)
189 %doc AUTHORS README.rst
190 %config(noreplace) %{_sysconfdir}/dnf/plugins/copr.conf
191 %config(noreplace) %{_sysconfdir}/dnf/plugins/copr.d
192 %config(noreplace) %{_sysconfdir}/dnf/plugins/debuginfo-install.conf
193 %{py3_sitescriptdir}/dnf-plugins/builddep.py
194 %{py3_sitescriptdir}/dnf-plugins/changelog.py
195 %{py3_sitescriptdir}/dnf-plugins/config_manager.py
196 %{py3_sitescriptdir}/dnf-plugins/copr.py
197 %{py3_sitescriptdir}/dnf-plugins/debug.py
198 %{py3_sitescriptdir}/dnf-plugins/debuginfo-install.py
199 %{py3_sitescriptdir}/dnf-plugins/download.py
200 %{py3_sitescriptdir}/dnf-plugins/generate_completion_cache.py
201 %{py3_sitescriptdir}/dnf-plugins/groups_manager.py
202 %{py3_sitescriptdir}/dnf-plugins/needs_restarting.py
203 %{py3_sitescriptdir}/dnf-plugins/repoclosure.py
204 %{py3_sitescriptdir}/dnf-plugins/repodiff.py
205 %{py3_sitescriptdir}/dnf-plugins/repograph.py
206 %{py3_sitescriptdir}/dnf-plugins/repomanage.py
207 %{py3_sitescriptdir}/dnf-plugins/reposync.py
208 %{py3_sitescriptdir}/dnf-plugins/__pycache__/builddep.*
209 %{py3_sitescriptdir}/dnf-plugins/__pycache__/changelog.*
210 %{py3_sitescriptdir}/dnf-plugins/__pycache__/config_manager.*
211 %{py3_sitescriptdir}/dnf-plugins/__pycache__/copr.*
212 %{py3_sitescriptdir}/dnf-plugins/__pycache__/debug.*
213 %{py3_sitescriptdir}/dnf-plugins/__pycache__/debuginfo-install.*
214 %{py3_sitescriptdir}/dnf-plugins/__pycache__/download.*
215 %{py3_sitescriptdir}/dnf-plugins/__pycache__/generate_completion_cache.*
216 %{py3_sitescriptdir}/dnf-plugins/__pycache__/groups_manager.*
217 %{py3_sitescriptdir}/dnf-plugins/__pycache__/needs_restarting.*
218 %{py3_sitescriptdir}/dnf-plugins/__pycache__/repoclosure.*
219 %{py3_sitescriptdir}/dnf-plugins/__pycache__/repodiff.*
220 %{py3_sitescriptdir}/dnf-plugins/__pycache__/repograph.*
221 %{py3_sitescriptdir}/dnf-plugins/__pycache__/repomanage.*
222 %{py3_sitescriptdir}/dnf-plugins/__pycache__/reposync.*
223 %{py3_sitescriptdir}/dnfpluginscore/
224 %{_mandir}/man8/dnf-builddep.8*
225 %{_mandir}/man8/dnf-changelog.8*
226 %{_mandir}/man8/dnf-config-manager.8*
227 %{_mandir}/man8/dnf-copr.8*
228 %{_mandir}/man8/dnf-debug.8*
229 %{_mandir}/man8/dnf-debuginfo-install.8*
230 %{_mandir}/man8/dnf-download.8*
231 %{_mandir}/man8/dnf-generate_completion_cache.8*
232 %{_mandir}/man8/dnf-groups-manager.8*
233 %{_mandir}/man8/dnf-needs-restarting.8*
234 %{_mandir}/man8/dnf-repoclosure.8*
235 %{_mandir}/man8/dnf-repodiff.8*
236 %{_mandir}/man8/dnf-repograph.8*
237 %{_mandir}/man8/dnf-repomanage.8*
238 %{_mandir}/man8/dnf-reposync.8*
239 %if %{with yum_compatibility}
240 %{_mandir}/man1/yum-changelog.1*
241 %{_mandir}/man8/yum-copr.8*
243 %ghost %{_var}/cache/dnf/packages.db
245 %if %{with yum_utils}
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{_bindir}/debuginfo-install
249 %attr(755,root,root) %{_bindir}/needs-restarting
250 %attr(755,root,root) %{_bindir}/find-repos-of-install
251 %attr(755,root,root) %{_bindir}/package-cleanup
252 %attr(755,root,root) %{_bindir}/repo-graph
253 %attr(755,root,root) %{_bindir}/repoclosure
254 %attr(755,root,root) %{_bindir}/repodiff
255 %attr(755,root,root) %{_bindir}/repomanage
256 %attr(755,root,root) %{_bindir}/repoquery
257 %attr(755,root,root) %{_bindir}/reposync
258 %attr(755,root,root) %{_bindir}/repotrack
259 %attr(755,root,root) %{_bindir}/yum-builddep
260 %attr(755,root,root) %{_bindir}/yum-config-manager
261 %attr(755,root,root) %{_bindir}/yum-debug-dump
262 %attr(755,root,root) %{_bindir}/yum-debug-restore
263 %attr(755,root,root) %{_bindir}/yum-groups-manager
264 %attr(755,root,root) %{_bindir}/yumdownloader
265 %attr(755,root,root) %{_libexecdir}/dnf-utils
266 %{_mandir}/man1/debuginfo-install.1*
267 %{_mandir}/man1/needs-restarting.1*
268 %{_mandir}/man1/repo-graph.1*
269 %{_mandir}/man1/repoclosure.1*
270 %{_mandir}/man1/repodiff.1*
271 %{_mandir}/man1/repomanage.1*
272 %{_mandir}/man1/reposync.1*
273 %{_mandir}/man1/yum-builddep.1*
274 %{_mandir}/man1/yum-config-manager.1*
275 %{_mandir}/man1/yum-debug-dump.1*
276 %{_mandir}/man1/yum-debug-restore.1*
277 %{_mandir}/man1/yum-groups-manager.1*
278 %{_mandir}/man1/yumdownloader.1*
279 %{_mandir}/man1/package-cleanup.1*
280 %{_mandir}/man1/dnf-utils.1*
281 %{_mandir}/man1/yum-utils.1*
282 %{_mandir}/man1/find-repos-of-install.1*
283 %{_mandir}/man1/repoquery.1*
284 %{_mandir}/man1/repotrack.1*
287 %files -n dnf-plugin-leaves
288 %defattr(644,root,root,755)
289 %{py3_sitescriptdir}/dnf-plugins/leaves.*
290 %{py3_sitescriptdir}/dnf-plugins/__pycache__/leaves.*
291 %{_mandir}/man8/dnf-leaves.8*
293 %files -n dnf-plugin-local
294 %defattr(644,root,root,755)
295 %config(noreplace) %{_sysconfdir}/dnf/plugins/local.conf
296 %{py3_sitescriptdir}/dnf-plugins/local.*
297 %{py3_sitescriptdir}/dnf-plugins/__pycache__/local.*
298 %{_mandir}/man8/dnf-local.8*
300 %files -n dnf-plugin-migrate
301 %defattr(644,root,root,755)
302 %{py3_sitescriptdir}/dnf-plugins/migrate.*
303 %{py3_sitescriptdir}/dnf-plugins/__pycache__/migrate.*
304 %{_mandir}/man8/dnf-migrate.8*
306 %files -n dnf-plugin-modulesync
307 %defattr(644,root,root,755)
308 %{py3_sitescriptdir}/dnf-plugins/modulesync.*
309 %{py3_sitescriptdir}/dnf-plugins/__pycache__/modulesync.*
310 %{_mandir}/man8/dnf-modulesync.8*
312 %files -n dnf-plugin-post-transaction-actions
313 %defattr(644,root,root,755)
314 %config(noreplace) %{_sysconfdir}/dnf/plugins/post-transaction-actions.conf
315 %config(noreplace) %{_sysconfdir}/dnf/plugins/post-transaction-actions.d
316 %{py3_sitescriptdir}/dnf-plugins/post-transaction-actions.*
317 %{py3_sitescriptdir}/dnf-plugins/__pycache__/post-transaction-actions.*
318 %{_mandir}/man8/dnf-post-transaction-actions.8*
320 %files -n dnf-plugin-show-leaves
321 %defattr(644,root,root,755)
322 %{py3_sitescriptdir}/dnf-plugins/show_leaves.*
323 %{py3_sitescriptdir}/dnf-plugins/__pycache__/show_leaves.*
324 %{_mandir}/man8/dnf-show-leaves.8*
326 %files -n dnf-plugin-versionlock
327 %defattr(644,root,root,755)
328 %config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.conf
329 %config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.list
330 %{py3_sitescriptdir}/dnf-plugins/versionlock.*
331 %{py3_sitescriptdir}/dnf-plugins/__pycache__/versionlock.*
332 %{_mandir}/man8/dnf-versionlock.8*
333 %if %{with yum_compatibility}
334 %{_mandir}/man5/yum-versionlock.conf.5*
335 %{_mandir}/man8/yum-versionlock.8*