Saltstack Official PHP Formula
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

New structure for new Ubuntu PPA and other fixes (#113) * 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
пре 8 година
пре 10 година
New structure for new Ubuntu PPA and other fixes (#113) * 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
пре 8 година
New structure for new Ubuntu PPA and other fixes (#113) * 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
пре 8 година
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. {%- from "php/map.jinja" import php with context %}
  2. include:
  3. - php
  4. - php.dev
  5. {%- set php_version = salt['pillar.get']('php:version', '7.0')|string %}
  6. {%- if salt['grains.get']('os') == "Ubuntu" %}
  7. {%- if php_version >= '7.0' %}
  8. {%- set suhosin_ext = php.suhosin7_ext %}
  9. {%- set suhosin_name = 'suhosin7' %}
  10. {%- set suhosin_repo = php.suhosin7_repo %}
  11. {%- set tmppath = '/tmp/suhosin7' %}
  12. {%- else %}
  13. {%- set suhosin_ext = php.suhosin5_ext %}
  14. {%- set suhosin_name = 'suhosin' %}
  15. {%- set suhosin_repo = php.suhosin5_repo %}
  16. {%- set tmppath = '/tmp/suhosin5' %}
  17. {%- endif %}
  18. {%- elif salt['grains.get']('os_family') == "RedHat" %}
  19. {%- if grains['osmajorrelease'] == "7" %}
  20. {%- set suhosin_ext = php.suhosin5_ext %}
  21. {%- set suhosin_name = 'suhosin' %}
  22. {%- set suhosin_repo = php.suhosin5_repo %}
  23. {%- set tmppath = '/tmp/suhosin5' %}
  24. {%- else %}
  25. {# RHEL version 6 contains PHP 5.3, which is not supported by Suhosin #}
  26. {%- endif %}
  27. {%- else %}
  28. {%- set suhosin_ext = php.suhosin5_ext %}
  29. {%- set suhosin_name = 'suhosin' %}
  30. {%- set suhosin_repo = php.suhosin5_repo %}
  31. {%- set tmppath = '/tmp/suhosin5' %}
  32. {%- endif %}
  33. build-pkgs:
  34. pkg.installed:
  35. - pkgs: {{ php.build_pkgs }}
  36. git:
  37. pkg.installed: []
  38. suhosin-source:
  39. git.latest:
  40. - name: {{ suhosin_repo }}
  41. - target: {{ tmppath }}
  42. - unless:
  43. - test -d {{ tmppath }}
  44. - require:
  45. - pkg: git
  46. install-suhosin:
  47. cmd.run:
  48. - name: |
  49. phpize
  50. ./configure
  51. make
  52. make install
  53. - cwd: {{ tmppath }}
  54. - shell: /bin/bash
  55. - runas: root
  56. - unless:
  57. - test -e {{ php.ext_conf_path }}/{{ suhosin_name }}.ini
  58. - require:
  59. - pkg: build-pkgs
  60. - git: suhosin-source
  61. php-suhosin-conf:
  62. file.managed:
  63. - name: {{ php.ext_conf_path }}/{{ suhosin_name }}.ini
  64. - contents: |
  65. extension={{ suhosin_ext }}
  66. suhosin.executor.include.whitelist=phar
  67. - require:
  68. - pkg: {{ php.php_pkg }}
  69. - cmd: install-suhosin
  70. - unless:
  71. - test -e {{ php.ext_conf_path }}/{{ suhosin_name }}.ini
  72. {%- if salt['grains.get']('os_family') == "Debian" %}
  73. php-suhosin-enable:
  74. cmd.run:
  75. - name: {{ php.phpenmod_command }} {{ suhosin_name }}
  76. - require:
  77. - file: php-suhosin-conf
  78. {%- endif %}