diff --git a/mock.spec b/mock.spec index 2a2f6390292c42a35cfac923e4ea7c144a217942..c5fdcd24c76259bd355de99efeb4c2abc72d5a80 100644 --- a/mock.spec +++ b/mock.spec @@ -8,7 +8,7 @@ Summary: Builds packages inside chroots Name: mock Version: 5.6 -Release: 1 +Release: 2 License: GPL-2.0-or-later Source: https://github.com/rpm-software-management/mock/releases/download/mock-2.2-1/%{name}-%{version}.tar.gz URL: https://github.com/rpm-software-management/mock/ @@ -21,17 +21,23 @@ Requires: python3-requests Requires: python3-rpm Requires: python3-pyroute2 BuildRequires: python3-devel -#BuildRequires: python-backoff +BuildRequires: python3-backoff %if %{with lint} BuildRequires: python3-pylint %endif BuildRequires: python3-rpm -#BuildRequires: python3-rpmautospec-core +BuildRequires: python3-rpmautospec-core Requires: tar Requires: pigz Requires: usermode Requires: createrepo_c + +# We know that the current version of mock isn't compatible with older variants, +# and we want to enforce automatic upgrades. + +Requires: mock-core-configs + Requires: systemd Requires: systemd-container Requires: coreutils @@ -88,6 +94,15 @@ Requires: lvm2 Mock plugin that enables using LVM as a backend and support creating snapshots of the buildroot. +%package rpmautospec +Summary: Rpmautospec plugin for mock +Requires: %{name} = %{version}-%{release} +# This lets mock determine if a spec file needs to be processed with rpmautospec. +Requires: python%{python3_pkgversion}-rpmautospec-core + +%description rpmautospec +Mock plugin that preprocesses spec files using rpmautospec. + %package filesystem Summary: Mock filesystem layout Requires(pre): shadow-utils @@ -158,7 +173,17 @@ install -p -m 0644 docs/site-defaults.cfg %{buildroot}%{_pkgdocdir} sed -i 's/^_MOCK_NVR = None$/_MOCK_NVR = "%name-%version-%release"/' \ %{buildroot}%{_libexecdir}/mock/mock + +%check +%if %{with lint} +# ignore the errors for now, just print them and hopefully somebody will fix it one day +pylint-3 py/mockbuild/ py/*.py py/mockbuild/plugins/* || : +%endif +%if %{with tests} +./run-tests.sh --no-cov +%endif + %files %defattr(0644, root, mock) %doc %{_pkgdocdir}/site-defaults.cfg @@ -201,7 +226,11 @@ sed -i 's/^_MOCK_NVR = None$/_MOCK_NVR = "%name-%version-%release"/' \ %files lvm %{python_sitelib}/mockbuild/plugins/lvm_root.* %{python3_sitelib}/mockbuild/plugins/__pycache__/lvm_root.*.py* - + +%files rpmautospec +%{python_sitelib}/mockbuild/plugins/rpmautospec.* +%{python3_sitelib}/mockbuild/plugins/__pycache__/rpmautospec.*.py* + %files filesystem %license COPYING %dir %{_sysconfdir}/mock @@ -211,6 +240,9 @@ sed -i 's/^_MOCK_NVR = None$/_MOCK_NVR = "%name-%version-%release"/' \ %dir %{_datadir}/cheat %changelog +* Sun Oct 20 2024 shafeipaozi - 5.6-2 +- update check + * Thu Apr 25 2024 shafeipaozi - 5.6-1 - update to 5.6