make minor & major version upgrades easy#2674
Merged
Merged
Conversation
This simplifies base system package upgrades enormously for the bulk of users, who have not configured custom repositories: pkg -o VERSION_MINOR=1 upgrade -r FreeBSD-base Allows a user to go from 15.0-RELEASE to 15.1.
Contributor
Author
|
I will add a test & docs today |
Contributor
Author
|
example upgrade: |
Contributor
|
I haven't looked at the patch yet but that workflow looks great to me! |
Contributor
|
Not sure if that helps but these methods worked for me: Regards, |
grahamperrin
suggested changes
May 13, 2026
Comment on lines
+220
to
+223
| To upgrade base system packages from 15.0-RELEASE to 15.1-RELEASE using | ||
| the FreeBSD-base repository: | ||
| .Pp | ||
| .Dl pkg -o VERSION_MINOR=1 upgrade -r FreeBSD-base |
Contributor
There was a problem hiding this comment.
Suggested change
| To upgrade base system packages from 15.0-RELEASE to 15.1-RELEASE using | |
| the FreeBSD-base repository: | |
| .Pp | |
| .Dl pkg -o VERSION_MINOR=1 upgrade -r FreeBSD-base | |
| To upgrade the base system and non-base kernel modules from 15.0-RELEASE | |
| to 15.1-RELEASE: | |
| .Pp | |
| .Dl pkg -o VERSION_MINOR=1 upgrade -r FreeBSD-base -r FreeBSD-ports-kmods |
The word packages is superfluous (from the Description and other parts of the page, it's clear enough that packages are involved).
Contributor
There was a problem hiding this comment.
This one does not upgdade from 15.0 to 15.1 ...
root@freebsd:~ # pkg -o VERSION_MINOR=1 upgrade -r FreeBSD-base
Updating FreeBSD-base repository catalogue...
pkg: Repository FreeBSD-base has a wrong packagesite, need to re-create database
Fetching meta.conf: 100% 179 B 0.2kB/s 00:01
Fetching data.pkg: 100% 80 KiB 82.2kB/s 00:01
Processing entries: 100%
FreeBSD-base repository update completed. 496 packages processed.
FreeBSD-base is up to date.
Checking for upgrades (22 candidates): 100%
Processing candidates (22 candidates): 100%
The following 22 package(s) will be affected (of 0 checked):
Installed packages to be UPGRADED:
FreeBSD-blocklist: 15.0 -> 15.0p3 [FreeBSD-base]
FreeBSD-clibs-dev: 15.0 -> 15.0p6 [FreeBSD-base]
FreeBSD-devmatch: 15.0 -> 15.0p2 [FreeBSD-base]
FreeBSD-dhclient: 15.0 -> 15.0p8 [FreeBSD-base]
FreeBSD-kernel-generic: 15.0 -> 15.0p8 [FreeBSD-base]
FreeBSD-librpcsec_gss: 15.0 -> 15.0p5 [FreeBSD-base]
FreeBSD-librpcsec_gss-dev: 15.0 -> 15.0p5 [FreeBSD-base]
FreeBSD-librpcsec_gss-dev-lib32: 15.0 -> 15.0p5 [FreeBSD-base]
FreeBSD-librpcsec_gss-lib32: 15.0 -> 15.0p5 [FreeBSD-base]
FreeBSD-openssl: 15.0 -> 15.0p2 [FreeBSD-base]
FreeBSD-openssl-dev: 15.0 -> 15.0p2 [FreeBSD-base]
FreeBSD-openssl-dev-lib32: 15.0 -> 15.0p2 [FreeBSD-base]
FreeBSD-openssl-lib: 15.0 -> 15.0p2 [FreeBSD-base]
FreeBSD-openssl-lib32: 15.0 -> 15.0p2 [FreeBSD-base]
FreeBSD-pf: 15.0 -> 15.0p5 [FreeBSD-base]
FreeBSD-rescue: 15.0 -> 15.0p8 [FreeBSD-base]
FreeBSD-runtime: 15.0 -> 15.0p8 [FreeBSD-base]
FreeBSD-runtime-dev: 15.0 -> 15.0p7 [FreeBSD-base]
FreeBSD-runtime-dev-lib32: 15.0 -> 15.0p7 [FreeBSD-base]
FreeBSD-runtime-lib32: 15.0 -> 15.0p7 [FreeBSD-base]
FreeBSD-utilities: 15.0 -> 15.0p1 [FreeBSD-base]
FreeBSD-zoneinfo: 15.0 -> 15.0p7 [FreeBSD-base]
Number of packages to be upgraded: 22
115 MiB to be downloaded.
Comment on lines
+227
to
+228
| variable used in repository URL expansion, allowing the repository URL | ||
| to resolve to the 15.1 package set. |
Contributor
There was a problem hiding this comment.
Suggested change
| variable used in repository URL expansion, allowing the repository URL | |
| to resolve to the 15.1 package set. | |
| variable used in repository URL expansion, allowing use of the repos | |
| for 15.1. |
Contributor
Author
|
@vermaden AFAICT it works here: If this still fails for you, lets move it to a new issue and add me. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This simplifies base system package upgrades enormously for the
bulk of users, who have not configured custom repositories, and
makes intuitive use of the obvious VERSION_MINOR var found in both
/etc/pkg/FreeBSD.confand/usr/local/etc/pkg.confto allowthe user to go from 15.0-RELEASE to 15.1, and in future to 16.0:
Alternatively, we could allow OSVERSION by itself to assume same
ABI as the running system, but this requires users to figure out
what OSVERSION should be, and isn't as nice for major version
upgrades.