summaryrefslogtreecommitdiff
path: root/www-apps
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2013-09-12 21:17:56 +0200
committerBertrand Jacquin <beber@meleeweb.net>2013-09-12 21:20:10 +0200
commit6607339365b01d863995370d794b47201e0efcd5 (patch)
tree9839ddb4a895b8a3d813b4e321f166a1b4b07311 /www-apps
parentwww-apps/phabricator: New hook to symlink webroot to htdocsdir (diff)
downloadportage-6607339365b01d863995370d794b47201e0efcd5.tar.xz
www-apps/phabricator: merge all hooks as they are not always started in the wanted order, add eend where they where missing
Package-Manager: portage-2.2.3
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/phabricator/ChangeLog6
-rw-r--r--www-apps/phabricator/Manifest8
-rwxr-xr-xwww-apps/phabricator/files/hook-01-perms31
-rwxr-xr-xwww-apps/phabricator/files/hook-02-webroot27
-rwxr-xr-xwww-apps/phabricator/files/webapp-hook (renamed from www-apps/phabricator/files/hook-03-storage-upgrade)40
-rw-r--r--www-apps/phabricator/phabricator-9999.ebuild9
6 files changed, 45 insertions, 76 deletions
diff --git a/www-apps/phabricator/ChangeLog b/www-apps/phabricator/ChangeLog
index a02ab900..3f47e7d4 100644
--- a/www-apps/phabricator/ChangeLog
+++ b/www-apps/phabricator/ChangeLog
@@ -2,6 +2,12 @@
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 12 Sep 2013; Bertrand Jacquin <beber@meleeweb.net> +files/webapp-hook,
+ -files/hook-01-perms, -files/hook-02-webroot, -files/hook-03-storage-upgrade,
+ phabricator-9999.ebuild:
+ www-apps/phabricator: merge all hooks as they are not always started in the
+ wanted order, add eend where they where missing
+
12 Sep 2013; Bertrand Jacquin <beber@meleeweb.net> +files/hook-02-webroot,
phabricator-9999.ebuild:
New hook to symlink webroot to htdocsdir
diff --git a/www-apps/phabricator/Manifest b/www-apps/phabricator/Manifest
index 2977de88..a289d5fb 100644
--- a/www-apps/phabricator/Manifest
+++ b/www-apps/phabricator/Manifest
@@ -2,11 +2,9 @@ AUX 0001-Changed-add_user.php-to-create-users-with-unverified.patch 1246 SHA256
AUX 0002-Make-wiki-visible-to-all.patch 907 SHA256 8f145e199490c559b11865b90b694146bf2d6fa07dcdf50f34f91f44216f24c9 WHIRLPOOL b868cfd98f85eda609ec2c700b42ae1c1ec2724dba8b3bed1cc53dbbda862b294dbad9864cf95f6aab5668b15a17b6f39a25778250c38d602c28a540a7d70ad7
AUX aphlictd.confd 163 SHA256 553f18f54bcf75eada649e564fea7c4c610fd01ec93708bd246263405e7d5246 WHIRLPOOL 027e41cff147fbf7544ba72575fa21e12a66da7b5cd1bdf53a98b929b7c6127c25a997118e9cfea0e00379a7937eb52b051deb4256abb5bb5d6796a9d16138ad
AUX aphlictd.initd 1049 SHA256 6f45d4e4d2d55b50b35b84c11c73628c067f5b7e4d6d88e148ebd00a1a1208cd WHIRLPOOL 2dcf7c230891e660f6dd3655ef0f04be74798f7fc98cc6191088d90ceeb7b6fe51d36ea016d625c18325f4b724a89f07b8e6c2bfd0aa6779946fe72b1702f95d
-AUX hook-01-perms 614 SHA256 f16f446bb4d4784630a962e5f28b37461bf357a21fff0b2606920baa12a555f8 WHIRLPOOL 680179b143c9b096698298cc87b906ad21d66ab0195f002af67526d41411e6152319e953f9680c701f813d0f73b47e2a0875494ea5e169db07827c3a9bb97e68
-AUX hook-02-webroot 556 SHA256 63a1996fc59cd7540cd7a0b3e892145e214702d66fec3a4b7d4bf01fdd59ca40 WHIRLPOOL 5dc0ffe44e257a5f00e882d1f3ec35998c86ddfb46189e59a631fe51fa83f8889654462e926044b632259d450efdba2346537e41733ef072691083f43410e909
-AUX hook-03-storage-upgrade 2167 SHA256 b16e76878d5faa0b0484e8fed616f63d93b406a7cbaa1797a40d8dfa71bc49d1 WHIRLPOOL 3c49f43f22a77dc80dc0cb2782c58a0488027f32281c0217697dd563dbe3fc39a066569a138ad68bb4ea466f01222929b04c56b0a241525535886ba925e53894
AUX phd.confd 215 SHA256 80ddbf586f38cc600d06e524f7e85c3258bd563696fa2e41e1ea19268da8079b WHIRLPOOL 0f1a587c755994c410b62da6b897ca8684d584b9f01956359e078429fc7ec7642561dc3e3c306bbb24753e3a68ef5f088a5709706143b6154aa085ac2dfa52ad
AUX phd.initd 2108 SHA256 8475c308320ce4d51d35cbea46df61628c9c1d64eb724955a38ed49e51690cda WHIRLPOOL 4c91fcce779d423fa0fa24e744675a7dfaa57d0fe2dd86792a2c27215fc014ca85b38695909f8f6c063308a10d53c499620d909ee29382aec8097c437857988e
-EBUILD phabricator-9999.ebuild 4413 SHA256 3d6b7d73ae484e0f9d947490c968b61f53293c865027784f72a45a2eee1c15d1 WHIRLPOOL c61ac18eeb50411eca66ca09a93d0ddff3a34e7498f652e7943ceb03c1d8f6d390c18f54651b3dba29e5302878c86233b4e6eb31de5dd730540680be4860632f
-MISC ChangeLog 4634 SHA256 ee6120612b19e140e1b0b076abf67e8635c3b1fd0723f898c892972cccab9fe6 WHIRLPOOL 36515b094b28891ac114d5ff79898be1c8a6eeb9beeddab9607d7fdd9dcd50283452b4bd76a1a1d826f846544e484b51f318cff7579714364f4f43c7b4037d40
+AUX webapp-hook 2642 SHA256 eec272eff40bc9a5bc494bf25acab21b83cad35f9d2c47155aebd99023c718d7 WHIRLPOOL 01bb0fb69c74b4b563e623eb1371c5c80bf412a83e538024778a32536abc68c22029bd13b98dae2ceb9b04afa495042768799296aaaf1772fbc7879d40972586
+EBUILD phabricator-9999.ebuild 4343 SHA256 a3409db39627c98b3e7795753f206d48429894abc8f36fca28389b2a57a3f0e4 WHIRLPOOL fa26182e35e2bceaf2bac92ccce16caee2d4db4b62aa9ffc9f25d0b3f65417f1ae9c10f850db63f127a2fb1a3a46de526ab0a7262af98426c816f0d42f141c49
+MISC ChangeLog 4943 SHA256 fccca5629929954b619b108d747bd3030af4546420f4d7da0c28b140d54ef33c WHIRLPOOL 8dc878b984412be3e94004b952138857f818ef20a28e3f9a59b4fd077f68f1b18418b8a5e3a15417dabb092de2e0e58b585739aeb671517aba1c5e5382b36a63
MISC metadata.xml 653 SHA256 744c67bfd3b874f305b08a5b68c5e2213c3cdc1c47b381fe130ebfc2005a964b WHIRLPOOL 5efd225c032e0704862510f166c94327460caf27527b473fe8f35ea6117b2b16862e362aff0b7bdb47b38349dbcf8710fff4040f11d50e07865f983dacc93d99
diff --git a/www-apps/phabricator/files/hook-01-perms b/www-apps/phabricator/files/hook-01-perms
deleted file mode 100755
index 4a82a2ef..00000000
--- a/www-apps/phabricator/files/hook-01-perms
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-export PATH="$PATH:/usr/lib/portage/bin/ebuild-helpers"
-source /usr/lib/portage/bin/isolated-functions.sh
-
-function do_install () {
- 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 -- \
- fperms 755
- eend $?
-
- return 0
-}
-
-[[ $# -ne 1 ]] && exit 1
-
-if ! declare -f "do_$1" > /dev/null 2>&1 ; then
- exit 0
-fi
-
-einfo
-einfo "$0 $@"
-einfo
-
-do_$1
diff --git a/www-apps/phabricator/files/hook-02-webroot b/www-apps/phabricator/files/hook-02-webroot
deleted file mode 100755
index 4fcefd30..00000000
--- a/www-apps/phabricator/files/hook-02-webroot
+++ /dev/null
@@ -1,27 +0,0 @@
-#!/bin/bash
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: $
-
-export PATH="$PATH:/usr/lib/portage/bin/ebuild-helpers"
-source /usr/lib/portage/bin/isolated-functions.sh
-
-function do_install () {
- einfo "Make ${VHOST_ROOT}/webroot pointing to ${VHOST_HTDOCSDIR/#${VHOST_ROOT}}"
- ln -s "${VHOST_HTDOCSDIR/#${VHOST_ROOT}}" "${VHOST_ROOT}/webroot"
- eend $?
-
- return 0
-}
-
-[[ $# -ne 1 ]] && exit 1
-
-if ! declare -f "do_$1" > /dev/null 2>&1 ; then
- exit 0
-fi
-
-einfo
-einfo "$0 $@"
-einfo
-
-do_$1
diff --git a/www-apps/phabricator/files/hook-03-storage-upgrade b/www-apps/phabricator/files/webapp-hook
index 759d9321..fb567f85 100755
--- a/www-apps/phabricator/files/hook-03-storage-upgrade
+++ b/www-apps/phabricator/files/webapp-hook
@@ -14,7 +14,27 @@ function rc_status () {
"/etc/init.d/${_svc}" -sCq status 2> /dev/null
}
-function do_install () {
+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 -- \
+ fperms 755
+ eend $?
+
+ return 0
+}
+
+function fix-webroot () {
+ einfo "Make ${VHOST_ROOT}/webroot pointing to ${VHOST_HTDOCSDIR/#${VHOST_ROOT}\/}"
+ ln -s "${VHOST_HTDOCSDIR/#${VHOST_ROOT}\/}" "${VHOST_ROOT}/webroot"
+ eend $?
+
+ return 0
+}
+
+function storage-upgrade () {
local _date="$(date +'%F-%T')"
local _has_aphlictd=no
@@ -31,6 +51,10 @@ function do_install () {
return 1
fi
+ case "${VHOST_SERVER}" in
+ apache) VHOST_SERVER="apache2" ;;
+ esac
+
# Save service status
rc_status aphlictd && _has_aphlictd=yes
rc_status phd && _has_phd=yes
@@ -66,16 +90,14 @@ function do_install () {
[[ $# -ne 1 ]] && exit 1
-if ! declare -f "do_$1" > /dev/null 2>&1 ; then
- exit 0
-fi
-
einfo
einfo "$0 $@"
einfo
-case "${VHOST_SERVER}" in
- apache) VHOST_SERVER="apache2" ;;
+case "$1" in
+ install)
+ fix-perms
+ fix-webroot
+ storage-upgrade
+ ;;
esac
-
-do_$1
diff --git a/www-apps/phabricator/phabricator-9999.ebuild b/www-apps/phabricator/phabricator-9999.ebuild
index 93131911..05af1b66 100644
--- a/www-apps/phabricator/phabricator-9999.ebuild
+++ b/www-apps/phabricator/phabricator-9999.ebuild
@@ -81,6 +81,7 @@ src_prepare() {
sed -i \
-e "1 s:^#!.*:#!${path} ${args}:" \
"${REPLY}"
+ eend $?
done
}
@@ -92,16 +93,19 @@ src_test() {
if [[ -n "${PHABRICATOR_MYSQL_HOST}" ]] ; then
einfo "Setting mysql.host='${PHABRICATOR_MYSQL_HOST}'"
bin/config set mysql.host "${PHABRICATOR_MYSQL_HOST}"
+ eend $?
fi
if [[ -n "${PHABRICATOR_MYSQL_USER}" ]] ; then
einfo "Setting mysql.user='${PHABRICATOR_MYSQL_USER}'"
bin/config set mysql.user "${PHABRICATOR_MYSQL_USER}"
+ eend $?
fi
if [[ -n "${PHABRICATOR_MYSQL_PASS}" ]] ; then
einfo "Setting mysql.pass='${PHABRICATOR_MYSQL_PASS}'"
bin/config set mysql.pass "${PHABRICATOR_MYSQL_PASS}"
+ eend $?
fi
arc unit --everything --no-coverage || die "arc unit failed"
@@ -132,10 +136,7 @@ src_install() {
fperms 755
webapp_configfile "${MY_HOSTROOTDIR}"/conf/{default,development,production}.conf.php
-
- webapp_hook_script "${FILESDIR}/hook-01-perms"
- webapp_hook_script "${FILESDIR}/hook-02-webroot"
- webapp_hook_script "${FILESDIR}/hook-03-storage-upgrade"
+ webapp_hook_script "${FILESDIR}/webapp-hook"
webapp_src_install