Bug 264075 - freebsd-update in 13.1-RELEASE detects an installed kernel when it shouldn't
Summary: freebsd-update in 13.1-RELEASE detects an installed kernel when it shouldn't
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 13.1-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks: 264030
  Show dependency treegraph
 
Reported: 2022-05-18 20:51 UTC by Brian
Modified: 2023-09-27 22:37 UTC (History)
3 users (show)

See Also:
koobs: maintainer-feedback? (cperciva)
koobs: mfc-stable13?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian 2022-05-18 20:51:20 UTC
Normally when running freebsd-update on a jail using the -b switch it should not detect a kernel in that folder (because there isn't one). However, the version of freebsd-update in 13.1-RELEASE detects a kernel and wants to install files to /boot/kernel in the jail.

Steps to reproduce:
1.) Install FreeBSD 13.1-RELEASE (Reproduced this on both ARM and AMD64)
2.) Create a folder and extract an older version of base.txz to it, for example the base.txz from 13.0-RELEASE
3.) freebsd-update -b /path/to/the/jail --currently-running 13.0-RELEASE -r 13.1-RELEASE
4.) freebsd-update will detect world/base as it should but also detects kernel/generic even though a kernel was not installed to the folder. This behavior did not happen on older versions of freebsd-update.
5.) Unless you don't mind it installing files to /boot/kernel in each jail, you need to use a separate freebsd-update.conf file with the components line set to  "world" and omit the "kernel"
Comment 1 Ed Maste freebsd_committer freebsd_triage 2023-09-27 20:36:45 UTC
I presume "upgrade" is missing from step 3 in your reproduction steps.

Using freebsd-update from main,

# ./freebsd-update -b /root/13.1/ --currently-running 13.1-RELEASE
-r 13.2-RELEASE upgrade
Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 13.1-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 2 metadata patches.. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic world/base

The following components of FreeBSD do not seem to be installed:
kernel/generic-dbg world/base-dbg world/lib32 world/lib32-dbg

Does this look reasonable (y/n)? 

> Normally when running freebsd-update on a jail using the -b switch it should
> not detect a kernel in that folder (because there isn't one). However, the
> version of freebsd-update in 13.1-RELEASE detects a kernel and wants to
> install files to /boot/kernel in the jail.

I believe the claim here is that this is a regression, but I didn't see any recent changes that would be obviously responsible for this. Which version worked correctly for this case, in your experience?