A debdiff is attatched, if I get no response I will likely NMU this when the
new rust-nix is uploaded to unstable.

As promised I have uploaded this.


During a rebuild of all packages in sid, your package failed to build
on arm64.

This fit the zero-day NMU guidelines, and my NMU would have FTBFS if I
didn't fix it. So I added a fix for is to the NMU.

Final debdiff is attatched.
diff -Nru netavark-1.4.0/debian/changelog netavark-1.4.0/debian/changelog
--- netavark-1.4.0/debian/changelog     2023-09-06 22:46:22.000000000 +0000
+++ netavark-1.4.0/debian/changelog     2024-05-02 17:08:20.000000000 +0000
@@ -1,3 +1,11 @@
+netavark (1.4.0-4.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Apply upstream patch for new version of rust-nix (Closes: #1064580)
+  * Relax cargo dependency on sysctl crate (Closes: #1069350)
+
+ -- Peter Michael Green <plugw...@debian.org>  Thu, 02 May 2024 17:08:20 +0000
+
 netavark (1.4.0-4) unstable; urgency=medium
 
   [ Peter Michael Green ]
diff -Nru netavark-1.4.0/debian/control netavark-1.4.0/debian/control
--- netavark-1.4.0/debian/control       2023-09-06 22:46:22.000000000 +0000
+++ netavark-1.4.0/debian/control       2024-05-02 16:54:53.000000000 +0000
@@ -18,7 +18,7 @@
  librust-libc-dev,
  librust-log-dev,
  librust-netlink-packet-route-0.17-dev,
- librust-nix-dev,
+ librust-nix-0.27-dev,
  librust-rand-dev,
  librust-rtnetlink-dev,
  librust-serde+derive-dev,
diff -Nru netavark-1.4.0/debian/patches/nix-0.27.patch 
netavark-1.4.0/debian/patches/nix-0.27.patch
--- netavark-1.4.0/debian/patches/nix-0.27.patch        1970-01-01 
00:00:00.000000000 +0000
+++ netavark-1.4.0/debian/patches/nix-0.27.patch        2024-05-02 
17:02:52.000000000 +0000
@@ -0,0 +1,42 @@
+This patch is based on the upstream commit described below, adapted for use
+in the Debian package by Peter Michael Green.
+
+commit 61b8e62f4205b1b2609054bb0d07771b56a5ef9c
+Author: Paul Holzinger <pholz...@redhat.com>
+Date:   Mon Sep 11 18:13:13 2023 +0200
+
+    bump nix to 0.27.1
+    
+    The nix crate removes all features by default so we need to explicitly
+    list what we use.
+    Second, the io API's changed and all use the AsFd trait now. This is
+    great for IO safety but will require larger changes to migrate from
+    RawFd. Thus I went the easy way and use unsafe (not really unsafe here)
+    and construct and a new BorrowedFd object (which impl AsFd) for the
+    setns call.
+    
+    Signed-off-by: Paul Holzinger <pholz...@redhat.com>
+
+Index: netavark-1.4.0/Cargo.toml
+===================================================================
+--- netavark-1.4.0.orig/Cargo.toml
++++ netavark-1.4.0/Cargo.toml
+@@ -34,1 +34,1 @@ serde_json = "1"
+-nix = "0.26.1"
++nix = { version = "0.27.1", features = ["sched", "signal", "user", "fs"] }
+Index: netavark-1.4.0/src/network/core_utils.rs
+===================================================================
+--- netavark-1.4.0.orig/src/network/core_utils.rs
++++ netavark-1.4.0/src/network/core_utils.rs
+@@ -260,7 +260,10 @@ impl CoreUtils {
+ }
+ 
+ pub fn join_netns(fd: RawFd) -> NetavarkResult<()> {
+-    match sched::setns(fd, sched::CloneFlags::CLONE_NEWNET) {
++    match sched::setns(
++        unsafe { BorrowedFd::borrow_raw(fd) },
++        sched::CloneFlags::CLONE_NEWNET,
++    ) {
+         Ok(_) => Ok(()),
+         Err(e) => Err(NetavarkError::wrap(
+             "setns",
diff -Nru netavark-1.4.0/debian/patches/relax-deps.patch 
netavark-1.4.0/debian/patches/relax-deps.patch
--- netavark-1.4.0/debian/patches/relax-deps.patch      2023-09-06 
22:46:22.000000000 +0000
+++ netavark-1.4.0/debian/patches/relax-deps.patch      2024-05-02 
16:59:29.000000000 +0000
@@ -19,7 +19,7 @@
 +serde = { version = "1", features = ["derive"], optional = true }
 +serde-value = "0.7"
 +serde_json = "1"
-+sysctl = "0.4"
++sysctl = ">= 0.4"
  url = "2.3.1"
  zbus = { version = "3.6.1" }
  nix = "0.26.1"
diff -Nru netavark-1.4.0/debian/patches/series 
netavark-1.4.0/debian/patches/series
--- netavark-1.4.0/debian/patches/series        2023-09-06 22:46:22.000000000 
+0000
+++ netavark-1.4.0/debian/patches/series        2024-05-02 16:54:53.000000000 
+0000
@@ -3,3 +3,4 @@
 debian-paths.patch
 netlink-0.5.patch
 netlink-0.7.patch
+nix-0.27.patch

Reply via email to