From e8116421da4167f0014cbd5c2b9d4ded8881eddf Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 2 Nov 2014 08:01:18 +0100 Subject: - update to 5.6.3RC1 - new version of systzdata patch, fix case sensitivity - ignore Factory in date tests - disable opcache.fast_shutdown in default config - add php56-cgi command in base system --- opcache.ini | 2 +- php-5.2.0-includedir.patch | 11 - php-5.3.1-systzdata-v10.patch | 635 ---------------------------------------- php-5.3.7-oci8conf.patch | 39 --- php-5.4.7-libdb.patch | 86 ------ php-5.4.8-ldap_r.patch | 17 -- php-5.4.9-fixheader.patch | 23 -- php-5.4.9-phpinfo.patch | 27 -- php-5.6.0-noNO.patch | 43 --- php-5.6.3-datetests.patch | 23 ++ php-5.6.3-fixheader.patch | 23 ++ php-5.6.3-includedir.patch | 11 + php-5.6.3-ldap_r.patch | 17 ++ php-5.6.3-libdb.patch | 86 ++++++ php-5.6.3-oci8conf.patch | 39 +++ php-5.6.3-phpinfo.patch | 27 ++ php-5.6.3-systzdata-v11.patch | 655 ++++++++++++++++++++++++++++++++++++++++++ php-bug68074.patch | 60 ---- php.spec | 38 ++- 19 files changed, 905 insertions(+), 957 deletions(-) delete mode 100644 php-5.2.0-includedir.patch delete mode 100644 php-5.3.1-systzdata-v10.patch delete mode 100644 php-5.3.7-oci8conf.patch delete mode 100644 php-5.4.7-libdb.patch delete mode 100644 php-5.4.8-ldap_r.patch delete mode 100644 php-5.4.9-fixheader.patch delete mode 100644 php-5.4.9-phpinfo.patch delete mode 100644 php-5.6.0-noNO.patch create mode 100644 php-5.6.3-datetests.patch create mode 100644 php-5.6.3-fixheader.patch create mode 100644 php-5.6.3-includedir.patch create mode 100644 php-5.6.3-ldap_r.patch create mode 100644 php-5.6.3-libdb.patch create mode 100644 php-5.6.3-oci8conf.patch create mode 100644 php-5.6.3-phpinfo.patch create mode 100644 php-5.6.3-systzdata-v11.patch delete mode 100644 php-bug68074.patch diff --git a/opcache.ini b/opcache.ini index fb3e9a9..21f16ad 100644 --- a/opcache.ini +++ b/opcache.ini @@ -48,7 +48,7 @@ opcache.max_accelerated_files=4000 ;opcache.load_comments=1 ; If enabled, a fast shutdown sequence is used for the accelerated code -opcache.fast_shutdown=1 +;opcache.fast_shutdown=0 ; Allow file existence override (file_exists, etc.) performance feature. ;opcache.enable_file_override=0 diff --git a/php-5.2.0-includedir.patch b/php-5.2.0-includedir.patch deleted file mode 100644 index ac4ae4a..0000000 --- a/php-5.2.0-includedir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- php-5.2.0/configure.in.includedir -+++ php-5.2.0/configure.in -@@ -1101,7 +1101,7 @@ - EXPANDED_DATADIR=$datadir - EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"` - EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"` --INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR -+INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR:${EXPANDED_DATADIR}/php:/usr/share/pear:/usr/share/php - - exec_prefix=$old_exec_prefix - libdir=$old_libdir diff --git a/php-5.3.1-systzdata-v10.patch b/php-5.3.1-systzdata-v10.patch deleted file mode 100644 index b262fae..0000000 --- a/php-5.3.1-systzdata-v10.patch +++ /dev/null @@ -1,635 +0,0 @@ -Add support for use of the system timezone database, rather -than embedding a copy. Discussed upstream but was not desired. - -History: -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 - timezone_identifiers_list() using system db, - fix use of PECL timezonedb to override system db, -r5: reverts addition of "System/Localtime" fake tzname. - updated for 5.3.0, parses zone.tab to pick up mapping between - timezone name, country code and long/lat coords -r4: added "System/Localtime" tzname which uses /etc/localtime -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 @@ - - #include "timelib.h" - -+#ifdef HAVE_SYSTEM_TZDATA -+#include -+#include -+#include -+#include -+#include -+ -+#include "php_scandir.h" -+#endif -+ - #include - - #ifdef HAVE_LOCALE_H -@@ -31,7 +41,12 @@ - #else - #include - #endif -+ -+#ifndef HAVE_SYSTEM_TZDATA - #include "timezonedb.h" -+#endif -+ -+#include - - #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) - { -- /* 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,405 @@ - } - } - --static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb) -+#ifdef HAVE_SYSTEM_TZDATA -+ -+#ifdef HAVE_SYSTEM_TZDATA_PREFIX -+#define ZONEINFO_PREFIX HAVE_SYSTEM_TZDATA_PREFIX -+#else -+#define ZONEINFO_PREFIX "/usr/share/zoneinfo" -+#endif -+ -+/* System timezone database pointer. */ -+static const timelib_tzdb *timezonedb_system; -+ -+/* Hash table entry for the cache of the zone.tab mapping table. */ -+struct location_info { -+ char code[2]; -+ double latitude, longitude; -+ char name[64]; -+ char *comment; -+ struct location_info *next; -+}; -+ -+/* Cache of zone.tab. */ -+static struct location_info **system_location_table; -+ -+/* Size of the zone.tab hash table; a random-ish prime big enough to -+ * 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 = tolower(*p++)) != '\0') { -+ hash = (hash << 5) ^ hash ^ c; -+ } -+ -+ return hash % LOCINFO_HASH_SIZE; -+} -+ -+/* Parse an ISO-6709 date as used in zone.tab. Returns end of the -+ * parsed string on success, or NULL on parse error. On success, -+ * writes the parsed number to *result. */ -+static char *parse_iso6709(char *p, double *result) -+{ -+ double v, sign; -+ char *pend; -+ size_t len; -+ -+ if (*p == '+') -+ sign = 1.0; -+ else if (*p == '-') -+ sign = -1.0; -+ else -+ return NULL; -+ -+ p++; -+ for (pend = p; *pend >= '0' && *pend <= '9'; pend++) -+ ;; -+ -+ /* Annoying encoding used by zone.tab has no decimal point, so use -+ * the length to determine the format: -+ * -+ * 4 = DDMM -+ * 5 = DDDMM -+ * 6 = DDMMSS -+ * 7 = DDDMMSS -+ */ -+ len = pend - p; -+ if (len < 4 || len > 7) { -+ return NULL; -+ } -+ -+ /* p => [D]DD */ -+ v = (p[0] - '0') * 10.0 + (p[1] - '0'); -+ p += 2; -+ if (len == 5 || len == 7) -+ v = v * 10.0 + (*p++ - '0'); -+ /* p => MM[SS] */ -+ v += (10.0 * (p[0] - '0') -+ + p[1] - '0') / 60.0; -+ p += 2; -+ /* p => [SS] */ -+ if (len > 5) { -+ v += (10.0 * (p[0] - '0') -+ + p[1] - '0') / 3600.0; -+ p += 2; -+ } -+ -+ /* Round to five decimal place, not because it's a good idea, -+ * but, because the builtin data uses rounded data, so, match -+ * that. */ -+ *result = round(v * sign * 100000.0) / 100000.0; -+ -+ return p; -+} -+ -+/* This function parses the zone.tab file to build up the mapping of -+ * timezone to country code and geographic location, and returns a -+ * hash table. The hash table is indexed by the function: -+ * -+ * tz_hash(timezone-name) -+ */ -+static struct location_info **create_location_table(void) -+{ -+ struct location_info **li, *i; -+ char zone_tab[PATH_MAX]; -+ char line[512]; -+ FILE *fp; -+ -+ strncpy(zone_tab, ZONEINFO_PREFIX "/zone.tab", sizeof zone_tab); -+ -+ fp = fopen(zone_tab, "r"); -+ if (!fp) { -+ return NULL; -+ } -+ -+ li = calloc(LOCINFO_HASH_SIZE, sizeof *li); -+ -+ while (fgets(line, sizeof line, fp)) { -+ char *p = line, *code, *name, *comment; -+ uint32_t hash; -+ double latitude, longitude; -+ -+ while (isspace(*p)) -+ p++; -+ -+ 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; -+ p += 3; -+ -+ /* coords => [+-][D]DDMM[SS][+-][D]DDMM[SS] */ -+ p = parse_iso6709(p, &latitude); -+ if (!p) { -+ continue; -+ } -+ p = parse_iso6709(p, &longitude); -+ if (!p) { -+ continue; -+ } -+ -+ if (!p || *p != '\t') { -+ continue; -+ } -+ -+ /* name = string */ -+ name = ++p; -+ while (*p != '\t' && *p && *p != '\n') -+ p++; -+ -+ *p++ = '\0'; -+ -+ /* comment = string */ -+ comment = p; -+ while (*p != '\t' && *p && *p != '\n') -+ p++; -+ -+ if (*p == '\n' || *p == '\t') -+ *p = '\0'; -+ -+ hash = tz_hash(name); -+ i = malloc(sizeof *i); -+ memcpy(i->code, code, 2); -+ strncpy(i->name, name, sizeof i->name); -+ i->comment = strdup(comment); -+ i->longitude = longitude; -+ i->latitude = latitude; -+ i->next = li[hash]; -+ li[hash] = i; -+ /* printf("%s [%u, %f, %f]\n", name, hash, latitude, longitude); */ -+ } -+ -+ fclose(fp); -+ -+ return li; -+} -+ -+/* Return location info from hash table, using given timezone name. -+ * Returns NULL if the name could not be found. */ -+const struct location_info *find_zone_info(struct location_info **li, -+ const char *name) -+{ -+ uint32_t hash = tz_hash(name); -+ const struct location_info *l; -+ -+ if (!li) { -+ return NULL; -+ } -+ -+ for (l = li[hash]; l; l = l->next) { -+ if (strcasecmp(l->name, name) == 0) -+ return l; -+ } -+ -+ return NULL; -+} -+ -+/* Filter out some non-tzdata files and the posix/right databases, if -+ * present. */ -+static int index_filter(const struct dirent *ent) -+{ -+ return strcmp(ent->d_name, ".") != 0 -+ && strcmp(ent->d_name, "..") != 0 -+ && strcmp(ent->d_name, "posix") != 0 -+ && strcmp(ent->d_name, "posixrules") != 0 -+ && strcmp(ent->d_name, "right") != 0 -+ && strstr(ent->d_name, ".tab") == NULL; -+} -+ -+static int sysdbcmp(const void *first, const void *second) -+{ -+ const timelib_tzdb_index_entry *alpha = first, *beta = second; -+ -+ return strcmp(alpha->id, beta->id); -+} -+ -+ -+/* Create the zone identifier index by trawling the filesystem. */ -+static void create_zone_index(timelib_tzdb *db) -+{ -+ size_t dirstack_size, dirstack_top; -+ size_t index_size, index_next; -+ timelib_tzdb_index_entry *db_index; -+ char **dirstack; -+ -+ /* LIFO stack to hold directory entries to scan; each slot is a -+ * directory name relative to the zoneinfo prefix. */ -+ dirstack_size = 32; -+ dirstack = malloc(dirstack_size * sizeof *dirstack); -+ dirstack_top = 1; -+ dirstack[0] = strdup(""); -+ -+ /* Index array. */ -+ index_size = 64; -+ db_index = malloc(index_size * sizeof *db_index); -+ index_next = 0; -+ -+ do { -+ struct dirent **ents; -+ char name[PATH_MAX], *top; -+ int count; -+ -+ /* Pop the top stack entry, and iterate through its contents. */ -+ top = dirstack[--dirstack_top]; -+ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s", top); -+ -+ count = php_scandir(name, &ents, index_filter, php_alphasort); -+ -+ while (count > 0) { -+ struct stat st; -+ const char *leaf = ents[count - 1]->d_name; -+ -+ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s/%s", -+ top, leaf); -+ -+ if (strlen(name) && stat(name, &st) == 0) { -+ /* Name, relative to the zoneinfo prefix. */ -+ const char *root = top; -+ -+ if (root[0] == '/') root++; -+ -+ snprintf(name, sizeof name, "%s%s%s", root, -+ *root ? "/": "", leaf); -+ -+ if (S_ISDIR(st.st_mode)) { -+ if (dirstack_top == dirstack_size) { -+ dirstack_size *= 2; -+ dirstack = realloc(dirstack, -+ dirstack_size * sizeof *dirstack); -+ } -+ dirstack[dirstack_top++] = strdup(name); -+ } -+ else { -+ if (index_next == index_size) { -+ index_size *= 2; -+ db_index = realloc(db_index, -+ index_size * sizeof *db_index); -+ } -+ -+ db_index[index_next++].id = strdup(name); -+ } -+ } -+ -+ free(ents[--count]); -+ } -+ -+ if (count != -1) free(ents); -+ free(top); -+ } while (dirstack_top); -+ -+ qsort(db_index, index_next, sizeof *db_index, sysdbcmp); -+ -+ db->index = db_index; -+ db->index_size = index_next; -+ -+ free(dirstack); -+} -+ -+#define FAKE_HEADER "1234\0??\1??" -+#define FAKE_UTC_POS (7 - 4) -+ -+/* Create a fake data segment for database 'sysdb'. */ -+static void fake_data_segment(timelib_tzdb *sysdb, -+ struct location_info **info) -+{ -+ size_t n; -+ char *data, *p; -+ -+ data = malloc(3 * sysdb->index_size + 7); -+ -+ p = mempcpy(data, FAKE_HEADER, sizeof(FAKE_HEADER) - 1); -+ -+ for (n = 0; n < sysdb->index_size; n++) { -+ const struct location_info *li; -+ timelib_tzdb_index_entry *ent; -+ -+ ent = (timelib_tzdb_index_entry *)&sysdb->index[n]; -+ -+ /* Lookup the timezone name in the hash table. */ -+ if (strcmp(ent->id, "UTC") == 0) { -+ ent->pos = FAKE_UTC_POS; -+ continue; -+ } -+ -+ li = find_zone_info(info, ent->id); -+ if (li) { -+ /* If found, append the BC byte and the -+ * country code; set the position for this -+ * section of timezone data. */ -+ ent->pos = (p - data) - 4; -+ *p++ = '\1'; -+ *p++ = li->code[0]; -+ *p++ = li->code[1]; -+ } -+ else { -+ /* If not found, the timezone data can -+ * point at the header. */ -+ ent->pos = 0; -+ } -+ } -+ -+ sysdb->data = (unsigned char *)data; -+} -+ -+/* Returns true if the passed-in stat structure describes a -+ * probably-valid timezone file. */ -+static int is_valid_tzfile(const struct stat *st) -+{ -+ return S_ISREG(st->st_mode) && st->st_size > 20; -+} -+ -+/* Return the mmap()ed tzfile if found, else NULL. On success, the -+ * length of the mapped data is placed in *length. */ -+static char *map_tzfile(const char *timezone, size_t *length) -+{ -+ char fname[PATH_MAX]; -+ struct stat st; -+ char *p; -+ int fd; -+ -+ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { -+ 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); -+ if (fd == -1) { -+ return NULL; -+ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st)) { -+ close(fd); -+ return NULL; -+ } -+ -+ *length = st.st_size; -+ p = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); -+ close(fd); -+ -+ return p != MAP_FAILED ? p : NULL; -+} -+ -+#endif -+ -+static int inmem_seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb) - { - int left = 0, right = tzdb->index_size - 1; - #ifdef HAVE_SETLOCALE -@@ -295,36 +713,135 @@ - return 0; - } - -+static int seek_to_tz_position(const unsigned char **tzf, char *timezone, -+ char **map, size_t *maplen, -+ const timelib_tzdb *tzdb) -+{ -+#ifdef HAVE_SYSTEM_TZDATA -+ if (tzdb == timezonedb_system) { -+ char *orig; -+ -+ orig = map_tzfile(timezone, maplen); -+ if (orig == NULL) { -+ return 0; -+ } -+ -+ (*tzf) = (unsigned char *)orig ; -+ *map = orig; -+ -+ return 1; -+ } -+ else -+#endif -+ { -+ return inmem_seek_to_tz_position(tzf, timezone, tzdb); -+ } -+} -+ - const timelib_tzdb *timelib_builtin_db(void) - { -+#ifdef HAVE_SYSTEM_TZDATA -+ if (timezonedb_system == NULL) { -+ timelib_tzdb *tmp = malloc(sizeof *tmp); -+ -+ tmp->version = "0.system"; -+ tmp->data = NULL; -+ create_zone_index(tmp); -+ system_location_table = create_location_table(); -+ fake_data_segment(tmp, system_location_table); -+ timezonedb_system = tmp; -+ } -+ -+ -+ return timezonedb_system; -+#else - return &timezonedb_builtin; -+#endif - } - - const timelib_tzdb_index_entry *timelib_timezone_builtin_identifiers_list(int *count) - { -+#ifdef HAVE_SYSTEM_TZDATA -+ *count = timezonedb_system->index_size; -+ return timezonedb_system->index; -+#else - *count = sizeof(timezonedb_idx_builtin) / sizeof(*timezonedb_idx_builtin); - return timezonedb_idx_builtin; -+#endif - } - - int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb) - { - const unsigned char *tzf; -- return (seek_to_tz_position(&tzf, timezone, tzdb)); -+ -+#ifdef HAVE_SYSTEM_TZDATA -+ if (tzdb == timezonedb_system) { -+ char fname[PATH_MAX]; -+ struct stat 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)); - } - - timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb) - { - const unsigned char *tzf; -+ char *memmap = NULL; -+ size_t maplen; - timelib_tzinfo *tmp; - -- 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); -- read_location(&tzf, tmp); -+ -+#ifdef HAVE_SYSTEM_TZDATA -+ if (memmap) { -+ const struct location_info *li; -+ -+ /* TZif-style - grok the location info from the system database, -+ * if possible. */ -+ -+ if ((li = find_zone_info(system_location_table, timezone)) != NULL) { -+ tmp->location.comments = strdup(li->comment); -+ strncpy(tmp->location.country_code, li->code, 2); -+ tmp->location.longitude = li->longitude; -+ tmp->location.latitude = li->latitude; -+ tmp->bc = 1; -+ } -+ else { -+ strcpy(tmp->location.country_code, "??"); -+ tmp->bc = 0; -+ tmp->location.comments = strdup(""); -+ } -+ -+ /* Now done with the mmap segment - discard it. */ -+ munmap(memmap, maplen); -+ } else -+#endif -+ { -+ /* PHP-style - use the embedded info. */ -+ read_location(&tzf, tmp); -+ } - } else { - tmp = NULL; - } ---- 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) -+ -+PHP_ARG_WITH(system-tzdata, for use of system timezone data, -+[ --with-system-tzdata[=DIR] to specify use of system timezone data], -+no, no) -+ -+if test "$PHP_SYSTEM_TZDATA" != "no"; then -+ AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used]) -+ -+ if test "$PHP_SYSTEM_TZDATA" != "yes"; then -+ AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA", -+ [Define for location of system timezone data]) -+ fi -+fi -+ diff --git a/php-5.3.7-oci8conf.patch b/php-5.3.7-oci8conf.patch deleted file mode 100644 index 4a5c44f..0000000 --- a/php-5.3.7-oci8conf.patch +++ /dev/null @@ -1,39 +0,0 @@ -diff -up php5.3-201104170830/ext/ldap/php_ldap.h.remi-oci8 php5.3-201104170830/ext/ldap/php_ldap.h ---- php5.3-201104170830/ext/ldap/php_ldap.h.remi-oci8 2011-01-01 04:37:23.000000000 +0100 -+++ php5.3-201104170830/ext/ldap/php_ldap.h 2011-04-17 11:55:25.630871609 +0200 -@@ -27,7 +27,7 @@ - #include - #endif - --#include -+#include "/usr/include/ldap.h" - - extern zend_module_entry ldap_module_entry; - #define ldap_module_ptr &ldap_module_entry -diff -up php5.3-201104170830/ext/oci8/config.m4.remi-oci8 php5.3-201104170830/ext/oci8/config.m4 ---- php5.3-201104170830/ext/oci8/config.m4.remi-oci8 2011-03-30 00:35:22.000000000 +0200 -+++ php5.3-201104170830/ext/oci8/config.m4 2011-04-17 11:55:25.628871315 +0200 -@@ -291,6 +291,7 @@ if test "$PHP_OCI8" != "no"; then - - dnl Header directory for Instant Client SDK RPM install - OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client\('${PHP_OCI8_IC_LIBDIR_SUFFIX}'\)*/lib[/]*$!/usr/include/oracle/\1/client\2!'` -+ OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/\(lib64\|lib\)/oracle/\(.*\)/\(client64\|client\)/lib[/]*$!/usr/include/oracle/\2/\3!'` - - dnl Header directory for Instant Client SDK zip file install - OCISDKZIPINC=$PHP_OCI8_INSTANT_CLIENT/sdk/include -diff -up php5.3-201104170830/ext/pdo_oci/config.m4.remi-oci8 php5.3-201104170830/ext/pdo_oci/config.m4 ---- php5.3-201104170830/ext/pdo_oci/config.m4.remi-oci8 2011-04-02 04:35:24.000000000 +0200 -+++ php5.3-201104170830/ext/pdo_oci/config.m4 2011-04-17 12:02:42.837194120 +0200 -@@ -104,8 +104,10 @@ You need to tell me where to find your O - else - AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your Instant Client install]) - fi -- if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then -- PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib" -+ if test -f "$PDO_OCI_IC_PREFIX/lib64/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then -+ PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib64/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib" -+ elif test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then -+ PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib" - elif test -f "$PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then - PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/lib" - elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.$SHLIB_SUFFIX_NAME" ; then diff --git a/php-5.4.7-libdb.patch b/php-5.4.7-libdb.patch deleted file mode 100644 index bc4e1fc..0000000 --- a/php-5.4.7-libdb.patch +++ /dev/null @@ -1,86 +0,0 @@ ---- php-5.4.7/ext/dba/config.m4.orig 2012-09-20 12:23:00.548322754 +0200 -+++ php-5.4.7/ext/dba/config.m4 2012-09-20 12:28:07.656380829 +0200 -@@ -312,57 +312,13 @@ - dbdp4="/usr/local/BerkeleyDB.4." - dbdp5="/usr/local/BerkeleyDB.5." - for i in $PHP_DB4 ${dbdp5}1 ${dbdp5}0 ${dbdp4}8 ${dbdp4}7 ${dbdp4}6 ${dbdp4}5 ${dbdp4}4 ${dbdp4}3 ${dbdp4}2 ${dbdp4}1 ${dbdp}0 /usr/local /usr; do -- if test -f "$i/db5/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/db5/db.h -- break -- elif test -f "$i/db4/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/db4/db.h -- break -- elif test -f "$i/include/db5.1/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db5.1/db.h -- break -- elif test -f "$i/include/db5.0/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db5.0/db.h -- break -- elif test -f "$i/include/db4.8/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db4.8/db.h -- break -- elif test -f "$i/include/db4.7/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db4.7/db.h -- break -- elif test -f "$i/include/db4.6/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db4.6/db.h -- break -- elif test -f "$i/include/db4.5/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db4.5/db.h -- break -- elif test -f "$i/include/db4/db.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db4/db.h -- break -- elif test -f "$i/include/db/db4.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db/db4.h -- break -- elif test -f "$i/include/db4.h"; then -- THIS_PREFIX=$i -- THIS_INCLUDE=$i/include/db4.h -- break -- elif test -f "$i/include/db.h"; then -+ if test -f "$i/include/db.h"; then - THIS_PREFIX=$i - THIS_INCLUDE=$i/include/db.h - break - fi - done -- PHP_DBA_DB_CHECK(4, db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) -+ PHP_DBA_DB_CHECK(4, db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) - fi - PHP_DBA_STD_RESULT(db4,Berkeley DB4) - ---- php-5.4.7/ext/dba/dba.c.old 2012-09-19 14:55:23.868456900 +0200 -+++ php-5.4.7/ext/dba/dba.c 2012-09-19 15:02:42.796009320 +0200 -@@ -52,6 +52,10 @@ - #include "php_qdbm.h" - #include "php_tcadb.h" - -+#ifdef DB4_INCLUDE_FILE -+#include DB4_INCLUDE_FILE -+#endif -+ - /* {{{ arginfo */ - ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_popen, 0, 0, 2) - ZEND_ARG_INFO(0, path) -@@ -522,6 +526,10 @@ - - php_info_print_table_start(); - php_info_print_table_row(2, "DBA support", "enabled"); -+#ifdef DB_VERSION_STRING -+ php_info_print_table_row(2, "libdb header version", DB_VERSION_STRING); -+ php_info_print_table_row(2, "libdb library version", db_version(NULL, NULL, NULL)); -+#endif - if (handlers.c) { - smart_str_0(&handlers); - php_info_print_table_row(2, "Supported handlers", handlers.c); diff --git a/php-5.4.8-ldap_r.patch b/php-5.4.8-ldap_r.patch deleted file mode 100644 index 6d6924f..0000000 --- a/php-5.4.8-ldap_r.patch +++ /dev/null @@ -1,17 +0,0 @@ - -Use -lldap_r by default. - ---- php-5.4.8/ext/ldap/config.m4.ldap_r -+++ php-5.4.8/ext/ldap/config.m4 -@@ -95,7 +95,10 @@ if test "$PHP_LDAP" != "no"; then - LDAP_PTHREAD= - fi - -- if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then -+ if test -f $LDAP_LIBDIR/libldap_r.$SHLIB_SUFFIX_NAME; then -+ PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) -+ PHP_ADD_LIBRARY_WITH_PATH(ldap_r, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) -+ elif test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then - PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) - PHP_ADD_LIBRARY_WITH_PATH(ldap, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) - diff --git a/php-5.4.9-fixheader.patch b/php-5.4.9-fixheader.patch deleted file mode 100644 index f4e7db5..0000000 --- a/php-5.4.9-fixheader.patch +++ /dev/null @@ -1,23 +0,0 @@ - -Make generated php_config.h constant across rebuilds. - ---- php-5.4.9/configure.in.fixheader -+++ php-5.4.9/configure.in -@@ -1258,7 +1258,7 @@ fi - EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS" - EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS" - --PHP_BUILD_DATE=`date '+%Y-%m-%d'` -+PHP_BUILD_DATE=`date '+%Y-%m-%d' -r $srcdir/NEWS` - AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date]) - - case $host_alias in -@@ -1269,7 +1269,7 @@ case $host_alias in - AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[hardcode for each of the cross compiler host]) - ;; - *) -- PHP_UNAME=`uname -a | xargs` -+ PHP_UNAME=`uname | xargs` - AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output]) - PHP_OS=`uname | xargs` - AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output]) diff --git a/php-5.4.9-phpinfo.patch b/php-5.4.9-phpinfo.patch deleted file mode 100644 index b52a2f8..0000000 --- a/php-5.4.9-phpinfo.patch +++ /dev/null @@ -1,27 +0,0 @@ - -Drop "Configure Command" from phpinfo as it doesn't -provide any useful information. -The available extensions are not related to this command. - ---- php-5.4.9/ext/standard/info.c.orig 2012-12-11 10:43:02.450578276 +0100 -+++ php-5.4.9/ext/standard/info.c 2012-12-11 10:44:12.530820821 +0100 -@@ -704,9 +704,6 @@ - #ifdef ARCHITECTURE - php_info_print_table_row(2, "Architecture", ARCHITECTURE); - #endif --#ifdef CONFIGURE_COMMAND -- php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND ); --#endif - - if (sapi_module.pretty_name) { - php_info_print_table_row(2, "Server API", sapi_module.pretty_name ); ---- php-5.4.9/ext/standard/tests/general_functions/phpinfo.phpt.orig 2012-12-11 11:07:26.959156091 +0100 -+++ php-5.4.9/ext/standard/tests/general_functions/phpinfo.phpt 2012-12-11 11:07:30.899170970 +0100 -@@ -20,7 +20,6 @@ - - System => %s - Build Date => %s%a --Configure Command => %s - Server API => Command Line Interface - Virtual Directory Support => %s - Configuration File (php.ini) Path => %s diff --git a/php-5.6.0-noNO.patch b/php-5.6.0-noNO.patch deleted file mode 100644 index 52f54ab..0000000 --- a/php-5.6.0-noNO.patch +++ /dev/null @@ -1,43 +0,0 @@ ---- ext/standard/tests/strings/setlocale_variation2.phpt.orig 2014-06-11 16:10:00.259326468 +0200 -+++ ext/standard/tests/strings/setlocale_variation2.phpt 2014-06-11 16:16:14.396138997 +0200 -@@ -52,6 +52,7 @@ - //try different locale names - $failure_locale = array(); - $success_count = 0; -+$expected = 0; - - echo "-- Test setlocale() with all available locale in the system --\n"; - // gather all locales installed in the system(stored $all_system_locales), -@@ -61,6 +62,10 @@ - if(setlocale(LC_ALL,$value )){ - $success_count++; - } -+ else if ($value == 'no_NO.ISO-8859-1') { -+ // ignore this one, see rhbz #971416 -+ $expected++; -+ } - else{ - //failure values are put in to an array $failure_locale - $failure_locale[] = $value; -@@ -69,11 +74,11 @@ - - echo "No of locales found on the machine = ".count($all_system_locales)."\n"; - echo "No of setlocale() success = ".$success_count."\n"; --echo "Expected no of failures = 0\n"; -+echo "Expected no of failures = $expected\n"; - echo "Test "; - // check if there were any failure of setlocale() function earlier, if any - // failure then dump the list of failing locales --if($success_count != count($all_system_locales)){ -+if(($success_count + $expected) != count($all_system_locales)){ - echo "FAILED\n"; - echo "Names of locale() for which setlocale() failed ...\n"; - var_dump($failure_locale); -@@ -89,6 +94,6 @@ - -- Test setlocale() with all available locale in the system -- - No of locales found on the machine = %d - No of setlocale() success = %d --Expected no of failures = 0 -+Expected no of failures = %d - Test PASSED - Done diff --git a/php-5.6.3-datetests.patch b/php-5.6.3-datetests.patch new file mode 100644 index 0000000..a29bb63 --- /dev/null +++ b/php-5.6.3-datetests.patch @@ -0,0 +1,23 @@ +--- a/ext/date/tests/bug66985.phpt 2014-10-30 07:32:03.297693403 +0100 ++++ b/ext/date/tests/bug66985.phpt 2014-10-30 07:32:45.138877977 +0100 +@@ -3,7 +3,7 @@ + --FILE-- + 3 +- [timezone] => Factory +-) +-DateTimeZone Object +-( + [timezone_type] => 3 + [timezone] => GB-Eire + ) diff --git a/php-5.6.3-fixheader.patch b/php-5.6.3-fixheader.patch new file mode 100644 index 0000000..7089535 --- /dev/null +++ b/php-5.6.3-fixheader.patch @@ -0,0 +1,23 @@ + +Make generated php_config.h constant across rebuilds. + +--- php-5.4.9/configure.in.fixheader ++++ php-5.4.9/configure.in +@@ -1275,7 +1275,7 @@ fi + EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS" + EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS" + +-PHP_BUILD_DATE=`date '+%Y-%m-%d'` ++PHP_BUILD_DATE=`date '+%Y-%m-%d' -r $srcdir/NEWS` + AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date]) + + case $host_alias in +@@ -1286,7 +1286,7 @@ case $host_alias in + AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[hardcode for each of the cross compiler host]) + ;; + *) +- PHP_UNAME=`uname -a | xargs` ++ PHP_UNAME=`uname | xargs` + AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output]) + PHP_OS=`uname | xargs` + AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output]) diff --git a/php-5.6.3-includedir.patch b/php-5.6.3-includedir.patch new file mode 100644 index 0000000..70734cf --- /dev/null +++ b/php-5.6.3-includedir.patch @@ -0,0 +1,11 @@ +--- php-5.2.0/configure.in.includedir ++++ php-5.2.0/configure.in +@@ -1242,7 +1242,7 @@ + EXPANDED_DATADIR=$datadir + EXPANDED_PHP_CONFIG_FILE_PATH=`eval echo "$PHP_CONFIG_FILE_PATH"` + EXPANDED_PHP_CONFIG_FILE_SCAN_DIR=`eval echo "$PHP_CONFIG_FILE_SCAN_DIR"` +-INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR ++INCLUDE_PATH=.:$EXPANDED_PEAR_INSTALLDIR:${EXPANDED_DATADIR}/php + + exec_prefix=$old_exec_prefix + libdir=$old_libdir diff --git a/php-5.6.3-ldap_r.patch b/php-5.6.3-ldap_r.patch new file mode 100644 index 0000000..b335488 --- /dev/null +++ b/php-5.6.3-ldap_r.patch @@ -0,0 +1,17 @@ + +Use -lldap_r by default. + +--- php-5.4.8/ext/ldap/config.m4.ldap_r ++++ php-5.4.8/ext/ldap/config.m4 +@@ -117,7 +117,10 @@ if test "$PHP_LDAP" != "no"; then + LDAP_PTHREAD= + fi + +- if test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then ++ if test -f $LDAP_LIBDIR/libldap_r.$SHLIB_SUFFIX_NAME; then ++ PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) ++ PHP_ADD_LIBRARY_WITH_PATH(ldap_r, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) ++ elif test -f $LDAP_LIBDIR/liblber.a || test -f $LDAP_LIBDIR/liblber.$SHLIB_SUFFIX_NAME; then + PHP_ADD_LIBRARY_WITH_PATH(lber, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) + PHP_ADD_LIBRARY_WITH_PATH(ldap, $LDAP_LIBDIR, LDAP_SHARED_LIBADD) + diff --git a/php-5.6.3-libdb.patch b/php-5.6.3-libdb.patch new file mode 100644 index 0000000..dc0e40b --- /dev/null +++ b/php-5.6.3-libdb.patch @@ -0,0 +1,86 @@ +--- php-5.4.7/ext/dba/config.m4.orig 2012-09-20 12:23:00.548322754 +0200 ++++ php-5.4.7/ext/dba/config.m4 2012-09-20 12:28:07.656380829 +0200 +@@ -312,57 +312,13 @@ + dbdp4="/usr/local/BerkeleyDB.4." + dbdp5="/usr/local/BerkeleyDB.5." + for i in $PHP_DB4 ${dbdp5}1 ${dbdp5}0 ${dbdp4}8 ${dbdp4}7 ${dbdp4}6 ${dbdp4}5 ${dbdp4}4 ${dbdp4}3 ${dbdp4}2 ${dbdp4}1 ${dbdp}0 /usr/local /usr; do +- if test -f "$i/db5/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/db5/db.h +- break +- elif test -f "$i/db4/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/db4/db.h +- break +- elif test -f "$i/include/db5.1/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db5.1/db.h +- break +- elif test -f "$i/include/db5.0/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db5.0/db.h +- break +- elif test -f "$i/include/db4.8/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db4.8/db.h +- break +- elif test -f "$i/include/db4.7/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db4.7/db.h +- break +- elif test -f "$i/include/db4.6/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db4.6/db.h +- break +- elif test -f "$i/include/db4.5/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db4.5/db.h +- break +- elif test -f "$i/include/db4/db.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db4/db.h +- break +- elif test -f "$i/include/db/db4.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db/db4.h +- break +- elif test -f "$i/include/db4.h"; then +- THIS_PREFIX=$i +- THIS_INCLUDE=$i/include/db4.h +- break +- elif test -f "$i/include/db.h"; then ++ if test -f "$i/include/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db.h + break + fi + done +- PHP_DBA_DB_CHECK(4, db-5.1 db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) ++ PHP_DBA_DB_CHECK(4, db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) + fi + PHP_DBA_STD_RESULT(db4,Berkeley DB4) + +--- php-5.4.7/ext/dba/dba.c.old 2012-09-19 14:55:23.868456900 +0200 ++++ php-5.4.7/ext/dba/dba.c 2012-09-19 15:02:42.796009320 +0200 +@@ -52,6 +52,10 @@ + #include "php_qdbm.h" + #include "php_tcadb.h" + ++#ifdef DB4_INCLUDE_FILE ++#include DB4_INCLUDE_FILE ++#endif ++ + /* {{{ arginfo */ + ZEND_BEGIN_ARG_INFO_EX(arginfo_dba_popen, 0, 0, 2) + ZEND_ARG_INFO(0, path) +@@ -535,6 +539,10 @@ + + php_info_print_table_start(); + php_info_print_table_row(2, "DBA support", "enabled"); ++#ifdef DB_VERSION_STRING ++ php_info_print_table_row(2, "libdb header version", DB_VERSION_STRING); ++ php_info_print_table_row(2, "libdb library version", db_version(NULL, NULL, NULL)); ++#endif + if (handlers.c) { + smart_str_0(&handlers); + php_info_print_table_row(2, "Supported handlers", handlers.c); diff --git a/php-5.6.3-oci8conf.patch b/php-5.6.3-oci8conf.patch new file mode 100644 index 0000000..f2d8f99 --- /dev/null +++ b/php-5.6.3-oci8conf.patch @@ -0,0 +1,39 @@ +diff -up php5.3-201104170830/ext/ldap/php_ldap.h.remi-oci8 php5.3-201104170830/ext/ldap/php_ldap.h +--- php5.3-201104170830/ext/ldap/php_ldap.h.remi-oci8 2011-01-01 04:37:23.000000000 +0100 ++++ php5.3-201104170830/ext/ldap/php_ldap.h 2011-04-17 11:55:25.630871609 +0200 +@@ -27,7 +27,7 @@ + #include + #endif + +-#include ++#include "/usr/include/ldap.h" + + extern zend_module_entry ldap_module_entry; + #define ldap_module_ptr &ldap_module_entry +diff -up php5.3-201104170830/ext/oci8/config.m4.remi-oci8 php5.3-201104170830/ext/oci8/config.m4 +--- php5.3-201104170830/ext/oci8/config.m4.remi-oci8 2011-03-30 00:35:22.000000000 +0200 ++++ php5.3-201104170830/ext/oci8/config.m4 2011-04-17 11:55:25.628871315 +0200 +@@ -376,6 +376,7 @@ if test "$PHP_OCI8" != "no"; then + + dnl Header directory for Instant Client SDK RPM install + OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/lib/oracle/\(.*\)/client\('${PHP_OCI8_IC_LIBDIR_SUFFIX}'\)*/lib[/]*$!/usr/include/oracle/\1/client\2!'` ++ OCISDKRPMINC=`echo "$PHP_OCI8_INSTANT_CLIENT" | $PHP_OCI8_SED -e 's!^/usr/\(lib64\|lib\)/oracle/\(.*\)/\(client64\|client\)/lib[/]*$!/usr/include/oracle/\2/\3!'` + + dnl Header directory for Instant Client SDK zip file install + OCISDKZIPINC=$PHP_OCI8_INSTANT_CLIENT/sdk/include +diff -up php5.3-201104170830/ext/pdo_oci/config.m4.remi-oci8 php5.3-201104170830/ext/pdo_oci/config.m4 +--- php5.3-201104170830/ext/pdo_oci/config.m4.remi-oci8 2011-04-02 04:35:24.000000000 +0200 ++++ php5.3-201104170830/ext/pdo_oci/config.m4 2011-04-17 12:02:42.837194120 +0200 +@@ -104,8 +104,10 @@ You need to tell me where to find your O + else + AC_MSG_ERROR([I'm too dumb to figure out where the include dir is in your Instant Client install]) + fi +- if test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then +- PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib" ++ if test -f "$PDO_OCI_IC_PREFIX/lib64/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then ++ PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib64/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib" ++ elif test -f "$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then ++ PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/lib/oracle/$PDO_OCI_IC_VERS/$PDO_OCI_CLIENT_DIR/lib" + elif test -f "$PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/lib/libclntsh.$SHLIB_SUFFIX_NAME" ; then + PDO_OCI_LIB_DIR="$PDO_OCI_IC_PREFIX/$PDO_OCI_CLIENT_DIR/lib" + elif test -f "$PDO_OCI_IC_PREFIX/libclntsh.$SHLIB_SUFFIX_NAME" ; then diff --git a/php-5.6.3-phpinfo.patch b/php-5.6.3-phpinfo.patch new file mode 100644 index 0000000..a11a298 --- /dev/null +++ b/php-5.6.3-phpinfo.patch @@ -0,0 +1,27 @@ + +Drop "Configure Command" from phpinfo as it doesn't +provide any useful information. +The available extensions are not related to this command. + +--- php-5.4.9/ext/standard/info.c.orig 2012-12-11 10:43:02.450578276 +0100 ++++ php-5.4.9/ext/standard/info.c 2012-12-11 10:44:12.530820821 +0100 +@@ -743,9 +743,6 @@ + #ifdef ARCHITECTURE + php_info_print_table_row(2, "Architecture", ARCHITECTURE); + #endif +-#ifdef CONFIGURE_COMMAND +- php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND ); +-#endif + + if (sapi_module.pretty_name) { + php_info_print_table_row(2, "Server API", sapi_module.pretty_name ); +--- php-5.4.9/ext/standard/tests/general_functions/phpinfo.phpt.orig 2012-12-11 11:07:26.959156091 +0100 ++++ php-5.4.9/ext/standard/tests/general_functions/phpinfo.phpt 2012-12-11 11:07:30.899170970 +0100 +@@ -20,7 +20,6 @@ + + System => %s + Build Date => %s%a +-Configure Command => %s + Server API => Command Line Interface + Virtual Directory Support => %s + Configuration File (php.ini) Path => %s diff --git a/php-5.6.3-systzdata-v11.patch b/php-5.6.3-systzdata-v11.patch new file mode 100644 index 0000000..bfca49b --- /dev/null +++ b/php-5.6.3-systzdata-v11.patch @@ -0,0 +1,655 @@ +Add support for use of the system timezone database, rather +than embedding a copy. Discussed upstream but was not desired. + +History: +r11: use canonical names to avoid more case sensitivity issues + round lat/long from zone.tab towards zero per builtin db +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 + timezone_identifiers_list() using system db, + fix use of PECL timezonedb to override system db, +r5: reverts addition of "System/Localtime" fake tzname. + updated for 5.3.0, parses zone.tab to pick up mapping between + timezone name, country code and long/lat coords +r4: added "System/Localtime" tzname which uses /etc/localtime +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 --git a/ext/date/lib/parse_tz.c b/ext/date/lib/parse_tz.c +index 5d2aec9..671b398 100644 +--- a/ext/date/lib/parse_tz.c ++++ b/ext/date/lib/parse_tz.c +@@ -20,6 +20,16 @@ + + #include "timelib.h" + ++#ifdef HAVE_SYSTEM_TZDATA ++#include ++#include ++#include ++#include ++#include ++ ++#include "php_scandir.h" ++#endif ++ + #include + + #ifdef HAVE_LOCALE_H +@@ -31,7 +41,12 @@ + #else + #include + #endif ++ ++#ifndef HAVE_SYSTEM_TZDATA + #include "timezonedb.h" ++#endif ++ ++#include + + #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) + { +- /* 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,418 @@ void timelib_dump_tzinfo(timelib_tzinfo *tz) + } + } + +-static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb) ++#ifdef HAVE_SYSTEM_TZDATA ++ ++#ifdef HAVE_SYSTEM_TZDATA_PREFIX ++#define ZONEINFO_PREFIX HAVE_SYSTEM_TZDATA_PREFIX ++#else ++#define ZONEINFO_PREFIX "/usr/share/zoneinfo" ++#endif ++ ++/* System timezone database pointer. */ ++static const timelib_tzdb *timezonedb_system; ++ ++/* Hash table entry for the cache of the zone.tab mapping table. */ ++struct location_info { ++ char code[2]; ++ double latitude, longitude; ++ char name[64]; ++ char *comment; ++ struct location_info *next; ++}; ++ ++/* Cache of zone.tab. */ ++static struct location_info **system_location_table; ++ ++/* Size of the zone.tab hash table; a random-ish prime big enough to ++ * 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 = tolower(*p++)) != '\0') { ++ hash = (hash << 5) ^ hash ^ c; ++ } ++ ++ return hash % LOCINFO_HASH_SIZE; ++} ++ ++/* Parse an ISO-6709 date as used in zone.tab. Returns end of the ++ * parsed string on success, or NULL on parse error. On success, ++ * writes the parsed number to *result. */ ++static char *parse_iso6709(char *p, double *result) ++{ ++ double v, sign; ++ char *pend; ++ size_t len; ++ ++ if (*p == '+') ++ sign = 1.0; ++ else if (*p == '-') ++ sign = -1.0; ++ else ++ return NULL; ++ ++ p++; ++ for (pend = p; *pend >= '0' && *pend <= '9'; pend++) ++ ;; ++ ++ /* Annoying encoding used by zone.tab has no decimal point, so use ++ * the length to determine the format: ++ * ++ * 4 = DDMM ++ * 5 = DDDMM ++ * 6 = DDMMSS ++ * 7 = DDDMMSS ++ */ ++ len = pend - p; ++ if (len < 4 || len > 7) { ++ return NULL; ++ } ++ ++ /* p => [D]DD */ ++ v = (p[0] - '0') * 10.0 + (p[1] - '0'); ++ p += 2; ++ if (len == 5 || len == 7) ++ v = v * 10.0 + (*p++ - '0'); ++ /* p => MM[SS] */ ++ v += (10.0 * (p[0] - '0') ++ + p[1] - '0') / 60.0; ++ p += 2; ++ /* p => [SS] */ ++ if (len > 5) { ++ v += (10.0 * (p[0] - '0') ++ + p[1] - '0') / 3600.0; ++ p += 2; ++ } ++ ++ /* Round to five decimal place, not because it's a good idea, ++ * but, because the builtin data uses rounded data, so, match ++ * that. */ ++ *result = trunc(v * sign * 100000.0) / 100000.0; ++ ++ return p; ++} ++ ++/* This function parses the zone.tab file to build up the mapping of ++ * timezone to country code and geographic location, and returns a ++ * hash table. The hash table is indexed by the function: ++ * ++ * tz_hash(timezone-name) ++ */ ++static struct location_info **create_location_table(void) ++{ ++ struct location_info **li, *i; ++ char zone_tab[PATH_MAX]; ++ char line[512]; ++ FILE *fp; ++ ++ strncpy(zone_tab, ZONEINFO_PREFIX "/zone.tab", sizeof zone_tab); ++ ++ fp = fopen(zone_tab, "r"); ++ if (!fp) { ++ return NULL; ++ } ++ ++ li = calloc(LOCINFO_HASH_SIZE, sizeof *li); ++ ++ while (fgets(line, sizeof line, fp)) { ++ char *p = line, *code, *name, *comment; ++ uint32_t hash; ++ double latitude, longitude; ++ ++ while (isspace(*p)) ++ p++; ++ ++ 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; ++ p += 3; ++ ++ /* coords => [+-][D]DDMM[SS][+-][D]DDMM[SS] */ ++ p = parse_iso6709(p, &latitude); ++ if (!p) { ++ continue; ++ } ++ p = parse_iso6709(p, &longitude); ++ if (!p) { ++ continue; ++ } ++ ++ if (!p || *p != '\t') { ++ continue; ++ } ++ ++ /* name = string */ ++ name = ++p; ++ while (*p != '\t' && *p && *p != '\n') ++ p++; ++ ++ *p++ = '\0'; ++ ++ /* comment = string */ ++ comment = p; ++ while (*p != '\t' && *p && *p != '\n') ++ p++; ++ ++ if (*p == '\n' || *p == '\t') ++ *p = '\0'; ++ ++ hash = tz_hash(name); ++ i = malloc(sizeof *i); ++ memcpy(i->code, code, 2); ++ strncpy(i->name, name, sizeof i->name); ++ i->comment = strdup(comment); ++ i->longitude = longitude; ++ i->latitude = latitude; ++ i->next = li[hash]; ++ li[hash] = i; ++ /* printf("%s [%u, %f, %f]\n", name, hash, latitude, longitude); */ ++ } ++ ++ fclose(fp); ++ ++ return li; ++} ++ ++/* Return location info from hash table, using given timezone name. ++ * Returns NULL if the name could not be found. */ ++const struct location_info *find_zone_info(struct location_info **li, ++ const char *name) ++{ ++ uint32_t hash = tz_hash(name); ++ const struct location_info *l; ++ ++ if (!li) { ++ return NULL; ++ } ++ ++ for (l = li[hash]; l; l = l->next) { ++ if (strcasecmp(l->name, name) == 0) ++ return l; ++ } ++ ++ return NULL; ++} ++ ++/* Filter out some non-tzdata files and the posix/right databases, if ++ * present. */ ++static int index_filter(const struct dirent *ent) ++{ ++ return strcmp(ent->d_name, ".") != 0 ++ && strcmp(ent->d_name, "..") != 0 ++ && strcmp(ent->d_name, "posix") != 0 ++ && strcmp(ent->d_name, "posixrules") != 0 ++ && strcmp(ent->d_name, "right") != 0 ++ && strstr(ent->d_name, ".tab") == NULL; ++} ++ ++static int sysdbcmp(const void *first, const void *second) ++{ ++ const timelib_tzdb_index_entry *alpha = first, *beta = second; ++ ++ return strcasecmp(alpha->id, beta->id); ++} ++ ++ ++/* Create the zone identifier index by trawling the filesystem. */ ++static void create_zone_index(timelib_tzdb *db) ++{ ++ size_t dirstack_size, dirstack_top; ++ size_t index_size, index_next; ++ timelib_tzdb_index_entry *db_index; ++ char **dirstack; ++ ++ /* LIFO stack to hold directory entries to scan; each slot is a ++ * directory name relative to the zoneinfo prefix. */ ++ dirstack_size = 32; ++ dirstack = malloc(dirstack_size * sizeof *dirstack); ++ dirstack_top = 1; ++ dirstack[0] = strdup(""); ++ ++ /* Index array. */ ++ index_size = 64; ++ db_index = malloc(index_size * sizeof *db_index); ++ index_next = 0; ++ ++ do { ++ struct dirent **ents; ++ char name[PATH_MAX], *top; ++ int count; ++ ++ /* Pop the top stack entry, and iterate through its contents. */ ++ top = dirstack[--dirstack_top]; ++ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s", top); ++ ++ count = php_scandir(name, &ents, index_filter, php_alphasort); ++ ++ while (count > 0) { ++ struct stat st; ++ const char *leaf = ents[count - 1]->d_name; ++ ++ snprintf(name, sizeof name, ZONEINFO_PREFIX "/%s/%s", ++ top, leaf); ++ ++ if (strlen(name) && stat(name, &st) == 0) { ++ /* Name, relative to the zoneinfo prefix. */ ++ const char *root = top; ++ ++ if (root[0] == '/') root++; ++ ++ snprintf(name, sizeof name, "%s%s%s", root, ++ *root ? "/": "", leaf); ++ ++ if (S_ISDIR(st.st_mode)) { ++ if (dirstack_top == dirstack_size) { ++ dirstack_size *= 2; ++ dirstack = realloc(dirstack, ++ dirstack_size * sizeof *dirstack); ++ } ++ dirstack[dirstack_top++] = strdup(name); ++ } ++ else { ++ if (index_next == index_size) { ++ index_size *= 2; ++ db_index = realloc(db_index, ++ index_size * sizeof *db_index); ++ } ++ ++ db_index[index_next++].id = strdup(name); ++ } ++ } ++ ++ free(ents[--count]); ++ } ++ ++ if (count != -1) free(ents); ++ free(top); ++ } while (dirstack_top); ++ ++ qsort(db_index, index_next, sizeof *db_index, sysdbcmp); ++ ++ db->index = db_index; ++ db->index_size = index_next; ++ ++ free(dirstack); ++} ++ ++#define FAKE_HEADER "1234\0??\1??" ++#define FAKE_UTC_POS (7 - 4) ++ ++/* Create a fake data segment for database 'sysdb'. */ ++static void fake_data_segment(timelib_tzdb *sysdb, ++ struct location_info **info) ++{ ++ size_t n; ++ char *data, *p; ++ ++ data = malloc(3 * sysdb->index_size + 7); ++ ++ p = mempcpy(data, FAKE_HEADER, sizeof(FAKE_HEADER) - 1); ++ ++ for (n = 0; n < sysdb->index_size; n++) { ++ const struct location_info *li; ++ timelib_tzdb_index_entry *ent; ++ ++ ent = (timelib_tzdb_index_entry *)&sysdb->index[n]; ++ ++ /* Lookup the timezone name in the hash table. */ ++ if (strcmp(ent->id, "UTC") == 0) { ++ ent->pos = FAKE_UTC_POS; ++ continue; ++ } ++ ++ li = find_zone_info(info, ent->id); ++ if (li) { ++ /* If found, append the BC byte and the ++ * country code; set the position for this ++ * section of timezone data. */ ++ ent->pos = (p - data) - 4; ++ *p++ = '\1'; ++ *p++ = li->code[0]; ++ *p++ = li->code[1]; ++ } ++ else { ++ /* If not found, the timezone data can ++ * point at the header. */ ++ ent->pos = 0; ++ } ++ } ++ ++ sysdb->data = (unsigned char *)data; ++} ++ ++/* Returns true if the passed-in stat structure describes a ++ * probably-valid timezone file. */ ++static int is_valid_tzfile(const struct stat *st) ++{ ++ return S_ISREG(st->st_mode) && st->st_size > 20; ++} ++ ++/* To allow timezone names to be used case-insensitively, find the ++ * canonical name for this timezone, if possible. */ ++static const char *canonical_tzname(const char *timezone) ++{ ++ if (timezonedb_system) { ++ timelib_tzdb_index_entry *ent, lookup; ++ ++ lookup.id = (char *)timezone; ++ ++ ent = bsearch(&lookup, timezonedb_system->index, ++ timezonedb_system->index_size, sizeof lookup, ++ sysdbcmp); ++ if (ent) { ++ return ent->id; ++ } ++ } ++ ++ return timezone; ++} ++ ++/* Return the mmap()ed tzfile if found, else NULL. On success, the ++ * length of the mapped data is placed in *length. */ ++static char *map_tzfile(const char *timezone, size_t *length) ++{ ++ char fname[PATH_MAX]; ++ struct stat st; ++ char *p; ++ int fd; ++ ++ if (timezone[0] == '\0' || strstr(timezone, "..") != NULL) { ++ return NULL; ++ } ++ ++ snprintf(fname, sizeof fname, ZONEINFO_PREFIX "/%s", canonical_tzname(timezone)); ++ ++ fd = open(fname, O_RDONLY); ++ if (fd == -1) { ++ return NULL; ++ } else if (fstat(fd, &st) != 0 || !is_valid_tzfile(&st)) { ++ close(fd); ++ return NULL; ++ } ++ ++ *length = st.st_size; ++ p = mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, fd, 0); ++ close(fd); ++ ++ return p != MAP_FAILED ? p : NULL; ++} ++ ++#endif ++ ++static int inmem_seek_to_tz_position(const unsigned char **tzf, char *timezone, const timelib_tzdb *tzdb) + { + int left = 0, right = tzdb->index_size - 1; + #ifdef HAVE_SETLOCALE +@@ -295,36 +726,135 @@ static int seek_to_tz_position(const unsigned char **tzf, char *timezone, const + return 0; + } + ++static int seek_to_tz_position(const unsigned char **tzf, char *timezone, ++ char **map, size_t *maplen, ++ const timelib_tzdb *tzdb) ++{ ++#ifdef HAVE_SYSTEM_TZDATA ++ if (tzdb == timezonedb_system) { ++ char *orig; ++ ++ orig = map_tzfile(timezone, maplen); ++ if (orig == NULL) { ++ return 0; ++ } ++ ++ (*tzf) = (unsigned char *)orig ; ++ *map = orig; ++ ++ return 1; ++ } ++ else ++#endif ++ { ++ return inmem_seek_to_tz_position(tzf, timezone, tzdb); ++ } ++} ++ + const timelib_tzdb *timelib_builtin_db(void) + { ++#ifdef HAVE_SYSTEM_TZDATA ++ if (timezonedb_system == NULL) { ++ timelib_tzdb *tmp = malloc(sizeof *tmp); ++ ++ tmp->version = "0.system"; ++ tmp->data = NULL; ++ create_zone_index(tmp); ++ system_location_table = create_location_table(); ++ fake_data_segment(tmp, system_location_table); ++ timezonedb_system = tmp; ++ } ++ ++ ++ return timezonedb_system; ++#else + return &timezonedb_builtin; ++#endif + } + + const timelib_tzdb_index_entry *timelib_timezone_builtin_identifiers_list(int *count) + { ++#ifdef HAVE_SYSTEM_TZDATA ++ *count = timezonedb_system->index_size; ++ return timezonedb_system->index; ++#else + *count = sizeof(timezonedb_idx_builtin) / sizeof(*timezonedb_idx_builtin); + return timezonedb_idx_builtin; ++#endif + } + + int timelib_timezone_id_is_valid(char *timezone, const timelib_tzdb *tzdb) + { + const unsigned char *tzf; +- return (seek_to_tz_position(&tzf, timezone, tzdb)); ++ ++#ifdef HAVE_SYSTEM_TZDATA ++ if (tzdb == timezonedb_system) { ++ char fname[PATH_MAX]; ++ struct stat 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", canonical_tzname(timezone)); ++ ++ return stat(fname, &st) == 0 && is_valid_tzfile(&st); ++ } ++#endif ++ ++ return (inmem_seek_to_tz_position(&tzf, timezone, tzdb)); + } + + timelib_tzinfo *timelib_parse_tzfile(char *timezone, const timelib_tzdb *tzdb) + { + const unsigned char *tzf; ++ char *memmap = NULL; ++ size_t maplen; + timelib_tzinfo *tmp; + +- 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); +- read_location(&tzf, tmp); ++ ++#ifdef HAVE_SYSTEM_TZDATA ++ if (memmap) { ++ const struct location_info *li; ++ ++ /* TZif-style - grok the location info from the system database, ++ * if possible. */ ++ ++ if ((li = find_zone_info(system_location_table, timezone)) != NULL) { ++ tmp->location.comments = strdup(li->comment); ++ strncpy(tmp->location.country_code, li->code, 2); ++ tmp->location.longitude = li->longitude; ++ tmp->location.latitude = li->latitude; ++ tmp->bc = 1; ++ } ++ else { ++ strcpy(tmp->location.country_code, "??"); ++ tmp->bc = 0; ++ tmp->location.comments = strdup(""); ++ } ++ ++ /* Now done with the mmap segment - discard it. */ ++ munmap(memmap, maplen); ++ } else ++#endif ++ { ++ /* PHP-style - use the embedded info. */ ++ read_location(&tzf, tmp); ++ } + } else { + tmp = NULL; + } +diff --git a/ext/date/lib/timelib.m4 b/ext/date/lib/timelib.m4 +index c725572..4c837c7 100644 +--- 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) ++ ++PHP_ARG_WITH(system-tzdata, for use of system timezone data, ++[ --with-system-tzdata[=DIR] to specify use of system timezone data], ++no, no) ++ ++if test "$PHP_SYSTEM_TZDATA" != "no"; then ++ AC_DEFINE(HAVE_SYSTEM_TZDATA, 1, [Define if system timezone data is used]) ++ ++ if test "$PHP_SYSTEM_TZDATA" != "yes"; then ++ AC_DEFINE_UNQUOTED(HAVE_SYSTEM_TZDATA_PREFIX, "$PHP_SYSTEM_TZDATA", ++ [Define for location of system timezone data]) ++ fi ++fi ++ + diff --git a/php-bug68074.patch b/php-bug68074.patch deleted file mode 100644 index 04451c1..0000000 --- a/php-bug68074.patch +++ /dev/null @@ -1,60 +0,0 @@ -From 0d776ef87b7b0c1e970c424cc5dcdf4cd6f500ac Mon Sep 17 00:00:00 2001 -From: Remi Collet -Date: Wed, 24 Sep 2014 10:34:55 +0200 -Subject: [PATCH] Fix bug #68074 Allow to use system cipher list instead of - hardcoded value - ---- - ext/openssl/config0.m4 | 6 ++++++ - ext/openssl/xp_ssl.c | 9 ++++++--- - 2 files changed, 12 insertions(+), 3 deletions(-) - -diff --git a/ext/openssl/config0.m4 b/ext/openssl/config0.m4 -index a97114f..701e488 100644 ---- a/ext/openssl/config0.m4 -+++ b/ext/openssl/config0.m4 -@@ -8,6 +8,9 @@ PHP_ARG_WITH(openssl, for OpenSSL support, - PHP_ARG_WITH(kerberos, for Kerberos support, - [ --with-kerberos[=DIR] OPENSSL: Include Kerberos support], no, no) - -+PHP_ARG_WITH(system-ciphers, whether to use system default cipher list instead of hardcoded value, -+[ --with-system-ciphers OPENSSL: Use system default cipher list instead of hardcoded value], no, no) -+ - if test "$PHP_OPENSSL" != "no"; then - PHP_NEW_EXTENSION(openssl, openssl.c xp_ssl.c, $ext_shared) - PHP_SUBST(OPENSSL_SHARED_LIBADD) -@@ -25,4 +28,7 @@ if test "$PHP_OPENSSL" != "no"; then - ], [ - AC_MSG_ERROR([OpenSSL check failed. Please check config.log for more information.]) - ]) -+ if test "$PHP_SYSTEM_CIPHERS" != "no"; then -+ AC_DEFINE(USE_OPENSSL_SYSTEM_CIPHERS,1,[ Use system default cipher list instead of hardcoded value ]) -+ fi - fi -diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c -index de9e991..2f81dc7 100644 ---- a/ext/openssl/xp_ssl.c -+++ b/ext/openssl/xp_ssl.c -@@ -1476,13 +1476,16 @@ int php_openssl_setup_crypto(php_stream *stream, - } - - GET_VER_OPT_STRING("ciphers", cipherlist); -+#ifndef USE_OPENSSL_SYSTEM_CIPHERS - if (!cipherlist) { - cipherlist = OPENSSL_DEFAULT_STREAM_CIPHERS; - } -- if (SSL_CTX_set_cipher_list(sslsock->ctx, cipherlist) != 1) { -- return FAILURE; -+#endif -+ if (cipherlist) { -+ if (SSL_CTX_set_cipher_list(sslsock->ctx, cipherlist) != 1) { -+ return FAILURE; -+ } - } -- - if (FAILURE == set_local_cert(sslsock->ctx, stream TSRMLS_CC)) { - return FAILURE; - } --- -2.1.0 - diff --git a/php.spec b/php.spec index 720f302..5c71b09 100644 --- a/php.spec +++ b/php.spec @@ -124,10 +124,11 @@ %global db_devel libdb-devel %endif +%global rcver RC1 Summary: PHP scripting language for creating dynamic web sites Name: %{?scl_prefix}php -Version: 5.6.2 -Release: 1%{?dist} +Version: 5.6.3 +Release: 0.1.RC1%{?dist} # All files licensed under PHP version 3.01, except # Zend is licensed under Zend # TSRM is licensed under BSD @@ -153,9 +154,9 @@ Source50: opcache.ini Source51: opcache-default.blacklist # Build fixes -Patch5: php-5.2.0-includedir.patch +Patch5: php-5.6.3-includedir.patch Patch7: php-5.3.0-recode.patch -Patch8: php-5.4.7-libdb.patch +Patch8: php-5.6.3-libdb.patch # Fixes for extension modules # https://bugs.php.net/63171 no odbc call during timeout @@ -163,29 +164,28 @@ Patch21: php-5.4.7-odbctimer.patch # Functional changes Patch40: php-5.4.0-dlopen.patch -Patch42: php-5.3.1-systzdata-v10.patch +Patch42: php-5.6.3-systzdata-v11.patch # See http://bugs.php.net/53436 Patch43: php-5.4.0-phpize.patch # Use -lldap_r for OpenLDAP -Patch45: php-5.4.8-ldap_r.patch +Patch45: php-5.6.3-ldap_r.patch # Make php_config.h constant across builds -Patch46: php-5.4.9-fixheader.patch +Patch46: php-5.6.3-fixheader.patch # drop "Configure command" from phpinfo output -Patch47: php-5.4.9-phpinfo.patch +Patch47: php-5.6.3-phpinfo.patch # RC Patch -Patch91: php-5.3.7-oci8conf.patch +Patch91: php-5.6.3-oci8conf.patch # Upstream fixes (100+) -Patch100: php-bug68074.patch # Security fixes (200+) # Fixes for tests (300+) +# Factory is droped from system tzdata +Patch300: php-5.6.3-datetests.patch # Revert changes for pcre < 8.34 Patch301: php-5.6.0-oldpcre.patch -# see https://bugzilla.redhat.com/971416 -Patch302: php-5.6.0-noNO.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -853,18 +853,17 @@ support for using the enchant library to PHP. %patch91 -p1 -b .remi-oci8 # upstream patches -%patch100 -p1 -b .bug68074 # security patches # Fixes for tests +%patch300 -p1 -b .datetests %if %{with_libpcre} %if 0%{?fedora} < 21 # Only apply when system libpcre < 8.34 %patch301 -p1 -b .pcre834 %endif %endif -%patch302 -p0 -b .971416 # Prevent %%doc confusion over LICENSE files cp Zend/LICENSE Zend/ZEND_LICENSE @@ -1343,6 +1342,7 @@ install -m 644 %{SOURCE8} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/php-fpm %if 0%{?scl:1} install -m 755 -d $RPM_BUILD_ROOT%{_root_bindir} ln -s %{_bindir}/php $RPM_BUILD_ROOT%{_root_bindir}/%{scl} +ln -s %{_bindir}/php-cgi $RPM_BUILD_ROOT%{_root_bindir}/%{scl}-cgi ln -s %{_bindir}/phar.phar $RPM_BUILD_ROOT%{_root_bindir}/%{scl_prefix}phar ln -s %{_bindir}/phpdbg $RPM_BUILD_ROOT%{_root_bindir}/%{scl_prefix}phpdbg %if %{with_lsws} @@ -1603,6 +1603,7 @@ fi %doc sapi/cgi/README* sapi/cli/README %if 0%{?scl:1} %{_root_bindir}/%{scl} +%{_root_bindir}/%{scl}-cgi %{_root_bindir}/%{scl_prefix}phar %endif @@ -1718,7 +1719,14 @@ fi %changelog -* Thu Oct 16 2014 Remi Collet 5.6.1-1 +* Sun Nov 2 2014 Remi Collet 5.6.3-0.1.RC1 +- update to 5.6.3RC1 +- new version of systzdata patch, fix case sensitivity +- ignore Factory in date tests +- disable opcache.fast_shutdown in default config +- add php56-cgi command in base system + +* Thu Oct 16 2014 Remi Collet 5.6.2-1 - Update to PHP 5.6.2 http://php.net/releases/5_6_2.php -- cgit