From 56c4b53b13c4ccdec859554fa2d917ae74540a99 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Sun, 14 Feb 2016 00:00:48 +0000 Subject: dev-php/libphutil: Version bump Package-Manager: portage-2.2.26 --- dev-php/libphutil/Manifest | 6 +- ...usage-of-local-SSL-certificates-and-use-s.patch | 45 ++++++++ ...usage-of-local-SSL-certificates-and-use-s.patch | 6 +- dev-php/libphutil/libphutil-20160123.ebuild | 126 +++++++++++++++++++++ dev-php/libphutil/libphutil-9999.ebuild | 6 +- 5 files changed, 181 insertions(+), 8 deletions(-) create mode 100644 dev-php/libphutil/files/20160123-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch create mode 100644 dev-php/libphutil/libphutil-20160123.ebuild (limited to 'dev-php') diff --git a/dev-php/libphutil/Manifest b/dev-php/libphutil/Manifest index f05ebfed..63945184 100644 --- a/dev-php/libphutil/Manifest +++ b/dev-php/libphutil/Manifest @@ -3,11 +3,13 @@ AUX 20150708-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2155 SHA 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 +AUX 20160123-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2155 SHA256 308ea683a410785dcad092de36bebd10ca25d8da2e4251ba317c993881a6a25a WHIRLPOOL 9834a1c0e73d2f4e7c689a991fb8fecf2c1f036e8800aaa85c1bd20eaa58365945823f1fc605cc8fb43dcd174de4a2c8f6cd8fdbfbf42725ae486d6043a2b0d4 +AUX 9999-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch 2155 SHA256 0a1395bc7dafcb0d50a1784dd82bbdfcca73d1ab856ce07fcbeecb0d17cfc67d WHIRLPOOL 983898cf387080317350e1f7d0d1602b15088ff2b8c0f89dbcff11f6fd70be8932bbee4fe8bcb601cc531483d1e8ecb3854ee437dd7e3318ff1293a7226aea78 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 +EBUILD libphutil-20160123.ebuild 3389 SHA256 a73a68a59449c87b68299c2c68f6f544b385c562e4ab7881e70be24ae093e892 WHIRLPOOL edecedd34fef1dc85e296f1ff64be9d85c39f401fb0b5f0a9e9288d1bf7f30a8ded215cb9cec567e3987d7b2d29041c47f0e98456a62e716a4bde437f380cd88 +EBUILD libphutil-9999.ebuild 3303 SHA256 ecf70e639b84d85ea776cfc2897af9492a4106cd715805d93eaf3fb53105ff96 WHIRLPOOL c6f608c0656ea422a92c8f2d9a475c26417b828c835301f17ca7af45a65e3cfe1e8ffa91d47794486869187483dd23d3c0ff7d8e7884779203a4751584bdf7a3 MISC metadata.xml 256 SHA256 6ca43960767ca28661abf97c85263db77fe7643902be2ce777c61aa688d8ea2d WHIRLPOOL cef8582829111be09e651eb819e6d1ea59c9c4386b842169ccd46a14c8e3ccb090486fecd61c5fd4aa47998cacc69cdc1fb5ca6bb6325a4da1ebfd0b6eebda7b diff --git a/dev-php/libphutil/files/20160123-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch b/dev-php/libphutil/files/20160123-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch new file mode 100644 index 00000000..af058db2 --- /dev/null +++ b/dev-php/libphutil/files/20160123-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch @@ -0,0 +1,45 @@ +From 407f56b966d1908d8c5f705792f9d2bc32199e0f 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 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/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 172e65a3..5ef8fc12 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 76355d70f7b0418c12db64bc1407cc49f34618e7 Mon Sep 17 00:00:00 2001 +From 8281f177d25ba3d9a38b9393d00e37f39703a0c8 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,10 +9,10 @@ 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 250a7e7..e8ea804 100644 +index 289f412..849caef 100644 --- a/src/future/http/HTTPSFuture.php +++ b/src/future/http/HTTPSFuture.php -@@ -317,28 +317,21 @@ final class HTTPSFuture extends BaseHTTPFuture { +@@ -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. diff --git a/dev-php/libphutil/libphutil-20160123.ebuild b/dev-php/libphutil/libphutil-20160123.ebuild new file mode 100644 index 00000000..a0cbf21b --- /dev/null +++ b/dev-php/libphutil/libphutil-20160123.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="9c472e7c9b64395424c6cd25734bf239cb3c113d" + +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-20160212:0 + dev-lang/php[cli] + )" +RDEPEND=">=dev-lang/php-5.2.3[curl,iconv,json,mysql,mysqli,pcntl,ssl?,unicode]" + +src_prepare() { + git log --format='%H %ct' -n 1 > "${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 a0da088c..06994c3a 100644 --- a/dev-php/libphutil/libphutil-9999.ebuild +++ b/dev-php/libphutil/libphutil-9999.ebuild @@ -24,9 +24,9 @@ DEPEND="virtual/awk:0 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" + git log --format='%H %ct' -n 1 > "${S}/GIT_COMMIT_INFO" - echo "${EGIT_VERSION}" > "${S}/VERSION" + epatch "${FILESDIR}/${PV}-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch" if use test ; then tc-export AR CXX @@ -102,7 +102,7 @@ src_test() { src_install() { insinto "/usr/share/${PN}" - doins VERSION + doins GIT_COMMIT_INFO insinto "/usr/share/php/${PN}" doins -r externals resources scripts src -- cgit v1.2.3