Initial import for CentOS Stream 10
This commit is contained in:
parent
b93276debe
commit
1aefb48845
2
.gitignore
vendored
2
.gitignore
vendored
@ -0,0 +1,2 @@
|
||||
/prefixdevname-0.2.0.crate
|
||||
/prefixdevname-0.2.0-vendor.tar.gz
|
||||
25
0001-Drop-unnecessary-cast.patch
Normal file
25
0001-Drop-unnecessary-cast.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 27c6638477dc56d95469aa83ec47c839a23160fc Mon Sep 17 00:00:00 2001
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Thu, 30 Mar 2023 10:56:15 +0200
|
||||
Subject: [PATCH] Drop unnecessary cast
|
||||
|
||||
---
|
||||
src/sema.rs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/sema.rs b/src/sema.rs
|
||||
index 9504970..e79e5d0 100644
|
||||
--- a/src/sema.rs
|
||||
+++ b/src/sema.rs
|
||||
@@ -16,7 +16,7 @@ impl Semaphore {
|
||||
let s;
|
||||
unsafe {
|
||||
s = libc::sem_open(
|
||||
- raw_sema_name.as_ptr() as *const i8,
|
||||
+ raw_sema_name.as_ptr(),
|
||||
libc::O_CREAT,
|
||||
libc::S_IRUSR | libc::S_IWUSR,
|
||||
1,
|
||||
--
|
||||
2.38.1
|
||||
|
||||
83
rust-prefixdevname.spec
Normal file
83
rust-prefixdevname.spec
Normal file
@ -0,0 +1,83 @@
|
||||
# Generated by rust2rpm 23
|
||||
%bcond_without check
|
||||
|
||||
%global crate prefixdevname
|
||||
|
||||
Name: rust-prefixdevname
|
||||
Version: 0.2.0
|
||||
Release: %autorelease
|
||||
Summary: Udev helper utility that provides network interface naming using user defined prefix
|
||||
|
||||
License: MIT
|
||||
URL: https://crates.io/crates/prefixdevname
|
||||
Source: %{crates_source}
|
||||
# can be generated with make vendor in the sources
|
||||
Source: %{crate}-%{version}-vendor.tar.gz
|
||||
# Upstream PR (https://github.com/msekletar/prefixdevname/pull/29)
|
||||
Patch0001: 0001-Drop-unnecessary-cast.patch
|
||||
|
||||
%if 0%{?rhel}
|
||||
BuildRequires: rust-toolset
|
||||
%else
|
||||
BuildRequires: rust-packaging >= 23
|
||||
%endif
|
||||
BuildRequires: pkgconfig(libudev)
|
||||
%if %{with check}
|
||||
BuildRequires: umockdev-devel
|
||||
%endif
|
||||
# Tests fail on i686 but this package is not multilib so let's not build for this arch
|
||||
ExcludeArch: %{ix86}
|
||||
|
||||
%global _description %{expand:
|
||||
Udev helper utility that provides network interface naming using user defined prefix.}
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%package -n %{crate}
|
||||
Summary: %{summary}
|
||||
License: MIT AND (MIT OR Apache-2.0) AND (Unlicense OR MIT) AND Unicode-DFS-2016
|
||||
|
||||
%description -n %{crate} %{_description}
|
||||
|
||||
%files -n %{crate}
|
||||
%license LICENSE
|
||||
%license LICENSE.dependencies
|
||||
%if 0%{?rhel}
|
||||
%license cargo-vendor.txt
|
||||
%endif
|
||||
%doc README.md
|
||||
%{_prefix}/lib/udev/prefixdevname
|
||||
%{_prefix}/lib/udev/rules.d/71-prefixdevname.rules
|
||||
%{_prefix}/lib/dracut/modules.d/71prefixdevname/
|
||||
%{_prefix}/lib/dracut/modules.d/71prefixdevname-tools/
|
||||
|
||||
%prep
|
||||
%autosetup -n %{crate}-%{version_no_tilde} -p1 %{?rhel:-a1}
|
||||
%if 0%{?rhel}
|
||||
%cargo_prep -v vendor
|
||||
rm -f Cargo.lock
|
||||
%else
|
||||
%cargo_prep
|
||||
|
||||
%generate_buildrequires
|
||||
%cargo_generate_buildrequires
|
||||
%endif
|
||||
|
||||
%build
|
||||
%cargo_build
|
||||
%cargo_license_summary
|
||||
%{cargo_license} > LICENSE.dependencies
|
||||
%if 0%{?rhel}
|
||||
%cargo_vendor_manifest
|
||||
%endif
|
||||
|
||||
%install
|
||||
%make_install
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
%cargo_test
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
%autochangelog
|
||||
2
sources
Normal file
2
sources
Normal file
@ -0,0 +1,2 @@
|
||||
SHA512 (prefixdevname-0.2.0.crate) = 79e1f0a5edd49dd7a0323f301c672d884920540b33db7e214c9cc0fd57e7eb236826fc8ab2c1a12eb13d62c5e2385ff404a55923503d50b7682255d76a9b7d59
|
||||
SHA512 (prefixdevname-0.2.0-vendor.tar.gz) = 09c91a7f052aecd78158f75dbd6e5a09dc999e8a3bf7540d35191e31f5990aeb380648e33213c6c9875fa228aad6d924983ff6a2a016afbea3d53942243531fe
|
||||
Loading…
Reference in New Issue
Block a user