aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php7
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-03-25 08:48:32 +0200
committerTimo Teräs <timo.teras@iki.fi>2016-03-25 07:41:43 +0000
commit964fda4bc0702462cde06433ab1e0de517f1531a (patch)
tree33b86ac084907cf66c6332efe081863f66cfa9f2 /testing/php7
parentf51ee423d507cc818747d052470befbf493200e4 (diff)
downloadaports-964fda4bc0702462cde06433ab1e0de517f1531a.tar.bz2
aports-964fda4bc0702462cde06433ab1e0de517f1531a.tar.xz
testing/php7: fix crypt and add paxmark
Diffstat (limited to 'testing/php7')
-rw-r--r--testing/php7/APKBUILD16
-rw-r--r--testing/php7/fix-crypt.patch77
2 files changed, 88 insertions, 5 deletions
diff --git a/testing/php7/APKBUILD b/testing/php7/APKBUILD
index 8a56b5d8d3..7647cb1907 100644
--- a/testing/php7/APKBUILD
+++ b/testing/php7/APKBUILD
@@ -3,7 +3,7 @@
pkgname=php7
_pkgreal=php
pkgver=7.0.4
-pkgrel=0
+pkgrel=1
pkgdesc="The PHP language runtime engine - 7th branch"
url="http://www.php.net/"
arch="x86_64 armhf"
@@ -16,7 +16,7 @@ makedepends="autoconf bison re2c apache2-dev libxml2-dev libxslt-dev libzip-dev
libical-dev openssl-dev openldap-dev net-snmp-dev db-dev krb5-dev gdbm-dev sqlite-dev
freetds-dev mariadb-dev postgresql-dev unixodbc-dev freetype-dev tidyhtml-dev libxpm-dev
libpng-dev libwebp-dev libjpeg-turbo-dev libmcrypt-dev libmbfl-dev gsoap-dev recode-dev
- readline-dev mhash-dev
+ readline-dev mhash-dev paxmark
"
subpackages="$pkgname-dev $pkgname-doc
@@ -86,6 +86,7 @@ source="http://php.net/distributions/$_pkgreal-$pkgver.tar.bz2
tidy-buffio.patch
includedir.patch
pid_log.patch
+ fix-crypt.patch
"
_apiver="20151012"
@@ -219,6 +220,8 @@ package() {
-e "s~PHP=php~PHP=php7~" \
"$pkgdir"/usr/bin/$file
done
+ paxmark -m "$pkgdir"/usr/bin/php7
+
find "$pkgdir" -name '.*' | xargs rm -rf || return 1
rmdir "$pkgdir"/var/run
}
@@ -404,7 +407,8 @@ a340f27e83ed4482d2fbb98658ef71cb php7-fpm.initd
483bc0a85c50a9a9aedbe14a19ed4526 install-pear.patch
66f0037a029f9eed2b31d2e1d50f1860 tidy-buffio.patch
d872e633c9b33c3c9f629dd2edd2e5c5 includedir.patch
-6ba762ab7a105163b8e5b3913deae109 pid_log.patch"
+6ba762ab7a105163b8e5b3913deae109 pid_log.patch
+fb689bad4206238a4b2afb5b8c49f079 fix-crypt.patch"
sha256sums="a246c503709c189ba8e1e22ed2cb22abc27da43a997ff1b3318e181baf529dcc php-7.0.4.tar.bz2
eca59e8b0498c1c93b35f9a5109ae56d0cda9d94822727d689371ccad31b3615 php7-fpm.initd
6e4406f21b69085714cdb9d9a67c08e27a1c737ab353f9813cb2fc268352d2c6 php7-fpm.logrotate
@@ -412,7 +416,8 @@ eca59e8b0498c1c93b35f9a5109ae56d0cda9d94822727d689371ccad31b3615 php7-fpm.initd
f739ca427a1dd53a388bad0823565299c5d4a5796b1171b892884e4d7d099bab install-pear.patch
5dc8f32e5e2b1cd6317ada5a5adb9b5f0802ed6e0dbe065d7bfcc0f55d47e0d5 tidy-buffio.patch
ea74966a23b1b54548ee35e9ccc2fc8d2b7c2285c385c44d6b23d9e2f25ea1a7 includedir.patch
-0cca8729c64682387a8c44ed74f0966da697f2817152d8d05bb25bedc7eaafec pid_log.patch"
+0cca8729c64682387a8c44ed74f0966da697f2817152d8d05bb25bedc7eaafec pid_log.patch
+38b37048042cad962b15767d2923437733a1fe3ef5d457b16e080ddfc206891c fix-crypt.patch"
sha512sums="9d1dc761cdd9103a91299e01117c1790550e3b94e7694dcc2555d83e5abe3d2170acd6226e8501c5f2a77b5c374b1c9f5ea009999d476818c2682a54def86b96 php-7.0.4.tar.bz2
89076ab8e170a8f886b88bb30aa3e6a6b4463155a18ea53485cc9e3898c81afa3d01fb8403d28a45dc1680f09c645c2d81d8272bc8b9c7ced41e59b0ba226216 php7-fpm.initd
cacce7bf789467ff40647b7319e3760c6c587218720538516e8d400baa75651f72165c4e28056cd0c1dc89efecb4d00d0d7823bed80b29136262c825ce816691 php7-fpm.logrotate
@@ -420,4 +425,5 @@ fbf9a1572d37370ec0d126502e1d066e045a992484d8fc4f1e2ede330134c1a15f4029f29fa4daeb
f1177cbf6b1f44402f421c3d317aab1a2a40d0b1209c11519c1158df337c8945f3a313d689c939768584f3e4edbe52e8bd6103fb6777462326a9d94e8ab1f505 install-pear.patch
6894c9cba7752a3406e774d9efc0e058c37433493c1c20101e9563bf247c112157a67e306b06b9517b0422eca521f543d637a6cbd2cea7639e43f13d773b3d2b tidy-buffio.patch
199aecdbd3b4035aabf5379c215f82412d3c98b79a1ee186944e7fe1f0ed6f40789ea30e2355149491de6be34fc66c5e486e2a79a7e41ab2ae18706ef3ffe79b includedir.patch
-82231c7b27b4d044272857dc713674884715ed8e36e54be06faa5d2a949ba4bca597628958a9c5683ec51c36e05a00f6be811c7e95112b0314c98528f584a8d6 pid_log.patch"
+82231c7b27b4d044272857dc713674884715ed8e36e54be06faa5d2a949ba4bca597628958a9c5683ec51c36e05a00f6be811c7e95112b0314c98528f584a8d6 pid_log.patch
+b43336e394f601e0350b78cc0de12fe16a494c70b2982f6f3d49154a189962cdc2da86a1ee1ea23a0bb3ce3655e27840ad3d01beff548adfd20fd89e87fc6349 fix-crypt.patch"
diff --git a/testing/php7/fix-crypt.patch b/testing/php7/fix-crypt.patch
new file mode 100644
index 0000000000..f21ee4d5fe
--- /dev/null
+++ b/testing/php7/fix-crypt.patch
@@ -0,0 +1,77 @@
+--- php-7.0.4.orig/ext/standard/config.m4
++++ php-7.0.4/ext/standard/config.m4
+@@ -314,7 +314,7 @@
+ fi
+ AC_DEFINE_UNQUOTED(PHP_MD5_CRYPT, $ac_result, [Whether the system supports MD5 salt])
+
+- if test "$ac_cv_crypt_sha512" = "yes"; then
++ if test "$ac_cv_crypt_SHA512" = "yes"; then
+ ac_result=1
+ ac_crypt_sha512=1
+ else
+@@ -323,7 +323,7 @@
+ fi
+ AC_DEFINE_UNQUOTED(PHP_SHA512_CRYPT, $ac_result, [Whether the system supports SHA512 salt])
+
+- if test "$ac_cv_crypt_sha256" = "yes"; then
++ if test "$ac_cv_crypt_SHA256" = "yes"; then
+ ac_result=1
+ ac_crypt_sha256=1
+ else
+--- php-7.0.4.orig/ext/standard/crypt.c
++++ php-7.0.4/ext/standard/crypt.c
+@@ -58,6 +58,7 @@
+ #include "php_lcg.h"
+ #include "php_crypt.h"
+ #include "php_rand.h"
++#include "php_config.h"
+
+ /* The capabilities of the crypt() function is determined by the test programs
+ * run by configure from aclocal.m4. They will set PHP_STD_DES_CRYPT,
+@@ -245,24 +246,27 @@
+ }
+ }
+ #else
++ if (salt[0] != '$' && salt[0] != '_' && (!IS_VALID_SALT_CHARACTER(salt[0]) || !IS_VALID_SALT_CHARACTER(salt[1]))) {
++ if (!quiet) {
++ /* error consistently about invalid DES fallbacks */
++ php_error_docref(NULL, E_DEPRECATED, DES_INVALID_SALT_ERROR);
++ }
++ }
+
+-# if defined(HAVE_CRYPT_R) && (defined(_REENTRANT) || defined(_THREAD_SAFE))
+ {
+-# if defined(CRYPT_R_STRUCT_CRYPT_DATA)
++# if defined(HAVE_CRYPT_R)
++# if defined(CRYPT_R_STRUCT_CRYPT_DATA)
+ struct crypt_data buffer;
+ memset(&buffer, 0, sizeof(buffer));
+-# elif defined(CRYPT_R_CRYPTD)
++# elif defined(CRYPT_R_CRYPTD)
+ CRYPTD buffer;
++# else
++# error Data struct used by crypt_r() is unknown. Please report.
++# endif
++ crypt_res = crypt_r(password, salt, &buffer);
+ # else
+-# error Data struct used by crypt_r() is unknown. Please report.
++ crypt_res = crypt(password, salt, &buffer);
+ # endif
+- if (salt[0] != '$' && salt[0] != '_' && (!IS_VALID_SALT_CHARACTER(salt[0]) || !IS_VALID_SALT_CHARACTER(salt[1]))) {
+- if (!quiet) {
+- /* error consistently about invalid DES fallbacks */
+- php_error_docref(NULL, E_DEPRECATED, DES_INVALID_SALT_ERROR);
+- }
+- }
+- crypt_res = crypt_r(password, salt, &buffer);
+ if (!crypt_res || (salt[0] == '*' && salt[1] == '0')) {
+ return NULL;
+ } else {
+@@ -270,7 +274,6 @@
+ return result;
+ }
+ }
+-# endif
+ #endif
+ }
+ /* }}} */