diff options
author | Bertrand Jacquin <bertrand@jacquin.bzh> | 2020-10-02 22:01:49 +0100 |
---|---|---|
committer | Bertrand Jacquin <bertrand@jacquin.bzh> | 2020-10-18 16:02:52 +0100 |
commit | 0041553b6271608e9749882a65ac1ab60b533da4 (patch) | |
tree | dbe9f23d6cfd9539cd71a2e2989134dcafe53772 | |
parent | profiles/enlightenment: drop (diff) | |
download | portage-0041553b6271608e9749882a65ac1ab60b533da4.tar.xz |
www-apps/phabricator: drop old
18 files changed, 0 insertions, 1176 deletions
diff --git a/profiles/use.local.desc b/profiles/use.local.desc index 633a1d05..c17787c0 100644 --- a/profiles/use.local.desc +++ b/profiles/use.local.desc @@ -68,9 +68,5 @@ net-p2p/pesetacoin:qrcode - Enable generation of QR Codes for receiving payments net-p2p/pesetacoin:wallet - Enable wallet support sys-firmware/gnuk:tools - Install aditional tools virtual/linux-sources:firmware - Install linux kernel firmware -www-apps/phabricator:extension-sprint - Enable extension sprint via www-apps/phabricator-extensions-Sprint -www-apps/phabricator:highlight - Enable source code highlighting via dev-python/pygments -www-apps/phabricator:mail - Update Differential and Maniphest by replying to messages and create Maniphest tasks via email -www-apps/phabricator:mercurial - Support for dev-vcs/mercurial www-client/arcanist:lint - Support for linter www-client/arcanist:mercurial - Support for dev-vcs/mercurial diff --git a/www-apps/phabricator-extensions-Sprint/metadata.xml b/www-apps/phabricator-extensions-Sprint/metadata.xml deleted file mode 100644 index 82f7232e..00000000 --- a/www-apps/phabricator-extensions-Sprint/metadata.xml +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>bertrand@jacquin.bzh</email> - <name>Bertrand Jacquin</name> - </maintainer> -</pkgmetadata> diff --git a/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-20191219.ebuild b/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-20191219.ebuild deleted file mode 100644 index d25663a0..00000000 --- a/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-20191219.ebuild +++ /dev/null @@ -1,85 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit git-r3 - -DESCRIPTION="Manage your tasks with Points in Phabricator" -HOMEPAGE="https://phabricator.wikimedia.org/diffusion/PHSP/" -EGIT_REPO_URI="https://phabricator.wikimedia.org/diffusion/PHSP/phabricator-sprint.git" -EGIT_BRANCH="wmf/stable" -EGIT_COMMIT="7f34f377a425e0a53504355e991d9ccf4eb40de6" - -LICENSE="GPL-3" -SLOT="stable" -KEYWORDS="~amd64" -IUSE="test" - -DEPEND="!${CATEGORY}/${PN}:0" -RDEPEND="dev-php/libphutil:stable - www-apps/phabricator:stable" - -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" - - find -type f -name .gitignore -print0 \ - | xargs -0 --no-run-if-empty -- \ - rm - - # 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() { - arc unit --everything --no-coverage || die "arc unit failed" -} - -src_install() { - insinto "/usr/share/${PN}" - doins GIT_COMMIT_INFO GIT_REMOTE_INFO - - insinto "/usr/share/php/${PN}" - doins -r rsrc scripts src - - # 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 - - dodoc README.md RELEASE_NOTES.md -} - -pkg_postinst () { - elog - elog "After the first installation, you need to run:" - elog " cd /path/to/phabricator/install" - elog " bin/config set load-libraries '{\"sprint\":\"${EROOT}usr/share/php/${PN}/src\"}'" -} diff --git a/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-9999.ebuild b/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-9999.ebuild deleted file mode 100644 index f7b242a5..00000000 --- a/www-apps/phabricator-extensions-Sprint/phabricator-extensions-Sprint-9999.ebuild +++ /dev/null @@ -1,83 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -inherit git-r3 - -DESCRIPTION="Manage your tasks with Points in Phabricator" -HOMEPAGE="https://phabricator.wikimedia.org/diffusion/PHSP/" -EGIT_REPO_URI="https://phabricator.wikimedia.org/diffusion/PHSP/phabricator-sprint.git" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="" -IUSE="test" - -DEPEND="!${CATEGORY}/${PN}:stable" -RDEPEND="dev-php/libphutil - www-apps/phabricator" - -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" - - find -type f -name .gitignore -print0 \ - | xargs -0 --no-run-if-empty -- \ - rm - - # 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() { - arc unit --everything --no-coverage || die "arc unit failed" -} - -src_install() { - insinto "/usr/share/${PN}" - doins GIT_COMMIT_INFO GIT_REMOTE_INFO - - insinto "/usr/share/php/${PN}" - doins -r rsrc scripts src - - # 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 - - dodoc README.md RELEASE_NOTES.md -} - -pkg_postinst () { - elog - elog "After the first installation, you need to run:" - elog " cd /path/to/phabricator/install" - elog " bin/config set load-libraries '{\"sprint\":\"${EROOT}usr/share/php/${PN}/src\"}'" -} diff --git a/www-apps/phabricator/files/20191213-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch b/www-apps/phabricator/files/20191213-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch deleted file mode 100644 index 6e4d0fc5..00000000 --- a/www-apps/phabricator/files/20191213-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 2185597e5573ce0ed3c087d6d3a553a64906a2a5 Mon Sep 17 00:00:00 2001 -From: Bertrand Jacquin <bertrand@jacquin.bzh> -Date: Sat, 22 Feb 2014 18:31:14 +0100 -Subject: [PATCH 1/2] MEDIUM: Get VERSION for files in - /usr/share/<PN>/GIT_COMMIT_INFO rather than from git - ---- - .../PhabricatorConfigVersionController.php | 27 ++++++++++--------- - 1 file changed, 14 insertions(+), 13 deletions(-) - -diff --git a/src/applications/config/controller/PhabricatorConfigVersionController.php b/src/applications/config/controller/PhabricatorConfigVersionController.php -index 153d36306267..2d7dca672f8d 100644 ---- a/src/applications/config/controller/PhabricatorConfigVersionController.php -+++ b/src/applications/config/controller/PhabricatorConfigVersionController.php -@@ -105,20 +105,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); -+ switch ($lib) { -+ case "phutil": -+ $_dir = "libphutil"; -+ break; -+ case "sprint": -+ $_dir = "phabricator-extensions-Sprint"; -+ break; -+ default: -+ $_dir = $lib; -+ } - -- $remote_futures[$lib] = id(new ExecFuture('%C', $remote_command)) -- ->setCWD($root); -+ $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/20191213-blacklists-for-registering-users.patch b/www-apps/phabricator/files/20191213-blacklists-for-registering-users.patch deleted file mode 100644 index 224d10d0..00000000 --- a/www-apps/phabricator/files/20191213-blacklists-for-registering-users.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 58299e88217d42213a9e133adebc1b80d7f33a71 Mon Sep 17 00:00:00 2001 -From: Carsten Haitzler <raster@rasterman.com> -Date: Thu, 8 Feb 2018 18:29:06 +0900 -Subject: [PATCH 2/2] blacklists for registering users - -i came up with this patch to allow phab to have email blacklists for -registering users... thanks to spam. ---- - ...PhabricatorAuthenticationConfigOptions.php | 7 ++++++- - .../people/storage/PhabricatorUserEmail.php | 20 ++++++++++++++++--- - 2 files changed, 23 insertions(+), 4 deletions(-) - -diff --git a/src/applications/config/option/PhabricatorAuthenticationConfigOptions.php b/src/applications/config/option/PhabricatorAuthenticationConfigOptions.php -index 8058ecafcb41..6fb37d05ff29 100644 ---- a/src/applications/config/option/PhabricatorAuthenticationConfigOptions.php -+++ b/src/applications/config/option/PhabricatorAuthenticationConfigOptions.php -@@ -69,7 +69,12 @@ final class PhabricatorAuthenticationConfigOptions - "it implies @{config:auth.require-email-verification}.\n\n". - "You should omit the `@` from domains. Note that the domain must ". - "match exactly. If you allow `yourcompany.com`, that permits ". -- "`joe@yourcompany.com` but rejects `joe@mail.yourcompany.com`.")) -+ "`joe@yourcompany.com` but rejects `joe@mail.yourcompany.com`.\n\n" . -+ "You may also use this as a blacklist by prefixing any domain with" . -+ "a `!` (exclamation) mark. If any entry in this list has this mark" . -+ "then the list as a whole is treated as a blacklist and whitelist" . -+ "items as above are ineffective and only items with a `!` at the" . -+ "start of them are effective in blacklisting domains.")) - ->addExample( - "yourcompany.com\nmail.yourcompany.com", - pht('Valid Setting')), -diff --git a/src/applications/people/storage/PhabricatorUserEmail.php b/src/applications/people/storage/PhabricatorUserEmail.php -index 4e43b2fb41bf..8ebdc2b16132 100644 ---- a/src/applications/people/storage/PhabricatorUserEmail.php -+++ b/src/applications/people/storage/PhabricatorUserEmail.php -@@ -129,15 +129,29 @@ final class PhabricatorUserEmail - return false; - } - -+ $default_allow = false; -+ - $lower_domain = phutil_utf8_strtolower($domain); - foreach ($allowed_domains as $allowed_domain) { - $lower_allowed = phutil_utf8_strtolower($allowed_domain); -- if ($lower_allowed === $lower_domain) { -- return true; -+ // allow !domain.com to indicate this domain is NOT allowed instead -+ // of explicitly allowed. if you have at least 1 "not" domain listed -+ // then the list becomes a blacklist and only domains NOT allowed will -+ // be filtered. -+ if (substr($lower_allowed, 0, 1) === "!") { -+ $default_allow = true; -+ $lower_allowed = substr($lower_allowed, 1); -+ if ($lower_allowed === $lower_domain) { -+ return false; -+ } -+ } else { -+ if ($lower_allowed === $lower_domain) { -+ return true; -+ } - } - } - -- return false; -+ return $default_allow; - } - - 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 deleted file mode 100644 index c59063fd..00000000 --- a/www-apps/phabricator/files/9999-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 9d51324eb75c1927db48b50a6bdb57c985dfba7e Mon Sep 17 00:00:00 2001 -From: Bertrand Jacquin <bertrand@jacquin.bzh> -Date: Sat, 22 Feb 2014 18:31:14 +0100 -Subject: [PATCH 1/2] MEDIUM: Get VERSION for files in - /usr/share/<PN>/GIT_COMMIT_INFO rather than from git - ---- - .../PhabricatorConfigVersionController.php | 27 ++++++++++--------- - 1 file changed, 14 insertions(+), 13 deletions(-) - -diff --git a/src/applications/config/controller/PhabricatorConfigVersionController.php b/src/applications/config/controller/PhabricatorConfigVersionController.php -index 153d36306267..2d7dca672f8d 100644 ---- a/src/applications/config/controller/PhabricatorConfigVersionController.php -+++ b/src/applications/config/controller/PhabricatorConfigVersionController.php -@@ -105,20 +105,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); -+ switch ($lib) { -+ case "phutil": -+ $_dir = "libphutil"; -+ break; -+ case "sprint": -+ $_dir = "phabricator-extensions-Sprint"; -+ break; -+ default: -+ $_dir = $lib; -+ } - -- $remote_futures[$lib] = id(new ExecFuture('%C', $remote_command)) -- ->setCWD($root); -+ $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-blacklists-for-registering-users.patch b/www-apps/phabricator/files/9999-blacklists-for-registering-users.patch deleted file mode 100644 index e177656a..00000000 --- a/www-apps/phabricator/files/9999-blacklists-for-registering-users.patch +++ /dev/null @@ -1,67 +0,0 @@ -From c1208af71788295664b7d53ab808ba8e6a5072b3 Mon Sep 17 00:00:00 2001 -From: Carsten Haitzler <raster@rasterman.com> -Date: Thu, 8 Feb 2018 18:29:06 +0900 -Subject: [PATCH 2/2] blacklists for registering users - -i came up with this patch to allow phab to have email blacklists for -registering users... thanks to spam. ---- - ...PhabricatorAuthenticationConfigOptions.php | 7 ++++++- - .../people/storage/PhabricatorUserEmail.php | 20 ++++++++++++++++--- - 2 files changed, 23 insertions(+), 4 deletions(-) - -diff --git a/src/applications/config/option/PhabricatorAuthenticationConfigOptions.php b/src/applications/config/option/PhabricatorAuthenticationConfigOptions.php -index 8058ecafcb41..6fb37d05ff29 100644 ---- a/src/applications/config/option/PhabricatorAuthenticationConfigOptions.php -+++ b/src/applications/config/option/PhabricatorAuthenticationConfigOptions.php -@@ -69,7 +69,12 @@ final class PhabricatorAuthenticationConfigOptions - "it implies @{config:auth.require-email-verification}.\n\n". - "You should omit the `@` from domains. Note that the domain must ". - "match exactly. If you allow `yourcompany.com`, that permits ". -- "`joe@yourcompany.com` but rejects `joe@mail.yourcompany.com`.")) -+ "`joe@yourcompany.com` but rejects `joe@mail.yourcompany.com`.\n\n" . -+ "You may also use this as a blacklist by prefixing any domain with" . -+ "a `!` (exclamation) mark. If any entry in this list has this mark" . -+ "then the list as a whole is treated as a blacklist and whitelist" . -+ "items as above are ineffective and only items with a `!` at the" . -+ "start of them are effective in blacklisting domains.")) - ->addExample( - "yourcompany.com\nmail.yourcompany.com", - pht('Valid Setting')), -diff --git a/src/applications/people/storage/PhabricatorUserEmail.php b/src/applications/people/storage/PhabricatorUserEmail.php -index 4e43b2fb41bf..8ebdc2b16132 100644 ---- a/src/applications/people/storage/PhabricatorUserEmail.php -+++ b/src/applications/people/storage/PhabricatorUserEmail.php -@@ -129,15 +129,29 @@ final class PhabricatorUserEmail - return false; - } - -+ $default_allow = false; -+ - $lower_domain = phutil_utf8_strtolower($domain); - foreach ($allowed_domains as $allowed_domain) { - $lower_allowed = phutil_utf8_strtolower($allowed_domain); -- if ($lower_allowed === $lower_domain) { -- return true; -+ // allow !domain.com to indicate this domain is NOT allowed instead -+ // of explicitly allowed. if you have at least 1 "not" domain listed -+ // then the list becomes a blacklist and only domains NOT allowed will -+ // be filtered. -+ if (substr($lower_allowed, 0, 1) === "!") { -+ $default_allow = true; -+ $lower_allowed = substr($lower_allowed, 1); -+ if ($lower_allowed === $lower_domain) { -+ return false; -+ } -+ } else { -+ if ($lower_allowed === $lower_domain) { -+ return true; -+ } - } - } - -- return false; -+ return $default_allow; - } - - diff --git a/www-apps/phabricator/files/aphlict.confd b/www-apps/phabricator/files/aphlict.confd deleted file mode 100644 index 2ba7d682..00000000 --- a/www-apps/phabricator/files/aphlict.confd +++ /dev/null @@ -1,10 +0,0 @@ -# Config file for /etc/init.d/aphlict - -# Where to serve the files from -PHABRICATOR_ROOT="/var/www/localhost" - -# Config filename, relative to ${PHABRICATOR_ROOT}/conf -APHLICT_CONFIG="aphlict/aphlict.default.json" - -# User/Group of this instance -PHABRICATOR_USER="apache" diff --git a/www-apps/phabricator/files/aphlict.initd b/www-apps/phabricator/files/aphlict.initd deleted file mode 100755 index 7264d9a0..00000000 --- a/www-apps/phabricator/files/aphlict.initd +++ /dev/null @@ -1,77 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -: ${PHABRICATOR_ROOT:=/var/www/localhost} -: ${APHLICT_CONFIG:=aphlict/aphlict.default.json} -: ${PHABRICATOR_USER:=apache} - -depend() { - need phd -} - -get_config() { - local key="${1}" - - jq -M --raw-output \ - "${key}" \ - "${PHABRICATOR_ROOT}/conf/${APHLICT_CONFIG}" -} - -checkrootdir() { - if [[ ! -d "${PHABRICATOR_ROOT}" ]] ; then - eerror "PHABRICATOR_ROOT ${PHABRICATOR_ROOT} does not exist" - eerror "Please follow pkg_postinst() instructions" - return 1 - fi -} - -checkconfig() { - if [[ ! -e "${PHABRICATOR_ROOT}/conf/${APHLICT_CONFIG}" ]] ; then - eerror "Config file ${PHABRICATOR_ROOT}/conf/${APHLICT_CONFIG} does not exist" - return 1 - fi - - pid_file="$(get_config .pidfile)" \ - || return 1 -} - -status() { - checkrootdir || return 1 - - "${PHABRICATOR_ROOT}/bin/aphlict" status \ - --config "${PHABRICATOR_ROOT}/conf/${APHLICT_CONFIG}" -} - -start() { - checkrootdir || return 1 - checkconfig || return 1 - checkpath -d \ - -o "${PHABRICATOR_USER}" \ - "${pid_file%/*}" || return 1 - checkpath -f \ - -o "${PHABRICATOR_USER}" \ - "${pid_file}" || return 1 - - ebegin "Starting ${RC_SVCNAME} (${PHABRICATOR_ROOT})" - start-stop-daemon --start \ - --quiet \ - --user "${PHABRICATOR_USER}" \ - --exec "${PHABRICATOR_ROOT}/bin/aphlict" \ - --pidfile "${pid_file}" \ - -- start \ - --config "${PHABRICATOR_ROOT}/conf/${APHLICT_CONFIG}" - eend $? -} - -stop() { - checkrootdir || return 1 - checkconfig || return 1 - - ebegin "Stopping ${RC_SVCNAME} (${PHABRICATOR_ROOT})" - start-stop-daemon --stop \ - --quiet \ - --pidfile "${pid_file}" - eend $? -} diff --git a/www-apps/phabricator/files/htaccess b/www-apps/phabricator/files/htaccess deleted file mode 100644 index 9b7023fa..00000000 --- a/www-apps/phabricator/files/htaccess +++ /dev/null @@ -1,17 +0,0 @@ -# Environnement to enable -SetEnv PHABRICATOR_ENV default - -# Needed for RewriteEngine -Options FollowSymLinks - -RewriteEngine On - -# Server local file directly expect index.php -RewriteCond %{REQUEST_FILENAME} -f -RewriteCond %{REQUEST_URI} !^/index.php -RewriteRule .* - [L,QSA] - -# Append REQUEST_URI as a __path__ QUERY_STRING to all other requests -# if not already existing -RewriteCond %{QUERY_STRING} !^__path__= -RewriteRule ^(.*)$ /index.php?__path__=/$1 [NS,B,L,QSA] diff --git a/www-apps/phabricator/files/phabricator.logrotate b/www-apps/phabricator/files/phabricator.logrotate deleted file mode 100644 index f1723514..00000000 --- a/www-apps/phabricator/files/phabricator.logrotate +++ /dev/null @@ -1,4 +0,0 @@ -/var/log/phabricator/*.log { - missingok - notifempty -} diff --git a/www-apps/phabricator/files/phd.confd b/www-apps/phabricator/files/phd.confd deleted file mode 100644 index 41e58183..00000000 --- a/www-apps/phabricator/files/phd.confd +++ /dev/null @@ -1,10 +0,0 @@ -# Config file for /etc/init.d/phd - -# Where to serve the files from -PHABRICATOR_ROOT="/var/www/localhost" - -# Environnement to enable -PHABRICATOR_ENV="default" - -# User/Group of this instance -PHABRICATOR_USER="apache" diff --git a/www-apps/phabricator/files/phd.initd b/www-apps/phabricator/files/phd.initd deleted file mode 100755 index 1904e900..00000000 --- a/www-apps/phabricator/files/phd.initd +++ /dev/null @@ -1,102 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -: ${PHABRICATOR_ROOT:=/var/www/localhost} -: ${PHABRICATOR_ENV:=default} -: ${PHABRICATOR_USER:=apache} - -export PHABRICATOR_ENV - -depend() { - need apache2 git-daemon -} - -get_config() { - local key="${1}" - - "${PHABRICATOR_ROOT}/bin/config" get "$@" \ - | jq -M --raw-output '.config[0].value' -} - -checkrootdir() { - if [[ ! -d "${PHABRICATOR_ROOT}" ]] ; then - eerror "PHABRICATOR_ROOT ${PHABRICATOR_ROOT} does not exist" - eerror "Please follow pkg_postinst() instructions" - return 1 - fi -} - -checkconfig() { - pid_dir="$(get_config phd.pid-directory)" \ - || return 1 - - if [[ -z "${pid_dir/null}" ]] ; then - pid_dir="/run/phabricator/${RC_SVCNAME}" - "${PHABRICATOR_ROOT}/bin/config" \ - set phd.pid-directory "${pid_dir}" - fi -} - -status() { - checkrootdir || return 1 - - "${PHABRICATOR_ROOT}/bin/phd" status -} - -start() { - checkrootdir || return 1 - checkconfig || return 1 - checkpath -d \ - -o "${PHABRICATOR_USER}" \ - "${pid_dir}" || return 1 - - ebegin "Starting ${RC_SVCNAME} (${PHABRICATOR_ROOT})" - start-stop-daemon --start \ - -e PHABRICATOR_ENV="${PHABRICATOR_ENV}" \ - --quiet \ - --user "${PHABRICATOR_USER}" \ - --exec "${PHABRICATOR_ROOT}/bin/phd" \ - --pidfile "${pid_dir}.pid" \ - -- start - eend $? - - # This is a terrible hack - # bin/phd launch many phd-daemon, and then exit - # phd-daemon handle their own pidfiles, all concentrated in the same directory - # formatted as JSON file - # - # This mean that start-stop-daemon - # can't match on a pidfile created by phd or phd-daemon - # can't match on --exec as their is not 'phd' process - # can't match on --name as arguments are not fixed - # and then always make phd as crashed - # - # So solution here is to wait a bit, and then create a pidfile that contain pid - # enumerated in JSON files - einfo "Populating ${pid_dir}.pid" - sleep 5 - find "${pid_dir}" \ - -type f \ - | grep -E '/daemon.([0-9]+)' \ - | xargs --no-run-if-empty -- \ - jq .pid \ - > "${pid_dir}.pid" - eend $? -} - -stop() { - checkrootdir || return 1 - checkconfig || return 1 - - ebegin "Stopping ${RC_SVCNAME} (${PHABRICATOR_ROOT})" - # Yep, a start, phd play with many pid files as explain above - start-stop-daemon --start \ - -e PHABRICATOR_ENV="${PHABRICATOR_ENV}" \ - --quiet \ - --user "${PHABRICATOR_USER}" \ - --exec "${PHABRICATOR_ROOT}/bin/phd" \ - -- stop - eend $? -} diff --git a/www-apps/phabricator/files/webapp-hook b/www-apps/phabricator/files/webapp-hook deleted file mode 100755 index bcc7b7d7..00000000 --- a/www-apps/phabricator/files/webapp-hook +++ /dev/null @@ -1,154 +0,0 @@ -#!/bin/bash -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: $ - -source /lib/gentoo/functions.sh || exit 1 - -function rc_status () { - [[ $# -ne 1 ]] && return 1 - - local _svc="${1}" - - "/etc/init.d/${_svc}" -sCq status > /dev/null 2>&1 -} - -function chk-htdocs () { - local _root="$(realpath ${VHOST_ROOT})" - local _htdocs="$(realpath ${VHOST_HTDOCSDIR})" - - _root="${_root//[^\/]}" - _htdocs="${_htdocs//[^\/]}" - - if (( ${#_htdocs} - ${#_root} != 1 )) ; then - eerror "VHOST_HTDOCSDIR MUST be one level subdirectory of VHOST_ROOT" - eerror - eerror "What you have is" - eerror " VHOST_ROOT=${VHOST_ROOT}" - eerror " VHOST_HTDOCSDIR=${VHOST_HTDOCSDIR}" - eerror - eerror "Example of what you should have" - eerror " VHOST_ROOT=/var/www/localhost" - eerror " VHOST_HTDOCSDIR=/var/www/localhost/public_html" - eerror - die "You must fix your webapp-config configuration" - fi - - return 0 -} - -function fix-perms () { - einfo "Make executable all shebanged files" - find "${VHOST_ROOT}" -type f \ - | xargs -n 1 --no-run-if-empty -- \ - awk 'NR == 1 && /^#!/ {print FILENAME}' \ - | xargs --no-run-if-empty -- \ - chmod 0755 - eend $? - - return 0 -} - -function fix-webroot () { - # Abort if vhost_htdocs is already webroot - [[ "${VHOST_HTDOCSDIR/#${VHOST_ROOT}\/}" == "webroot" ]] \ - && return 0 - - # Make sur VHOST_ROOT/webroot is a symlink - # Otherwise backup it - if [[ -e "${VHOST_ROOT}/webroot" && ! -L "${VHOST_ROOT}/webroot" ]] ; then - einfo "Backing up ${VHOST_ROOT}/webroot to ${VHOST_ROOT}/webroot.orig" - mv "${VHOST_ROOT}/webroot" "${VHOST_ROOT}/webroot.orig" - eend $? - else - rm -f "${VHOST_ROOT}/webroot" - fi - - einfo "Create symlink ${VHOST_ROOT}/webroot" - ln -s "${VHOST_HTDOCSDIR}" "${VHOST_ROOT}/webroot" - eend $? - - einfo "Change ${VHOST_ROOT}/webroot owner to ${VHOST_SERVER_UID}:${VHOST_SERVER_GID}" - chown -h "${VHOST_SERVER_UID}:${VHOST_SERVER_GID}" "${VHOST_ROOT}/webroot" - eend $? - - return 0 -} - -function storage-upgrade () { - local _date="$(date +'%F-%T')" - - local _has_aphlict=no - local _has_phd=no - local _has_server=no - - # bin/storage uses tput but TERM get removed earlier - export TERM=vt100 - - # Do not upgrade anything if we can't connect to databases - if ! "${VHOST_ROOT}/bin/storage" databases > /dev/null ; then - ewarn "Aborting, connection to database unsuccessfull" - ewarn "You need to manually run" - ewarn " ${VHOST_ROOT}/bin/storage upgrade" - ewarn - - return 1 - fi - - # Save service status - rc_status aphlict && _has_aphlict=yes - rc_status phd && _has_phd=yes - - # Only stop started services - [[ "${_has_aphlict:-no}" == "yes" ]] && /etc/init.d/aphlict stop - [[ "${_has_phd:-no}" == "yes" ]] && /etc/init.d/phd stop - - einfo "Backing up database to ${VHOST_ROOT}/backup/dump-${_date}.sql.xz" - [[ ! -d "${VHOST_ROOT}/backup" ]] \ - && mkdir -m 0750 "${VHOST_ROOT}/backup" - - einfo " ${VHOST_ROOT}/bin/storage dump" - "${VHOST_ROOT}/bin/storage" dump \ - | xz -v > "${VHOST_ROOT}/backup/dump-${_date}.sql.xz" - eend $? - - einfo "Upgrading storage" - einfo " ${VHOST_ROOT}/bin/storage upgrade" - "${VHOST_ROOT}/bin/storage" upgrade \ - || eerror "failed, you should analyze it and rerun manually" - eend $? - - # Only start services that was previously started - [[ "${_has_phd:-no}" == "yes" ]] && /etc/init.d/phd start - [[ "${_has_aphlict:-no}" == "yes" ]] && /etc/init.d/aphlict start - - einfo "You may have to restart daemon hosting phabricator to update cache" - - return 0 -} - -if [[ $# -ne 1 ]] ; then - echo "Usage: ${0} <install>" - exit 1 -fi - -if [[ -z "${VHOST_ROOT}" || - -z "${VHOST_HTDOCSDIR}" ]] ; then - echo "Please export variables:" - echo " VHOST_ROOT" - echo " VHOST_HTDOCSDIR" - exit 1 -fi - -einfo -einfo "$0 $@" -einfo - -case "${1}" in - install) - chk-htdocs - fix-perms - fix-webroot - storage-upgrade - ;; -esac diff --git a/www-apps/phabricator/metadata.xml b/www-apps/phabricator/metadata.xml deleted file mode 100644 index 1292bdf4..00000000 --- a/www-apps/phabricator/metadata.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="person"> - <email>bertrand@jacquin.bzh</email> - <name>Bertrand Jacquin</name> - </maintainer> - <use> - <flag name='extension-sprint'> - Enable extension sprint via <pkg>www-apps/phabricator-extensions-Sprint</pkg> - </flag> - <flag name='highlight'> - Enable source code highlighting via <pkg>dev-python/pygments</pkg> - </flag> - <flag name='mail'> - Update Differential and Maniphest by replying to messages and create Maniphest tasks via email - </flag> - <flag name='mercurial'> - Support for <pkg>dev-vcs/mercurial</pkg> - </flag> - </use> -</pkgmetadata> diff --git a/www-apps/phabricator/phabricator-20191213.ebuild b/www-apps/phabricator/phabricator-20191213.ebuild deleted file mode 100644 index 501b1589..00000000 --- a/www-apps/phabricator/phabricator-20191213.ebuild +++ /dev/null @@ -1,185 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -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="c4b4a53cad7722f031b725f8b41511e9d341d033" - -LICENSE="Apache-2.0" -SLOT="stable" -KEYWORDS="~amd64" -IUSE="extension-sprint git highlight mail mercurial subversion ssl test" -REQUIRED_USE="test? ( git mercurial subversion )" - -DEPEND="!${CATEGORY}/${PN}:0 - virtual/awk:0 - test? ( - =www-client/arcanist-20191119:stable[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[cli,curl,gd,iconv,json,mysql,mysqli,pcntl,simplexml,ssl?,unicode] - dev-php/pecl-apcu - dev-php/PHPExcel - media-gfx/imagemagick[jpeg,png,webp] - virtual/mysql - =dev-php/libphutil-20190930:stable - net-libs/nodejs:0 - =www-client/arcanist-20191119:stable[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:7 )" -PDEPEND="extension-sprint? ( www-apps/phabricator-extensions-Sprint )" - -PATCHES=( - "${FILESDIR}/${PV}-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch" - "${FILESDIR}/${PV}-blacklists-for-registering-users.patch" -) - -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" - - 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-9999.ebuild b/www-apps/phabricator/phabricator-9999.ebuild deleted file mode 100644 index bb7ee475..00000000 --- a/www-apps/phabricator/phabricator-9999.ebuild +++ /dev/null @@ -1,183 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 -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" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="" -IUSE="extension-sprint git highlight mail mercurial subversion ssl test" -REQUIRED_USE="test? ( git mercurial subversion )" - -DEPEND="!${CATEGORY}/${PN}:stable - virtual/awk:0 - test? ( - =www-client/arcanist-${PV}: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[cli,curl,gd,iconv,json,mysql,mysqli,pcntl,simplexml,ssl?,unicode] - dev-php/pecl-apcu - dev-php/PHPExcel - media-gfx/imagemagick[jpeg,png,webp] - virtual/mysql - =dev-php/libphutil-${PV}:0 - net-libs/nodejs:0 - =www-client/arcanist-${PV}: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:7 )" -PDEPEND="extension-sprint? ( =www-apps/phabricator-extensions-Sprint-${PV} )" - -PATCHES=( - "${FILESDIR}/${PV}-MEDIUM-Get-VERSION-for-files-in-usr-share-PN-GIT_COM.patch" - "${FILESDIR}/${PV}-blacklists-for-registering-users.patch" -) - -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" - - 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" aphlicd - 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" -} |