From 5061131e7c218c83eeffdab0b6a03b7331d6d14a Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sun, 2 Sep 2018 16:54:44 +0100 Subject: www-client/arcanist: Version bump Package-Manager: Portage-2.3.40, Repoman-2.3.9 --- www-client/arcanist/arcanist-20180720.ebuild | 148 -------------------- www-client/arcanist/arcanist-20180824.ebuild | 148 ++++++++++++++++++++ ...VERSION-for-files-in-usr-share-PN-GIT_COM.patch | 53 -------- .../20180720-MINOR-Disable-self-upgrade.patch | 149 --------------------- ...VERSION-for-files-in-usr-share-PN-GIT_COM.patch | 53 ++++++++ .../20180824-MINOR-Disable-self-upgrade.patch | 149 +++++++++++++++++++++ ...VERSION-for-files-in-usr-share-PN-GIT_COM.patch | 2 +- .../files/9999-MINOR-Disable-self-upgrade.patch | 2 +- 8 files changed, 352 insertions(+), 352 deletions(-) delete mode 100644 www-client/arcanist/arcanist-20180720.ebuild create mode 100644 www-client/arcanist/arcanist-20180824.ebuild delete mode 100644 www-client/arcanist/files/20180720-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch delete mode 100644 www-client/arcanist/files/20180720-MINOR-Disable-self-upgrade.patch create mode 100644 www-client/arcanist/files/20180824-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch create mode 100644 www-client/arcanist/files/20180824-MINOR-Disable-self-upgrade.patch (limited to 'www-client') diff --git a/www-client/arcanist/arcanist-20180720.ebuild b/www-client/arcanist/arcanist-20180720.ebuild deleted file mode 100644 index 831e6111..00000000 --- a/www-client/arcanist/arcanist-20180720.ebuild +++ /dev/null @@ -1,148 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python2_7 ) -PYTHON_REQ_USE="ncurses" - -inherit bash-completion-r1 python-single-r1 git-r3 - -DESCRIPTION="Command-line tool for Phabricator" -HOMEPAGE="https://www.phacility.com" -EGIT_REPO_URI="https://github.com/phacility/arcanist.git" -EGIT_BRANCH="stable" -EGIT_COMMIT="830661f62833e4601e31854532321bb30be74440" - -LICENSE="Apache-2.0" -SLOT="stable" -KEYWORDS="~amd64 ~x86" -IUSE="git lint mercurial subversion ssl test" -REQUIRED_USE="test? ( lint )" - -DEPEND="!${CATEGORY}/${PN}:0 - virtual/awk:0 - test? ( - dev-lang/php[xmlwriter] - =dev-php/libphutil-20180720:stable[test] - )" -RDEPEND="dev-lang/php[cli,curl,json,ssl?] - =dev-php/libphutil-20180720:stable[ssl?] - git? ( dev-vcs/git:0 ) - mercurial? ( dev-vcs/mercurial:0 ) - subversion? ( dev-vcs/subversion:0 ) - lint? ( - app-admin/puppet-lint:0 - dev-haskell/hlint:0 - dev-php/PHP_CodeSniffer:0 - dev-python/pylint:0[${PYTHON_USEDEP}] - dev-python/flake8:0[${PYTHON_USEDEP}] - dev-util/cppcheck:0 - dev-util/cpplint:0 - net-libs/nodejs:0[npm] - )" - -src_test() { - einfo "Note that you need to install some Node JS script manually:" - einfo " npm install -g coffeelint" - einfo " npm install -g csslint" - einfo " npm install -g jscs" - einfo " npm install -g jshint" - einfo " npm install -g jsonlint" - einfo " npm install -g less" - - local GIT_NAME="${FUNCNAME} for ${CATEGORY}/${PF}" - local GIT_EMAIL="portage@localhost" - - export GIT_AUTHOR_NAME="${GIT_NAME}" - export GIT_AUTHOR_EMAIL="${GIT_EMAIL}" - - export GIT_COMMITTER_NAME="${GIT_NAME}" - export GIT_COMMITTER_EMAIL="${GIT_EMAIL}" - - # Unable to locate binary "golint" to run linter ArcanistGoLintLinter. You may need to install the binary, or adjust your linter configuration. - # TO INSTALL: Install Golint using `go get github.com/golang/lint/golint`. - - # Set config in .git/arc/config for ArcanistPyLintLinter - bin/arc set-config --local lint.pylint.codes.advice '^(C|R).*' > /dev/null - bin/arc set-config --local lint.pylint.codes.error '^(E|F).*' > /dev/null - bin/arc set-config --local lint.pylint.codes.warning '^W.*' > /dev/null - - # + https://secure.phabricator.com/T7170 - - bin/arc unit --everything --no-coverage || die "arc unit failed" -} - -src_prepare() { - default - - git log --format='%H %ct' -n 1 > "${S}/GIT_COMMIT_INFO" - git remote add origin "${EGIT_REPO_URI}" - git remote -v > "${S}/GIT_REMOTE_INFO" - - eapply "${FILESDIR}/${PV}-MINOR-Disable-self-upgrade.patch" - eapply "${FILESDIR}/${PV}-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch" - - find "${S}" -type f -name .gitignore -print0 \ - | xargs -0 --no-run-if-empty -- \ - rm - - rm bin/*.bat - - # Replace 'env' shebang to files it point to - find "${S}" -type f \ - | sort \ - | xargs -n 1 --no-run-if-empty -- \ - awk 'NR == 1 && /^#!\/usr\/bin\/env/ {print FILENAME}' \ - | while read ; do - set -- $(sed -ne '1 s:^#!\([^ ]*\) ::p;q' ${REPLY}) - cmd="$1" ; shift ; args="$@" - - case "${cmd}" in - bash|php) ;; - *) continue ;; - esac - - path="$(type -p ${cmd})" || continue - [[ -z "${path}" ]] && continue - - einfo "Replace ${REPLY/#${S}\/} shebang to #!${path} ${args}" - sed -i \ - -e "1 s:^#!.*:#!${path} ${args}:" \ - "${REPLY}" - eend $? - done -} - -src_install() { - newbashcomp resources/shell/bash-completion "arc" - - insinto "/usr/share/${PN}" - doins GIT_COMMIT_INFO GIT_REMOTE_INFO - - insinto "/usr/share/php/${PN}" - doins -r bin externals resources scripts src - - python_scriptinto "/usr/share/php/${PN}/scripts" - python_doscript scripts/breakout.py - - # Make executable all shebanged files - find "${ED}" -type f \ - | xargs -n 1 --no-run-if-empty -- \ - awk 'NR == 1 && /^#!/ {print FILENAME}' \ - | sed -e "s:${ED}:/:" \ - | xargs --no-run-if-empty -- \ - fperms 755 - - dosym "../share/php/${PN}/bin/arc" /usr/bin/arc - - dodoc NOTICE README.md -} - -pkg_postinst() { - if use lint; then - elog - elog "Some linter need external NodeJS script. To install them, use:" - elog " npm install -g csslint" - fi -} diff --git a/www-client/arcanist/arcanist-20180824.ebuild b/www-client/arcanist/arcanist-20180824.ebuild new file mode 100644 index 00000000..20eabe27 --- /dev/null +++ b/www-client/arcanist/arcanist-20180824.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="ncurses" + +inherit bash-completion-r1 python-single-r1 git-r3 + +DESCRIPTION="Command-line tool for Phabricator" +HOMEPAGE="https://www.phacility.com" +EGIT_REPO_URI="https://github.com/phacility/arcanist.git" +EGIT_BRANCH="stable" +EGIT_COMMIT="d09b5bebbccd2eaa092e35c73ac0fc99b6558ba4" + +LICENSE="Apache-2.0" +SLOT="stable" +KEYWORDS="~amd64 ~x86" +IUSE="git lint mercurial subversion ssl test" +REQUIRED_USE="test? ( lint )" + +DEPEND="!${CATEGORY}/${PN}:0 + virtual/awk:0 + test? ( + dev-lang/php[xmlwriter] + =dev-php/libphutil-20180824:stable[test] + )" +RDEPEND="dev-lang/php[cli,curl,json,ssl?] + =dev-php/libphutil-20180824:stable[ssl?] + git? ( dev-vcs/git:0 ) + mercurial? ( dev-vcs/mercurial:0 ) + subversion? ( dev-vcs/subversion:0 ) + lint? ( + app-admin/puppet-lint:0 + dev-haskell/hlint:0 + dev-php/PHP_CodeSniffer:0 + dev-python/pylint:0[${PYTHON_USEDEP}] + dev-python/flake8:0[${PYTHON_USEDEP}] + dev-util/cppcheck:0 + dev-util/cpplint:0 + net-libs/nodejs:0[npm] + )" + +src_test() { + einfo "Note that you need to install some Node JS script manually:" + einfo " npm install -g coffeelint" + einfo " npm install -g csslint" + einfo " npm install -g jscs" + einfo " npm install -g jshint" + einfo " npm install -g jsonlint" + einfo " npm install -g less" + + local GIT_NAME="${FUNCNAME} for ${CATEGORY}/${PF}" + local GIT_EMAIL="portage@localhost" + + export GIT_AUTHOR_NAME="${GIT_NAME}" + export GIT_AUTHOR_EMAIL="${GIT_EMAIL}" + + export GIT_COMMITTER_NAME="${GIT_NAME}" + export GIT_COMMITTER_EMAIL="${GIT_EMAIL}" + + # Unable to locate binary "golint" to run linter ArcanistGoLintLinter. You may need to install the binary, or adjust your linter configuration. + # TO INSTALL: Install Golint using `go get github.com/golang/lint/golint`. + + # Set config in .git/arc/config for ArcanistPyLintLinter + bin/arc set-config --local lint.pylint.codes.advice '^(C|R).*' > /dev/null + bin/arc set-config --local lint.pylint.codes.error '^(E|F).*' > /dev/null + bin/arc set-config --local lint.pylint.codes.warning '^W.*' > /dev/null + + # + https://secure.phabricator.com/T7170 + + bin/arc unit --everything --no-coverage || die "arc unit failed" +} + +src_prepare() { + default + + git log --format='%H %ct' -n 1 > "${S}/GIT_COMMIT_INFO" + git remote add origin "${EGIT_REPO_URI}" + git remote -v > "${S}/GIT_REMOTE_INFO" + + eapply "${FILESDIR}/${PV}-MINOR-Disable-self-upgrade.patch" + eapply "${FILESDIR}/${PV}-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch" + + find "${S}" -type f -name .gitignore -print0 \ + | xargs -0 --no-run-if-empty -- \ + rm + + rm bin/*.bat + + # Replace 'env' shebang to files it point to + find "${S}" -type f \ + | sort \ + | xargs -n 1 --no-run-if-empty -- \ + awk 'NR == 1 && /^#!\/usr\/bin\/env/ {print FILENAME}' \ + | while read ; do + set -- $(sed -ne '1 s:^#!\([^ ]*\) ::p;q' ${REPLY}) + cmd="$1" ; shift ; args="$@" + + case "${cmd}" in + bash|php) ;; + *) continue ;; + esac + + path="$(type -p ${cmd})" || continue + [[ -z "${path}" ]] && continue + + einfo "Replace ${REPLY/#${S}\/} shebang to #!${path} ${args}" + sed -i \ + -e "1 s:^#!.*:#!${path} ${args}:" \ + "${REPLY}" + eend $? + done +} + +src_install() { + newbashcomp resources/shell/bash-completion "arc" + + insinto "/usr/share/${PN}" + doins GIT_COMMIT_INFO GIT_REMOTE_INFO + + insinto "/usr/share/php/${PN}" + doins -r bin externals resources scripts src + + python_scriptinto "/usr/share/php/${PN}/scripts" + python_doscript scripts/breakout.py + + # Make executable all shebanged files + find "${ED}" -type f \ + | xargs -n 1 --no-run-if-empty -- \ + awk 'NR == 1 && /^#!/ {print FILENAME}' \ + | sed -e "s:${ED}:/:" \ + | xargs --no-run-if-empty -- \ + fperms 755 + + dosym "../share/php/${PN}/bin/arc" /usr/bin/arc + + dodoc NOTICE README.md +} + +pkg_postinst() { + if use lint; then + elog + elog "Some linter need external NodeJS script. To install them, use:" + elog " npm install -g csslint" + fi +} diff --git a/www-client/arcanist/files/20180720-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch b/www-client/arcanist/files/20180720-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch deleted file mode 100644 index e77c9949..00000000 --- a/www-client/arcanist/files/20180720-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 903378385e0e25e479417e30fd0f3d8988ef0458 Mon Sep 17 00:00:00 2001 -From: Bertrand Jacquin -Date: Sun, 18 Dec 2016 01:59:52 +0000 -Subject: [PATCH 1/2] MEDIUM: Get VERSION for files in - /usr/share//GIT_COMMIT_INFO rather than from git - ---- - src/workflow/ArcanistVersionWorkflow.php | 27 ++++++++------------------- - 1 file changed, 8 insertions(+), 19 deletions(-) - -diff --git a/src/workflow/ArcanistVersionWorkflow.php b/src/workflow/ArcanistVersionWorkflow.php -index 9c470fc6ea05..fefd972786dc 100644 ---- a/src/workflow/ArcanistVersionWorkflow.php -+++ b/src/workflow/ArcanistVersionWorkflow.php -@@ -35,30 +35,19 @@ EOTEXT - } - - $roots = array( -- 'arcanist' => dirname(phutil_get_library_root('arcanist')), -- 'libphutil' => dirname(phutil_get_library_root('phutil')), -+ 'arcanist', -+ 'libphutil' - ); - -- foreach ($roots as $lib => $root) { -- $working_copy = ArcanistWorkingCopyIdentity::newFromPath($root); -- $configuration_manager = clone $this->getConfigurationManager(); -- $configuration_manager->setWorkingCopyIdentity($working_copy); -- $repository = ArcanistRepositoryAPI::newAPIFromConfigurationManager( -- $configuration_manager); -- -- if (!Filesystem::pathExists($repository->getMetadataPath())) { -+ foreach ($roots as $lib) { -+ $commit_info = "/usr/share/" . $lib . "/GIT_COMMIT_INFO"; -+ if (!Filesystem::pathExists($commit_info)) { - throw new ArcanistUsageException( -- pht('%s is not a git working copy.', $lib)); -+ pht('%s has no version registered in %s.', $lib, $commit_info)); - } - -- // NOTE: Carefully execute these commands in a way that works on Windows -- // until T8298 is properly fixed. See PHI52. -- -- list($commit) = $repository->execxLocal('log -1 --format=%%H'); -- $commit = trim($commit); -- -- list($timestamp) = $repository->execxLocal('log -1 --format=%%ct'); -- $timestamp = trim($timestamp); -+ $stdout = file_get_contents($commit_info); -+ list($commit, $timestamp) = explode(' ', $stdout); - - $console->writeOut( - "%s %s (%s)\n", diff --git a/www-client/arcanist/files/20180720-MINOR-Disable-self-upgrade.patch b/www-client/arcanist/files/20180720-MINOR-Disable-self-upgrade.patch deleted file mode 100644 index ef0c7d97..00000000 --- a/www-client/arcanist/files/20180720-MINOR-Disable-self-upgrade.patch +++ /dev/null @@ -1,149 +0,0 @@ -From d6cac3680477ec14b601cf7d8b19b1f7103c67db Mon Sep 17 00:00:00 2001 -From: Bertrand Jacquin -Date: Sun, 18 Dec 2016 02:15:13 +0000 -Subject: [PATCH 2/2] MINOR: Disable self upgrade - ---- - src/__phutil_library_map__.php | 2 - - src/workflow/ArcanistUpgradeWorkflow.php | 112 ------------------------------- - 2 files changed, 114 deletions(-) - delete mode 100644 src/workflow/ArcanistUpgradeWorkflow.php - -diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php -index e88a86215041..7667b81ed603 100644 ---- a/src/__phutil_library_map__.php -+++ b/src/__phutil_library_map__.php -@@ -386,7 +386,6 @@ phutil_register_library_map(array( - 'ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase.php', - 'ArcanistUnsafeDynamicStringXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUnsafeDynamicStringXHPASTLinterRule.php', - 'ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase.php', -- 'ArcanistUpgradeWorkflow' => 'workflow/ArcanistUpgradeWorkflow.php', - 'ArcanistUploadWorkflow' => 'workflow/ArcanistUploadWorkflow.php', - 'ArcanistUsageException' => 'exception/ArcanistUsageException.php', - 'ArcanistUseStatementNamespacePrefixXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUseStatementNamespacePrefixXHPASTLinterRule.php', -@@ -806,7 +805,6 @@ phutil_register_library_map(array( - 'ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase', - 'ArcanistUnsafeDynamicStringXHPASTLinterRule' => 'ArcanistXHPASTLinterRule', - 'ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase', -- 'ArcanistUpgradeWorkflow' => 'ArcanistWorkflow', - 'ArcanistUploadWorkflow' => 'ArcanistWorkflow', - 'ArcanistUsageException' => 'Exception', - 'ArcanistUseStatementNamespacePrefixXHPASTLinterRule' => 'ArcanistXHPASTLinterRule', -diff --git a/src/workflow/ArcanistUpgradeWorkflow.php b/src/workflow/ArcanistUpgradeWorkflow.php -deleted file mode 100644 -index 50449ef75f27..000000000000 ---- a/src/workflow/ArcanistUpgradeWorkflow.php -+++ /dev/null -@@ -1,112 +0,0 @@ -- dirname(phutil_get_library_root('phutil')), -- 'arcanist' => dirname(phutil_get_library_root('arcanist')), -- ); -- -- foreach ($roots as $lib => $root) { -- echo phutil_console_format( -- "%s\n", -- pht('Upgrading %s...', $lib)); -- -- $working_copy = ArcanistWorkingCopyIdentity::newFromPath($root); -- $configuration_manager = clone $this->getConfigurationManager(); -- $configuration_manager->setWorkingCopyIdentity($working_copy); -- $repository = ArcanistRepositoryAPI::newAPIFromConfigurationManager( -- $configuration_manager); -- -- if (!Filesystem::pathExists($repository->getMetadataPath())) { -- throw new ArcanistUsageException( -- pht( -- "%s must be in its git working copy to be automatically upgraded. ". -- "This copy of %s (in '%s') is not in a git working copy.", -- $lib, -- $lib, -- $root)); -- } -- -- $this->setRepositoryAPI($repository); -- -- // NOTE: Don't use requireCleanWorkingCopy() here because it tries to -- // amend changes and generally move the workflow forward. We just want to -- // abort if there are local changes and make the user sort things out. -- $uncommitted = $repository->getUncommittedStatus(); -- if ($uncommitted) { -- $message = pht( -- 'You have uncommitted changes in the working copy for this '. -- 'library:'); -- -- $list = id(new PhutilConsoleList()) -- ->setWrap(false) -- ->addItems(array_keys($uncommitted)); -- -- id(new PhutilConsoleBlock()) -- ->addParagraph($message) -- ->addList($list) -- ->draw(); -- -- throw new ArcanistUsageException( -- pht('`arc upgrade` can only upgrade clean working copies.')); -- } -- -- $branch_name = $repository->getBranchName(); -- if ($branch_name != 'master' && $branch_name != 'stable') { -- throw new ArcanistUsageException( -- pht( -- "%s must be on either branch '%s' or '%s' to be automatically ". -- "upgraded. ". -- "This copy of %s (in '%s') is on branch '%s'.", -- $lib, -- 'master', -- 'stable', -- $lib, -- $root, -- $branch_name)); -- } -- -- chdir($root); -- -- try { -- execx('git pull --rebase'); -- } catch (Exception $ex) { -- // If we failed, try to go back to the old state, then throw the -- // original exception. -- exec_manual('git rebase --abort'); -- throw $ex; -- } -- } -- -- echo phutil_console_format( -- "**%s** %s\n", -- pht('Updated!'), -- pht('Your copy of arc is now up to date.')); -- return 0; -- } -- --} diff --git a/www-client/arcanist/files/20180824-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch b/www-client/arcanist/files/20180824-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch new file mode 100644 index 00000000..30f75a8e --- /dev/null +++ b/www-client/arcanist/files/20180824-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch @@ -0,0 +1,53 @@ +From 45ac5544feb3089139beef467a2b25bd22aa9568 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +Date: Sun, 18 Dec 2016 01:59:52 +0000 +Subject: [PATCH 1/2] MEDIUM: Get VERSION for files in + /usr/share//GIT_COMMIT_INFO rather than from git + +--- + src/workflow/ArcanistVersionWorkflow.php | 27 ++++++++------------------- + 1 file changed, 8 insertions(+), 19 deletions(-) + +diff --git a/src/workflow/ArcanistVersionWorkflow.php b/src/workflow/ArcanistVersionWorkflow.php +index 9c470fc6ea05..fefd972786dc 100644 +--- a/src/workflow/ArcanistVersionWorkflow.php ++++ b/src/workflow/ArcanistVersionWorkflow.php +@@ -35,30 +35,19 @@ EOTEXT + } + + $roots = array( +- 'arcanist' => dirname(phutil_get_library_root('arcanist')), +- 'libphutil' => dirname(phutil_get_library_root('phutil')), ++ 'arcanist', ++ 'libphutil' + ); + +- foreach ($roots as $lib => $root) { +- $working_copy = ArcanistWorkingCopyIdentity::newFromPath($root); +- $configuration_manager = clone $this->getConfigurationManager(); +- $configuration_manager->setWorkingCopyIdentity($working_copy); +- $repository = ArcanistRepositoryAPI::newAPIFromConfigurationManager( +- $configuration_manager); +- +- if (!Filesystem::pathExists($repository->getMetadataPath())) { ++ foreach ($roots as $lib) { ++ $commit_info = "/usr/share/" . $lib . "/GIT_COMMIT_INFO"; ++ if (!Filesystem::pathExists($commit_info)) { + throw new ArcanistUsageException( +- pht('%s is not a git working copy.', $lib)); ++ pht('%s has no version registered in %s.', $lib, $commit_info)); + } + +- // NOTE: Carefully execute these commands in a way that works on Windows +- // until T8298 is properly fixed. See PHI52. +- +- list($commit) = $repository->execxLocal('log -1 --format=%%H'); +- $commit = trim($commit); +- +- list($timestamp) = $repository->execxLocal('log -1 --format=%%ct'); +- $timestamp = trim($timestamp); ++ $stdout = file_get_contents($commit_info); ++ list($commit, $timestamp) = explode(' ', $stdout); + + $console->writeOut( + "%s %s (%s)\n", diff --git a/www-client/arcanist/files/20180824-MINOR-Disable-self-upgrade.patch b/www-client/arcanist/files/20180824-MINOR-Disable-self-upgrade.patch new file mode 100644 index 00000000..955444b0 --- /dev/null +++ b/www-client/arcanist/files/20180824-MINOR-Disable-self-upgrade.patch @@ -0,0 +1,149 @@ +From 029196792081936b7195a8f258dafc2db09b5746 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +Date: Sun, 18 Dec 2016 02:15:13 +0000 +Subject: [PATCH 2/2] MINOR: Disable self upgrade + +--- + src/__phutil_library_map__.php | 2 - + src/workflow/ArcanistUpgradeWorkflow.php | 112 ------------------------------- + 2 files changed, 114 deletions(-) + delete mode 100644 src/workflow/ArcanistUpgradeWorkflow.php + +diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php +index e88a86215041..7667b81ed603 100644 +--- a/src/__phutil_library_map__.php ++++ b/src/__phutil_library_map__.php +@@ -386,7 +386,6 @@ phutil_register_library_map(array( + 'ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase.php', + 'ArcanistUnsafeDynamicStringXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUnsafeDynamicStringXHPASTLinterRule.php', + 'ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase.php', +- 'ArcanistUpgradeWorkflow' => 'workflow/ArcanistUpgradeWorkflow.php', + 'ArcanistUploadWorkflow' => 'workflow/ArcanistUploadWorkflow.php', + 'ArcanistUsageException' => 'exception/ArcanistUsageException.php', + 'ArcanistUseStatementNamespacePrefixXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUseStatementNamespacePrefixXHPASTLinterRule.php', +@@ -806,7 +805,6 @@ phutil_register_library_map(array( + 'ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase', + 'ArcanistUnsafeDynamicStringXHPASTLinterRule' => 'ArcanistXHPASTLinterRule', + 'ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase', +- 'ArcanistUpgradeWorkflow' => 'ArcanistWorkflow', + 'ArcanistUploadWorkflow' => 'ArcanistWorkflow', + 'ArcanistUsageException' => 'Exception', + 'ArcanistUseStatementNamespacePrefixXHPASTLinterRule' => 'ArcanistXHPASTLinterRule', +diff --git a/src/workflow/ArcanistUpgradeWorkflow.php b/src/workflow/ArcanistUpgradeWorkflow.php +deleted file mode 100644 +index 50449ef75f27..000000000000 +--- a/src/workflow/ArcanistUpgradeWorkflow.php ++++ /dev/null +@@ -1,112 +0,0 @@ +- dirname(phutil_get_library_root('phutil')), +- 'arcanist' => dirname(phutil_get_library_root('arcanist')), +- ); +- +- foreach ($roots as $lib => $root) { +- echo phutil_console_format( +- "%s\n", +- pht('Upgrading %s...', $lib)); +- +- $working_copy = ArcanistWorkingCopyIdentity::newFromPath($root); +- $configuration_manager = clone $this->getConfigurationManager(); +- $configuration_manager->setWorkingCopyIdentity($working_copy); +- $repository = ArcanistRepositoryAPI::newAPIFromConfigurationManager( +- $configuration_manager); +- +- if (!Filesystem::pathExists($repository->getMetadataPath())) { +- throw new ArcanistUsageException( +- pht( +- "%s must be in its git working copy to be automatically upgraded. ". +- "This copy of %s (in '%s') is not in a git working copy.", +- $lib, +- $lib, +- $root)); +- } +- +- $this->setRepositoryAPI($repository); +- +- // NOTE: Don't use requireCleanWorkingCopy() here because it tries to +- // amend changes and generally move the workflow forward. We just want to +- // abort if there are local changes and make the user sort things out. +- $uncommitted = $repository->getUncommittedStatus(); +- if ($uncommitted) { +- $message = pht( +- 'You have uncommitted changes in the working copy for this '. +- 'library:'); +- +- $list = id(new PhutilConsoleList()) +- ->setWrap(false) +- ->addItems(array_keys($uncommitted)); +- +- id(new PhutilConsoleBlock()) +- ->addParagraph($message) +- ->addList($list) +- ->draw(); +- +- throw new ArcanistUsageException( +- pht('`arc upgrade` can only upgrade clean working copies.')); +- } +- +- $branch_name = $repository->getBranchName(); +- if ($branch_name != 'master' && $branch_name != 'stable') { +- throw new ArcanistUsageException( +- pht( +- "%s must be on either branch '%s' or '%s' to be automatically ". +- "upgraded. ". +- "This copy of %s (in '%s') is on branch '%s'.", +- $lib, +- 'master', +- 'stable', +- $lib, +- $root, +- $branch_name)); +- } +- +- chdir($root); +- +- try { +- execx('git pull --rebase'); +- } catch (Exception $ex) { +- // If we failed, try to go back to the old state, then throw the +- // original exception. +- exec_manual('git rebase --abort'); +- throw $ex; +- } +- } +- +- echo phutil_console_format( +- "**%s** %s\n", +- pht('Updated!'), +- pht('Your copy of arc is now up to date.')); +- return 0; +- } +- +-} diff --git a/www-client/arcanist/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch b/www-client/arcanist/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch index eb4b4e42..e533f529 100644 --- a/www-client/arcanist/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch +++ b/www-client/arcanist/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch @@ -1,4 +1,4 @@ -From f262ba4adb228fb0dfeb85d85bc1b797d383ee75 Mon Sep 17 00:00:00 2001 +From b4fe999922849673d3675133a8a613a67894a2b5 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sun, 18 Dec 2016 01:59:52 +0000 Subject: [PATCH 1/2] MEDIUM: Get VERSION for files in diff --git a/www-client/arcanist/files/9999-MINOR-Disable-self-upgrade.patch b/www-client/arcanist/files/9999-MINOR-Disable-self-upgrade.patch index b3400bc4..1fd5e008 100644 --- a/www-client/arcanist/files/9999-MINOR-Disable-self-upgrade.patch +++ b/www-client/arcanist/files/9999-MINOR-Disable-self-upgrade.patch @@ -1,4 +1,4 @@ -From 7eb36fa511dce8038b00e882d6210c38f3556571 Mon Sep 17 00:00:00 2001 +From 90e6b85aba54c7e95ae2e95dbcd98e9e694e8dc2 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sun, 18 Dec 2016 02:15:13 +0000 Subject: [PATCH 2/2] MINOR: Disable self upgrade -- cgit v1.2.3