package: ruby-prometheus-client-mmap

I hope to update rust-nix to 0.30 soon. ruby-prometheus-client-mmap needs
a small patch to build with the new version.

Unfortunately, the small patch breaks builds with the old version, so
uploading this change to sid will have to wait until the new rust-nix is
actuallly in sid, in the meantime the new rust-nix is available in experimetal
for testing with.

diff -Nru ruby-prometheus-client-mmap-1.2.9/debian/changelog 
ruby-prometheus-client-mmap-1.2.9/debian/changelog
--- ruby-prometheus-client-mmap-1.2.9/debian/changelog  2025-04-24 
18:48:30.000000000 +0000
+++ ruby-prometheus-client-mmap-1.2.9/debian/changelog  2025-09-28 
18:28:03.000000000 +0000
@@ -1,3 +1,10 @@
+ruby-prometheus-client-mmap (1.2.9-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Add patch for nix 0.30
+
+ -- Peter Michael Green <[email protected]>  Sun, 28 Sep 2025 18:28:03 +0000
+
 ruby-prometheus-client-mmap (1.2.9-1) unstable; urgency=medium
 
   [ Pirate Praveen ]
diff -Nru ruby-prometheus-client-mmap-1.2.9/debian/patches/nix-0.30.patch 
ruby-prometheus-client-mmap-1.2.9/debian/patches/nix-0.30.patch
--- ruby-prometheus-client-mmap-1.2.9/debian/patches/nix-0.30.patch     
2025-04-24 18:48:30.000000000 +0000
+++ ruby-prometheus-client-mmap-1.2.9/debian/patches/nix-0.30.patch     
2025-09-28 18:28:03.000000000 +0000
@@ -11,3 +11,24 @@
  rb-sys = { version = "0.9", features = ["stable-api-compiled-fallback"] }
  serde = { version = "1.0", features = ["derive"] }
  serde_json = { version = "1.0", features = ["raw_value"] }
+Index: 
ruby-prometheus-client-mmap-1.2.9/ext/fast_mmaped_file_rs/src/mmap/inner.rs
+===================================================================
+--- 
ruby-prometheus-client-mmap-1.2.9.orig/ext/fast_mmaped_file_rs/src/mmap/inner.rs
++++ ruby-prometheus-client-mmap-1.2.9/ext/fast_mmaped_file_rs/src/mmap/inner.rs
+@@ -5,6 +5,7 @@ use std::fs::File;
+ use std::mem::size_of;
+ use std::ops::Range;
+ use std::os::unix::prelude::{AsRawFd, RawFd};
++use std::os::fd::BorrowedFd;
+ use std::path::PathBuf;
+ 
+ use crate::error::{MmapError, RubyError};
+@@ -256,7 +257,7 @@ impl InnerMmap {
+     // space).
+     #[cfg(target_os = "linux")]
+     fn reserve_mmap_file_bytes(fd: RawFd, len: off_t) -> nix::Result<()> {
+-        nix::fcntl::posix_fallocate(fd, 0, len)
++        nix::fcntl::posix_fallocate(unsafe { BorrowedFd::borrow_raw(fd) }, 0, 
len)
+     }
+ 
+     // We simplify the reference implementation since we generally

Reply via email to