# pkg fails to find net/openntpd although PortsMon lists packages



## qwrtz (Dec 22, 2016)

Hi all,

I've taken a long break from FreeBSD so I'm fairly new to pkgng binary packages (and these forums...).

On an 11.0R install I'm trying to install net/openntpd via `pkg`. I have run `pkg update` to perform the initial bootstrap which went fine. I have successfully installed other packages but net/openntpd cannot be found.

```
# pkg install openntpd
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
pkg: No packages available to install matching 'openntpd' have been found in the repositories
# pkg search ntpd
#
```
I have seen Thread 58051 but unfortunately I cannot build ports from source on this machine. However, FreshPorts no longer lists the port as ignored and PortsMon shows no build errors and lists binary packages for my architecture (i386) so I believe the package should be installable.

Any ideas why `pkg install openntpd` fails regardless?

TIA,
q.


----------



## ASX (Dec 22, 2016)

qwrtz said:


> Any ideas why  pkg install openntpd fails regardless?


Most likely your system is configured to use the "quarterly" repository, (which is the default since 10.2), while openntpd package is available from ports head branch and the related "latest" repository.

You can switch your system to use the "latest" repository by adding the following file, which will override the default:
/usr/local/etc/pkg/repos/FreeBSD.conf

```
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  prority = 0,
  enabled = yes,
}
```
After applying the changes re run `pkg update`

The default repository is set in /etc/pkg/FreeBSD.conf and that file should not be changed.


----------



## qwrtz (Dec 22, 2016)

ASX said:


> Most likely your system is configured to use the "quarterly" repository, (which is the default since 10.2), while openntpd package is available from ports head branch and the related "latest" repository.



Thanks for the suggestion! I had not tried that since PortsMon also lists binary packages for the "quarterly" "build environment". Thus, it leaves me a little puzzled but with the "latest" repository enabled `pkg search` now indeed finds net/openntpd. I'll try the actual installation tomorrow and report how that went.

Isn't the repository configuration file incomplete, though? Shouldn't it include the "signature_type" and "fingerprints" fields, too? I.e.:

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

Cheers,
q.


----------



## ASX (Dec 22, 2016)

qwrtz said:


> sn't the repository configuration file incomplete, though? Shouldn't it include the "signature_type" and "fingerprints" fields, too?


May be, not sure because I'm using exclusively ports from some time.
I copied what I set up on my system, but it was some time ago ... as far as I remeber it worked that way.

EDIT: I meant to say, entirely possible I did that setup and later it was never used it really.


----------



## tobik@ (Dec 22, 2016)

qwrtz said:


> Isn't the repository configuration file incomplete, though? Shouldn't it include the "signature_type" and "fingerprints" fields, too? I.e.:


No, this is correct. Repositories with the same name (not based on the filename but the name given as the first key in the repository config, in this case also FreeBSD) will be merged. `pkg` first reads the files in /etc/pkg/ and will merge it with the files in /usr/local/etc/pkg/repos/. Missing keys in /usr/local/etc/pkg/repos/FreeBSD.conf will be set to whatever is in /etc/pkg/FreeBSD.conf.

ASX even set more keys than necessary, you only really need to override url if you want to switch to the latest repository.


----------



## qwrtz (Dec 23, 2016)

qwrtz said:


> I'll try the actual installation tomorrow and report how that went.



I can confirm that net/openntpd installed fine from the "latest" repository and is now happily serving time on my network. Thanks everyone!

Cheers,
q.


----------

