From nobody Wed Sep 21 11:08:38 2022 X-Original-To: freebsd-current@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 4MXbJM1BLRz4d5GF for ; Wed, 21 Sep 2022 11:08:51 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MXbJM0h0Bz3tdt for ; Wed, 21 Sep 2022 11:08:51 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663758531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YcCE4ZcjEMpSSm9+JXD4ZRASGZILhVwf6Bh0LXza92w=; b=ShlTPnc1J7kK3PwGeoR3hmuWDlcPGO2rVOUZ+sF9JnA2P/i+Z9oEbnDuRQCb9Z6zqYGj/B /K2r8cC6bd6PJKg2pJiLLCfOZmqEkN9KZ7kI7C2OS0mger4N9kpMfO2adlwtdHJ02jUwqB DRsMzxdRkCw3JLTOXMy4ucWcLH+6cXS8SBOT1SwcpvnB9s7koDI8EU3SGHQRLLFWeW0XNl Ng/lH49dgWnUQQMow3D/PhcxeDsCaikV8JNUNRPjcvbhru5bChxm9GueO/3H5gqeMBegff RYJnnG9MEd5gKksSunUmTbwRADdYdb5LD7nHqUiA/8LpU1i32BoJhMP/kE1QQA== Received: from mail-vs1-f53.google.com (mail-vs1-f53.google.com [209.85.217.53]) (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 "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MXbJL6bCBz1Fvv for ; Wed, 21 Sep 2022 11:08:50 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-vs1-f53.google.com with SMTP id q26so6282419vsr.7 for ; Wed, 21 Sep 2022 04:08:50 -0700 (PDT) X-Gm-Message-State: ACrzQf10u/DFBMBOdh4CW+Mm9Rn9mAZ4AtskBLlYcM3mBVRCVzRq1m+g 6Fu2h+SueXCFrZIQIQsCB2cqepUQtCauEuVKwnE= X-Google-Smtp-Source: AMsMyM50qc1wy6oo0P1EOcTauFoefwpR3YL4PYMvP1pgsu8eAuhPL2+IcDDXY4pvX4XG9IvwEdzXWbCpkWb5NuZWWzM= X-Received: by 2002:a67:d793:0:b0:398:506b:747b with SMTP id q19-20020a67d793000000b00398506b747bmr9803535vsj.19.1663758530137; Wed, 21 Sep 2022 04:08:50 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <20220921112706.Horde.eNaqpvIqq64Qe7crIQQ9JwX@webmail.leidinger.net> <20220921124452.Horde.BSQPZ4imQhhKUUE0k3W5iFb@webmail.leidinger.net> In-Reply-To: <20220921124452.Horde.BSQPZ4imQhhKUUE0k3W5iFb@webmail.leidinger.net> From: Nuno Teixeira Date: Wed, 21 Sep 2022 12:08:38 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Good practices with bectl To: FreeBSD CURRENT Content-Type: multipart/alternative; boundary="0000000000002e540105e92df84e" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1663758531; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YcCE4ZcjEMpSSm9+JXD4ZRASGZILhVwf6Bh0LXza92w=; b=rO5Z1D8/jyXxCkqocEPpRF69B1EFwuWHHPLMCcYDANx4YJycdLv8D5DyfCEJqaimqga9NO YvXTLT8EhWJhg813b9nxOjoZVCCgF2V+Sr00Fo3wI43K8FpNIfX4N/XQrJqXrptg6cbnxZ OgctJhplMvV9XLmOplTRCL+/p1pQB5v6qwFuI88sGzfUpJnGe4idz0r1fwiSXul0yyRqya 8nLQViEeTnBGaGwZrpZ8OUvCOgu0tEPj2FEbCBK5oY6dg5rlxkqSqKYk27MlWX1UQcdI/q RN+iCpq9Dx+LiGDqT2ZnMZlo8qH+hzg4Ajrwh6JCITAXR8ilKCh5iL+LmMfDwA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1663758531; a=rsa-sha256; cv=none; b=oPUiFkR5re0Q57Qcm+FixD63z2YShZX/tqVCx4Sle06gybbDKpb3s4hJHc5SyQ9In4kRcm cUwOQGjbBjd8wS0tGhW/azhihFqd+OYKPAfb4BsX+mPsrX0TgO6+2B9GvkRImIb7lYRqYJ 53MVPKXVLKHVj/+CXv1eYrA5qmspOZpapCQ9LnkXGiHfGdlnCTWU4fFrLs0I8BDSdxj0Gn SJwm1Oph59XPygNC9ZYUxSjeCjt3J1Na1A8xKuYa66u5sp+wnCVUq3g/GzIiphKXzK7mg7 dGacSZ+ouwnsbzGaiEFq1G1H8A0QjaRifn7Nj/+tN/lKlRCjqoYSNYnazqGfCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --0000000000002e540105e92df84e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Summary: Using bectl for upgrades RELEASE=3DWhatever > bectl create ${RELEASE} > bectl mount ${RELEASE} BASEDIR=3D/tmp/be_mount.XXXX # Use mount point returned by bectl mount [freebsd-update method] > freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update \ upgrade -r ${RELEASE} > freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update install # Ignore admonitions to reboot, since we're using a boot environment > freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update install > bectl activate ${RELEASE} #> bectl activate -t ${RELEASE} # Failsafe (if the machine is too far away to simply walk over and switch to the old BE): > reboot [upgrade from source method] > make DESTDIR=3D${BASEDIR} installkernel > etcupdate -p -D $BASEDIR > make DESTDIR=3D${BASEDIR} installworld > etcupdate -D $BASEDIR > make DESTDIR=3D${BASEDIR} -DBATCH_DELETE_OLD_FILES delete-old delete-old-libs > bectl activate ${RELEASE} #> bectl activate -t ${RELEASE} # Failsafe (if the machine is too far away to simply walk over and switch to the old BE): > reboot Alexander Leidinger escreveu no dia quarta, 21/09/2022 =C3=A0(s) 11:45: > Quoting David Wolfskill (from Wed, 21 Sep 2022 > 03:25:52 -0700): > > > On Wed, Sep 21, 2022 at 11:27:06AM +0200, Alexander Leidinger wrote: > >> ... > >> make DESTDIR=3D${BASEDIR} -DBATCH_DELETE_OLD_FILES delete-old > delete-old-libs > >> > >> Usually I replace the delete-old-libs with check-old, as I don't want > >> to blindly delete them (some ports may depend on them... at least for > >> the few libs which don't have symbol versioning). > >> .... > > > > A way to address that issue that may work for you is to install > > appropriate misc/compat* ports/packages. > > I'm running exclusively on -current. In the cases where this happens, > there are no compat packages yet. And I rather update the ports than > to install a compat package. It doesn't hurt me to keep the libs > during the pkg rebuild. > > In the generic case I prefer to stay safe and keep the libs until I > validated that nothing uses them anymore. That's the reason why I made > the delete-old-libs functionality separate from delete-old already in > the initial implementation. > > Bye, > Alexander. > -- > http://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF > http://www.FreeBSD.org netchild@FreeBSD.org : PGP 0x8F31830F9F2772BF > --=20 Nuno Teixeira FreeBSD Committer (ports) --0000000000002e540105e92df84e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Summary: Using bectl for upgrades

<= /div>
RELEASE=3DWhatever
> bectl create ${RELEASE}
> bectl mount ${RELEASE}
BASEDIR=3D/tmp/be_mount.XXXX # Use mount point returned by bectl mount

[freebsd-update method]
> freebs= d-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update \
upgrade -r ${RELEASE}
> freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update insta= ll
# Ignore admonitions to reboot, since we're using a boot environment > freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update insta= ll
> bectl activate ${RELEASE}
#> bectl activate -t ${RELEASE}= # Failsafe (if the machine is too far away to simply walk over and=C2=A0 <= br> switch to the old BE):
> reboot

[upgrade from source method]
> make DESTDIR=3D${BASEDIR} installkernel
> etcupdate -p -= D $BASEDIR
> make DESTDIR=3D${BASEDIR} installworld
= > etcupdate -D $BASEDIR
> make DESTDIR=3D${BASEDIR} -DBATCH= _DELETE_OLD_FILES delete-old delete-old-libs
> bectl activate = ${RELEASE}
#> bectl activate -t ${RELEASE} # Failsafe (if the = machine is too far away to simply walk over and=C2=A0
switch to the old BE):
> reboot

Alexander Leidinger = <Alexander@leidinger.net&= gt; escreveu no dia quarta, 21/09/2022 =C3=A0(s) 11:45:
Quoting David Wolfskill <david@catwhisker.org= > (from Wed, 21 Sep 2022=C2=A0
03:25:52 -0700):

> On Wed, Sep 21, 2022 at 11:27:06AM +0200, Alexander Leidinger wrote: >>=C2=A0 =C2=A0...
>> make DESTDIR=3D${BASEDIR} -DBATCH_DELETE_OLD_FILES delete-old dele= te-old-libs
>>
>> Usually I replace the delete-old-libs with check-old, as I don'= ;t want
>> to blindly delete them (some ports may depend on them... at least = for
>> the few libs which don't have symbol versioning).
>> ....
>
> A way to address that issue that may work for you is to install
> appropriate misc/compat* ports/packages.

I'm running exclusively on -current. In the cases where this happens,= =C2=A0
there are no compat packages yet. And I rather update the ports than=C2=A0 =
to install a compat package. It doesn't hurt me to keep the libs=C2=A0 =
during the pkg rebuild.

In the generic case I prefer to stay safe and keep the libs until I=C2=A0 <= br> validated that nothing uses them anymore. That's the reason why I made= =C2=A0
the delete-old-libs functionality separate from delete-old already in=C2=A0=
the initial implementation.

Bye,
Alexander.
--
h= ttp://www.Leidinger.net Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF=
htt= p://www.FreeBSD.org=C2=A0 =C2=A0 netchild@FreeBSD.org=C2=A0 : PGP 0x8F3= 1830F9F2772BF


--
Nun= o Teixeira
FreeBSD Committer (ports)
--0000000000002e540105e92df84e--