diff --git a/devel/phabricator/Makefile b/devel/phabricator/Makefile index ebb9459890e4..4a8b304777f5 100644 --- a/devel/phabricator/Makefile +++ b/devel/phabricator/Makefile @@ -1,92 +1,90 @@ PORTNAME= phabricator PORTVERSION= 20211218 +PORTREVISION= 1 CATEGORIES= devel PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} -PATCH_SITES= https://github.com/grembo/phabricator/commit/ -PATCHFILES= 0851b89eb6633dd792cd4eb10c26f86c2f0da56a.patch:-p1 - MAINTAINER= grembo@FreeBSD.org COMMENT= Open source, software engineering platform WWW= https://www.phacility.com/phabricator/ LICENSE= APACHE20 LICENSE_FILE= ${WRKSRC}/LICENSE -RUN_DEPENDS= arcanist-lib${PHP_PKGNAMESUFFIX}>=20210113_1:devel/arcanist-lib@${PHP_FLAVOR} \ +RUN_DEPENDS= arcanist-lib${PHP_PKGNAMESUFFIX}>=20210113_4:devel/arcanist-lib@${PHP_FLAVOR} \ git:devel/git USES= cpe php:cli,flavors shebangfix CPE_VENDOR= phacility 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 \ scripts/files/*.php \ scripts/lipsum/*.php \ scripts/mail/*.php \ scripts/repository/*.php \ scripts/search/*.php \ scripts/setup/*.php \ scripts/ssh/*.php \ scripts/sql/*.php \ scripts/ssh/*.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 OPTIONS_DEFINE= GD OPCACHE OPTIONS_DEFAULT=GD OPCACHE OPCACHE_DESC?= Use OPcache to improve performance GD_USE= PHP=gd OPCACHE_RUN_DEPENDS= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/apcu.so:devel/pecl-APCu@${PHP_FLAVOR} OPCACHE_USE= PHP=opcache USE_GITHUB= yes NO_BUILD= yes NO_ARCH= yes USE_RC_SUBR= phd SUB_FILES= pkg-message PORTSCOUT= ignore:1 GH_ACCOUNT= phacility GH_TAGNAME= dec9522 PHP_DESTDIR= lib/php/phabricator post-patch: @${SED} 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${FILESDIR}/phabricator-sudoers.sample > ${WRKSRC}/resources/sshd/phabricator-sudoers.sample @${REINPLACE_CMD} \ 's|/path/to/phabricator|${LOCALBASE}/lib/php/phabricator|g; \ s|vcs-user|git|g' \ ${WRKSRC}/resources/sshd/phabricator-ssh-hook.sh @${REINPLACE_CMD} \ 's|/usr/libexec/phabricator-ssh-hook.sh|${LOCALBASE}/lib/php/phabricator/resources/sshd/phabricator-ssh-hook.sh|; \ s|vcs-user|git|g; \ 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 ${INSTALL_DATA} ${FILESDIR}/local.json.sample \ ${STAGEDIR}${PREFIX}/${PHP_DESTDIR}/conf/local cd ${WRKSRC} ; ${PAX} -rw * ${STAGEDIR}${PREFIX}/${PHP_DESTDIR} .include diff --git a/devel/phabricator/distinfo b/devel/phabricator/distinfo index 0af7b269e6eb..2bfe2c303158 100644 --- a/devel/phabricator/distinfo +++ b/devel/phabricator/distinfo @@ -1,5 +1,3 @@ -TIMESTAMP = 1646412485 +TIMESTAMP = 1675186465 SHA256 (phacility-phabricator-20211218-dec9522_GH0.tar.gz) = 2b81f68c2fa142f14ca47fa317354381caf29c28dcef1d8d82de46256d87afa4 SIZE (phacility-phabricator-20211218-dec9522_GH0.tar.gz) = 9413445 -SHA256 (0851b89eb6633dd792cd4eb10c26f86c2f0da56a.patch) = 6bc4fc545658ba612a6decf7daa7033e5471313960f04db33d9d3b9c99308202 -SIZE (0851b89eb6633dd792cd4eb10c26f86c2f0da56a.patch) = 3502 diff --git a/devel/phabricator/files/patch-externals_stripe-php_lib_Stripe_ApiResource.php b/devel/phabricator/files/patch-externals_stripe-php_lib_Stripe_ApiResource.php new file mode 100644 index 000000000000..9c1a5f105445 --- /dev/null +++ b/devel/phabricator/files/patch-externals_stripe-php_lib_Stripe_ApiResource.php @@ -0,0 +1,11 @@ +--- externals/stripe-php/lib/Stripe/ApiResource.php.orig 2021-12-18 19:11:09 UTC ++++ externals/stripe-php/lib/Stripe/ApiResource.php +@@ -59,7 +59,7 @@ abstract class Stripe_ApiResource extends Stripe_Objec + public static function classUrl($class) + { + $base = self::_scopedLsb($class, 'className', $class); +- return "/v1/${base}s"; ++ return "/v1/{$base}s"; + } + + /** diff --git a/devel/phabricator/files/patch-externals_stripe-php_lib_Stripe_SingletonApiResource.php b/devel/phabricator/files/patch-externals_stripe-php_lib_Stripe_SingletonApiResource.php new file mode 100644 index 000000000000..9f3d08b484f5 --- /dev/null +++ b/devel/phabricator/files/patch-externals_stripe-php_lib_Stripe_SingletonApiResource.php @@ -0,0 +1,11 @@ +--- externals/stripe-php/lib/Stripe/SingletonApiResource.php.orig 2021-12-18 19:11:09 UTC ++++ externals/stripe-php/lib/Stripe/SingletonApiResource.php +@@ -16,7 +16,7 @@ abstract class Stripe_SingletonApiResource extends Str + public static function classUrl($class) + { + $base = self::className($class); +- return "/v1/${base}"; ++ return "/v1/{$base}"; + } + + /** diff --git a/devel/phabricator/files/patch-src_applications_diffusion_conduit_DiffusionHistoryQueryConduitAPIMethod.php b/devel/phabricator/files/patch-src_applications_diffusion_conduit_DiffusionHistoryQueryConduitAPIMethod.php new file mode 100644 index 000000000000..2dad984b8f7e --- /dev/null +++ b/devel/phabricator/files/patch-src_applications_diffusion_conduit_DiffusionHistoryQueryConduitAPIMethod.php @@ -0,0 +1,11 @@ +--- src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php.orig 2021-12-18 19:11:09 UTC ++++ src/applications/diffusion/conduit/DiffusionHistoryQueryConduitAPIMethod.php +@@ -55,7 +55,7 @@ final class DiffusionHistoryQueryConduitAPIMethod + $limit = $request->getValue('limit'); + + if (strlen($against_hash)) { +- $commit_range = "${against_hash}..${commit_hash}"; ++ $commit_range = "{$against_hash}..{$commit_hash}"; + } else { + $commit_range = $commit_hash; + } diff --git a/devel/phabricator/files/patch-src_applications_herald_phid_HeraldTranscriptPHIDType.php b/devel/phabricator/files/patch-src_applications_herald_phid_HeraldTranscriptPHIDType.php new file mode 100644 index 000000000000..5b1012c9f3b1 --- /dev/null +++ b/devel/phabricator/files/patch-src_applications_herald_phid_HeraldTranscriptPHIDType.php @@ -0,0 +1,11 @@ +--- src/applications/herald/phid/HeraldTranscriptPHIDType.php.orig 2021-12-18 19:11:09 UTC ++++ src/applications/herald/phid/HeraldTranscriptPHIDType.php +@@ -35,7 +35,7 @@ final class HeraldTranscriptPHIDType extends Phabricat + $id = $xscript->getID(); + + $handle->setName(pht('Transcript %s', $id)); +- $handle->setURI("/herald/transcript/${id}/"); ++ $handle->setURI("/herald/transcript/{$id}/"); + } + } + diff --git a/devel/phabricator/files/patch-src_applications_project_editor_PhabricatorProjectTransactionEditor.php b/devel/phabricator/files/patch-src_applications_project_editor_PhabricatorProjectTransactionEditor.php new file mode 100644 index 000000000000..dac62c904051 --- /dev/null +++ b/devel/phabricator/files/patch-src_applications_project_editor_PhabricatorProjectTransactionEditor.php @@ -0,0 +1,36 @@ +--- src/applications/project/editor/PhabricatorProjectTransactionEditor.php.orig 2021-12-18 19:11:09 UTC ++++ src/applications/project/editor/PhabricatorProjectTransactionEditor.php +@@ -352,10 +352,32 @@ final class PhabricatorProjectTransactionEditor + // parent project, since this is the governing rule. + + $parent = $copy->getParentProject(); ++ if ($parent != null) { ++ $parent_phid = $parent->getPHID(); ++ } else { // can happen when using conduit API ++ foreach ($xactions as $xaction) { ++ if ($xaction->getTransactionType() != PhabricatorProjectMilestoneTransaction::TRANSACTIONTYPE) { ++ continue; ++ } ++ $parent_phid = (string)$xaction->getNewValue(); ++ $project = id(new PhabricatorProjectQuery()) ++ ->setViewer($this->getActor()) ++ ->withPHIDs(array($parent_phid)) ++ ->requireCapabilities( ++ array( ++ PhabricatorPolicyCapability::CAN_VIEW, ++ PhabricatorPolicyCapability::CAN_EDIT, ++ )) ++ ->executeOne(); + ++ $copy->attachParentProject($project); ++ $copy->setParentProjectPHID($parent_phid); ++ } ++ } ++ + $parent = id(new PhabricatorProjectQuery()) + ->setViewer($this->getActor()) +- ->withPHIDs(array($parent->getPHID())) ++ ->withPHIDs(array($parent_phid)) + ->needMembers(true) + ->executeOne(); + $members = $parent->getMemberPHIDs(); diff --git a/devel/phabricator/files/patch-src_infrastructure_markup_blockrule_PhutilRemarkupListBlockRule.php b/devel/phabricator/files/patch-src_infrastructure_markup_blockrule_PhutilRemarkupListBlockRule.php new file mode 100644 index 000000000000..adc982b01449 --- /dev/null +++ b/devel/phabricator/files/patch-src_infrastructure_markup_blockrule_PhutilRemarkupListBlockRule.php @@ -0,0 +1,11 @@ +--- src/infrastructure/markup/blockrule/PhutilRemarkupListBlockRule.php.orig 2021-12-18 19:11:09 UTC ++++ src/infrastructure/markup/blockrule/PhutilRemarkupListBlockRule.php +@@ -446,7 +446,7 @@ final class PhutilRemarkupListBlockRule extends Phutil + } + + $start_attr = null; +- if (ctype_digit($starts_at) && $starts_at > 1) { ++ if ((is_int($starts_at) || ctype_digit($starts_at)) && $starts_at > 1) { + $start_attr = hsprintf(' start="%d"', $starts_at); + } + diff --git a/devel/phabricator/files/pkg-message.in b/devel/phabricator/files/pkg-message.in index f03f06d656cd..3e61caa5537a 100644 --- a/devel/phabricator/files/pkg-message.in +++ b/devel/phabricator/files/pkg-message.in @@ -1,92 +1,98 @@ [ { type: install message: < --password EOM } ]