Bug 241919 - bsdinstall jail /path/to/jail creates 12.0-RELEASE jail instead of 12.1-RELEASE jail
Summary: bsdinstall jail /path/to/jail creates 12.0-RELEASE jail instead of 12.1-RELEA...
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-12 15:37 UTC by Marko Cupać
Modified: 2021-10-11 10:41 UTC (History)
1 user (show)

See Also:


Attachments
bsdinstall_log (2.98 KB, text/plain)
2019-11-12 15:37 UTC, Marko Cupać
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marko Cupać 2019-11-12 15:37:01 UTC
Created attachment 209103 [details]
bsdinstall_log

Hi,

since 12.0-RELEASE I have been using `bsdinstall jail /path/to/jail` in order to create jails. Jails created with this command on 12.0-RELEASE are the same release as host - 12.0-RELEASE. From this I concluded that, without additional switches, command creates jail of same release as host - similar to poudriere.

Since I upgraded to 12.1-RELEASE, this command creates 12.0-RELEASE jail.

/tmp/bsdinstall_log shows 12.1-RELEASE, but jail is actually 12.0-RELEASE.

Is this intended behaviour or a bug?
Comment 1 Christoph Schönweiler 2020-11-09 13:56:12 UTC
This is a bug. I have the same behavior here after an upgrade from 12.1 to 12.2.

After deleting the contents of /usr/freebsd-dist the creation of a new jail works again.

A check should be added, and if necessary new files should be downloaded.
Comment 2 Marko Cupać 2021-10-11 10:41:38 UTC
(In reply to Christoph Schönweiler from comment #1)

Hi,

I am working around this by creating subfolders under /usr/freebsd-dist:
- /usr/freebsd-dist/12_2:x86:64
- /usr/freebsd-dist/13_0:x86:64

...and creating .env files similar to:

# jailhost.example.org:/root/bsdinstall-12_2:x86:64.env
setenv BSDINSTALL_DISTSITE "https://download.freebsd.org/ftp/releases/amd64/amd64/12.2-RELEASE/"
setenv BSDINSTALL_DISTDIR "/usr/freebsd-dist/12_2:x86.64/"

# jailhost.example.org:/root/bsdinstall-13_0:x86:64.env
setenv BSDINSTALL_DISTSITE "https://download.freebsd.org/ftp/releases/amd64/amd64/13.0-RELEASE/"
setenv BSDINSTALL_DISTDIR "/usr/freebsd-dist/13_0:x86.64/"

Then I source them with `source /path/to/appropriate.env` before running bsdinstall.

As far as I am concerned this solves my problem so I'm closing this PR.