Accepting request 1155986 from home:bnavigator:branches:Virtualization
- Fix libexecdir move: rpm cannot replace a directory with a single file on upgrades -- boo#1220592 * Add pre scriptlet removing the directory on Tumbleweed during upgrades * Don't own plain %_libexecdir on Tumbleweed OBS-URL: https://build.opensuse.org/request/show/1155986 OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtiofsd?expand=0&rev=21
This commit is contained in:
parent
17186b8a18
commit
c64efc8b27
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Mar 7 14:03:20 UTC 2024 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Fix libexecdir move: rpm cannot replace a directory with a single
|
||||||
|
file on upgrades -- boo#1220592
|
||||||
|
* Add pre scriptlet removing the directory on Tumbleweed during
|
||||||
|
upgrades
|
||||||
|
* Don't own plain %_libexecdir on Tumbleweed
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 28 15:08:19 UTC 2024 - Caleb Crane <caleb.crane@suse.com>
|
Wed Feb 28 15:08:19 UTC 2024 - Caleb Crane <caleb.crane@suse.com>
|
||||||
|
|
||||||
|
@ -16,9 +16,10 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define _virtiofsd_dir %{_libexecdir}
|
%if 0%{?suse_version} > 1500
|
||||||
%if 0%{?suse_version} <= 1500
|
%define _virtiofsd_libexecdir %{_libexecdir}
|
||||||
%define _virtiofsd_dir %{_libexecdir}/%{name}
|
%else
|
||||||
|
%define _virtiofsd_libexecdir %{_libexecdir}/%{name}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
Name: virtiofsd
|
Name: virtiofsd
|
||||||
@ -47,23 +48,28 @@ mkdir .cargo
|
|||||||
cp %{SOURCE2} .cargo/config
|
cp %{SOURCE2} .cargo/config
|
||||||
# Adjust libvirt/virtiofsd interop config file to handle differences in
|
# Adjust libvirt/virtiofsd interop config file to handle differences in
|
||||||
# the definition of libexecdir macro on SLE and Tumbleweed (bsc#1219772)
|
# the definition of libexecdir macro on SLE and Tumbleweed (bsc#1219772)
|
||||||
sed -i 's#@@LIBEXECDIR@@#%{_virtiofsd_dir}#' %{SOURCE3}
|
sed -i 's#@@LIBEXECDIR@@#%{_virtiofsd_libexecdir}#' %{SOURCE3}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%{cargo_build}
|
%{cargo_build}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
mkdir -p %{buildroot}%{_virtiofsd_dir}
|
mkdir -p %{buildroot}%{_virtiofsd_libexecdir}
|
||||||
install -D -p -m 0755 %{_builddir}/%{name}-%{version}/target/release/virtiofsd %{buildroot}%{_virtiofsd_dir}/virtiofsd
|
install -D -p -m 0755 %{_builddir}/%{name}-%{version}/target/release/virtiofsd %{buildroot}%{_virtiofsd_libexecdir}/virtiofsd
|
||||||
install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/qemu/vhost-user/50-virtiofsd.json
|
install -D -p -m 0644 %{SOURCE3} %{buildroot}%{_datadir}/qemu/vhost-user/50-virtiofsd.json
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%{cargo_test}
|
%{cargo_test}
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
# transition from old subdirectory to single file: rpm can't replace a directory on upgrades, force delete
|
||||||
|
%pre
|
||||||
|
[ ! -d %{_libexecdir}/%{name} ] || rm -r %{_libexecdir}/%{name}
|
||||||
|
%endif
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%dir %{_virtiofsd_dir}
|
%{_libexecdir}/virtiofsd
|
||||||
%{_virtiofsd_dir}/virtiofsd
|
|
||||||
%dir %{_datadir}/qemu
|
%dir %{_datadir}/qemu
|
||||||
%dir %{_datadir}/qemu/vhost-user
|
%dir %{_datadir}/qemu/vhost-user
|
||||||
%{_datadir}/qemu/vhost-user/50-virtiofsd.json
|
%{_datadir}/qemu/vhost-user/50-virtiofsd.json
|
||||||
|
Loading…
Reference in New Issue
Block a user