-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
-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;
+++ /dev/null
---- 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);