Only use Obsolete/Provides on Fedora 39 and later

The previous commit added Obsolete/Provides entries to ensure an easy
transition from qemu-virtiofsd to virtiofsd when users update to Fedora
39 from previous versions. We don't want this entries in previous
versions, as it may trigger an unnecessary switch between those
packages.

To avoid having divergent branches between rawhide and older versions,
put them behind a "if 0%{?fedora} > 38" conditional.

Suggested-by: Adam Williamson <awilliam@redhat.com>
Signed-off-by: Sergio Lopez <slp@redhat.com>
This commit is contained in:
Sergio Lopez 2023-05-09 17:23:12 +02:00
parent bd80da81e2
commit fcc05136ee

View File

@ -1,6 +1,6 @@
Name: virtiofsd
Version: 1.5.1
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Virtio-fs vhost-user device daemon (Rust version)
# Upstream license specification: Apache-2.0 AND BSD-3-Clause
@ -19,8 +19,10 @@ BuildRequires: libseccomp-devel
Requires: qemu-common
Provides: vhostuser-backend(fs)
Conflicts: qemu-virtiofsd
%if 0%{?fedora} > 38
Obsoletes: qemu-virtiofsd <= 2:8.0.0-1
Provides: qemu-virtiofsd = 2:7.2.1-1
%endif
%description
%{summary}.
@ -47,6 +49,9 @@ install -D -p -m 0644 50-qemu-virtiofsd.json %{buildroot}%{_datadir}/qemu/vhost-
%{_datadir}/qemu/vhost-user/50-qemu-virtiofsd.json
%changelog
* Tue May 09 2023 Sergio Lopez <slp@redhat.com> - 1.5.1-3
- Only use Obsoletes/Provides on Fedora 39 and later
* Wed Apr 26 2023 Daniel P. Berrangé <berrange@redhat.com> - 1.5.1-2
- Add Obsoletes/Provides for qemu-virtiofsd to get an upgrade path (rhbz #2189368)