summaryrefslogtreecommitdiff
path: root/www-apps
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2013-09-10 13:33:34 +0200
committerBertrand Jacquin <beber@meleeweb.net>2013-09-10 13:33:34 +0200
commit96d72af47bd9bb39573e79ddbfe180b01e7f48db (patch)
tree7413f4986b72ef26b443c0deb16f03de74c480d8 /www-apps
parentdev-php/libphutil: phabricator/diffusion need src/parser/xhpast/bin/xhpast_pa... (diff)
downloadportage-96d72af47bd9bb39573e79ddbfe180b01e7f48db.tar.xz
www-apps/phabricator: patch for make wiki visible to all, patch for error code for users, split init scripts for phd and aphlictd, fix init script to create directory containing pid files, define directory if not present in config,
Package-Manager: portage-2.2.1
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/phabricator/ChangeLog9
-rw-r--r--www-apps/phabricator/Manifest12
-rw-r--r--www-apps/phabricator/files/0001-Changed-add_user.php-to-create-users-with-unverified.patch43
-rw-r--r--www-apps/phabricator/files/0002-Make-wiki-visible-to-all.patch27
-rw-r--r--www-apps/phabricator/files/aphlictd.confd7
-rwxr-xr-xwww-apps/phabricator/files/aphlictd.initd52
-rwxr-xr-xwww-apps/phabricator/files/phabricator.initd41
-rw-r--r--www-apps/phabricator/files/phd.confd (renamed from www-apps/phabricator/files/phabricator.confd)2
-rwxr-xr-xwww-apps/phabricator/files/phd.initd63
-rw-r--r--www-apps/phabricator/phabricator-9999.ebuild13
10 files changed, 221 insertions, 48 deletions
diff --git a/www-apps/phabricator/ChangeLog b/www-apps/phabricator/ChangeLog
index 1e33668a..31f8bd7d 100644
--- a/www-apps/phabricator/ChangeLog
+++ b/www-apps/phabricator/ChangeLog
@@ -1,3 +1,12 @@
+ 10 Sep 2013; Bertrand Jacquin <beber@meleeweb.net>
+ +files/0001-Changed-add_user.php-to-create-users-with-unverified.patch,
+ +files/0002-Make-wiki-visible-to-all.patch, +files/aphlictd.confd,
+ +files/aphlictd.initd, +files/phd.confd, +files/phd.initd,
+ -files/phabricator.confd, -files/phabricator.initd, phabricator-9999.ebuild:
+ www-apps/phabricator: patch for make wiki visible to all, patch for error code
+ for users, split init scripts for phd and aphlictd, fix init script to create
+ directory containing pid files, define directory if not present in config,
+
06 Sep 2013; Bertrand Jacquin <beber@meleeweb.net> phabricator-9999.ebuild:
www-apps/phabricator: Fix installing outside from htdocs
diff --git a/www-apps/phabricator/Manifest b/www-apps/phabricator/Manifest
index adb89874..4dd5d7cf 100644
--- a/www-apps/phabricator/Manifest
+++ b/www-apps/phabricator/Manifest
@@ -1,5 +1,9 @@
-AUX phabricator.confd 223 SHA256 afa8ecbedde0eadad0474a5c03c0ab86db7e0b85fec720e560156958f437cb74 WHIRLPOOL c2ac7e29b6a551828cc175132c5f7f29345042d375e5d38de2d2a2989101e6303b677cde8e8184be1de2d5495165cd2d19fdfabd37db0503c34f2f9e1e5b86be
-AUX phabricator.initd 850 SHA256 d0a9dabfa0a618f4a316eca263e8ecc39f2c1f0e9813c35a6d9777aa45dddb9f WHIRLPOOL af4b2ad1474b22aa1481e334f3b07ff616149d27ccb59131da5666168dfc64cae65ed2dbf9ed74e222ee7e22367af394c11bf18edd4e9b0790b8abd55d201617
-EBUILD phabricator-9999.ebuild 3701 SHA256 9a535e5764c842f3081b8b81c3883fe00967da5822fe9b12398107ed291a9d90 WHIRLPOOL 5b0a8d004197c2ce2cf43a7873b4b810e7a24b266081c61387e2a0c5071d58e8d45d4b0a6553804effb674e0929b5649bf241ded2490d8f5345221e49df3542b
-MISC ChangeLog 1878 SHA256 77434f47251ef76b976291fd7e1e1f467dc5a7c535b002e35299cd2276432f97 WHIRLPOOL 2700653367a7e5dbc62cc690c437304058b5db4914127b69b9e167475233306b95b7f13e43b3710c2d0d63e88885390458bb18ffa92a528a378f5b64b12d5fef
+AUX 0001-Changed-add_user.php-to-create-users-with-unverified.patch 1250 SHA256 56a9d7cfc6da64a0d51a1a6e1241df99c455f3e732fe6f421aab7fe1b6d9cf14 WHIRLPOOL 1ee30c2502072d82edc08417d32646b3739f0d28ec0373c3a60db935ff69449780028313d6f937d061cf49455d8edf8c103ddc5bf5a42df5c919c3967a4a610d
+AUX 0002-Make-wiki-visible-to-all.patch 911 SHA256 2d6532cd05f8951efac9e8baffa84916f74ea34f397c6236c93a8019627efc0e WHIRLPOOL 7a0141c83b34b6539c914e3fa87a7dde7bc653e34b2b20e838261f331c1c55126522d40b1dab80effcd1a43a7f4d9cebfd6d9ac756743c132194df14353d8efb
+AUX aphlictd.confd 163 SHA256 553f18f54bcf75eada649e564fea7c4c610fd01ec93708bd246263405e7d5246 WHIRLPOOL 027e41cff147fbf7544ba72575fa21e12a66da7b5cd1bdf53a98b929b7c6127c25a997118e9cfea0e00379a7937eb52b051deb4256abb5bb5d6796a9d16138ad
+AUX aphlictd.initd 1036 SHA256 e0a547d4592955beef3886781d152cd0d48cdd1a547234d6cf7d2cc3e74ee07a WHIRLPOOL d7a8da8395dddaca01e4adaea03200121191cf313d202b5bee6bc9823a6117c0e220dcedc03f30c3022d5b7f6b716b78fe8aedb7ab2cd8d17e3649dcd0f8bd2e
+AUX phd.confd 215 SHA256 80ddbf586f38cc600d06e524f7e85c3258bd563696fa2e41e1ea19268da8079b WHIRLPOOL 0f1a587c755994c410b62da6b897ca8684d584b9f01956359e078429fc7ec7642561dc3e3c306bbb24753e3a68ef5f088a5709706143b6154aa085ac2dfa52ad
+AUX phd.initd 1334 SHA256 38059b41841f1d571280c35eebb20759e4f917937650891426edc985d15dc762 WHIRLPOOL 01a7d56b81d0282dcb2c8d5826059f2c9cf941ba8257eed1fbc27d620e205d06e69fe6dc8dafab2874c27f99d4f056f0fe2ea9f8b4a3a2b2e6d9d99e8ca55b4d
+EBUILD phabricator-9999.ebuild 3964 SHA256 1e15bec58b1f9aa3cecb5d68322a38eb18a50c2105896124e1a5426554f8e3b0 WHIRLPOOL 87a18bb05051b310466a52b8ab57b5aa0a81fd37b348b0b0b4ebeb86fd8fe3bd8626fb20a7af96f4e4dad15fbd98e71a3f2c605dccc1891d0fe1a95c2bbc6722
+MISC ChangeLog 2453 SHA256 c39f97e4f5147fcb0b1ec255ceebecbc8ee1630d4fa4f81ae0d55ee61e11e101 WHIRLPOOL 942afbdec65daba9cae336910eaa065831ad452b134334aec9793e9547a69e10b926091502a1eb0025bdc8e2b17dbf11d879a5fac4caa6f7b828157cdf865d40
MISC metadata.xml 653 SHA256 744c67bfd3b874f305b08a5b68c5e2213c3cdc1c47b381fe130ebfc2005a964b WHIRLPOOL 5efd225c032e0704862510f166c94327460caf27527b473fe8f35ea6117b2b16862e362aff0b7bdb47b38349dbcf8710fff4040f11d50e07865f983dacc93d99
diff --git a/www-apps/phabricator/files/0001-Changed-add_user.php-to-create-users-with-unverified.patch b/www-apps/phabricator/files/0001-Changed-add_user.php-to-create-users-with-unverified.patch
new file mode 100644
index 00000000..271ef158
--- /dev/null
+++ b/www-apps/phabricator/files/0001-Changed-add_user.php-to-create-users-with-unverified.patch
@@ -0,0 +1,43 @@
+From fc9e297d124790a337dd6c69b50bd72cbdc0067c Mon Sep 17 00:00:00 2001
+From: Enlightenment <no-reply@enlightenment.org>
+Date: Fri, 25 Jan 2013 06:00:11 -0800
+Subject: [PATCH 1/6] Changed add_user.php to create users with unverified
+ emails.
+
+Different error codes for different errors.
+---
+ scripts/user/add_user.php | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/scripts/user/add_user.php b/scripts/user/add_user.php
+index edb6a1a..fb3555a 100755
+--- a/scripts/user/add_user.php
++++ b/scripts/user/add_user.php
+@@ -27,6 +27,7 @@ $existing_user = id(new PhabricatorUser())->loadOneWhere(
+ 'username = %s',
+ $username);
+ if ($existing_user) {
++ exit(2);
+ throw new Exception(
+ "There is already a user with the username '{$username}'!");
+ }
+@@ -35,6 +36,7 @@ $existing_email = id(new PhabricatorUserEmail())->loadOneWhere(
+ 'address = %s',
+ $email);
+ if ($existing_email) {
++ exit(3);
+ throw new Exception(
+ "There is already a user with the email '{$email}'!");
+ }
+@@ -45,7 +47,7 @@ $user->setRealname($realname);
+
+ $email_object = id(new PhabricatorUserEmail())
+ ->setAddress($email)
+- ->setIsVerified(1);
++ ->setIsVerified(0);
+
+ id(new PhabricatorUserEditor())
+ ->setActor($admin)
+--
+1.8.1.5
+
diff --git a/www-apps/phabricator/files/0002-Make-wiki-visible-to-all.patch b/www-apps/phabricator/files/0002-Make-wiki-visible-to-all.patch
new file mode 100644
index 00000000..9085fa0a
--- /dev/null
+++ b/www-apps/phabricator/files/0002-Make-wiki-visible-to-all.patch
@@ -0,0 +1,27 @@
+From 8f7c3736b99b5497620df020381373525b9531bf Mon Sep 17 00:00:00 2001
+From: Enlightenment <no-reply@enlightenment.org>
+Date: Tue, 26 Mar 2013 06:11:16 -0700
+Subject: [PATCH 6/6] Make wiki visible to all.
+
+---
+ src/applications/phriction/controller/PhrictionDocumentController.php | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php
+index 3cb431d..1431256 100644
+--- a/src/applications/phriction/controller/PhrictionDocumentController.php
++++ b/src/applications/phriction/controller/PhrictionDocumentController.php
+@@ -8,6 +8,10 @@ final class PhrictionDocumentController
+
+ private $slug;
+
++ public function shouldAllowPublic() {
++ return true;
++ }
++
+ public function willProcessRequest(array $data) {
+ $this->slug = $data['slug'];
+ }
+--
+1.8.1.5
+
diff --git a/www-apps/phabricator/files/aphlictd.confd b/www-apps/phabricator/files/aphlictd.confd
new file mode 100644
index 00000000..457b4270
--- /dev/null
+++ b/www-apps/phabricator/files/aphlictd.confd
@@ -0,0 +1,7 @@
+# Config file for /etc/init.d/aphlictd
+
+# Where to serve the files from
+PHABRICATOR_ROOT="/var/www/localhost"
+
+# Environnement to enable
+PHABRICATOR_ENV="default"
diff --git a/www-apps/phabricator/files/aphlictd.initd b/www-apps/phabricator/files/aphlictd.initd
new file mode 100755
index 00000000..2c1dd321
--- /dev/null
+++ b/www-apps/phabricator/files/aphlictd.initd
@@ -0,0 +1,52 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+: ${PHABRICATOR_ROOT:=/var/www/localhost}
+: ${PHABRICATOR_ENV:=default}
+
+export PHABRICATOR_ENV
+
+depend() {
+ need phd
+}
+
+get_config() {
+ local key="$1"
+
+ "${PHABRICATOR_ROOT}/bin/config" get "$@" \
+ | jq -M --raw-output '.config[0].value'
+}
+
+checkconfig() {
+ pid_file="$(get_config notification.pidfile)" \
+ || return 1
+
+ if [[ -z "${pid_file/null}" ]] ; then
+ "${PHABRICATOR_ROOT}/bin/config" \
+ set notification.pidfile "/run/phabricator/${RC_SVCNAME}.pid"
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting ${RC_SVCNAME} (${PHABRICATOR_ROOT})"
+ start-stop-daemon --start \
+ -e PHABRICATOR_ENV="${PHABRICATOR_ENV}" \
+ --quiet \
+ --exec "${PHABRICATOR_ROOT}/bin/aphlict" \
+ --pidfile "${pid_file}"
+ eend $?
+}
+
+stop() {
+ 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/phabricator.initd b/www-apps/phabricator/files/phabricator.initd
deleted file mode 100755
index 81b85c39..00000000
--- a/www-apps/phabricator/files/phabricator.initd
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2013 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
-}
-
-status() {
- "${PHABRICATOR_ROOT}/bin/phd" status
-}
-
-start() {
- ebegin "Starting ${RC_SVCNAME}"
- start-stop-daemon --start \
- -e PHABRICATOR_ENV="${PHABRICATOR_ENV}" \
- --quiet \
- --user "${PHABRICATOR_USER}" \
- --exec "${PHABRICATOR_ROOT}/bin/phd" \
- -- start
- eend $?
-}
-
-stop() {
- ebegin "Stopping ${RC_SVCNAME}"
- # Yep, a start, phd play with many pid files
- 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/phabricator.confd b/www-apps/phabricator/files/phd.confd
index 20618b4e..41e58183 100644
--- a/www-apps/phabricator/files/phabricator.confd
+++ b/www-apps/phabricator/files/phd.confd
@@ -1,4 +1,4 @@
-# Config file for /etc/init.d/phabricator
+# Config file for /etc/init.d/phd
# Where to serve the files from
PHABRICATOR_ROOT="/var/www/localhost"
diff --git a/www-apps/phabricator/files/phd.initd b/www-apps/phabricator/files/phd.initd
new file mode 100755
index 00000000..5334d623
--- /dev/null
+++ b/www-apps/phabricator/files/phd.initd
@@ -0,0 +1,63 @@
+#!/sbin/runscript
+# Copyright 1999-2013 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'
+}
+
+checkconfig() {
+ pid_dir="$(get_config phd.pid-directory)" \
+ || return 1
+
+ if [[ -z "${pid_dir/null}" ]] ; then
+ "${PHABRICATOR_ROOT}/bin/config" \
+ set phd.pid-directory "/run/phabricator"
+ fi
+}
+
+status() {
+ "${PHABRICATOR_ROOT}/bin/${RC_SVCNAME}" status
+}
+
+start() {
+ checkconfig || return 1
+ checkpath -d \
+ -o "${PHABRICATOR_USER}" \
+ "${pid_dir}"
+
+ ebegin "Starting ${RC_SVCNAME} (${PHABRICATOR_ROOT})"
+ start-stop-daemon --start \
+ -e PHABRICATOR_ENV="${PHABRICATOR_ENV}" \
+ --quiet \
+ --user "${PHABRICATOR_USER}" \
+ --exec "${PHABRICATOR_ROOT}/bin/${RC_SVCNAME}" \
+ -- start
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME} (${PHABRICATOR_ROOT})"
+ # Yep, a start, phd play with many pid files
+ start-stop-daemon --start \
+ -e PHABRICATOR_ENV="${PHABRICATOR_ENV}" \
+ --quiet \
+ --user "${PHABRICATOR_USER}" \
+ --exec "${PHABRICATOR_ROOT}/bin/${RC_SVCNAME}" \
+ -- stop
+ eend $?
+}
diff --git a/www-apps/phabricator/phabricator-9999.ebuild b/www-apps/phabricator/phabricator-9999.ebuild
index f981d9bf..db39681e 100644
--- a/www-apps/phabricator/phabricator-9999.ebuild
+++ b/www-apps/phabricator/phabricator-9999.ebuild
@@ -23,6 +23,7 @@ RDEPEND="|| (
www-servers/nginx:0
www-servers/lighttpd:0
)
+ app-misc/jq:0
>=dev-lang/php-5.2.3[cli,curl,gd,iconv,json,mysql,mysqli,pcntl,ssl?,unicode]
dev-db/mysql
=dev-php/libphutil-${PV}:0
@@ -48,6 +49,11 @@ pkg_setup() {
fi
}
+src_prepare() {
+ epatch "${FILESDIR}/0001-Changed-add_user.php-to-create-users-with-unverified.patch"
+ epatch "${FILESDIR}/0002-Make-wiki-visible-to-all.patch"
+}
+
src_test() {
local BASE_URI="http://localhost.localdomain"
einfo "Setting phabricator.base-uri='${BASE_URI}'"
@@ -109,8 +115,11 @@ src_install() {
webapp_configfile "${MY_HOSTROOTDIR}"/conf/{default,development,production}.conf.php
webapp_src_install
- newinitd "${FILESDIR}/${PN}.initd" "${PN}"
- newconfd "${FILESDIR}/${PN}.confd" "${PN}"
+ newinitd "${FILESDIR}/phd.initd" phd
+ newconfd "${FILESDIR}/phd.confd" phd
+
+ newinitd "${FILESDIR}/aphlictd.initd" aphlictd
+ newconfd "${FILESDIR}/aphlictd.confd" aphlictd
dodoc NOTICE README
}