dnf/dnf.spec

433 lines
15 KiB
RPMSpec
Raw Permalink Normal View History

2020-07-29 10:19:49 +08:00
%global py3pluginpath %{python3_sitelib}/%{name}-plugins
2022-11-17 16:08:49 +08:00
%global relate_libdnf_version 0.66.0
2019-09-30 10:37:03 -04:00
2020-01-08 20:13:09 +08:00
Name: dnf
2023-07-29 16:04:14 +08:00
Version: 4.16.2
Release: 8
2020-01-08 20:13:09 +08:00
Summary: A software package manager that manages packages on Linux distributions.
2023-07-29 16:04:14 +08:00
License: GPL-2.0-or-later AND GPL-1.0-only
2020-01-08 20:13:09 +08:00
URL: https://github.com/rpm-software-management/dnf
Source0: https://github.com/rpm-software-management/dnf/archive/%{version}/%{name}-%{version}.tar.gz
2020-01-17 09:14:37 +08:00
Patch9002: add-rpm-transaction-debuginfo.patch
Patch9004: fix-dnf-history-undo-error-when-history-sqlite-missing.patch
%if 0%{?check_target_before_unlink}
Patch9006: get-lockfile-exists-before-unlick.patch
%endif
%ifarch sw_64
Patch6000: dnf-4.10.0-sw.patch
%endif
2023-07-29 16:04:14 +08:00
2023-01-10 08:44:59 +08:00
%if 0%(test `uname -m` == "loongarch64" && echo 1)
Patch6001: 0001-Add-loongarch-architecture-support.patch
%endif
Patch6002: backport-Fix-bash-completion-due-to-sqlite-changes.patch
Patch6003: backport-remove-duplicates-when-no-duplicates-exit-with-0.patch
Patch6004: backport-remove-oldinstallonly-when-no-old-installonly-packages-exit-with-0.patch
Patch6005: backport-Add-all-candidates-for-reinstall-to-solver.patch
Patch6006: backport-Limit-queries-to-nevra-forms-when-provided-by-command.patch
Patch6007: backport-doc-Remove-provide-of-spec-definition-for-repoquery-command.patch
Patch6008: backport-Update-the-man-page-entry-for-the-countme-option.patch
Patch6009: backport-Allow-local-downloads-to-same-downloaddir.patch
Patch9001: bugfix-automatic-Use-add_security_filters-not-_update_secur.patch
2020-01-08 20:13:09 +08:00
BuildArch: noarch
2020-07-29 10:19:49 +08:00
BuildRequires: cmake gettext systemd bash-completion python3-sphinx
Requires: python3-%{name} = %{version}-%{release} libreport-filesystem
2020-01-08 20:13:09 +08:00
Recommends: (%{_bindir}/sqlite3 if bash-completion) (python3-dbus if NetworkManager)
2020-08-04 13:56:59 +08:00
Conflicts: python2-dnf-plugins-core < 4.0.6 python3-dnf-plugins-core < 4.0.6
2019-09-30 10:37:03 -04:00
%description
DNF is a software package manager that installs, updates, and removespackages
on RPM-based Linux distributions. It automatically computes dependencies and
determines the actions required to install packages.DNF also makes it easier
to maintain groups of machines, eliminating the need to manually update each
one using rpm.
%package -n yum
2020-01-08 20:13:09 +08:00
Requires: %{name} = %{version}-%{release}
2020-07-29 10:19:49 +08:00
Summary: Package manager
2019-09-30 10:37:03 -04:00
2020-01-08 20:13:09 +08:00
%description -n yum
Utility that allows users to manage packages on their systems.\
It supports RPMs, modules and comps groups & environments.
2019-09-30 10:37:03 -04:00
2020-01-08 20:13:09 +08:00
%package -n python3-%{name}
Summary: Python 3 interface to DNF
2019-09-30 10:37:03 -04:00
%{?python_provide:%python_provide python3-%{name}}
2022-11-17 16:08:49 +08:00
BuildRequires: python3-devel python3-hawkey >= 0.66.0 python3-libdnf >= 0.66.0
BuildRequires: python3-libcomps >= 0.1.8 libmodulemd >= 2.9.3
BuildRequires: python3-gpg python3-rpm >= 4.14.0
2022-11-17 16:08:49 +08:00
Requires: python3-gpg %{name}-data = %{version}-%{release} libmodulemd >= 2.9.3
Requires: python3-hawkey >= 0.66.0 python3-libdnf >= %{relate_libdnf_version}
Requires: python3-libcomps >= 0.1.8 python3-rpm >= 4.14.0
Recommends: python3-unbound
2023-07-29 16:04:14 +08:00
Provides: dnf-command(alias) dnf-command(autoremove) dnf-command(check-update) dnf-command(clean)
Provides: dnf-command(distro-sync) dnf-command(downgrade) dnf-command(group) dnf-command(history)
Provides: dnf-command(info) dnf-command(install) dnf-command(list) dnf-command(makecache)
Provides: dnf-command(mark) dnf-command(provides) dnf-command(reinstall) dnf-command(remove)
Provides: dnf-command(repolist) dnf-command(repoquery) dnf-command(repository-packages)
Provides: dnf-command(search) dnf-command(updateinfo) dnf-command(upgrade) dnf-command(upgrade-to)
Obsoletes: python2-%{name}
2019-09-30 10:37:03 -04:00
2020-01-08 20:13:09 +08:00
%description -n python3-%{name}
Python 3 interface to DNF.
2019-09-30 10:37:03 -04:00
%package data
Summary: Common data and configuration files for DNF
Requires: libreport-filesystem
Obsoletes: %{name}-conf < %{version}-%{release}
Provides: %{name}-conf = %{version}-%{release}
%description data
Common data and configuration files for DNF
%package automatic
Summary: Package manager - automated upgrades
BuildRequires: systemd
2023-07-29 16:04:14 +08:00
Requires: python3-%{name} = %{version}-%{release}
%{?systemd_requires}
%description automatic
Systemd units that can periodically download package upgrades and apply them.
%package help
Summary: Documents for dnf and yum
Buildarch: noarch
Requires: man info
Provides: yum-help = %{version}-%{release}
Obsoletes: yum-help < %{version}-%{release}
%description help
Man pages and other related documents for dnf and yum
2019-09-30 10:37:03 -04:00
%prep
%autosetup -p1
2020-01-08 20:13:09 +08:00
mkdir build-py3
2019-09-30 10:37:03 -04:00
#Failure use case
#It not have root permissions in obs
#tests/api/test_dnf_base.py test_do_transaction
#tests/api/test_dnf_logging.py test_dnf_logger
sed -i '168,174d' tests/api/test_dnf_base.py
sed -i '51,55d' tests/api/test_dnf_logging.py
2019-09-30 10:37:03 -04:00
%build
2020-07-29 10:19:49 +08:00
pushd build-py3
%cmake .. -DPYTHON_DESIRED:FILEPATH=%{__python3}
%make_build all doc-man
popd
2019-09-30 10:37:03 -04:00
%install
2020-07-29 10:19:49 +08:00
pushd build-py3
%make_install
popd
2019-09-30 10:37:03 -04:00
%find_lang %{name}
2020-01-08 20:13:09 +08:00
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/vars
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/aliases.d
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/plugins/
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/modules.d
mkdir -p %{buildroot}%{_sysconfdir}/bash_completion.d/dnf
mkdir -p %{buildroot}%{_sysconfdir}/%{name}/modules.defaults.d
mkdir -p %{buildroot}%{py3pluginpath}/__pycache__/
mkdir -p %{buildroot}%{_localstatedir}/log/
mkdir -p %{buildroot}%{_var}/cache/dnf/
2019-09-30 10:37:03 -04:00
touch %{buildroot}%{_localstatedir}/log/%{name}.log
ln -sr %{buildroot}%{_bindir}/dnf-3 %{buildroot}%{_bindir}/dnf
2023-07-29 16:04:14 +08:00
ln -sr %{buildroot}%{_bindir}/dnf-3 %{buildroot}%{_bindir}/dnf4
2019-09-30 10:37:03 -04:00
mv %{buildroot}%{_bindir}/dnf-automatic-3 %{buildroot}%{_bindir}/dnf-automatic
rm -vf %{buildroot}%{_bindir}/dnf-automatic-*
2020-01-08 20:13:09 +08:00
mv -f %{buildroot}%{_sysconfdir}/%{name}/%{name}-strict.conf %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
ln -sr %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf %{buildroot}%{_sysconfdir}/yum.conf
ln -sr %{buildroot}%{_bindir}/dnf-3 %{buildroot}%{_bindir}/yum
mkdir -p %{buildroot}%{_sysconfdir}/yum
ln -sr %{buildroot}%{_sysconfdir}/%{name}/plugins %{buildroot}%{_sysconfdir}/yum/pluginconf.d
ln -sr %{buildroot}%{_sysconfdir}/%{name}/protected.d %{buildroot}%{_sysconfdir}/yum/protected.d
ln -sr %{buildroot}%{_sysconfdir}/%{name}/vars %{buildroot}%{_sysconfdir}/yum/vars
2019-09-30 10:37:03 -04:00
%check
export TERM=linux
pushd build-py3
ctest -VV
popd
2019-09-30 10:37:03 -04:00
%post
%systemd_post dnf-makecache.timer
%preun
%systemd_preun dnf-makecache.timer
%postun
%systemd_postun_with_restart dnf-makecache.timer
%post automatic
2019-09-30 10:37:03 -04:00
%systemd_post dnf-automatic.timer
%systemd_post dnf-automatic-notifyonly.timer
%systemd_post dnf-automatic-download.timer
%systemd_post dnf-automatic-install.timer
%preun automatic
2019-09-30 10:37:03 -04:00
%systemd_preun dnf-automatic.timer
%systemd_preun dnf-automatic-notifyonly.timer
%systemd_preun dnf-automatic-download.timer
%systemd_preun dnf-automatic-install.timer
%postun automatic
2019-09-30 10:37:03 -04:00
%systemd_postun_with_restart dnf-automatic.timer
%systemd_postun_with_restart dnf-automatic-notifyonly.timer
%systemd_postun_with_restart dnf-automatic-download.timer
%systemd_postun_with_restart dnf-automatic-install.timer
2020-01-08 20:13:09 +08:00
%files
2019-09-30 10:37:03 -04:00
%{_bindir}/%{name}
2020-01-08 20:13:09 +08:00
%{_sysconfdir}/bash_completion.d/%{name}
%{_unitdir}/%{name}-makecache.timer
%{_unitdir}/%{name}-makecache.service
2019-09-30 10:37:03 -04:00
%{_var}/cache/%{name}/
%files -n yum
%{_bindir}/yum
%{_sysconfdir}/yum/vars
%{_sysconfdir}/yum.conf
%{_sysconfdir}/yum/pluginconf.d
%{_sysconfdir}/yum/protected.d
2023-07-29 16:04:14 +08:00
%config %{_sysconfdir}/%{name}/protected.d/yum.conf
%files -n python3-%{name}
%{_bindir}/%{name}-3
2023-07-29 16:04:14 +08:00
%{_bindir}/%{name}4
%exclude %{python3_sitelib}/%{name}/automatic
%{python3_sitelib}/%{name}/
%dir %{py3pluginpath}
%dir %{py3pluginpath}/__pycache__
%files data
%license COPYING PACKAGE-LICENSING
%doc AUTHORS README.rst
%dir %{_sysconfdir}/%{name}
2020-01-08 20:13:09 +08:00
%dir %{_sysconfdir}/%{name}/modules.d
%dir %{_sysconfdir}/%{name}/modules.defaults.d
%dir %{_sysconfdir}/%{name}/plugins
%dir %{_sysconfdir}/%{name}/protected.d
%dir %{_sysconfdir}/%{name}/vars
%dir %{_sysconfdir}/%{name}/aliases.d
%exclude %{_sysconfdir}/%{name}/aliases.d/zypper.conf
%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
2023-07-29 16:04:14 +08:00
%config %{_sysconfdir}/%{name}/protected.d/%{name}.conf
%config(noreplace) %{_sysconfdir}/%{name}/protected.d/python3-%{name}.conf
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
2020-01-08 20:13:09 +08:00
%ghost %attr(644,-,-) %{_localstatedir}/log/hawkey.log
%ghost %attr(644,-,-) %{_localstatedir}/log/%{name}.log
%ghost %attr(644,-,-) %{_localstatedir}/log/%{name}.librepo.log
%ghost %attr(644,-,-) %{_localstatedir}/log/%{name}.rpm.log
%ghost %attr(644,-,-) %{_localstatedir}/log/%{name}.plugin.log
%ghost %attr(755,-,-) %dir %{_sharedstatedir}/%{name}
%ghost %attr(644,-,-) %{_sharedstatedir}/%{name}/groups.json
%ghost %attr(755,-,-) %dir %{_sharedstatedir}/%{name}/yumdb
%ghost %attr(755,-,-) %dir %{_sharedstatedir}/%{name}/history
2019-09-30 10:37:03 -04:00
%{_tmpfilesdir}/%{name}.conf
%{_sysconfdir}/libreport/events.d/collect_dnf.conf
%files automatic
%{_bindir}/%{name}-automatic
%config(noreplace) %{_sysconfdir}/%{name}/automatic.conf
%{_unitdir}/%{name}-automatic.service
%{_unitdir}/%{name}-automatic.timer
%{_unitdir}/%{name}-automatic-notifyonly.service
%{_unitdir}/%{name}-automatic-notifyonly.timer
%{_unitdir}/%{name}-automatic-download.service
%{_unitdir}/%{name}-automatic-download.timer
%{_unitdir}/%{name}-automatic-install.service
%{_unitdir}/%{name}-automatic-install.timer
%{python3_sitelib}/%{name}/automatic/
2019-09-30 10:37:03 -04:00
%files help
2020-01-08 20:13:09 +08:00
%{_datadir}/locale/*
%{_datadir}/bash-completion/*
2020-01-08 20:13:09 +08:00
%{_mandir}/man8/yum.8*
%{_mandir}/man8/yum2dnf.8*
%{_mandir}/man8/%{name}.8*
2019-09-30 10:37:03 -04:00
%{_mandir}/man5/yum.conf.5.*
2020-01-08 20:13:09 +08:00
%{_mandir}/man8/yum-shell.8*
%{_mandir}/man1/yum-aliases.1*
2019-09-30 10:37:03 -04:00
%{_mandir}/man5/%{name}.conf.5*
%{_mandir}/man5/dnf-transaction-json.5.gz
2020-01-08 20:13:09 +08:00
%{_mandir}/man7/dnf.modularity.7*
%{_mandir}/man8/%{name}-automatic.8*
2019-09-30 10:37:03 -04:00
%changelog
* Mon Nov 04 2024 majianhan <majianhan@kylinos.cn> - 4.16.2-8
- Type:bugfix
- ID:NA
- SUG:NA
- DESC: Fix dnf-automatic service to apply security updates the same way as dnf tool
* Mon Sep 9 2024 zhangzikang <zhangzikang@kylinos.cn> - 4.16.2-7
- Allow local downloads to same downloaddir
* Wed Aug 14 2024 Funda Wang <fundawang@yeah.net> - 4.16.2-6
- Drop wrong obsolete tag
* Thu Jul 25 2024 LuWu <2398491106@qq.com> - 4.16.2-5
- Limit queries to nevra forms when provided by command and Update the man page entry for the countme option
* Mon May 6 2024 hanhuihui <hanhuihui5@huawei.com> - 4.16.2-4
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:dnf:Remove --duplicates and --oldinstallonly exit with 0 when nothing to remove and Add all candidates for reinstall to solver
2024-05-06 15:47:04 +08:00
* Mon May 06 2024 huangwenhua <huangwenhua@kylinos.cn> - 4.16.2-3
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:dnf:Fix loongarch architecture support
* Tue Jan 02 2024 chenhaixing <chenhaixing@huawei.com> - 4.16.2-2
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:dnf:Fix bash completion due to sqlite changes
2023-07-29 16:04:14 +08:00
* Sat Jul 29 2023 zhangrui <zhangrui182@huawei.com> - 4.16.2-1
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:upgrade dnf to 4.16.2
2023-07-14 11:36:39 +08:00
* Fri Jul 14 2023 chenhaixing <chenhaixing@huawei.com> - 4.14.0-15
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:dnf:remove patch about pidfile
2023-06-27 17:05:47 +08:00
* Tue Jun 27 2023 chenhaixing <chenhaixing@huawei.com> - 4.14.0-14
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:dnf:cli:allow = in setopt values
* Mon Mar 13 2023 chenhaixing <chenhaixing@huawei.com> 4.14.0-13
- CVE:NA
- SUG:NA
- DESC:dnf:fix AttributeError when io busy and press ctrl c
* Tue Mar 7 2023 chenhaixing <chenhaixing@huawei.com> 4.14.0-12
- CVE:NA
- SUG:NA
- DESC:dnf:fix undo error when include rollback of group upgrade
fix can't download package when url have characters encoded
2023-02-22 00:25:35 +08:00
* Wed Feb 22 2023 xiasenlin <xiasenlin1@huawei.com> - 4.14.0-11
- DESC:Add exception capture to get-lockfile-exists-before-unlick.patch
* Fri Feb 17 2023 chenhaixing <chenhaixing@huawei.com> 4.14.0-10
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:dnf:fix install error when vim file in /etc/dnf/vars/
* Tue Jan 10 2023 xiasenlin <xiasenlin1@huawei.com> - 4.14.0-9
- DESC:add get-lockfile-exists-before-unlick.patch
2023-01-10 08:44:59 +08:00
* Fri Jan 6 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 4.14.0-8
- DESC: fix build error for loongarch64
* Tue Dec 20 2022 chenhaixing <chenhaixing@huawei.com> - 4.14.0-7
- DESC:fix test cases failed in tests/test_plugin.py
* Thu Dec 15 2022 chenhaixing <chenhaixing@huawei.com> - 4.14.0-6
- DESC:remove tests
* Tue Dec 13 2022 chenhaixing <chenhaixing@huawei.com> - 4.14.0-5
- DESC:fix dnf-data downgrade confilct with dnf
* Fri Dec 9 2022 chenhaixing <chenhaixing@huawei.com> - 4.14.0-4
- DESC:add sw64 and loongarch support for dnf
* Fri Dec 9 2022 chenhaixing <chenhaixing@huawei.com> - 4.14.0-3
- DESC:enable DT
* Wed Nov 16 2022 chenhaixing <chenhaixing@huawei.com> - 4.14.0-2
- DESC:correct the incorrect Obsoletes
* Thu Nov 3 2022 chenhaixing <chenhaixing@huawei.com> - 4.14.0-1
- DESC:upgrade dnf version to 4.14.0
* Mon Mar 21 2022 yangcheng <yangcheng87@h-partners.com> - 4.10.0-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix dnf error when history sqlite missing
* Mon Jan 17 2022 liuyumeng <liuyumeng5@huawei.com> - 4.10.0-2
- round self-developed patch,adapt test_onother_process
* Wed Dec 29 2021 yangcheng <yangcheng87@huawei.com> - 4.10.0-1
- upgrade to 4.10.0
* Thu Jul 15 2021 gaihuiying <gaihuiying1@huawei.com> - 4.2.23-6
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:remove recommends rpm-plugins-systemd-inhibit
backport community patches and fix CVE-2021-3445
delete duplicate python3-libdnf dependency
* Tue Mar 30 2021 gaihuiying <gaihuiying1@huawei.com> - 4.2.23-5
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix errors when use "yum module remove --all per:common" command
fix test test_mode_tty failed
2020-11-20 14:48:03 +08:00
* Fri Nov 20 2020 lunankun <lunankun@huawei.com> - 4.2.23-4
- Type:requirement
- ID:NA
- SUG:NA
- DESC:remove depend deltarpm
* Tue Sep 01 2020 zhangrui <zhangrui182@huawei.com> - 4.2.23-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:provide automatic files and provide yum help
2020-08-04 13:56:59 +08:00
* Tue Aug 04 2020 yuboyun <yuboyun@huawei.com> - 4.2.23-2
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix conflicts error for new version
2020-07-29 10:19:49 +08:00
* Tue Apr 28 2020 zhouyihang <zhouyihang3@huawei.com> - 4.2.23-1
- Type:requirement
- ID:NA
- SUG:NA
- DESC:update dnf version to 4.2.23
2020-03-18 18:37:31 +08:00
* Wed Mar 18 2020 songnannan <songnannan2@huawei.com> - 4.2.15-8
- add obsoletes the python2-dnf
2020-03-03 21:54:43 +08:00
* Tue Mar 3 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.2.15-7
- modify the patch name
2020-02-27 19:55:32 +08:00
* Thu Feb 27 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.2.15-6
- remove extra brace
* Mon Feb 24 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.2.15-5
- Revert Fix messages for starting and failing scriptlets
2020-02-17 20:49:53 +08:00
* Fri Feb 14 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.2.15-4
- remove python2
2020-01-17 09:14:37 +08:00
* Fri Jan 17 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.2.15-3
- bug fix format problem
2020-01-08 20:13:09 +08:00
* Mon Jan 6 2020 openEuler Buildteam <buildteam@openeuler.org> - 4.2.15-2
- Package Init