summaryrefslogtreecommitdiff
path: root/dev-php
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2013-08-15 01:50:24 +0200
committerBertrand Jacquin <beber@meleeweb.net>2013-08-15 01:57:26 +0200
commitf63bbefa12682b9b62ed88105c66c8f93448f22f (patch)
treeeccce05a3a3aa35c78c3d7d217d4a56530b343f5 /dev-php
parentdev-libs/nss: removed, bug #476574 fixed upstream (diff)
downloadportage-f63bbefa12682b9b62ed88105c66c8f93448f22f.tar.xz
dev-php/libphutil: Collection of utility classes and functions for PHP used by phabricator
Package-Manager: portage-2.2.0
Diffstat (limited to 'dev-php')
-rw-r--r--dev-php/libphutil/ChangeLog7
-rw-r--r--dev-php/libphutil/Manifest4
-rw-r--r--dev-php/libphutil/files/0001-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch48
-rw-r--r--dev-php/libphutil/libphutil-9999.ebuild48
-rw-r--r--dev-php/libphutil/metadata.xml8
5 files changed, 115 insertions, 0 deletions
diff --git a/dev-php/libphutil/ChangeLog b/dev-php/libphutil/ChangeLog
new file mode 100644
index 00000000..be4595e3
--- /dev/null
+++ b/dev-php/libphutil/ChangeLog
@@ -0,0 +1,7 @@
+*libphutil-9999 (14 Aug 2013)
+
+ 14 Aug 2013; Bertrand Jacquin <beber@meleeweb.net>
+ +files/0001-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch,
+ +libphutil-9999.ebuild, +metadata.xml:
+ dev-php/libphutil: Collection of utility classes and functions for PHP used by
+ phabricator
diff --git a/dev-php/libphutil/Manifest b/dev-php/libphutil/Manifest
new file mode 100644
index 00000000..e165af46
--- /dev/null
+++ b/dev-php/libphutil/Manifest
@@ -0,0 +1,4 @@
+AUX 0001-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2166 SHA256 b4043eaf30612f01879c19083ff261b6f9949e3f94389e29cab2ab8635290bb8 WHIRLPOOL 5b8a10f9abb54a1d1253c94f7991ea9c958f9ac1a2988c56c0d951fadf8138df7ac689844d5c6278a27f3d469514de12dbd4dc68e3881715b7349b9bc9ba0096
+EBUILD libphutil-9999.ebuild 1100 SHA256 c211ad314585b0057df819c9eed51f63b76129cbffe66de62b3ae4c801e8fbd7 WHIRLPOOL 78519f16447609bfb29574ef86ab238bb833d9dc8b9394ef949f7f9d1538881ce70aa1b6991be7572f93beb705217c328ca3f183cf53f18024fd8e18e5f829c3
+MISC ChangeLog 294 SHA256 d1d03e77383bf35939e4bc857534b1f1e905873d172777dd1174d94e3d789ede WHIRLPOOL 995ec7eac01edf2a7b7108da092b4f0ebe2393159f7b54aec95b38c8d7dd9d3c61cfeb7d35c15862fdcbef7a301beec3e789b071328c7c9905a26d6d8ec307ee
+MISC metadata.xml 254 SHA256 c56bc3d6780712c960298c70bb86867aeb6661e97a317cc624516b0e16b72fcc WHIRLPOOL 2ebbfaa14ef0c1847284fe64a79f052cd7e73b25a724fba728c084aaaf2dd0692e068eedcf42ccef7e205077f00c35780ded7ec69118dc01ddb988b4802e46ae
diff --git a/dev-php/libphutil/files/0001-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch b/dev-php/libphutil/files/0001-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch
new file mode 100644
index 00000000..33376113
--- /dev/null
+++ b/dev-php/libphutil/files/0001-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch
@@ -0,0 +1,48 @@
+From d1f7d4c12b30ee990315e8a9bfbeb7c775846bed Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <bjacquin@exosec.fr>
+Date: Tue, 13 Aug 2013 16:07:58 +0200
+Subject: [PATCH] Remove the usage of local SSL certificates and use system
+ provided by ca-certificates.
+
+---
+ src/future/http/HTTPSFuture.php | 11 ++---------
+ 1 file changed, 2 insertions(+), 9 deletions(-)
+
+diff --git a/src/future/http/HTTPSFuture.php b/src/future/http/HTTPSFuture.php
+index 0434907..3a58e3d 100644
+--- a/src/future/http/HTTPSFuture.php
++++ b/src/future/http/HTTPSFuture.php
+@@ -246,28 +246,21 @@ final class HTTPSFuture extends BaseHTTPFuture {
+ // `setCABundle()` or similar.
+ // - Then, check if a global bundle is set explicitly for all requests,
+ // via `setGlobalCABundle()` or similar.
+- // - Then, if a local custom.pem exists, use that, because it probably
+- // means that the user wants to override everything (also because the
+- // user might not have access to change the box's php.ini to add
+- // curl.cainfo).
+ // - Otherwise, try using curl.cainfo. If it's set explicitly, it's
+ // probably reasonable to try using it before we fall back to what
+ // libphutil ships with.
+- // - Lastly, try the default that libphutil ships with. If it doesn't
++ // - Lastly, try the default from ca-certificates. If it doesn't
+ // work, give up and yell at the user.
+
+ if (!$this->getCABundle()) {
+- $caroot = dirname(phutil_get_library_root('phutil')).'/resources/ssl/';
+ $ini_val = ini_get('curl.cainfo');
+ if (self::getGlobalCABundle()) {
+ $this->setCABundleFromPath(self::getGlobalCABundle());
+- } else if (Filesystem::pathExists($caroot.'custom.pem')) {
+- $this->setCABundleFromPath($caroot.'custom.pem');
+ } else if ($ini_val) {
+ // TODO: We can probably do a pathExists() here, even.
+ $this->setCABundleFromPath($ini_val);
+ } else {
+- $this->setCABundleFromPath($caroot.'default.pem');
++ $this->setCABundleFromPath('/etc/ssl/certs/ca-certificates.crt');
+ }
+ }
+
+--
+1.8.1.5
+
diff --git a/dev-php/libphutil/libphutil-9999.ebuild b/dev-php/libphutil/libphutil-9999.ebuild
new file mode 100644
index 00000000..d2e477ea
--- /dev/null
+++ b/dev-php/libphutil/libphutil-9999.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+inherit eutils git-2
+
+DESCRIPTION="Collection of utility classes and functions for PHP used by phabricator"
+HOMEPAGE="http://www.phabricator.org"
+EGIT_REPO_URI="git://github.com/facebook/libphutil.git"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="test"
+
+RDEPEND=">=dev-lang/php-5.2[curl,iconv,pcntl,mysql,mysqli]
+ dev-php/pecl-apc"
+
+src_prepare() {
+ epatch "${FILESDIR}/0001-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch"
+}
+
+src_install() {
+ rm -r scripts/daemon/torture
+ rm -r scripts/test
+
+ rm scripts/build_xhpast.sh
+ rm src/extensions/README
+
+ if ! use test ; then
+ find "${S}" -type d -name __tests__ -print0 \
+ | xargs -0 --no-run-if-empty -- \
+ rm -r
+ fi
+
+ insinto "/usr/share/php/${PN}"
+ doins -r 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 NOTICE README
+}
diff --git a/dev-php/libphutil/metadata.xml b/dev-php/libphutil/metadata.xml
new file mode 100644
index 00000000..933498d8
--- /dev/null
+++ b/dev-php/libphutil/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer>
+ <email>beber@meleeweb.net</email>
+ <name>Bertrand Jacquin</name>
+ </maintainer>
+</pkgmetadata>