Solved nrpe3 bound to Perl 5.28 but Perl 5.30 is new default

Hello,

I was thinking about installing nrpe3 as a pkg, but I've noticed the pkg wants to install Perl 5.28. I have Perl 5.30 installed (and in use). Is there any way to tell pkg that Perl 5.30 is a good enough dependency?
I'll end up installing the port, if pkg does not allow a workaround…

thanks
 
You're mixing quarterly packages with latest ports. Either switch to the latest packages or use a quarterly ports tree. Either way mixing latest and quarterly is bound to create a whole bunch of weird dependency issues due to their differences.
 
hmmm Ok, this is odd, because I have:

Code:
$ cat /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  enabled: yes
}

Does /usr/local/etc/pkg/repos/FreeBSD.conf supersede /etc/pkg/FreeBSD.conf?
 
Does /usr/local/etc/pkg/repos/FreeBSD.conf supersede /etc/pkg/FreeBSD.conf?
It does, yes.

Then you should probably run pkg upgrade. The default Perl changed quite some time ago. Except on the quarterly package repositories as the change happened after 2019Q3 was branched off.
 
Ok, first run of pkg upgrade I have:

Code:
...
New packages to be INSTALLED:
    perl5.28: 5.28.2
...

But I guess it will conflict with my previously installed perl5.30. I need to find a corresponding test machine so I don't wreak havoc on prod.
 
Code:
# pkg -vv
Version                 : 1.12.0
PKG_DBDIR = "/var/db/pkg";
PKG_CACHEDIR = "/var/cache/pkg";
PORTSDIR = "/usr/ports";
INDEXDIR = "";
INDEXFILE = "INDEX-11";
HANDLE_RC_SCRIPTS = false;
DEFAULT_ALWAYS_YES = false;
ASSUME_ALWAYS_YES = false;
REPOS_DIR [
    "/etc/pkg/",
    "/usr/local/etc/pkg/repos/",
]
PLIST_KEYWORDS_DIR = "";
SYSLOG = true;
ABI = "FreeBSD:11:amd64";
ALTABI = "freebsd:11:x86:64";
DEVELOPER_MODE = false;
VULNXML_SITE = "http://vuxml.freebsd.org/freebsd/vuln.xml.bz2";
FETCH_RETRY = 3;
PKG_PLUGINS_DIR = "/usr/local/lib/pkg/";
PKG_ENABLE_PLUGINS = true;
PLUGINS [
]
DEBUG_SCRIPTS = false;
PLUGINS_CONF_DIR = "/usr/local/etc/pkg/";
PERMISSIVE = false;
REPO_AUTOUPDATE = true;
NAMESERVER = "";
HTTP_USER_AGENT = "pkg/1.12.0";
EVENT_PIPE = "";
FETCH_TIMEOUT = 30;
UNSET_TIMESTAMP = false;
SSH_RESTRICT_DIR = "";
PKG_ENV {
}
PKG_SSH_ARGS = "";
DEBUG_LEVEL = 0;
ALIAS {
    all-depends = "query %dn-%dv";
    annotations = "info -A";
    build-depends = "info -qd";
    download = "fetch";
    iinfo = "info -i -g -x";
    isearch = "search -i -g -x";
    leaf = "query -e \"%a == 0\" \"%n-%v\"";
    leaf = "query -e \"%a == 0\" \"%n-%v\"";
    list = "info -ql";
    origin = "info -qo";
    provided-depends = "info -qb";
    raw = "info -R";
    required-depends = "info -qr";
    shared-depends = "info -qB";
    show = "info -f -k";
    size = "info -sq";
}
CUDF_SOLVER = "";
SAT_SOLVER = "";
RUN_SCRIPTS = true;
CASE_SENSITIVE_MATCH = false;
LOCK_WAIT = 1;
LOCK_RETRIES = 5;
SQLITE_PROFILE = false;
WORKERS_COUNT = 0;
READ_LOCK = false;
PLIST_ACCEPT_DIRECTORIES = false;
IP_VERSION = 0;
AUTOMERGE = true;
VERSION_SOURCE = "";
CONSERVATIVE_UPGRADE = true;
PKG_CREATE_VERBOSE = false;
AUTOCLEAN = false;
DOT_FILE = "";
REPOSITORIES {
}
VALID_URL_SCHEME [
    "pkg+http",
    "pkg+https",
    "https",
    "http",
    "file",
    "ssh",
    "ftp",
    "ftps",
    "pkg+ssh",
    "pkg+ftp",
    "pkg+ftps",
]
ALLOW_BASE_SHLIBS = false;
WARN_SIZE_LIMIT = 1048576;
METALOG = "";
OSVERSION = 1103000;
IGNORE_OSVERSION = false;


Repositories:
  FreeBSD: {
    url             : "pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/latest",
    enabled         : yes,
    priority        : 0,
    mirror_type     : "SRV",
    signature_type  : "FINGERPRINTS",
    fingerprints    : "/usr/share/keys/pkg"
  }

(and I was wrong, it wont detect perl5.30 as a conflict)
 
I've attempted the same thing on a 11.2-RELEASE that have a port tree synced via portsnap but which is in perl5.28. It was happily upgraded to perl5.30.
I've switched my current server (11.3-RELEASE) from svnlite management of /usr/ports to portsnap and it approximately worked:
it still said it would install perl5.28 but it actually didn't do it. May be a cache issue but it looks like the problem is solved.
I've rolled my VM snapshot back, because prod, but I'll schedule a full OS+pkg upgrade ASAP and I'm switching to portsnap now… unless you tell me it's not the proper solution :)
 
Note that the version of FreeBSD itself has nothing to do with this. But you should upgrade it anyway because 11.2 will be EoL some time soon.

And you appear to have a few servers running FreeBSD, and so I would recommend setting up your own repository. This is quite easy to do. The upshot of this is that everything will come from your own repository and you can therefor assure everything is the same. Because you build your own packages you can set all the defaults you want. This will also solve the dependencies issues you will inevitably get when you try to mix packages and ports.
 
I could setup a dedicated repo but unfortunately I'm not sure it will solve my issue.
In the meantime I've found another server (at home this one) running 12-RELEASE, same /usr/local/etc/pkg/repos/FreeBSD.conf as above, port tree updated with portsnap: it also tells me it want to install perl5.28 so I guess using svnlite or portsnap to update the port tree has the same effect:

Code:
# pkg upgrade p5-Archive-Zip
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    perl5.28: 5.28.2

Installed packages to be UPGRADED:
    p5-Archive-Zip: 1.65 -> 1.66

Number of packages to be installed: 1
Number of packages to be upgraded: 1
...

But I have 5.30…
Code:
# pkg version -v |grep perl5
perl5-5.30.0                       =   up-to-date with index

Odd: upgrading all pkgs at once did not propose to install perl5.28 and reinstalled pkg-1.12.0. In the end perl was untouched and every pkg was upgraded. On this machine if I try to install nrpe3, it does not prompt me to install perl5.28 like it did before the whole upgrade.

Lets say it's solved and I'm going to have to pkg upgrade all the things before trying to install nrpe3 :)

thanks
 
Ok, I've finally tried the process on a prod server: it fails with grandeur. It installed perl 5.28 alongside with already installed perl 5.30 and I guess it totally messed-up with dependencies:

Code:
# pkg install nrpe3
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 4 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    nrpe3: 3.2.1
    nagios-plugins: 2.2.1_8,1
    spamassassin: 3.4.2_3      <--- WHAT ???
    perl5.28: 5.28.2

Number of packages to be installed: 4

The process will require 65 MiB more space.
429 KiB to be downloaded.
...

I had spamassassin installed via ports (different options), removed it, and now it appears that my whole dependency tree is broken. If I try to re-install any Perl module, I got this kind of things:

Code:
# pkg upgrade -f p5-MIME-Types-2.17
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 3 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    spamassassin: 3.4.2_3
    perl5.28: 5.28.2

Installed packages to be REINSTALLED:
    p5-MIME-Types-2.17
...

I've finally identified the pkg that what requiring Perl 5.28 -> the deprecated p5-Geo-IP-1.51 that I've removed, and now I'm no longer prompted to install the old Perl. But spamassassin is still a dependency for anything Perl related.

Nevermind, this one is on me (the spamassassin glitch). The true problem was p5-Geo-IP-1.51, now everything is fixed.
 
Back
Top