From 3a57363c84aee9abfd933e41c111f7e4aa21fd1a Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sat, 26 Aug 2017 23:12:35 +0100 Subject: www-apps/phabricator: Version bump Package-Manager: Portage-2.3.6, Repoman-2.3.1 --- ...VERSION-for-files-in-usr-share-PN-GIT_COM.patch | 50 ------ ...VERSION-for-files-in-usr-share-PN-GIT_COM.patch | 50 ++++++ ...VERSION-for-files-in-usr-share-PN-GIT_COM.patch | 6 +- www-apps/phabricator/phabricator-20170520.ebuild | 184 --------------------- www-apps/phabricator/phabricator-20170825.ebuild | 184 +++++++++++++++++++++ 5 files changed, 237 insertions(+), 237 deletions(-) delete mode 100644 www-apps/phabricator/files/20170520-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch create mode 100644 www-apps/phabricator/files/20170825-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch delete mode 100644 www-apps/phabricator/phabricator-20170520.ebuild create mode 100644 www-apps/phabricator/phabricator-20170825.ebuild diff --git a/www-apps/phabricator/files/20170520-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch b/www-apps/phabricator/files/20170520-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch deleted file mode 100644 index aff892a0..00000000 --- a/www-apps/phabricator/files/20170520-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch +++ /dev/null @@ -1,50 +0,0 @@ -From b9bd1c41b0f84ee6992c0543a2066e8ebdd0a830 Mon Sep 17 00:00:00 2001 -From: Bertrand Jacquin -Date: Sat, 22 Feb 2014 18:31:14 +0100 -Subject: [PATCH] MEDIUM: Get VERSION for files in - /usr/share//GIT_COMMIT_INFO rather than from git - ---- - .../PhabricatorConfigVersionController.php | 29 +++++++++++----------- - 1 file changed, 15 insertions(+), 14 deletions(-) - -diff --git a/src/applications/config/controller/PhabricatorConfigVersionController.php b/src/applications/config/controller/PhabricatorConfigVersionController.php -index 8f43192b3bcc..f07cf2544cda 100644 ---- a/src/applications/config/controller/PhabricatorConfigVersionController.php -+++ b/src/applications/config/controller/PhabricatorConfigVersionController.php -@@ -83,20 +83,21 @@ final class PhabricatorConfigVersionController - $remote_futures = array(); - - foreach ($specs as $lib) { -- $root = dirname(phutil_get_library_root($lib)); -- -- $log_command = csprintf( -- 'git log --format=%s -n 1 --', -- '%H %ct'); -- -- $remote_command = csprintf( -- 'git remote -v'); -- -- $log_futures[$lib] = id(new ExecFuture('%C', $log_command)) -- ->setCWD($root); -- -- $remote_futures[$lib] = id(new ExecFuture('%C', $remote_command)) -- ->setCWD($root); -+ switch ($lib) { -+ case "phutil": -+ $_dir = "libphutil"; -+ break; -+ case "sprint": -+ $_dir = "phabricator-extensions-Sprint"; -+ break; -+ default: -+ $_dir = $lib; -+ } -+ -+ $log_futures[$lib] = -+ id(new ExecFuture('cat -- %s', "/usr/share/" . $_dir . "/GIT_COMMIT_INFO")); -+ $remote_futures[$lib] = -+ id(new ExecFuture('cat -- %s', "/usr/share/" . $_dir . "/GIT_REMOTE_INFO")); - } - - $all_futures = array_merge($log_futures, $remote_futures); diff --git a/www-apps/phabricator/files/20170825-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch b/www-apps/phabricator/files/20170825-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch new file mode 100644 index 00000000..d63223e5 --- /dev/null +++ b/www-apps/phabricator/files/20170825-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch @@ -0,0 +1,50 @@ +From 36a403806958cb8fcd289e3c95cd8ad48a49872e Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +Date: Sat, 22 Feb 2014 18:31:14 +0100 +Subject: [PATCH] MEDIUM: Get VERSION for files in + /usr/share//GIT_COMMIT_INFO rather than from git + +--- + .../PhabricatorConfigVersionController.php | 29 +++++++++++----------- + 1 file changed, 15 insertions(+), 14 deletions(-) + +diff --git a/src/applications/config/controller/PhabricatorConfigVersionController.php b/src/applications/config/controller/PhabricatorConfigVersionController.php +index ca638051e4d0..2ee7774626a8 100644 +--- a/src/applications/config/controller/PhabricatorConfigVersionController.php ++++ b/src/applications/config/controller/PhabricatorConfigVersionController.php +@@ -106,20 +106,21 @@ final class PhabricatorConfigVersionController + $remote_futures = array(); + + foreach ($specs as $lib) { +- $root = dirname(phutil_get_library_root($lib)); +- +- $log_command = csprintf( +- 'git log --format=%s -n 1 --', +- '%H %ct'); +- +- $remote_command = csprintf( +- 'git remote -v'); +- +- $log_futures[$lib] = id(new ExecFuture('%C', $log_command)) +- ->setCWD($root); +- +- $remote_futures[$lib] = id(new ExecFuture('%C', $remote_command)) +- ->setCWD($root); ++ switch ($lib) { ++ case "phutil": ++ $_dir = "libphutil"; ++ break; ++ case "sprint": ++ $_dir = "phabricator-extensions-Sprint"; ++ break; ++ default: ++ $_dir = $lib; ++ } ++ ++ $log_futures[$lib] = ++ id(new ExecFuture('cat -- %s', "/usr/share/" . $_dir . "/GIT_COMMIT_INFO")); ++ $remote_futures[$lib] = ++ id(new ExecFuture('cat -- %s', "/usr/share/" . $_dir . "/GIT_REMOTE_INFO")); + } + + $all_futures = array_merge($log_futures, $remote_futures); diff --git a/www-apps/phabricator/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch b/www-apps/phabricator/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch index 65ba59a2..f9f6c7c0 100644 --- a/www-apps/phabricator/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch +++ b/www-apps/phabricator/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch @@ -1,4 +1,4 @@ -From db902f1d58f209b4c9abda9549257caf8ba61f2f Mon Sep 17 00:00:00 2001 +From 5914f6e5862cdb8848b66bddbcd495a0f982bbec Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sat, 22 Feb 2014 18:31:14 +0100 Subject: [PATCH] MEDIUM: Get VERSION for files in @@ -9,10 +9,10 @@ Subject: [PATCH] MEDIUM: Get VERSION for files in 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/src/applications/config/controller/PhabricatorConfigVersionController.php b/src/applications/config/controller/PhabricatorConfigVersionController.php -index 8f43192b3bcc..f07cf2544cda 100644 +index ca638051e4d0..2ee7774626a8 100644 --- a/src/applications/config/controller/PhabricatorConfigVersionController.php +++ b/src/applications/config/controller/PhabricatorConfigVersionController.php -@@ -83,20 +83,21 @@ final class PhabricatorConfigVersionController +@@ -106,20 +106,21 @@ final class PhabricatorConfigVersionController $remote_futures = array(); foreach ($specs as $lib) { diff --git a/www-apps/phabricator/phabricator-20170520.ebuild b/www-apps/phabricator/phabricator-20170520.ebuild deleted file mode 100644 index d34595c8..00000000 --- a/www-apps/phabricator/phabricator-20170520.ebuild +++ /dev/null @@ -1,184 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -WEBAPP_NO_AUTO_INSTALL=yes -WEBAPP_MANUAL_SLOT=yes -inherit git-r3 webapp - -DESCRIPTION="Collection of web applications which makes it easier to scale software companies" -HOMEPAGE="https://www.phacility.com" -EGIT_REPO_URI="https://github.com/phacility/phabricator.git" -EGIT_BRANCH="stable" -EGIT_COMMIT="4d2c7e4d3d5d61e34b7e2af3df0e901d89d29433" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="~amd64" -IUSE="extension-sprint git highlight mail mercurial subversion ssl test" -REQUIRED_USE="test? ( git mercurial subversion )" - -DEPEND="virtual/awk:0 - test? ( - =www-client/arcanist-20170519:0[test] - )" -RDEPEND=">=app-admin/webapp-config-1.51-r1:0 - sys-apps/gentoo-functions - || ( - >=www-servers/apache-2.2.7:2[apache2_modules_rewrite] - www-servers/nginx:0 - www-servers/lighttpd:0 - ) - app-misc/jq:0 - || ( - dev-lang/php:5.6[cli,curl,gd,iconv,json,mysql,mysqli,pcntl,simplexml,ssl?,unicode] - dev-lang/php:7.1[cli,curl,gd,iconv,json,mysql,mysqli,pcntl,simplexml,ssl?,unicode] - ) - !!dev-lang/php:7.0 - dev-php/pecl-apcu - dev-php/PHPExcel - virtual/mysql - =dev-php/libphutil-20170429:0 - net-libs/nodejs:0 - =www-client/arcanist-20170519:0[git?,mercurial?,subversion?] - git? ( dev-vcs/git:0 ) - mercurial? ( >dev-vcs/mercurial-2.2:0 ) - subversion? ( >dev-vcs/subversion-1.7.1:0 ) - highlight? ( dev-python/pygments:0 ) - mail? ( dev-php/pecl-mailparse:0 )" -PDEPEND="extension-sprint? ( www-apps/phabricator-extensions-Sprint )" - -pkg_setup() { - webapp_pkg_setup - - if use test ; then - einfo "Environnement variables you can tweak for database tests" - einfo " PHABRICATOR_MYSQL_HOST (default my.cnf[client].host || my.cnf[client].socket)" - einfo " PHABRICATOR_MYSQL_USER (default my.cnf[client].user || current user)" - einfo " PHABRICATOR_MYSQL_PASS (default my.cnf[client].password || empty)" - einfo - einfo "src_test() may fail if such variable are not defined" - fi -} - -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}-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch" - - find -type f -name .gitignore -print0 \ - | xargs -0 --no-run-if-empty -- \ - rm - - rm -r scripts/install - - # Replace 'env' shebang to files it point to - find -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 "Changing ${REPLY} shebang to #!${path} ${args}" - sed -i \ - -e "1 s:^#!.*:#!${path} ${args}:" \ - "${REPLY}" - eend $? - done -} - -src_test() { - local BASE_URI="http://localhost.localdomain" - - einfo "Setting phabricator.base-uri='${BASE_URI}'" - bin/config set phabricator.base-uri "${BASE_URI}" > /dev/null - eend $? - - if [[ -n "${PHABRICATOR_MYSQL_HOST}" ]] ; then - einfo "Setting mysql.host='${PHABRICATOR_MYSQL_HOST}'" - bin/config set mysql.host "${PHABRICATOR_MYSQL_HOST}" > /dev/null - eend $? - fi - - if [[ -n "${PHABRICATOR_MYSQL_USER}" ]] ; then - einfo "Setting mysql.user='${PHABRICATOR_MYSQL_USER}'" - bin/config set mysql.user "${PHABRICATOR_MYSQL_USER}" > /dev/null - eend $? - fi - - if [[ -n "${PHABRICATOR_MYSQL_PASS}" ]] ; then - einfo "Setting mysql.pass='${PHABRICATOR_MYSQL_PASS}'" - bin/config set mysql.pass "${PHABRICATOR_MYSQL_PASS}" > /dev/null - eend $? - fi - - arc unit --everything --no-coverage || die "arc unit failed" - - # Cleanup tests only config files - rm conf/local/local.json -} - -src_install() { - insinto "/usr/share/${PN}" - doins GIT_COMMIT_INFO GIT_REMOTE_INFO - - webapp_src_preinst - - # All directories must be private (ie accessible in hostroot), - # expect webroot that will become htdocs - insinto "${MY_HOSTROOTDIR}" - doins -r bin conf externals resources scripts src support - - # All files and directories present in webroot/ will be - # installed in htdocs - insinto "${MY_HTDOCSDIR}" - doins -r webroot/* - - newins "${FILESDIR}/htaccess" .htaccess - - # 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 - - webapp_configfile "${MY_HTDOCSDIR}/.htaccess" - webapp_hook_script "${FILESDIR}/webapp-hook" - - webapp_src_install - - newinitd "${FILESDIR}/phd.initd" phd - newconfd "${FILESDIR}/phd.confd" phd - - newinitd "${FILESDIR}/aphlict.initd" aphlict - newconfd "${FILESDIR}/aphlict.confd" aphlict - - insinto /etc/logrotate.d - newins "${FILESDIR}/${PN}.logrotate" "${PN}" - - dodoc NOTICE README.md -} - -pkg_postinst() { - webapp_pkg_postinst - - elog - elog "For more info about how to configure, see" - elog " https://secure.phabricator.com/book/phabricator/article/configuration_guide" -} diff --git a/www-apps/phabricator/phabricator-20170825.ebuild b/www-apps/phabricator/phabricator-20170825.ebuild new file mode 100644 index 00000000..0a8b6533 --- /dev/null +++ b/www-apps/phabricator/phabricator-20170825.ebuild @@ -0,0 +1,184 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +WEBAPP_NO_AUTO_INSTALL=yes +WEBAPP_MANUAL_SLOT=yes +inherit git-r3 webapp + +DESCRIPTION="Collection of web applications which makes it easier to scale software companies" +HOMEPAGE="https://www.phacility.com" +EGIT_REPO_URI="https://github.com/phacility/phabricator.git" +EGIT_BRANCH="stable" +EGIT_COMMIT="77c11e7ae9fff0446d9361c3acb884ed56517a50" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="extension-sprint git highlight mail mercurial subversion ssl test" +REQUIRED_USE="test? ( git mercurial subversion )" + +DEPEND="virtual/awk:0 + test? ( + =www-client/arcanist-20170805:0[test] + )" +RDEPEND=">=app-admin/webapp-config-1.51-r1:0 + sys-apps/gentoo-functions + || ( + >=www-servers/apache-2.2.7:2[apache2_modules_rewrite] + www-servers/nginx:0 + www-servers/lighttpd:0 + ) + app-misc/jq:0 + || ( + dev-lang/php:5.6[cli,curl,gd,iconv,json,mysql,mysqli,pcntl,simplexml,ssl?,unicode] + dev-lang/php:7.1[cli,curl,gd,iconv,json,mysql,mysqli,pcntl,simplexml,ssl?,unicode] + ) + !!dev-lang/php:7.0 + dev-php/pecl-apcu + dev-php/PHPExcel + virtual/mysql + =dev-php/libphutil-20170811:0 + net-libs/nodejs:0 + =www-client/arcanist-20170805:0[git?,mercurial?,subversion?] + git? ( dev-vcs/git:0 ) + mercurial? ( >dev-vcs/mercurial-2.2:0 ) + subversion? ( >dev-vcs/subversion-1.7.1:0 ) + highlight? ( dev-python/pygments:0 ) + mail? ( dev-php/pecl-mailparse:0 )" +PDEPEND="extension-sprint? ( www-apps/phabricator-extensions-Sprint )" + +pkg_setup() { + webapp_pkg_setup + + if use test ; then + einfo "Environnement variables you can tweak for database tests" + einfo " PHABRICATOR_MYSQL_HOST (default my.cnf[client].host || my.cnf[client].socket)" + einfo " PHABRICATOR_MYSQL_USER (default my.cnf[client].user || current user)" + einfo " PHABRICATOR_MYSQL_PASS (default my.cnf[client].password || empty)" + einfo + einfo "src_test() may fail if such variable are not defined" + fi +} + +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}-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch" + + find -type f -name .gitignore -print0 \ + | xargs -0 --no-run-if-empty -- \ + rm + + rm -r scripts/install + + # Replace 'env' shebang to files it point to + find -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 "Changing ${REPLY} shebang to #!${path} ${args}" + sed -i \ + -e "1 s:^#!.*:#!${path} ${args}:" \ + "${REPLY}" + eend $? + done +} + +src_test() { + local BASE_URI="http://localhost.localdomain" + + einfo "Setting phabricator.base-uri='${BASE_URI}'" + bin/config set phabricator.base-uri "${BASE_URI}" > /dev/null + eend $? + + if [[ -n "${PHABRICATOR_MYSQL_HOST}" ]] ; then + einfo "Setting mysql.host='${PHABRICATOR_MYSQL_HOST}'" + bin/config set mysql.host "${PHABRICATOR_MYSQL_HOST}" > /dev/null + eend $? + fi + + if [[ -n "${PHABRICATOR_MYSQL_USER}" ]] ; then + einfo "Setting mysql.user='${PHABRICATOR_MYSQL_USER}'" + bin/config set mysql.user "${PHABRICATOR_MYSQL_USER}" > /dev/null + eend $? + fi + + if [[ -n "${PHABRICATOR_MYSQL_PASS}" ]] ; then + einfo "Setting mysql.pass='${PHABRICATOR_MYSQL_PASS}'" + bin/config set mysql.pass "${PHABRICATOR_MYSQL_PASS}" > /dev/null + eend $? + fi + + arc unit --everything --no-coverage || die "arc unit failed" + + # Cleanup tests only config files + rm conf/local/local.json +} + +src_install() { + insinto "/usr/share/${PN}" + doins GIT_COMMIT_INFO GIT_REMOTE_INFO + + webapp_src_preinst + + # All directories must be private (ie accessible in hostroot), + # expect webroot that will become htdocs + insinto "${MY_HOSTROOTDIR}" + doins -r bin conf externals resources scripts src support + + # All files and directories present in webroot/ will be + # installed in htdocs + insinto "${MY_HTDOCSDIR}" + doins -r webroot/* + + newins "${FILESDIR}/htaccess" .htaccess + + # 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 + + webapp_configfile "${MY_HTDOCSDIR}/.htaccess" + webapp_hook_script "${FILESDIR}/webapp-hook" + + webapp_src_install + + newinitd "${FILESDIR}/phd.initd" phd + newconfd "${FILESDIR}/phd.confd" phd + + newinitd "${FILESDIR}/aphlict.initd" aphlict + newconfd "${FILESDIR}/aphlict.confd" aphlict + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotate" "${PN}" + + dodoc NOTICE README.md +} + +pkg_postinst() { + webapp_pkg_postinst + + elog + elog "For more info about how to configure, see" + elog " https://secure.phabricator.com/book/phabricator/article/configuration_guide" +} -- cgit v1.2.3