diff --git a/.dnf-plugins-core.metadata b/.dnf-plugins-core.metadata index 2864c5a..f3afe6f 100644 --- a/.dnf-plugins-core.metadata +++ b/.dnf-plugins-core.metadata @@ -1 +1 @@ -cf995604c9a5c94991c51993f8d3ef57bdad63f8 SOURCES/dnf-plugins-core-2.1.5.tar.gz +d6354c126c4ab1614c0b09beaa3265604fb541f9 SOURCES/dnf-plugins-core-4.0.2.2.tar.gz diff --git a/.gitignore b/.gitignore index 54ac14b..85d2e2c 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/dnf-plugins-core-2.1.5.tar.gz +SOURCES/dnf-plugins-core-4.0.2.2.tar.gz diff --git a/SOURCES/312.patch b/SOURCES/312.patch new file mode 100644 index 0000000..cb53517 --- /dev/null +++ b/SOURCES/312.patch @@ -0,0 +1,85 @@ +From 358b40e72a8b5ea02fec84483ec76ee727315fca Mon Sep 17 00:00:00 2001 +From: Michal Domonkos +Date: Thu, 3 Jan 2019 15:58:06 +0100 +Subject: [PATCH 1/2] reposync: fix-up path traversal prevention + +Previously, pkg_download_path() would still pass if the target path was +a "sibling" of the destination directory. + +Example: + + repo_target = '/tmp/myrepo' + pkg_download_path = '../myrepo2/evil_file' + ... + # final path that passes the check: + pkg_download_path = '/tmp/myrepo2/evil_file' + # ^ this is a superstring of repo_target! + +This commit prevents that by making sure repo_target ends with a path +separator before it is passed to startswith(). We achieve that by +simply using join() with an empty string (see python docs). + +In addition, normpath() is replaced by realpath() to account for +symlinks that could also carry us outside repo_target. + +Resolves RHEL-8 bug: +https://bugzilla.redhat.com/show_bug.cgi?id=1600722 +--- + plugins/reposync.py | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/plugins/reposync.py b/plugins/reposync.py +index 29b911ed..0d72f559 100644 +--- a/plugins/reposync.py ++++ b/plugins/reposync.py +@@ -32,7 +32,7 @@ + + def _pkgdir(intermediate, target): + cwd = dnf.i18n.ucd(os.getcwd()) +- return os.path.normpath(os.path.join(cwd, intermediate, target)) ++ return os.path.realpath(os.path.join(cwd, intermediate, target)) + + + class RPMPayloadLocation(dnf.repo.RPMPayload): +@@ -118,9 +118,12 @@ def metadata_target(self, repo): + + def pkg_download_path(self, pkg): + repo_target = self.repo_target(pkg.repo) +- pkg_download_path = os.path.normpath( ++ pkg_download_path = os.path.realpath( + os.path.join(repo_target, pkg.location)) +- if not pkg_download_path.startswith(repo_target): ++ # join() ensures repo_target ends with a path separator (otherwise the ++ # check would pass if pkg_download_path was a "sibling" path component ++ # of repo_target that has the same prefix). ++ if not pkg_download_path.startswith(os.path.join(repo_target, '')): + raise dnf.exceptions.Error( + _("Download target '{}' is outside of download path '{}'.").format( + pkg_download_path, repo_target)) + +From 6e3cf05fc9a4e7559efcf37bebe5ff2998fc11b3 Mon Sep 17 00:00:00 2001 +From: Michal Domonkos +Date: Thu, 3 Jan 2019 16:08:37 +0100 +Subject: [PATCH 2/2] reposync: cosmetic: PEP8 whitespace fixes + +--- + plugins/reposync.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/plugins/reposync.py b/plugins/reposync.py +index 0d72f559..503e19a3 100644 +--- a/plugins/reposync.py ++++ b/plugins/reposync.py +@@ -46,6 +46,7 @@ def _target_params(self): + tp['dest'] = self.package_dir + return tp + ++ + @dnf.plugin.register_command + class RepoSyncCommand(dnf.cli.Command): + aliases = ('reposync',) +@@ -190,4 +191,3 @@ def download_packages(self, repo): + shutil.copy(pkg_path, target_dir) + if self.opts.delete: + self.delete_old_local_packages(pkglist) +- diff --git a/SPECS/dnf-plugins-core.spec b/SPECS/dnf-plugins-core.spec index 42ddcc4..ee18426 100644 --- a/SPECS/dnf-plugins-core.spec +++ b/SPECS/dnf-plugins-core.spec @@ -1,5 +1,4 @@ -%{?!dnf_lowest_compatible: %global dnf_lowest_compatible 2.7.0} -%{?!dnf_not_compatible: %global dnf_not_compatible 3.0} +%{?!dnf_lowest_compatible: %global dnf_lowest_compatible 4.0.7} %global dnf_plugins_extra 2.0.0 %global hawkey_version 0.7.0 @@ -9,19 +8,29 @@ %bcond_without python3 %endif -%if ! 0%{?rhel} || 0%{?rhel} > 7 -%bcond_without dnfutils +%if 0%{?rhel} > 7 || 0%{?fedora} > 29 +%bcond_with python2 +%bcond_without yumcompatibility %else +%bcond_without python2 +%bcond_with yumcompatibility +%endif + +%if 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with dnfutils +%else +%bcond_without dnfutils %endif Name: dnf-plugins-core -Version: 2.1.5 -Release: 5%{?dist} +Version: 4.0.2.2 +Release: 3%{?dist} Summary: Core Plugins for DNF License: GPLv2+ URL: https://github.com/rpm-software-management/dnf-plugins-core Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +Patch0: 312.patch + BuildArch: noarch BuildRequires: cmake BuildRequires: gettext @@ -33,6 +42,7 @@ Requires: python3-%{name} = %{version}-%{release} Requires: python2-%{name} = %{version}-%{release} %endif Provides: dnf-command(builddep) +Provides: dnf-command(changelog) Provides: dnf-command(config-manager) Provides: dnf-command(copr) Provides: dnf-command(debug-dump) @@ -43,6 +53,7 @@ Provides: dnf-command(repoclosure) Provides: dnf-command(repograph) Provides: dnf-command(repomanage) Provides: dnf-command(reposync) +Provides: dnf-command(repodiff) Provides: dnf-plugins-extras-debug = %{version}-%{release} Provides: dnf-plugins-extras-repoclosure = %{version}-%{release} Provides: dnf-plugins-extras-repograph = %{version}-%{release} @@ -54,30 +65,44 @@ Provides: dnf-plugin-download = %{version}-%{release} Provides: dnf-plugin-generate_completion_cache = %{version}-%{release} Provides: dnf-plugin-needs_restarting = %{version}-%{release} Provides: dnf-plugin-repoclosure = %{version}-%{release} +Provides: dnf-plugin-repodiff = %{version}-%{release} Provides: dnf-plugin-repograph = %{version}-%{release} Provides: dnf-plugin-repomanage = %{version}-%{release} Provides: dnf-plugin-reposync = %{version}-%{release} +%if %{with yumcompatibility} +Provides: yum-plugin-copr = %{version}-%{release} +Provides: yum-plugin-changelog = %{version}-%{release} +Provides: yum-plugin-auto-update-debug-info = %{version}-%{release} +%endif Conflicts: dnf-plugins-extras-common-data < %{dnf_plugins_extra} %description -Core Plugins for DNF. This package enhances DNF with builddep, config-manager, copr, debug, -debuginfo-install, download, needs-restarting, repoclosure, repograph, repomanage and reposync -commands. Additionally provides generate_completion_cache passive plugin. +Core Plugins for DNF. This package enhances DNF with builddep, config-manager, +copr, debug, debuginfo-install, download, needs-restarting, repoclosure, +repograph, repomanage, reposync, changelog and repodiff commands. Additionally +provides generate_completion_cache passive plugin. +%if %{with python2} %package -n python2-%{name} Summary: Core Plugins for DNF %{?python_provide:%python_provide python2-%{name}} BuildRequires: python2-dnf >= %{dnf_lowest_compatible} -BuildRequires: python2-dnf < %{dnf_not_compatible} %if 0%{?rhel} && 0%{?rhel} <= 7 BuildRequires: python-nose %else BuildRequires: python2-nose %endif BuildRequires: python2-devel +%if 0%{?fedora} +Requires: python2-distro +%endif Requires: python2-dnf >= %{dnf_lowest_compatible} -Requires: python2-dnf < %{dnf_not_compatible} Requires: python2-hawkey >= %{hawkey_version} +%if 0%{?rhel} && 0%{?rhel} <= 7 +Requires: python-dateutil +%else +Requires: python2-dateutil +%endif Provides: python2-dnf-plugins-extras-debug = %{version}-%{release} Provides: python2-dnf-plugins-extras-repoclosure = %{version}-%{release} Provides: python2-dnf-plugins-extras-repograph = %{version}-%{release} @@ -93,9 +118,11 @@ Conflicts: python3-%{name} < %{version}-%{release} Conflicts: python-%{name} < %{version}-%{release} %description -n python2-%{name} -Core Plugins for DNF, Python 2 interface. This package enhances DNF with builddep, config-manager, -copr, degug, debuginfo-install, download, needs-restarting, repoclosure, repograph, repomanage and -reposync commands. Additionally provides generate_completion_cache passive plugin. +Core Plugins for DNF, Python 2 interface. This package enhances DNF with builddep, +config-manager, copr, degug, debuginfo-install, download, needs-restarting, +repoclosure, repograph, repomanage, reposync, changelog and repodiff commands. +Additionally provides generate_completion_cache passive plugin. +%endif %if %{with python3} %package -n python3-%{name} @@ -103,15 +130,13 @@ Summary: Core Plugins for DNF %{?python_provide:%python_provide python3-%{name}} BuildRequires: python3-devel BuildRequires: python3-dnf >= %{dnf_lowest_compatible} -BuildRequires: python3-dnf < %{dnf_not_compatible} BuildRequires: python3-nose +%if 0%{?fedora} +Requires: python3-distro +%endif Requires: python3-dnf >= %{dnf_lowest_compatible} -Requires: python3-dnf < %{dnf_not_compatible} Requires: python3-hawkey >= %{hawkey_version} -Conflicts: %{name} <= 0.1.5 -# let the both python plugin versions be updated simultaneously -Conflicts: python2-%{name} < %{version}-%{release} -Conflicts: python-%{name} < %{version}-%{release} +Requires: python3-dateutil Provides: python3-dnf-plugins-extras-debug = %{version}-%{release} Provides: python3-dnf-plugins-extras-repoclosure = %{version}-%{release} Provides: python3-dnf-plugins-extras-repograph = %{version}-%{release} @@ -121,33 +146,42 @@ Obsoletes: python3-dnf-plugins-extras-repoclosure < %{dnf_plugins_extra} Obsoletes: python3-dnf-plugins-extras-repograph < %{dnf_plugins_extra} Obsoletes: python3-dnf-plugins-extras-repomanage < %{dnf_plugins_extra} +Conflicts: %{name} <= 0.1.5 +# let the both python plugin versions be updated simultaneously +Conflicts: python2-%{name} < %{version}-%{release} +Conflicts: python-%{name} < %{version}-%{release} + %description -n python3-%{name} -Core Plugins for DNF, Python 3 interface. This package enhances DNF with builddep, config-manager, -copr, debug, debuginfo-install, download, needs-restarting, repoclosure, repograph, repomanage and -reposync commands. Additionally provides generate_completion_cache passive plugin. +Core Plugins for DNF, Python 3 interface. This package enhances DNF with builddep, +config-manager, copr, debug, debuginfo-install, download, needs-restarting, +repoclosure, repograph, repomanage, reposync, changelog and repodiff commands. +Additionally provides generate_completion_cache passive plugin. %endif %if %{with dnfutils} %package -n dnf-utils -Conflicts: yum-utils +Conflicts: yum-utils < 1.1.31-513 +%if 0%{?rhel} != 7 +Provides: yum-utils = %{version}-%{release} +Obsoletes: yum-utils < 1.1.31-513 +%endif Requires: dnf >= %{dnf_lowest_compatible} Requires: %{name} = %{version}-%{release} %if %{with python3} Requires: python3-dnf >= %{dnf_lowest_compatible} -Requires: python3-dnf < %{dnf_not_compatible} %else Requires: python2-dnf >= %{dnf_lowest_compatible} -Requires: python2-dnf < %{dnf_not_compatible} %endif Summary: Yum-utils CLI compatibility layer %description -n dnf-utils As a Yum-utils CLI compatibility layer, supplies in CLI shims for debuginfo-install, repograph, package-cleanup, repoclosure, repomanage, -repoquery, reposync, repotrack, builddep, config-manager, debug, and -download that use new implementations using DNF. +repoquery, reposync, repotrack, repodiff, builddep, config-manager, debug +and download that use new implementations using DNF. %endif +%if 0%{?rhel} == 0 && %{with python2} %package -n python2-dnf-plugin-leaves Summary: Leaves Plugin for DNF Requires: python2-%{name} = %{version}-%{release} @@ -164,8 +198,9 @@ Obsoletes: python2-dnf-plugins-extras-leaves < %{dnf_plugins_extra} %description -n python2-dnf-plugin-leaves Leaves Plugin for DNF, Python 2 version. List all installed packages not required by any other installed package. +%endif -%if %{with python3} +%if 0%{?rhel} == 0 && %{with python3} %package -n python3-dnf-plugin-leaves Summary: Leaves Plugin for DNF Requires: python3-%{name} = %{version}-%{release} @@ -182,6 +217,7 @@ Leaves Plugin for DNF, Python 3 version. List all installed packages not required by any other installed package. %endif +%if 0%{?rhel} == 0 && %{with python2} %package -n python2-dnf-plugin-local Summary: Local Plugin for DNF Requires: %{_bindir}/createrepo_c @@ -198,8 +234,9 @@ Obsoletes: python2-dnf-plugins-extras-local < %{dnf_plugins_extra} %description -n python2-dnf-plugin-local Local Plugin for DNF, Python 2 version. Automatically copy all downloaded packages to a repository on the local filesystem and generating repo metadata. +%endif -%if %{with python3} +%if %{with python3} && 0%{?rhel} == 0 %package -n python3-dnf-plugin-local Summary: Local Plugin for DNF Requires: %{_bindir}/createrepo_c @@ -216,6 +253,7 @@ Local Plugin for DNF, Python 3 version. Automatically copy all downloaded packages to a repository on the local filesystem and generating repo metadata. %endif +%if %{with python2} %package -n python2-dnf-plugin-migrate Summary: Migrate Plugin for DNF Requires: python2-%{name} = %{version}-%{release} @@ -230,7 +268,9 @@ Obsoletes: python-dnf-plugins-extras-migrate < %{dnf_plugins_extra} %description -n python2-dnf-plugin-migrate Migrate Plugin for DNF, Python 2 version. Migrates history, group and yumdb data from yum to dnf. +%endif +%if 0%{?rhel} == 0 && %{with python2} %package -n python2-dnf-plugin-show-leaves Summary: Leaves Plugin for DNF Requires: python2-%{name} = %{version}-%{release} @@ -249,8 +289,9 @@ Obsoletes: python2-dnf-plugins-extras-show-leaves < %{dnf_plugins_extra} Show-leaves Plugin for DNF, Python 2 version. List all installed packages that are no longer required by any other installed package after a transaction. +%endif -%if %{with python3} +%if 0%{?rhel} == 0 && %{with python3} %package -n python3-dnf-plugin-show-leaves Summary: Show-leaves Plugin for DNF Requires: python3-%{name} = %{version}-%{release} @@ -269,6 +310,7 @@ packages that are no longer required by any other installed package after a transaction. %endif +%if %{with python2} %package -n python2-dnf-plugin-versionlock Summary: Version Lock Plugin for DNF Requires: python2-%{name} = %{version}-%{release} @@ -276,6 +318,9 @@ Requires: python2-%{name} = %{version}-%{release} Provides: dnf-plugin-versionlock = %{version}-%{release} Provides: dnf-command(versionlock) Provides: dnf-plugins-extras-versionlock = %{version}-%{release} +%if %{with yumcompatibility} +Provides: yum-plugin-versionlock = %{version}-%{release} +%endif %endif Provides: python2-dnf-plugins-extras-versionlock = %{version}-%{release} Conflicts: dnf-plugins-extras-common-data < %{dnf_plugins_extra} @@ -286,6 +331,7 @@ Obsoletes: python2-dnf-plugins-extras-versionlock < %{dnf_plugins_extra} Version lock plugin takes a set of name/versions for packages and excludes all other versions of those packages. This allows you to e.g. protect packages from being updated by newer versions. +%endif %if %{with python3} %package -n python3-dnf-plugin-versionlock @@ -294,6 +340,9 @@ Requires: python3-%{name} = %{version}-%{release} Provides: dnf-plugin-versionlock = %{version}-%{release} Provides: python3-dnf-plugins-extras-versionlock = %{version}-%{release} Provides: dnf-command(versionlock) +%if %{with yumcompatibility} +Provides: yum-plugin-versionlock = %{version}-%{release} +%endif Provides: dnf-plugins-extras-versionlock = %{version}-%{release} Conflicts: dnf-plugins-extras-common-data < %{dnf_plugins_extra} Conflicts: python2-dnf-plugin-versionlock < %{version}-%{release} @@ -306,30 +355,36 @@ updated by newer versions. %endif %prep -%autosetup +%autosetup -p1 +%if %{with python2} mkdir build-py2 +%endif %if %{with python3} mkdir build-py3 %endif %build +%if %{with python2} pushd build-py2 - %cmake ../ + %cmake ../ -DPYTHON_DESIRED:FILEPATH=%{__python2} -DWITHOUT_LOCAL:str=0%{?rhel} %make_build make doc-man popd +%endif %if %{with python3} pushd build-py3 - %cmake ../ -DPYTHON_DESIRED:str=3 + %cmake ../ -DPYTHON_DESIRED:FILEPATH=%{__python3} -DWITHOUT_LOCAL:str=0%{?rhel} %make_build make doc-man popd %endif %install +%if %{with python2} pushd build-py2 %make_install popd +%endif %if %{with python3} pushd build-py3 %make_install @@ -337,21 +392,23 @@ popd %endif %find_lang %{name} %if %{with dnfutils} -%if %{with python3} -mv %{buildroot}%{_libexecdir}/dnf-utils-3 %{buildroot}%{_libexecdir}/dnf-utils -%else -mv %{buildroot}%{_libexecdir}/dnf-utils-2 %{buildroot}%{_libexecdir}/dnf-utils -%endif + %if %{with python3} + mv %{buildroot}%{_libexecdir}/dnf-utils-3 %{buildroot}%{_libexecdir}/dnf-utils + %else + mv %{buildroot}%{_libexecdir}/dnf-utils-2 %{buildroot}%{_libexecdir}/dnf-utils + %endif %endif rm -vf %{buildroot}%{_libexecdir}/dnf-utils-* %if %{with dnfutils} mkdir -p %{buildroot}%{_bindir} ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/debuginfo-install +ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/needs-restarting ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/find-repos-of-install ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/repo-graph ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/package-cleanup ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/repoclosure +ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/repodiff ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/repomanage ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/repoquery ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/reposync @@ -361,16 +418,25 @@ ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/yum-config-manager ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/yum-debug-dump ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/yum-debug-restore ln -sf %{_libexecdir}/dnf-utils %{buildroot}%{_bindir}/yumdownloader +# These commands don't have a dedicated man page, so let's just point them to +# dnf-utils(1) which contains the descriptions. +ln -sf %{_mandir}/man1/dnf-utils.1.gz %{buildroot}%{_mandir}/man1/find-repos-of-install.1.gz +ln -sf %{_mandir}/man1/dnf-utils.1.gz %{buildroot}%{_mandir}/man1/repoquery.1.gz +ln -sf %{_mandir}/man1/dnf-utils.1.gz %{buildroot}%{_mandir}/man1/repotrack.1.gz +ln -sf %{_mandir}/man1/dnf-utils.1.gz %{buildroot}%{_mandir}/man1/yum-utils.1.gz %endif %check +%if %{with python2} PYTHONPATH=./plugins nosetests-%{python2_version} -s tests/ +%endif %if %{with python3} PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/ %endif %files %{_mandir}/man8/dnf.plugin.builddep.* +%{_mandir}/man8/dnf.plugin.changelog.* %{_mandir}/man8/dnf.plugin.config_manager.* %{_mandir}/man8/dnf.plugin.copr.* %{_mandir}/man8/dnf.plugin.debug.* @@ -379,16 +445,28 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/ %{_mandir}/man8/dnf.plugin.generate_completion_cache.* %{_mandir}/man8/dnf.plugin.needs_restarting.* %{_mandir}/man8/dnf.plugin.repoclosure.* +%{_mandir}/man8/dnf.plugin.repodiff.* %{_mandir}/man8/dnf.plugin.repograph.* %{_mandir}/man8/dnf.plugin.repomanage.* %{_mandir}/man8/dnf.plugin.reposync.* +%if %{with yumcompatibility} +%{_mandir}/man1/yum-changelog.* +%{_mandir}/man5/yum-changelog.conf.* +%else +%exclude %{_mandir}/man1/yum-changelog.* +%exclude %{_mandir}/man5/yum-changelog.conf.* +%endif +%if %{with python2} %files -n python2-%{name} -f %{name}.lang %license COPYING %doc AUTHORS README.rst %ghost %{_var}/cache/dnf/packages.db +%config(noreplace) %{_sysconfdir}/dnf/plugins/copr.conf +%config(noreplace) %{_sysconfdir}/dnf/plugins/copr.d %config(noreplace) %{_sysconfdir}/dnf/plugins/debuginfo-install.conf %{python2_sitelib}/dnf-plugins/builddep.* +%{python2_sitelib}/dnf-plugins/changelog.* %{python2_sitelib}/dnf-plugins/config_manager.* %{python2_sitelib}/dnf-plugins/copr.* %{python2_sitelib}/dnf-plugins/debug.* @@ -397,18 +475,23 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/ %{python2_sitelib}/dnf-plugins/generate_completion_cache.* %{python2_sitelib}/dnf-plugins/needs_restarting.* %{python2_sitelib}/dnf-plugins/repoclosure.* +%{python2_sitelib}/dnf-plugins/repodiff.* %{python2_sitelib}/dnf-plugins/repograph.* %{python2_sitelib}/dnf-plugins/repomanage.* %{python2_sitelib}/dnf-plugins/reposync.* %{python2_sitelib}/dnfpluginscore/ +%endif %if %{with python3} %files -n python3-%{name} -f %{name}.lang %license COPYING %doc AUTHORS README.rst %ghost %{_var}/cache/dnf/packages.db +%config(noreplace) %{_sysconfdir}/dnf/plugins/copr.conf +%config(noreplace) %{_sysconfdir}/dnf/plugins/copr.d %config(noreplace) %{_sysconfdir}/dnf/plugins/debuginfo-install.conf %{python3_sitelib}/dnf-plugins/builddep.py +%{python3_sitelib}/dnf-plugins/changelog.py %{python3_sitelib}/dnf-plugins/config_manager.py %{python3_sitelib}/dnf-plugins/copr.py %{python3_sitelib}/dnf-plugins/debug.py @@ -417,10 +500,12 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/ %{python3_sitelib}/dnf-plugins/generate_completion_cache.py %{python3_sitelib}/dnf-plugins/needs_restarting.py %{python3_sitelib}/dnf-plugins/repoclosure.py +%{python3_sitelib}/dnf-plugins/repodiff.py %{python3_sitelib}/dnf-plugins/repograph.py %{python3_sitelib}/dnf-plugins/repomanage.py %{python3_sitelib}/dnf-plugins/reposync.py %{python3_sitelib}/dnf-plugins/__pycache__/builddep.* +%{python3_sitelib}/dnf-plugins/__pycache__/changelog.* %{python3_sitelib}/dnf-plugins/__pycache__/config_manager.* %{python3_sitelib}/dnf-plugins/__pycache__/copr.* %{python3_sitelib}/dnf-plugins/__pycache__/debug.* @@ -429,6 +514,7 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/ %{python3_sitelib}/dnf-plugins/__pycache__/generate_completion_cache.* %{python3_sitelib}/dnf-plugins/__pycache__/needs_restarting.* %{python3_sitelib}/dnf-plugins/__pycache__/repoclosure.* +%{python3_sitelib}/dnf-plugins/__pycache__/repodiff.* %{python3_sitelib}/dnf-plugins/__pycache__/repograph.* %{python3_sitelib}/dnf-plugins/__pycache__/repomanage.* %{python3_sitelib}/dnf-plugins/__pycache__/reposync.* @@ -439,10 +525,12 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/ %files -n dnf-utils %{_libexecdir}/dnf-utils %{_bindir}/debuginfo-install +%{_bindir}/needs-restarting %{_bindir}/find-repos-of-install %{_bindir}/package-cleanup %{_bindir}/repo-graph %{_bindir}/repoclosure +%{_bindir}/repodiff %{_bindir}/repomanage %{_bindir}/repoquery %{_bindir}/reposync @@ -452,11 +540,52 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/ %{_bindir}/yum-debug-dump %{_bindir}/yum-debug-restore %{_bindir}/yumdownloader +%{_mandir}/man8/yum-copr.* +%{_mandir}/man1/debuginfo-install.* +%{_mandir}/man1/needs-restarting.* +%{_mandir}/man1/repo-graph.* +%{_mandir}/man1/repoclosure.* +%{_mandir}/man1/repodiff.* +%{_mandir}/man1/repomanage.* +%{_mandir}/man1/reposync.* +%{_mandir}/man1/yum-builddep.* +%{_mandir}/man1/yum-config-manager.* +%{_mandir}/man1/yum-debug-dump.* +%{_mandir}/man1/yum-debug-restore.* +%{_mandir}/man1/yumdownloader.* +%{_mandir}/man1/package-cleanup.* +%{_mandir}/man1/dnf-utils.* +# These are only built with dnfutils bcond. +%{_mandir}/man1/find-repos-of-install.* +%{_mandir}/man1/repoquery.* +%{_mandir}/man1/repotrack.* +%{_mandir}/man1/yum-utils.* +%else +# These are built regardless of dnfutils bcond so we need to exclude them. +%exclude %{_mandir}/man8/yum-copr.* +%exclude %{_mandir}/man1/debuginfo-install.* +%exclude %{_mandir}/man1/needs-restarting.* +%exclude %{_mandir}/man1/repo-graph.* +%exclude %{_mandir}/man1/repoclosure.* +%exclude %{_mandir}/man1/repodiff.* +%exclude %{_mandir}/man1/repomanage.* +%exclude %{_mandir}/man1/reposync.* +%exclude %{_mandir}/man1/yum-builddep.* +%exclude %{_mandir}/man1/yum-config-manager.* +%exclude %{_mandir}/man1/yum-debug-dump.* +%exclude %{_mandir}/man1/yum-debug-restore.* +%exclude %{_mandir}/man1/yumdownloader.* +%exclude %{_mandir}/man1/package-cleanup.* +%exclude %{_mandir}/man1/dnf-utils.* %endif +%if 0%{?rhel} == 0 + +%if %{with python2} %files -n python2-dnf-plugin-leaves %{python2_sitelib}/dnf-plugins/leaves.* %{_mandir}/man8/dnf.plugin.leaves.* +%endif %if %{with python3} %files -n python3-dnf-plugin-leaves @@ -465,12 +594,25 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/ %{_mandir}/man8/dnf.plugin.leaves.* %endif +%else +%exclude %{_mandir}/man8/dnf.plugin.leaves.* +%if %{with python2} +%exclude %{python2_sitelib}/dnf-plugins/leaves.* +%endif +%if %{with python3} +%exclude %{python3_sitelib}/dnf-plugins/leaves.* +%exclude %{python3_sitelib}/dnf-plugins/__pycache__/leaves.* +%endif +%endif # 0%{?rhel} == 0 + +%if 0%{?rhel} == 0 && %{with python2} %files -n python2-dnf-plugin-local %config(noreplace) %{_sysconfdir}/dnf/plugins/local.conf %{python2_sitelib}/dnf-plugins/local.* %{_mandir}/man8/dnf.plugin.local.* +%endif -%if %{with python3} +%if %{with python3} && 0%{?rhel} == 0 %files -n python3-dnf-plugin-local %config(noreplace) %{_sysconfdir}/dnf/plugins/local.conf %{python3_sitelib}/dnf-plugins/local.* @@ -478,13 +620,21 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/ %{_mandir}/man8/dnf.plugin.local.* %endif +%if %{with python2} %files -n python2-dnf-plugin-migrate %{python2_sitelib}/dnf-plugins/migrate.* %{_mandir}/man8/dnf.plugin.migrate.* +%else +%exclude %{_mandir}/man8/dnf.plugin.migrate.* +%endif + +%if 0%{?rhel} == 0 +%if %{with python2} %files -n python2-dnf-plugin-show-leaves %{python2_sitelib}/dnf-plugins/show_leaves.* %{_mandir}/man8/dnf.plugin.show-leaves.* +%endif %if %{with python3} %files -n python3-dnf-plugin-show-leaves @@ -493,11 +643,31 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/ %{_mandir}/man8/dnf.plugin.show-leaves.* %endif +%else +%exclude %{_mandir}/man8/dnf.plugin.show-leaves.* +%if %{with python2} +%exclude %{python2_sitelib}/dnf-plugins/show_leaves.* +%endif +%if %{with python3} +%exclude %{python3_sitelib}/dnf-plugins/show_leaves.* +%exclude %{python3_sitelib}/dnf-plugins/__pycache__/show_leaves.* +%endif +%endif # 0%{?rhel} == 0 + +%if %{with python2} %files -n python2-dnf-plugin-versionlock %config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.conf %config(noreplace) %{_sysconfdir}/dnf/plugins/versionlock.list %{python2_sitelib}/dnf-plugins/versionlock.* %{_mandir}/man8/dnf.plugin.versionlock.* +%if %{with yumcompatibility} +%{_mandir}/man8/yum-versionlock.* +%{_mandir}/man5/yum-versionlock.* +%else +%exclude %{_mandir}/man8/yum-versionlock.* +%exclude %{_mandir}/man5/yum-versionlock.* +%endif +%endif %if %{with python3} %files -n python3-dnf-plugin-versionlock @@ -506,9 +676,20 @@ PYTHONPATH=./plugins nosetests-%{python3_version} -s tests/ %{python3_sitelib}/dnf-plugins/versionlock.* %{python3_sitelib}/dnf-plugins/__pycache__/versionlock.* %{_mandir}/man8/dnf.plugin.versionlock.* +%if %{with yumcompatibility} +%{_mandir}/man8/yum-versionlock.* +%{_mandir}/man5/yum-versionlock.* +%else +%exclude %{_mandir}/man8/yum-versionlock.* +%exclude %{_mandir}/man5/yum-versionlock.* +%endif %endif %changelog +* Tue Jan 08 2019 Daniel Mach - 4.0.2.2-3 +- Update to 4.0.2.2 +- reposync: fix-up path traversal prevention (RhBug: 1600722) + * Fri Jul 13 2018 Marek Blaha - 2.1.5-5 - Disable dnf-utils for RHEL 7