Skip to content

Releases

patchbay-v0.8.0

Choose a tag to compare

@ramfox ramfox released this 26 Nov 14:09
patchbay-v0.8.0
03245af

patchbay 0.8.0 release notes (draft)

patchbay 0.8.0 is a breaking release. Processes now keep the caller's uid inside the user namespace, and commands that need root run through as_root(). Devices can lose carrier like a pulled cable. Most public types are now #[non_exhaustive], so future additions do not need a breaking release. The lab DNS server moved from hickory to simple-dns and sits behind a default dns-server feature.

Breaking changes

  • changed: patchbay::init_userns keeps the caller's uid and gid instead of mapping them to 0. Spawn commands that need root through Device::as_root(), Router::as_root() or Ix::as_root(). Root needs a subordinate id range for the user (newuidmap/newgidmap on PATH, entries in /etc/subuid and /etc/subgid). (#94)
    let child = device.as_root().spawn_command_sync(cmd)?;
  • changed: sim steps no longer run as root. Steps that need uid 0 (mount, chown, root checks) need root = true. nft, tc, ip, ping and low ports work without it. (#94)
  • changed: patchbay test and patchbay compare no longer run cargo inside a user namespace. Each test binary must call patchbay::init_userns() itself. (#94)
  • deprecated: patchbay::init_userns_for_ctor, use let _ = patchbay::init_userns();, which also works from a #[ctor]. (#94)
  • changed: patchbay::LabEventKind and its variants are #[non_exhaustive], with new variants CarrierUp and CarrierDown. (#85, #64)
  • changed: these enums are #[non_exhaustive]: Firewall, PortPolicy, OutDir, Ipv6DadMode, Ipv6ProvisioningMode, Ipv6Profile, Nat, NatMapping, NatV6Mode, RouterPreset. (#85)
  • changed: these structs are #[non_exhaustive]: LabEvent, DefaultRegions, and in event IfaceSnapshot, IfaceCounters, LabState, IxState, RouterState, DeviceState, RegionState, RegionLinkState. (#85)
  • changed: RegionLink, FirewallConfig, and in config LabConfig, RegionConfig, RouterConfig are #[non_exhaustive]. Build them with RegionLink::good/degraded, FirewallConfig::builder(), Default, or the new RouterConfig::new(name). (#85)
  • changed: the value in patchbay::NodeId is private, use its Display impl. (#85)
  • changed: patchbay::DnsServer::remove takes patchbay::dns_server::RecordType instead of hickory_proto::rr::RecordType. (#93)
  • changed: DnsServer::set_txt returns an error for a value longer than 255 bytes. The server drops queries for unknown record types instead of answering NOERROR or NXDOMAIN. (#93)

Highlights

  • Iface::carrier_down and carrier_up drop and restore carrier on an interface, like a pulled cable or a lost Wi-Fi association. The interface keeps its addresses and routes. Sims get carrier-down and carrier-up steps. (#64)
  • The lab DNS server is behind the dns-server feature, on by default. With default-features = false, patchbay builds without a DNS crate. (#80)
  • Binds retry on EADDRINUSE, and the docs explain how to rebind fixed ports. (#95)
  • renew_ip keeps the default route. (#79)
  • Fewer dependencies: rtnetlink and nix are replaced by netlink-proto and rustix, futures by futures-lite, and hickory by simple-dns and n0-dns-resolver. (#83, #92, #93)

Commits

Features

  • (userns) Add init_userns_keep_uid to keep the caller's uid (#91) - c084f10 (removed again by #94 before the release; consider dropping this line)
  • Put the lab DNS server behind a dns-server feature (#80) - e5a07ec
  • [breaking] Add Iface::carrier_down and carrier_up to simulate a pulled cable (#64) - 848c1e6
  • [breaking] Mark the public API as non_exhaustive where it will grow (#85) - 4f704e0
  • Retry binds on EADDRINUSE, document rebinding fixed ports (#95) - cf7a86b
  • [breaking] Init_userns keeps the caller's uid, run commands as root via as_root() (#94) - f73eea9

Bug fixes

  • Renew_ip keeps the default route (#79) - 8c6996a

Documentation

  • Fix broken rustdoc links, check docs in CI, correct the step action default (#96) - b2df935

Testing

Miscellaneous tasks

  • Replace rtnetlink and nix with netlink-proto and rustix (#83) - 51e0bce
  • Replace futures with futures-lite (#92) - 23e1def

Deps

  • [breaking] Replace hickory with simple-dns and n0-dns-resolver (#93) - 72070a5

Full diff: patchbay-v0.7.1...patchbay-v0.8.0

Rolling build

Rolling build Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 04 Mar 11:15
c4147e1

Automated rolling release from commit c4147e1.
This release is updated on every push to main.

v0.5.2

Choose a tag to compare

@dignifiedquire dignifiedquire released this 07 May 14:43
patchbay-v0.5.2

chore: Release patchbay version 0.5.2

v0.5.1

Choose a tag to compare

@dignifiedquire dignifiedquire released this 04 May 09:25
patchbay-v0.5.1

chore: Release patchbay version 0.5.1