Repository navigation
Releases
Releases · n0-computer/patchbay
patchbay-v0.8.0
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_usernskeeps the caller's uid and gid instead of mapping them to 0. Spawn commands that need root throughDevice::as_root(),Router::as_root()orIx::as_root(). Root needs a subordinate id range for the user (newuidmap/newgidmaponPATH, entries in/etc/subuidand/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) needroot = true.nft,tc,ip,pingand low ports work without it. (#94) - changed:
patchbay testandpatchbay compareno longer run cargo inside a user namespace. Each test binary must callpatchbay::init_userns()itself. (#94) - deprecated:
patchbay::init_userns_for_ctor, uselet _ = patchbay::init_userns();, which also works from a#[ctor]. (#94) - changed:
patchbay::LabEventKindand its variants are#[non_exhaustive], with new variantsCarrierUpandCarrierDown. (#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 ineventIfaceSnapshot,IfaceCounters,LabState,IxState,RouterState,DeviceState,RegionState,RegionLinkState. (#85) - changed:
RegionLink,FirewallConfig, and inconfigLabConfig,RegionConfig,RouterConfigare#[non_exhaustive]. Build them withRegionLink::good/degraded,FirewallConfig::builder(),Default, or the newRouterConfig::new(name). (#85) - changed: the value in
patchbay::NodeIdis private, use itsDisplayimpl. (#85) - changed:
patchbay::DnsServer::removetakespatchbay::dns_server::RecordTypeinstead ofhickory_proto::rr::RecordType. (#93) - changed:
DnsServer::set_txtreturns 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_downandcarrier_updrop and restore carrier on an interface, like a pulled cable or a lost Wi-Fi association. The interface keeps its addresses and routes. Sims getcarrier-downandcarrier-upsteps. (#64)- The lab DNS server is behind the
dns-serverfeature, on by default. Withdefault-features = false, patchbay builds without a DNS crate. (#80) - Binds retry on
EADDRINUSE, and the docs explain how to rebind fixed ports. (#95) renew_ipkeeps the default route. (#79)- Fewer dependencies:
rtnetlinkandnixare replaced bynetlink-protoandrustix,futuresbyfutures-lite, and hickory bysimple-dnsandn0-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
Documentation
Testing
Miscellaneous tasks
- Replace rtnetlink and nix with netlink-proto and rustix (#83) - 51e0bce
- Replace futures with futures-lite (#92) - 23e1def
Deps
Full diff: patchbay-v0.7.1...patchbay-v0.8.0
Rolling build
v0.5.2
patchbay-v0.5.2 chore: Release patchbay version 0.5.2
v0.5.1
patchbay-v0.5.1 chore: Release patchbay version 0.5.1