php: move patches to a single directory

Having two directories with version numbers just leads to unnecessary
churn everytime there's a version update.

We can have all patches in one single directory and differentiate b/w
specific version by prefix php5-/php7-

Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Anuj Mittal
2018-04-03 17:50:12 +08:00
committed by Armin Kuster
parent 6d97746298
commit 08c5797ccb
6 changed files with 0 additions and 56 deletions

View File

@@ -0,0 +1,38 @@
From ed0a954983d50267c2fc0bc13aba929ea0cad971 Mon Sep 17 00:00:00 2001
From: Dengke Du <dengke.du@windriver.com>
Date: Tue, 2 May 2017 06:34:40 +0000
Subject: [PATCH] Add -lpthread to link
When building the php-5.6.26, the following errors occured:
ld: TSRM/.libs/TSRM.o: undefined reference to symbol
'pthread_sigmask@@GLIBC_2.2.5'
error adding symbols: DSO missing from command line
This is because no pthread to link, so we should add it.
Upstream-Status: Pending
Signed-off-by: Dengke Du <dengke.du@windriver.com>
---
configure.in | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.in b/configure.in
index a467dff1..9afef652 100644
--- a/configure.in
+++ b/configure.in
@@ -1058,7 +1058,8 @@ case $php_sapi_module in
;;
esac
-EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS"
+PTHREAD_LIBS="-lpthread"
+EXTRA_LIBS="$EXTRA_LIBS $DLIBS $LIBS $PTHREAD_LIBS"
dnl this has to be here to prevent the openssl crypt() from
dnl overriding the system provided crypt().
--
2.11.0

View File

@@ -0,0 +1,62 @@
From 5c84b039e97abd88f6a18da0e6d27383c00fea92 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 26 Jul 2017 23:06:56 -0700
Subject: [PATCH] Specify --tag with libtool
This helps in compiling with external toolchains
with -fPIE appended to CC e.g. via hardening flags
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
acinclude.m4 | 8 ++++----
configure.in | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index a114a98..1cc7a26 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -806,10 +806,10 @@ dnl
dnl PHP_BUILD_PROGRAM
dnl
AC_DEFUN([PHP_BUILD_PROGRAM],[
- php_c_pre='$(LIBTOOL) --mode=compile $(CC)'
+ php_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
php_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS)'
php_c_post=
- php_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
+ php_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
php_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS)'
php_cxx_post=
php_lo=lo
@@ -819,10 +819,10 @@ AC_DEFUN([PHP_BUILD_PROGRAM],[
no) pic_setting='-prefer-non-pic';;
esac
- shared_c_pre='$(LIBTOOL) --mode=compile $(CC)'
+ shared_c_pre='$(LIBTOOL) --tag=CC --mode=compile $(CC)'
shared_c_meta='$(COMMON_FLAGS) $(CFLAGS_CLEAN) $(EXTRA_CFLAGS) '$pic_setting
shared_c_post=
- shared_cxx_pre='$(LIBTOOL) --mode=compile $(CXX)'
+ shared_cxx_pre='$(LIBTOOL) --tag=CXX --mode=compile $(CXX)'
shared_cxx_meta='$(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) '$pic_setting
shared_cxx_post=
shared_lo=lo
diff --git a/configure.in b/configure.in
index 7d65b63..7221af9 100644
--- a/configure.in
+++ b/configure.in
@@ -1431,8 +1431,8 @@ PHP_SET_LIBTOOL_VARIABLE([--silent])
dnl libtool 1.4.3 needs this.
PHP_SET_LIBTOOL_VARIABLE([--preserve-dup-deps])
-test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --mode=compile $(COMPILE) -c $<'
-test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --mode=compile $(CXX_COMPILE) -c $<'
+test -z "$PHP_COMPILE" && PHP_COMPILE='$(LIBTOOL) --tag=CC --mode=compile $(COMPILE) -c $<'
+test -z "$CXX_PHP_COMPILE" && CXX_PHP_COMPILE='$(LIBTOOL) --tag=CXX --mode=compile $(CXX_COMPILE) -c $<'
SHARED_LIBTOOL='$(LIBTOOL)'
CC=$old_CC
--
2.13.3

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,56 @@
From b04cd19b76374ebce8f3326275bdfd7e9b9aeab5 Mon Sep 17 00:00:00 2001
From: Li Zhou <li.zhou@windriver.com>
Date: Sun, 11 Feb 2018 15:03:21 +0800
Subject: [PATCH] Fixed bug #75571: Potential infinite loop in
gdImageCreateFromGifCtx
Due to a signedness confusion in `GetCode_` a corrupt GIF file can
trigger an infinite loop. Furthermore we make sure that a GIF without
any palette entries is treated as invalid *after* open palette entries
have been removed.
Upstream-Status: Backport
CVE: CVE-2018-5711
Signed-off-by: Li Zhou <li.zhou@windriver.com>
---
ext/gd/libgd/gd_gif_in.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/ext/gd/libgd/gd_gif_in.c b/ext/gd/libgd/gd_gif_in.c
index 76ba152..7156e4b 100644
--- a/ext/gd/libgd/gd_gif_in.c
+++ b/ext/gd/libgd/gd_gif_in.c
@@ -261,10 +261,6 @@ terminated:
if (!im) {
return 0;
}
- if (!im->colorsTotal) {
- gdImageDestroy(im);
- return 0;
- }
/* Check for open colors at the end, so
we can reduce colorsTotal and ultimately
BitsPerPixel */
@@ -275,6 +271,10 @@ terminated:
break;
}
}
+ if (!im->colorsTotal) {
+ gdImageDestroy(im);
+ return 0;
+ }
return im;
}
/* }}} */
@@ -375,7 +375,7 @@ static int
GetCode_(gdIOCtx *fd, CODE_STATIC_DATA *scd, int code_size, int flag, int *ZeroDataBlockP)
{
int i, j, ret;
- unsigned char count;
+ int count;
if (flag) {
scd->curbit = 0;
--
1.9.1

View File

@@ -0,0 +1,56 @@
[PATCH] config.m4: change AC_TRY_RUN to AC_TRY_LINK
Upstream-Status: Pending
AC_TRY_RUN is not suitable for cross-compile
Signed-off-by: Roy Li <rongqing.li@windriver.com>
---
ext/fileinfo/config.m4 | 31 ++++++-------------------------
1 file changed, 6 insertions(+), 25 deletions(-)
diff --git a/ext/fileinfo/config.m4 b/ext/fileinfo/config.m4
index 7e98d62..8a8ea0e 100644
--- a/ext/fileinfo/config.m4
+++ b/ext/fileinfo/config.m4
@@ -14,31 +14,12 @@ if test "$PHP_FILEINFO" != "no"; then
libmagic/readcdf.c libmagic/softmagic.c"
AC_MSG_CHECKING([for strcasestr])
- AC_TRY_RUN([
-#include <string.h>
-#include <strings.h>
-#include <stdlib.h>
-
-int main(void)
-{
- char *s0, *s1, *ret;
-
- s0 = (char *) malloc(42);
- s1 = (char *) malloc(8);
-
- memset(s0, 'X', 42);
- s0[24] = 'Y';
- s0[26] = 'Z';
- s0[41] = '\0';
- memset(s1, 'x', 8);
- s1[0] = 'y';
- s1[2] = 'Z';
- s1[7] = '\0';
-
- ret = strcasestr(s0, s1);
-
- return !(NULL != ret);
-}
+ AC_TRY_COMPILE([
+ #include <string.h>
+ #include <strings.h>
+ #include <stdlib.h>
+ ],[
+ strcasestr(NULL, NULL);
],[
dnl using the platform implementation
AC_MSG_RESULT(yes)
--
1.9.1