diff options
Diffstat (limited to 'dev-php')
-rw-r--r-- | dev-php/libphutil/ChangeLog | 7 | ||||
-rw-r--r-- | dev-php/libphutil/Manifest | 4 | ||||
-rw-r--r-- | dev-php/libphutil/files/20151024-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch | 45 | ||||
-rw-r--r-- | dev-php/libphutil/libphutil-20151024.ebuild | 126 |
4 files changed, 181 insertions, 1 deletions
diff --git a/dev-php/libphutil/ChangeLog b/dev-php/libphutil/ChangeLog index 5a614c1a..a322010d 100644 --- a/dev-php/libphutil/ChangeLog +++ b/dev-php/libphutil/ChangeLog @@ -1,3 +1,10 @@ +*libphutil-20151024 (25 Oct 2015) + + 25 Oct 2015; Bertrand Jacquin <bertrand@jacquin.bzh> + +files/20151024-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch, + +libphutil-20151024.ebuild: + dev-php/libphutil: Version bump + *libphutil-20151003 (08 Oct 2015) 08 Oct 2015; Bertrand Jacquin <bertrand@jacquin.bzh> diff --git a/dev-php/libphutil/Manifest b/dev-php/libphutil/Manifest index b0dd26f9..afd0b24c 100644 --- a/dev-php/libphutil/Manifest +++ b/dev-php/libphutil/Manifest @@ -2,11 +2,13 @@ AUX 20150414-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2155 SHA AUX 20150708-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2155 SHA256 2a4d36afcfe32309f1c86bbb9e88869709a3658fec260c488d52b7afe47a15b3 WHIRLPOOL a105e836b486155c2a9a2832e90fcd7a0a27dfdfea0b250ddcd38bcc0957f5a96a553f1bf853ff596621343182ffa4c170935132f64aeb05120882d3b2743f31 AUX 20150815-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2155 SHA256 2a4d36afcfe32309f1c86bbb9e88869709a3658fec260c488d52b7afe47a15b3 WHIRLPOOL a105e836b486155c2a9a2832e90fcd7a0a27dfdfea0b250ddcd38bcc0957f5a96a553f1bf853ff596621343182ffa4c170935132f64aeb05120882d3b2743f31 AUX 20151003-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2155 SHA256 8aa0141f3434dbb8e91d3a713b238cc9e5294aaeba525b25c45b3cee888e8ae8 WHIRLPOOL 5a897a5a4368ce4aa4bd183663f76b12847eab5287466862ea3f9763d3a2bb0d4401faa1e5aa8da2425430030c2ed36ebd18b3d853d8f52dee5fc6545831b153 +AUX 20151024-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2155 SHA256 30b983985ce2610e643a2e8fccca366a1880ae2b92b19d26c5f36ee7c6edf664 WHIRLPOOL b563c86b3ec3daa4448b6a649d848da59c13ab34a5717d01e56821e3e2589f7f152fded097c09c23b77edcc92ef0d6a315ef6f7ec5318654e3e7069c2189763c AUX 9999-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2155 SHA256 2a4d36afcfe32309f1c86bbb9e88869709a3658fec260c488d52b7afe47a15b3 WHIRLPOOL a105e836b486155c2a9a2832e90fcd7a0a27dfdfea0b250ddcd38bcc0957f5a96a553f1bf853ff596621343182ffa4c170935132f64aeb05120882d3b2743f31 EBUILD libphutil-20150414.ebuild 3364 SHA256 1795640e3ce2da51f6d198a1d7501254d464cd97a2aebeae3b69ed79ffa318c5 WHIRLPOOL 6836e91db6f8a861c691559784093b65e48c73d33a14ed04941019c54f85d214644c361ca52854c7a6a5a686a91ed1aa6fe9ea0916300785797ca8d7993003a4 EBUILD libphutil-20150708.ebuild 3364 SHA256 2b66ee4555826cdd253bb1a4d7f64db363b8025402921b095ca90b04c4e7018a WHIRLPOOL bdc43d3b7f2cd94c63256e501b5ff6bf4a3cf38280a04fca4f0dc8fc2db9c6bda97d18689460db43ce6eeae7dfac073732e60c9dd4d9ac9cff515b56deef2e5c EBUILD libphutil-20150815.ebuild 3364 SHA256 a57823aabbadc9b5572da3f04bf5ddf5c6461166d29ebd7cbafa0866f1e367b9 WHIRLPOOL e36320a84188dfb75c7dce6d733bf5e17c020a0e344a60214e538c1b9862685a067142b8c56a53b61484ad90e58e83f243f36f76f59b07646cd5da5bf46ff6ae EBUILD libphutil-20151003.ebuild 3364 SHA256 7d249db39a9b8db052208146d977a19bd116568ead6309a5c2e37b39a14a272e WHIRLPOOL 6355f09b306eed92cacc1222afe1fcd31403148d78746676d544a657b247f265a509f65575304b99d402cbd7e3e5f88085d6e8478e72ac257fcea33b4dbc4d39 +EBUILD libphutil-20151024.ebuild 3365 SHA256 8238c3992d7090b9abc4d6bdb676e178a55a5a5d03abc45bfdcfbffd6f0e023a WHIRLPOOL 1be19cd325c99ed03c1d0ea15ddd75fc5971bc2470ad863690e0e103bcf74cd475ec1429fffab1eed8b47dac28350a9b8aa76cb0d2b967362b0a35f2c92366d2 EBUILD libphutil-9999.ebuild 3279 SHA256 2f928f465a190bd7700f08634267af634d3e4b29dc70ba6421995c07e0559233 WHIRLPOOL d4a8dcc6c6794e93bde2531b2bc1195f9edecfe94f6e2ee5cbaedfbc590f7ee69c7176241804566301fbd189338e46d46d65f8b08f3ab5da251c223564cc756e -MISC ChangeLog 4343 SHA256 c717a939c6b46faad38364abbcb26b42577ea3e54dbee6c79003999b20aab24b WHIRLPOOL 00bd03be6f7c43fe79a82f195dc1d063904a874e675ec7ee913b8e177f4eed8e09f65702ed324bdb012c684e5fcf2c935ffb5bd4055d6f02cae717467c386a4b +MISC ChangeLog 4576 SHA256 f06fd77326ed89e475d31e2bba829e548b187eeac6b0a20a812bf988466b749a WHIRLPOOL 75c8b39990846be84b48dcbc5179186965b53e276e51517301f647210ff3791878e4c9376f229ba63ab964fab335906c2c7baa7b848ee2ff1c436884164df3e8 MISC metadata.xml 256 SHA256 6ca43960767ca28661abf97c85263db77fe7643902be2ce777c61aa688d8ea2d WHIRLPOOL cef8582829111be09e651eb819e6d1ea59c9c4386b842169ccd46a14c8e3ccb090486fecd61c5fd4aa47998cacc69cdc1fb5ca6bb6325a4da1ebfd0b6eebda7b diff --git a/dev-php/libphutil/files/20151024-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch b/dev-php/libphutil/files/20151024-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch new file mode 100644 index 00000000..58280eff --- /dev/null +++ b/dev-php/libphutil/files/20151024-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch @@ -0,0 +1,45 @@ +From 2d86c30d505242f958c33d5421fb709392b23ea9 Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin <bertrand@jacquin.bzh> +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 289f412..849caef 100644 +--- a/src/future/http/HTTPSFuture.php ++++ b/src/future/http/HTTPSFuture.php +@@ -318,28 +318,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'); + } + } + diff --git a/dev-php/libphutil/libphutil-20151024.ebuild b/dev-php/libphutil/libphutil-20151024.ebuild new file mode 100644 index 00000000..e683572f --- /dev/null +++ b/dev-php/libphutil/libphutil-20151024.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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="5e2297f1588069dd3fd071e7977a2be6cf296aee" + +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-20151024: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.php + 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 +} |