On 2019-11-22, mabi <m...@protonmail.ch> wrote:
> Hi,
>
> I just tried out sysupgrade on one of my OpenBSD 6.5 servers in order to 
> upgrade automatically to 6.6 but unfortunately it failed at the comp66.tgz 
> and rebooted (upgrade log below).
>
> It looks like I am now running a half-upgraded hybrid OpenBSD 6.5/6.6 system. 
> It also didn't manage to relink the kernel after reboot (log file below).
>
> So I was wondering if anyone had any recommendations or insights to my 
> following points:
>
> - reason why it failed?

A combination of things:

- You didn't install the comp set before

- syspatch65-003_mds.tgz resulted in minor breakage if comp wasn't
installed (the problem was in syspatch generation and has since been
rectified) - /usr/include/machine is meant to be a symlink to the
arch name e.g.

$ ls -l /usr/include/machine
lrwxr-xr-x  1 root  bin  5 Nov 15 18:18 /usr/include/machine -> amd64

$ tar tvzf syspatch65-003_mds.tgz | grep usr/include
-r--r--r--  1 root     bin           2933 May 27 15:44 
usr/include/amd64/codepatch.h
-r--r--r--  1 root     bin          13210 May 27 15:44 usr/include/amd64/cpu.h
-r--r--r--  1 root     bin           2467 May 27 15:44 
usr/include/amd64/cpu_full.h
-r--r--r--  1 root     bin          56044 May 27 15:44 
usr/include/amd64/specialreg.h
-r--r--r--  1 root     bin          27384 May 27 15:44 
usr/include/amd64/vmmvar.h
-r--r--r--  1 root     bin           2933 May 27 15:44 
usr/include/machine/codepatch.h
-r--r--r--  1 root     bin          13210 May 27 15:44 usr/include/machine/cpu.h
-r--r--r--  1 root     bin           2467 May 27 15:44 
usr/include/machine/cpu_full.h
-r--r--r--  1 root     bin          56044 May 27 15:44 
usr/include/machine/specialreg.h
-r--r--r--  1 root     bin          27384 May 27 15:44 
usr/include/machine/vmmvar.h

Here is an example in the same dir built with the fixed process:

$ tar tvzf syspatch65-008_swapgs.tgz | grep usr/include
-r--r--r--  1 root     bin           3456 Aug  8 14:37 
usr/include/amd64/codepatch.h
-r--r--r--  1 root     bin           3859 Aug  8 14:37 
usr/include/amd64/frameasm.h



> - what should I do now? retry to upgrade with sysupgrade?
> - re-install the whole system?

rm -r /usr/include/machine and run the upgrade again.

If you want to use sysupgrade again for this, edit the script and force
NEXT_VERSION=6.6.

Otherwise boot bsd.rd and do it by hand - select "upgrade" and select all sets.

> - maybe sysupgrade needs to be patched to avoid this issue?

It _could_ be patched to do this ..

[ -d /usr/include/machine ] && rm -r /usr/include/machine

Though the problem also affects people who don't use sysupgrade,
modifying the installer is needed to fix things in that case e.g.
this would do the trick

Index: install.sub
===================================================================
RCS file: /cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.1145
diff -u -p -r1.1145 install.sub
--- install.sub 19 Oct 2019 13:14:23 -0000      1.1145
+++ install.sub 22 Nov 2019 10:44:29 -0000
@@ -1660,7 +1660,7 @@ install_files() {
                fi
                if isin comp$VERSION.tgz $_get_sets; then
                        rm -rf /mnt/usr/lib/{gcc-lib,clang}
-                       rm -rf /mnt/usr/include/g++
+                       rm -rf /mnt/usr/include/*
                fi
                rm -rf /mnt/var/syspatch/*
        fi


Reply via email to