]> git.proxmox.com Git - debcargo-conf.git/commitdiff
zbus - prepare minimal fix upload.
authorPeter Michael Green <plugwash@debian.org>
Sat, 18 Dec 2021 21:40:00 +0000 (21:40 +0000)
committerPeter Michael Green <plugwash@debian.org>
Sat, 18 Dec 2021 21:50:54 +0000 (21:50 +0000)
src/zbus/debian/changelog
src/zbus/debian/copyright.debcargo.hint
src/zbus/debian/patches/relax-deps.patch
src/zbus/debian/patches/relax-nix.patch
src/zbus/debian/patches/relax-ntest.patch [deleted file]
src/zbus/debian/patches/series
src/zbus/debian/rules [new file with mode: 0755]
src/zbus/debian/rules.debcargo.hint [new file with mode: 0755]

index 62057bbbc2b0c845aa0528e2e47c42105de46f32..3f07094d3ae6893bf1ca2fe8bda297813440def6 100644 (file)
@@ -1,9 +1,12 @@
-rust-zbus (1.9.2-1) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
+rust-zbus (1.0.0-4) UNRELEASED-FIXME-AUTOGENERATED-DEBCARGO; urgency=medium
 
   * Team upload.
-  * Package zbus 1.9.2 from crates.io using debcargo 2.4.4
+  * Package zbus 1.0.0 from crates.io using debcargo 2.5.0
+  * Apply patch to make build work with latest rust-nix.
+  * Disable test build at package build time for now to get
+    the rust-nix fix into testing despite bug #1000942
 
- -- Henry-Nicolas Tourneur <debian@nilux.be>  Mon, 06 Dec 2021 21:32:38 +0000
+ -- Peter Michael Green <plugwash@debian.org>  Sat, 18 Dec 2021 21:48:48 +0000
 
 rust-zbus (1.0.0-3) unstable; urgency=medium
 
index 6f20d419564895a65d1e46b2aa28e3247127c857..1c4a8dda413d4b99dd693b653e642a863b52eb0a 100644 (file)
@@ -1,7 +1,7 @@
 Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: zbus
 Upstream-Contact: Zeeshan Ali <zeeshanak@gnome.org>
-Source: https://gitlab.freedesktop.org/dbus/zbus/
+Source: https://gitlab.freedesktop.org/zeenix/zbus/
 
 Files: *
 Copyright: FIXME (overlay) UNKNOWN-YEARS Zeeshan Ali <zeeshanak@gnome.org>
index d4b7959b8475381211fbacf179b8910b4a3eb76f..c9ba38352b0f7602284fcbfde941db12519584a3 100644 (file)
@@ -1,11 +1,11 @@
 --- a/Cargo.toml
 +++ b/Cargo.toml
-@@ -47,7 +47,7 @@ version = "0.3.8"
- version = "1.0.2"
+@@ -39,7 +39,7 @@ features = ["serde"]
+ version = "1.2.4"
  
  [dependencies.nix]
--version = "0.20.2"
-+version = ">= 0.20.2"
+-version = "^0.17"
++version = ">= 0.17"
  
- [dependencies.once_cell]
- version = "1.4.0"
+ [dependencies.scoped-tls]
+ version = "1.0.0"
index 92a9352b37c58474339780e81bb87a81459de00a..c5f225763dd04e9487022f678d52942af83beec6 100644 (file)
@@ -1,51 +1,27 @@
-Author: Zeeshan Ali
-Origin: f9959f03c8241ea1ede5eb4079bec364301aad8d
-Description: zb: Upgrade nix requirement to latest release
----
-This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
---- a/src/error.rs
-+++ b/src/error.rs
-@@ -106,9 +106,7 @@ impl From<io::Error> for Error {
- impl From<nix::Error> for Error {
-     fn from(val: nix::Error) -> Self {
--        val.as_errno()
--            .map(|errno| io::Error::from_raw_os_error(errno as i32).into())
--            .unwrap_or_else(|| io::Error::new(io::ErrorKind::Other, val).into())
-+        io::Error::from_raw_os_error(val as i32).into()
-     }
- }
---- a/src/raw/socket.rs
-+++ b/src/raw/socket.rs
-@@ -85,8 +85,7 @@ impl Socket for UnixStream {
-                 }
-                 Ok((msg.bytes, fds))
+This patch is inspired by upstream commit f9959f03c8241ea1ede5eb4079bec364301aad8d
+re-written by Peter Michael Green to apply to zbus 1.0.0
+
+--- a/src/utils.rs     2020-07-16 14:53:32.000000000 +0000
++++ b/src/utils.rs     2021-12-18 21:33:36.446975934 +0000
+@@ -39,8 +39,8 @@
+                 buf = &buf[n..];
+                 cmsg = vec![];
              }
--            Err(nix::Error::Sys(e)) => Err(e.into()),
--            _ => Err(io::Error::new(io::ErrorKind::Other, "unhandled nix error")),
-+            Err(e) => Err(e.into()),
+-            Err(nix::Error::Sys(Errno::EINPROGRESS)) => {}
+-            Err(nix::Error::Sys(e)) => return Err(e.into()),
++            Err(Errno::EINPROGRESS) => {}
++            Err(e) => return Err(e.into()),
+             _ => return Err(Error::new(ErrorKind::Other, "unhandled nix error")),
          }
      }
-@@ -104,8 +103,7 @@ impl Socket for UnixStream {
-                 "failed to write to buffer",
-             )),
-             Ok(n) => Ok(n),
--            Err(nix::Error::Sys(e)) => Err(e.into()),
--            _ => Err(io::Error::new(io::ErrorKind::Other, "unhandled nix error")),
-+            Err(e) => Err(e.into()),
+@@ -79,8 +79,8 @@
+                 let tmp = buf;
+                 buf = &mut tmp[msg.bytes..];
+             }
+-            Err(nix::Error::Sys(Errno::EINPROGRESS)) => {}
+-            Err(nix::Error::Sys(e)) => return Err(e.into()),
++            Err(Errno::EINPROGRESS) => {}
++            Err(e) => return Err(e.into()),
+             _ => return Err(Error::new(ErrorKind::Other, "unhandled nix error")),
          }
      }
---- a/src/utils.rs
-+++ b/src/utils.rs
-@@ -21,7 +21,7 @@ pub(crate) fn wait_on(fd: RawFd, flags:
-     loop {
-         match poll(&mut [pollfd], -1) {
-             Ok(_) => break,
--            Err(nix::Error::Sys(e)) => {
-+            Err(e) => {
-                 if e == Errno::EAGAIN || e == Errno::EINTR {
-                     // we got interupted, try polling again
-                     continue;
diff --git a/src/zbus/debian/patches/relax-ntest.patch b/src/zbus/debian/patches/relax-ntest.patch
deleted file mode 100644 (file)
index 316068c..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
---- a/src/lib.rs
-+++ b/src/lib.rs
-@@ -206,7 +206,6 @@ mod tests {
-     };
-     use enumflags2::BitFlags;
--    use ntest::timeout;
-     use serde_repr::{Deserialize_repr, Serialize_repr};
-     use zvariant::{derive::Type, Fd, OwnedValue, Type};
-@@ -546,7 +545,6 @@ mod tests {
-     }
-     #[test]
--    #[timeout(1000)]
-     fn issue_68() {
-         // Tests the fix for https://gitlab.freedesktop.org/dbus/zbus/-/issues/68
-         //
-@@ -580,7 +578,6 @@ mod tests {
-     }
-     #[test]
--    #[timeout(1000)]
-     fn issue104() {
-         // Tests the fix for https://gitlab.freedesktop.org/dbus/zbus/-/issues/104
-         //
---- a/src/object_server.rs
-+++ b/src/object_server.rs
-@@ -635,7 +635,6 @@ impl<'a> ObjectServer<'a> {
- mod tests {
-     use std::{cell::Cell, collections::HashMap, convert::TryInto, error::Error, rc::Rc, thread};
--    use ntest::timeout;
-     use serde::{Deserialize, Serialize};
-     use zvariant::derive::Type;
-@@ -801,7 +800,6 @@ mod tests {
-     }
-     #[test]
--    #[timeout(2000)]
-     fn basic_iface() {
-         let conn = Connection::new_session().unwrap();
-         let mut object_server = ObjectServer::new(&conn);
index 473cbc8bdffc97ba6aa35d9cfc417b4ef14ae782..b5237d967aec077b95c0847eaf457aaf7590fc54 100644 (file)
@@ -1,3 +1,2 @@
 relax-nix.patch
-relax-ntest.patch
 relax-deps.patch
diff --git a/src/zbus/debian/rules b/src/zbus/debian/rules
new file mode 100755 (executable)
index 0000000..6edc168
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/make -f
+%:
+       dh $@ --buildsystem cargo
+
+override_dh_auto_test:
+       echo not running build-time tests due to bug 1000942
diff --git a/src/zbus/debian/rules.debcargo.hint b/src/zbus/debian/rules.debcargo.hint
new file mode 100755 (executable)
index 0000000..044c1c2
--- /dev/null
@@ -0,0 +1,3 @@
+#!/usr/bin/make -f
+%:
+       dh $@ --buildsystem cargo