Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update rust crate zbus to v5 (v1) #2005

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Nov 4, 2024

This PR contains the following updates:

Package Type Update Change
zbus dependencies major 3 -> 5

Release Notes

dbus2/zbus (zbus)

v5.1.0: 🔖 zbus 5.1.0

Compare Source

  • ⬇️ Reduce rust-version to 1.80. #​1107
  • 🦺 Verify validity of names and object paths pased to macros at compile time.
  • 🐛 Generate interface properties signal methods only when needed.
  • ♻️ Use winnow for parsing GUID and D-Bus address strings. #​1070
  • ✨ Add support for unixexec transport.
  • 🔌 Add Command stdio socket type. This socket communicates with a spawned child process via
    its standard input and output streams.
  • ➕ Add direct dep on winnow.

v5.0.1: 🔖 zbus 5.0.1

Compare Source

  • 📌 Don't pin zvariant_utils dep. We don't always release zvariant_utils together with other
    crates, so unlike the macros crates, the versions don't need to be tied together. This will also
    allow us to bring zvariant_utils improvements to users without having to release all dependent
    packages as well.

v5.0.0: 🔖 zbus 5.0.0

Compare Source

  • 👽️ Adapt to zvariant 5.0 API. This brings in massive performance improvements to message
    encoding and decoding.
  • 💥 Breakinging changes:
    • Message body signature now mandatory.
    • proxy macro respects visibility. This includes all types generated by proxy. Unfortunately
      this means that the existing code will have to set the visiblity explicitly to pub if they
      were relying on the generated proxy to be public.
    • Drop support for DBUS_COOKIE_SHA1 auth mechanism. #​727
      • It drags the sha1 crate as a dependency, which can be problematic for some users. #​543
      • It makes the handshake more complex, not allowing to pipeline all the commands.
      • It's not widely used. If EXTERNAL is not an option, you might as well just use ANONYMOUS.
    • 🛂 Only support one authentication method at a time. Now that we're down to only two
      authentication mechanisms with one of them being no-authentication, this really makes sense
      since we can just autodetect what authentication method to use for a specific socket type on a
      specific platform. This also simplifies the handshake logic and will allow us to pipeline the
      whole client-side handshake in the future, when we can drop the xdg-dbus-proxy workarounds. #​781
    • Drop unnecessary lifetimes on genarated signal streams.
    • Streamline Message & message::Builder constructors. They should be named the same and take the
      same type of arguments.
    • proxy::Defaults now has typed values.
    • Rename proxy::ProxyDefault to proxy::Defaults.
    • 🔥 Drop API deprecated in 4.0.
    • Minor changes in fdo API.
  • ✨ New features:
    • interface now generates a trait, Signals, that provides the same signal
      methods as user specifies but w/o the SignalEmitter argument (#​871). The macro also generates
      2 implementations of this trait for:
      • InterfaceRef, for emitting signals from outside the context of an interface
        method.
      • SignalEmitter, for emitting signals from inside an interface methods.
    • Add SignalContext::emit. Add a new method to SignalContext that allows emitting a signal for
      a given interface and singal name.
    • Add Connection::graceful_shutdown.
    • Add conn::AuthMechanism::as_str(). This gives you a static string representation of the
      mechanism. We'll use this in a following commit to avoid an allocation.
    • Add Socket::auth_mechanism. The socket impl will now inform us which authentication mechanism
      should be used with it. The implementation can choose this based on the socket type and the
      target platform.
    • Allow specifying visibility of interface-generated proxy. This implies that by default, it will
      be private.
    • ObjectServer now implements Clone.
  • 🚚 Renames and moves:
    • Rename SignalContext to SignalEmitter. Since now this emits signals, this is a more
      appropriate name. We keep a deprecated SignalContext type alias as well as the
      signal_context attribute of interface for not completely breaking the existing code.
    • Move AuthMechanism from crate root to conn. We leave the AuthMechanism in the root as
      deprecated.
  • 🚑️ Gracefully handle serial number wrap. When SERIAL_NUM wraps past u32::MAX back to zero,
    the conversion to NonZeroU32 panics. #​946
  • 🩹 Fix some lifetimes in Proxy API. We were unnecessarily constraining the lifetimes in some of
    the Proxy API.
  • ⚡️ Optimizations
    • Only enable Guid::generate() if p2p feature is enabled.
    • Use relaxed load order for serial number fetch & add.
    • msg::Header no longer allocates.
    • Avoid deserialization of msg::Header needlessly.
  • 🚩 Add serde_bytes Cargo feature. This is just a proxy feature for zvariant's serde_bytes
    feature. #​1052
  • 🚩 Feature-gate blocking API. Add a cargo feature called blocking-api to zbus &
    zbus_macros. When enabled, the zbus::blocking module is available. When disabled, proxy
    macro ignores the value of gen_blocking attribute and doesn't generate blocking proxy. This
    feature is enabled by default.
  • ➕ Add camino feature as proxy for zvariant feature of the same name.
  • ➖ Dependendies removed:
    • Remove dependency on sha1 crate.
    • Drop direct dep on futures-sink.
    • rand now an optional dependency. It is only enabled if p2p feature is enabled. This means
      that rand dependency is dropped for typical users.
  • ⬆️ Updated dependencies:
    • zvariant to 5.0.
    • windows-sys to 0.59.
    • tokio-vsock 5. #​643
  • ⬆️ Bump MSRV to 1.81.
  • 📝 Documentation
    • Tidy documentation across entire crate.
    • Improve blocking module docs.
    • Correct wrong documentation links.
    • Remove a now incorrect warning from Message::header method.
  • ✏️ Fix doc list item missing indentation.
  • 🚨 Drop invalid cfg from documentation example.

v4.4.0: 🔖 zbus 4.4.0

Compare Source

  • 🚑️ Fix regression of not replying to inexistent methods. #​905.
  • 🐛 Fix a potential deadlock during name registration.
  • ✨ Add optional heapless feature, which is just a proxy to zvariant feature of the same name.
  • ⬆️ Require zvariant 4.2.0.

v4.3.1: 🔖 zbus 4.3.1

Compare Source

  • 💩 Workaround for xdg-dbus-proxy's monotonic serial requirement. While the underlying
    issue in xdg-dbus-proxy
    has already been fixed, it will take some time before the fix is
    released and is widely available.
  • 🥅 Methods of interface-generated proxy now use the same error type as the interface's error
    type. We might need to add an attribute to control this in the future, as this as this may not
    always be what the user wants.
  • 📝 book
    • Add a TOC to each chapter, using mdbook-toc from @​badboy.
    • Add an FAQ section about enum representations.
    • Add property trait bounds to server chapter too.
    • Provide "edit page" option, making it easier to contribute fixes and improvements.
    • "server" -> "service". A D-Bus service is not a server, that's the bus. So let's keep these
      two distinct concepts separate.
    • Remove numeric labels from the navigation bar.
    • Update rust edition information.
    • Update repo icon to Github.
  • ⬆️ Bump nix to v0.29.

v4.3.0: 🔖 zbus 4.3.0

Compare Source

  • interface can now generate proxy for you. #​236
  • 🚑️ Handle FDs received during handshake, in server-side code. #​813.
  • object_server::ResponseDispatchNotifier
    • Add response getter.
    • Implement serde::Deserialize for it.
  • 📝 Update blocking::Connection::call_method docs.

v4.2.2: 🔖 zbus 4.2.2

Compare Source

  • 🚑️ zm: Fix a regression introduced by in 4.2.0, resulting in tasks not being spawned for
    methods by default. #​799
  • ⬆️ Update syn to v2. #​401
  • ⬆️ Update zvariant_utils to 2.0.0.
  • 📝 Correct wrong documentation links. #​790

v4.2.1: 🔖 zbus 4.2.1

Compare Source

  • 🚑️ Critical fixes:
    • Don't invalidate all properties on change. This fixes a regression in c1aa5c7, where we
      started to invalidate properties in every PropertyChanged signal. This is wrong anyway but it
      also meant zbus interfaces breaking against gio. #​765
    • Use assert! instead of debug_assert!. debug_assert! is removed in release builds, along
      with any values computed inside it. This meant that since the use of debug_assert! in
      commit 7fc3ab7, the fdo interfaces weren't getting added for
      nodes for release profile. Let's use assert! instead. #​764
    • Fix 0 byte transfer and parsing regressions for FreeBSD. #​756
  • 💩 Hack to make connection handshake work inside Flatpak. xdg-dbus-proxy can't handle
    pipelining
    , hence we need to handle NEGOTIATE_UNIX_FD command's response before sending out
    BEGIN command and Hello method call message.
  • 🥅 Gracefully handle rejection of UNIX FD passing.
  • 🐛 Ensure all messsage bytes received during handshake are used. Don't assume that only a single
    full message could be received at the end of the client handshake process.
  • 📝 Correct logo URL in docs.
  • 🚨 Allow dead code in doc samples.
  • ⬆️ Update dependencies:
    • serde to 1.0.200.
    • proc-macro2 to 1.0.81.
    • tokio to 1.37.0.

v4.2.0: 🔖 zbus 4.2.0

Compare Source

  • ✨ Make spawning tasks for method call handling, optional. dbus_interface now provides a spawn
    attribute to control whether the method call handling is spawned as a task or not.
  • ✨ Add serial to Message's Debug representation.
  • 🔌 Add connection::Builder::authenticated_socket for creating a connection with a
    pre-authenticated socket. This could also be socket that doesn't need any authentication. #​590.
  • ✨ Add connection::socket::{ReadHalf::receive_message, WriteHalf::send_message} methods. These
    method have a default implementation that just uses the lower-level sibling methods. Implementers
    can either override this method or the lower-level method, depending on the underlying socket
    they're using.
  • ✨ Introducing connection::socket::Channel. This new socket type, uses channels for in-process p2p
    communication. This can be used with connection::Builder::authenticated_socket to create a
    connection for in-process communication. #​591.
  • ⚡️ Pipeline client-side handshake as much as possible, including the Hello method call to the
    bus. This reduces unnecessary round-trips & hence latencies. #​493
  • ✨ Add connection::Builder::auth_mechanism. Unlike auth_mechanisms method, this method only allows
    one mechanism to be set.
  • 🗑️ Deprecate connection::Builder::auth_mechansims. In favor of auth_mechansim. This is in
    preparation for #​731, when we will remove this method entirely.
  • 🥅 Don't assert on invalid serve_at() usage. Document that standard interfaces are already added.
    Return an error instead of an explicit panic if attempted, since it is not an internal invariant.
  • 🥅 Catch interface handler error.
  • 🔊 Reduce the amount of tracing data when adding traces in handlers (duplicated "msg").
  • 🔥 Remove now unnecessary hack to ensure ObjectManager signals aren't sent before Hello method.
  • 🔊 Instrument all async methods of server handshake.
  • 🚩 Support autolaunch address on Windows without windows-gdbus feature and associated hacks.
    Turns out that the reference D-Bus implementation supports autolaunch fine and we don't need
    special support for gdbus binary. Hopefully, in the near future, busd will also support it. #​687
  • 📝 Clearly document Interface being unstable API. Also recommend what people should do when
    dbus_interface isn't enough.
  • 🔥 Drop impossible scope on autolaunch session bus address. We currently can't handle scopes on
    autolaunch addresses so there is no need to create an address with scopes.
  • 🥅 Correctly handle cancellation of handshake in server. If the client sends a CANCEL command
    during a handshake, the server must move on to the next handshake method available (if any).
  • 🛂 Server-side handshake should be as lenient as the spec says. If a received command from the
    client is unknown or invalid in the current context, we shouldn't completely error out but rather
    send an error and continue as if nothing happened.
  • 🔊 Exclude newline terminators from String repr of commands. Otherwise it messes up the logging
    output.
  • 🏷️ Implement Default for address::transport::Autolaunch.
  • 🚨 Remove duplicate trait bounds.
  • 💄 Use the new logo in docs.
  • ⬆️ Updated depdencies:
    • blocking to 1.6.0
    • async-fs to 2.1.2
    • async-task to 4.7.1
    • async-process to 2.2.2
    • async-executor to 1.11.0
    • async-trait to 0.1.80
    • vsock to 0.5.0
    • serde_repr to 0.1.19
    • event-listener to 5.3.0
    • async-io to 2.3.2
    • async-recursion to 1.1.1
    • tempfile to 3.10.1
    • quote to 1.0.36
    • zvariant_utils to 1.1.1
  • ➖ Removed depdencies:
    • regex
    • derivative
  • 🎨 Use imports over qualifies in macros.
  • ✏️ Fix some typos.
  • ♻️ Many internal code cleanups and improvements.

v4.1.2: 🔖 zbus 4.1.2

Compare Source

To go with zbus_macros 4.1.2. Other changes:

  • ⬆️ Bump nix to 0.28.

v4.1.1: 🔖 zbus 4.1.1

Compare Source

The actual change is in zbus_macros 4.1.1.

v4.1.0: 🔖 zbus 4.1.0

Compare Source

  • 🚑️ zb: Fix a deprecation re-export.
  • 🔥 zb: Remove some redundant imports.
  • ✏️ zb: Fix a typo in docs.
  • ⬆️ Updated deps:
    • async-io to v2.3.1.
    • async-process to 2.1.0.
    • async-task to 4.7.0.
    • async-recursion to 1.0.5.
    • async-lock to 3.3.0.
    • async-fs to 2.1.1.
    • async-executor to 1.8.0.
    • async-trait to 0.1.77.
    • blocking to 1.5.1.
    • enumflags2 to 0.7.9.
    • event-listener to 5.1.0.
    • futures-sink to 0.3.30.
    • futures-core to 0.3.30.
    • futures-util to 0.3.30.
    • sha1 to 0.10.6.
    • serde_repr to 0.1.18.
    • tracing to 0.1.40.
    • tempfile to 3.10.0.
    • xdg-home to 1.1.0.

v4.0.1: 🔖 zbus 4.0.1

Compare Source

  • 🏷️ Implement ProxyDefault for blocking::Proxy that was missed in 4.0.0.
  • 📝 Fix and update links in the book.

v4.0.0: 🔖 zbus 4.0.0

Compare Source

A new API-breaking release that brings in a huge amount of changes. Most using code should still
compile (with deprecation warnings) and work without changes. Hightlights:

  • 🚚 Changing names of dbus_interface and dbus_proxy along with their atrributes. See
    zbus_macros release notes for details, including commands to automatically update your
    code.
  • 👽️ Adapt to zvariant 4.0 changes.
  • 🚚 Make use of submodules for nicer API hierarchy. In most cases
    deprecation warnings will guide you to the new paths.
  • 🚚 XML parsing API split into a separate crate, zbus_xml. The xml
    and quick-xml feature flags are removed as a result. #​413.
  • 🏗️ Message API overhaul
    • 🚸 header method and message::Header getters now infallible.
    • 🏷️ body method now returns a new type, message::Body that provides all message body-related API.
    • 🔥 MessageField* API dropped. Use Message::header() with message::Header's specific getters.
    • 🔥 message::Type::Invalid variant dropped. We just don't let a message be created for invalid types.
    • 🚚 as_bytes method renamed to data and now returns &zvariant::serialized::Data.
    • 🔥 Drop Message::take_fds() method. This was never a good idea because it is basically
      unsafe (even though it's not marked as such) since it disassociates the FDs from the message and
      the caller is free to close them while message is still referencing them.
    • 🏷️ All serial number related API now use NonZeroU32.
    • 🚸 constructors now return a Builder instance.
    • 🚸 Arc wrapping of message no longer needed and all API using Arc type now use Message.
    • 🔥 Drop unneeded From for message::Type.
  • 🔌 Connection
    • 🔥 Drop futures::Sink implementation. This was proving very difficult to maintain and most
      likely used by very few people, who can use the send method instead.
    • 🏷️ server_guid return &Guid now, instead of a string.
    • 🥅 connection::Builder::server now takes anything TryInto and hence fallible.
    • 🥅 connection::Builder ensures GUID is correct for client: If the client connection is
      constructed through an address with GUID in it, we should verify this GUID is the same as one
      received from the server during the handshake.
    • 🏗️ Socket trait now higher-level, async and split into read and write
      halves.
    • 🔥 Remove unnecessary constraints on Socket. and associated types.
    • ✨ Add missing blocking::connection::Builder::socket.
    • ✨ Proper support for abstract unix sockets that makes use of the std API. This replaces our hack.
  • 💥 Split Guid into reference & owned types. Guid now has a lifetime parameter, and
    OwnedGuid is a new type that's a wrapper around Guid<'static>. Internally, Guid is now a
    wrapper around zvariant::Str and is now a very similar type to other zvariant::Str wrapper
    types.
  • 🏗️ Address API overhaul:
    • 💥 Split transport bits into a separate type hierarchy, address::Transport. Address` is
      no longer an enum but a struct with hidden fields. #​476.
    • ✨ Support GUIDs. We previously just ignored GUIDs in addresses. No more. We now parse it, if
      present and provide API to set a GUID on an Address instance.
    • ✨ Support unix:tmpdir and unix:dir transports.
    • 🐛 Fix Display impl for address of abstract Unix sockets.
  • ✨ Relax type bound on Proxy::call/call_with_flags. A bound of
    for<'d> zvariant::DynamicDeserialize<'d> on the result type of a call is sufficient to
    deserialize; use this bound instead of the stricter DeserializeOwned + zvariant::Type.
  • 🗑️ Some APIs deprecated (the deprecation warnings will give a hint).
  • 🔥 Drop Error::NoBodySignature variant
  • 🔥 Drop Deprecated APIs.
  • 🚩 Gate all p2p API behind a p2p feature. Given that typical users do not need this API, we don't enable it by default.
  • 🚩 Add bus-impl cargo feature. API that is only needed by bus implementations now gated behind this non-default cargo feature. #​480.
    the peer-to-peer and bus implementation API respectively.
  • ⬆️ Migrate from winapi to windows-sys (#​534).
  • ⬆️ Dependencies bumped
    • event-listener 5.0.
    • async-broadcast 0.7.0.
    • async-process 2.0.
    • async-io 2.0.
    • async-lock 3.0.
    • async-fs 2.0.
    • vsock 0.4.
    • tokio-vsock 0.4.
    • nix 0.27.
  • ➖ Dependencies dropped
    • once_cell
    • byteorder. Use endi crate instead through zvariant.
    • async-recursion for targets other than MacOS and Windows.
  • ⬆️ Bump MSRV to 1.75
  • 🔧 Switch to Rust 2021. This doesn't affect our users but gives us some features.
  • 🩹 implement peer_credentials() for tokio win32.
  • 📌 Pin tokio to only its major version. This allows it to be upgraded to any API-compatible versions.
  • 🚑️ Don't send ObjectManager signals before Hello method.
  • 🚑️ Fix a pointer access on Windows. Details at: https://github.com/microsoft/windows-rs/issues/2842
  • 🚑️ Fix use-after-free in Windows SID code.
  • 🔥 Don't assume defaults in fdo interfaces. Otherwise people will forget to set them and then wonder why their code is not working.
  • 💥 Drop Deref impl for blocking::ObjectServer. Not exactly a smart pointer. Also other blocking wrappers don't do that. #​475.
  • ✨ Support non-native endian:
    • Respond to messages using the same endian. This makes sense and it's also what gdbus does.
    • Add message::Builder::endian. This allows one to specify the endianness of the message they're constructing.
  • 📝 book: Add a simpler D-Bus signals example.
  • 🐛 Use the correct traversal order for node tree introspection in ObjectServer.
  • 💥 Serial numbers now globally assigned to messages, instead of Connection managing the serial numbers.
  • 🚩 Add option-as-array feature. This is a mainly a zvariant proxy/forwarding feature.
  • 🚩 Remove unused gvariant feature. zbus doesn't actually make use of this even if it was
    enabled. This only causes confusion if user enables it since then Option<T> has zvariant::Type
    implemented but D-Bus encoding doesn't support that and people get runtime errors instead.
  • 🩹 Server connection should reject fd-passing if not possible. If the client asks for
    fd-passing on socket type that doesn't support it, reject the request.
  • 💥 Make interface arg on fdo::PropertiesProxy::get_all optional. This is as per the specs. #​302.
  • 🗑️ Deprecate proxy::Builder::new_bare method. In favor of proxy::Builder::new(), which
    new_bare is just a wrapper around now, since all proxy types implement ProxyDefault trait. #​417.
  • ✨ impl ProxyDefault for Proxy.
  • 🏗️ ProxyDefault's constants now optional. This makes things a bit simpler and streamlined by
    allowing all generated proxies to implement this trait.
  • ✨ Add ProxyImpl trait that macro-generated proxies implement. It makes it possible to write
    generic code around different proxy types. #​433
  • 🩹 fdo proxies now don't assume default service and paths.
  • ⚡️ Some optimizations.
  • 🔊 add some logging to handshake code.
  • 📝 hide ResultAdapter from the doc, it's internal helper API.
  • 🎨 Fix formatting of Cargo.toml file.

v3.15.2: 🔖 zbus 3.15.2

Compare Source

To go with zbus_macros 3.15.2. Other changes:

  • 🚨 Fix clippy lints.
  • 🔥 Drop some unneeded imports.

v3.15.1: 🔖 zbus 3.15.1

Compare Source

  • 🚨 Impl Display instead of ToString for MatchRule.
  • 🔥 Remove some redundant imports.
  • 🚨 Fix some clippy warnings.

v3.15.0: 🔖 zbus 3.15.0

Compare Source

🐛 Add missing nix feature.
🏷️ Add ResponseDispatchNotifier type. A wrapper interface method response type that notifies the
caller of the response being sent off.
🚸 Specify service and object path for Monitoring & Debug.Stats proxies. These defaults to be
based on the interface name otherwise and that's not the expected bhaviour.
✏️ Fix a typo in docs.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot requested a review from a team as a code owner November 4, 2024 18:10
@renovate renovate bot added the dependencies Pull requests that update a dependency file label Nov 4, 2024
@FabianLars FabianLars closed this Nov 4, 2024
Copy link
Contributor Author

renovate bot commented Nov 4, 2024

Renovate Ignore Notification

Because you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future 5.x releases. But if you manually upgrade to 5.x then Renovate will re-enable minor and patch updates automatically.

If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR.

@renovate renovate bot deleted the renovate/v1-zbus-5.x branch November 4, 2024 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant