From nobody Mon Jan 24 21:39:57 2022 X-Original-To: bugs@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 60E9C19896C7 for ; Mon, 24 Jan 2022 21:39:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JjNgK0FG7z3CJd for ; Mon, 24 Jan 2022 21:39:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DCE961D1EA for ; Mon, 24 Jan 2022 21:39:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 20OLdutn017665 for ; Mon, 24 Jan 2022 21:39:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 20OLdupm017664 for bugs@FreeBSD.org; Mon, 24 Jan 2022 21:39:56 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 261446] freebsd-update should not create boot environment when it's not making changes to the boot environment Date: Mon, 24 Jan 2022 21:39:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: delphij@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643060397; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Nuo7jrUKBOVl/fy34ahrbyd6FdCNQ6qNQxLj0Vef3fk=; b=SrUXRdzP1avWP2rhysYiimJMW9sh73VSOqnFhHN1v5YQ0sC7IUAsnvRNesxYJcON2FiEQI SssKQBIlwDIC1TGh9ayWaCGFs/5QkQQh4rORwWL+iRzKVcalGpLbvCLnpyht9cCVDANvPS kYvt7qlHUj9rEzymsKwTP0PSscU+KhKVHvBsIeDwuUnI9MrNa3gB0uckQrEEI81HHGzA6r cAGWufYLjnzS8bMcd9GPr56cH7GqdGKA2D4PmvMGa18bnwC1+Wv5LrCRzXLFTOxEzMvweL 6cJVAOfqRsGbj/uau3BSQ2jvqCff4JdSBP6Cy+gK3KzhyIlGS4gBYXsYMS9n7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643060397; a=rsa-sha256; cv=none; b=httt2JkSw5Bkef3V9ijnq42UQHR6WIcJityNpQKW6ivu/11+tb1P5y7q6MyMEZbdB99SJL FIp7c3w71SukWGuc4T63Iz7VGwdt2gPMwx7ppXy4r9sGLavPnPJPoYVEliamNEhWrwwLLv LoLN4CnQWpdZS//dRv/eLZ1RK2v24RexK1wBRgP7XNekP0/BiDcAm36RpNwQ8LnNA+TBp7 3cEhTaJAszf6KScdieRJ1vuRwIn8nyPOdcOmuikB8EXmkTcz1Myv75P7b6uiW/2PszV/IT sXIlBLO+lf/oXDMnhZWVGWhEG8ZYoaxcshb1TZQiITvhDAM+aMo2zLz2gCj8lw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D261446 Bug ID: 261446 Summary: freebsd-update should not create boot environment when it's not making changes to the boot environment Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: delphij@FreeBSD.org I have noticed that f28f138905416c45ebaa6429f44a0b88a72f54b1 have implement= ed a feature that would create a new boot environment upon installation. While the feature itself is very useful, there are some scenarios that we d= on't want a new boot environment to be created unconditionally. One of these scenarios would be poudriere, which runs freebsd-update without jailing into the jails. I think the behavior should be disabled when -b is specified AND when it's = not /, because the boot environment is not going to be changed. I'd like to make the following feature requests: 1) Make the creation of boot environment to be named after both freebsd-ver= sion -k and freebsd-version -u results, in other words: diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 1776115d0776..a6f758813cd8 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -911,7 +911,7 @@ install_create_be () { esac if [ ${CREATEBE} =3D yes ]; then echo -n "Creating snapshot of existing boot environment... " - VERSION=3D`freebsd-version -k` + VERSION=3D`freebsd-version -ku | sort -V | tail -n = 1` TIMESTAMP=3D`date +"%Y-%m-%d_%H%M%S"` bectl create ${VERSION}_${TIMESTAMP} if [ $? -eq 0 ]; then 2) Make freebsd-update to not create boot environment when -b is specified = and the base directory is / 3) It's probably reasonable to have a RC script or periodic script to do something like: (bectl list -H | awk '{print $1;}' | grep -q $(freebsd-version -k) ) || bec= tl create $(freebsd-version -k)_$(date +%Y-%m-%d_%H%M%S) 4) There should be some way to clean up the automatically created boot environments. It makes sense to keep them around for e.g. a few weeks, but running out of disk space on / is not really fun. --=20 You are receiving this mail because: You are the assignee for the bug.=