## START: Set by rpmautospec ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by rust2rpm 27 %bcond check 1 %bcond bundled_rust_deps %{defined:rhel} %global crate vhost-device-sound Name: rust-vhost-device-sound Version: 0.3.0 Release: %autorelease Summary: Virtio-sound device using the vhost-user protocol License: Apache-2.0 OR BSD-3-Clause URL: https://crates.io/crates/vhost-device-sound Source: %{crates_source} %if %{with bundled_rust_deps} # The vendor tarball is created using cargo-vendor-filterer to remove Windows # related files (https://github.com/cgwalters/cargo-vendor-filterer) # spectool -g rust-vhost-device-sound.spec # tar xzf vhost-device-sound-%%{version}.crate # cd vhost-device-sound-%%{version} # cargo vendor-filterer --platform x86_64-unknown-linux-gnu \ # --platform powerpc64le-unknown-linux-gnu \ # --platform aarch64-unknown-linux-gnu \ # --platform i686-unknown-linux-gnu # # Trying to make a reproducible tarball: # tar --sort=name \ # --mtime='2024-11-29' \ # --owner=0 --group=0 --numeric-owner \ # -Jcf rust-vhost-device-sound-%%{version}-vendor.tar.xz vendor # Source1: rust-vhost-device-sound-%{version}-vendor.tar.xz %endif # Upstream doesn't provide man pages Patch: man-page.patch # Package dependencies vmm-sys-util not built for s390x # Upstream Package dependency vm-memory only support 64bit ExcludeArch: %{ix86} s390x BuildRequires: dbus-daemon >= 1.14.10 %if %{with bundled_rust_deps} BuildRequires: rust-toolset # vendored crates dependencies: BuildRequires: alsa-lib-devel BuildRequires: clang-devel BuildRequires: pipewire-devel %else BuildRequires: cargo-rpm-macros >= 24 %endif %global _description %{expand: A virtio-sound device using the vhost-user protocol.} %description %{_description} %package -n %{crate} Summary: %{summary} # (MIT OR Apache-2.0) AND Unicode-DFS-2016 # Apache-2.0 # Apache-2.0 AND BSD-3-Clause # Apache-2.0 OR BSD-3-Clause # Apache-2.0 OR MIT # BSD-2-Clause OR Apache-2.0 OR MIT # BSD-3-Clause # BSD-3-Clause OR Apache-2.0 # MIT # MIT OR Apache-2.0 # Unlicense OR MIT License: (MIT OR Apache-2.0) AND Unicode-DFS-2016 AND Apache-2.0 AND (Apache-2.0 OR BSD-3-Clause) AND (Apache-2.0 OR MIT) AND (BSD-2-Clause OR Apache-2.0 OR MIT) AND BSD-3-Clause AND MIT AND (Unlicense OR MIT) # LICENSE.dependencies contains a full license breakdown %description -n %{crate} %{_description} %files -n %{crate} %license LICENSE-APACHE %license LICENSE-BSD-3-Clause %license LICENSE.dependencies %if %{with bundled_rust_deps} %license cargo-vendor.txt %endif %doc CHANGELOG.md %doc README.md %{_bindir}/vhost-device-sound %{_mandir}/man1/* %if %{without bundled_rust_deps} # Packages that build with vendored dependencies MUST NOT provide a Rust library interface # (i.e. in -devel subpackages), because the resulting packages would have broken dependencies. %package devel Summary: %{summary} BuildArch: noarch %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE-APACHE %license %{crate_instdir}/LICENSE-BSD-3-Clause %doc %{crate_instdir}/CHANGELOG.md %doc %{crate_instdir}/README.md %{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+alsa-backend-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+alsa-backend-devel %{_description} This package contains library source intended for building other packages which use the "alsa-backend" feature of the "%{crate}" crate. %files -n %{name}+alsa-backend-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+gst-backend-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+gst-backend-devel %{_description} This package contains library source intended for building other packages which use the "gst-backend" feature of the "%{crate}" crate. %files -n %{name}+gst-backend-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+pw-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+pw-devel %{_description} This package contains library source intended for building other packages which use the "pw" feature of the "%{crate}" crate. %files -n %{name}+pw-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+pw-backend-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+pw-backend-devel %{_description} This package contains library source intended for building other packages which use the "pw-backend" feature of the "%{crate}" crate. %files -n %{name}+pw-backend-devel %ghost %{crate_instdir}/Cargo.toml %package -n %{name}+xen-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+xen-devel %{_description} This package contains library source intended for building other packages which use the "xen" feature of the "%{crate}" crate. %files -n %{name}+xen-devel %ghost %{crate_instdir}/Cargo.toml %endif %prep # Source1 is vendored dependencies %autosetup -n %{crate}-%{version_no_tilde} -p1 -N %{?with_bundled_rust_deps:-a1} %autopatch -p1 %cargo_prep %{?with_bundled_rust_deps:-v vendor} %if %{without bundled_rust_deps} %generate_buildrequires %cargo_generate_buildrequires %endif %build %cargo_build %{cargo_license_summary} %{cargo_license} > LICENSE.dependencies %if %{with bundled_rust_deps} %cargo_vendor_manifest %endif %install %cargo_install mkdir -p %{buildroot}/%{_mandir}/man1 install -p -m 644 vhost-device-sound.1 %{buildroot}/%{_mandir}/man1/ %if %{with check} %check # * skip pipewire tests that fail because it requires test utility to launch a temporary dbus daemon for pipewire. # * skip alsa tests that fail because of unwrapping the result of PCM::new(), which lead to a runtime panic %cargo_test -- -- --skip audio_backends::pipewire::tests::test_pipewire_backend_invalid_stream --skip audio_backends::pipewire::tests::test_pipewire_backend_success --skip audio_backends::tests::test_alloc_audio_backend --skip audio_backends::alsa::tests::test_alsa_invalid_fmt --skip audio_backends::alsa::tests::test_alsa_valid_parameters --skip audio_backends::alsa::tests::test_alsa_ops --skip audio_backends::alsa::tests::test_alsa_invalid_rate --skip audio_backends::alsa::tests::test_alsa_invalid_state_transitions --skip audio_backends::alsa::tests::test_alsa_invalid_stream_id --skip audio_backends::gstreamer::tests::test_gstreamer_backend_success --skip audio_backends::gstreamer::tests::test_gstreamer_multiple_prepare_release_cycles --skip audio_backends::gstreamer::tests::test_gstreamer_invalid_state_transitions %endif %changelog ## START: Generated by rpmautospec * Wed Dec 03 2025 Mat Booth - 0.3.0-2 - Remove no longer needed patch for rust-alsa version * Wed Nov 26 2025 Dorinda Bassey - 0.3.0-1 - Update to version 0.3.0 * Tue Sep 16 2025 Dorinda Bassey - 0.2.0-10 - patch to update rust-vmm dependencies * Thu Aug 07 2025 Benjamin A. Beasley - 0.2.0-9 - Update rstest to 0.26 * Fri Jul 25 2025 Fedora Release Engineering - 0.2.0-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Sun Jan 19 2025 Fedora Release Engineering - 0.2.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild * Mon Dec 02 2024 Sandro Bonazzola - 0.2.0-6 - Simplified vendoring * Wed Nov 20 2024 Benjamin A. Beasley - 0.2.0-5 - Update License expression based on latest cargo_license_summary output * Wed Nov 20 2024 Benjamin A. Beasley - 0.2.0-4 - Allow rstest 0.23 (and, for now, 0.18.2) * Thu Nov 14 2024 Sergio Lopez - 0.2.0-3 - Add a patch to update rust-vmm dependencies * Sun Oct 13 2024 Davide Cavalca - 0.2.0-2 - Drop alsa dependency downgrade * Thu Jul 18 2024 Sergio Lopez - 0.2.0-1 - Update to version 0.2.0 * Thu Jul 11 2024 Sandro Bonazzola - 0.1.0-3 - Introduce packaging for RHEL * Thu May 23 2024 Fabio Valentini - 0.1.0-2 - Rebuild with Rust 1.78 to fix incomplete debuginfo and backtraces * Wed May 15 2024 Dorinda Bassey - 0.1.0-1 - Initial import (fedora#2274028). ## END: Generated by rpmautospec