Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spec: If DNF5 obsoletes DNF, do not build dnf-automatic #2129

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion dnf.spec
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ done
%endif
ln -sr %{buildroot}%{_bindir}/dnf-3 %{buildroot}%{_bindir}/dnf4
ln -sr %{buildroot}%{_datadir}/bash-completion/completions/dnf-3 %{buildroot}%{_datadir}/bash-completion/completions/dnf4
%if %{without dnf5_obsoletes_dnf}
mv %{buildroot}%{_bindir}/dnf-automatic-3 %{buildroot}%{_bindir}/dnf-automatic
%endif
rm -vf %{buildroot}%{_bindir}/dnf-automatic-*

# Strict conf distribution
Expand All @@ -253,16 +255,28 @@ ln -sr %{buildroot}%{confdir}/vars %{buildroot}%{_sysconfdir}/yum/vars
%endif

%if %{with dnf5_obsoletes_dnf}
rm %{buildroot}%{confdir}/automatic.conf
rm %{buildroot}%{confdir}/%{name}.conf
rm %{buildroot}%{_datadir}/locale/*/LC_MESSAGES/%{name}.mo
rm %{buildroot}%{_mandir}/man8/%{name}-automatic.8*
rm %{buildroot}%{_mandir}/man8/yum2dnf.8*
rm %{buildroot}%{_unitdir}/%{name}-automatic.service
rm %{buildroot}%{_unitdir}/%{name}-automatic.timer
rm %{buildroot}%{_unitdir}/%{name}-automatic-notifyonly.service
rm %{buildroot}%{_unitdir}/%{name}-automatic-notifyonly.timer
rm %{buildroot}%{_unitdir}/%{name}-automatic-download.service
rm %{buildroot}%{_unitdir}/%{name}-automatic-download.timer
rm %{buildroot}%{_unitdir}/%{name}-automatic-install.service
rm %{buildroot}%{_unitdir}/%{name}-automatic-install.timer
rm %{buildroot}%{_unitdir}/%{name}-makecache.service
rm %{buildroot}%{_unitdir}/%{name}-makecache.timer
%endif

%if 0%{?fedora} >= 41 || 0%{?rhel} >= 10
%py3_shebang_fix %{buildroot}%{_bindir}/dnf-3
%if %{without dnf5_obsoletes_dnf}
%py3_shebang_fix %{buildroot}%{_bindir}/dnf-automatic
%endif
%py3_shebang_fix %{buildroot}%{python3_sitelib}/%{name}/cli/completion_helper.py
%endif

Expand All @@ -282,7 +296,6 @@ popd

%postun
%systemd_postun_with_restart dnf-makecache.timer
%endif


%post automatic
Expand All @@ -293,6 +306,7 @@ popd

%postun automatic
%systemd_postun_with_restart dnf-automatic.timer dnf-automatic-notifyonly.timer dnf-automatic-download.timer dnf-automatic-install.timer
%endif


%if %{without dnf5_obsoletes_dnf}
Expand Down Expand Up @@ -389,6 +403,7 @@ popd
%dir %{py3pluginpath}/__pycache__
%{_var}/cache/%{name}/

%if %{without dnf5_obsoletes_dnf}
%files automatic
%{_bindir}/%{name}-automatic
%config(noreplace) %{confdir}/automatic.conf
Expand All @@ -402,6 +417,7 @@ popd
%{_unitdir}/%{name}-automatic-install.service
%{_unitdir}/%{name}-automatic-install.timer
%{python3_sitelib}/%{name}/automatic/
%endif

%changelog
* Wed Aug 14 2024 Evan Goode <mail@evangoo.de> - 4.21.1-1
Expand Down
Loading