From 4ebbd090408e6dca52b748a6db2e392d8c307fa7 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sat, 30 Sep 2017 16:56:48 +0100 Subject: www-client/arcanist: Version bump Package-Manager: Portage-2.3.8, Repoman-2.3.1 --- www-client/arcanist/arcanist-20170805.ebuild | 152 --------------------- www-client/arcanist/arcanist-20170922.ebuild | 152 +++++++++++++++++++++ ...VERSION-for-files-in-usr-share-PN-GIT_COM.patch | 45 ------ .../20170805-MINOR-Disable-self-upgrade.patch | 149 -------------------- ...VERSION-for-files-in-usr-share-PN-GIT_COM.patch | 53 +++++++ .../20170922-MINOR-Disable-self-upgrade.patch | 149 ++++++++++++++++++++ ...VERSION-for-files-in-usr-share-PN-GIT_COM.patch | 22 ++- .../files/9999-MINOR-Disable-self-upgrade.patch | 8 +- 8 files changed, 373 insertions(+), 357 deletions(-) delete mode 100644 www-client/arcanist/arcanist-20170805.ebuild create mode 100644 www-client/arcanist/arcanist-20170922.ebuild delete mode 100644 www-client/arcanist/files/20170805-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch delete mode 100644 www-client/arcanist/files/20170805-MINOR-Disable-self-upgrade.patch create mode 100644 www-client/arcanist/files/20170922-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch create mode 100644 www-client/arcanist/files/20170922-MINOR-Disable-self-upgrade.patch (limited to 'www-client') diff --git a/www-client/arcanist/arcanist-20170805.ebuild b/www-client/arcanist/arcanist-20170805.ebuild deleted file mode 100644 index da39022e..00000000 --- a/www-client/arcanist/arcanist-20170805.ebuild +++ /dev/null @@ -1,152 +0,0 @@ -# Copyright 1999-2017 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="4e2363d8b26d2bd8ca169c40603b4fb582dab72f" - -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-20170811:stable[test] - )" -RDEPEND="|| ( - dev-lang/php:5.6[cli,curl,json,ssl?] - dev-lang/php:7.1[cli,curl,json,ssl?] - ) - !!dev-lang/php:7.0 - =dev-php/libphutil-20170811: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 "/usr/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-20170922.ebuild b/www-client/arcanist/arcanist-20170922.ebuild new file mode 100644 index 00000000..984e350c --- /dev/null +++ b/www-client/arcanist/arcanist-20170922.ebuild @@ -0,0 +1,152 @@ +# Copyright 1999-2017 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="e88a8c077b3355af0f4f75fbe95d7a4b1239088b" + +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-20170929:stable[test] + )" +RDEPEND="|| ( + dev-lang/php:5.6[cli,curl,json,ssl?] + dev-lang/php:7.1[cli,curl,json,ssl?] + ) + !!dev-lang/php:7.0 + =dev-php/libphutil-20170929: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 "/usr/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/20170805-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch b/www-client/arcanist/files/20170805-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch deleted file mode 100644 index 4852c5a5..00000000 --- a/www-client/arcanist/files/20170805-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch +++ /dev/null @@ -1,45 +0,0 @@ -From eec3932bdd9cbf1aabe16895d05ff5ac9773538f 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 | 19 +++++++------------ - 1 file changed, 7 insertions(+), 12 deletions(-) - -diff --git a/src/workflow/ArcanistVersionWorkflow.php b/src/workflow/ArcanistVersionWorkflow.php -index 807c573275bf..fefd972786dc 100644 ---- a/src/workflow/ArcanistVersionWorkflow.php -+++ b/src/workflow/ArcanistVersionWorkflow.php -@@ -35,23 +35,18 @@ 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)); - } - -- list($stdout) = $repository->execxLocal('log -1 --format=%s', '%H %ct'); -+ $stdout = file_get_contents($commit_info); - list($commit, $timestamp) = explode(' ', $stdout); - - $console->writeOut( diff --git a/www-client/arcanist/files/20170805-MINOR-Disable-self-upgrade.patch b/www-client/arcanist/files/20170805-MINOR-Disable-self-upgrade.patch deleted file mode 100644 index 8a265ef1..00000000 --- a/www-client/arcanist/files/20170805-MINOR-Disable-self-upgrade.patch +++ /dev/null @@ -1,149 +0,0 @@ -From d9ff4ac56be8501a1185a119ba75dade2d8f98ab 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 2a3cfcf817b2..a9327dfe4e4b 100644 ---- a/src/__phutil_library_map__.php -+++ b/src/__phutil_library_map__.php -@@ -382,7 +382,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', -@@ -797,7 +796,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/20170922-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch b/www-client/arcanist/files/20170922-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch new file mode 100644 index 00000000..22542c00 --- /dev/null +++ b/www-client/arcanist/files/20170922-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch @@ -0,0 +1,53 @@ +From 47de8ad702a8dc6797fe20d293bc4f80addda7ea 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/20170922-MINOR-Disable-self-upgrade.patch b/www-client/arcanist/files/20170922-MINOR-Disable-self-upgrade.patch new file mode 100644 index 00000000..a405117d --- /dev/null +++ b/www-client/arcanist/files/20170922-MINOR-Disable-self-upgrade.patch @@ -0,0 +1,149 @@ +From debf320769d3b60a6f069f9e62a76697764e5b35 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 7ab5a448936b..22bf6d5c5fd7 100644 +--- a/src/__phutil_library_map__.php ++++ b/src/__phutil_library_map__.php +@@ -384,7 +384,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', +@@ -801,7 +800,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 0e598b9e..f44d02e7 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,18 +1,18 @@ -From 58d7d3d0da7269a45cbb97bf4e8ccf38d2db5c17 Mon Sep 17 00:00:00 2001 +From 8a607d3c5327bb990271a5097335f8851a500b0a 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 | 19 +++++++------------ - 1 file changed, 7 insertions(+), 12 deletions(-) + 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 807c573275bf..fefd972786dc 100644 +index 9c470fc6ea05..fefd972786dc 100644 --- a/src/workflow/ArcanistVersionWorkflow.php +++ b/src/workflow/ArcanistVersionWorkflow.php -@@ -35,23 +35,18 @@ EOTEXT +@@ -35,30 +35,19 @@ EOTEXT } $roots = array( @@ -38,8 +38,16 @@ index 807c573275bf..fefd972786dc 100644 + pht('%s has no version registered in %s.', $lib, $commit_info)); } -- list($stdout) = $repository->execxLocal('log -1 --format=%s', '%H %ct'); +- // 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); ++ list($commit, $timestamp) = explode(' ', $stdout); $console->writeOut( + "%s %s (%s)\n", 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 bd6ea8ef..bb5c249b 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 dd605121aa974598de0e34f47660ffc086030340 Mon Sep 17 00:00:00 2001 +From 627d09321ec238324bf305f5f4e1f0ceb2681788 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 @@ -10,10 +10,10 @@ Subject: [PATCH 2/2] MINOR: Disable self upgrade delete mode 100644 src/workflow/ArcanistUpgradeWorkflow.php diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php -index 2a3cfcf817b2..a9327dfe4e4b 100644 +index 7ab5a448936b..22bf6d5c5fd7 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php -@@ -382,7 +382,6 @@ phutil_register_library_map(array( +@@ -384,7 +384,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', @@ -21,7 +21,7 @@ index 2a3cfcf817b2..a9327dfe4e4b 100644 'ArcanistUploadWorkflow' => 'workflow/ArcanistUploadWorkflow.php', 'ArcanistUsageException' => 'exception/ArcanistUsageException.php', 'ArcanistUseStatementNamespacePrefixXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUseStatementNamespacePrefixXHPASTLinterRule.php', -@@ -797,7 +796,6 @@ phutil_register_library_map(array( +@@ -801,7 +800,6 @@ phutil_register_library_map(array( 'ArcanistUnnecessarySymbolAliasXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase', 'ArcanistUnsafeDynamicStringXHPASTLinterRule' => 'ArcanistXHPASTLinterRule', 'ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase', -- cgit v1.2.3