From 156e437a9258a21436836d076d198121284658c9 Mon Sep 17 00:00:00 2001 From: Bertrand Jacquin Date: Mon, 6 Aug 2018 15:11:38 +0100 Subject: dev-php/libphutil: Version bump Package-Manager: Portage-2.3.40, Repoman-2.3.9 --- ...usage-of-local-SSL-certificates-and-use-s.patch | 45 ------- ...usage-of-local-SSL-certificates-and-use-s.patch | 45 +++++++ ...usage-of-local-SSL-certificates-and-use-s.patch | 2 +- dev-php/libphutil/libphutil-20171201.ebuild | 130 --------------------- dev-php/libphutil/libphutil-20180720.ebuild | 130 +++++++++++++++++++++ 5 files changed, 176 insertions(+), 176 deletions(-) delete mode 100644 dev-php/libphutil/files/20171201-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch create mode 100644 dev-php/libphutil/files/20180720-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch delete mode 100644 dev-php/libphutil/libphutil-20171201.ebuild create mode 100644 dev-php/libphutil/libphutil-20180720.ebuild (limited to 'dev-php') diff --git a/dev-php/libphutil/files/20171201-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch b/dev-php/libphutil/files/20171201-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch deleted file mode 100644 index e749f665..00000000 --- a/dev-php/libphutil/files/20171201-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch +++ /dev/null @@ -1,45 +0,0 @@ -From c8fabe5cb68270eacd9662de05d634242caf1dca 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/20180720-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch b/dev-php/libphutil/files/20180720-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch new file mode 100644 index 00000000..4fc512e6 --- /dev/null +++ b/dev-php/libphutil/files/20180720-Remove-the-usage-of-local-SSL-certificates-and-use-s.patch @@ -0,0 +1,45 @@ +From 125f8b94b134a53165a89967ec7b6f2f180315f9 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 80c83a84..500ea009 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 8a44d8cc8ac5da5aef388e8b39c363c0b8333625 Mon Sep 17 00:00:00 2001 +From 7ef447f16ffebfe1be2d25be4bdb11f27de3848f 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 diff --git a/dev-php/libphutil/libphutil-20171201.ebuild b/dev-php/libphutil/libphutil-20171201.ebuild deleted file mode 100644 index ca9ddea3..00000000 --- a/dev-php/libphutil/libphutil-20171201.ebuild +++ /dev/null @@ -1,130 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit eutils toolchain-funcs git-r3 - -DESCRIPTION="Collection of utility classes and functions for PHP used by phabricator" -HOMEPAGE="https://www.phacility.com" -EGIT_REPO_URI="https://github.com/phacility/libphutil.git" -EGIT_BRANCH="stable" -EGIT_COMMIT="f3386051a959f218ce96ffbec5fe4010decb83f9" - -LICENSE="Apache-2.0" -SLOT="stable" -KEYWORDS="~amd64 ~x86" -IUSE="ssl test" - -DEPEND="!${CATEGORY}/${PN}:0 - virtual/awk:0 - test? ( - sys-devel/bison:0 - >=sys-devel/flex-2.5.35:0 - =www-client/arcanist-20171226:stable - dev-lang/php[cli] - )" -RDEPEND="dev-lang/php[curl,iconv,json,mysql,mysqli,pcntl,ssl?,unicode]" - -src_prepare() { - default - - git log --format='%H %ct' -n 1 > "${S}/GIT_COMMIT_INFO" - git remote add origin "${EGIT_REPO_URI}" - git remote -v > "${S}/GIT_REMOTE_INFO" - - eapply "${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 GIT_REMOTE_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 "../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-20180720.ebuild b/dev-php/libphutil/libphutil-20180720.ebuild new file mode 100644 index 00000000..d2cefa46 --- /dev/null +++ b/dev-php/libphutil/libphutil-20180720.ebuild @@ -0,0 +1,130 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +inherit eutils toolchain-funcs git-r3 + +DESCRIPTION="Collection of utility classes and functions for PHP used by phabricator" +HOMEPAGE="https://www.phacility.com" +EGIT_REPO_URI="https://github.com/phacility/libphutil.git" +EGIT_BRANCH="stable" +EGIT_COMMIT="340445cf69474ce4246c49bfaaa694851b9b0a48" + +LICENSE="Apache-2.0" +SLOT="stable" +KEYWORDS="~amd64 ~x86" +IUSE="ssl test" + +DEPEND="!${CATEGORY}/${PN}:0 + virtual/awk:0 + test? ( + sys-devel/bison:0 + >=sys-devel/flex-2.5.35:0 + =www-client/arcanist-20180720:stable + dev-lang/php[cli] + )" +RDEPEND="dev-lang/php[curl,iconv,json,mysql,mysqli,pcntl,ssl?,unicode]" + +src_prepare() { + default + + git log --format='%H %ct' -n 1 > "${S}/GIT_COMMIT_INFO" + git remote add origin "${EGIT_REPO_URI}" + git remote -v > "${S}/GIT_REMOTE_INFO" + + eapply "${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 GIT_REMOTE_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 "../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 +} -- cgit v1.2.3