Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Sep 2022 12:08:38 +0100
From:      Nuno Teixeira <eduardo@freebsd.org>
To:        FreeBSD CURRENT <freebsd-current@freebsd.org>
Subject:   Re: Good practices with bectl
Message-ID:  <CAFDf7UL-YTNHWFLRXx0JbgotxG6TH0P=MOowh9DPt5OVaiy8TQ@mail.gmail.com>
In-Reply-To: <20220921124452.Horde.BSQPZ4imQhhKUUE0k3W5iFb@webmail.leidinger.net>
References:  <CAFDf7UL42z-m9P-gp6eY-orwcPz_UdJpiAM3ab-z4XLbY0LOdg@mail.gmail.com> <CAOtMX2gdoh2XxF0ofohyBA3DY-tgB5wAWb6%2BQmMb5tZRjieEvw@mail.gmail.com> <CAFDf7UJR73_rJeFQ059LCRw=K6AL8Y__9XgZ7RdR5zcjLitY_g@mail.gmail.com> <CAFDf7UKNaqCXr_KcYUPjGzN8hhZ22v6D9E00N7f=BvT2RukBZQ@mail.gmail.com> <20220921112706.Horde.eNaqpvIqq64Qe7crIQQ9JwX@webmail.leidinger.net> <YyrmsFONtjy1jVhh@albert.catwhisker.org> <20220921124452.Horde.BSQPZ4imQhhKUUE0k3W5iFb@webmail.leidinger.net>

next in thread | previous in thread | raw e-mail | index | archive | help
--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 <Alexander@leidinger.net> escreveu no dia quarta,
21/09/2022 =C3=A0(s) 11:45:

> Quoting David Wolfskill <david@catwhisker.org> (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

<div dir=3D"ltr"><div>Summary: Using bectl for upgrades<br></div><div><br><=
/div><div>RELEASE=3DWhatever<br>
&gt; bectl create ${RELEASE}<br>
&gt; bectl mount ${RELEASE}<br>
BASEDIR=3D/tmp/be_mount.XXXX # Use mount point returned by bectl mount<br>
</div><div><br></div><div>[freebsd-update method]<br></div><div>&gt; freebs=
d-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update \<br>
upgrade -r ${RELEASE}<br>
&gt; freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update insta=
ll<br>
# Ignore admonitions to reboot, since we&#39;re using a boot environment<br=
>
&gt; freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update insta=
ll<br>
&gt; bectl activate ${RELEASE}</div><div>#&gt; 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):<br>
&gt; reboot</div><div><br></div><div>[upgrade from source method]</div><div=
>&gt; make DESTDIR=3D${BASEDIR} installkernel</div><div>&gt; etcupdate -p -=
D $BASEDIR</div><div>&gt; make DESTDIR=3D${BASEDIR} installworld</div><div>=
&gt; etcupdate -D $BASEDIR</div><div>&gt; make DESTDIR=3D${BASEDIR} -DBATCH=
_DELETE_OLD_FILES delete-old delete-old-libs</div><div>&gt; bectl activate =
${RELEASE}</div><div>#&gt; 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):</div><div>&gt; reboot<br></div></div><br><div class=
=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">Alexander Leidinger =
&lt;<a href=3D"mailto:Alexander@leidinger.net">Alexander@leidinger.net</a>&=
gt; escreveu no dia quarta, 21/09/2022 =C3=A0(s) 11:45:<br></div><blockquot=
e class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px s=
olid rgb(204,204,204);padding-left:1ex">Quoting David Wolfskill &lt;<a href=
=3D"mailto:david@catwhisker.org" target=3D"_blank">david@catwhisker.org</a>=
&gt; (from Wed, 21 Sep 2022=C2=A0 <br>
03:25:52 -0700):<br>
<br>
&gt; On Wed, Sep 21, 2022 at 11:27:06AM +0200, Alexander Leidinger wrote:<b=
r>
&gt;&gt;=C2=A0 =C2=A0...<br>
&gt;&gt; make DESTDIR=3D${BASEDIR} -DBATCH_DELETE_OLD_FILES delete-old dele=
te-old-libs<br>
&gt;&gt;<br>
&gt;&gt; Usually I replace the delete-old-libs with check-old, as I don&#39=
;t want<br>
&gt;&gt; to blindly delete them (some ports may depend on them... at least =
for<br>
&gt;&gt; the few libs which don&#39;t have symbol versioning).<br>
&gt;&gt; ....<br>
&gt;<br>
&gt; A way to address that issue that may work for you is to install<br>
&gt; appropriate misc/compat* ports/packages.<br>
<br>
I&#39;m running exclusively on -current. In the cases where this happens,=
=C2=A0 <br>
there are no compat packages yet. And I rather update the ports than=C2=A0 =
<br>
to install a compat package. It doesn&#39;t hurt me to keep the libs=C2=A0 =
<br>
during the pkg rebuild.<br>
<br>
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&#39;s the reason why I made=
=C2=A0 <br>
the delete-old-libs functionality separate from delete-old already in=C2=A0=
 <br>
the initial implementation.<br>
<br>
Bye,<br>
Alexander.<br>
-- <br>
<a href=3D"http://www.Leidinger.net" rel=3D"noreferrer" target=3D"_blank">h=
ttp://www.Leidinger.net</a> Alexander@Leidinger.net: PGP 0x8F31830F9F2772BF=
<br>
<a href=3D"http://www.FreeBSD.org" rel=3D"noreferrer" target=3D"_blank">htt=
p://www.FreeBSD.org</a>=C2=A0 =C2=A0 netchild@FreeBSD.org=C2=A0 : PGP 0x8F3=
1830F9F2772BF<br>
</blockquote></div><br clear=3D"all"><br>-- <br><div dir=3D"ltr" class=3D"g=
mail_signature"><div dir=3D"ltr"><span style=3D"color:rgb(102,102,102)">Nun=
o Teixeira<br>FreeBSD Committer (ports)</span></div></div>

--0000000000002e540105e92df84e--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFDf7UL-YTNHWFLRXx0JbgotxG6TH0P=MOowh9DPt5OVaiy8TQ>