aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--community/php7/APKBUILD10
-rw-r--r--community/php7/getrandom.patch128
-rw-r--r--community/php7/libressl.patch13
3 files changed, 18 insertions, 133 deletions
diff --git a/community/php7/APKBUILD b/community/php7/APKBUILD
index 9014e49ad6..fed7169629 100644
--- a/community/php7/APKBUILD
+++ b/community/php7/APKBUILD
@@ -2,8 +2,8 @@
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
pkgname=php7
_pkgreal=php
-pkgver=7.0.16
-pkgrel=2
+pkgver=7.0.17
+pkgrel=0
pkgdesc="The PHP language runtime engine - 7th branch"
url="http://www.php.net/"
arch="all"
@@ -34,7 +34,7 @@ source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
includedir.patch
fix-asm-constraints-in-aarch64-multiply-macro.patch
pid_log.patch
- getrandom.patch
+ libressl.patch
"
builddir="$srcdir/$_pkgreal-$pkgver"
@@ -339,7 +339,7 @@ _package_ext() {
> "$subpkgdir"/etc/$pkgname/conf.d/${elo}_${extname}.ini
}
-sha512sums="b6f44fd1ba0bd97c2af13e74b750761561adc8f859607383a4927aa6924d5a2ef46a547c0d154261c9131d07d41e8c0d2ea153b32546b7122ec1ad7aa1fc19cd php-7.0.16.tar.bz2
+sha512sums="a50e53915cb4af59d90cf5a754f74bc307bf0de7904297eb8364d85418399203b6f81ddff23e4c68d36bfe8c4ce8ae1d511ec3cad21872c5113acc0f494b43d7 php-7.0.17.tar.bz2
1c708de82d1086f272f484faf6cf6d087af7c31750cc2550b0b94ed723961b363f28a947b015b2dfc0765caea185a75f5d2c2f2b099c948b65c290924f606e4f php7-fpm.initd
cacce7bf789467ff40647b7319e3760c6c587218720538516e8d400baa75651f72165c4e28056cd0c1dc89efecb4d00d0d7823bed80b29136262c825ce816691 php7-fpm.logrotate
fbf9a1572d37370ec0d126502e1d066e045a992484d8fc4f1e2ede330134c1a15f4029f29fa4daebd48eed78b045dc051ced69fbf1f11efc7ad81d884a639a99 php7-module.conf
@@ -348,4 +348,4 @@ f1177cbf6b1f44402f421c3d317aab1a2a40d0b1209c11519c1158df337c8945f3a313d689c93976
199aecdbd3b4035aabf5379c215f82412d3c98b79a1ee186944e7fe1f0ed6f40789ea30e2355149491de6be34fc66c5e486e2a79a7e41ab2ae18706ef3ffe79b includedir.patch
d93d3fc015580cf5f75c6cbca4cd980e054b61e1068495da81a7e61f1af2c9ae14f09964c04928ad338142de78e4844aed885b1ad1865282072999fb045c8ad7 fix-asm-constraints-in-aarch64-multiply-macro.patch
82231c7b27b4d044272857dc713674884715ed8e36e54be06faa5d2a949ba4bca597628958a9c5683ec51c36e05a00f6be811c7e95112b0314c98528f584a8d6 pid_log.patch
-da012a82c00f9dfd3b6e446e2c3e7da597079e9b428f53ca61b5e216c304e3c02e953a5fc2759e516580cb98f08e86b0f5b33ea8df99a8003ae33fcb431463b4 getrandom.patch"
+d04d7cccae789ebf607f4fd107c26b580752353c8636c6c509123285063d274f3fb4aa28e0b31677515435e41a234e9990d45ceb70756ac7f7aa4cb9b11faecb libressl.patch"
diff --git a/community/php7/getrandom.patch b/community/php7/getrandom.patch
deleted file mode 100644
index 205a226b4e..0000000000
--- a/community/php7/getrandom.patch
+++ /dev/null
@@ -1,128 +0,0 @@
---- a/ext/standard/random.c
-+++ b/ext/standard/random.c
-@@ -93,14 +93,13 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw)
- }
- #elif HAVE_DECL_ARC4RANDOM_BUF && ((defined(__OpenBSD__) && OpenBSD >= 201405) || (defined(__NetBSD__) && __NetBSD_Version__ >= 700000001))
- arc4random_buf(bytes, size);
--#elif defined(__linux__) && defined(SYS_getrandom)
-- /* Linux getrandom(2) syscall */
-+#else
- size_t read_bytes = 0;
-- size_t amount_to_read = 0;
- ssize_t n;
--
-+#if defined(__linux__) && defined(SYS_getrandom)
-+ /* Linux getrandom(2) syscall */
- /* Keep reading until we get enough entropy */
-- do {
-+ while (read_bytes < size) {
- /* Below, (bytes + read_bytes) is pointer arithmetic.
-
- bytes read_bytes size
-@@ -110,11 +109,17 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw)
- amount_to_read
-
- */
-- amount_to_read = size - read_bytes;
-+ size_t amount_to_read = size - read_bytes;
- n = syscall(SYS_getrandom, bytes + read_bytes, amount_to_read, 0);
-
- if (n == -1) {
-- if (errno == EINTR || errno == EAGAIN) {
-+ if (errno == ENOSYS) {
-+ /* This can happen if PHP was compiled against a newer kernel where getrandom()
-+ * is available, but then runs on an older kernel without getrandom(). If this
-+ * happens we simply fall back to reading from /dev/urandom. */
-+ ZEND_ASSERT(read_bytes == 0);
-+ break;
-+ } else if (errno == EINTR || errno == EAGAIN) {
- /* Try again */
- continue;
- }
-@@ -130,53 +135,52 @@ PHPAPI int php_random_bytes(void *bytes, size_t size, zend_bool should_throw)
- }
-
- read_bytes += (size_t) n;
-- } while (read_bytes < size);
--#else
-- int fd = RANDOM_G(fd);
-- struct stat st;
-- size_t read_bytes = 0;
-- ssize_t n;
-+ }
-+#endif
-+ if (read_bytes < size) {
-+ int fd = RANDOM_G(fd);
-+ struct stat st;
-
-- if (fd < 0) {
-+ if (fd < 0) {
- #if HAVE_DEV_URANDOM
-- fd = open("/dev/urandom", O_RDONLY);
-+ fd = open("/dev/urandom", O_RDONLY);
- #endif
-- if (fd < 0) {
-- if (should_throw) {
-- zend_throw_exception(zend_ce_exception, "Cannot open source device", 0);
-+ if (fd < 0) {
-+ if (should_throw) {
-+ zend_throw_exception(zend_ce_exception, "Cannot open source device", 0);
-+ }
-+ return FAILURE;
- }
-- return FAILURE;
-- }
-- /* Does the file exist and is it a character device? */
-- if (fstat(fd, &st) != 0 ||
-+ /* Does the file exist and is it a character device? */
-+ if (fstat(fd, &st) != 0 ||
- # ifdef S_ISNAM
-- !(S_ISNAM(st.st_mode) || S_ISCHR(st.st_mode))
-+ !(S_ISNAM(st.st_mode) || S_ISCHR(st.st_mode))
- # else
-- !S_ISCHR(st.st_mode)
-+ !S_ISCHR(st.st_mode)
- # endif
-- ) {
-- close(fd);
-- if (should_throw) {
-- zend_throw_exception(zend_ce_exception, "Error reading from source device", 0);
-+ ) {
-+ close(fd);
-+ if (should_throw) {
-+ zend_throw_exception(zend_ce_exception, "Error reading from source device", 0);
-+ }
-+ return FAILURE;
- }
-- return FAILURE;
-+ RANDOM_G(fd) = fd;
- }
-- RANDOM_G(fd) = fd;
-- }
-
-- while (read_bytes < size) {
-- n = read(fd, bytes + read_bytes, size - read_bytes);
-- if (n <= 0) {
-- break;
-+ for (read_bytes = 0; read_bytes < size; read_bytes += (size_t) n) {
-+ n = read(fd, bytes + read_bytes, size - read_bytes);
-+ if (n <= 0) {
-+ break;
-+ }
- }
-- read_bytes += n;
-- }
-
-- if (read_bytes < size) {
-- if (should_throw) {
-- zend_throw_exception(zend_ce_exception, "Could not gather sufficient random data", 0);
-+ if (read_bytes < size) {
-+ if (should_throw) {
-+ zend_throw_exception(zend_ce_exception, "Could not gather sufficient random data", 0);
-+ }
-+ return FAILURE;
- }
-- return FAILURE;
- }
- #endif
-
diff --git a/community/php7/libressl.patch b/community/php7/libressl.patch
new file mode 100644
index 0000000000..79c15c7433
--- /dev/null
+++ b/community/php7/libressl.patch
@@ -0,0 +1,13 @@
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -2337,9 +2337,7 @@
+
+ dnl If pkg-config is found try using it
+ if test "$PHP_OPENSSL_DIR" = "yes" && test -x "$PKG_CONFIG" && $PKG_CONFIG --exists openssl; then
+- if $PKG_CONFIG --atleast-version=1.1 openssl; then
+- AC_MSG_ERROR([OpenSSL version >= 1.1 is not supported.])
+- elif $PKG_CONFIG --atleast-version=0.9.8 openssl; then
++ if $PKG_CONFIG --atleast-version=0.9.8 openssl; then
+ found_openssl=yes
+ OPENSSL_LIBS=`$PKG_CONFIG --libs openssl`
+ OPENSSL_INCS=`$PKG_CONFIG --cflags-only-I openssl`