Active OpenBSD development is known as the -current branch. These sources are frequently compiled into releases known as snapshots.
Aggressive changes are sometimes pushed in this branch, and complications can arise when building the latest code or upgrading from a previous point in time. Some of the steps for getting over these hurdles are explained on this page. Make sure you've read and understand how to build the system from source before using -current and the instructions below.
In general, it's far easier to use snapshots, as developers will have gone through much of the trouble for you already.
You should always use a snapshot as the starting point for running -current. This process typically consists of downloading (and verifying) the appropriate bsd.rd file from the /snapshots/ directory of your preferred mirror, booting from it, and choosing (U)pgrade at the prompt. Any installed packages should then be upgraded after booting into the new system.
Upgrading to -current by compiling your own source code is not supported.
Most of these changes will have to be performed as root.
# cd /usr/src && make includes # cd /usr/src/sbin/pfctl && make clean && make && make install # cd /usr/src/usr.sbin/authpf && make clean && make && make install # cd /usr/src/usr.sbin/ftp-proxy && make clean && make && make install # cd /usr/src/usr.sbin/relayd && make clean && make && make install # cd /usr/src/usr.sbin/tftp-proxy && make clean && make && make install
must be changed to:listen on * port 80 listen on :: port 80
listen on * port 80
After updating follow the instructions in /usr/local/share/doc/kc/Changelog.$ kc -k ~/.kc/default.kcd Password: <example_chain% > dump kcdump Dump OK <example_chain% > quit
If using the module for Apache httpd, update the symlink for /var/www/conf/modules/php.conf as shown in the pkg-readme.# rcctl disable php56_fpm; rcctl enable php70_fpm # rcctl stop php56_fpm; rcctl start php70_fpm
The change is mostly mechanical and requires splitting current rules into actions and matching patterns, examples are available in the man page.
Authenticated users are no longer considered as local users, if your configuration file allows remote users to authenticate and send mail, an explicit rule must be written to match these.
smtpd(8) supported LMTP both as a relaying protocol and as a local delivery method. The local delivery method was implemented within the daemon and not as an MDA, it no longer does and must be used through the 'mda' action:
The mail.lmtp(8) MDA provides all the features that used to be supported interally by smtpd(8).action lmtp-local mda "/usr/libexec/mail.lmtp [...]"
The grammar has been extended to provide an LMTP action hiding the details behind the mail.lmtp(8) MDA. The LMTP action is documented in smtpd.conf(5) and looks as follow:action lmtp-local mda "/usr/libexec/mail.lmtp [...]"
In addition, the unix: and inet: prefixes which were used in LMTP destinations to distinguish between a UNIX socket or a network socket have been removed.action lmtp-local lmtp localhost:25
The keyword brought no value and was dropped in favor of component namespaces:set queue compression set mta max-deferred 100
In addition, the 'limit' option which could be used with mta:queue compression mta max-deferred 100
is now an option within the 'mta' namespace:limit mta session-transaction-delay 0
mta limit session-transaction-delay 0
Finer-grained controls are available using mixerctl(1) which allows setting record.enable for each mixer device to off (always off), on (always on), or sysctl (default: follow state of the kern.audio.record sysctl).# sysctl kern.audio.record=1 # enable at runtime # echo kern.audio.record=1 >> /etc/sysctl.conf # set at boot
$ echo 'int main() {return 0;}' | cc -fno-ret-protector -x c -
If there is no error in the output, then proceed with a normal source
upgrade as usual.
If the output includes the error
cc: error: unknown argument: '-fno-ret-protector'
then follow the procedure below.
# cd /usr/src/gnu/usr.bin/clang # sed -i.head s/-fno-ret-protector/'#-fno-ret-protector'/ Makefile.inc
# cd /usr/src/gnu/usr.bin/clang # make # make install
# cd /usr/src/gnu/usr.bin/clang # mv Makefile.inc.head Makefile.inc
The following configuration directives have been deprecated (but will be accepted for backwards compatibility) announce all, announce none, and announce default-route. Furthermore the announce self directive has been removed. Explicit use of announce self will result in a syntax error preventing bgpd(8) from starting. Users are advised to review and update /etc/bgpd.conf before upgrading.
It is possible to write configuration files that are valid and functionally the same both before and after the update.
Before updating:
# bgpd -nvf /etc/bgpd.conf | grep -B4 'announce self'
After:
location "/.well-known/acme-challenge/*" {
root "/acme"
request strip 2
}
Upstream renamed buildslave to buildbot-worker a while ago. Accordingly, the buildslave rc script was renamed to buildbot_worker. You need to adjust the list of daemons:
Make sure to stop any running buildslave instances before upgrading, otherwise rc.d(8) will lose track of the process.# rcctl disable buildslave # rcctl enable buildbot_worker
toroute add -inet6 -prefixlen 56 2001:db8:: ::1 -blackhole
Otherwise, a route for 2001:db8::/64 would be installed as the address string comes last for which a default prefix length of 64 is currently implied. It is best to use proper CIDR notation.route add -inet6 2001:db8:: -prefixlen 56 ::1 -blackhole
route add -inet6 2001:db8::/56 ::1 -blackhole
Delete the _btd user and group and run sysmerge again:[...] running rc.sysmerge **** Not adding group _rad, GID 94 already exists **** Not adding user _rad, UID 94 already exists
# userdel _btd # groupdel _btd # sysmerge
nwid mynwid wpakey mywpakey
Despite the manual page already stating correct behaviour, a route different from the specified destination string would be installed:
This behaviour was deprecated in 2003 by RFC 3587 and has now been fixed to take an host address as is:# route add 2001:db8:: ::1 add net 2001:db8::: gateway ::1 # route show -inet6 | grep 2001:db8 2001:db8::/64 localhost UGS 0 0 32768 8 lo0
2001:db8:: localhost UGHS 0 0 32768 8 lo0
If you are running rtadvd(8) for IPv6 router advertisements, please switch to rad(8). First create a /etc/rad.conf configuration file. For example, when you had rtadvd_flags=em0 in /etc/rc.conf.local, /etc/rad.conf would be:# userdel _rtadvd # groupdel _rtadvd # rm /etc/rc.d/rtadvd /usr/sbin/rtadvd /usr/share/man/man5/rtadvd.conf.5 /usr/share/man/man8/rtadvd.8
For more advanced configurations consult rad.conf(5). With the /etc/rad.conf file in place you can stop rtadvd(8) and start rad(8):interface em0
# rcctl stop rtadvd # rcctl disable rtadvd # rcctl enable rad # rcctl start rad
The armv7 platform was switched to install lld as the default linker. To complete the switch on that platform, build the system from source twice.# cd /usr/src/share/mk # make install
This is probably simpler than deleting the old cookie, generating a new one and installing it to all appropriate locations.$ mkdir -p ~/.sndio $ mv ~/.aucat_cookie ~/.sndio/cookie
# rm /dev/audio /dev/audioctl
Before updating, use "pfctl -s queue". If you have no output or a list of queues, you should not be affected by this. If you see the following error, adjust your pf.conf(5) accordingly:
Normally you can just specify the relevant interface name, but if you are trying to use interface groups to allow use of the same pf.conf file on multiple systems which have different interface types, you might like to define macros in a separate file that can be different on each system (sharing a common pf.conf):# pfctl -s queue pfctl: DIOCGETQSTATS: Bad file descriptor
$ cat /etc/pf.conf.local egress_if = ix0 $ cat /etc/pf.conf include "/etc/pf.conf.local" queue rootq on $egress_if bandwidth 1G default [...]
The first two set the logging of host checks to either changes in host state only or all check results, and replace log updates and log all. The third option controls connection logging in relays which, until now, was a side effect of log updates. The optional errors will cause only failed connections to be logged.log state changes log host checks log connection [errors]
Use of the old options will result in a warning message and they will be removed in OpenBSD 6.5.
When neitherroute add [-net] 192.0.2.0/24 ... route add [-net] 192.0.2.0 -netmask 255.255.255.0 ... route add -inet [-net] 192.0.2.0 -prefixlen 24 ...
-net nor -netmask nor
-prefixlen is given, -host is now assumed.