Is FreeBSD "pkg" command pointing to latest repository?

ikevin8me

Member


Messages: 53

#1
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!
 

Lamia

Active Member

Thanks: 23
Messages: 161

#4
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.
 

lebarondemerde

Daemon

Thanks: 688
Messages: 1,560

#5
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.
 

scottro

Daemon

Thanks: 418
Messages: 1,237

#7
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.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,329
Messages: 27,494

#8
You don't need to set the whole thing, just the URL is enough:
Code:
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}
The other values are taken from /etc/pkg/FreeBSD.conf (the two files are effectively merged).
 
Top