From f04165e4e0ddf7f9e62321f808d27aafd7631007 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Fri, 15 May 2015 22:57:35 +0200 Subject: [PATCH 01/10] php5: pecl: move phpize into prepare stage This allows pecl modules to rely on PKG_FIXUP:=autoreconf. Signed-off-by: Michael Heimpold --- lang/php5/pecl.mk | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lang/php5/pecl.mk b/lang/php5/pecl.mk index e1b981963..ee2a5ce77 100644 --- a/lang/php5/pecl.mk +++ b/lang/php5/pecl.mk @@ -1,5 +1,5 @@ # -# Copyright (C) 2011-2014 OpenWrt.org +# Copyright (C) 2011-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -10,13 +10,12 @@ define Package/php5-pecl/Default SECTION:=lang CATEGORY:=Languages URL:=http://pecl.php.net/ - MAINTAINER:=Michael Heimpold DEPENDS:=php5 endef -define Build/Configure +define Build/Prepare + $(Build/Prepare/Default) ( cd $(PKG_BUILD_DIR); $(STAGING_DIR_HOST)/usr/bin/phpize ) - $(Build/Configure/Default) endef CONFIGURE_ARGS+= \ From f0a0448857e04884a7ad2ae5534ac2b2cb3948fc Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Sun, 17 May 2015 17:05:50 +0200 Subject: [PATCH 02/10] php5: add php5-mod-opcache (fixes #1010) This patch adds build infrastructure for PHP's OPcache extension. Compared with the other extension, this is a Zend module and it need a little workaround during cross-compiling. Signed-off-by: Michael Heimpold --- lang/php5/Makefile | 15 +- lang/php5/files/php.ini | 10 ++ ...xt-opcache-fix-detection-of-shm-mmap.patch | 159 ++++++++++++++++++ 3 files changed, 182 insertions(+), 2 deletions(-) create mode 100644 lang/php5/patches/200-ext-opcache-fix-detection-of-shm-mmap.patch diff --git a/lang/php5/Makefile b/lang/php5/Makefile index dac3c738e..2b6f4cad8 100644 --- a/lang/php5/Makefile +++ b/lang/php5/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php PKG_VERSION:=5.6.8 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_MAINTAINER:=W. Michael Petullo @@ -36,7 +36,7 @@ PHP5_MODULES = \ json \ ldap \ mbstring mcrypt mysql mysqli \ - openssl \ + opcache openssl \ pcntl pdo pdo-mysql pdo-pgsql pdo-sqlite pgsql \ session shmop simplexml soap sockets sqlite3 sysvmsg sysvsem sysvshm \ tokenizer \ @@ -276,6 +276,12 @@ else CONFIGURE_ARGS+= --without-mysqli endif +ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-opcache),) + CONFIGURE_ARGS+= --enable-opcache=shared +else + CONFIGURE_ARGS+= --disable-opcache +endif + ifneq ($(SDK)$(CONFIG_PACKAGE_php5-mod-openssl),) CONFIGURE_ARGS+= \ --with-openssl=shared,"$(STAGING_DIR)/usr" \ @@ -508,7 +514,11 @@ define BuildModule $(INSTALL_DIR) $$(1)/usr/lib/php $(INSTALL_BIN) $(PKG_BUILD_DIR)/modules/$(subst -,_,$(1)).so $$(1)/usr/lib/php/ $(INSTALL_DIR) $$(1)/etc/php5 + ifeq ($(4),zend) + echo "zend_extension=/usr/lib/php/$(subst -,_,$(1)).so" > $$(1)/etc/php5/$(subst -,_,$(1)).ini + else echo "extension=$(subst -,_,$(1)).so" > $$(1)/etc/php5/$(subst -,_,$(1)).ini + endif endef $$(eval $$(call BuildPackage,php5-mod-$(1))) @@ -540,6 +550,7 @@ $(eval $(call BuildModule,mbstring,MBString)) $(eval $(call BuildModule,mcrypt,Mcrypt,+PACKAGE_php5-mod-mcrypt:libmcrypt +PACKAGE_php5-mod-mcrypt:libltdl)) $(eval $(call BuildModule,mysql,MySQL,+PACKAGE_php5-mod-mysql:libmysqlclient)) $(eval $(call BuildModule,mysqli,MySQL Improved Extension,+PACKAGE_php5-mod-mysqli:libmysqlclient)) +$(eval $(call BuildModule,opcache,OPcache,,zend)) $(eval $(call BuildModule,openssl,OpenSSL,+PACKAGE_php5-mod-openssl:libopenssl)) $(eval $(call BuildModule,pcntl,PCNTL)) $(eval $(call BuildModule,pdo,PHP Data Objects)) diff --git a/lang/php5/files/php.ini b/lang/php5/files/php.ini index 6fe2a3108..23a8bb988 100644 --- a/lang/php5/files/php.ini +++ b/lang/php5/files/php.ini @@ -309,3 +309,13 @@ ldap.max_links = -1 [mcrypt] ;mcrypt.algorithms_dir= ;mcrypt.modes_dir= + +[opcache] +;opcache.memory_consumption=8 ; 8M is the allowed minimum +;opcache.interned_strings_buffer=1 +opcache.max_accelerated_files=200 ; 200 is the allowed minimum +;opcache.revalidate_freq=60 +;opcache.fast_shutdown=1 +opcache.enable_cli=1 +opcache.enable=1 +;opcache.log_verbosity_level=4 diff --git a/lang/php5/patches/200-ext-opcache-fix-detection-of-shm-mmap.patch b/lang/php5/patches/200-ext-opcache-fix-detection-of-shm-mmap.patch new file mode 100644 index 000000000..d2a1e91af --- /dev/null +++ b/lang/php5/patches/200-ext-opcache-fix-detection-of-shm-mmap.patch @@ -0,0 +1,159 @@ +From dc8bb6a53bfdfe42d9ae81d4e78c6155ad4bfd6e Mon Sep 17 00:00:00 2001 +From: Michael Heimpold +Date: Sun, 17 May 2015 16:50:50 +0200 +Subject: [PATCH] ext/opcache: fix detection of shm/mmap + +The detection of sysvipc and mmap doesn't work well when cross-compiling, +so I decided to only check for the availability of the functions involved. +This is not a clean solution, but works for now(tm) :-) + +It should be discussed with upstream to find a better solution. + +This solves the issue reported at +https://github.com/openwrt/packages/issues/1010 +and makes opcache usable on OpenWrt. + +Signed-off-by: Michael Heimpold +--- + ext/opcache/config.m4 | 122 ++----------------------------------------------- + 1 file changed, 4 insertions(+), 118 deletions(-) + +diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 +index b7e4835..7b6c0aa 100644 +--- a/ext/opcache/config.m4 ++++ b/ext/opcache/config.m4 +@@ -11,127 +11,13 @@ if test "$PHP_OPCACHE" != "no"; then + AC_DEFINE(HAVE_MPROTECT, 1, [Define if you have mprotect() function]) + ]) + +- AC_MSG_CHECKING(for sysvipc shared memory support) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +-#include +- +-int main() { +- pid_t pid; +- int status; +- int ipc_id; +- char *shm; +- struct shmid_ds shmbuf; +- +- ipc_id = shmget(IPC_PRIVATE, 4096, (IPC_CREAT | SHM_R | SHM_W)); +- if (ipc_id == -1) { +- return 1; +- } +- +- shm = shmat(ipc_id, NULL, 0); +- if (shm == (void *)-1) { +- shmctl(ipc_id, IPC_RMID, NULL); +- return 2; +- } +- +- if (shmctl(ipc_id, IPC_STAT, &shmbuf) != 0) { +- shmdt(shm); +- shmctl(ipc_id, IPC_RMID, NULL); +- return 3; +- } +- +- shmbuf.shm_perm.uid = getuid(); +- shmbuf.shm_perm.gid = getgid(); +- shmbuf.shm_perm.mode = 0600; +- +- if (shmctl(ipc_id, IPC_SET, &shmbuf) != 0) { +- shmdt(shm); +- shmctl(ipc_id, IPC_RMID, NULL); +- return 4; +- } +- +- shmctl(ipc_id, IPC_RMID, NULL); +- +- strcpy(shm, "hello"); +- +- pid = fork(); +- if (pid < 0) { +- return 5; +- } else if (pid == 0) { +- strcpy(shm, "bye"); +- return 6; +- } +- if (wait(&status) != pid) { +- return 7; +- } +- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { +- return 8; +- } +- if (strcmp(shm, "bye") != 0) { +- return 9; +- } +- return 0; +-} +-],dnl ++ AC_CHECK_FUNC(shmget,[ + AC_DEFINE(HAVE_SHM_IPC, 1, [Define if you have SysV IPC SHM support]) +- msg=yes,msg=no,msg=no) +- AC_MSG_RESULT([$msg]) +- +- AC_MSG_CHECKING(for mmap() using MAP_ANON shared memory support) +- AC_TRY_RUN([ +-#include +-#include +-#include +-#include +-#include +- +-#ifndef MAP_ANON +-# ifdef MAP_ANONYMOUS +-# define MAP_ANON MAP_ANONYMOUS +-# endif +-#endif +-#ifndef MAP_FAILED +-# define MAP_FAILED ((void*)-1) +-#endif +- +-int main() { +- pid_t pid; +- int status; +- char *shm; +- +- shm = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0); +- if (shm == MAP_FAILED) { +- return 1; +- } +- +- strcpy(shm, "hello"); ++ ]) + +- pid = fork(); +- if (pid < 0) { +- return 5; +- } else if (pid == 0) { +- strcpy(shm, "bye"); +- return 6; +- } +- if (wait(&status) != pid) { +- return 7; +- } +- if (!WIFEXITED(status) || WEXITSTATUS(status) != 6) { +- return 8; +- } +- if (strcmp(shm, "bye") != 0) { +- return 9; +- } +- return 0; +-} +-],dnl ++ AC_CHECK_FUNC(mmap,[ + AC_DEFINE(HAVE_SHM_MMAP_ANON, 1, [Define if you have mmap(MAP_ANON) SHM support]) +- msg=yes,msg=no,msg=no) +- AC_MSG_RESULT([$msg]) ++ ]) + + AC_MSG_CHECKING(for mmap() using /dev/zero shared memory support) + AC_TRY_RUN([ +-- +1.7.10.4 + From 559df398ffc86fe386db79a937c61235c4b45ce0 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Wed, 20 May 2015 20:46:29 +0200 Subject: [PATCH 03/10] php5: update to 5.6.9 This fixes CVE-2006-7243, a multipart/form-data remote dos vulnerability, a heap buffer overflow in unpack and a integer overflow in ftp_genlist, which also results in a heap overflow. For more details, see http://php.net/ChangeLog-5.php#5.6.9 Also sync the timezone patch with latest version from Debian and adopt this patch for the changes in this php release. Refresh 950-Fix-dl-cross-compiling-issue.patch. Signed-off-by: Michael Heimpold --- lang/php5/Makefile | 6 +- ...bian_patches_use_embedded_timezonedb.patch | 142 ++++++++++-------- .../950-Fix-dl-cross-compiling-issue.patch | 23 ++- 3 files changed, 95 insertions(+), 76 deletions(-) diff --git a/lang/php5/Makefile b/lang/php5/Makefile index 2b6f4cad8..e5a1aa24d 100644 --- a/lang/php5/Makefile +++ b/lang/php5/Makefile @@ -8,8 +8,8 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=5.6.8 -PKG_RELEASE:=2 +PKG_VERSION:=5.6.9 +PKG_RELEASE:=1 PKG_MAINTAINER:=W. Michael Petullo @@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.php.net/distributions/ -PKG_MD5SUM:=a5a6df33aade0cb5425e4374e3832f0b +PKG_MD5SUM:=561f37377833772ace776143c5687884 PKG_FIXUP:=libtool autoreconf PKG_BUILD_PARALLEL:=1 diff --git a/lang/php5/patches/102-debian_patches_use_embedded_timezonedb.patch b/lang/php5/patches/102-debian_patches_use_embedded_timezonedb.patch index 438274aa1..4b5ff5b62 100644 --- a/lang/php5/patches/102-debian_patches_use_embedded_timezonedb.patch +++ b/lang/php5/patches/102-debian_patches_use_embedded_timezonedb.patch @@ -1,12 +1,13 @@ - Add support for use of the system timezone database, rather than embedding a copy. Discussed upstream but was not desired. History: -r9: fix another compile error without --with-system-tzdata configured +r11: adopted to php 5.6.9 +r10: make timezone case insensitive +r9: fix another compile error without --with-system-tzdata configured (Michael Heimpold) r8: fix compile error without --with-system-tzdata configured r7: improve check for valid timezone id to exclude directories -r6: fix fd leak in r5, fix country code/BC flag use in +r6: fix fd leak in r5, fix country code/BC flag use in. timezone_identifiers_list() using system db, fix use of PECL timezonedb to override system db, r5: reverts addition of "System/Localtime" fake tzname. @@ -17,10 +18,17 @@ r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert) r2: add filesystem trawl to set up name alias index r1: initial revision ---- a/ext/date/lib/parse_tz.c -+++ b/ext/date/lib/parse_tz.c -@@ -20,6 +20,16 @@ +diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_tz.c +--- php-5.6.9.orig/ext/date/lib/parse_tz.c 2015-05-14 01:13:33.000000000 +0200 ++++ php-5.6.9/ext/date/lib/parse_tz.c 2015-05-18 22:40:55.000000000 +0200 +@@ -18,8 +18,22 @@ + /* $Id$ */ + ++#ifndef PATH_MAX ++#define PATH_MAX 4096 ++#endif ++ #include "timelib.h" +#ifdef HAVE_SYSTEM_TZDATA @@ -36,7 +44,7 @@ r1: initial revision #include #ifdef HAVE_LOCALE_H -@@ -31,7 +41,12 @@ +@@ -31,7 +45,12 @@ #else #include #endif @@ -49,25 +57,19 @@ r1: initial revision #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) # if defined(__LITTLE_ENDIAN__) -@@ -51,9 +66,14 @@ - - static void read_preamble(const unsigned char **tzf, timelib_tzinfo *tz) +@@ -53,6 +72,11 @@ { -- /* skip ID */ -- *tzf += 4; -- -+ if (memcmp(tzf, "TZif", 4) == 0) { -+ *tzf += 20; -+ return; -+ } -+ -+ /* skip ID */ -+ *tzf += 4; -+ - /* read BC flag */ - tz->bc = (**tzf == '\1'); - *tzf += 1; -@@ -256,7 +276,397 @@ void timelib_dump_tzinfo(timelib_tzinfo + uint32_t version; + ++ if (memcmp(tzf, "TZif", 4) == 0) { ++ *tzf += 20; ++ return -1; ++ } ++ + /* read ID */ + version = (*tzf)[3] - '0'; + *tzf += 4; +@@ -296,7 +320,406 @@ } } @@ -81,7 +83,7 @@ r1: initial revision +#endif + +/* System timezone database pointer. */ -+static const timelib_tzdb *timezonedb_system = NULL; ++static const timelib_tzdb *timezonedb_system; + +/* Hash table entry for the cache of the zone.tab mapping table. */ +struct location_info { @@ -99,13 +101,14 @@ r1: initial revision + * prevent too many collisions. */ +#define LOCINFO_HASH_SIZE (1021) + ++/* Compute a case insensitive hash of str */ +static uint32_t tz_hash(const char *str) +{ + const unsigned char *p = (const unsigned char *)str; + uint32_t hash = 5381; + int c; + -+ while ((c = *p++) != '\0') { ++ while ((c = tolower(*p++)) != '\0') { + hash = (hash << 5) ^ hash ^ c; + } + @@ -201,10 +204,10 @@ r1: initial revision + + if (*p == '#' || *p == '\0' || *p == '\n') + continue; -+ ++ + if (!isalpha(p[0]) || !isalpha(p[1]) || p[2] != '\t') + continue; -+ ++ + /* code => AA */ + code = p; + p[2] = 0; @@ -238,7 +241,7 @@ r1: initial revision + + if (*p == '\n' || *p == '\t') + *p = '\0'; -+ ++ + hash = tz_hash(name); + i = malloc(sizeof *i); + memcpy(i->code, code, 2); @@ -274,7 +277,7 @@ r1: initial revision + } + + return NULL; -+} ++} + +/* Filter out some non-tzdata files and the posix/right databases, if + * present. */ @@ -443,6 +446,14 @@ r1: initial revision + return NULL; + } + ++ if (system_location_table) { ++ const struct location_info *li; ++ if ((li = find_zone_info(system_location_table, timezone)) != NULL) { ++ /* Use the stored name to avoid case issue */ ++ timezone = li->name; ++ } ++ } ++ + snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone); + + fd = open(fname, O_RDONLY); @@ -466,11 +477,11 @@ r1: initial revision { int left = 0, right = tzdb->index_size - 1; #ifdef HAVE_SETLOCALE -@@ -295,36 +705,128 @@ static int seek_to_tz_position(const uns +@@ -335,21 +758,90 @@ return 0; } -+static int seek_to_tz_position(const unsigned char **tzf, char *timezone, ++static int seek_to_tz_position(const unsigned char **tzf, char *timezone, + char **map, size_t *maplen, + const timelib_tzdb *tzdb) +{ @@ -483,14 +494,14 @@ r1: initial revision + return 0; + } + -+ (*tzf) = (unsigned char *)orig ; ++ (*tzf) = (unsigned char *)orig; + *map = orig; -+ -+ return 1; ++ ++ return 1; + } -+ else ++ else +#endif -+ { ++ { + return inmem_seek_to_tz_position(tzf, timezone, tzdb); + } +} @@ -505,7 +516,7 @@ r1: initial revision + tmp->data = NULL; + create_zone_index(tmp); + system_location_table = create_location_table(); -+ fake_data_segment(tmp, system_location_table); ++ fake_data_segment(tmp, system_location_table); + timezonedb_system = tmp; + } + @@ -533,38 +544,49 @@ r1: initial revision - return (seek_to_tz_position(&tzf, timezone, tzdb)); + +#ifdef HAVE_SYSTEM_TZDATA -+ if (tzdb == timezonedb_system) { -+ char fname[PATH_MAX]; -+ struct stat st; ++ if (tzdb == timezonedb_system) { ++ char fname[PATH_MAX]; ++ struct stat st; + -+ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { -+ return 0; -+ } -+ -+ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone); -+ -+ return stat(fname, &st) == 0 && is_valid_tzfile(&st); -+ } ++ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { ++ return 0; ++ } ++ ++ if (system_location_table) { ++ if (find_zone_info(system_location_table, timezone) != NULL) { ++ /* found in cache */ ++ return 1; ++ } ++ } ++ ++ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", timezone); ++ ++ return stat(fname, &st) == 0 && is_valid_tzfile(&st); ++ } +#endif + + return (inmem_seek_to_tz_position(&tzf, timezone, tzdb)); } + static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) +@@ -374,10 +866,12 @@ timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb) { const unsigned char *tzf; + char *memmap = NULL; + size_t maplen; timelib_tzinfo *tmp; + int version; - if (seek_to_tz_position(&tzf, timezone, tzdb)) { + if (seek_to_tz_position(&tzf, timezone, &memmap, &maplen, tzdb)) { tmp = timelib_tzinfo_ctor(timezone); - read_preamble(&tzf, tmp); - read_header(&tzf, tmp); - read_transistions(&tzf, tmp); - read_types(&tzf, tmp); + version = read_preamble(&tzf, tmp); +@@ -391,7 +885,34 @@ + skip_64bit_types(&tzf, tmp); + skip_posix_string(&tzf, tmp); + } - read_location(&tzf, tmp); + +#ifdef HAVE_SYSTEM_TZDATA @@ -576,12 +598,11 @@ r1: initial revision + + if ((li = find_zone_info(system_location_table, timezone)) != NULL) { + tmp->location.comments = strdup(li->comment); -+ strncpy(tmp->location.country_code, li->code, 2); ++ strncpy(tmp->location.country_code, li->code, 2); + tmp->location.longitude = li->longitude; + tmp->location.latitude = li->latitude; + tmp->bc = 1; -+ } -+ else { ++ } else { + strcpy(tmp->location.country_code, "??"); + tmp->bc = 0; + tmp->location.comments = strdup(""); @@ -598,9 +619,10 @@ r1: initial revision } else { tmp = NULL; } ---- a/ext/date/lib/timelib.m4 -+++ b/ext/date/lib/timelib.m4 -@@ -78,3 +78,17 @@ stdlib.h +diff -Naur php-5.6.9.orig/ext/date/lib/timelib.m4 php-5.6.9/ext/date/lib/timelib.m4 +--- php-5.6.9.orig/ext/date/lib/timelib.m4 2015-05-14 01:13:33.000000000 +0200 ++++ php-5.6.9/ext/date/lib/timelib.m4 2015-05-18 22:31:36.000000000 +0200 +@@ -78,3 +78,17 @@ dnl Check for strtoll, atoll AC_CHECK_FUNCS(strtoll atoll strftime) diff --git a/lang/php5/patches/950-Fix-dl-cross-compiling-issue.patch b/lang/php5/patches/950-Fix-dl-cross-compiling-issue.patch index 02b1f644c..22122ec82 100644 --- a/lang/php5/patches/950-Fix-dl-cross-compiling-issue.patch +++ b/lang/php5/patches/950-Fix-dl-cross-compiling-issue.patch @@ -1,7 +1,6 @@ -diff -u --recursive php-5.6.6-vanilla/configure.in php-5.6.6/configure.in ---- php-5.6.6-vanilla/configure.in 2015-02-26 22:10:51.865487530 -0500 -+++ php-5.6.6/configure.in 2015-02-26 22:29:59.043102135 -0500 -@@ -453,7 +453,10 @@ +--- a/configure.in ++++ b/configure.in +@@ -453,7 +453,10 @@ PHP_CHECK_FUNC(gethostname, nsl) PHP_CHECK_FUNC(gethostbyaddr, nsl) PHP_CHECK_FUNC(yp_get_default_domain, nsl) @@ -13,10 +12,9 @@ diff -u --recursive php-5.6.6-vanilla/configure.in php-5.6.6/configure.in if test "$ac_cv_func_dlopen" = "yes"; then AC_DEFINE(HAVE_LIBDL, 1, [ ]) fi -diff -u --recursive php-5.6.6-vanilla/ext/fileinfo/config.m4 php-5.6.6/ext/fileinfo/config.m4 ---- php-5.6.6-vanilla/ext/fileinfo/config.m4 2015-02-26 22:10:51.639487135 -0500 -+++ php-5.6.6/ext/fileinfo/config.m4 2015-02-26 22:22:47.645609128 -0500 -@@ -46,6 +46,10 @@ +--- a/ext/fileinfo/config.m4 ++++ b/ext/fileinfo/config.m4 +@@ -46,6 +46,10 @@ int main(void) AC_MSG_RESULT(no) AC_MSG_NOTICE(using libmagic strcasestr implementation) libmagic_sources="$libmagic_sources libmagic/strcasestr.c" @@ -27,10 +25,9 @@ diff -u --recursive php-5.6.6-vanilla/ext/fileinfo/config.m4 php-5.6.6/ext/filei ]) PHP_NEW_EXTENSION(fileinfo, fileinfo.c $libmagic_sources, $ext_shared,,-I@ext_srcdir@/libmagic) -diff -u --recursive php-5.6.6-vanilla/ext/opcache/config.m4 php-5.6.6/ext/opcache/config.m4 ---- php-5.6.6-vanilla/ext/opcache/config.m4 2015-02-26 22:10:51.790487399 -0500 -+++ php-5.6.6/ext/opcache/config.m4 2015-02-26 22:34:19.240414394 -0500 -@@ -341,7 +341,14 @@ +--- a/ext/opcache/config.m4 ++++ b/ext/opcache/config.m4 +@@ -227,7 +227,14 @@ AC_TRY_RUN([ flock_type=linux AC_DEFINE([HAVE_FLOCK_LINUX], [], [Struct flock is Linux-type]) AC_MSG_RESULT("yes") @@ -46,7 +43,7 @@ diff -u --recursive php-5.6.6-vanilla/ext/opcache/config.m4 php-5.6.6/ext/opcach AC_MSG_CHECKING("whether flock struct is BSD ordered") AC_TRY_RUN([ -@@ -357,7 +364,12 @@ +@@ -243,7 +250,12 @@ AC_TRY_RUN([ flock_type=bsd AC_DEFINE([HAVE_FLOCK_BSD], [], [Struct flock is BSD-type]) AC_MSG_RESULT("yes") From 6cba0bf5454034b9ac7e6dcf917ebefc75d9bb8e Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Fri, 12 Jun 2015 23:59:29 +0200 Subject: [PATCH 04/10] php5: update to 5.6.10 This fixes the following CVEs: - in PCRE: CVE-2015-2325, CVE-2015-2326 - in sqlite3: CVE-2015-3414, CVE-2015-3415, CVE-2015-3416 Signed-off-by: Michael Heimpold --- lang/php5/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/php5/Makefile b/lang/php5/Makefile index e5a1aa24d..8772e9c1f 100644 --- a/lang/php5/Makefile +++ b/lang/php5/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=5.6.9 +PKG_VERSION:=5.6.10 PKG_RELEASE:=1 PKG_MAINTAINER:=W. Michael Petullo @@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.php.net/distributions/ -PKG_MD5SUM:=561f37377833772ace776143c5687884 +PKG_MD5SUM:=83b17e0cdc72a3a486f5e6342e76c45e PKG_FIXUP:=libtool autoreconf PKG_BUILD_PARALLEL:=1 From 9bbdad4ed72559aa03ccd024d5a49aae12d6a2c6 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Tue, 11 Aug 2015 22:17:09 +0200 Subject: [PATCH 05/10] php5: update to 5.6.12 Signed-off-by: Michael Heimpold --- lang/php5/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/php5/Makefile b/lang/php5/Makefile index 8772e9c1f..dee218c5a 100644 --- a/lang/php5/Makefile +++ b/lang/php5/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=5.6.10 +PKG_VERSION:=5.6.12 PKG_RELEASE:=1 PKG_MAINTAINER:=W. Michael Petullo @@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.php.net/distributions/ -PKG_MD5SUM:=83b17e0cdc72a3a486f5e6342e76c45e +PKG_MD5SUM:=4578dee9d979114610a444bee263ed9b PKG_FIXUP:=libtool autoreconf PKG_BUILD_PARALLEL:=1 From 1cbcdf7f9e2aad526e0a59247525321aefa25234 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Fri, 21 Aug 2015 22:32:24 +0200 Subject: [PATCH 06/10] php5: fix the two different maintainer fields into one (fixes #1688) Signed-off-by: Michael Heimpold --- lang/php5/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lang/php5/Makefile b/lang/php5/Makefile index dee218c5a..0be18c684 100644 --- a/lang/php5/Makefile +++ b/lang/php5/Makefile @@ -11,7 +11,7 @@ PKG_NAME:=php PKG_VERSION:=5.6.12 PKG_RELEASE:=1 -PKG_MAINTAINER:=W. Michael Petullo +PKG_MAINTAINER:=W. Michael Petullo , Michael Heimpold PKG_LICENSE:=PHPv3.01 PKG_LICENSE_FILES:=LICENSE @@ -55,7 +55,6 @@ define Package/php5/Default CATEGORY:=Languages TITLE:=PHP5 Hypertext preprocessor URL:=http://www.php.net/ - MAINTAINER:=Michael Heimpold DEPENDS:=php5 endef From 196b622bd660384adecfd75959e0111ba34fe5f6 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Sat, 5 Sep 2015 21:50:37 +0200 Subject: [PATCH 07/10] php5: update to 5.6.13 Signed-off-by: Michael Heimpold --- lang/php5/Makefile | 4 +-- ...bian_patches_use_embedded_timezonedb.patch | 28 +++++++++---------- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/lang/php5/Makefile b/lang/php5/Makefile index 0be18c684..6c302b9ef 100644 --- a/lang/php5/Makefile +++ b/lang/php5/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=5.6.12 +PKG_VERSION:=5.6.13 PKG_RELEASE:=1 PKG_MAINTAINER:=W. Michael Petullo , Michael Heimpold @@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.php.net/distributions/ -PKG_MD5SUM:=4578dee9d979114610a444bee263ed9b +PKG_MD5SUM:=64d9a82068e3b0bbb16c261261391172 PKG_FIXUP:=libtool autoreconf PKG_BUILD_PARALLEL:=1 diff --git a/lang/php5/patches/102-debian_patches_use_embedded_timezonedb.patch b/lang/php5/patches/102-debian_patches_use_embedded_timezonedb.patch index 4b5ff5b62..bfbed435c 100644 --- a/lang/php5/patches/102-debian_patches_use_embedded_timezonedb.patch +++ b/lang/php5/patches/102-debian_patches_use_embedded_timezonedb.patch @@ -18,9 +18,8 @@ r3: fix a crash if /usr/share/zoneinfo doesn't exist (Raphael Geissert) r2: add filesystem trawl to set up name alias index r1: initial revision -diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_tz.c ---- php-5.6.9.orig/ext/date/lib/parse_tz.c 2015-05-14 01:13:33.000000000 +0200 -+++ php-5.6.9/ext/date/lib/parse_tz.c 2015-05-18 22:40:55.000000000 +0200 +--- a/ext/date/lib/parse_tz.c ++++ b/ext/date/lib/parse_tz.c @@ -18,8 +18,22 @@ /* $Id$ */ @@ -44,12 +43,12 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t #include #ifdef HAVE_LOCALE_H -@@ -31,7 +45,12 @@ - #else +@@ -32,8 +46,12 @@ #include #endif -+ + +#ifndef HAVE_SYSTEM_TZDATA + #define TIMELIB_SUPPORTS_V2DATA #include "timezonedb.h" +#endif + @@ -57,7 +56,7 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t #if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) # if defined(__LITTLE_ENDIAN__) -@@ -53,6 +72,11 @@ +@@ -55,6 +73,11 @@ static int read_preamble(const unsigned { uint32_t version; @@ -69,7 +68,7 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t /* read ID */ version = (*tzf)[3] - '0'; *tzf += 4; -@@ -296,7 +320,406 @@ +@@ -298,7 +321,406 @@ void timelib_dump_tzinfo(timelib_tzinfo } } @@ -477,7 +476,7 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t { int left = 0, right = tzdb->index_size - 1; #ifdef HAVE_SETLOCALE -@@ -335,21 +758,90 @@ +@@ -337,21 +759,90 @@ static int seek_to_tz_position(const uns return 0; } @@ -569,7 +568,7 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t } static void skip_64bit_preamble(const unsigned char **tzf, timelib_tzinfo *tz) -@@ -374,10 +866,12 @@ +@@ -376,10 +867,12 @@ static void read_64bit_header(const unsi timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb) { const unsigned char *tzf; @@ -583,7 +582,7 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t tmp = timelib_tzinfo_ctor(timezone); version = read_preamble(&tzf, tmp); -@@ -391,7 +885,34 @@ +@@ -393,7 +886,34 @@ timelib_tzinfo *timelib_parse_tzfile(cha skip_64bit_types(&tzf, tmp); skip_posix_string(&tzf, tmp); } @@ -619,10 +618,9 @@ diff -Naur php-5.6.9.orig/ext/date/lib/parse_tz.c php-5.6.9/ext/date/lib/parse_t } else { tmp = NULL; } -diff -Naur php-5.6.9.orig/ext/date/lib/timelib.m4 php-5.6.9/ext/date/lib/timelib.m4 ---- php-5.6.9.orig/ext/date/lib/timelib.m4 2015-05-14 01:13:33.000000000 +0200 -+++ php-5.6.9/ext/date/lib/timelib.m4 2015-05-18 22:31:36.000000000 +0200 -@@ -78,3 +78,17 @@ +--- a/ext/date/lib/timelib.m4 ++++ b/ext/date/lib/timelib.m4 +@@ -78,3 +78,17 @@ stdlib.h dnl Check for strtoll, atoll AC_CHECK_FUNCS(strtoll atoll strftime) From 0df349f8df0fbc5272b909fad1320f64de622884 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Wed, 21 Oct 2015 22:55:28 +0200 Subject: [PATCH 08/10] php5: update to 5.6.14 Signed-off-by: Michael Heimpold --- lang/php5/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/php5/Makefile b/lang/php5/Makefile index 6c302b9ef..cd6989a49 100644 --- a/lang/php5/Makefile +++ b/lang/php5/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=5.6.13 +PKG_VERSION:=5.6.14 PKG_RELEASE:=1 PKG_MAINTAINER:=W. Michael Petullo , Michael Heimpold @@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.php.net/distributions/ -PKG_MD5SUM:=64d9a82068e3b0bbb16c261261391172 +PKG_MD5SUM:=2e1332123a7e19d15ed2af2d1d6bd6fd PKG_FIXUP:=libtool autoreconf PKG_BUILD_PARALLEL:=1 From 41f541bd267969d7676571be56f8c1a5c71e5257 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Sat, 7 Nov 2015 17:37:45 +0100 Subject: [PATCH 09/10] php5: update to 5.6.15 Signed-off-by: Michael Heimpold --- lang/php5/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/php5/Makefile b/lang/php5/Makefile index cd6989a49..cc31822fb 100644 --- a/lang/php5/Makefile +++ b/lang/php5/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=5.6.14 +PKG_VERSION:=5.6.15 PKG_RELEASE:=1 PKG_MAINTAINER:=W. Michael Petullo , Michael Heimpold @@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=LICENSE PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://www.php.net/distributions/ -PKG_MD5SUM:=2e1332123a7e19d15ed2af2d1d6bd6fd +PKG_MD5SUM:=bdfa8fb1b895a25e1cc05c162f9ae5fc PKG_FIXUP:=libtool autoreconf PKG_BUILD_PARALLEL:=1 From 766cfcc77f3be9152e818dc5703204b607a5a405 Mon Sep 17 00:00:00 2001 From: Michael Heimpold Date: Mon, 30 Nov 2015 21:29:06 +0100 Subject: [PATCH 10/10] php5: update to 5.6.16 Signed-off-by: Michael Heimpold --- lang/php5/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lang/php5/Makefile b/lang/php5/Makefile index cc31822fb..3ab2e8eae 100644 --- a/lang/php5/Makefile +++ b/lang/php5/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=php -PKG_VERSION:=5.6.15 +PKG_VERSION:=5.6.16 PKG_RELEASE:=1 PKG_MAINTAINER:=W. Michael Petullo , Michael Heimpold @@ -16,9 +16,9 @@ PKG_MAINTAINER:=W. Michael Petullo , Michael Heimpold