$OpenBSD: patch-validate_php,v 1.17 2018/04/23 11:00:08 sthen Exp $

- files installed from packages should only be updated via packages so
it's safer if they are owned by root; adjust the ownership check so that
*only* rrds are checked.

- we have getcap, but it's not linux getcap.

Index: validate.php
--- validate.php.orig
+++ validate.php
@@ -76,7 +76,7 @@ if (!file_exists('config.php')) {
 }
 
 $pre_checks_failed = false;
-$syntax_check = `php -ln config.php`;
+$syntax_check = `%PHP% -ln config.php`;
 if (!str_contains($syntax_check, 'No syntax errors detected')) {
     print_fail('Syntax error in config.php');
     echo $syntax_check;
@@ -103,7 +103,7 @@ if (!file_exists('vendor/autoload.php')) {
 require_once 'vendor/autoload.php';
 
 
-$dep_check = shell_exec('php scripts/composer_wrapper.php install --no-dev --dry-run');
+$dep_check = shell_exec('%PHP% scripts/composer_wrapper.php install --no-dev --dry-run');
 preg_match_all('/Installing ([^ ]+\/[^ ]+) \(/', $dep_check, $dep_missing);
 if (!empty($dep_missing[0])) {
     print_fail("Missing dependencies!", "./scripts/composer_wrapper.php install --no-dev");
