public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rust-udev] f44: Drop io-lifetimes (v1) dependency in favor of stdlib functionality
@ 2026-06-15 13:28 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-06-15 13:28 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/rust-udev
Branch : f44
Commit : 3a2a3d75179a14fbea0caee2798fe81f19422835
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-06-15T14:02:25+01:00
Stats  : +77/-1 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/rust-udev/c/3a2a3d75179a14fbea0caee2798fe81f19422835?branch=f44

Log:
Drop io-lifetimes (v1) dependency in favor of stdlib functionality

---
diff --git a/0001-Replace-io-lifetimes-crate-with-libstd-types.patch b/0001-Replace-io-lifetimes-crate-with-libstd-types.patch
new file mode 100644
index 0000000..e5794bf
--- /dev/null
+++ b/0001-Replace-io-lifetimes-crate-with-libstd-types.patch
@@ -0,0 +1,43 @@
+From 8f2ebcb6ca5a72626f7043dd49bed0c3964814c7 Mon Sep 17 00:00:00 2001
+From: Sludge <96552222+SludgePhD@users.noreply.github.com>
+Date: Tue, 13 Aug 2024 00:41:28 +0200
+Subject: [PATCH] Replace `io-lifetimes` crate with libstd types
+
+---
+ src/lib.rs     | 1 -
+ src/monitor.rs | 2 +-
+ 2 files changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/src/lib.rs b/src/lib.rs
+index a32d35f..755f20b 100644
+--- a/src/lib.rs
++++ b/src/lib.rs
+@@ -4,7 +4,6 @@
+ 
+ #![warn(missing_docs)]
+ 
+-extern crate io_lifetimes;
+ extern crate libc;
+ pub extern crate libudev_sys as ffi;
+ #[cfg(feature = "mio06")]
+diff --git a/src/monitor.rs b/src/monitor.rs
+index cf36aed..649af28 100644
+--- a/src/monitor.rs
++++ b/src/monitor.rs
+@@ -1,4 +1,5 @@
+ use std::fmt;
++use std::os::fd::{AsFd, BorrowedFd};
+ use std::ptr;
+ 
+ use std::ffi::OsStr;
+@@ -6,7 +7,6 @@ use std::io::Result;
+ use std::ops::Deref;
+ use std::os::unix::io::{AsRawFd, RawFd};
+ 
+-use io_lifetimes::{AsFd, BorrowedFd};
+ #[cfg(feature = "mio06")]
+ use mio::{event::Evented, unix::EventedFd, Poll, PollOpt, Ready, Token};
+ #[cfg(any(feature = "mio07", feature = "mio08", feature = "mio10"))]
+-- 
+2.54.0
+

diff --git a/rust-udev.spec b/rust-udev.spec
index 85dc412..18d9230 100644
--- a/rust-udev.spec
+++ b/rust-udev.spec
@@ -1,4 +1,4 @@
-# Generated by rust2rpm 27
+# Generated by rust2rpm 28
 %bcond check 1
 %global debug_package %{nil}
 
@@ -12,6 +12,12 @@ Summary:        Libudev bindings for Rust
 License:        MIT
 URL:            https://crates.io/crates/udev
 Source:         %{crates_source}
+# Manually created patch for downstream crate metadata changes
+# * Drop io-lifetimes dependency: https://github.com/Smithay/udev-rs/pull/51
+Patch:          udev-fix-metadata.diff
+# * Source-code patch for replacing the io-lifetimes dependency with
+#   standard-library functionality, https://github.com/Smithay/udev-rs/pull/51.
+Patch10:        0001-Replace-io-lifetimes-crate-with-libstd-types.patch
 
 BuildRequires:  cargo-rpm-macros >= 24
 

diff --git a/rust2rpm.toml b/rust2rpm.toml
index 6083bbb..58e5b74 100644
--- a/rust2rpm.toml
+++ b/rust2rpm.toml
@@ -1,3 +1,18 @@
+[package]
+cargo-toml-patch-comments = [
+    "Drop io-lifetimes dependency: https://github.com/Smithay/udev-rs/pull/51",
+]
+
+[[package.extra-patches]]
+number = 10
+file = "0001-Replace-io-lifetimes-crate-with-libstd-types.patch"
+comments = [
+    """\
+Source-code patch for replacing the io-lifetimes dependency with \
+standard-library functionality, https://github.com/Smithay/udev-rs/pull/51.\
+""",
+]
+
 [features]
 hide = [
   "mio06",

diff --git a/udev-fix-metadata.diff b/udev-fix-metadata.diff
new file mode 100644
index 0000000..93087c3
--- /dev/null
+++ b/udev-fix-metadata.diff
@@ -0,0 +1,12 @@
+--- udev-0.9.3/Cargo.toml	1970-01-01T00:00:01+00:00
++++ udev-0.9.3/Cargo.toml	2026-06-15T13:02:19.952211+00:00
+@@ -47,9 +47,6 @@
+ name = "monitor"
+ path = "examples/monitor.rs"
+ 
+-[dependencies.io-lifetimes]
+-version = "1.0.3"
+-
+ [dependencies.libc]
+ version = "0.2"
+ 

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-15 13:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-15 13:28 [rpms/rust-udev] f44: Drop io-lifetimes (v1) dependency in favor of stdlib functionality Benjamin A. Beasley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox