Add versioned BuildRequires
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 23 Nov 2022 21:03:29 +0000 (21:03 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Thu, 24 Nov 2022 09:06:18 +0000 (09:06 +0000)
Also replace unicode-xid with unicode-ident.

libblkio/libblkio.spec

index 2280f23..6c03b32 100644 (file)
@@ -5,7 +5,7 @@ Version:       1.1.1
 
 Summary:       Block device I/O library
 Name:          libblkio
-Release:       7%{?dist}
+Release:       8%{?dist}
 URL:           %{forgeurl}
 Source0:       %{forgesource}
 License:       Apache-2.0 OR MIT
@@ -23,24 +23,31 @@ BuildRequires: rustfmt
 BuildRequires: cargo
 BuildRequires: python3-docutils
 BuildRequires: pkgconf
-BuildRequires: crate(autocfg/default)
-BuildRequires: crate(bitflags/default)
-BuildRequires: crate(cc/default)
-BuildRequires: crate(cfg-if/default)
-BuildRequires: crate(concat-idents/default)
-BuildRequires: crate(const-cstr/default)
-BuildRequires: crate(io-uring/default)
-BuildRequires: crate(lazy_static/default)
-BuildRequires: crate(libc/default)
-BuildRequires: crate(memmap2/default)
-BuildRequires: crate(nix/default)
-BuildRequires: crate(num-traits/default)
-BuildRequires: crate(pci-driver/default)
-BuildRequires: crate(proc-macro2/default)
-BuildRequires: crate(quote/default)
-BuildRequires: crate(syn/default)
-BuildRequires: crate(unicode-xid/default)
-BuildRequires: crate(virtio-bindings/default)
+
+# XXX Eventually use %%generate_buildrequires but it does not support
+# workspaces yet.  See
+# https://bugzilla.redhat.com/show_bug.cgi?id=2124697#c57
+#
+# For packages with major version >= 1 we are simply requiring that
+# the major version does not change.
+BuildRequires: (crate(autocfg/default) >= 1.0.0 with crate(autocfg/default) < 2.0.0~)
+BuildRequires: (crate(bitflags/default) >= 1.0.0 with crate(bitflags/default) < 2.0.0~)
+BuildRequires: (crate(cc/default) >= 1.0.0 with crate(cc/default) < 2.0.0~)
+BuildRequires: (crate(cfg-if/default) >= 1.0.0 with crate(cfg-if/default) < 2.0.0~)
+BuildRequires: (crate(concat-idents/default) >= 1.0.0 with crate(concat-idents/default) < 2.0.0~)
+BuildRequires: crate(const-cstr/default) >= 0.3.0
+BuildRequires: crate(io-uring/default) >= 0.5.8
+BuildRequires: (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0~)
+BuildRequires: crate(libc/default) >= 0.2.134
+BuildRequires: crate(memmap2/default) >= 0.5.7
+BuildRequires: crate(nix/default) >= 0.24.2
+BuildRequires: crate(num-traits/default) >= 0.2.15
+BuildRequires: crate(pci-driver/default) >= 0.1.2
+BuildRequires: (crate(proc-macro2/default) >= 1.0.0 with crate(proc-macro2/default) < 2.0.0~)
+BuildRequires: (crate(quote/default) >= 1.0.0 with crate(quote/default) < 2.0.0~)
+BuildRequires: (crate(syn/default) >= 1.0.0 with crate(syn/default) < 2.0.0~)
+BuildRequires: (crate(unicode-ident/default) >= 1.0.0 with crate(unicode-ident/default) < 2.0.0~)
+BuildRequires: crate(virtio-bindings/default) >= 0.1.0
 
 
 %description
@@ -89,5 +96,5 @@ sed -e 's/--locked/--offline/' -i src/cargo-build.sh
 
 
 %changelog
-* Wed Nov 23 2022 Richard W.M. Jones <rjones@redhat.com> - 1.1.1-7
+* Thu Nov 24 2022 Richard W.M. Jones <rjones@redhat.com> - 1.1.1-8
 - Initial package