Package: atuin

I hope to update the dirs crate to version 6 and the sysinfo crate to version
0.37 soon (probablly not at the same time).

For dirs, atuin just needs a dependency bump, for sysinfo some code changes
are needed, but I was able to make those code changes in a way that the
code builds with both the old and new version.
diff -Nru atuin-18.8.0/debian/changelog atuin-18.8.0/debian/changelog
--- atuin-18.8.0/debian/changelog       2025-12-05 17:20:14.000000000 +0000
+++ atuin-18.8.0/debian/changelog       2025-12-23 12:17:58.000000000 +0000
@@ -1,3 +1,10 @@
+atuin (18.8.0-1.2) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Relax cargo dependency on sysinfo.
+
+ -- Peter Michael Green <[email protected]>  Tue, 23 Dec 2025 12:17:58 +0000
+
 atuin (18.8.0-1.1) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru atuin-18.8.0/debian/patches/relax-deps.patch 
atuin-18.8.0/debian/patches/relax-deps.patch
--- atuin-18.8.0/debian/patches/relax-deps.patch        2025-12-05 
17:20:14.000000000 +0000
+++ atuin-18.8.0/debian/patches/relax-deps.patch        2025-12-23 
12:17:58.000000000 +0000
@@ -1,7 +1,8 @@
-Forwarded: not-needed
-Last-Update: 2025-08-17
---- a/Cargo.toml
-+++ b/Cargo.toml
+--- atuin-18.8.0.orig/Cargo.toml
++++ atuin-18.8.0/Cargo.toml
+@@ -27 +27 @@
+-directories = "5.0.1"
++directories = ">= 5.0.1"
 @@ -30 +30 @@
 -interim = { version = "0.2.0", features = ["time_0_3"] }
 +interim = { version = "0.1.2", features = ["time"] }
@@ -19,8 +20,8 @@
 @@ -54 +54 @@
 -version = "0.11"
 +version = "0.12"
---- a/crates/atuin-client/Cargo.toml
-+++ b/crates/atuin-client/Cargo.toml
+--- atuin-18.8.0.orig/crates/atuin-client/Cargo.toml
++++ atuin-18.8.0/crates/atuin-client/Cargo.toml
 @@ -42 +42 @@
 -minspan = "0.1.5"
 +minspan = "0.1.1"
@@ -30,13 +31,13 @@
 @@ -71 +71 @@
 -crossterm = { version = "0.28.1", features = ["serde"] }
 +crossterm = { version = "0.28", features = ["serde"] }
---- a/crates/atuin-history/Cargo.toml
-+++ b/crates/atuin-history/Cargo.toml
+--- atuin-18.8.0.orig/crates/atuin-history/Cargo.toml
++++ atuin-18.8.0/crates/atuin-history/Cargo.toml
 @@ -21 +21 @@
 -crossterm = { version = "0.28.1", features = ["use-dev-tty"] }
 +crossterm = { version = "0.28", features = ["use-dev-tty"] }
---- a/crates/atuin/Cargo.toml
-+++ b/crates/atuin/Cargo.toml
+--- atuin-18.8.0.orig/crates/atuin/Cargo.toml
++++ atuin-18.8.0/crates/atuin/Cargo.toml
 @@ -65 +65 @@
 -indicatif = "0.18.0"
 +indicatif = "0.17"
@@ -48,8 +49,8 @@
 -ratatui = "0.29.0"
 +colored = "3"
 +ratatui = "0.28"
---- a/crates/atuin-daemon/Cargo.toml
-+++ b/crates/atuin-daemon/Cargo.toml
+--- atuin-18.8.0.orig/crates/atuin-daemon/Cargo.toml
++++ atuin-18.8.0/crates/atuin-daemon/Cargo.toml
 @@ -29 +29 @@
 -dashmap = "5.5.3"
 +dashmap = "6.1"
diff -Nru atuin-18.8.0/debian/patches/series atuin-18.8.0/debian/patches/series
--- atuin-18.8.0/debian/patches/series  2025-12-05 17:12:58.000000000 +0000
+++ atuin-18.8.0/debian/patches/series  2025-12-23 12:17:58.000000000 +0000
@@ -4,6 +4,7 @@
 disable-email-verify.patch
 disable-check-update.patch
 disable-benches.patch
-relax-deps.patch
 change-sqlx-runtime.patch
 disable-tests-requiring-db.patch
+relax-deps.patch
+sysinfo-0.37.patch
diff -Nru atuin-18.8.0/debian/patches/sysinfo-0.37.patch 
atuin-18.8.0/debian/patches/sysinfo-0.37.patch
--- atuin-18.8.0/debian/patches/sysinfo-0.37.patch      1970-01-01 
00:00:00.000000000 +0000
+++ atuin-18.8.0/debian/patches/sysinfo-0.37.patch      2025-12-23 
12:17:58.000000000 +0000
@@ -0,0 +1,58 @@
+--- atuin-18.8.0.orig/crates/atuin/Cargo.toml
++++ atuin-18.8.0/crates/atuin/Cargo.toml
+@@ -25 +25 @@
+-sysinfo = "0.30.7"
++sysinfo = ">= 0.30.7"
+--- atuin-18.8.0.orig/crates/atuin-common/Cargo.toml
++++ atuin-18.8.0/crates/atuin-common/Cargo.toml
+@@ -25 +25 @@
+-sysinfo = "0.30.7"
++sysinfo = ">= 0.30.7"
+Index: atuin-18.8.0/crates/atuin-common/src/shell.rs
+===================================================================
+--- atuin-18.8.0.orig/crates/atuin-common/src/shell.rs
++++ atuin-18.8.0/crates/atuin-common/src/shell.rs
+@@ -56,7 +56,10 @@ impl Shell {
+             .process(process.parent().expect("Atuin running with no parent!"))
+             .expect("Process with parent pid does not exist");
+ 
+-        let shell = parent.name().trim().to_lowercase();
++        //depending on the version of sysinfo, parent.name may return either a
++        //str or an OsStr, use as_ref to get a consistent OsStr.
++        let shell: &OsStr = parent.name().as_ref();
++        let shell = shell.to_string_lossy().trim().to_lowercase();
+         let shell = shell.strip_prefix('-').unwrap_or(&shell);
+ 
+         Shell::from_string(shell.to_string())
+@@ -170,7 +173,10 @@ pub fn shell_name(parent: Option<&Proces
+             .expect("Process with parent pid does not exist")
+     };
+ 
+-    let shell = parent.name().trim().to_lowercase();
++    //depending on the version of sysinfo, parent.name may return either a
++    //str or an OsStr, use as_ref to get a consistent OsStr.
++    let shell: &OsStr = parent.name().as_ref();
++    let shell = shell.to_string_lossy().trim().to_lowercase();
+     let shell = shell.strip_prefix('-').unwrap_or(&shell);
+ 
+     shell.to_string()
+Index: atuin-18.8.0/crates/atuin/src/command/client/doctor.rs
+===================================================================
+--- atuin-18.8.0.orig/crates/atuin/src/command/client/doctor.rs
++++ atuin-18.8.0/crates/atuin/src/command/client/doctor.rs
+@@ -213,6 +213,15 @@ struct SystemInfo {
+     pub disks: Vec<DiskInfo>,
+ }
+ 
++//depending on the version of sysinfo, cpu_arch may return either a String
++//or an Option<String>, this trait works around that difference.
++trait DummyUnwrap<D> {
++    fn unwrap_or_else(self, dummy: D) -> Self where Self: Sized {
++        self
++    }
++}
++impl <T> DummyUnwrap<T> for String {}
++
+ impl SystemInfo {
+     pub fn new() -> Self {
+         let disks = Disks::new_with_refreshed_list();

Reply via email to