Package version mismatch - grub2-bhyve

Hi everyone,

First post here - so I'm hopeful I'm for some help!

I have two FreeBSD servers running Rel 12, following output is identical on both:

Code:
# uname -a
FreeBSD <server-name> 12.0-RELEASE-p3 FreeBSD 12.0-RELEASE-p3 GENERIC  amd64
# freebsd-version
12.0-RELEASE-p3

Both systems have the package grub2-bhyve installed - I ran pkg update on both systems, after which I ran pkg upgrade (just to see the list of packages that would be upgraded, did not actually install).
On both servers the grub2-bhyve package in not listed, so presumably both are up to date.

I noted that on one system, the package behaved as expected, whereas on the other it did not. I came across the following error:

Code:
/usr/local/sbin/grub-bhyve -c /dev/nmdm-sles-test.1A -m /vm/sles-test/device.map -M 4G -r host -d /vm/sles-test sles-test
ld-elf.so.1: /lib/libc.so.7: version FBSD_1.6 required by /usr/local/sbin/grub-bhyve not found

The libc version on both systems are identical (and was also not listed in pkg upgrade output, so both are up to date), but /usr/local/sbin/grub-bhyve had different sizes. Copying this file from the working system to the other, the above error disappeared & it started working as expected.

Looking closer at the installed grub2-bhyve package on each system:

Working:
Code:
# pkg info -f grub2-bhyve
grub2-bhyve-0.40_8
Name           : grub2-bhyve
Version        : 0.40_8
Installed on   : Sat Jan 16 20:25:07 2021 UTC
Origin         : sysutils/grub2-bhyve
Architecture   : FreeBSD:12:amd64
Prefix         : /usr/local
Categories     : sysutils
Licenses       : GPLv3
Maintainer     : [EMAIL]ports@FreeBSD.org[/EMAIL]
WWW            : [URL]https://github.com/grehan-freebsd/grub2-bhyve[/URL]
Comment        : Grub-emu loader for bhyve
Annotations    :
    FreeBSD_version: [B]1201000[/B]
    repo_type      : binary
    repository     : FreeBSD
Flat size      : [B]1.43MiB[/B]
Description    :
GNU GRUB is a multiboot boot loader.  It was derived from GRUB, the GRand
Unified Bootloader, which was originally designed and implemented by Erich
Stefan Boleyn.

This port builds the grub-bhyve binary, allowing booting of non-FreeBSD
operating systems in bhyve.

WWW: [URL]https://github.com/grehan-freebsd/grub2-bhyve[/URL]

Broken:
Code:
#  pkg info -f grub2-bhyve
grub2-bhyve-0.40_8
Name           : grub2-bhyve
Version        : 0.40_8
Installed on   : Sat Apr 17 12:37:26 2021 UTC
Origin         : sysutils/grub2-bhyve
Architecture   : FreeBSD:12:amd64
Prefix         : /usr/local
Categories     : sysutils
Licenses       : GPLv3
Maintainer     : [EMAIL]ports@FreeBSD.org[/EMAIL]
WWW            : [URL]https://github.com/grehan-freebsd/grub2-bhyve[/URL]
Comment        : Grub-emu loader for bhyve
Annotations    :
    FreeBSD_version: [B]1202000[/B]
    repo_type      : binary
    repository     : FreeBSD
Flat size      : [B]1.04MiB[/B]
Description    :
GNU GRUB is a multiboot boot loader.  It was derived from GRUB, the GRand
Unified Bootloader, which was originally designed and implemented by Erich
Stefan Boleyn.

This port builds the grub-bhyve binary, allowing booting of non-FreeBSD
operating systems in bhyve.

WWW: [URL]https://github.com/grehan-freebsd/grub2-bhyve[/URL]

So in both cases the package version is 0.40_8, but the content differs. I note the FreeBSD version listed in each package has a different value.

From https://docs.freebsd.org/en_US.ISO8859-1/books/porters-handbook/versions-12.html

1201000352546September 20, 2019releng/12.1 branched from stable/12@r352480.
1202000365618September 11, 2020releng/12.2 branched from stable/12@r365618.

So it looks like I have different FreeBSD versions after all?


Looking at the cached packages:

Working:
Code:
# ls -l /var/cache/pkg/grub2-bhyve-0.40_8*
lrwxr-xr-x 1 root wheel     33 Jan 16 20:24 /var/cache/pkg/grub2-bhyve-0.40_8.txz -> grub2-bhyve-0.40_8~7f55bd360d.txz
-rw-r--r-- 1 root wheel 419304 Dec 11 02:30 /var/cache/pkg/grub2-bhyve-0.40_8~7f55bd360d.txz

Broken:
Code:
# ls -l /var/cache/pkg/grub2-bhyve-0.40_8*
lrwxr-xr-x 1 root wheel     33 Apr 17 12:37 /var/cache/pkg/grub2-bhyve-0.40_8.txz -> grub2-bhyve-0.40_8~964ae8008b.txz
-rw-r--r-- 1 root wheel 478084 Apr  9 04:28 /var/cache/pkg/grub2-bhyve-0.40_8~964ae8008b.txz

So, the questions are:

- how could the 'broken' system get into this state?
- how can I 'repair' the 'broken' system so pkg pulls matching versions of grub2-bhyve and libc?

Many thanks for any pointers!
Fred
 
Last edited by a moderator:
how could the 'broken' system get into this state?
FreeBSD 12.0 is end-of-life since February 2020 and not supported anymore. Packages are built for supported versions, that's 12.2 at this time.

how can I 'repair' the 'broken' system so pkg pulls matching versions of grub2-bhyve and libc?
Upgrade to 12.2-RELEASE.

 
Back
Top