OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: kryptonian on October 08, 2023, 12:21:58 AM

Title: After using freebsd repos for pkg, pkg is borked [SOLVED]
Post by: kryptonian on October 08, 2023, 12:21:58 AM
Hey,

I know that I probably shouldn't have used freebsd repos, but it seems my pkg is no longer able to use the OPNsense repo, and some help would be appreciated as to how do I install the right pkg for OPNsense back or fix the repo definition.

(I needed the freebsd-update utility for jails)

Currently pkg update yields:

Updating OPNsense repository catalogue...
pkg: No SRV record found for the repo 'OPNsense'
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01   
pkg: packagesite URL error for pkg+https://opnsense.c0urier.net/FreeBSD:13:amd64/23.7/latest/packagesite.pkg -- pkg+:// implies SRV mirror type
pkg: packagesite URL error for pkg+https://opnsense.c0urier.net/FreeBSD:13:amd64/23.7/latest/packagesite.txz -- pkg+:// implies SRV mirror type
Unable to update repository OPNsense
Error updating repositories!
# pkg -v
1.20.6


OPNsense repo:

OPNsense: {
  fingerprints: "/usr/local/etc/pkg/fingerprints/OPNsense",
  url: "pkg+https://opnsense.c0urier.net/${ABI}/23.7/latest",
  signature_type: "fingerprints",
  mirror_type: "srv",
  priority: 11,
  enabled: yes
}
Title: Re: After using freebsd repos for pkg, pkg is borked
Post by: kryptonian on October 08, 2023, 12:53:35 AM
It seems I only had to uninstall the pkg and it would let me re-initalize it from the right repo.
Title: Re: After using freebsd repos for pkg, pkg is borked [SOLVED]
Post by: franco on October 10, 2023, 11:49:03 AM
Since quarterly packages were updated beginning of October consumers of the FreeBSD repo will receive this breakage now. Part of it seems to be a misunderstanding of how repo mirrors are described, but it's a bit impractical that it complains loudly when it hasn't before.

We will try to provide the right SRV record to fix this... reverting to another mirror type is impractical for a couple of reasons.


Cheers,
Franco
Title: Re: After using freebsd repos for pkg, pkg is borked [SOLVED]
Post by: Absolver on October 18, 2023, 02:37:46 AM
I've also run into this, but unfortunately the first thing enabling FreeBSD repo had me do was update pkg. And now I'm pretty much stuck, unable to downgrade pkg (it also wants to uninstall opnsense at the same time) and also unable to update anything from opnsense repos.

Is there a workaround for this until there's a permanent fix?
Title: Re: After using freebsd repos for pkg, pkg is borked [SOLVED]
Post by: newsense on October 18, 2023, 03:20:46 AM
Quote from: Absolver on October 18, 2023, 02:37:46 AM
I've also run into this, but unfortunately the first thing enabling FreeBSD repo had me do was update pkg. And now I'm pretty much stuck, unable to downgrade pkg (it also wants to uninstall opnsense at the same time) and also unable to update anything from opnsense repos.

Is there a workaround for this until there's a permanent fix?

fetch https://pkg.opnsense.org/FreeBSD:13:amd64/23.7/MINT/23.7.6/latest/All/pkg-1.19.2.pkg && pkg install -f pkg-1.19.2.pkg
Title: Re: After using freebsd repos for pkg, pkg is borked [SOLVED]
Post by: franco on October 18, 2023, 09:03:24 AM
> Is there a workaround for this until there's a permanent fix?

Now that the 23.10 business release is out we can start moving to the latest pkg version. But we still need to fix the SRV situation that the new version is complaining about now.


Cheers,
Franco
Title: Re: After using freebsd repos for pkg, pkg is borked [SOLVED]
Post by: franco on October 20, 2023, 12:18:57 PM
https://github.com/opnsense/core/commit/845ba727c81ce9300fa2a9aced282af39065e525