From 369cc381e6812af9711a98fc965e41d9809ea579 Mon Sep 17 00:00:00 2001 From: Bernhard Frauendienst Date: Mon, 4 Nov 2019 21:07:00 +0100 Subject: [PATCH 1/2] Use the correct prefix for pear on FreeBSD As of 2018-03-08, pear is flavored/prefixed in FreeBSD[1]. Remove the special handling and use the configured prefix as for most other distributions. [1] See UPDATING note e.g. on https://www.freshports.org/devel/pear/ --- manifests/pear.pp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/manifests/pear.pp b/manifests/pear.pp index cf51b4b8..6c3cd52c 100644 --- a/manifests/pear.pp +++ b/manifests/pear.pp @@ -33,10 +33,6 @@ # even though others are called 'php5-fpm' or 'php5-dev' $package_name = "php-${php::params::pear_package_suffix}" } - 'FreeBSD': { - # On FreeBSD the package name is just 'pear'. - $package_name = $php::params::pear_package_suffix - } default: { # This is the default for all other architectures $package_name = "${php::package_prefix}${php::params::pear_package_suffix}" From 3e011b9c73f066a25152b248afc98b3c241969c2 Mon Sep 17 00:00:00 2001 From: Bernhard Frauendienst Date: Mon, 4 Nov 2019 21:07:05 +0100 Subject: [PATCH 2/2] Auto-determine FreeBSD package prefix from version If the php version has been set in globals, use it to determine the default package prefix on FreeBSD. This should be a compatible change, since the package prefix can still be overridden, and has to match the selected version anyway. --- manifests/globals.pp | 8 ++++++++ manifests/params.pp | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/manifests/globals.pp b/manifests/globals.pp index 22b9fb38..8a800548 100644 --- a/manifests/globals.pp +++ b/manifests/globals.pp @@ -144,6 +144,14 @@ } } 'FreeBSD': { + case $globals_php_version { + /^(\d)\.(\d)$/: { + $package_prefix = "php${1}${2}-" + } + default: { + $package_prefix = 'php56-' + } + } $default_config_root = '/usr/local/etc' $default_fpm_pid_file = '/var/run/php-fpm.pid' $fpm_service_name = undef diff --git a/manifests/params.pp b/manifests/params.pp index 8dc3142e..6d0da0d9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -179,7 +179,7 @@ $fpm_group = 'www' $embedded_package_suffix = 'embed' $embedded_inifile = "${config_root}/php-embed.ini" - $package_prefix = 'php56-' + $package_prefix = $php::globals::package_prefix $compiler_packages = ['gcc'] $manage_repos = false $root_group = 'wheel'