Gentoo FreeBSD/Upgrade Guide/11.0

From Gentoo Wiki
Jump to:navigation Jump to:search
The information in this article is representative of former times and has been archived. It can be used for reference, but is most likely not appropriate for current usage. Generally, archived articles should not be edited.


This guide will show you how to update the latest version. If you run into any trouble, please check the same section of Gentoo FreeBSD/Upgrade Guide.

Preparation

Updating all packages

root #emerge -uDN @world

Changing to the latest profile

It is necessary to change the profile to emerge packages related to FreeBSD 11.1.

Get a list of available profiles:

root #eselect profile list
Available profile symlink targets:
  [1]   default/bsd/fbsd/amd64/9.1
  [2]   default/bsd/fbsd/amd64/11.1
  [3]   default/bsd/fbsd/amd64/9.1/clang
  [4]   default/bsd/fbsd/amd64/11.1/clang

Set the profile to 11.1:

root #eselect profile set 2

Updating kernel

First of all, you need to update your kernel. That is because some userland packages may require functions of the new kernel.

Please be sure to update the kernel first:

root #emerge -u sys-freebsd/freebsd-sources

Reboot

Don't have any problem? Let's restart to actually use the new kernel:

root #shutdown -r now

After rebooting your machine, please check if the upgrade was successful.

root #uname -a
FreeBSD daemon 11.1_p2-Gentoo FreeBSD Gentoo 11.1_p2 #0: Sat Dec 30 15:00:01 Local time zone must be set--see zic manual page 2017     root@daemon:/var/tmp/portage/sys-freebsd/freebsd-sources-11.1_p2/work/sys/amd64/compile/GENTOO  amd64

Updating FreeBSD userland

First, please update sys-freebsd packages with USE=build:

root #USE=build emerge -u freebsd-bin freebsd-lib freebsd-mk-defs freebsd-pam-modules freebsd-sbin freebsd-share freebsd-sources freebsd-ubin freebsd-usbin

Please emerge the sys-freebsd packages again. Some of the packages are in need of include files of 11.1, which they couldn't use during the previous upgrade.

root #emerge boot0 freebsd-bin freebsd-lib freebsd-libexec freebsd-mk-defs freebsd-pam-modules freebsd-sbin freebsd-share freebsd-ubin freebsd-usbin

Changing the CHOST variable and rebuilding the toolchain

Note
You can skip this step if you are performing a minor upgrade (e.g. upgrading 11.0 to 11.1 once it's released)

Change the CHOST variable, and emerge binutils&gcc. (FYI, Changing the CHOST variable)

x86-fbsd users should issue:

root #gsed -i 's:CHOST=.*:CHOST="i686-gentoo-freebsd11.1":g' /etc/portage/make.conf

amd64-fbsd users should issue:

root #gsed -i 's:CHOST=.*:CHOST="x86_64-gentoo-freebsd11.1":g' /etc/portage/make.conf

Emerge binutils and gcc:

Note
gcc-7.0 or later version fails to compile sys-freebsd/boot0. Don't forget to specify the version.
root #emerge --oneshot sys-devel/binutils '<sys-devel/gcc-7.0'

Rebuilding all packages

root #emerge --oneshot sys-devel/libtool
root #emerge -ae @world

If one of the packages fails to compile you can issue 'emerge --resume --skipfirst' to continue emerging the remaining packages. Also, consider filing a bug report of the problem.

Cleaning

Let's remove the backup files when you have finished all the steps:

Important
Don't forget to run etc-update!
root #emerge @preserved-rebuild
root #etc-update

See also