summaryrefslogtreecommitdiff
path: root/dev-php
diff options
context:
space:
mode:
Diffstat (limited to 'dev-php')
-rw-r--r--dev-php/libphutil/ChangeLog7
-rw-r--r--dev-php/libphutil/Manifest6
-rw-r--r--dev-php/libphutil/files/20150708-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch48
-rw-r--r--dev-php/libphutil/libphutil-20150414.ebuild3
-rw-r--r--dev-php/libphutil/libphutil-20150708.ebuild126
5 files changed, 187 insertions, 3 deletions
diff --git a/dev-php/libphutil/ChangeLog b/dev-php/libphutil/ChangeLog
index f8e28e12..8d7ba78d 100644
--- a/dev-php/libphutil/ChangeLog
+++ b/dev-php/libphutil/ChangeLog
@@ -1,3 +1,10 @@
+*libphutil-20150708 (08 Aug 2015)
+
+ 08 Aug 2015; Bertrand Jacquin <bertrand@jacquin.bzh>
+ +files/20150708-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch,
+ +libphutil-20150708.ebuild, libphutil-20150414.ebuild:
+ dev-php/libphutil: Version bump
+
*libphutil-20150414 (19 Apr 2015)
19 Apr 2015; Bertrand Jacquin <bertrand@jacquin.bzh>
diff --git a/dev-php/libphutil/Manifest b/dev-php/libphutil/Manifest
index 5faecc07..bbcbd12a 100644
--- a/dev-php/libphutil/Manifest
+++ b/dev-php/libphutil/Manifest
@@ -1,6 +1,8 @@
AUX 20150414-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2164 SHA256 80219b7e874cd1599ac2977949cf18dd0d09de4b7cf3ab10e5871d119c61bcf3 WHIRLPOOL 0af9d4a209f46f9e013988f86df69bd649e0f656fab8da9bc9ea9306e1d5b5f7477fb0d1e7b89de37871e8ac864c33a09ec2ad8a7ba5c3f43bd952d51b19ef64
+AUX 20150708-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2164 SHA256 80219b7e874cd1599ac2977949cf18dd0d09de4b7cf3ab10e5871d119c61bcf3 WHIRLPOOL 0af9d4a209f46f9e013988f86df69bd649e0f656fab8da9bc9ea9306e1d5b5f7477fb0d1e7b89de37871e8ac864c33a09ec2ad8a7ba5c3f43bd952d51b19ef64
AUX 9999-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2164 SHA256 80219b7e874cd1599ac2977949cf18dd0d09de4b7cf3ab10e5871d119c61bcf3 WHIRLPOOL 0af9d4a209f46f9e013988f86df69bd649e0f656fab8da9bc9ea9306e1d5b5f7477fb0d1e7b89de37871e8ac864c33a09ec2ad8a7ba5c3f43bd952d51b19ef64
-EBUILD libphutil-20150414.ebuild 3346 SHA256 0b8b97948570984ffb6c998e62b103ac94227a3735eaa1f72f254ab45f61ccea WHIRLPOOL 9dd62062154bff10ee80d8092ddfff1f6956e5d83db93fac5ffbe147ab08f3cdc25b5a0da68b5d16a69a953fe564ca55577f224739c985845d659cd8bf559410
+EBUILD libphutil-20150414.ebuild 3370 SHA256 c31b09b9728984948615c4b627f4461654a7b526f6e144c3309f533e85a4cc96 WHIRLPOOL 8ecf18fbb855679a3634a8c2a0254e880c8220d1d0c2369a90b6031642248cc99dc7382b91972ffd641b7ada864ea9ff5cc729bbbc5efadee64a3942d212ba0a
+EBUILD libphutil-20150708.ebuild 3370 SHA256 8b2892ebb8f4cb711f0f029de74e6b87155513641c235ccee328fc393be5126d WHIRLPOOL e8afbdc230930c845ec2a6c5d8fbf7103ea3f81151c0aebde28ce0078a437190e912ee99f1bf871cf26229c3e989e246c4ed205bf0613a4411f5d8f1e7db0fec
EBUILD libphutil-9999.ebuild 3285 SHA256 123c16d3947ccd47e6ae24a2dcd316f7cf29cd016f2e59f19d1f7c56ad03fbfa WHIRLPOOL f87d280edee48d1336fc86b66bac7f657097b2e199808cc30c0957708f2db9a79262f4e7e79cd044f3e45d8b0a2125c6dc593f7276f96d75471764e0a94428e5
-MISC ChangeLog 3087 SHA256 7ab3fc2bf37ed4af727e022c1c5023085f0c52e7c408c17f9c53a86bca679462 WHIRLPOOL ae32f890382b4e7bc3d92b662710680e94f3e6e8d022399ab6fb1b5d543e792ef9655bdda28a324d54f172d6616e970764bef830017c6ce4e5b66b6f458a8334
+MISC ChangeLog 3347 SHA256 16a832ce0cec9be9f0bce886ea7f660741e7451d3a146d7035dbd0be692f1100 WHIRLPOOL b7a2240c95c8c3fd49e2918e6e9f07fd99c8e77fd4f93bc7e5539c4b59937c38638a62557b7877eca365f79ba818f879b446e77e254ae0263a77e7ca9874af22
MISC metadata.xml 256 SHA256 6ca43960767ca28661abf97c85263db77fe7643902be2ce777c61aa688d8ea2d WHIRLPOOL cef8582829111be09e651eb819e6d1ea59c9c4386b842169ccd46a14c8e3ccb090486fecd61c5fd4aa47998cacc69cdc1fb5ca6bb6325a4da1ebfd0b6eebda7b
diff --git a/dev-php/libphutil/files/20150708-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch b/dev-php/libphutil/files/20150708-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch
new file mode 100644
index 00000000..c925f864
--- /dev/null
+++ b/dev-php/libphutil/files/20150708-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch
@@ -0,0 +1,48 @@
+From 76355d70f7b0418c12db64bc1407cc49f34618e7 Mon Sep 17 00:00:00 2001
+From: Bertrand Jacquin <beber@meleeweb.net>
+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 250a7e7..e8ea804 100644
+--- a/src/future/http/HTTPSFuture.php
++++ b/src/future/http/HTTPSFuture.php
+@@ -317,28 +317,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');
+ }
+ }
+
+--
+2.0.5
+
diff --git a/dev-php/libphutil/libphutil-20150414.ebuild b/dev-php/libphutil/libphutil-20150414.ebuild
index 5a6fb2af..ea7f3b0a 100644
--- a/dev-php/libphutil/libphutil-20150414.ebuild
+++ b/dev-php/libphutil/libphutil-20150414.ebuild
@@ -8,6 +8,7 @@ inherit eutils toolchain-funcs git-r3
DESCRIPTION="Collection of utility classes and functions for PHP used by phabricator"
HOMEPAGE="http://www.phabricator.org"
EGIT_REPO_URI="git://github.com/phacility/libphutil.git"
+EGIT_BRANCH="stable"
EGIT_COMMIT="aaee4009e20db8eea94591117788be57c133eae5"
LICENSE="Apache-2.0"
@@ -19,7 +20,7 @@ DEPEND="virtual/awk:0
test? (
sys-devel/bison:0
>=sys-devel/flex-2.5.35:0
- =www-client/arcanist-${PV}:0
+ =www-client/arcanist-20150414:0
dev-lang/php[cli]
)"
RDEPEND=">=dev-lang/php-5.2.3[curl,iconv,json,mysql,mysqli,pcntl,ssl?,unicode]"
diff --git a/dev-php/libphutil/libphutil-20150708.ebuild b/dev-php/libphutil/libphutil-20150708.ebuild
new file mode 100644
index 00000000..12f18b8a
--- /dev/null
+++ b/dev-php/libphutil/libphutil-20150708.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=5
+inherit eutils toolchain-funcs git-r3
+
+DESCRIPTION="Collection of utility classes and functions for PHP used by phabricator"
+HOMEPAGE="http://www.phabricator.org"
+EGIT_REPO_URI="git://github.com/phacility/libphutil.git"
+EGIT_BRANCH="stable"
+EGIT_COMMIT="aa6cd8f7e5e5e637dcfcb8417fbc343b45820c93"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="ssl test"
+
+DEPEND="virtual/awk:0
+ test? (
+ sys-devel/bison:0
+ >=sys-devel/flex-2.5.35:0
+ =www-client/arcanist-20150724:0
+ dev-lang/php[cli]
+ )"
+RDEPEND=">=dev-lang/php-5.2.3[curl,iconv,json,mysql,mysqli,pcntl,ssl?,unicode]"
+
+src_prepare() {
+ epatch "${FILESDIR}/${PV}-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch"
+
+ echo "${EGIT_VERSION}" > "${S}/VERSION"
+
+ if use test ; then
+ tc-export AR CXX
+ fi
+
+ find "${S}" -type f -name .gitignore -print0 \
+ | xargs -0 --no-run-if-empty -- \
+ rm
+
+ rm -r resources/ssl
+ rm -r scripts/daemon/torture
+ rm scripts/build_xhpast.sh
+ rm src/parser/xhpast/bin/xhpast.exe
+
+ # Replace 'env' shebang to files it point to
+ find "${S}" -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 "Replace ${REPLY/#${S}\/} shebang to #!${path} ${args}"
+ sed -i \
+ -e "1 s:^#!.*:#!${path} ${args}:" \
+ "${REPLY}"
+ eend $?
+ done
+}
+
+src_compile() {
+ if use test ; then
+ cd support/xhpast
+
+ # Avoid sandbox violation for dev-lang/php[snmp]
+ # php -f generate_nodes.php'
+ #
+ # * ACCESS DENIED: open_wr: /var/lib/net-snmp/mib_indexes/0
+ # abs_path: /var/lib/net-snmp/mib_indexes/0
+ # res_path: /var/lib/net-snmp/mib_indexes/0
+ # /usr/lib64/libsandbox.so(+0xd9d1)[0x7f226c8899d1]
+ # /usr/lib64/libsandbox.so(+0xdaf8)[0x7f226c889af8]
+ # /usr/lib64/libsandbox.so(+0x59cf)[0x7f226c8819cf]
+ # /usr/lib64/libsandbox.so(fopen+0x7c)[0x7f226c8843ec]
+ # /usr/lib64/libnetsnmp.so.30(netsnmp_mibindex_new+0x48)[0x7f22695f55e8]
+ # /usr/lib64/libnetsnmp.so.30(add_mibdir+0x9c)[0x7f226960a00c]
+ # /usr/lib64/libnetsnmp.so.30(netsnmp_init_mib+0xca)[0x7f22695f4bea]
+ # /usr/lib64/libnetsnmp.so.30(init_snmp+0x32d)[0x7f226961c2dd]
+ # php(zm_startup_snmp+0x51)[0x7f226cf81e11]
+ # php(zend_startup_module_ex+0x11a)[0x7f226d0bccea]
+ # /proc/15834/cmdline: php -f generate_nodes.php
+ #
+ # See snmp_config(5)
+ export SNMP_PERSISTENT_DIR="${T}"
+
+ emake
+ emake install
+ fi
+}
+
+src_test() {
+ arc unit --everything --no-coverage || die "arc unit failed"
+}
+
+src_install() {
+ insinto "/usr/share/${PN}"
+ doins VERSION
+
+ insinto "/usr/share/php/${PN}"
+ doins -r externals resources scripts src
+
+ if use test ; then
+ fperms 755 "/usr/share/php/${PN}/src/parser/xhpast/bin/xhpast"
+ dosym "/usr/share/php/${PN}/src/parser/xhpast/bin/xhpast" /usr/bin/xhpast
+ fi
+
+ # 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.md
+}