Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 May 2020 15:24:21 +0000 (UTC)
From:      Michael Gmelin <grembo@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r535863 - in head/devel: arcanist-lib arcanist-lib/files phabricator phabricator/files
Message-ID:  <202005191524.04JFOLb4077539@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: grembo
Date: Tue May 19 15:24:21 2020
New Revision: 535863
URL: https://svnweb.freebsd.org/changeset/ports/535863

Log:
  Patch paths to php executable, so things like ssh-auth work again
  without workarounds.

Added:
  head/devel/arcanist-lib/files/patch-src_lint_linter_ArcanistPhpLinter.php   (contents, props changed)
  head/devel/arcanist-lib/files/patch-src_moduleutils_PhutilLibraryMapBuilder.php   (contents, props changed)
  head/devel/arcanist-lib/files/patch-src_phage_bootloader_PhagePHPAgentBootloader.php   (contents, props changed)
  head/devel/arcanist-lib/files/patch-src_runtime_ArcanistRuntime.php   (contents, props changed)
  head/devel/arcanist-lib/files/patch-src_utils_PhutilExecutionEnvironment.php   (contents, props changed)
  head/devel/arcanist-lib/files/patch-src_workflow_ArcanistAnoidWorkflow.php   (contents, props changed)
  head/devel/arcanist-lib/files/patch-src_workflow_ArcanistLiberateWorkflow.php   (contents, props changed)
  head/devel/arcanist-lib/files/patch-support_shell_hooks_bash-completion.sh   (contents, props changed)
  head/devel/phabricator/files/patch-scripts_celerity_install__merge.sh   (contents, props changed)
  head/devel/phabricator/files/patch-src_infrastructure_testing_fixture_PhabricatorStorageFixtureScopeGuard.php   (contents, props changed)
Modified:
  head/devel/arcanist-lib/Makefile
  head/devel/phabricator/Makefile

Modified: head/devel/arcanist-lib/Makefile
==============================================================================
--- head/devel/arcanist-lib/Makefile	Tue May 19 15:23:07 2020	(r535862)
+++ head/devel/arcanist-lib/Makefile	Tue May 19 15:24:21 2020	(r535863)
@@ -2,6 +2,7 @@
 
 PORTNAME?=	arcanist
 PORTVERSION?=	20200514
+PORTREVISION?=	1
 CATEGORIES?=	devel
 PKGNAMESUFFIX=	${SLAVE_PKGNAMESUFFIX}${PHP_PKGNAMESUFFIX}
 
@@ -15,7 +16,17 @@ LICENSE_FILE=	${WRKSRC}/LICENSE
 
 PHP_DESTDIR=	lib/php/arcanist
 USES=		php:flavors python:env shebangfix
-SHEBANG_FILES=	support/arcanoid/arcanoid.py
+SHEBANG_FILES=	bin/arc \
+		bin/phage \
+		scripts/*.php \
+		scripts/hgdaemon/*.php \
+		src/parser/*.php \
+		support/arcanoid/arcanoid.py \
+		support/lib/*.php \
+		support/unit/*.php \
+		support/xhpast/*.php \
+		support/xhpast/bin/*.php
+
 USE_PHP=	curl dom hash json simplexml zlib
 USE_GITHUB=	yes
 NO_BUILD=	yes
@@ -62,9 +73,16 @@ do-install:
 		 s|%%PKGORIGIN%%|${PKGORIGIN}|g' \
 		${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/toolset/workflow/ArcanistVersionWorkflow.php
 	@${REINPLACE_CMD} \
+		's|%%PHP_CMD%%|${PREFIX}/bin/php|g' \
+		${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/lint/linter/ArcanistPhpLinter.php \
+		${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/moduleutils/PhutilLibraryMapBuilder.php \
+		${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/phage/bootloader/PhagePHPAgentBootloader.php \
+		${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/runtime/ArcanistRuntime.php \
+		${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/utils/PhutilExecutionEnvironment.php \
+		${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/workflow/ArcanistLiberateWorkflow.php
+	@${REINPLACE_CMD} \
 		's|%%PYTHON_CMD%%|${PYTHON_CMD}|g' \
 		${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/workflow/ArcanistAnoidWorkflow.php
-	${RM} ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/src/toolset/workflow/*.orig
 	${RLN} ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/support/shell/hooks/bash-completion.sh \
 		 ${STAGEDIR}${PREFIX}/share/bash-completion/completions/arc
 .endif

Added: head/devel/arcanist-lib/files/patch-src_lint_linter_ArcanistPhpLinter.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/arcanist-lib/files/patch-src_lint_linter_ArcanistPhpLinter.php	Tue May 19 15:24:21 2020	(r535863)
@@ -0,0 +1,11 @@
+--- src/lint/linter/ArcanistPhpLinter.php.orig	2020-05-19 10:39:38 UTC
++++ src/lint/linter/ArcanistPhpLinter.php
+@@ -44,7 +44,7 @@ final class ArcanistPhpLinter extends ArcanistExternal
+   }
+ 
+   public function getDefaultBinary() {
+-    return 'php';
++    return '%%PHP_CMD%%';
+   }
+ 
+   public function getVersion() {

Added: head/devel/arcanist-lib/files/patch-src_moduleutils_PhutilLibraryMapBuilder.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/arcanist-lib/files/patch-src_moduleutils_PhutilLibraryMapBuilder.php	Tue May 19 15:24:21 2020	(r535863)
@@ -0,0 +1,11 @@
+--- src/moduleutils/PhutilLibraryMapBuilder.php.orig	2020-05-19 10:41:00 UTC
++++ src/moduleutils/PhutilLibraryMapBuilder.php
+@@ -268,7 +268,7 @@ final class PhutilLibraryMapBuilder extends Phobject {
+     $absolute_file = $this->getPath($file);
+     $bin = dirname(__FILE__).'/../../support/lib/extract-symbols.php';
+ 
+-    return new ExecFuture('php -f %R -- --ugly %R', $bin, $absolute_file);
++    return new ExecFuture('%%PHP_CMD%% -f %R -- --ugly %R', $bin, $absolute_file);
+   }
+ 
+ 

Added: head/devel/arcanist-lib/files/patch-src_phage_bootloader_PhagePHPAgentBootloader.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/arcanist-lib/files/patch-src_phage_bootloader_PhagePHPAgentBootloader.php	Tue May 19 15:24:21 2020	(r535863)
@@ -0,0 +1,11 @@
+--- src/phage/bootloader/PhagePHPAgentBootloader.php.orig	2020-05-19 10:37:09 UTC
++++ src/phage/bootloader/PhagePHPAgentBootloader.php
+@@ -27,7 +27,7 @@ final class PhagePHPAgentBootloader extends PhageAgent
+     // reads and evaluates the main agent program.
+ 
+     return csprintf(
+-      'php -r %s',
++      '%%PHP_CMD%% -r %s',
+       "eval(fread(\$I=fopen('php://stdin', 'r'), {$len})); /* phage! */");
+   }
+ 

Added: head/devel/arcanist-lib/files/patch-src_runtime_ArcanistRuntime.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/arcanist-lib/files/patch-src_runtime_ArcanistRuntime.php	Tue May 19 15:24:21 2020	(r535863)
@@ -0,0 +1,11 @@
+--- src/runtime/ArcanistRuntime.php.orig	2020-05-19 10:39:08 UTC
++++ src/runtime/ArcanistRuntime.php
+@@ -206,7 +206,7 @@ final class ArcanistRuntime {
+     $bin = $arcanist_root.'/scripts/arcanist.php';
+ 
+     $err = phutil_passthru(
+-      'php -f %R -- %Ls',
++      '%%PHP_CMD%% -f %R -- %Ls',
+       $bin,
+       array_slice($argv, 1));
+ 

Added: head/devel/arcanist-lib/files/patch-src_utils_PhutilExecutionEnvironment.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/arcanist-lib/files/patch-src_utils_PhutilExecutionEnvironment.php	Tue May 19 15:24:21 2020	(r535863)
@@ -0,0 +1,11 @@
+--- src/utils/PhutilExecutionEnvironment.php.orig	2020-05-19 10:38:43 UTC
++++ src/utils/PhutilExecutionEnvironment.php
+@@ -36,7 +36,7 @@ final class PhutilExecutionEnvironment extends Phobjec
+     }
+ 
+     list($env) = execx(
+-      'php -d variables_order=E -r %s',
++      '%%PHP_CMD%% -d variables_order=E -r %s',
+       'echo json_encode($_ENV);');
+     $env = phutil_json_decode($env);
+ 

Added: head/devel/arcanist-lib/files/patch-src_workflow_ArcanistAnoidWorkflow.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/arcanist-lib/files/patch-src_workflow_ArcanistAnoidWorkflow.php	Tue May 19 15:24:21 2020	(r535863)
@@ -0,0 +1,16 @@
+--- src/workflow/ArcanistAnoidWorkflow.php.orig	2020-05-14 23:31:28 UTC
++++ src/workflow/ArcanistAnoidWorkflow.php
+@@ -24,11 +24,10 @@ EOTEXT
+   }
+ 
+   public function runWorkflow() {
+-    if (!Filesystem::binaryExists('python3')) {
++    if (!Filesystem::binaryExists('%%PYTHON_CMD%%')) {
+       throw new PhutilArgumentUsageException(
+         pht(
+-          'The "arc anoid" workflow requires "python3" to be available '.
+-          'in your $PATH.'));
++          'The "arc anoid" workflow requires "%%PYTHON_CMD%%" to be available.'));
+     }
+ 
+     $support_dir = phutil_get_library_root('arcanist');

Added: head/devel/arcanist-lib/files/patch-src_workflow_ArcanistLiberateWorkflow.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/arcanist-lib/files/patch-src_workflow_ArcanistLiberateWorkflow.php	Tue May 19 15:24:21 2020	(r535863)
@@ -0,0 +1,11 @@
+--- src/workflow/ArcanistLiberateWorkflow.php.orig	2020-05-19 10:37:58 UTC
++++ src/workflow/ArcanistLiberateWorkflow.php
+@@ -148,7 +148,7 @@ EOTEXT
+     }
+ 
+     return phutil_passthru(
+-      'php -f %R -- %Ls %R',
++      '%%PHP_CMD%% -f %R -- %Ls %R',
+       $bin,
+       $argv,
+       $path);

Added: head/devel/arcanist-lib/files/patch-support_shell_hooks_bash-completion.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/arcanist-lib/files/patch-support_shell_hooks_bash-completion.sh	Tue May 19 15:24:21 2020	(r535863)
@@ -0,0 +1,15 @@
+--- support/shell/hooks/bash-completion.sh.orig	2020-05-14 22:49:28 UTC
++++ support/shell/hooks/bash-completion.sh
+@@ -1,9 +1,10 @@
+ SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )"
+-GENERATED_RULES_FILE="${SCRIPTDIR}/../rules/bash-rules.sh"
++GENERATED_RULES_FILE="%%PREFIX%%/%%PHP_DESTDIR%%/support/shell/rules/bash-rules.sh"
+ 
+ # Try to generate the shell completion rules if they do not yet exist.
+ if [ ! -f "${GENERATED_RULES_FILE}" ]; then
+-  arc shell-complete --generate >/dev/null 2>/dev/null
++  %%PREFIX%%/%%PHP_DESTDIR%%/bin/arc \
++  	shell-complete --generate >/dev/null 2>/dev/null
+ fi;
+ 
+ # Source the shell completion rules.

Modified: head/devel/phabricator/Makefile
==============================================================================
--- head/devel/phabricator/Makefile	Tue May 19 15:23:07 2020	(r535862)
+++ head/devel/phabricator/Makefile	Tue May 19 15:24:21 2020	(r535863)
@@ -2,6 +2,7 @@
 
 PORTNAME=	phabricator
 PORTVERSION=	20200514
+PORTREVISION=	1
 CATEGORIES=	devel
 PKGNAMESUFFIX=	${PHP_PKGNAMESUFFIX}
 
@@ -11,18 +12,21 @@ COMMENT=	Open source, software engineering platform
 LICENSE=	APACHE20
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
+IGNORE_WITH_PHP=74
+
 RUN_DEPENDS=	arcanist-lib${PHP_PKGNAMESUFFIX}>=20200514:devel/arcanist-lib@${PHP_FLAVOR} \
 		git:devel/git
 
 USES=		php:flavors shebangfix
-IGNORE_WITH_PHP=	74
 
 REINPLACE_ARGS=	-i ""
-SHEBANG_FILES=	scripts/*.php \
+SHEBANG_FILES=	resources/timezones/*.php \
+		scripts/*.php \
 		scripts/almanac/*.php \
 		scripts/cache/*.php \
 		scripts/celerity/*.php \
 		scripts/daemon/*.php \
+		scripts/daemon/exec/exec_daemon.php \
 		scripts/diviner/*.php \
 		scripts/drydock/*.php \
 		scripts/fact/*.php \
@@ -40,6 +44,7 @@ SHEBANG_FILES=	scripts/*.php \
 		scripts/symbols/*.php \
 		scripts/util/*.php \
 		support/aphlict/server/*.php
+
 USE_PHP=	ctype curl fileinfo filter hash iconv mbstring mysqli openssl \
 		pcntl posix zip
 
@@ -75,6 +80,10 @@ post-patch:
 		 s|PrintLastLog no||g; \
 		 s|PidFile /var/run/sshd-phabricator.pid||g' \
 		${WRKSRC}/resources/sshd/sshd_config.phabricator.example
+	@${REINPLACE_CMD} \
+		's|%%PHP_CMD%%|${PREFIX}/bin/php|g' \
+		${WRKSRC}/scripts/celerity/install_merge.sh \
+		${WRKSRC}/src/infrastructure/testing/fixture/PhabricatorStorageFixtureScopeGuard.php
 
 do-install:
 	@${MKDIR} ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/conf/local

Added: head/devel/phabricator/files/patch-scripts_celerity_install__merge.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/phabricator/files/patch-scripts_celerity_install__merge.sh	Tue May 19 15:24:21 2020	(r535863)
@@ -0,0 +1,8 @@
+--- scripts/celerity/install_merge.sh.orig	2020-05-19 10:53:29 UTC
++++ scripts/celerity/install_merge.sh
+@@ -6,4 +6,4 @@ echo "resources/celerity/map.php merge=celerity" \
+ git config merge.celerity.name "Celerity Mapper"
+ 
+ git config merge.celerity.driver \
+-  'php $GIT_DIR/../bin/celerity map'
++  '%%PHP_CMD%% $GIT_DIR/../bin/celerity map'

Added: head/devel/phabricator/files/patch-src_infrastructure_testing_fixture_PhabricatorStorageFixtureScopeGuard.php
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/devel/phabricator/files/patch-src_infrastructure_testing_fixture_PhabricatorStorageFixtureScopeGuard.php	Tue May 19 15:24:21 2020	(r535863)
@@ -0,0 +1,20 @@
+--- src/infrastructure/testing/fixture/PhabricatorStorageFixtureScopeGuard.php.orig	2020-05-19 10:51:50 UTC
++++ src/infrastructure/testing/fixture/PhabricatorStorageFixtureScopeGuard.php
+@@ -11,7 +11,7 @@ final class PhabricatorStorageFixtureScopeGuard extend
+     $this->name = $name;
+ 
+     execx(
+-      'php %s upgrade --force --namespace %s',
++      '%%PHP_CMD%% %s upgrade --force --namespace %s',
+       $this->getStorageBinPath(),
+       $this->name);
+ 
+@@ -30,7 +30,7 @@ final class PhabricatorStorageFixtureScopeGuard extend
+     PhabricatorLiskDAO::closeAllConnections();
+ 
+     execx(
+-      'php %s destroy --force --namespace %s',
++      '%%PHP_CMD%% %s destroy --force --namespace %s',
+       $this->getStorageBinPath(),
+       $this->name);
+   }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005191524.04JFOLb4077539>