From nobody Fri Aug 23 23:15:11 2024 X-Original-To: freebsd-hackers@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WrGBj1Lkrz5TfL0 for ; Fri, 23 Aug 2024 23:15:25 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-vk1-f177.google.com (mail-vk1-f177.google.com [209.85.221.177]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WrGBh5N79z4kK8 for ; Fri, 23 Aug 2024 23:15:24 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-vk1-f177.google.com with SMTP id 71dfb90a1353d-4f2c8e99c0fso729392e0c.1 for ; Fri, 23 Aug 2024 16:15:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724454923; x=1725059723; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=05XWdorI8OzwXdirHwP50IEq0PoXZss5jDbHtcBN0Tw=; b=MA7h/XboF1Me0twIfJHsa1tBKutDbb7tWrxJM9iZZtFboOIbvUODUqm3Vj3NWM9Wi8 EB1KmO6aT1YNg62NYAwOwAwre654a92LrxR01FnvN49mgJSEYnqcXvSsm7DBL2u2QYh/ JKxIF7VAOK69kz6oc1aNYosD2sTyyBPEHHoW2VyOp+psfxxCAmcdanMe7EFKK2/3Tawz aoAasspUIVeHq+w74GLB5HRTSDyuToKs/PYolVfQ2NPwqMu2ljZN3WfUj8K2Q6DPe2XX n2lSQT/Nwj0F53C/LJg+q6psSxzaqgovwcUS/aOUuWjFTUJnto8usEsPU0brxGwYs4RR owJA== X-Gm-Message-State: AOJu0YwMtVTDFF/xi7BUgoKgj753yYxtfncJwMR1gQd2N7cxT20ANiuV cOEoOkjNq7zt+EUsVruF2ttUf7yliaIL9OuibIRON+7kf3yY/CO3uDuHaoGJSVUnbZ0wmF35Y4Q y10ycM9TlXpzDfN+wRQEzLUViLLdV7w== X-Google-Smtp-Source: AGHT+IFnDL8zIbrlVxUxT42A64Uc6/yaeiDC/kHS9eYdo4amK4wXTAjW+T9Tw2gd2sVg+sIOMkUkkqzm7eka2mtahOw= X-Received: by 2002:a05:6122:ca4:b0:4ef:678e:8a90 with SMTP id 71dfb90a1353d-4fd1abf8f7cmr4880878e0c.3.1724454923276; Fri, 23 Aug 2024 16:15:23 -0700 (PDT) List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@FreeBSD.org MIME-Version: 1.0 References: In-Reply-To: From: Alan Somers Date: Fri, 23 Aug 2024 17:15:11 -0600 Message-ID: Subject: Re: Announcing freebsd-rustdate To: "Matthew D. Fuller" Cc: freebsd-hackers@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4WrGBh5N79z4kK8 On Thu, Aug 22, 2024 at 8:41=E2=80=AFPM Matthew D. Fuller wrote: > > 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. 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