Discussion:
[self base packages] pkg: packages for wrong OS version:
(too old to reply)
Boris Samorodov
2018-01-10 18:29:04 UTC
Permalink
Hi All,

I use self built base packages. Seems that I have a problem with pkg.
Today I've got this:
===
% sudo pkg update -f
Updating FreeBSD-base repository catalogue...
Fetching meta.txz: 100% 268 B 0.3kB/s 00:01
Fetching packagesite.txz: 100% 29 KiB 29.4kB/s 00:01
Processing entries: 0%
pkg: Newer FreeBSD version for package FreeBSD-libulog:
- package: 1200055
- running kernel: 1200054
pkg: repository FreeBSD-base contains packages for wrong OS version:
FreeBSD:12:amd64
Processing entries: 100%
Unable to update repository FreeBSD-base
[...]

% uname -aKU
FreeBSD latt.bsnet 12.0-CURRENT FreeBSD 12.0-CURRENT #2 r327719: Tue Jan
9 14:32:13 MSK 2018
***@builder.bsnet:/usr/obj/usr/src/amd64.amd64/sys/PKG64X amd64
1200054 1200054

% pkg -v
1.10.4
===
--
WBR, bsam
Baptiste Daroussin
2018-01-10 18:53:37 UTC
Permalink
Post by Boris Samorodov
Hi All,
I use self built base packages. Seems that I have a problem with pkg.
===
% sudo pkg update -f
Updating FreeBSD-base repository catalogue...
Fetching meta.txz: 100% 268 B 0.3kB/s 00:01
Fetching packagesite.txz: 100% 29 KiB 29.4kB/s 00:01
Processing entries: 0%
- package: 1200055
- running kernel: 1200054
FreeBSD:12:amd64
Processing entries: 100%
Unable to update repository FreeBSD-base
[...]
% uname -aKU
FreeBSD latt.bsnet 12.0-CURRENT FreeBSD 12.0-CURRENT #2 r327719: Tue Jan
9 14:32:13 MSK 2018
1200054 1200054
% pkg -v
1.10.4
hum

pkg now has a mechanism to protect from installing too new package (aka packages
built on a more recent system than the system you are running on.

While this is great for ports this is a bit painful for upgrading base packages
when building on current

One has to specify pkg -o OSVERSION=1200055 to allow packages built on 1200055
to install on 1200054.

I need to figure out a mechanism to make this simpler to handle to upgrade of
base system while keeping this safety belt for users.

Any idea is welcome

Best regards,
Bapt
Boris Samorodov
2018-01-10 19:12:17 UTC
Permalink
Post by Baptiste Daroussin
Post by Boris Samorodov
Hi All,
I use self built base packages. Seems that I have a problem with pkg.
===
% sudo pkg update -f
Updating FreeBSD-base repository catalogue...
Fetching meta.txz: 100% 268 B 0.3kB/s 00:01
Fetching packagesite.txz: 100% 29 KiB 29.4kB/s 00:01
Processing entries: 0%
- package: 1200055
- running kernel: 1200054
FreeBSD:12:amd64
Processing entries: 100%
Unable to update repository FreeBSD-base
[...]
% uname -aKU
FreeBSD latt.bsnet 12.0-CURRENT FreeBSD 12.0-CURRENT #2 r327719: Tue Jan
9 14:32:13 MSK 2018
1200054 1200054
% pkg -v
1.10.4
hum
pkg now has a mechanism to protect from installing too new package (aka packages
built on a more recent system than the system you are running on.
While this is great for ports this is a bit painful for upgrading base packages
when building on current
One has to specify pkg -o OSVERSION=1200055 to allow packages built on 1200055
to install on 1200054.
Baptiste, thank you for the quick response!

The problem has been solved by:
% sudo pkg -o OSVERSION=1200055 update -r FreeBSD-base
Post by Baptiste Daroussin
I need to figure out a mechanism to make this simpler to handle to upgrade of
base system while keeping this safety belt for users.
Well, as for me, the above mentioned workaround is just fine.
Post by Baptiste Daroussin
Any idea is welcome
Best regards,
Bapt
--
WBR, bsam
David Chisnall
2018-01-11 14:13:34 UTC
Permalink
Post by Baptiste Daroussin
I need to figure out a mechanism to make this simpler to handle to upgrade of
base system while keeping this safety belt for users.
Any idea is welcome
I believe the apt approach to this is to have a different verb (distupgrade vs upgrade) to perform complete version upgrades. Ideally, the proper fix would probably be to depend on a base package version, rather than OSVERSION, and if the base packages are not being used to synthesise a phantom set of base package metadata based on OSVERSION.

David
Ian Lepore
2018-01-11 15:57:34 UTC
Permalink
Post by Baptiste Daroussin
Post by Boris Samorodov
Hi All,
I use self built base packages. Seems that I have a problem with pkg.
===
% sudo pkg update -f
Updating FreeBSD-base repository catalogue...
Fetching meta.txz: 100%    268 B   0.3kB/s    00:01
Fetching packagesite.txz: 100%   29 KiB  29.4kB/s    00:01
Processing entries:   0%
- package: 1200055
- running kernel: 1200054
FreeBSD:12:amd64
Processing entries: 100%
Unable to update repository FreeBSD-base
[...]
% uname -aKU
FreeBSD latt.bsnet 12.0-CURRENT FreeBSD 12.0-CURRENT #2 r327719: Tue Jan
 9 14:32:13 MSK 2018
1200054 1200054
% pkg -v
1.10.4
hum
pkg now has a mechanism to protect from installing too new package (aka packages
built on a more recent system than the system you are running on.
While this is great for ports this is a bit painful for upgrading base packages
when building on current
One has to specify pkg -o OSVERSION=1200055 to allow packages built on 1200055
to install on 1200054.
I need to figure out a mechanism to make this simpler to handle to upgrade of
base system while keeping this safety belt for users.
Any idea is welcome
Best regards,
Bapt
Is this new mechanism disabled if installing into something other than
the live system, such as when using -c or -r (and maybe -j)?

-- Ian
Baptiste Daroussin
2018-01-11 16:49:35 UTC
Permalink
Post by Ian Lepore
Post by Baptiste Daroussin
Post by Boris Samorodov
Hi All,
I use self built base packages. Seems that I have a problem with pkg.
===
% sudo pkg update -f
Updating FreeBSD-base repository catalogue...
Fetching meta.txz: 100%    268 B   0.3kB/s    00:01
Fetching packagesite.txz: 100%   29 KiB  29.4kB/s    00:01
Processing entries:   0%
- package: 1200055
- running kernel: 1200054
FreeBSD:12:amd64
Processing entries: 100%
Unable to update repository FreeBSD-base
[...]
% uname -aKU
FreeBSD latt.bsnet 12.0-CURRENT FreeBSD 12.0-CURRENT #2 r327719: Tue Jan
 9 14:32:13 MSK 2018
1200054 1200054
% pkg -v
1.10.4
hum
pkg now has a mechanism to protect from installing too new package (aka packages
built on a more recent system than the system you are running on.
While this is great for ports this is a bit painful for upgrading base packages
when building on current
One has to specify pkg -o OSVERSION=1200055 to allow packages built on 1200055
to install on 1200054.
I need to figure out a mechanism to make this simpler to handle to upgrade of
base system while keeping this safety belt for users.
Any idea is welcome
Best regards,
Bapt
Is this new mechanism disabled if installing into something other than
the live system, such as when using -c or -r (and maybe -j)?
The new mechanism grab the information from the files in the userland, meaning,
-c, -r and -j will discover the OSVERSION of the target binaries

Bapt
Ryan Stone
2018-01-18 16:32:26 UTC
Permalink
Post by Baptiste Daroussin
One has to specify pkg -o OSVERSION=1200055 to allow packages built on 1200055
to install on 1200054.
This workaround doesn't appear to work for pkg bootstrap:

# pkg -o OSVERSION=1200055 bootstrap
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from
pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/latest, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.10.4...
pkg-static: Newer FreeBSD version for package pkg:
- package: 1200055
- running kernel: 1200054

Failed to install the following 1 package(s): /tmp//pkg.txz.ngJJEM
Baptiste Daroussin
2018-01-18 17:00:44 UTC
Permalink
Post by Ryan Stone
Post by Baptiste Daroussin
One has to specify pkg -o OSVERSION=1200055 to allow packages built on 1200055
to install on 1200054.
# pkg -o OSVERSION=1200055 bootstrap
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from
pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/latest, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.10.4...
- package: 1200055
- running kernel: 1200054
Failed to install the following 1 package(s): /tmp//pkg.txz.ngJJEM
The bootstrap does not know about OSVERSION, but setting OSVERSION in your env
should fix it

Best regards,
Bapt

Continue reading on narkive:
Loading...