Re: Good practices with bectl
- Reply: Daniel Tameling : "Re: Good practices with bectl"
- In reply to: Alexander Leidinger : "Re: Good practices with bectl"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 21 Sep 2022 11:08:38 UTC
Summary: Using bectl for upgrades RELEASE=Whatever > bectl create ${RELEASE} > bectl mount ${RELEASE} BASEDIR=/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=${BASEDIR} installkernel > etcupdate -p -D $BASEDIR > make DESTDIR=${BASEDIR} installworld > etcupdate -D $BASEDIR > make DESTDIR=${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 à(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=${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 > -- Nuno Teixeira FreeBSD Committer (ports)