From 53037a3f45336e9f3ab8e5b0473f63b1e6dfc789b4100c8ab4e4932bfe1f6f12 Mon Sep 17 00:00:00 2001 From: Caleb Crane Date: Thu, 8 Aug 2024 19:41:23 +0000 Subject: [PATCH 1/2] - Update to version 1.11.1: * Changes since 1.11.0: * Add "separate-options" capability * Force-call DESTROY on INIT * Do not require --shared-dir to print capabilities * Enable notification on vring failure * Bump version to v1.11.0 * deps: Update to the latest rust-vmm crates * deps: Update to the latest libc * Note migration capability * README: Document new migration switches * Introduce --migration-mode switch * Introduce --migration-confirm-paths * PassthroughFs::init: Point to NegotiatedOpts * Implement device state deserialization * Add get_path_by_fd()/printable_fd() functions * Implement device state serialization * Implement preserialization/premigration * Define our serialized device state * Introduce serializable file handles * Introduce --migration-verify-handles * Introduce --migration-on-error switch * Allow explicitly invalid inodes and handles * Split try_lookup() off of do_lookup() * Add ReadDir::new_no_seek() * Put open_root_node() into own function * Add type for strong inode references * Hide InodeStore locking * Remove `&Inode` indirection * Add device state infrastructure OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtiofsd?expand=0&rev=23 --- .gitattributes | 23 ++++++++ .gitignore | 1 + 50-virtiofsd.json | 5 ++ _service | 31 ++++++++++ cargo_config | 5 ++ vendor.tar.xz | 3 + virtiofsd-1.10.1.tar.xz | 3 + virtiofsd-1.11.1.tar.xz | 3 + virtiofsd.changes | 124 ++++++++++++++++++++++++++++++++++++++++ virtiofsd.spec | 77 +++++++++++++++++++++++++ 10 files changed, 275 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 50-virtiofsd.json create mode 100644 _service create mode 100644 cargo_config create mode 100644 vendor.tar.xz create mode 100644 virtiofsd-1.10.1.tar.xz create mode 100644 virtiofsd-1.11.1.tar.xz create mode 100644 virtiofsd.changes create mode 100644 virtiofsd.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/50-virtiofsd.json b/50-virtiofsd.json new file mode 100644 index 0000000..e359f0b --- /dev/null +++ b/50-virtiofsd.json @@ -0,0 +1,5 @@ +{ + "description": "virtiofsd vhost-user-fs", + "type": "fs", + "binary": "@@LIBEXECDIR@@/virtiofsd" +} diff --git a/_service b/_service new file mode 100644 index 0000000..b155f1d --- /dev/null +++ b/_service @@ -0,0 +1,31 @@ + + + https://gitlab.com/virtio-fs/virtiofsd.git + git + virtiofsd + v1.11.1 + @PARENT_TAG@ + [v]?([^\+]+)(.*) + \1 + enable + + + + + + + + *.tar + xz + + + + virtiofsd + + + + virtiofsd + xz + true + + diff --git a/cargo_config b/cargo_config new file mode 100644 index 0000000..6fb4ff4 --- /dev/null +++ b/cargo_config @@ -0,0 +1,5 @@ +[source.crates-io] +replace-with = "vendored-sources" + +[source.vendored-sources] +directory = "vendor" \ No newline at end of file diff --git a/vendor.tar.xz b/vendor.tar.xz new file mode 100644 index 0000000..a46a285 --- /dev/null +++ b/vendor.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:aafa01e1d26ccb1e93314fd327154a2fc3198317bdebed1217099fe02bc3ac9b +size 24286775 diff --git a/virtiofsd-1.10.1.tar.xz b/virtiofsd-1.10.1.tar.xz new file mode 100644 index 0000000..5925667 --- /dev/null +++ b/virtiofsd-1.10.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b52b3d59f43140dca7d56e6dc8d88a0f894eeb0de69d0003b72115be71627154 +size 97376 diff --git a/virtiofsd-1.11.1.tar.xz b/virtiofsd-1.11.1.tar.xz new file mode 100644 index 0000000..2085e50 --- /dev/null +++ b/virtiofsd-1.11.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a311d0762bdf0904fdbd36fac47a1a382250ce49bf5e9041da5c21ce0d5d4129 +size 117492 diff --git a/virtiofsd.changes b/virtiofsd.changes new file mode 100644 index 0000000..08ce398 --- /dev/null +++ b/virtiofsd.changes @@ -0,0 +1,124 @@ +------------------------------------------------------------------- +Thu Aug 08 08:13:17 UTC 2024 - Xiaoguang Wang + +- Update to version 1.11.1: + * Changes since 1.11.0: + * Add "separate-options" capability + * Force-call DESTROY on INIT + * Do not require --shared-dir to print capabilities + * Enable notification on vring failure + * Bump version to v1.11.0 + * deps: Update to the latest rust-vmm crates + * deps: Update to the latest libc + * Note migration capability + * README: Document new migration switches + * Introduce --migration-mode switch + * Introduce --migration-confirm-paths + * PassthroughFs::init: Point to NegotiatedOpts + * Implement device state deserialization + * Add get_path_by_fd()/printable_fd() functions + * Implement device state serialization + * Implement preserialization/premigration + * Define our serialized device state + * Introduce serializable file handles + * Introduce --migration-verify-handles + * Introduce --migration-on-error switch + * Allow explicitly invalid inodes and handles + * Split try_lookup() off of do_lookup() + * Add ReadDir::new_no_seek() + * Put open_root_node() into own function + * Add type for strong inode references + * Hide InodeStore locking + * Remove `&Inode` indirection + * Add device state infrastructure + * Add ErrorContext, ResultErrorContext traits + * Add other_io_error() utility function + * Add support for dirty memory logging + * opt: Introduce --allow-mmap flag + * fuse: Enable DIRECT_IO_ALLOW_MMAP with --allow-mmap + * Add '--shared-dir' as required if '-o' is missing + * Close the listener in the parent process + * Check if the socket parent directory exists + * Check if the shared directory exists + * deps: Bump syslog version + * Increase maximum virtqueue size to 32768 + * Allow multiple uid/gid maps + * Hide clippy warning in readdir + * Shorten `std::result::Result` where possible + * Remove redundant Result imports + * deps: Bump vhost and vhost-user-backend versions + * Remove virtio-bindings feature + * Directly write uid/gidmap where possible + * Fix clippy warning: Complicated `match` condition + * Fix clippy warning: Skip converting to owned + * Fix clippy warning: Make use of `.cloned()` + * Fix new compiler warnings + +------------------------------------------------------------------- +Thu Mar 7 14:03:20 UTC 2024 - Ben Greiner + +- 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 + +- Spec: More tweaks to libexecdir path issues on SLE and Tumbleweed + +------------------------------------------------------------------- +Mon Feb 26 14:16:30 UTC 2024 - Caleb Crane + +- Spec: We don't want /usr/libexec to be namespaced like it is with /usr/lib (bsc#1220304) + +------------------------------------------------------------------- +Thu Feb 22 03:02:23 UTC 2024 - Caleb Crane + +- Spec: Adjust libvirt/virtiofsd interop config file to handle differences in + the definition of libexecdir macro on SLE and Tumbleweed (bsc#1219772) + +------------------------------------------------------------------- +Tue Jan 30 17:09:25 UTC 2024 - caleb.crane@suse.com + +- Fix CVE-2023-50711: vmm-sys-util: out of bounds memory accesses (bsc#1218502, bsc#1218500) +- Update to version 1.10.1: + * Bump version to v1.10.1 + * Fix mandatory user namespaces + * Don't drop supplemental groups in unprivileged user namespace + * Bump version to v1.10.0 + * Update rust-vmm dependencies (bsc#1218500) + * Bump version to v1.9.0 +- Spec: switch to using the upstream virtio-fs config file for qemu +- Spec: switch back to greedy cargo updates of vendored dependencies + +------------------------------------------------------------------- +Thu Aug 31 20:28:08 UTC 2023 - Caleb Crane + +- Update to upstream version v1.7.2 (jsc#PED-4980) + - Add supplementary group extension support + - Prevent EPERM failures with O_NOATIME + - Fix cache timeouts + - seccomp: Allow SYS_sched_yield + - Allow to provide the same argument multiple times + - Add the -V/--version options +- Upgrade vendored dependencies + +------------------------------------------------------------------- +Fri Jun 2 15:40:06 UTC 2023 - Caleb Crane + +- Add qemu config file to ensure qemu is aware of the virtiofsd executable +- https://www.reddit.com/r/suse/comments/13xmote/vm_with_virtiofs_does_not_start_unable_to_find_a/ + +------------------------------------------------------------------- +Thu May 25 02:33:51 UTC 2023 - Caleb Crane + +- Remove exclusive arch, only disable for 32-bit archs (i586 and armv7l) +- Add package conflict with the previous implementation of virtiofsd inside + older versions of the qemu-tools package (qemu-tools < 8) + +------------------------------------------------------------------- +Tue May 23 13:30:11 UTC 2023 - Caleb Crane + +- Initial release of virtiofsd v1.6.1 diff --git a/virtiofsd.spec b/virtiofsd.spec new file mode 100644 index 0000000..9765069 --- /dev/null +++ b/virtiofsd.spec @@ -0,0 +1,77 @@ +# +# spec file for package virtiofsd +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%if 0%{?suse_version} > 1500 + %define _virtiofsd_libexecdir %{_libexecdir} +%else + %define _virtiofsd_libexecdir %{_libexecdir}/%{name} +%endif + +Name: virtiofsd +Version: 1.11.1 +Release: 0 +Summary: A vhost-user virtio-fs device backend written in Rust +Group: Development/Libraries/Rust +License: Apache-2.0 +URL: https://gitlab.com/virtio-fs/virtiofsd +Source0: %{name}-%{version}.tar.xz +Source1: vendor.tar.xz +Source2: cargo_config +Source3: 50-virtiofsd.json +BuildRequires: cargo-packaging +BuildRequires: libcap-ng-devel +BuildRequires: libseccomp-devel +Conflicts: qemu-tools < 8 +ExcludeArch: %ix86 %arm + +%description +A vhost-user virtio-fs device backend written in Rust + +%prep +%autosetup -a1 +mkdir .cargo +cp %{SOURCE2} .cargo/config +# Adjust libvirt/virtiofsd interop config file to handle differences in +# the definition of libexecdir macro on SLE and Tumbleweed (bsc#1219772) +sed -i 's#@@LIBEXECDIR@@#%{_virtiofsd_libexecdir}#' %{SOURCE3} + +%build +%{cargo_build} + +%install +mkdir -p %{buildroot}%{_virtiofsd_libexecdir} +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 + +%check +%{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 +%doc README.md +%{_libexecdir}/virtiofsd +%dir %{_datadir}/qemu +%dir %{_datadir}/qemu/vhost-user +%{_datadir}/qemu/vhost-user/50-virtiofsd.json + +%changelog From 2005b7a025a8eb86d3453a034810eb3e79608c3f371f55e03cbb0288c05bea7b Mon Sep 17 00:00:00 2001 From: Caleb Crane Date: Thu, 8 Aug 2024 20:11:34 +0000 Subject: [PATCH 2/2] - Service: Remove deprecated cargo_config and cargo_audit services, both are now handled by the cargo_vendor service - Add new upstream features for the libvirt/virtiofsd interop config OBS-URL: https://build.opensuse.org/package/show/Virtualization/virtiofsd?expand=0&rev=24 --- 50-virtiofsd.json | 6 +++++- _service | 4 ---- cargo_config | 5 ----- vendor.tar.xz | 4 ++-- virtiofsd.changes | 8 ++++++++ virtiofsd.spec | 9 +++------ 6 files changed, 18 insertions(+), 18 deletions(-) delete mode 100644 cargo_config diff --git a/50-virtiofsd.json b/50-virtiofsd.json index e359f0b..9eec755 100644 --- a/50-virtiofsd.json +++ b/50-virtiofsd.json @@ -1,5 +1,9 @@ { "description": "virtiofsd vhost-user-fs", "type": "fs", - "binary": "@@LIBEXECDIR@@/virtiofsd" + "binary": "@@LIBEXECDIR@@/virtiofsd", + "features": [ + "migrate-precopy", + "separate-options" + ] } diff --git a/_service b/_service index b155f1d..e184f38 100644 --- a/_service +++ b/_service @@ -19,10 +19,6 @@ xz - - virtiofsd - - virtiofsd xz diff --git a/cargo_config b/cargo_config deleted file mode 100644 index 6fb4ff4..0000000 --- a/cargo_config +++ /dev/null @@ -1,5 +0,0 @@ -[source.crates-io] -replace-with = "vendored-sources" - -[source.vendored-sources] -directory = "vendor" \ No newline at end of file diff --git a/vendor.tar.xz b/vendor.tar.xz index a46a285..829b7a0 100644 --- a/vendor.tar.xz +++ b/vendor.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:aafa01e1d26ccb1e93314fd327154a2fc3198317bdebed1217099fe02bc3ac9b -size 24286775 +oid sha256:fcbf986f6c859d95c664f02c58000f5af08d53068ab6c35a282ecd2495b1119d +size 14890536 diff --git a/virtiofsd.changes b/virtiofsd.changes index 08ce398..04057a8 100644 --- a/virtiofsd.changes +++ b/virtiofsd.changes @@ -1,6 +1,14 @@ +------------------------------------------------------------------- +Thu Aug 8 19:57:34 UTC 2024 - Caleb Crane + +- Service: Remove deprecated cargo_config and cargo_audit services, both + are now handled by the cargo_vendor service +- Add new upstream features for the libvirt/virtiofsd interop config + ------------------------------------------------------------------- Thu Aug 08 08:13:17 UTC 2024 - Xiaoguang Wang +- Fix build failure after update to Rust 1.80 (bsc#1228972) - Update to version 1.11.1: * Changes since 1.11.0: * Add "separate-options" capability diff --git a/virtiofsd.spec b/virtiofsd.spec index 9765069..60afdb5 100644 --- a/virtiofsd.spec +++ b/virtiofsd.spec @@ -31,8 +31,7 @@ License: Apache-2.0 URL: https://gitlab.com/virtio-fs/virtiofsd Source0: %{name}-%{version}.tar.xz Source1: vendor.tar.xz -Source2: cargo_config -Source3: 50-virtiofsd.json +Source2: 50-virtiofsd.json BuildRequires: cargo-packaging BuildRequires: libcap-ng-devel BuildRequires: libseccomp-devel @@ -44,11 +43,9 @@ A vhost-user virtio-fs device backend written in Rust %prep %autosetup -a1 -mkdir .cargo -cp %{SOURCE2} .cargo/config # Adjust libvirt/virtiofsd interop config file to handle differences in # the definition of libexecdir macro on SLE and Tumbleweed (bsc#1219772) -sed -i 's#@@LIBEXECDIR@@#%{_virtiofsd_libexecdir}#' %{SOURCE3} +sed -i 's#@@LIBEXECDIR@@#%{_virtiofsd_libexecdir}#' %{SOURCE2} %build %{cargo_build} @@ -56,7 +53,7 @@ sed -i 's#@@LIBEXECDIR@@#%{_virtiofsd_libexecdir}#' %{SOURCE3} %install mkdir -p %{buildroot}%{_virtiofsd_libexecdir} 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 %{SOURCE2} %{buildroot}%{_datadir}/qemu/vhost-user/50-virtiofsd.json %check %{cargo_test}