Is FreeBSD "pkg" command pointing to latest repository?

I'm trying to install the current latest version of JDK 8.

When I searched on "https://www.freebsd.org/ports/index.html", I found JDK 8 update 181. And, looking into the "Age" of the files, it was updated only 3 days ago.

However, when I search from within FreeBSD using pkg search, I could only see JDK 8 update 172.

When isn't pointing to the latest repository, and how to find out and change which repository it is pointing to?

Thanks!
 
Ports are more recent than pkgs. Pkgs are built quarterly. So if you want to get the 'latest' pkgs, you will need to fetch the 'lastest' ports (using portsnap etc) and build the ports into pkgs for yourself. That is the reason many people use Poudriere and the likes.

You may find the repo, where the FBSD ports are tests and you could use it for your latest pkgs. There are also tonnes of poudriere instances out there that you can use for free so long there are using bleeding edge ports.
 
When does the "latest" become the "quarterly"? And how do we know that?

Every three months as the name suggest. You can switch to the latest repository which is closer ( usually a few days behind ) of the ports.

Edit /usr/local/etc/pkg/repos/FreeBSD.conf:

Code:
FreeBSD: {
   url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
   mirror_type: "srv",
   signature_type: "fingerprints",
   fingerprints: "/usr/share/keys/pkg",
   enabled: no
}

Or install ports-mgmt/synth or ports-mgmt/poudriere, create and manage your own repository.
 
When isn't pointing to the latest repository, and how to find out and change which repository it is pointing to?
Run pkg -vv and you can see which repositories are enabled and where they are pointing to.
 
Unless you've created a repo, the default is /etc/pkg/FreeBSD.conf which points to quarterly. To make it the latest, manually create /usr/local/etc/pkg/repos/FreeBSD.conf to point to latest. The description has been given above, or just copy the /etc/pkg/FreeBSD.conf to it and change quarterly to latest.
 
Why is it preferred to make a local conf file instead of just editing /etc/pkg/FreeBSD.conf?

Not questioning it... you wouldn't have suggested if it there wasn't a good reason - just want to understand why.
 
Why is it preferred to make a local conf file instead of just editing /etc/pkg/FreeBSD.conf?
Because that file is part of the base system and will eventually be overwritten during a system upgrade. See also /usr/src/etc (assuming you have the source code installed).

This basically applies to every other config file out there as well, even /etc/crontab (it's much more preferably to set up a per-user cron job instead). And of course also external software which you installed either from ports or packages. This is also why you'd encounter an example config file at best in /usr/local/etc after installing software rather than a ready out-of-the-box config file. The example config files are going to be removed while you deinstall the software, but any of your manually set up configuration will always be left alone.
 
why was mysql repository removed ?

FreeBSD 14 Alpha 4
 
Back
Top