public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/rust-udev] epel10: Drop io-lifetimes (v1) dependency in favor of stdlib functionality
Date: Mon, 15 Jun 2026 13:49:39 GMT	[thread overview]
Message-ID: <178153137968.1.11425483137140822153.rpms-rust-udev-3a2a3d75179a@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rust-udev
Branch : epel10
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=epel10

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"
+ 

                 reply	other threads:[~2026-06-15 13:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178153137968.1.11425483137140822153.rpms-rust-udev-3a2a3d75179a@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox