From 13ddc81a793891dfacd58cdf2120785347f0c1a6 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sun, 18 Dec 2016 00:25:08 +0000 Subject: dev-php/libphutil: Version bump Package-Manager: portage-2.3.0 --- dev-php/libphutil/Manifest | 8 +- ...usage-of-local-SSL-certificates-and-use-s.patch | 45 ++++++++ ...usage-of-local-SSL-certificates-and-use-s.patch | 4 +- dev-php/libphutil/libphutil-20160709.ebuild | 6 +- dev-php/libphutil/libphutil-20161209.ebuild | 128 +++++++++++++++++++++ dev-php/libphutil/libphutil-9999.ebuild | 4 +- 6 files changed, 183 insertions(+), 12 deletions(-) create mode 100644 dev-php/libphutil/files/20161209-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch create mode 100644 dev-php/libphutil/libphutil-20161209.ebuild diff --git a/dev-php/libphutil/Manifest b/dev-php/libphutil/Manifest index f880e6f5..6f35e3f7 100644 --- a/dev-php/libphutil/Manifest +++ b/dev-php/libphutil/Manifest @@ -1,5 +1,7 @@ AUX 20160709-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2155 SHA256 ed7e0c81f1cca4d6b2e14d8229e521302e0f656f9a1b742e478d2c2d036b6962 WHIRLPOOL bf0008faee1cf53a9a729ce9df486eadd40c16258c0ef0faf010c6cee14460bc253f2956dc75c8bc5a796727d9b0f877fa56ebcf0ef161649966d99fa14740b0 -AUX 9999-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2155 SHA256 2c0f08539c617ac9bfcd91a5f91acd9c184e47273155f936084e837ebf8e6d31 WHIRLPOOL df831a1942dc5270ab4998352dc2386aa497b9910b39075df806adbf65b75c1c24c605a3b2494d08f7f4a223a2b7232bfe089cd334b47fe1155ec6a020ea255c -EBUILD libphutil-20160709.ebuild 3445 SHA256 6b82b3b24e3993882f5c33a008bf6a97231e759b222d76ff95c46d75f8171baa WHIRLPOOL 8dd8cb877dd7fe2b7befbc5767091b7524cecdb9d35c43466f2063bfebf8e6d3a03592820aba43d28bce5a59e3a0e1615dd2dc59b8ab41ea324b3f8095363674 -EBUILD libphutil-9999.ebuild 3363 SHA256 51ec62b0993bdfc2a815d89f90aca9cc6cea8d1feadf93791dbf52816c76d38d WHIRLPOOL 0543f90706f8b515e92a3a8d539bfd9a31db074576f893d013898babfa99879b9a7e461ca374afbc8faffbe8dbfe2d7d40fba21ef1cb4f97fb631f6b86b8072a +AUX 20161209-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2165 SHA256 19c836419750de7fc81c929ee035aa8444176eb0f23d2808c059b20542446c46 WHIRLPOOL 5df841187aa097b8adf736a1b7995ea42ba0495e9eb5628ae05202d6fbdea89c6228a04e4890dced799d4fa588ed2f6c4e105d62403b333338a9526e80c7f770 +AUX 9999-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2165 SHA256 b846806226c5fbb301713e6d0a944a0f7316239385a1294786262aee0b92464d WHIRLPOOL a57e4266a5bb8fa88902012a9a46e4c015b85af72e73a17113401fd99c540faab4ac8d936380a66b6c93e0a5b44618f2a49d08582b5d494e3edeea779ac9f54d +EBUILD libphutil-20160709.ebuild 3409 SHA256 b5c94f027576462cd720d4def07e29e09d467f750b27f4901eb7dfe527a9c26d WHIRLPOOL 4fa5f8e1f3d9ad49c3590db6fcf427916d0b43923629a93d3fd8401e1383beb9b2d8224f4710b62303f59c4eadea3947aae69f36e13a0b1c4ce42eb73a8a3b31 +EBUILD libphutil-20161209.ebuild 3409 SHA256 5a26c901727fef1503b15170569e120763da14e27f474a07b93f82717a70bd5f WHIRLPOOL f85bab709df93859c9f06ed955188f7bdcefc9be10089dec7869ebd81218cf4d87fbe97ef39eea255c3a3173b65783da431228c042e748a0840ea56df162cd84 +EBUILD libphutil-9999.ebuild 3324 SHA256 d01edefff940b7f515c694c182b4015b326ba52b075dd430c75421effe322b40 WHIRLPOOL 598252c788ca490ec99fb73d0a761d0c9596665661c5b7daaa01987c7406e75b340332015ddf86a35a72cbdd180ec3b0b080b585fae9ab233d0a6583e0897672 MISC metadata.xml 270 SHA256 c04cdb11fb00afb6ff02df034d8b5b9f0e81547e40c6222532f7093720e11830 WHIRLPOOL 265753a2137d4b55b97549114cf475b9996e2358f570533f3db7ec7a91b7d3cfb60372ac9ebf83284ef963fc4c36f7e6fbeb144fba17a9cef6c402a74557cf94 diff --git a/dev-php/libphutil/files/20161209-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch b/dev-php/libphutil/files/20161209-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch new file mode 100644 index 00000000..843d9383 --- /dev/null +++ b/dev-php/libphutil/files/20161209-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch @@ -0,0 +1,45 @@ +From 7f6be7fa62646f6da5f8ead0b871de17fa06192a Mon Sep 17 00:00:00 2001 +From: Bertrand Jacquin +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 255e7f6878cd..7870de405aed 100644 +--- a/src/future/http/HTTPSFuture.php ++++ b/src/future/http/HTTPSFuture.php +@@ -310,28 +310,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/files/9999-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch b/dev-php/libphutil/files/9999-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch index fc441cb4..98aa80cc 100644 --- a/dev-php/libphutil/files/9999-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch +++ b/dev-php/libphutil/files/9999-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch @@ -1,4 +1,4 @@ -From f219a2c55f3e18b2812614ab9ba382af496d2426 Mon Sep 17 00:00:00 2001 +From dc93c456ec3843d105910c11ab361f941c2f8e63 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Tue, 13 Aug 2013 16:07:58 +0200 Subject: [PATCH] Remove the usage of local SSL certificates and use system @@ -9,7 +9,7 @@ Subject: [PATCH] Remove the usage of local SSL certificates and use system 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/future/http/HTTPSFuture.php b/src/future/http/HTTPSFuture.php -index 255e7f6..7870de4 100644 +index 255e7f6878cd..7870de405aed 100644 --- a/src/future/http/HTTPSFuture.php +++ b/src/future/http/HTTPSFuture.php @@ -310,28 +310,21 @@ final class HTTPSFuture extends BaseHTTPFuture { diff --git a/dev-php/libphutil/libphutil-20160709.ebuild b/dev-php/libphutil/libphutil-20160709.ebuild index 2f9c0499..d3cfd0c9 100644 --- a/dev-php/libphutil/libphutil-20160709.ebuild +++ b/dev-php/libphutil/libphutil-20160709.ebuild @@ -13,7 +13,7 @@ EGIT_COMMIT="5fd2cf9d5ddd38424a54a8fba02398d527639970" LICENSE="Apache-2.0" SLOT="0" -KEYWORDS="~amd64" +KEYWORDS="amd64 x86" IUSE="ssl test" DEPEND="virtual/awk:0 @@ -22,10 +22,8 @@ DEPEND="virtual/awk:0 >=sys-devel/flex-2.5.35:0 =www-client/arcanist-20160701:0 >=dev-lang/php-5.2.3[cli] - "${S}/GIT_COMMIT_INFO" + + epatch "${FILESDIR}/${PV}-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch" + + 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 GIT_COMMIT_INFO + + 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 +} diff --git a/dev-php/libphutil/libphutil-9999.ebuild b/dev-php/libphutil/libphutil-9999.ebuild index 50ba3ed4..5a8c4649 100644 --- a/dev-php/libphutil/libphutil-9999.ebuild +++ b/dev-php/libphutil/libphutil-9999.ebuild @@ -20,10 +20,8 @@ DEPEND="virtual/awk:0 >=sys-devel/flex-2.5.35:0 =www-client/arcanist-${PV}:0 >=dev-lang/php-5.2.3:*[cli] -