1e3e3032f3
* Initial commit for new branch * Quick change to base test files * Updated map.jinja, added `php` dependency for all subformulas * Fixing mongo module and map.jinja needed OpenSSL dev libraries * Should be final changes needed for Mongo module * Updating Suhosin package since many distros don't have package in their repos anymore * Generalizing suhosin module, and updating pillar.example for new PPA * Adding addtional logic for RedHat based families to Suhosin * Initial commit of NG refactored map.jinja file * Deleting FFMpeg state file since the module is quite old, and has been replaced by using a Composer library. See https://github.com/PHP-FFMpeg/PHP-FFMpeg for details * Updating NG formulas for new definitions * Removing 'twig' as a state since it can be installed via Composer * Changes to installed.jinja to set correct PHP path based on version * NG Composer and NG Suhosin changes * Version bump and deleting README for deleted states * Finished refactor of NG map.jinja file * Adding trailing commas (forgot them earler) * Adding changes list, and modifying map file for missing definitions when using Ubuntu 16.04 and NOT using a PPA * Changes needed after performing testing on RHEL 7 * Changes needed for Ubuntu Trusty without using PPA * Removing testing files; keep on local * Map changes needed after testing Debian Jessie * Changed needed for Debian Wheezy * Adding more pkgs for Arch Linux support * More ArchLinux support * Stupid tabs * Removing extra line breaks, and using the general "use_external_repo" in the future if DotDeb (Debian) or Webtactic (RedHat) * Accoutning for Precise `phpenmod` and others
364 lines
17 KiB
Django/Jinja
364 lines
17 KiB
Django/Jinja
# -*- coding: utf-8 -*-
|
|
# vim: ft=jinja
|
|
|
|
{%- if salt['grains.get']('os') == "Ubuntu" %}
|
|
{%- set use_external_repo = salt['pillar.get']('php:use_external_repo', False) %}
|
|
{%- if use_external_repo %}
|
|
{%- set php_version = salt['pillar.get']('php:version', '7.0')|string %}
|
|
{%- if salt['grains.get']('osrelease')|string >= '16.04' %}
|
|
{# Ubuntu 16.04+ specific PHP definitions #}
|
|
{%- set php = salt['grains.filter_by']({
|
|
'Ubuntu': {
|
|
'adodb_pkg': 'libphp-adodb',
|
|
'apc_pkg': 'php-apcu',
|
|
'apcu_pkg': 'php-apcu-bc',
|
|
'bcmath_pkg': 'php' + php_version + '-bcmath',
|
|
'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev', 'pkg-config', 'libsslcommon2-dev', 'gcc', 'make', 'autoconf', 'libc-dev', 'pkg-config'],
|
|
'cgi_pkg': 'php' + php_version + '-cgi',
|
|
'cli_pkg': 'php' + php_version + '-cli',
|
|
'composer_bin': 'composer',
|
|
'curl_pkg': 'php' + php_version + '-curl',
|
|
'dev_pkg': 'php' + php_version + '-dev',
|
|
'ext_conf_path': '/etc/php/' + php_version + '/mods-available',
|
|
'fpm_pkg': 'php' + php_version + '-fpm',
|
|
'fpm_service': 'php' + php_version + '-fpm',
|
|
'gd_pkg': 'php' + php_version + '-gd',
|
|
'imagick_pkg': 'php-imagick',
|
|
'imap_pkg': 'php' + php_version + '-imap',
|
|
'intl_pkg': 'php' + php_version + '-intl',
|
|
'json_pkg': 'php' + php_version + '-json',
|
|
'ldap_pkg': 'php' + php_version + '-ldap',
|
|
'local_bin': '/usr/local/bin',
|
|
'mail_pkg': 'php-mail',
|
|
'mbstring_pkg': 'php' + php_version + '-mbstring',
|
|
'mcrypt_pkg': 'php' + php_version + '-mcrypt',
|
|
'memcache_pkg': 'php-memcache',
|
|
'memcached_pkg': 'php-memcached',
|
|
'mongo_ext': 'mongodb.so',
|
|
'mongo_pecl': 'mongodb',
|
|
'mysql_pkg': 'php' + php_version + '-mysql',
|
|
'mysqlnd_pkg': 'php' + php_version + '-mysql',
|
|
'oauth_pkg': 'php-oauth',
|
|
'pear_pkg': 'php-pear',
|
|
'pgsql_pkg': 'php' + php_version + '-pgsql',
|
|
'php_ini': '/etc/php/' + php_version + '/apache2/php.ini',
|
|
'php_pkg': 'php' + php_version,
|
|
'phpenmod_command': 'phpenmod -v' + php_version,
|
|
'readline_pkg': 'php' + php_version + '-readline',
|
|
'redis_pkg': 'php-redis',
|
|
'soap_pkg': 'php' + php_version + '-soap',
|
|
'sqlite_pkg': 'php' + php_version + '-sqlite3',
|
|
'suhosin5_ext': 'suhosin.so',
|
|
'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
|
|
'suhosin7_ext': 'suhosin7.so',
|
|
'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
|
|
'temp_dir': '/tmp',
|
|
'xml_pkg': 'php' + php_version + '-xml',
|
|
'zip_pkg': 'php' + php_version + '-zip',
|
|
}
|
|
}, grain="os", merge=salt['pillar.get']('php:lookup')) %}
|
|
{%- else %}
|
|
{# All other Ubuntu PHP definitions #}
|
|
{%- set php = salt['grains.filter_by']({
|
|
'Ubuntu': {
|
|
'adodb_pkg': 'libphp-adodb',
|
|
'apc_pkg': 'php-apcu',
|
|
'apcu_pkg': 'php-apcu',
|
|
'bcmath_pkg': 'php' + php_version + '-bcmath',
|
|
'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev', 'gcc', 'make', 'autoconf', 'libc-dev', 'pkg-config'],
|
|
'cgi_pkg': 'php' + php_version + '-cgi',
|
|
'cli_pkg': 'php' + php_version + '-cli',
|
|
'composer_bin': 'composer',
|
|
'curl_pkg': 'php' + php_version + '-curl',
|
|
'dev_pkg': 'php' + php_version + '-dev',
|
|
'ext_conf_path': '/etc/php/' + php_version + '/mods-available',
|
|
'fpm_pkg': 'php' + php_version + '-fpm',
|
|
'fpm_service': 'php' + php_version + '-fpm',
|
|
'gd_pkg': 'php' + php_version + '-gd',
|
|
'imagick_pkg': 'php-imagick',
|
|
'imap_pkg': 'php' + php_version + '-imap',
|
|
'intl_pkg': 'php' + php_version + '-intl',
|
|
'json_pkg': 'php' + php_version + '-json',
|
|
'ldap_pkg': 'php' + php_version + '-ldap',
|
|
'local_bin': '/usr/local/bin',
|
|
'mail_pkg': 'php-mail',
|
|
'mbstring_pkg': 'php' + php_version + '-mbstring',
|
|
'mcrypt_pkg': 'php' + php_version + '-mcrypt',
|
|
'memcache_pkg': 'php-memcache',
|
|
'memcached_pkg': 'php-memcached',
|
|
'mongo_ext': 'mongodb.so',
|
|
'mongo_pecl': 'mongodb',
|
|
'mysql_pkg': 'php' + php_version + '-mysql',
|
|
'mysqlnd_pkg': 'php' + php_version + '-mysql',
|
|
'oauth_pkg': 'php-oauth',
|
|
'pear_pkg': 'php-pear',
|
|
'pgsql_pkg': 'php' + php_version + '-pgsql',
|
|
'php_ini': '/etc/php/' + php_version + '/apache2/php.ini',
|
|
'php_pkg': 'php' + php_version,
|
|
'phpenmod_command': 'phpenmod -v' + php_version,
|
|
'readline_pkg': 'php' + php_version + '-readline',
|
|
'redis_pkg': 'php-redis',
|
|
'soap_pkg': 'php' + php_version + '-soap',
|
|
'sqlite_pkg': 'php' + php_version + '-sqlite3',
|
|
'suhosin5_ext': 'suhosin.so',
|
|
'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
|
|
'suhosin7_ext': 'suhosin7.so',
|
|
'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
|
|
'temp_dir': '/tmp',
|
|
'xml_pkg': 'php' + php_version + '-xml',
|
|
'zip_pkg': 'php' + php_version + '-zip',
|
|
}
|
|
}, grain="os", merge=salt['pillar.get']('php:lookup')) %}
|
|
{%- endif %}
|
|
{%- else %}
|
|
{%- if salt['grains.get']('osrelease')|string >= '16.04' %}
|
|
{# Ubuntu 16.04+ specific PHP definitions #}
|
|
{%- set php = salt['grains.filter_by']({
|
|
'Ubuntu': {
|
|
'adodb_pkg': 'libphp-adodb',
|
|
'apc_pkg': 'php',
|
|
'apcu_pkg': 'php-apcu',
|
|
'bcmath_pkg': 'php-bcmath',
|
|
'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev', 'pkg-config', 'libsslcommon2-dev'],
|
|
'cgi_pkg': 'php-cgi',
|
|
'cli_pkg': 'php-cli',
|
|
'composer_bin': 'composer',
|
|
'curl_pkg': 'php-curl',
|
|
'dev_pkg': 'php-dev',
|
|
'ext_conf_path': '/etc/php/7.0/mods-available',
|
|
'fpm_pkg': 'php-fpm',
|
|
'fpm_service': 'php7.0-fpm',
|
|
'gd_pkg': 'php-gd',
|
|
'imagick_pkg': 'php-imagick',
|
|
'imap_pkg': 'php-imap',
|
|
'intl_pkg': 'php-intl',
|
|
'json_pkg': 'php-json',
|
|
'ldap_pkg': 'php-ldap',
|
|
'local_bin': '/usr/local/bin',
|
|
'mail_pkg': 'php-mail',
|
|
'mbstring_pkg': 'php-mbstring',
|
|
'mcrypt_pkg': 'php-mcrypt',
|
|
'memcache_pkg': 'php-memcache',
|
|
'memcached_pkg': 'php-memcached',
|
|
'mongo_ext': 'mongodb.so',
|
|
'mongo_pecl': 'php-mongodb',
|
|
'mysql_pkg': 'php-mysql',
|
|
'mysqlnd_pkg': 'php',
|
|
'oauth_pkg': 'php-oauth',
|
|
'pear_pkg': 'php-pear',
|
|
'pgsql_pkg': 'php-pgsql',
|
|
'php_ini': '/etc/php/7.0/apache2/php.ini',
|
|
'php_pkg': 'php',
|
|
'phpenmod_command': 'phpenmod',
|
|
'readline_pkg': ' php-readline',
|
|
'redis_pkg': 'php-redis',
|
|
'soap_pkg': 'php-soap',
|
|
'sqlite_pkg': 'php-sqlite3',
|
|
'suhosin5_ext': 'suhosin.so',
|
|
'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
|
|
'suhosin7_ext': 'suhosin7.so',
|
|
'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
|
|
'temp_dir': '/tmp',
|
|
'xml_pkg': 'php-xml',
|
|
'zip_pkg': 'php-zip',
|
|
}
|
|
}, grain="os", merge=salt['pillar.get']('php:lookup')) %}
|
|
{%- else %}
|
|
{# All other Ubuntu PHP definitions #}
|
|
{%- set php = salt['grains.filter_by']({
|
|
'Ubuntu': {
|
|
'adodb_pkg': 'php5-adodb',
|
|
'apc_pkg': 'php-apc',
|
|
'apcu_pkg': 'php5-apcu',
|
|
'bcmath_pkg': 'php5',
|
|
'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev'],
|
|
'cgi_pkg': 'php5-cgi',
|
|
'cli_pkg': 'php5-cli',
|
|
'composer_bin': 'composer',
|
|
'curl_pkg': 'php5-curl',
|
|
'dev_pkg': 'php5-dev',
|
|
'ext_conf_path': salt['grains.filter_by']({
|
|
'precise': '/etc/php5/conf.d',
|
|
'default': '/etc/php5/mods-available',
|
|
}, grain='oscodename'),
|
|
'fpm_pkg': 'php5-fpm',
|
|
'fpm_service': 'php5-fpm',
|
|
'gd_pkg': 'php5-gd',
|
|
'imagick_pkg': 'php5-imagick',
|
|
'imap_pkg': 'php5-imap',
|
|
'intl_pkg': 'php5-intl',
|
|
'json_pkg': 'php5-json',
|
|
'ldap_pkg': 'php5-ldap',
|
|
'local_bin': '/usr/local/bin',
|
|
'mail_pkg': 'php-mail',
|
|
'mbstring_pkg': 'php5',
|
|
'mcrypt_pkg': 'php5-mcrypt',
|
|
'memcache_pkg': 'php5-memcache',
|
|
'memcached_pkg': 'php5-memcached',
|
|
'mongo_ext': 'mongo.so',
|
|
'mongo_pecl': 'mongo',
|
|
'mysql_pkg': 'php5-mysql',
|
|
'mysqlnd_pkg': 'php5-mysqlnd',
|
|
'oauth_pkg': 'php5-oauth',
|
|
'pear_pkg': 'php-pear',
|
|
'pgsql_pkg': 'php5-pgsql',
|
|
'php_ini': '/etc/php5/apache2/php.ini',
|
|
'php_pkg': 'php5',
|
|
'phpenmod_command': salt['grains.filter_by']({
|
|
'precise': 'true',
|
|
'default': 'php5enmod',
|
|
}, grain='oscodename'),
|
|
'phpenmod_command': 'php5enmod',
|
|
'readline_pkg': ' php5-readline',
|
|
'redis_pkg': 'php5-redis',
|
|
'soap_pkg': 'php-soap',
|
|
'sqlite_pkg': 'php5-sqlite',
|
|
'suhosin5_ext': 'suhosin.so',
|
|
'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
|
|
'suhosin7_ext': 'suhosin7.so',
|
|
'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
|
|
'temp_dir': '/tmp',
|
|
'xml_pkg': 'php5',
|
|
'zip_pkg': 'php5',
|
|
},
|
|
}, grain='os', merge=salt['pillar.get']('php:lookup')) %}
|
|
{%- endif %}
|
|
{%- endif %}
|
|
{%- else %}
|
|
{%- set php = salt['grains.filter_by']({
|
|
'Debian': {
|
|
'adodb_pkg': 'php5-adodb',
|
|
'apc_pkg': 'php-apc',
|
|
'apcu_pkg': salt['grains.filter_by']({
|
|
'wheezy': 'php-apc',
|
|
'jessie': 'php5-apcu',
|
|
}, grain='oscodename'),
|
|
'bcmath_pkg': 'php5-fpm',
|
|
'build_pkgs': ['libssl-dev', 'libcurl4-openssl-dev', 'build-essential'],
|
|
'cgi_pkg': 'php5-cgi',
|
|
'cli_pkg': 'php5-cli',
|
|
'composer_bin': 'composer',
|
|
'curl_pkg': 'php5-curl',
|
|
'dev_pkg': 'php5-dev',
|
|
'ext_conf_path': '/etc/php5/mods-available',
|
|
'fpm_pkg': 'php5-fpm',
|
|
'fpm_service': 'php5-fpm',
|
|
'gd_pkg': 'php5-gd',
|
|
'imagick_pkg': 'php5-imagick',
|
|
'imap_pkg': 'php5-imap',
|
|
'intl_pkg': 'php5-intl',
|
|
'json_pkg': 'php5-json',
|
|
'ldap_pkg': 'php5-ldap',
|
|
'local_bin': '/usr/local/bin',
|
|
'mail_pkg': 'php-mail',
|
|
'mbstring_pkg': 'php5',
|
|
'mcrypt_pkg': 'php5-mcrypt',
|
|
'memcache_pkg': 'php5-memcache',
|
|
'memcached_pkg': 'php5-memcached',
|
|
'mongo_ext': 'mongo.so',
|
|
'mongo_pecl': 'mongo',
|
|
'mysql_pkg': 'php5-mysql',
|
|
'mysqlnd_pkg': 'php5-mysqlnd',
|
|
'oauth_pkg': 'php5-oauth',
|
|
'pear_pkg': 'php-pear',
|
|
'pgsql_pkg': 'php5-pgsql',
|
|
'php_ini': '/etc/php5/apache2/php.ini',
|
|
'php_pkg': 'php5',
|
|
'phpenmod_command': 'php5enmod',
|
|
'readline_pkg': ' php5-readline',
|
|
'redis_pkg': 'php5-redis',
|
|
'soap_pkg': 'php-soap',
|
|
'sqlite_pkg': 'php5-sqlite',
|
|
'suhosin5_ext': 'suhosin.so',
|
|
'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
|
|
'suhosin7_ext': 'suhosin7.so',
|
|
'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
|
|
'temp_dir': '/tmp',
|
|
'xml_pkg': 'php5',
|
|
'zip_pkg': 'php5',
|
|
},
|
|
'RedHat': {
|
|
'adodb_pkg': 'php-adodb',
|
|
'apc_pkg': 'php-pecl-apcu',
|
|
'apcu_pkg': 'php-pecl-apcu',
|
|
'bcmath_pkg': 'php-bcmath',
|
|
'build_pkgs': ['openssl-devel', 'gcc'],
|
|
'cgi_pkg': 'php-cgi',
|
|
'cli_pkg': 'php-cli',
|
|
'composer_bin': 'composer',
|
|
'curl_pkg': 'curl',
|
|
'dev_pkg': 'php-devel',
|
|
'ext_conf_path': '/etc/php.d',
|
|
'fpm_pkg': 'php-fpm',
|
|
'fpm_service': 'php-fpm',
|
|
'gd_pkg': 'php-gd',
|
|
'imagick_pkg': 'php-pecl-imagick',
|
|
'imap_pkg': 'php-imap',
|
|
'intl_pkg': 'php-intl',
|
|
'json_pkg': 'php-common',
|
|
'ldap_pkg': 'php-ldap',
|
|
'local_bin': '/usr/local/bin',
|
|
'mail_pkg': 'php-pear-Mail',
|
|
'mbstring_pkg': 'php-mbstring',
|
|
'mcrypt_pkg': 'php-mcrypt',
|
|
'memcache_pkg': 'php-pecl-memcache',
|
|
'memcached_pkg': 'php-pecl-memcached',
|
|
'mongo_ext': 'mongo.so',
|
|
'mongo_pecl': 'mongo',
|
|
'mysql_pkg': 'php-mysql',
|
|
'mysqlnd_pkg': 'php-mysqlnd',
|
|
'oauth_pkg': 'php-pecl-oauth',
|
|
'pear_pkg': 'php-pear',
|
|
'pgsql_pkg': 'php-pgsql',
|
|
'php_ini': '/etc/php.ini',
|
|
'php_pkg': 'php',
|
|
'readline_pkg': 'php-cli',
|
|
'redis_pkg': 'php-pecl-redis',
|
|
'soap_pkg': 'php-soap',
|
|
'sqlite_pkg': 'php-pdo',
|
|
'suhosin5_ext': 'suhosin.so',
|
|
'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
|
|
'suhosin7_ext': 'suhosin7.so',
|
|
'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
|
|
'temp_dir': '/tmp',
|
|
'xml_pkg': 'php-xml',
|
|
'zip_pkg': 'php',
|
|
},
|
|
'Suse': {
|
|
'adodb_pkg': 'php5-dba',
|
|
'cli_pkg': 'php5-cli',
|
|
'composer_bin': 'composer',
|
|
'curl_pkg': 'php5-curl',
|
|
'dev_pkg': 'php5-devel',
|
|
'ext_conf_path': '/etc/php5/conf.d',
|
|
'fpm_pkg': 'php5-fpm',
|
|
'fpm_service': 'php5-fpm',
|
|
'gd_pkg': 'php5-gd',
|
|
'imap_pkg': 'php5-imap',
|
|
'intl_pkg': 'php5-intl',
|
|
'json_pkg': 'php5-json',
|
|
'ldap_pkg': 'php5-ldap',
|
|
'local_bin': '/usr/local/bin',
|
|
'mbstring_pkg': 'php5-mbstring',
|
|
'mcrypt_pkg': 'php5-mcrypt',
|
|
'mongo_ext': 'mongo.so',
|
|
'mongo_pecl': 'mongo',
|
|
'mysql_pkg': 'php5-mysql',
|
|
'pear_pkg': 'php5-pear',
|
|
'pgsql_pkg': 'php5-pgsql',
|
|
'php_ini': '/etc/php5/apache2/php.ini',
|
|
'php_pkg': 'php5',
|
|
'readline_pkg': ' php5-readline',
|
|
'soap_pkg': 'php5-soap',
|
|
'sqlite_pkg': 'php5-sqlite',
|
|
'suhosin5_ext': 'suhosin.so',
|
|
'suhosin5_repo': 'https://github.com/sektioneins/suhosin',
|
|
'suhosin7_ext': 'suhosin7.so',
|
|
'suhosin7_repo': 'https://github.com/sektioneins/suhosin7',
|
|
'temp_dir': '/tmp',
|
|
'xml_pkg': ['php5-xmlreader','php5-xmlwriter','php5-xmlrpc'],
|
|
'zip_pkg': 'php5-zip',
|
|
},
|
|
}, merge=salt['pillar.get']('php:lookup')) %}
|
|
{%- endif %}
|