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-modules
22 BuildRequires: python3-nose
23 BuildRequires: rpmbuild(macros) >= 1.605
24 BuildRequires: sphinx-pdg
25 Requires: dnf >= 4.11.0
26 Requires: python3-dateutil
27 Requires: python3-dbus
28 Requires: python3-hawkey >= 0.46.1
29 %if %{with yum_compatibility}
30 Provides: yum-plugin-auto-update-debug-info = %{version}-%{release}
31 Provides: yum-plugin-changelog = %{version}-%{release}
32 Provides: yum-plugin-copr = %{version}-%{release}
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 Core Plugins for DNF. This package enhances DNF with builddep,
39 config-manager, copr, debug, debuginfo-install, download,
40 needs-restarting, groups-manager, repoclosure, repograph, repomanage,
41 reposync, changelog and repodiff commands. Additionally provides
42 generate_completion_cache passive plugin.
45 Summary: Yum-utils CLI compatibility layer
46 Requires: %{name} = %{version}-%{release}
47 Provides: yum-utils = %{version}-%{release}
49 %description -n dnf-utils
50 As a Yum-utils CLI compatibility layer, supplies in CLI shims for
51 debuginfo-install, repograph, package-cleanup, repoclosure,
52 repomanage, repoquery, reposync, repotrack, repodiff, builddep,
53 config-manager, debug, download and yum-groups-manager that use new
54 implementations using DNF.
56 %package -n dnf-plugin-leaves
57 Summary: Leaves Plugin for DNF
58 Requires: %{name} = %{version}-%{release}
60 %description -n dnf-plugin-leaves
61 Leaves Plugin for DNF. List all installed packages not required by any
62 other installed package.
64 %package -n dnf-plugin-local
65 Summary: Local Plugin for DNF
66 Requires: %{name} = %{version}-%{release}
67 Requires: createrepo_c
69 %description -n dnf-plugin-local
70 Local Plugin for DNF. Automatically copy all downloaded packages to a
71 repository on the local filesystem and generating repo metadata.
73 %package -n dnf-plugin-migrate
74 Summary: Migrate Plugin for DNF
75 Requires: %{name} = %{version}-%{release}
78 %description -n dnf-plugin-migrate
79 Migrate Plugin for DNF. Migrates history, group and yumdb data from
82 %package -n dnf-plugin-modulesync
83 Summary: Download module metadata and packages and create repository
84 Requires: createrepo_c >= 0.17.4
85 Requires: %{name} = %{version}-%{release}
86 Provides: dnf-command(modulesync)
88 %description -n dnf-plugin-modulesync
89 Download module metadata from all enabled repositories, module
90 artifacts and profiles of matching modules and create repository.
92 %package -n dnf-plugin-post-transaction-actions
93 Summary: Post transaction actions Plugin for DNF
94 Requires: %{name} = %{version}-%{release}
96 %description -n dnf-plugin-post-transaction-actions
97 Post transaction actions Plugin for DNF. Plugin runs actions (shell
98 commands) after transaction is completed. Actions are defined in
101 %package -n dnf-plugin-show-leaves
102 Summary: Show-leaves Plugin for DNF
103 Requires: %{name} = %{version}-%{release}
104 Requires: dnf-plugin-leaves = %{version}-%{release}
106 %description -n dnf-plugin-show-leaves
107 Show-leaves Plugin for DNF. List all installed packages that are no
108 longer required by any other installed package after a transaction.
110 %package -n dnf-plugin-versionlock
111 Summary: Version Lock Plugin for DNF
112 Requires: %{name} = %{version}-%{release}
113 %if %{with yum_compatibility}
114 Provides: yum-plugin-versionlock = %{version}-%{release}
117 %description -n dnf-plugin-versionlock
118 Version lock plugin takes a set of name/versions for packages and
119 excludes all other versions of those packages. This allows you to e.g.
120 protect packages from being updated by newer versions.
132 -DPYTHON_DESIRED:FILEPATH=%{__python3} \
133 -DPYTHON_INSTALL_DIR:PATH=%{py3_sitescriptdir}
139 rm -rf $RPM_BUILD_ROOT
140 install -d $RPM_BUILD_ROOT%{_var}/cache/dnf
142 %{__make} -C build install \
143 DESTDIR=$RPM_BUILD_ROOT
145 :> $RPM_BUILD_ROOT%{_var}/cache/dnf/packages.db
147 %if %{with yum_utils}
148 install -d $RPM_BUILD_ROOT%{_bindir}
149 for p in debuginfo-install needs-restarting find-repos-of-install repo-graph \
150 package-cleanup repoclosure repodiff repomanage repoquery \
151 reposync repotrack yum-builddep yum-config-manager yum-debug-dump \
152 yum-debug-restore yum-groups-manager yumdownloader; do
153 ln -sr $RPM_BUILD_ROOT%{_libexecdir}/dnf-utils $RPM_BUILD_ROOT%{_bindir}/$p
155 # These commands don't have a dedicated man page, so let's just point them
156 # to the utils page which contains their descriptions.
157 for m in find-repos-of-install.1 repoquery.1 repotrack.1; do
158 echo ".so dnf-utils.1" > $RPM_BUILD_ROOT%{_mandir}/man1/$m
160 %{__mv} $RPM_BUILD_ROOT%{_libexecdir}/dnf-utils-3 $RPM_BUILD_ROOT%{_libexecdir}/dnf-utils
164 for m in debuginfo-install needs-restarting repo-graph repoclosure repodiff \
165 repomanage reposync yum-builddep yum-config-manager \
166 yum-debug-dump yum-debug-restore yum-groups-manager \
167 yumdownloader package-cleanup dnf-utils yum-utils; do
168 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/${m}.1*
170 %{__rm} $RPM_BUILD_ROOT%{_libexecdir}/dnf-utils-*
173 %if %{without yum_compatibility}
174 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man1/yum-changelog.1*
175 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man5/yum-versionlock.5*
176 %{__rm} $RPM_BUILD_ROOT%{_mandir}/man8/{yum-copr.8*,yum-versionlock.8*}
179 for d in $RPM_BUILD_ROOT%{py3_sitescriptdir}/{dnf-plugins,dnfpluginsextras}; do
187 rm -rf $RPM_BUILD_ROOT
189 %files -f %{name}.lang
190 %defattr(644,root,root,755)
191 %doc AUTHORS README.rst
192 %config(noreplace) %{_sysconfdir}/dnf/plugins/copr.conf
193 %config(noreplace) %{_sysconfdir}/dnf/plugins/copr.d
194 %config(noreplace) %{_sysconfdir}/dnf/plugins/debuginfo-install.conf
195 %{py3_sitescriptdir}/dnf-plugins/builddep.py
196 %{py3_sitescriptdir}/dnf-plugins/changelog.py
197 %{py3_sitescriptdir}/dnf-plugins/config_manager.py
198 %{py3_sitescriptdir}/dnf-plugins/copr.py
199 %{py3_sitescriptdir}/dnf-plugins/debug.py
200 %{py3_sitescriptdir}/dnf-plugins/debuginfo-install.py
201 %{py3_sitescriptdir}/dnf-plugins/download.py
202 %{py3_sitescriptdir}/dnf-plugins/generate_completion_cache.py
203 %{py3_sitescriptdir}/dnf-plugins/groups_manager.py
204 %{py3_sitescriptdir}/dnf-plugins/needs_restarting.py
205 %{py3_sitescriptdir}/dnf-plugins/repoclosure.py
206 %{py3_sitescriptdir}/dnf-plugins/repodiff.py
207 %{py3_sitescriptdir}/dnf-plugins/repograph.py
208 %{py3_sitescriptdir}/dnf-plugins/repomanage.py
209 %{py3_sitescriptdir}/dnf-plugins/reposync.py
210 %{py3_sitescriptdir}/dnf-plugins/__pycache__/builddep.*
211 %{py3_sitescriptdir}/dnf-plugins/__pycache__/changelog.*
212 %{py3_sitescriptdir}/dnf-plugins/__pycache__/config_manager.*
213 %{py3_sitescriptdir}/dnf-plugins/__pycache__/copr.*
214 %{py3_sitescriptdir}/dnf-plugins/__pycache__/debug.*
215 %{py3_sitescriptdir}/dnf-plugins/__pycache__/debuginfo-install.*
216 %{py3_sitescriptdir}/dnf-plugins/__pycache__/download.*
217 %{py3_sitescriptdir}/dnf-plugins/__pycache__/generate_completion_cache.*
218 %{py3_sitescriptdir}/dnf-plugins/__pycache__/groups_manager.*
219 %{py3_sitescriptdir}/dnf-plugins/__pycache__/needs_restarting.*
220 %{py3_sitescriptdir}/dnf-plugins/__pycache__/repoclosure.*
221 %{py3_sitescriptdir}/dnf-plugins/__pycache__/repodiff.*
222 %{py3_sitescriptdir}/dnf-plugins/__pycache__/repograph.*
223 %{py3_sitescriptdir}/dnf-plugins/__pycache__/repomanage.*
224 %{py3_sitescriptdir}/dnf-plugins/__pycache__/reposync.*
225 %{py3_sitescriptdir}/dnfpluginscore/
226 %{_mandir}/man8/dnf-builddep.8*
227 %{_mandir}/man8/dnf-changelog.8*
228 %{_mandir}/man8/dnf-config-manager.8*
229 %{_mandir}/man8/dnf-copr.8*
230 %{_mandir}/man8/dnf-debug.8*
231 %{_mandir}/man8/dnf-debuginfo-install.8*
232 %{_mandir}/man8/dnf-download.8*
233 %{_mandir}/man8/dnf-generate_completion_cache.8*
234 %{_mandir}/man8/dnf-groups-manager.8*
235 %{_mandir}/man8/dnf-needs-restarting.8*
236 %{_mandir}/man8/dnf-repoclosure.8*
237 %{_mandir}/man8/dnf-repodiff.8*
238 %{_mandir}/man8/dnf-repograph.8*
239 %{_mandir}/man8/dnf-repomanage.8*
240 %{_mandir}/man8/dnf-reposync.8*
241 %if %{with yum_compatibility}
242 %{_mandir}/man1/yum-changelog.1*
243 %{_mandir}/man8/yum-copr.8*
245 %ghost %{_var}/cache/dnf/packages.db
247 %if %{with yum_utils}
249 %defattr(644,root,root,755)
250 %attr(755,root,root) %{_bindir}/debuginfo-install
251 %attr(755,root,root) %{_bindir}/needs-restarting
252 %attr(755,root,root) %{_bindir}/find-repos-of-install
253 %attr(755,root,root) %{_bindir}/package-cleanup
254 %attr(755,root,root) %{_bindir}/repo-graph
255 %attr(755,root,root) %{_bindir}/repoclosure
256 %attr(755,root,root) %{_bindir}/repodiff
257 %attr(755,root,root) %{_bindir}/repomanage
258 %attr(755,root,root) %{_bindir}/repoquery
259 %attr(755,root,root) %{_bindir}/reposync
260 %attr(755,root,root) %{_bindir}/repotrack
261 %attr(755,root,root) %{_bindir}/yum-builddep
262 %attr(755,root,root) %{_bindir}/yum-config-manager
263 %attr(755,root,root) %{_bindir}/yum-debug-dump
264 %attr(755,root,root) %{_bindir}/yum-debug-restore
265 %attr(755,root,root) %{_bindir}/yum-groups-manager
266 %attr(755,root,root) %{_bindir}/yumdownloader
267 %attr(755,root,root) %{_libexecdir}/dnf-utils
268 %{_mandir}/man1/debuginfo-install.1*
269 %{_mandir}/man1/needs-restarting.1*
270 %{_mandir}/man1/repo-graph.1*
271 %{_mandir}/man1/repoclosure.1*
272 %{_mandir}/man1/repodiff.1*
273 %{_mandir}/man1/repomanage.1*
274 %{_mandir}/man1/reposync.1*
275 %{_mandir}/man1/yum-builddep.1*
276 %{_mandir}/man1/yum-config-manager.1*
277 %{_mandir}/man1/yum-debug-dump.1*
278 %{_mandir}/man1/yum-debug-restore.1*
279 %{_mandir}/man1/yum-groups-manager.1*
280 %{_mandir}/man1/yumdownloader.1*
281 %{_mandir}/man1/package-cleanup.1*
282 %{_mandir}/man1/dnf-utils.1*
283 %{_mandir}/man1/yum-utils.1*
284 %{_mandir}/man1/find-repos-of-install.1*
285 %{_mandir}/man1/repoquery.1*
286 %{_mandir}/man1/repotrack.1*
289 %files -n dnf-plugin-leaves
290 %defattr(644,root,root,755)
291 %{py3_sitescriptdir}/dnf-plugins/leaves.*
292 %{py3_sitescriptdir}/dnf-plugins/__pycache__/leaves.*
293 %{_mandir}/man8/dnf-leaves.8*
295 %files -n dnf-plugin-local
296 %defattr(644,root,root,755)
297 %config(noreplace) %{_sysconfdir}/dnf/plugins/local.conf
298 %{py3_sitescriptdir}/dnf-plugins/local.*
299 %{py3_sitescriptdir}/dnf-plugins/__pycache__/local.*
300 %{_mandir}/man8/dnf-local.8*
302 %files -n dnf-plugin-migrate
303 %defattr(644,root,root,755)
304 %{py3_sitescriptdir}/dnf-plugins/migrate.*
305 %{py3_sitescriptdir}/dnf-plugins/__pycache__/migrate.*
306 %{_mandir}/man8/dnf-migrate.8*
308 %files -n dnf-plugin-modulesync
309 %defattr(644,root,root,755)
310 %{py3_sitescriptdir}/dnf-plugins/modulesync.*
311 %{py3_sitescriptdir}/dnf-plugins/__pycache__/modulesync.*
312 %{_mandir}/man8/dnf-modulesync.8*
314 %files -n dnf-plugin-post-transaction-actions
315 %defattr(644,root,root,755)
316 %config(noreplace) %{_sysconfdir}/dnf/plugins/post-transaction-actions.conf
317 %config(noreplace) %{_sysconfdir}/dnf/plugins/post-transaction-actions.d
318 %{py3_sitescriptdir}/dnf-plugins/post-transaction-actions.*
319 %{py3_sitescriptdir}/dnf-plugins/__pycache__/post-transaction-actions.*
320 %{_mandir}/man8/dnf-post-transaction-actions.8*
322 %files -n dnf-plugin-show-leaves
323 %defattr(644,root,root,755)
324 %{py3_sitescriptdir}/dnf-plugins/show_leaves.*
325 %{py3_sitescriptdir}/dnf-plugins/__pycache__/show_leaves.*
326 %{_mandir}/man8/dnf-show-leaves.8*
328 %files -n dnf-plugin-versionlock
329 %defattr(644,root,root,755)
330 %config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.conf
331 %config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.list
332 %{py3_sitescriptdir}/dnf-plugins/versionlock.*
333 %{py3_sitescriptdir}/dnf-plugins/__pycache__/versionlock.*
334 %{_mandir}/man8/dnf-versionlock.8*
335 %if %{with yum_compatibility}
336 %{_mandir}/man5/yum-versionlock.conf.5*
337 %{_mandir}/man8/yum-versionlock.8*