OpenBSD Following -current and using snapshots [FAQ Index]


Active OpenBSD development is known as the -current branch. These sources are frequently compiled into releases known as snapshots. Active development sometimes pushes aggressive changes, and complications can arise when building the latest code from a previous point in time. Some of the shortcuts for getting over these hurdles are explained on this page. In general, it's far better to use the OpenBSD upgrade procedure with a newer snapshot, as developers will have gone through the trouble for you already.

Make sure you've read and understand how to build the system from source before using -current and the instructions below.

You should always use a snapshot as the starting point for running -current. Upgrading by compiling your own source code is not supported.

Most of these changes will have to be performed as root.

2017/04/17 - build infrastructure change

The build infrastructure has been changed to allow building clang alongside gcc. This requires an update of the make "include" files:
# cd /usr/src/share/mk && make install

2017/04/19 - clang enabled for amd64 and i386

The clang compiler is now built alongside gcc on the amd64 and i386 architectures. It is recommended that you upgrade using a snapshot.

If you build your own releases, note that make release now needs more than 2G space on /usr/obj. Increasing the size to 3G is recommended.

If you wish to upgrade from source, you need to bootstrap clang:

# pkg_add g++
# cd /usr/src/gnu/usr.bin/clang
# make obj
# make BOOTSTRAP_CLANG=yes
# make install
Compile libcompiler_rt:
# cd /usr/src/lib/libcompiler_rt
# make obj
# make depend
# make
# make install
Then do a regular make build and make release.

2017/04/27 - [ports] beats updated

filebeat and packetbeat were updated to 5.3.1 which significantly changed the configuration file layout from 1.x to 5.x. Please refer to the upstream documentation for migrating your configuration. Also take note of the breaking changes when upgrading to 5.3.1.
topbeat has been merged into metricbeat, a migration path is available.

2017/05/07 - amd64: argument printing in ddb stack traces

On amd64, ddb(4) now supports printing of arguments in stack traces. This relies on the new -msave-args compiler option. If your last upgrade predates Apr 28, you need to build a new cc(1) before you can build a new kernel:
# cd /usr/src/gnu/usr.bin/cc
# make obj
# make depend
# make
# make install

2017/05/15 - breaking change for nvme(4) users with GPT

If you are booting from an nvme(4) drive with a GPT disk layout, you are affected by an off-by-one in the driver with the consequence that the sector count in your partition table may be incorrect. The only way to fix this is to re-initialize the partition table. Backup your data to another disk before you upgrade. In the new bsd.rd, drop to a shell and re-initialize the GPT:
# fdisk -iy -g -b 960 sdN
Then do a fresh install and restore the data from the backup.

2017/05/29 - ksh plaintext history file

The ksh(1) history file (used when $HISTFILE is set) changed from a binary file format to plaintext. If you wish to retain your current ksh history, create a plaintext version of it before upgrading:
$ fc -ln 1 | cut -f2- > ~/ksh_hist.txt
After the upgrade, you can use ksh_hist.txt as your history file. If you mount HOME via NFS, ensure that machines running -current use a different HISTFILE than machines running 6.1 or earlier.

If you upgrade from source, note that the old ksh recklessly truncates a history file that it doesn't understand, so be careful not to run interactive sessions of the old and new ksh in parallel. A reboot after the build is recommended.

2017/05/30 - IPv6 stateless address auto configuration moved to userland

Sending of router solicitations and processing of router advertisements has been disabled in the kernel. This task is now handled by slaacd(8). If you upgrade by building from source, make sure that kernel and userland are kept in sync to avoid losing IPv6 stateless address auto configuration.

2017/05/31 - pf blocks IPv6 options header

IPv6 packets that have a hop-by-hop options header or a destination options header are now blocked by pf(4). Thus, IPv6 options are handled like their counterparts in IPv4. Add allow-opts to your rule if you want to pass IP packets with options.

2017/06/03 - slaacd(8) moved to /sbin

There were a few snapshots that had slaacd(8) in /usr/sbin. The old binary can be removed if the new one in /sbin is present:
# rm /usr/sbin/slaacd

2017/06/22 - KARL: link-kit transition

If you upgrade from source, you need to compile and install a new config(8) binary before building a new kernel:
# cd /usr/src/usr.sbin/config
# make obj
# make && make install
In any kernel directory, you must issue make config:
# cd /sys/arch/$(machine)/compile/GENERIC.MP
# make obj
# make config
# make && make install
The make install step will also enable the kernel relinking on each boot. Therefore, installing kernels with make install is recommended. Developers can deactivate the kernel relinking at reboot time by installing kernels with cp obj/bsd /bsd and reactivate the automatic process using make install.

2017/06/29 - vlan(4)/svlan(4) ifconfig(8) changes

The vlan(4) and svlan(4) specific configuration options in ifconfig(8) and hostname.if(5) have been deprecated in favour of the generic parent and vnetid handling.

The vlan, vlandev, and -vlandev options are now deprecated in favour of vnetid, -vnetid, parent, and -parent when using ifconfig(8) or in hostname.if(8) configuration files. Use of the vlan option must be replaced with vnetid. Because VLAN tag 0 is invalid according to the relevant VLAN specifications, the vnetid option does not accept 0 as a valid network identifier. To use VLAN tag 0 on the wire the vnetid can be unconfigured with -vnetid. Use of vlandev and -vlandev must be replaced with parent and -parent respectively.

Unlike vlan and vlandev, vnetid and parent do not implicitly bring the vlan interface up. Similarly, the vlan option is no longer implied by the interface's minor when it is not explicitly set.

ifconfig(8) no longer outputs a vlan specific status line, or separate vnetid and parent lines. The vnetid and parent lines have been merged into a single encap line containing the VLAN tag and parent information.

An example of the changes to a vlan(4) configuration file and the ifconfig(8) output is below. Before the changes:

# cat /etc/hostname.vlan7
vlandev em0 # vlan 7 and up are implied
lladdr random
# ifconfig vlan7
vlan7: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 70:a7:3a:75:da:2d
	index 7 priority 0 llprio 3
	vlan: 7 parent interface: em0
	vnetid: 7
	parent: em0
	status: active
After the changes:
# cat /etc/hostname.vlan7
vnetid 7 parent em0
up
lladdr random
# ifconfig vlan7
vlan7: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        lladdr 60:e8:d7:0d:10:6d
        index 7 priority 0 llprio 3
        encap: vnetid 7 parent: em0
        groups: vlan
        status: active

2017/07/11 - "listen secure" syntax removed from smtpd.conf

The secure keyword is not valid anymore in listen directives in smtpd.conf(5). Users are advised to replace existing listen secure directives with two separate tls and smtps listeners, i.e., a line like
listen on $iface secure pki $pki
has to be replaced with
listen on $iface tls pki $pki
listen on $iface smtps pki $pki
Relaying syntax is not affected by this change.

2017/07/18 - KARL: new config(8) needed

If you upgrade from source, changes in the kernel makefiles require you to compile and install a new config(8) binary before building a new kernel:
# cd /usr/src/usr.sbin/config
# make obj
# make && make install
In addition, you must issue make config:
# cd /sys/arch/$(machine)/compile/GENERIC.MP
# make obj
# make config
# make && make install
before installing and rebooting into the new kernel, otherwise the kernel relink by rc(8) will fail.

2017/07/20 - install.site and upgrade.site run later

The execution of the {install,upgrade}.site scripts in bsd.rd was postponed to the end of the installer script. If you use this functionality, make sure your script still works as expected. The script will now run after these steps:

2017/07/25 - hostname.if(5) changes

The keyword rtsol is no longer supported in hostname.if(5). Replace it with inet6 autoconf.

2017/07/26 - Add -Oz support to gcc

To save space on floppies built with clang, some Makefiles switched to using -Oz instead of -Os. If your last upgrade predates Jul 25, you need to build a new gcc that supports -Oz before doing make build:
# cd /usr/src/gnu/usr.bin/cc
# make obj
# make
# make install

2017/07/26 - amd64 and i386: switch to clang

The default compiler on the amd64 and i386 architectures is now clang. To update from source, the following steps are needed:
# cd /usr/src/share/mk && make install
# ln -f /usr/bin/clang /usr/bin/cc
# ln -f /usr/bin/clang++ /usr/bin/c++
Then build kernel and userland as usual.

2017/07/29 - amd64 and i386: update all packages

Ensure that all packages are updated to the new clang-compiled versions by forcing pkg_add(1) to reinstall them all:
pkg_add -D installed -u

2017/08/03 - pf.conf: icmp6-type notnbr-unr removed

Nearly 20 years ago RFC 1885 was obsoleted. Catch up by no longer supporting notnbr-unr (ICMP6_DST_UNREACH_NOTNEIGHBOR). The correct type is beyond-unr (ICMP6_DST_UNREACH_BEYONDSCOPE).

In pf.conf(5), notnbr-unr needs to be replaced with beyond-unr.

2017/08/09 - [ports] borgmatic updated

The configuration file changed from INI (/etc/borgmatic/config) to YAML (/etc/borgmatic/config.yaml) formatting. Please upgrade your existing config after updating your package:
upgrade-borgmatic-config

2017/08/12 - kernel build change

The kernel build infrastructure now depends on ctfstrip(1). The executable must be installed before building a kernel:
# cd /usr/src/usr.bin/ctfconv
# make obj
# make
# make install

2017/08/22 - [ports] CUPS binaries and manuals change

As of a couple of weeks ago, the CUPS binaries (lpr, lpq, lprm) are no longer symlinked into /usr/bin. If you want to use CUPS commands from the command line, you must now use the absolute path, e.g.:
$ /usr/local/bin/lpq
Running lpq without an absolute path would invoke the base lpq(1).

Similarly, to view a CUPS manual, you would use:

$ man -m /usr/local/man lpq
If you consistently use CUPS, you can add the following to your .kshrc to avoid the need to type an absolute path:
for i in lpq lpr lprm; do alias $i=/usr/local/bin/$i; done

2017/09/13 - [ports] Zarafa replaced with Kopano

Zarafa was replaced with Kopano and a manual update of configuration files is needed. Please read the Kopano pkg-readme as well as the official migration guide and the migration quick start for more details.
$OpenBSD: current.html,v 1.853 2017/09/15 17:28:56 tb Exp $