From 1c9848d4c1e47bf95383a4646b6bda1f423c49cc Mon Sep 17 00:00:00 2001
From: NoisyCoil <noisycoil@tutanota.com>
Date: Fri, 1 Aug 2025 01:44:49 +0200
Subject: [PATCH] stop patching rustix; update to v1

---
 debian/control                        |  4 +--
 debian/patches/2002_rustix.patch      | 42 ---------------------------
 debian/patches/2003_not_windows.patch |  4 +--
 debian/patches/series                 |  1 -
 4 files changed, 4 insertions(+), 47 deletions(-)
 delete mode 100644 debian/patches/2002_rustix.patch

diff --git a/debian/control b/debian/control
index 1564ceda..ec80bd7b 100644
--- a/debian/control
+++ b/debian/control
@@ -51,8 +51,8 @@ Build-Depends:
  librust-regex-1+default-dev,
  librust-regex-cursor-0.1+default-dev,
  librust-ropey-1+simd-dev,
- librust-rustix-0.38+default-dev,
- librust-rustix-0.38+fs-dev,
+ librust-rustix-1+default-dev,
+ librust-rustix-1+fs-dev,
  librust-serde-1+default-dev,
  librust-serde-1+derive-dev,
  librust-serde-json-1+default-dev,
diff --git a/debian/patches/2002_rustix.patch b/debian/patches/2002_rustix.patch
deleted file mode 100644
index 1ad4e384..00000000
--- a/debian/patches/2002_rustix.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-Description: use older branch of crate rustix
- This essentially reverts upstream git commit f9360fb.
-Author: Jonas Smedegaard <dr@jones.dk>
-Forwarded: not-needed
-Last-Update: 2025-05-06
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/helix-stdx/Cargo.toml
-+++ b/helix-stdx/Cargo.toml
-@@ -26,7 +26,7 @@
- windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Authorization", "Win32_Storage_FileSystem", "Win32_System_Threading"] }
- 
- [target.'cfg(unix)'.dependencies]
--rustix = { version = "1.0", features = ["fs"] }
-+rustix = { version = "0.38.37", features = ["fs"] }
- 
- [dev-dependencies]
- tempfile.workspace = true
---- a/helix-view/Cargo.toml
-+++ b/helix-view/Cargo.toml
-@@ -57,7 +57,7 @@
- 
- [target.'cfg(unix)'.dependencies]
- libc = "0.2"
--rustix = { version = "1.0", features = ["fs"] }
-+rustix = { version = "0.38.37", features = ["fs"] }
- 
- [dev-dependencies]
- helix-tui = { path = "../helix-tui" }
---- a/helix-stdx/src/faccess.rs
-+++ b/helix-stdx/src/faccess.rs
-@@ -51,8 +51,8 @@
-     }
- 
-     fn chown(p: &Path, uid: Option<u32>, gid: Option<u32>) -> io::Result<()> {
--        let uid = uid.map(rustix::fs::Uid::from_raw);
--        let gid = gid.map(rustix::fs::Gid::from_raw);
-+        let uid = uid.map(|n| unsafe { rustix::fs::Uid::from_raw(n) });
-+        let gid = gid.map(|n| unsafe { rustix::fs::Gid::from_raw(n) });
-         rustix::fs::chown(p, uid, gid)?;
-         Ok(())
-     }
diff --git a/debian/patches/2003_not_windows.patch b/debian/patches/2003_not_windows.patch
index a8dcb1c5..a352b0da 100644
--- a/debian/patches/2003_not_windows.patch
+++ b/debian/patches/2003_not_windows.patch
@@ -15,7 +15,7 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 -
  [target.'cfg(unix)'.dependencies]
  libc = "0.2"
- rustix = { version = "0.38.37", features = ["fs"] }
+ rustix = { version = "1.0", features = ["fs"] }
 --- a/helix-stdx/Cargo.toml
 +++ b/helix-stdx/Cargo.toml
 @@ -22,9 +22,6 @@
@@ -26,5 +26,5 @@ This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
 -windows-sys = { version = "0.59", features = ["Win32_Foundation", "Win32_Security", "Win32_Security_Authorization", "Win32_Storage_FileSystem", "Win32_System_Threading"] }
 -
  [target.'cfg(unix)'.dependencies]
- rustix = { version = "0.38.37", features = ["fs"] }
+ rustix = { version = "1.0", features = ["fs"] }
  
diff --git a/debian/patches/series b/debian/patches/series
index d18da20c..593ff500 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -16,7 +16,6 @@
 2002_open.patch
 2002_pulldown-cmark.patch
 2002_regex-cursor.patch
-2002_rustix.patch
 2002_serde.patch
 2002_serde_json.patch
 2002_smallvec.patch
-- 
2.47.2

