|
2490 | 2490 | }, merge=True) %} |
2491 | 2491 | {%- else %} |
2492 | 2492 | {%- set useversion = phpng_version | replace(".", "-") -%} |
| 2493 | + {#- Red Hat Softwarecollection prefix lookup belongs to the Red Hat part |
| 2494 | + further down but has to go here due to Jinja parsing rules. -#} |
| 2495 | + {%- if salt['pillar.get']('php:use_scl_repo', False) -%} |
| 2496 | + {%- set rh_prefix = 'rh-php{}-'.format(salt['pillar.get']('php:scl_php_version', '')) -%} |
| 2497 | + {%- set sclo_prefix = 'sclo-php{}-'.format(salt['pillar.get']('php:scl_php_version', '')) -%} |
| 2498 | + {%- set path_suffix = 'opt/rh/rh-php{}/'.format(salt['pillar.get']('php:scl_php_version', '')) -%} |
| 2499 | + {%- else -%} |
| 2500 | + {%- set rh_prefix = '' -%} |
| 2501 | + {%- set sclo_prefix = '' -%} |
| 2502 | + {%- set path_suffix = '' -%} |
| 2503 | + {%- endif -%} |
2493 | 2504 | {%- set php = salt['pillar.get']('php:ng', { |
2494 | 2505 | 'lookup': salt['grains.filter_by']({ |
2495 | 2506 | 'Debian': { |
|
2692 | 2703 | 'pkgs': { |
2693 | 2704 | 'adodb': 'php-adodb', |
2694 | 2705 | 'apc': 'php-pecl-apc', |
2695 | | - 'apcu': 'php-pecl-apcu', |
2696 | | - 'bcmath': 'php-bcmath', |
| 2706 | + 'apcu': rh_prefix + 'php-pecl-apcu', |
| 2707 | + 'bcmath': rh_prefix + 'php-bcmath', |
2697 | 2708 | 'build_pkgs': ['openssl-devel', 'gcc'], |
2698 | 2709 | 'cache-lite': 'php-pear-Cache-Lite', |
2699 | | - 'cgi': 'php-cgi', |
2700 | | - 'cli': 'php-cli', |
| 2710 | + 'cgi': rh_prefix + 'php-cgi', |
| 2711 | + 'cli': rh_prefix + 'php-cli', |
2701 | 2712 | 'composer': 'composer', |
2702 | 2713 | 'composer_bin': 'composer', |
2703 | 2714 | 'console-table': 'php-pear-Console-Table', |
2704 | 2715 | 'curl': ['php-common', 'curl'], |
2705 | | - 'dev': 'php-devel', |
2706 | | - 'ext_conf_path': '/etc/php.d', |
2707 | | - 'fpm': 'php-fpm', |
2708 | | - 'gd': 'php-gd', |
2709 | | - 'geoip': 'php-pecl-geoip', |
| 2716 | + 'dev': rh_prefix + 'php-devel', |
| 2717 | + 'ext_conf_path': '/etc/' + path_suffix + 'php.d', |
| 2718 | + 'fpm': rh_prefix + 'php-fpm', |
| 2719 | + 'gd': rh_prefix + 'php-gd', |
| 2720 | + 'geoip': sclo_prefix + 'php-pecl-geoip', |
2710 | 2721 | 'geshi': 'php-geshi', |
2711 | 2722 | 'gettext': 'php-php-gettext', |
2712 | | - 'http': 'php-pecl-http', |
2713 | | - 'imagick': 'php-pecl-imagick', |
2714 | | - 'imap': 'php-imap', |
2715 | | - 'intl': 'php-intl', |
2716 | | - 'json': 'php-common', |
2717 | | - 'ldap': 'php-ldap', |
| 2723 | + 'http': sclo_prefix + 'php-pecl-http', |
| 2724 | + 'imagick': sclo_prefix + 'php-pecl-imagick', |
| 2725 | + 'imap': sclo_prefix + 'php-imap', |
| 2726 | + 'intl': rh_prefix + 'php-intl', |
| 2727 | + 'json': rh_prefix + 'php-common', |
| 2728 | + 'ldap': rh_prefix + 'php-ldap', |
2718 | 2729 | 'local_bin': '/usr/local/bin', |
2719 | 2730 | 'auth-sasl': 'php-pear-Auth-SASL', |
2720 | 2731 | 'mail': 'php-pear-Mail', |
2721 | | - 'mbstring': 'php-mbstring', |
2722 | | - 'mcrypt': 'php-mcrypt', |
| 2732 | + 'mbstring': rh_prefix + 'php-mbstring', |
| 2733 | + 'mcrypt': sclo_prefix + 'php-mcrypt', |
2723 | 2734 | 'memcache': 'php-pecl-memcache', |
2724 | | - 'memcached': 'php-pecl-memcached', |
| 2735 | + 'memcached': sclo_prefix + 'php-pecl-memcached', |
2725 | 2736 | 'mysql': 'php-mysql', |
2726 | | - 'mysqlnd': 'php-mysqlnd', |
| 2737 | + 'mysqlnd': rh_prefix + 'php-mysqlnd', |
2727 | 2738 | 'net-smtp': 'php-pear-Net-SMTP', |
2728 | 2739 | 'net4': 'php-pear-Net-IPv4', |
2729 | 2740 | 'oauth': 'php-pecl-oauth', |
2730 | 2741 | 'opcache': 'php-pecl-zendopcache', |
2731 | | - 'pear': 'php-pear', |
2732 | | - 'pgsql': 'php-pgsql', |
2733 | | - 'php': 'php', |
2734 | | - 'pspell': 'php-pspell', |
2735 | | - 'redis': 'php-pecl-redis', |
| 2742 | + 'pear': rh_prefix + 'php-pear', |
| 2743 | + 'pgsql': rh_prefix + 'php-pgsql', |
| 2744 | + 'php': rh_prefix + 'php', |
| 2745 | + 'pspell': rh_prefix + 'php-pspell', |
| 2746 | + 'redis': sclo_prefix + 'php-pecl-redis', |
2736 | 2747 | 'seclib': 'php-phpseclib', |
2737 | | - 'snmp': 'php-snmp', |
2738 | | - 'soap': 'php-soap', |
2739 | | - 'sqlite': 'php-pdo', |
2740 | | - 'ssh2': 'php-pecl-ssh2', |
| 2748 | + 'snmp': rh_prefix + 'php-snmp', |
| 2749 | + 'soap': rh_prefix + 'php-soap', |
| 2750 | + 'sqlite': rh_prefix + 'php-pdo', |
| 2751 | + 'ssh2': sclo_prefix + 'php-pecl-ssh2', |
2741 | 2752 | 'suhosin5_ext': 'suhosin.so', |
2742 | 2753 | 'suhosin5_repo': 'https://github.com/sektioneins/suhosin', |
2743 | 2754 | 'suhosin7_ext': 'suhosin7.so', |
2744 | 2755 | 'suhosin7_repo': 'https://github.com/sektioneins/suhosin7', |
2745 | 2756 | 'tcpdf': 'php-tcpdf', |
2746 | 2757 | 'temp_dir': '/tmp', |
2747 | | - 'tidy': 'php-tidy', |
2748 | | - 'uuid': 'php-pecl-uuid', |
| 2758 | + 'tidy': sclo_prefix + 'php-tidy', |
| 2759 | + 'uuid': sclo_prefix + 'php-pecl-uuid', |
2749 | 2760 | 'xcache': 'php-xcache', |
2750 | | - 'xdebug': 'php-pecl-xdebug', |
2751 | | - 'xml': 'php-xml', |
2752 | | - 'xsl': 'php-xml', |
2753 | | - 'zip': 'php', |
| 2761 | + 'xdebug': sclo_prefix + 'php-pecl-xdebug', |
| 2762 | + 'xml': rh_prefix + 'php-xml', |
| 2763 | + 'xsl': rh_prefix + 'php-xml', |
| 2764 | + 'zip': rh_prefix + 'php', |
2754 | 2765 | }, |
2755 | 2766 | 'fpm': { |
2756 | | - 'conf': '/etc/php-fpm.conf', |
2757 | | - 'ini': '/etc/php.ini', |
2758 | | - 'pools': '/etc/php-fpm.d', |
2759 | | - 'service': 'php-fpm', |
| 2767 | + 'conf': '/etc/' + path_suffix + 'php-fpm.conf', |
| 2768 | + 'ini': '/etc/' + path_suffix + 'php.ini', |
| 2769 | + 'pools': '/etc/' + path_suffix + 'php-fpm.d', |
| 2770 | + 'service': rh_prefix + 'php-fpm', |
2760 | 2771 | 'defaults': { |
2761 | 2772 | 'global': { |
2762 | | - 'pid': '/var/run/php-fpm/php-fpm.pid', |
2763 | | - 'error_log': '/var/log/php-fpm/error.log', |
| 2773 | + 'pid': '/var/' + path_suffix + 'run/php-fpm/php-fpm.pid', |
| 2774 | + 'error_log': '/var/' + path_suffix + 'log/php-fpm/error.log', |
2764 | 2775 | }, |
2765 | | - 'include': '/etc/php-fpm.d/*.conf', |
| 2776 | + 'include': '/etc/' + path_suffix + 'php-fpm.d/*.conf', |
2766 | 2777 | }, |
2767 | 2778 | }, |
2768 | 2779 | 'cli': { |
2769 | | - 'ini': '/etc/php.ini', |
| 2780 | + 'ini': '/etc/' + path_suffix + 'php.ini', |
2770 | 2781 | }, |
2771 | 2782 | 'xcache': { |
2772 | | - 'ini': '/etc/php.d/xcache.ini', |
| 2783 | + 'ini': '/etc/' + path_suffix + 'php.d/xcache.ini', |
2773 | 2784 | }, |
2774 | 2785 | }, |
2775 | 2786 | 'Suse': { |
|
0 commit comments