Page MenuHomeDevCentral

D1319.id3387.diff
No OneTemporary

D1319.id3387.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
@@ -186,12 +186,35 @@
- {{ packages_prefixes.php }}xsl
- {{ packages_prefixes.php }}zlib
- {{ 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' %}
+{% 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, 07:22 (17 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259713
Default Alt Text
D1319.id3387.diff (2 KB)

Event Timeline