Initial import; Fixes: RHBZ#1990927

epel9
Davide Cavalca 3 years ago
parent de6c475397
commit ecfb493f4c

1
.gitignore vendored

@ -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

@ -0,0 +1 @@
SHA512 (rd-hashd-2.1.2.crate) = 0e5b66efa2b2089f2c1efe7dc4e61982f9e2597daa103265d848e6b3a4e0c0089fb3c660e1ea6458f4def1c1e4f07baf7302d4bb79a509633749ac7a27cb5827
Loading…
Cancel
Save