FreeBSD-rustdate, a reimplementation of FreeBSD-update
freebsd-rustdate is a new, faster implementation of freebsd-update, written in Rust. It is experimental, not recommended for production, and users should exercise caution on critical systems.
Read original articlefreebsd-rustdate is a new implementation of the freebsd-update tool, developed to address the slow performance of the original. Written in Rust, it aims to provide similar functionality, though there are intentional differences and potential edge cases. Currently in an early experimental stage, it has been tested without causing system failures, but users are cautioned against using it as a primary tool for production systems due to the inherent risks of OS upgrades. The tool supports basic commands such as "fetch" for updating patches and "upgrade" for moving to new releases, with configurations drawn from the existing freebsd-update.conf file. While it has shown improvements in speed, it is not as thoroughly tested or widely adopted as freebsd-update, and users are advised to proceed with caution, especially on critical systems. The developer acknowledges the foundational work of Colin, the original creator of freebsd-update, and encourages users to download and experiment with the tool at their own risk.
- freebsd-rustdate is a faster alternative to freebsd-update, written in Rust.
- It is currently in an experimental phase and not recommended for production use.
- Basic commands include "fetch" for patches and "upgrade" for new releases.
- Users should be cautious and avoid using it on critical systems.
- The tool is not as well-tested as freebsd-update, and any issues may be considered features.
Related
2024 FreeBSD Developer Summit: Integration with Rust
The 2024 FreeBSD Developer Summit discussed integrating Rust into FreeBSD for modernization and security. Challenges include Rust's update pace differing from FreeBSD's. Coordination with Rust community is vital for compatibility and stability.
Rust for Filesystems
At the 2024 Linux Summit, Wedson Almeida Filho and Kent Overstreet explored Rust for Linux filesystems. Rust's safety features offer benefits for kernel development, despite concerns about compatibility and adoption challenges.
Rust 1.80.0
The Rust team released Rust 1.80.0, featuring LazyCell and LazyLock types, Cargo 1.80 lint checks, exclusive ranges in patterns, and stabilized APIs, enhancing efficiency and safety in software development.
Rust Port for Fish Shell Is Almost Ready for a Beta Release
The Fish shell is approaching a beta release of its Rust-based version, enhancing maintainability. An open beta will help identify bugs, with installation instructions for Linux and macOS provided.
FreeBSD considers Rust in the base system
FreeBSD is discussing the potential integration of Rust into its base system, facing concerns about build times and compatibility, while no concrete plans have been established yet.
I did some looking at freebsd-update, and it's quite the shell script, which makes it daunting to consider changing. All the forking and whatever doesn't seem great; using data structures should be a lot simpler!
But my systems running freebsd-update spend an awful lot of time on I/O, and not so much time on cpu, as I recall. I think the general flow for a replaced file is gunzip to the update dir, then install to the destination. This means all the files are written twice, and I thought there was a third write that I can't remember at the moment. Install doesn't have an option to decompress, but it'd be super handy if it did --- then you could write the file only once to the destination directory and move it into place.
I'm never a fan of quite as many files in a directory as freebsd-update gets up to either. Given that everything is already named by hashes, it's not too hard to have 16 or 256 directories named 0-f or 00-ff that get a slice of the files. Large directories have gotten better over time, but they're still slow.
There's some ability to exploit the embarassing parallelism available too, but that's hard in a complex shell script, so some other environment makes sense. I didn't look, but hopefully that's a knob in rustdate ... Sometimes you'd want it and other times one thing at a time is better, even when it's slow.
One feature I know update can do that I want to look at more but haven't had time is the zfs boot environment stuff --- seems like with the right arguments you could do the update on an inactive environment and reboot to switch, instead of the default way which does the install on the live environment but you could reboot to switch back. I'd be much more patient if the live environment continued working and I could reboot at my convenience once the process finished. Especially if I might be able to run pkg upgrade in the boot environment before the reboot. If rustdate supports that too, that'd be neat.
> In usage, it’s expected to be similar, but not identical to freebsd-update.
Doesn't reimplementing it to not be identical, defeat the point of reimplementing it?
(since it can't be used as a drop-in replacement)
I remember once replacing a filter written in pure bash by an awk one, the slowdown was around 2 minutes v awk which was a second.
Related
2024 FreeBSD Developer Summit: Integration with Rust
The 2024 FreeBSD Developer Summit discussed integrating Rust into FreeBSD for modernization and security. Challenges include Rust's update pace differing from FreeBSD's. Coordination with Rust community is vital for compatibility and stability.
Rust for Filesystems
At the 2024 Linux Summit, Wedson Almeida Filho and Kent Overstreet explored Rust for Linux filesystems. Rust's safety features offer benefits for kernel development, despite concerns about compatibility and adoption challenges.
Rust 1.80.0
The Rust team released Rust 1.80.0, featuring LazyCell and LazyLock types, Cargo 1.80 lint checks, exclusive ranges in patterns, and stabilized APIs, enhancing efficiency and safety in software development.
Rust Port for Fish Shell Is Almost Ready for a Beta Release
The Fish shell is approaching a beta release of its Rust-based version, enhancing maintainability. An open beta will help identify bugs, with installation instructions for Linux and macOS provided.
FreeBSD considers Rust in the base system
FreeBSD is discussing the potential integration of Rust into its base system, facing concerns about build times and compatibility, while no concrete plans have been established yet.