Discussion:
Announcing freebsd-rustdate
(too old to reply)
Matthew D. Fuller
2024-08-23 02:40:46 UTC
Permalink
Do you enjoy using freebsd-update to keep your systems fresh, but not
so much enjoy the vacations you go on while waiting for it finish
doing its thing? Ever wished there was something faster and way less
widely tested you could use instead? Well, today's your lucky day!

The performance of freebsd-update.sh has bothered me a number of
times, so over the past few months I've been working on a
re-implementation of it in Rust. It's fairly feature complete now,
and seems to be working OK. I've been using it on multiple systems,
and they're all still working. So, it's time for other people to see
it now.


I've setup a small site:

https://rustdate.over-yonder.net/

that has a download of a current tarball (a pretty vanilla cargo
workspace), a lot of information on usage, the differences from
freebsd-update.sh, and some deeply unfair speed comparisons. It
awaits your examination, and I await your feedback.


Here's some quick summary points; see the site (or the built-in help)
for more details:

The basic commands (fetch/cron/upgrade/install) are roughly the same.
There's fairly extensive built-in help for the commands and arguments.
A number of parts can make use of multiple cores, so you can get some
nice speedups if you have them. There are progress bars for most
long-running operations. Manual conflict resolution and showing the
details of pending upgrades are separate commands, so 'fetch' and
'upgrade' don't have any interactive elements.

Just for a quick taste of the speed difference, with warm caches on my
fairly powerful workstation, upgrading from 13.2-RELEASE to
14.0-RELEASE-p9 with the full source tree included takes under 2
minutes with freebsd-rustdate (well under 1 minute, if you disable
fsync), compared to about half an hour for freebsd-update.


I'm sure there's lots more testing it needs, so I'd be cautious about
grabbing this and running straight ahead to upgrading your whole
production fleet with it. But I'd love to know about what's missing
or broken, so I can add or fix it. Or about what's working right, so
I can break it.

It's worked well for me, so it's probably not _completely_ broken.
I've done my best to make it roughly equivalent to the .sh, but
tracking through some the logic in there is kinda twisty. I don't
have any insight into how it's all expected to work except for what I
could glean from those sh-spelunking trips, so I expect there are
still surprises lurking somewhere.


In any event, I definitely want to thank Colin Percival and everyone
else who's worked on the existing script and infrastructure over the
years. I'm sure I'm not the only one who appreciates it. And I very
much don't intend anything in this mail or on the site as any sort of
slight against them; shell scripts are just slow. Of course, while
I've done my best to work from the contents of the .sh, all the code
in this is mine, so nothing in it is in any way Colin's fault, or
anyone's but me[0].



[0] It's probably not my fault either. There's a small family of
elves living in an old ATX case in my closet, who regularly put
bugs into my code. So, really, just blame them.
--
Matthew Fuller (MF4839) | ***@over-yonder.net
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Alan Somers
2024-08-23 23:15:11 UTC
Permalink
On Thu, Aug 22, 2024 at 8:41 PM Matthew D. Fuller
Post by Matthew D. Fuller
Do you enjoy using freebsd-update to keep your systems fresh, but not
so much enjoy the vacations you go on while waiting for it finish
doing its thing? Ever wished there was something faster and way less
widely tested you could use instead? Well, today's your lucky day!
The performance of freebsd-update.sh has bothered me a number of
times, so over the past few months I've been working on a
re-implementation of it in Rust. It's fairly feature complete now,
and seems to be working OK. I've been using it on multiple systems,
and they're all still working. So, it's time for other people to see
it now.
https://rustdate.over-yonder.net/
that has a download of a current tarball (a pretty vanilla cargo
workspace), a lot of information on usage, the differences from
freebsd-update.sh, and some deeply unfair speed comparisons. It
awaits your examination, and I await your feedback.
Here's some quick summary points; see the site (or the built-in help)
The basic commands (fetch/cron/upgrade/install) are roughly the same.
There's fairly extensive built-in help for the commands and arguments.
A number of parts can make use of multiple cores, so you can get some
nice speedups if you have them. There are progress bars for most
long-running operations. Manual conflict resolution and showing the
details of pending upgrades are separate commands, so 'fetch' and
'upgrade' don't have any interactive elements.
Just for a quick taste of the speed difference, with warm caches on my
fairly powerful workstation, upgrading from 13.2-RELEASE to
14.0-RELEASE-p9 with the full source tree included takes under 2
minutes with freebsd-rustdate (well under 1 minute, if you disable
fsync), compared to about half an hour for freebsd-update.
I'm sure there's lots more testing it needs, so I'd be cautious about
grabbing this and running straight ahead to upgrading your whole
production fleet with it. But I'd love to know about what's missing
or broken, so I can add or fix it. Or about what's working right, so
I can break it.
It's worked well for me, so it's probably not _completely_ broken.
I've done my best to make it roughly equivalent to the .sh, but
tracking through some the logic in there is kinda twisty. I don't
have any insight into how it's all expected to work except for what I
could glean from those sh-spelunking trips, so I expect there are
still surprises lurking somewhere.
In any event, I definitely want to thank Colin Percival and everyone
else who's worked on the existing script and infrastructure over the
years. I'm sure I'm not the only one who appreciates it. And I very
much don't intend anything in this mail or on the site as any sort of
slight against them; shell scripts are just slow. Of course, while
I've done my best to work from the contents of the .sh, all the code
in this is mine, so nothing in it is in any way Colin's fault, or
anyone's but me[0].
[0] It's probably not my fault either. There's a small family of
elves living in an old ATX case in my closet, who regularly put
bugs into my code. So, really, just blame them.
This looks awesome! I can't wait to try it out. I too get painfully
bored by those long freebsd-update sessions. But it needs a couple of
things:
* Revision control. Are you going to commit it to Github or some
other public repository?
* Tests. One of the things I like best about Rust is its testing
infrastructure, and one of the things that scares me most about
freebsd-update is its total lack of tests. It has me afraid to change
anything. We need to figure out how to get some test coverage here.
I might be able to help.

-Alan


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Matthew D. Fuller
2024-08-24 03:52:19 UTC
Permalink
On Fri, Aug 23, 2024 at 05:15:11PM -0600 I heard the voice of
Post by Alan Somers
* Revision control.
As a man of culture and taste, I'm naturally doing my work in bzr
rather than git. Maybe I can try and get a real project setup over
the weekend, but for now I've at least pushed my current trunk up to

https://code.launchpad.net/~fullermd/+junk/rustdate
Post by Alan Somers
* Tests. One of the things I like best about Rust is its testing
infrastructure, and one of the things that scares me most about
freebsd-update is its total lack of tests. It has me afraid to
change anything.
Rustdate does currently have some tests. Mostly of the easy to test
stuff, like parsing the files from the server, and the various
internal data manipulation. Testing the unimportant stuff like
actually manipulating the system, well, that's harder :)

And at least you start out in a less scary place than trying to change
the .sh. Things happen in local variables you pass around, rather
than global vars and "well-known" temp files that get written in one
place and arbitrarily read in another. And being a compiled language
gives you a lot of compile-time complaining when you change function
args or data structures, instead of weird runtime glitches 8 months
later.
--
Matthew Fuller (MF4839) | ***@over-yonder.net
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Eirik Øverby
2024-08-30 10:56:36 UTC
Permalink
Post by Matthew D. Fuller
Maybe I can try and get a real project setup over the weekend,
I mostly did, but didn't mention it; setup a project at
https://launchpad.net/freebsd-rustdate
with the current trunk at
https://code.launchpad.net/~fullermd/freebsd-rustdate/trunk
Also put up a new 0.6.2 patch release with a fix to updating
permissions on existing directories (when appropriate), and various
minor code fiddling.
Any hope of seeing this in ports? Then I could actually play with it at
some scale around here..

/Eirik


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Matthew D. Fuller
2024-09-13 02:21:42 UTC
Permalink
Post by Eirik Øverby
Any hope of seeing this in ports? Then I could actually play with
it at some scale around here..
I'm holding back a bit on that currently on the theory that it'd be
likely to pull in some less early-adopter-y types. I want to get
some more feedback and bug reports (or better, non-bug reports ;)
from the sorta people who read -hackers before it gets sprung on the
sorta people who don't.
Now up to an 0.7.1 release tarball on the downloads page[0]. Apart
from various code cleanup and cosmetic tweaks, it's recently grown the
ability to generate shell completions, and the `install` and `extract`
commands have an arg to do multi-thread parallel file installation
(with all the risks and benefits you'd expect from that).

I don't have anything else significant on my list for it currently, so
my current plan is some final checking/proofing, beating the web page
into a bit better shape with some better organized reference material,
and getting a port together. Barring someone pointing out big
surprises, it should hopefully be ready in time for 13.4 (I can send
some people to kidnap Colin for a few days to buy some time if
necessary).



[0] https://rustdate.over-yonder.net/download.html
--
Matthew Fuller (MF4839) | ***@over-yonder.net
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Matthew D. Fuller
2024-09-25 13:34:51 UTC
Permalink
Post by Eirik Øverby
Any hope of seeing this in ports? Then I could actually play with it
at some scale around here..
As of this morning, it now is:

https://cgit.freebsd.org/ports/commit/?id=cd98eb34489646fd0a340bbaca9ba0088d6576a4

So portaphiles should be set to build it from there now. Packagarians
would be sometime around the weekend, I s'pose.
--
Matthew Fuller (MF4839) | ***@over-yonder.net
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Lorenzo Salvadore
2024-08-24 08:44:44 UTC
Permalink
Hello Matthew,

This is very interesting, I believe it deserves an entry in the
next status reports. In a few days we will start calling for 2024Q3
reports, but you can send us earlier if you prefer (it is never
too early for sending a status report).

If you are interested, here are status report submission instructions:
https://docs.freebsd.org/en/articles/freebsd-status-report-process/

Cheers,

Lorenzo Salvadore
Post by Matthew D. Fuller
Do you enjoy using freebsd-update to keep your systems fresh, but not
so much enjoy the vacations you go on while waiting for it finish
doing its thing? Ever wished there was something faster and way less
widely tested you could use instead? Well, today's your lucky day!
The performance of freebsd-update.sh has bothered me a number of
times, so over the past few months I've been working on a
re-implementation of it in Rust. It's fairly feature complete now,
and seems to be working OK. I've been using it on multiple systems,
and they're all still working. So, it's time for other people to see
it now.
https://rustdate.over-yonder.net/
that has a download of a current tarball (a pretty vanilla cargo
workspace), a lot of information on usage, the differences from
freebsd-update.sh, and some deeply unfair speed comparisons. It
awaits your examination, and I await your feedback.
Here's some quick summary points; see the site (or the built-in help)
The basic commands (fetch/cron/upgrade/install) are roughly the same.
There's fairly extensive built-in help for the commands and arguments.
A number of parts can make use of multiple cores, so you can get some
nice speedups if you have them. There are progress bars for most
long-running operations. Manual conflict resolution and showing the
details of pending upgrades are separate commands, so 'fetch' and
'upgrade' don't have any interactive elements.
Just for a quick taste of the speed difference, with warm caches on my
fairly powerful workstation, upgrading from 13.2-RELEASE to
14.0-RELEASE-p9 with the full source tree included takes under 2
minutes with freebsd-rustdate (well under 1 minute, if you disable
fsync), compared to about half an hour for freebsd-update.
I'm sure there's lots more testing it needs, so I'd be cautious about
grabbing this and running straight ahead to upgrading your whole
production fleet with it. But I'd love to know about what's missing
or broken, so I can add or fix it. Or about what's working right, so
I can break it.
It's worked well for me, so it's probably not completely broken.
I've done my best to make it roughly equivalent to the .sh, but
tracking through some the logic in there is kinda twisty. I don't
have any insight into how it's all expected to work except for what I
could glean from those sh-spelunking trips, so I expect there are
still surprises lurking somewhere.
In any event, I definitely want to thank Colin Percival and everyone
else who's worked on the existing script and infrastructure over the
years. I'm sure I'm not the only one who appreciates it. And I very
much don't intend anything in this mail or on the site as any sort of
slight against them; shell scripts are just slow. Of course, while
I've done my best to work from the contents of the .sh, all the code
in this is mine, so nothing in it is in any way Colin's fault, or
anyone's but me[0].
[0] It's probably not my fault either. There's a small family of
elves living in an old ATX case in my closet, who regularly put
bugs into my code. So, really, just blame them.
--
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Matthew D. Fuller
2024-08-30 04:52:04 UTC
Permalink
Maybe I can try and get a real project setup over the weekend,
I mostly did, but didn't mention it; setup a project at

https://launchpad.net/freebsd-rustdate

with the current trunk at

https://code.launchpad.net/~fullermd/freebsd-rustdate/trunk


Also put up a new 0.6.2 patch release with a fix to updating
permissions on existing directories (when appropriate), and various
minor code fiddling.
--
Matthew Fuller (MF4839) | ***@over-yonder.net
Systems/Network Administrator | http://www.over-yonder.net/~fullermd/
On the Internet, nobody can hear you scream.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Juraj Lutter
2024-08-30 11:08:37 UTC
Permalink
Hi,
Post by Matthew D. Fuller
Maybe I can try and get a real project setup over the weekend,
I mostly did, but didn't mention it; setup a project at
https://launchpad.net/freebsd-rustdate
with the current trunk at
https://code.launchpad.net/~fullermd/freebsd-rustdate/trunk
Also put up a new 0.6.2 patch release with a fix to updating
permissions on existing directories (when appropriate), and various
minor code fiddling.
Any hope of seeing this in ports? Then I could actually play with it at some scale around here..
The port can be made if there would be a “release” tarball. Now the code is accessible via Bazaar only.


Juraj Lutter
***@FreeBSD.org



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Juraj Lutter
2024-08-30 15:22:24 UTC
Permalink
On Fri, Aug 30, 2024 at 01:08:37PM +0200 I heard the voice of
Post by Juraj Lutter
The port can be made if there would be a “release” tarball. Now the
code is accessible via Bazaar only.
?? There've been release tarballs on the site since before the bzr
branch was even pushed somewhere visible.
I’ve only looked to launchpad (pardon my ignorance).


Juraj Lutter
***@FreeBSD.org



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...