parent
de6c475397
commit
ecfb493f4c
@ -0,0 +1 @@
|
||||
/rd-hashd-2.1.2.crate
|
@ -0,0 +1,30 @@
|
||||
From dbe5735bdf005a24e54dd19559016a59f6f43536 Mon Sep 17 00:00:00 2001
|
||||
From: Tejun Heo <htejun@fb.com>
|
||||
Date: Wed, 20 Oct 2021 11:10:07 -1000
|
||||
Subject: [PATCH] hashd: build fix for 32bit archs
|
||||
|
||||
---
|
||||
rd-hashd/src/testfiles.rs | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/rd-hashd/src/testfiles.rs b/rd-hashd/src/testfiles.rs
|
||||
index 28e046a..c3893b1 100644
|
||||
--- a/rd-hashd/src/testfiles.rs
|
||||
+++ b/rd-hashd/src/testfiles.rs
|
||||
@@ -4,6 +4,7 @@ use log::{debug, trace, warn};
|
||||
use num::Integer;
|
||||
use rand::rngs::SmallRng;
|
||||
use rand::SeedableRng;
|
||||
+use std::convert::TryInto;
|
||||
use std::ffi::OsStr;
|
||||
use std::fs;
|
||||
use std::io::{Read, Seek, SeekFrom, Write};
|
||||
@@ -177,7 +178,7 @@ impl TestFiles {
|
||||
libc::posix_fadvise(
|
||||
f.as_raw_fd(),
|
||||
0,
|
||||
- self.unit_size as i64,
|
||||
+ self.unit_size.try_into().unwrap(),
|
||||
libc::POSIX_FADV_DONTNEED,
|
||||
)
|
||||
};
|
@ -0,0 +1,57 @@
|
||||
# Generated by rust2rpm 18
|
||||
%bcond_without check
|
||||
%global __cargo_skip_build 0
|
||||
|
||||
%global crate rd-hashd
|
||||
|
||||
Name: rust-%{crate}
|
||||
Version: 2.1.2
|
||||
Release: %autorelease
|
||||
Summary: Latency-sensitive pseudo workload for resctl-demo
|
||||
|
||||
# Upstream license specification: Apache-2.0
|
||||
License: ASL 2.0 and BSD and MIT
|
||||
URL: https://crates.io/crates/rd-hashd
|
||||
Source: %{crates_source}
|
||||
# hashd: build fix for 32bit archs
|
||||
Patch0: https://github.com/facebookexperimental/resctl-demo/commit/dbe5735bdf005a24e54dd19559016a59f6f43536.patch
|
||||
|
||||
ExclusiveArch: %{rust_arches}
|
||||
|
||||
BuildRequires: rust-packaging
|
||||
|
||||
%global _description %{expand:
|
||||
Latency-sensitive pseudo workload for resctl-demo.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%package -n %{crate}
|
||||
Summary: %{summary}
|
||||
|
||||
%description -n %{crate} %{_description}
|
||||
|
||||
%files -n %{crate}
|
||||
%license LICENSE
|
||||
%doc README.md
|
||||
%{_bindir}/rd-hashd
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{version_no_tilde} -p2
|
||||
%cargo_prep
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
|
||||
%install
|
||||
%cargo_install
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
Loading…
Reference in new issue