Page MenuHomeDevCentral

D1319.id3391.diff
No OneTemporary

D1319.id3391.diff

diff --git a/KNOWN_ISSUES.md b/KNOWN_ISSUES.md
--- a/KNOWN_ISSUES.md
+++ b/KNOWN_ISSUES.md
@@ -21,7 +21,7 @@
**Workaround**
-Run one again the state to restore PHP 7.1 (and deinstall composer and PEAR).
+On FreeBSD, we currently install phpcs manually, and skip PEAR.
### pefs-kmod and FreeBSD 11
diff --git a/roles/shellserver/userland-software/base.sls b/roles/shellserver/userland-software/base.sls
--- a/roles/shellserver/userland-software/base.sls
+++ b/roles/shellserver/userland-software/base.sls
@@ -6,7 +6,7 @@
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-{% from "map.jinja" import packages, packages_prefixes with context %}
+{% from "map.jinja" import dirs, packages, packages_prefixes with context %}
# -------------------------------------------------------------
# Shells
@@ -158,7 +158,7 @@
pkg:
- installed
- pkgs:
- # PHP
+ # PHP extensions
- {{ packages_prefixes.php }}bcmath
- {{ packages_prefixes.php }}ctype
- {{ packages_prefixes.php }}curl
@@ -177,9 +177,6 @@
- {{ packages_prefixes.php }}xml
- {{ packages_prefixes.php }}xmlwriter
- {{ packages_prefixes.php }}xsl
- - {{ packages.composer }}
- - {{ packages.pear }}
- - {{ packages.phpcs }}
{% if grains['os_family'] == 'Debian' %}
# On Debian, these PDO extensions doesn't follow regular names
# but are installed if you require the legacy extension name.
@@ -193,17 +190,47 @@
- {{ packages_prefixes.php }}pcntl
- {{ packages_prefixes.php }}session
- {{ packages_prefixes.php }}zlib
-
# On Debian, these PDO extensions doesn't follow regular names:
- {{ packages_prefixes.php }}pdo_mysql
- {{ packages_prefixes.php }}pdo_sqlite
{% endif %}
+ # PHP utilities
+ - {{ packages.composer }}
+ {% if grains['os'] != 'FreeBSD' %}
+ # On FreeBSD, PEAR is still a PHP 5.6 package (last tested 2018-02-17).
+ - {{ packages.pear }}
+ - {{ packages.phpcs }}
+ {% endif %}
+
# TCL
- tcllib
- {{ packages.tcltls }}
# -------------------------------------------------------------
+# Workaround : install phpcs on FreeBSD
+# -------------------------------------------------------------
+
+{% if grains['os'] == 'FreeBSD' %}
+/opt/phpcs:
+ file.directory
+
+{% for command in ['phpcs', 'phpcbf'] %}
+/opt/phpcs/{{ command }}:
+ file.managed:
+ - source: https://squizlabs.github.io/PHP_CodeSniffer/{{ command }}.phar
+ - skip_verify: True
+ - mode: 755
+
+{{ dirs.bin }}/{{ command }}:
+ file.symlink:
+ - target: /opt/phpcs/{{ command }}
+ - require:
+ - file: /opt/phpcs/{{ command }}
+{% endfor %}
+{% endif %}
+
+# -------------------------------------------------------------
# Spelling and language utilities
# -------------------------------------------------------------

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 10:27 (19 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259520
Default Alt Text
D1319.id3391.diff (2 KB)

Event Timeline