[-]
[+]
|
Added |
php5.changes
|
|
[-]
[+]
|
Added |
php5.spec
^
|
|
[-]
[+]
|
Added |
php5-64-bit-post-large-files.patch
^
|
@@ -0,0 +1,70 @@
+https://bugs.php.net/bug.php?id=44522
+Index: php-5.4.13/main/rfc1867.c
+===================================================================
+--- php-5.4.13.orig/main/rfc1867.c
++++ php-5.4.13/main/rfc1867.c
+@@ -676,7 +676,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_
+ {
+ char *boundary, *s = NULL, *boundary_end = NULL, *start_arr = NULL, *array_index = NULL;
+ char *temp_filename = NULL, *lbuf = NULL, *abuf = NULL;
+- int boundary_len = 0, total_bytes = 0, cancel_upload = 0, is_arr_upload = 0, array_len = 0;
++ long total_bytes = 0; int boundary_len = 0, cancel_upload = 0, is_arr_upload = 0, array_len = 0;
+ int max_file_size = 0, skip_upload = 0, anonindex = 0, is_anonymous;
+ zval *http_post_files = NULL;
+ HashTable *uploaded_files = NULL;
+Index: php-5.4.13/main/SAPI.h
+===================================================================
+--- php-5.4.13.orig/main/SAPI.h
++++ php-5.4.13/main/SAPI.h
+@@ -82,7 +82,7 @@ typedef struct {
+ char *post_data, *raw_post_data;
+ char *cookie_data;
+ long content_length;
+- uint post_data_length, raw_post_data_length;
++ uint IGNORE_post_data_length, IGNORE_raw_post_data_length;
+
+ char *path_translated;
+ char *request_uri;
+@@ -112,6 +112,7 @@ typedef struct {
+ int argc;
+ char **argv;
+ int proto_num;
++ long post_data_length, raw_post_data_length;
+ } sapi_request_info;
+
+
+@@ -119,7 +120,7 @@ typedef struct _sapi_globals_struct {
+ void *server_context;
+ sapi_request_info request_info;
+ sapi_headers_struct sapi_headers;
+- int read_post_bytes;
++ long read_post_bytes;
+ unsigned char headers_sent;
+ struct stat global_stat;
+ char *default_mimetype;
+Index: php-5.4.13/sapi/cgi/cgi_main.c
+===================================================================
+--- php-5.4.13.orig/sapi/cgi/cgi_main.c
++++ php-5.4.13/sapi/cgi/cgi_main.c
+@@ -508,7 +508,7 @@ static int sapi_cgi_read_post(char *buff
+ uint read_bytes = 0;
+ int tmp_read_bytes;
+
+- count_bytes = MIN(count_bytes, (uint) SG(request_info).content_length - SG(read_post_bytes));
++ count_bytes = MIN(count_bytes, SG(request_info).content_length - SG(read_post_bytes));
+ while (read_bytes < count_bytes) {
+ tmp_read_bytes = read(STDIN_FILENO, buffer + read_bytes, count_bytes - read_bytes);
+ if (tmp_read_bytes <= 0) {
+Index: php-5.4.13/ext/suhosin/rfc1867.c
+===================================================================
+--- php-5.4.13.orig/ext/suhosin/rfc1867.c
++++ php-5.4.13/ext/suhosin/rfc1867.c
+@@ -779,7 +779,7 @@ SAPI_POST_HANDLER_FUNC(suhosin_rfc1867_p
+ {
+ char *boundary, *s=NULL, *boundary_end = NULL, *start_arr=NULL, *array_index=NULL;
+ char *temp_filename=NULL, *lbuf=NULL, *abuf=NULL;
+- int boundary_len=0, total_bytes=0, cancel_upload=0, is_arr_upload=0, array_len=0;
++ long boundary_len=0, total_bytes=0, cancel_upload=0, is_arr_upload=0, array_len=0;
+ int max_file_size=0, skip_upload=0, anonindex=0, is_anonymous;
+ zval *http_post_files=NULL; HashTable *uploaded_files=NULL;
+ #if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
|
[-]
[+]
|
Added |
php5-BNC-457056.patch
^
|
@@ -0,0 +1,14 @@
+Index: ext/xml/compat.c
+===================================================================
+--- ext/xml/compat.c.orig 2009-01-12 15:30:21.000000000 +0100
++++ ext/xml/compat.c 2009-03-14 18:32:40.000000000 +0100
+@@ -482,9 +482,7 @@ XML_ParserCreate_MM(const XML_Char *enco
+ parser->parser->charset = XML_CHAR_ENCODING_NONE;
+ #endif
+
+-#if LIBXML_VERSION >= 20703
+ xmlCtxtUseOptions(parser->parser, XML_PARSE_OLDSAX);
+-#endif
+
+ parser->parser->replaceEntities = 1;
+ parser->parser->wellFormed = 0;
|
[-]
[+]
|
Added |
php5-apache24-updates.patch
^
|
@@ -0,0 +1,72 @@
+commit 918a01f55b5e0a82c1a2e886143a56eddffe6649
+Author: Cristian Rodríguez <crrodriguez@opensuse.org>
+Date: Wed Aug 8 19:30:04 2012 +0200
+
+ sapi/apache2*: Use ap_state_query where possible instead of old method of creating a pool userdata entry.
+
+diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
+index a8fec5c..21f2fa3 100644
+--- a/sapi/apache2filter/sapi_apache2.c
++++ b/sapi/apache2filter/sapi_apache2.c
+@@ -606,11 +606,17 @@ static int
+ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog,
+ apr_pool_t *ptemp, server_rec *s)
+ {
++
++#if AP_MODULE_MAGIC_AT_LEAST(20110203,1)
++ /* Apache will load, unload and then reload a DSO module. This
++ * prevents us from starting PHP until the second load. */
++ if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) {
++ return OK;
++ }
++#else
+ void *data = NULL;
+ const char *userdata_key = "apache2filter_post_config";
+
+- /* Apache will load, unload and then reload a DSO module. This
+- * prevents us from starting PHP until the second load. */
+ apr_pool_userdata_get(&data, userdata_key, s->process->pool);
+ if (data == NULL) {
+ /* We must use set() here and *not* setn(), otherwise the
+@@ -622,6 +628,7 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog,
+ apr_pool_cleanup_null, s->process->pool);
+ return OK;
+ }
++#endif
+
+ /* Set up our overridden path. */
+ if (apache2_php_ini_path_override) {
+diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
+index 900a3a4..a578740 100644
+--- a/sapi/apache2handler/sapi_apache2.c
++++ b/sapi/apache2handler/sapi_apache2.c
+@@ -430,12 +430,19 @@ static int php_pre_config(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp
+ static int
+ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp, server_rec *s)
+ {
+- void *data = NULL;
+- const char *userdata_key = "apache2hook_post_config";
+
++#if AP_MODULE_MAGIC_AT_LEAST(20110203,1)
+ /* Apache will load, unload and then reload a DSO module. This
+ * prevents us from starting PHP until the second load. */
++ if (ap_state_query(AP_SQ_MAIN_STATE) == AP_SQ_MS_CREATE_PRE_CONFIG) {
++ return OK;
++ }
++#else
++ void *data = NULL;
++ const char *userdata_key = "apache2hook_post_config";
++
+ apr_pool_userdata_get(&data, userdata_key, s->process->pool);
++
+ if (data == NULL) {
+ /* We must use set() here and *not* setn(), otherwise the
+ * static string pointed to by userdata_key will be mapped
+@@ -445,6 +452,7 @@ php_apache_server_startup(apr_pool_t *pconf, apr_pool_t *plog, apr_pool_t *ptemp
+ apr_pool_userdata_set((const void *)1, userdata_key, apr_pool_cleanup_null, s->process->pool);
+ return OK;
+ }
++#endif
+
+ /* Set up our overridden path. */
+ if (apache2_php_ini_path_override) {
|
[-]
[+]
|
Added |
php5-apache_sapi_install.patch
^
|
@@ -0,0 +1,29 @@
+# Do not attempt to modify apache configuration on module install
+================================================================================
+---
+ sapi/apache2handler/config.m4 | 9 ---------
+ 1 file changed, 9 deletions(-)
+
+Index: sapi/apache2handler/config.m4
+===================================================================
+--- sapi/apache2handler/config.m4.orig 2008-03-11 23:47:39.000000000 +0100
++++ sapi/apache2handler/config.m4 2010-08-03 06:31:18.512616000 +0200
+@@ -68,18 +68,9 @@ if test "$PHP_APXS2" != "no"; then
+ fi
+
+ APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
+- if test -z `$APXS -q SYSCONFDIR`; then
+ INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
+ $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
+ -i -n php5"
+- else
+- APXS_SYSCONFDIR='$(INSTALL_ROOT)'`$APXS -q SYSCONFDIR`
+- INSTALL_IT="\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \
+- \$(mkinstalldirs) '$APXS_SYSCONFDIR' && \
+- $APXS -S LIBEXECDIR='$APXS_LIBEXECDIR' \
+- -S SYSCONFDIR='$APXS_SYSCONFDIR' \
+- -i -a -n php5"
+- fi
+
+ case $host_alias in
+ *aix*)
|
[-]
[+]
|
Added |
php5-cloexec.patch
^
|
@@ -0,0 +1,50 @@
+Index: ext/standard/exec.c
+===================================================================
+--- ext/standard/exec.c.orig
++++ ext/standard/exec.c
+@@ -76,7 +76,11 @@ PHPAPI int php_exec(int type, char *cmd,
+ #ifdef PHP_WIN32
+ fp = VCWD_POPEN(cmd, "rb");
+ #else
++ #if defined(__linux__) && __GLIBC_PREREQ(2, 9)
++ fp = VCWD_POPEN(cmd, "re");
++ #else
+ fp = VCWD_POPEN(cmd, "r");
++ #endif
+ #endif
+ if (!fp) {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to fork [%s]", cmd);
+Index: ext/standard/file.c
+===================================================================
+--- ext/standard/file.c.orig
++++ ext/standard/file.c
+@@ -926,6 +926,12 @@ PHP_FUNCTION(popen)
+ }
+ }
+ #endif
++#if defined(__linux__) && __GLIBC_PREREQ(2, 9)
++ char *e = memchr(posix_mode, 'e', mode_len);
++ if (e) {
++ memmove(e, e + 1, mode_len - (e - posix_mode));
++ }
++#endif
+
+ fp = VCWD_POPEN(command, posix_mode);
+ if (!fp) {
+Index: ext/standard/mail.c
+===================================================================
+--- ext/standard/mail.c.orig
++++ ext/standard/mail.c
+@@ -321,8 +321,12 @@ PHPAPI int php_mail(char *to, char *subj
+ * (e.g. the shell can't be executed) we explicitly set it to 0 to be
+ * sure we don't catch any older errno value. */
+ errno = 0;
++#if defined(__linux__) && __GLIBC_PREREQ(2, 9)
++ sendmail = popen(sendmail_cmd, "we");
++#else
+ sendmail = popen(sendmail_cmd, "w");
+ #endif
++#endif
+ if (extra_cmd != NULL) {
+ efree (sendmail_cmd);
+ }
|
[-]
[+]
|
Added |
php5-crypt-tests.patch
^
|
@@ -0,0 +1,104 @@
+Index: ext/standard/config.m4
+===================================================================
+--- ext/standard/config.m4.orig
++++ ext/standard/config.m4
+@@ -60,7 +60,14 @@ if test "$ac_cv_func_crypt" = "no"; then
+ AC_DEFINE(HAVE_CRYPT, 1, [ ])
+ ])
+ fi
+-
++
++if test "$ac_cv_func_crypt" = "no"; then
++ AC_CHECK_LIB(crypt, crypt_r, [
++ LIBS="-lcrypt $LIBS -lcrypt"
++ AC_DEFINE(HAVE_CRYPT_R, 1, [ ])
++ ])
++fi
++
+ AC_CACHE_CHECK(for standard DES crypt, ac_cv_crypt_des,[
+ AC_TRY_RUN([
+ #if HAVE_UNISTD_H
+@@ -172,7 +179,7 @@ main() {
+ ac_cv_crypt_blowfish=no
+ ])])
+
+-AC_CACHE_CHECK(for SHA512 crypt, ac_cv_crypt_SHA512,[
++AC_CACHE_CHECK(for SHA512 crypt, ac_cv_crypt_sha512,[
+ AC_TRY_RUN([
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+@@ -184,24 +191,22 @@ AC_TRY_RUN([
+
+ main() {
+ #if HAVE_CRYPT
+- char salt[30], answer[80];
++ char salt[120];
+
+- salt[0]='$'; salt[1]='6'; salt[2]='$'; salt[3]='$'; salt[4]='b'; salt[5]='a'; salt[6]='r'; salt[7]='\0';
+- strcpy(answer, salt);
+- strcpy(&answer[29],"$6$$QMXjqd7rHQZPQ1yHsXkQqC1FBzDiVfTHXL.LaeDAeVV.IzMaV9VU4MQ8kPuZa2SOP1A0RPm772EaFYjpEJtdu.");
+- exit (strcmp((char *)crypt("foo",salt),answer));
++ strcpy(salt, "\$6\$rounds=5000\$usesomesillystri\$D4IrlXatmP7rx3P3InaxBeoomnAihCKRVQP22JZ6EY47Wc6BkroIuUUBOov1i.S5KPgErtP/EN5mcO.ChWQW21");
++ exit (strcmp((char *)crypt("rasmuslerdorf",salt),salt));
+ #else
+ exit(0);
+ #endif
+ }],[
+- ac_cv_crypt_SHA512=yes
++ ac_cv_crypt_sha512=yes
+ ],[
+- ac_cv_crypt_SHA512=no
++ ac_cv_crypt_sha512=no
+ ],[
+- ac_cv_crypt_SHA512=no
++ ac_cv_crypt_sha512=no
+ ])])
+
+-AC_CACHE_CHECK(for SHA256 crypt, ac_cv_crypt_SHA256,[
++AC_CACHE_CHECK(for SHA256 crypt, ac_cv_crypt_sha256,[
+ AC_TRY_RUN([
+ #if HAVE_UNISTD_H
+ #include <unistd.h>
+@@ -213,28 +218,31 @@ AC_TRY_RUN([
+
+ main() {
+ #if HAVE_CRYPT
+- char salt[30], answer[80];
+- salt[0]='$'; salt[1]='5'; salt[2]='$'; salt[3]='$'; salt[4]='s'; salt[5]='a'; salt[6]='l'; salt[7]='t'; salt[8]='s'; salt[9]='t'; salt[10]='r'; salt[11]='i'; salt[12]='n'; salt[13]='g'; salt[14]='\0';
+- strcat(salt,"");
+- strcpy(answer, salt);
+- strcpy(&answer[29], "$5$saltstring$5B8vYYiY.CVt1RlTTf8KbXBH3hsxY/GNooZaBBGWEc5");
+- exit (strcmp((char *)crypt("foo",salt),answer));
++ char salt[80];
++ strcpy(salt, "\$5\$rounds=5000\$usesomesillystri\$KqJWpanXZHKq2BOB43TSaYhEWsQ1Lr5QNyPCDH/Tp.6");
++ exit (strcmp((char *)crypt("rasmuslerdorf",salt),salt));
+ #else
+ exit(0);
+ #endif
+ }],[
+- ac_cv_crypt_SHA256=yes
++ ac_cv_crypt_sha256=yes
+ ],[
+- ac_cv_crypt_SHA256=no
++ ac_cv_crypt_sha256=no
+ ],[
+- ac_cv_crypt_SHA256=no
++ ac_cv_crypt_sha256=no
+ ])])
+
+
+ dnl
+-dnl If one of them is missing, use our own implementation, portable code is then possible
++dnl If one of them or crypt_r() is missing, use our own implementation, portable code is then possible
+ dnl
+-if test "$ac_cv_crypt_blowfish" = "no" || test "$ac_cv_crypt_des" = "no" || test "$ac_cv_crypt_ext_des" = "no" || test "x$php_crypt_r" = "x0"; then
++if test "$ac_cv_crypt_des" = "no" ||
++ /* test "$ac_cv_crypt_ext_des" = "no" ||*/
++ test "$ac_cv_crypt_md5" = "no" ||
++ test "$ac_cv_crypt_blowfish" = "no" ||
++ test "$ac_cv_crypt_sha512" = "no" ||
++ test "$ac_cv_crypt_sha256" = "no" ||
++ test "$ac_cv_lib_crypt_crypt_r" = "no"; then
+
+ dnl
+ dnl Check for __alignof__ support in the compiler
|
[-]
[+]
|
Added |
php5-format-string-issues.patch
^
|
@@ -0,0 +1,90 @@
+--- main/snprintf.h.orig
++++ main/snprintf.h
+@@ -83,7 +83,7 @@ PHPAPI int ap_php_vslprintf(char *buf, s
+ PHPAPI int ap_php_snprintf(char *, size_t, const char *, ...);
+ PHPAPI int ap_php_vsnprintf(char *, size_t, const char *, va_list ap);
+ PHPAPI int ap_php_vasprintf(char **buf, const char *format, va_list ap);
+-PHPAPI int ap_php_asprintf(char **buf, const char *format, ...);
++PHPAPI int ap_php_asprintf(char **buf, const char *format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
+ PHPAPI int php_sprintf (char* s, const char* format, ...) PHP_ATTRIBUTE_FORMAT(printf, 2, 3);
+ PHPAPI char * php_gcvt(double value, int ndigit, char dec_point, char exponent, char *buf);
+ PHPAPI char * php_conv_fp(register char format, register double num,
+--- main/main.c.orig
++++ main/main.c
+@@ -898,7 +898,7 @@ PHPAPI void php_html_puts(const char *st
+
+ /* {{{ php_error_cb
+ extended error handling function */
+-static void php_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args)
++static PHP_ATTRIBUTE_FORMAT(printf, 4, 0) void php_error_cb(int type, const char *error_filename, const uint error_lineno, const char *format, va_list args)
+ {
+ char *buffer;
+ int buffer_len, display;
+--- Zend/zend.h.orig
++++ Zend/zend.h
+@@ -146,6 +146,14 @@ char *alloca ();
+ # define ZEND_ATTRIBUTE_MALLOC
+ #endif
+
++#if ZEND_GCC_VERSION >= 4003
++#define ZEND_ATTR_ALLOC_SIZE(x) __attribute__((__alloc_size__(x)))
++#define ZEND_ATTR_ALLOC_SIZE2(x,y) __attribute__((__alloc_size__(x,y)))
++#else
++#define ZEND_ATTR_ALLOC_SIZE(x)
++#define ZEND_ATTR_ALLOC_SIZE2(x,y)
++#endif
++
+ #if ZEND_GCC_VERSION >= 2007
+ # define ZEND_ATTRIBUTE_FORMAT(type, idx, first) __attribute__ ((format(type, idx, first)))
+ #else
+--- Zend/zend_alloc.h.orig
++++ Zend/zend_alloc.h
+@@ -54,14 +54,14 @@ BEGIN_EXTERN_C()
+
+ ZEND_API char *zend_strndup(const char *s, unsigned int length) ZEND_ATTRIBUTE_MALLOC;
+
+-ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
+-ZEND_API void *_safe_emalloc(size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
+-ZEND_API void *_safe_malloc(size_t nmemb, size_t size, size_t offset) ZEND_ATTRIBUTE_MALLOC;
++ZEND_API void *_emalloc(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC ZEND_ATTR_ALLOC_SIZE(1);
++ZEND_API void *_safe_emalloc(size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC ZEND_ATTR_ALLOC_SIZE2(1,2);
++ZEND_API void *_safe_malloc(size_t nmemb, size_t size, size_t offset) ZEND_ATTRIBUTE_MALLOC ZEND_ATTR_ALLOC_SIZE2(1,2);
+ ZEND_API void _efree(void *ptr ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+-ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
+-ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+-ZEND_API void *_safe_erealloc(void *ptr, size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+-ZEND_API void *_safe_realloc(void *ptr, size_t nmemb, size_t size, size_t offset);
++ZEND_API void *_ecalloc(size_t nmemb, size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC ZEND_ATTR_ALLOC_SIZE2(1,2);
++ZEND_API void *_erealloc(void *ptr, size_t size, int allow_failure ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTR_ALLOC_SIZE(2);
++ZEND_API void *_safe_erealloc(void *ptr, size_t nmemb, size_t size, size_t offset ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTR_ALLOC_SIZE2(2,3);
++ZEND_API void *_safe_realloc(void *ptr, size_t nmemb, size_t size, size_t offset) ZEND_ATTR_ALLOC_SIZE2(2,3);
+ ZEND_API char *_estrdup(const char *s ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
+ ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;
+ ZEND_API size_t _zend_mem_block_size(void *ptr TSRMLS_DC ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC);
+@@ -90,7 +90,7 @@ ZEND_API size_t _zend_mem_block_size(voi
+ #define estrndup_rel(s, length) _estrndup((s), (length) ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
+ #define zend_mem_block_size_rel(ptr) _zend_mem_block_size((ptr) TSRMLS_CC ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_CC)
+
+-inline static void * __zend_malloc(size_t len)
++inline static ZEND_ATTR_ALLOC_SIZE(1) void * __zend_malloc(size_t len)
+ {
+ void *tmp = malloc(len);
+ if (tmp) {
+@@ -100,14 +100,14 @@ inline static void * __zend_malloc(size_
+ exit(1);
+ }
+
+-inline static void * __zend_calloc(size_t nmemb, size_t len)
++inline static ZEND_ATTR_ALLOC_SIZE2(1,2) void * __zend_calloc(size_t nmemb, size_t len)
+ {
+ void *tmp = _safe_malloc(nmemb, len, 0);
+ memset(tmp, 0, nmemb * len);
+ return tmp;
+ }
+
+-inline static void * __zend_realloc(void *p, size_t len)
++inline static ZEND_ATTR_ALLOC_SIZE(2) void * __zend_realloc(void *p, size_t len)
+ {
+ p = realloc(p, len);
+ if (p) {
+
|
[-]
[+]
|
Added |
php5-gcc_builtins.patch
^
|
@@ -0,0 +1,35 @@
+--- Zend/zend_alloc.c.orig
++++ Zend/zend_alloc.c
+@@ -36,7 +36,7 @@
+ # include <wincrypt.h>
+ # include <process.h>
+ #endif
+-
++#include <x86intrin.h>
+ #ifndef ZEND_MM_HEAP_PROTECTION
+ # define ZEND_MM_HEAP_PROTECTION ZEND_DEBUG
+ #endif
+@@ -665,10 +665,7 @@ static inline unsigned int zend_mm_high_
+ __asm__("bsrl %1,%0\n\t" : "=r" (n) : "rm" (_size));
+ return n;
+ #elif defined(__GNUC__) && defined(__x86_64__)
+- unsigned long n;
+-
+- __asm__("bsrq %1,%0\n\t" : "=r" (n) : "rm" (_size));
+- return (unsigned int)n;
++ return __bsrq(_size);
+ #elif defined(_MSC_VER) && defined(_M_IX86)
+ __asm {
+ bsr eax, _size
+@@ -691,10 +688,7 @@ static inline unsigned int zend_mm_low_b
+ __asm__("bsfl %1,%0\n\t" : "=r" (n) : "rm" (_size));
+ return n;
+ #elif defined(__GNUC__) && defined(__x86_64__)
+- unsigned long n;
+-
+- __asm__("bsfq %1,%0\n\t" : "=r" (n) : "rm" (_size));
+- return (unsigned int)n;
++ return __bsfq(_size);
+ #elif defined(_MSC_VER) && defined(_M_IX86)
+ __asm {
+ bsf eax, _size
|
[-]
[+]
|
Added |
php5-ini.patch
^
|
@@ -0,0 +1,76 @@
+Index: php.ini-production
+===================================================================
+--- php.ini-production.orig
++++ php.ini-production
+@@ -702,7 +702,7 @@ default_mimetype = "text/html"
+ ;;;;;;;;;;;;;;;;;;;;;;;;;
+
+ ; UNIX: "/path1:/path2"
+-;include_path = ".:/php/includes"
++include_path = ".:/usr/share/php5:/usr/share/php5/PEAR"
+ ;
+ ; Windows: "\path1;\path2"
+ ;include_path = ".;c:\php\includes"
+@@ -916,7 +916,7 @@ cli_server.color = On
+ [Date]
+ ; Defines the default timezone used by the date functions
+ ; http://php.net/date.timezone
+-;date.timezone =
++date.timezone = 'UTC'
+
+ ; http://php.net/date.default-latitude
+ ;date.default_latitude = 31.7667
+@@ -1106,7 +1106,7 @@ mysql.allow_local_infile = On
+
+ ; Allow or prevent persistent links.
+ ; http://php.net/mysql.allow-persistent
+-mysql.allow_persistent = On
++mysql.allow_persistent = Off
+
+ ; If mysqlnd is used: Number of cache slots for the internal result set cache
+ ; http://php.net/mysql.cache_size
+@@ -1169,7 +1169,7 @@ mysqli.max_persistent = -1
+
+ ; Allow or prevent persistent links.
+ ; http://php.net/mysqli.allow-persistent
+-mysqli.allow_persistent = On
++mysqli.allow_persistent = Off
+
+ ; Maximum number of links. -1 means no limit.
+ ; http://php.net/mysqli.max-links
+@@ -1391,7 +1391,7 @@ session.save_handler = files
+ ; where MODE is the octal representation of the mode. Note that this
+ ; does not overwrite the process's umask.
+ ; http://php.net/session.save-path
+-;session.save_path = "/tmp"
++session.save_path = "/var/lib/php5"
+
+ ; Whether to use cookies.
+ ; http://php.net/session.use-cookies
+@@ -1507,7 +1507,7 @@ session.referer_check =
+
+ ; How many bytes to read from the file.
+ ; http://php.net/session.entropy-length
+-;session.entropy_length = 32
++session.entropy_length = 32
+
+ ; Specified here to create the session id.
+ ; http://php.net/session.entropy-file
+@@ -1516,7 +1516,7 @@ session.referer_check =
+ ; If neither are found at compile time, the default is no entropy file.
+ ; On windows, setting the entropy_length setting will activate the
+ ; Windows random source (using the CryptoAPI)
+-;session.entropy_file = /dev/urandom
++session.entropy_file = /dev/urandom
+
+ ; Set to {nocache,private,public,} to determine HTTP caching aspects
+ ; or leave this empty to avoid sending anti-caching headers.
+@@ -1547,7 +1547,7 @@ session.use_trans_sid = 0
+ ; the hash extension. A list of available hashes is returned by the hash_algos()
+ ; function.
+ ; http://php.net/session.hash-function
+-session.hash_function = 0
++session.hash_function = sha256
+
+ ; Define how many bits are stored in each character when converting
+ ; the binary hash data to something readable.
|
[-]
[+]
|
Added |
php5-mbstring-missing-return.patch
^
|
@@ -0,0 +1,25 @@
+Index: ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c
+===================================================================
+--- ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c.orig 2013-09-18 07:48:57.000000000 +0200
++++ ext/mbstring/libmbfl/filters/mbfilter_sjis_2004.c 2013-09-25 11:59:19.925758346 +0200
+@@ -672,6 +672,8 @@
+ CK(mbfl_filt_conv_illegal_output(c, filter));
+ }
+ }
++
++ return c;
+ }
+
+ int
+Index: ext/mbstring/libmbfl/filters/mbfilter_utf8.c
+===================================================================
+--- ext/mbstring/libmbfl/filters/mbfilter_utf8.c.orig 2013-09-18 07:48:57.000000000 +0200
++++ ext/mbstring/libmbfl/filters/mbfilter_utf8.c 2013-09-25 12:22:04.061030824 +0200
+@@ -101,6 +101,7 @@
+ filter->status = 0;
+ filter->cache = 0;
+ CK((*filter->output_function)(w, filter->data));
++ return 0;
+ }
+
+
|
[-]
[+]
|
Added |
php5-missing-extdeps.patch
^
|
@@ -0,0 +1,103 @@
+Index: ext/soap/soap.c
+===================================================================
+--- ext/soap/soap.c.orig
++++ ext/soap/soap.c
+@@ -442,10 +442,18 @@ static const zend_function_entry soap_he
+ PHP_FE_END
+ };
+
+-zend_module_entry soap_module_entry = {
+-#ifdef STANDARD_MODULE_HEADER
+- STANDARD_MODULE_HEADER,
++/* {{{ soap dependencies */
++static const zend_module_dep soap_module_deps[] = {
++ ZEND_MOD_REQUIRED("standard")
++#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
++ ZEND_MOD_REQUIRED("session")
+ #endif
++ {NULL, NULL, NULL}
++};
++
++zend_module_entry soap_module_entry = {
++ STANDARD_MODULE_HEADER_EX, NULL,
++ soap_module_deps,
+ "soap",
+ soap_functions,
+ PHP_MINIT(soap),
+Index: ext/wddx/wddx.c
+===================================================================
+--- ext/wddx/wddx.c.orig
++++ ext/wddx/wddx.c
+@@ -154,10 +154,21 @@ ZEND_GET_MODULE(wddx)
+ #endif /* COMPILE_DL_WDDX */
+ /* }}} */
+
++/* {{{ wddx dependencies */
++static const zend_module_dep wddx_module_deps[] = {
++ ZEND_MOD_REQUIRED("standard")
++ ZEND_MOD_REQUIRED("xml")
++ ZEND_MOD_REQUIRED("date")
++#if HAVE_PHP_SESSION && !defined(COMPILE_DL_SESSION)
++ ZEND_MOD_REQUIRED("session")
++#endif
++ {NULL, NULL, NULL}
++};
+ /* {{{ wddx_module_entry
+ */
+ zend_module_entry wddx_module_entry = {
+- STANDARD_MODULE_HEADER,
++ STANDARD_MODULE_HEADER_EX, NULL,
++ wddx_module_deps,
+ "wddx",
+ wddx_functions,
+ PHP_MINIT(wddx),
+Index: ext/filter/filter.c
+===================================================================
+--- ext/filter/filter.c.orig
++++ ext/filter/filter.c
+@@ -132,12 +132,17 @@ static const zend_function_entry filter_
+ };
+ /* }}} */
+
++/* {{{ filter dependencies */
++static const zend_module_dep filter_module_deps[] = {
++ ZEND_MOD_REQUIRED("standard")
++ ZEND_MOD_REQUIRED("pcre")
++ {NULL, NULL, NULL}
++};
+ /* {{{ filter_module_entry
+ */
+ zend_module_entry filter_module_entry = {
+-#if ZEND_MODULE_API_NO >= 20010901
+- STANDARD_MODULE_HEADER,
+-#endif
++ STANDARD_MODULE_HEADER_EX, NULL,
++ filter_module_deps,
+ "filter",
+ filter_functions,
+ PHP_MINIT(filter),
+Index: ext/mbstring/mbstring.c
+===================================================================
+--- ext/mbstring/mbstring.c.orig
++++ ext/mbstring/mbstring.c
+@@ -570,9 +570,19 @@ const zend_function_entry mbstring_funct
+ };
+ /* }}} */
+
++/* {{{ mbstring dependencies */
++static const zend_module_dep mbstring_module_deps[] = {
++ ZEND_MOD_REQUIRED("standard")
++#if (HAVE_PCRE || HAVE_BUNDLED_PCRE) && !HAVE_ONIG
++ ZEND_MOD_REQUIRED("pcre")
++#endif
++ {NULL, NULL, NULL}
++};
++
+ /* {{{ zend_module_entry mbstring_module_entry */
+ zend_module_entry mbstring_module_entry = {
+- STANDARD_MODULE_HEADER,
++ STANDARD_MODULE_HEADER_EX, NULL,
++ mbstring_module_deps,
+ "mbstring",
+ mbstring_functions,
+ PHP_MINIT(mbstring),
|
[-]
[+]
|
Added |
php5-no-build-date.patch
^
|
@@ -0,0 +1,88 @@
+Index: ext/standard/info.c
+===================================================================
+--- ext/standard/info.c.orig
++++ ext/standard/info.c
+@@ -697,7 +697,7 @@ PHPAPI void php_print_info(int flag TSRM
+ php_info_print_box_end();
+ php_info_print_table_start();
+ php_info_print_table_row(2, "System", php_uname );
+- php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__ );
++ /* php_info_print_table_row(2, "Build Date", __DATE__ " " __TIME__ ); */
+ #ifdef COMPILER
+ php_info_print_table_row(2, "Compiler", COMPILER);
+ #endif
+@@ -705,7 +705,7 @@ PHPAPI void php_print_info(int flag TSRM
+ php_info_print_table_row(2, "Architecture", ARCHITECTURE);
+ #endif
+ #ifdef CONFIGURE_COMMAND
+- php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
++ /* php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND ); */
+ #endif
+
+ if (sapi_module.pretty_name) {
+Index: sapi/fpm/fpm/fpm_main.c
+===================================================================
+--- sapi/fpm/fpm/fpm_main.c.orig
++++ sapi/fpm/fpm/fpm_main.c
+@@ -1710,7 +1710,7 @@ int main(int argc, char *argv[])
+ #if ZEND_DEBUG
+ php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2014 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ #else
+- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2014 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2014 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+ #endif
+ php_request_shutdown((void *) 0);
+ fcgi_shutdown();
+Index: configure.in
+===================================================================
+--- configure.in.orig
++++ configure.in
+@@ -1257,8 +1257,8 @@ fi
+
+ EXTRA_LDFLAGS="$EXTRA_LDFLAGS $PHP_LDFLAGS"
+ EXTRA_LDFLAGS_PROGRAM="$EXTRA_LDFLAGS_PROGRAM $PHP_LDFLAGS"
+-
+-PHP_BUILD_DATE=`date '+%Y-%m-%d'`
++#totally fake, not used anywhere in userspace
++PHP_BUILD_DATE="1970-01-01"
+ AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE",[PHP build date])
+
+ case $host_alias in
+@@ -1269,7 +1269,8 @@ case $host_alias in
+ AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[hardcode for each of the cross compiler host])
+ ;;
+ *)
+- PHP_UNAME=`uname -a | xargs`
++dnl Totally fake, it wasnt and will never be reliable anyway.
++ PHP_UNAME="Linux suse 2.6.36 #1 SMP 2011-02-21 10:34:10 +0100 x86_64 x86_64 x86_64 GNU/Linux"
+ AC_DEFINE_UNQUOTED(PHP_UNAME,"$PHP_UNAME",[uname -a output])
+ PHP_OS=`uname | xargs`
+ AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS",[uname output])
+Index: sapi/cli/php_cli.c
+===================================================================
+--- sapi/cli/php_cli.c.orig
++++ sapi/cli/php_cli.c
+@@ -687,8 +687,8 @@ static int do_cli(int argc, char **argv
+ goto out;
+
+ case 'v': /* show php version & quit */
+- php_printf("PHP %s (%s) (built: %s %s) %s\nCopyright (c) 1997-2014 The PHP Group\n%s",
+- PHP_VERSION, cli_sapi_module.name, __DATE__, __TIME__,
++ php_printf("PHP %s (%s) %s\nCopyright (c) 1997-2014 The PHP Group\n%s",
++ PHP_VERSION, cli_sapi_module.name,
+ #if ZEND_DEBUG && defined(HAVE_GCOV)
+ "(DEBUG GCOV)",
+ #elif ZEND_DEBUG
+Index: sapi/cgi/cgi_main.c
+===================================================================
+--- sapi/cgi/cgi_main.c.orig
++++ sapi/cgi/cgi_main.c
+@@ -2218,7 +2218,7 @@ consult the installation file that came
+ #if ZEND_DEBUG
+ php_printf("PHP %s (%s) (built: %s %s) (DEBUG)\nCopyright (c) 1997-2014 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
+ #else
+- php_printf("PHP %s (%s) (built: %s %s)\nCopyright (c) 1997-2014 The PHP Group\n%s", PHP_VERSION, sapi_module.name, __DATE__, __TIME__, get_zend_version());
++ php_printf("PHP %s (%s)\nCopyright (c) 1997-2014 The PHP Group\n%s", PHP_VERSION, sapi_module.name, get_zend_version());
+ #endif
+ php_request_shutdown((void *) 0);
+ fcgi_shutdown();
|
[-]
[+]
|
Added |
php5-no-reentrant-crypt.patch
^
|
@@ -0,0 +1,13 @@
+Index: ext/standard/crypt.c
+===================================================================
+--- ext/standard/crypt.c
++++ ext/standard/crypt.c
+@@ -302,6 +302,8 @@ PHP_FUNCTION(crypt)
+ RETURN_STRING(crypt_res, 1);
+ }
+ }
++# else
++ RETURN_STRING(crypt(str, salt), 1);
+ # endif
+ #endif
+ }
|
[-]
[+]
|
Added |
php5-openssl.patch
^
|
@@ -0,0 +1,44 @@
+Index: ext/openssl/openssl.c
+===================================================================
+--- ext/openssl/openssl.c.orig
++++ ext/openssl/openssl.c
+@@ -51,6 +51,7 @@
+ #include <openssl/rand.h>
+ #include <openssl/ssl.h>
+ #include <openssl/pkcs12.h>
++#include <openssl/engine.h>
+
+ /* Common */
+ #include <time.h>
+@@ -1015,10 +1016,16 @@ PHP_MINIT_FUNCTION(openssl)
+ le_x509 = zend_register_list_destructors_ex(php_x509_free, NULL, "OpenSSL X.509", module_number);
+ le_csr = zend_register_list_destructors_ex(php_csr_free, NULL, "OpenSSL X.509 CSR", module_number);
+
++ OPENSSL_config(NULL);
+ SSL_library_init();
+ OpenSSL_add_all_ciphers();
+ OpenSSL_add_all_digests();
+ OpenSSL_add_all_algorithms();
++/* Load all bundled ENGINEs into memory and make them visible */
++ ENGINE_load_builtin_engines();
++ /* Register all of them for every algorithm they collectively implement */
++ ENGINE_register_all_complete();
++
+
+ SSL_load_error_strings();
+
+Index: ext/openssl/xp_ssl.c
+===================================================================
+--- ext/openssl/xp_ssl.c.orig
++++ ext/openssl/xp_ssl.c
+@@ -378,6 +378,10 @@ static inline int php_openssl_setup_cryp
+ return -1;
+ }
+
++#ifdef SSL_MODE_RELEASE_BUFFERS
++ SSL_CTX_set_mode(sslsock->ctx, SSL_MODE_RELEASE_BUFFERS);
++#endif
++
+ #if OPENSSL_VERSION_NUMBER >= 0x0090605fL
+ ssl_ctx_options &= ~SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS;
+ #endif
|
[-]
[+]
|
Added |
php5-per-mod-log.patch
^
|
@@ -0,0 +1,20 @@
+commit 59dfd98677886d418bda90ac5291ba8dea638dc7
+Author: Cristian Rodríguez <crrodriguez@opensuse.org>
+Date: Wed Aug 8 21:12:57 2012 +0200
+
+ Fix per-module logging in apache 2.4
+
+--- php-5.4.17.orig/sapi/apache2handler/php_apache.h
++++ php-5.4.17/sapi/apache2handler/php_apache.h
+@@ -24,7 +24,11 @@
+ #include "httpd.h"
+ #include "http_config.h"
+ #include "http_core.h"
++#include "http_log.h"
+
++#ifdef APLOG_USE_MODULE
++APLOG_USE_MODULE(php5);
++#endif
+ /* Declare this so we can get to it from outside the sapi_apache2.c file */
+ extern module AP_MODULE_DECLARE_DATA php5_module;
+
|
[-]
[+]
|
Added |
php5-php-config.patch
^
|
@@ -0,0 +1,17 @@
+---
+ scripts/php-config.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: scripts/php-config.in
+===================================================================
+--- scripts/php-config.in.orig 2007-08-24 13:44:10.000000000 +0200
++++ scripts/php-config.in 2010-08-03 06:31:18.786529000 +0200
+@@ -5,7 +5,7 @@ prefix="@prefix@"
+ exec_prefix="@exec_prefix@"
+ version="@PHP_VERSION@"
+ vernum="@PHP_VERSION_ID@"
+-include_dir="@includedir@/php"
++include_dir="@includedir@/php5"
+ includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM -I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib"
+ ldflags="@PHP_LDFLAGS@"
+ libs="@EXTRA_LIBS@"
|
[-]
[+]
|
Added |
php5-phpize.patch
^
|
@@ -0,0 +1,35 @@
+---
+ scripts/Makefile.frag | 4 ++--
+ scripts/phpize.in | 4 ++--
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+Index: scripts/Makefile.frag
+===================================================================
+--- scripts/Makefile.frag.orig
++++ scripts/Makefile.frag
+@@ -3,8 +3,8 @@
+ # Build environment install
+ #
+
+-phpincludedir = $(includedir)/php
+-phpbuilddir = $(libdir)/build
++phpincludedir = $(includedir)/php5
++phpbuilddir = $(datadir)/build
+
+ BUILD_FILES = \
+ scripts/phpize.m4 \
+Index: scripts/phpize.in
+===================================================================
+--- scripts/phpize.in.orig
++++ scripts/phpize.in
+@@ -4,8 +4,8 @@
+ prefix='@prefix@'
+ datarootdir='@datarootdir@'
+ exec_prefix="`eval echo @exec_prefix@`"
+-phpdir="`eval echo @libdir@`/build"
+-includedir="`eval echo @includedir@`/php"
++phpdir="`eval echo @datadir@`/build"
++includedir="`eval echo @includedir@`/php5"
+ builddir="`pwd`"
+ SED="@SED@"
+
|
[-]
[+]
|
Added |
php5-pts.patch
^
|
@@ -0,0 +1,11 @@
+--- ext/standard/proc_open.c.orig
++++ ext/standard/proc_open.c
+@@ -62,7 +62,7 @@
+ * */
+ #ifdef PHP_CAN_SUPPORT_PROC_OPEN
+
+-#if 0 && HAVE_PTSNAME && HAVE_GRANTPT && HAVE_UNLOCKPT && HAVE_SYS_IOCTL_H && HAVE_TERMIOS_H
++#if HAVE_PTSNAME && HAVE_GRANTPT && HAVE_UNLOCKPT && HAVE_SYS_IOCTL_H && HAVE_TERMIOS_H
+ # include <sys/ioctl.h>
+ # include <termios.h>
+ # define PHP_CAN_DO_PTS 1
|
[-]
[+]
|
Added |
php5-suhosin-php54.patch
^
|
@@ -0,0 +1,714 @@
+diff -x .git -Nur php-suhosin-0.9.33/Changelog suhosin/Changelog
+--- ext/suhosin/Changelog 2012-01-19 16:49:18.000000000 +0100
++++ ext/suhosin/Changelog 2012-05-21 21:54:03.076420909 +0200
+@@ -1,3 +1,11 @@
++2012-02-12 - 0.9.34
++
++ - Added initial support for PHP 5.4.0
++ - Fix include whitelist and blacklist to support shemes with dots in their names
++ - Fix read after efree() that lets function_exists() malfunction
++ - Fix build with clang compiler
++ - Added a request variable drop statistic log message
++
+ 2012-01-19 - 0.9.33
+
+ - Make clear that suhosin is incompatible to mbstring.encoding_translation=On
+diff -x .git -Nur php-suhosin-0.9.33/execute.c suhosin/execute.c
+--- ext/suhosin/execute.c 2012-01-19 16:49:18.000000000 +0100
++++ ext/suhosin/execute.c 2012-05-21 21:28:34.848342088 +0200
+@@ -152,7 +152,7 @@
+ t = h = (h == NULL) ? h2 : ( (h2 == NULL) ? h : ( (h < h2) ? h : h2 ) );
+ if (h == NULL) break;
+
+- while (t > s && (isalnum(t[-1]) || t[-1]=='_')) {
++ while (t > s && (isalnum(t[-1]) || t[-1]=='_' || t[-1]=='.')) {
+ t--;
+ }
+
+@@ -195,7 +195,7 @@
+ t = h = (h == NULL) ? h2 : ( (h2 == NULL) ? h : ( (h < h2) ? h : h2 ) );
+ if (h == NULL) break;
+
+- while (t > s && (isalnum(t[-1]) || t[-1]=='_')) {
++ while (t > s && (isalnum(t[-1]) || t[-1]=='_' || t[-1]=='.')) {
+ t--;
+ }
+
+@@ -364,6 +364,15 @@
+ zend_uint orig_code_type;
+ unsigned long *suhosin_flags = NULL;
+
++ /* log variable dropping statistics */
++ if (SUHOSIN_G(abort_request) && (SUHOSIN_G(att_request_variables)-SUHOSIN_G(cur_request_variables) > 0)) {
++ suhosin_log(S_VARS, "dropped %u request variables - (%u in GET, %u in POST, %u in COOKIE)",
++ SUHOSIN_G(att_request_variables)-SUHOSIN_G(cur_request_variables),
++ SUHOSIN_G(att_get_vars)-SUHOSIN_G(cur_get_vars),
++ SUHOSIN_G(att_post_vars)-SUHOSIN_G(cur_post_vars),
++ SUHOSIN_G(att_cookie_vars)-SUHOSIN_G(cur_cookie_vars));
++ }
++
+ if (SUHOSIN_G(abort_request) && !SUHOSIN_G(simulation) && SUHOSIN_G(filter_action)) {
+
+ char *action = SUHOSIN_G(filter_action);
+@@ -1022,50 +1031,6 @@
+ return (0);
+ }
+
+-static int suhosin_php_body_write(const char *str, uint str_length TSRMLS_DC)
+-{
+-#define P_META_ROBOTS "<meta name=\"ROBOTS\" content=\"NOINDEX,NOFOLLOW,NOARCHIVE\" />"
+-#define S_META_ROBOTS "<meta name=\"ROBOTS\" content=\"NOINDEX,FOLLOW,NOARCHIVE\" />"
+-
+- SDEBUG("bw: %s", str);
+-
+- if ((str_length == sizeof("</head>\n")-1) && (strcmp(str, "</head>\n")==0)) {
+- SUHOSIN_G(old_php_body_write)(S_META_ROBOTS, sizeof(S_META_ROBOTS)-1 TSRMLS_CC);
+- OG(php_body_write) = SUHOSIN_G(old_php_body_write);
+- return SUHOSIN_G(old_php_body_write)(str, str_length TSRMLS_CC);
+- } else if ((str_length == sizeof(P_META_ROBOTS)-1) && (strcmp(str, P_META_ROBOTS)==0)) {
+- return str_length;
+- }
+- return SUHOSIN_G(old_php_body_write)(str, str_length TSRMLS_CC);
+-}
+-
+-static int ih_phpinfo(IH_HANDLER_PARAMS)
+-{
+- int argc = ZEND_NUM_ARGS();
+- long flag;
+-
+- if (zend_parse_parameters(argc TSRMLS_CC, "|l", &flag) == FAILURE) {
+- RETVAL_FALSE;
+- return (1);
+- }
+-
+- if(!argc) {
+- flag = PHP_INFO_ALL;
+- }
+-
+- /* Andale! Andale! Yee-Hah! */
+- php_start_ob_buffer(NULL, 4096, 0 TSRMLS_CC);
+- if (!sapi_module.phpinfo_as_text) {
+- SUHOSIN_G(old_php_body_write) = OG(php_body_write);
+- OG(php_body_write) = suhosin_php_body_write;
+- }
+- php_print_info(flag TSRMLS_CC);
+- php_end_ob_buffer(1, 0 TSRMLS_CC);
+-
+- RETVAL_TRUE;
+- return (1);
+-}
+-
+
+ static int ih_function_exists(IH_HANDLER_PARAMS)
+ {
+@@ -1087,11 +1052,11 @@
+ zend_str_tolower(lcname, func_name_len);
+ #else
+ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &lcname, &func_name_len) == FAILURE) {
+- return;
++ return (1);
+ }
+
+ /* Ignore leading "\" */
+- if (lcname[0] == '\\') {
++ if (func_name_len > 0 && lcname[0] == '\\') {
+ lcname = &lcname[1];
+ func_name_len--;
+ }
+@@ -1100,8 +1065,6 @@
+
+ retval = (zend_hash_find(EG(function_table), lcname, func_name_len+1, (void **)&func) == SUCCESS);
+
+- efree(lcname);
+-
+ /*
+ * A bit of a hack, but not a bad one: we see if the handler of the function
+ * is actually one that displays "function is disabled" message.
+@@ -1134,6 +1097,8 @@
+ }
+ }
+
++ efree(lcname);
++
+ RETVAL_BOOL(retval);
+ return (1);
+ }
+@@ -1344,7 +1309,7 @@
+
+ suhosin_SHA256Init(&context);
+ suhosin_SHA256Update(&context, (void *) seedbuf, sizeof(php_uint32) * 8);
+- suhosin_SHA256Final(seedbuf, &context);
++ suhosin_SHA256Final((void *)seedbuf, &context);
+ }
+ /* }}} */
+
+@@ -1501,7 +1466,7 @@
+ {
+ #ifdef PHP_ATLEAST_5_3
+ if (zend_parse_parameters_none() == FAILURE) {
+- return;
++ return(0);
+ }
+ #else
+ int argc = ZEND_NUM_ARGS();
+@@ -1518,7 +1483,6 @@
+ { "preg_replace", ih_preg_replace, NULL, NULL, NULL },
+ { "mail", ih_mail, NULL, NULL, NULL },
+ { "symlink", ih_symlink, NULL, NULL, NULL },
+- { "phpinfo", ih_phpinfo, NULL, NULL, NULL },
+
+ { "srand", ih_srand, NULL, NULL, NULL },
+ { "mt_srand", ih_mt_srand, NULL, NULL, NULL },
+@@ -1606,7 +1570,11 @@
+ }
+
+ #ifdef ZEND_ENGINE_2
++# if PHP_VERSION_ID < 50400
+ return_value = (*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.u.var)).var.ptr;
++# else
++ return_value = (*(temp_variable *)((char *) execute_data_ptr->Ts + execute_data_ptr->opline->result.var)).var.ptr;
++# endif
+ #else
+ return_value = execute_data_ptr->Ts[execute_data_ptr->opline->result.u.var].var.ptr;
+ #endif
+diff -x .git -Nur php-suhosin-0.9.33/ex_imp.c suhosin/ex_imp.c
+--- ext/suhosin//ex_imp.c 2012-01-19 16:49:18.000000000 +0100
++++ ext/suhosin/ex_imp.c 2012-05-21 21:28:34.844342088 +0200
+@@ -727,14 +727,13 @@
+
+ /* {{{ suhosin_ex_imp_functions[]
+ */
+-function_entry suhosin_ex_imp_functions[] = {
++zend_function_entry suhosin_ex_imp_functions[] = {
+ PHP_NAMED_FE(extract, PHP_FN(suhosin_extract), suhosin_arginfo_extract)
+ PHP_NAMED_FE(import_request_variables, PHP_FN(suhosin_import_request_variables), suhosin_arginfo_import_request_variables)
+ {NULL, NULL, NULL}
+ };
+ /* }}} */
+
+-
+ void suhosin_hook_ex_imp()
+ {
+ TSRMLS_FETCH();
+diff -x .git -Nur php-suhosin-0.9.33/ifilter.c suhosin/ifilter.c
+--- ext/suhosin/ifilter.c 2012-01-19 16:49:18.000000000 +0100
++++ ext/suhosin/ifilter.c 2012-05-21 21:28:34.848342088 +0200
+@@ -146,7 +146,7 @@
+ if (zend_hash_find(arr, key, klen, (void **) &tzval) == SUCCESS &&
+ Z_TYPE_PP(tzval) == IS_STRING) {
+
|
[-]
[+]
|
Added |
php5-systzdata-v7.patch
^
|
@@ -0,0 +1,619 @@
+
+Add support for use of the system timezone database, rather
+than embedding a copy. Discussed upstream but was not desired.
+
+History:
+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
+
+Index: ext/date/lib/parse_tz.c
+===================================================================
+--- ext/date/lib/parse_tz.c.orig 2010-01-03 10:23:27.000000000 +0100
++++ ext/date/lib/parse_tz.c 2010-08-03 06:31:19.092553000 +0200
+@@ -20,6 +20,16 @@
+
+ #include "timelib.h"
+
++#ifdef HAVE_SYSTEM_TZDATA
++#include <sys/mman.h>
++#include <sys/stat.h>
++#include <limits.h>
++#include <fcntl.h>
++#include <unistd.h>
++
++#include "php_scandir.h"
++#endif
++
+ #include <stdio.h>
+
+ #ifdef HAVE_LOCALE_H
+@@ -31,7 +41,12 @@
+ #else
+ #include <strings.h>
+ #endif
++
++#ifndef HAVE_SYSTEM_TZDATA
+ #include "timezonedb.h"
++#endif
++
++#include <ctype.h>
+
+ #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;
+@@ -253,7 +273,397 @@ void timelib_dump_tzinfo(timelib_tzinfo
+ }
+ }
+
+-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 = NULL;
++
++/* 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)
++
++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') {
++ 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))
|
[-]
[+]
|
Added |
README.SUSE-pear
^
|
@@ -0,0 +1,12 @@
+Package php5-pear does not include Pear DB support
+==================================================
+
+Php5-pear package comes without Pear DB database
+support, which was obsoleted by MDB2.
+
+If you need Pear DB, please install it with:
+#pear install --onlyreqdeps DB
+
+This is the case of Squirrelmail which requires
+Pear DB support. More information can be found
+at bugzilla.novell.com, bug #178982.
|
[-]
[+]
|
Added |
README.macros
^
|
@@ -0,0 +1,101 @@
+README for php-macros
+
+Author: Christian Wittmer <chris@computersalat.de>
+
+
+%php_gen_filelist generates an rpmlint happy filelist of your installed files
+
+In most cases you only need to check the %doc part
+sometimes there is a "Changes" or "ChangeLog",....
+
+Requirements for %php_gen_filelist
+You have to define following parts inside your spec file
+
+Example:
+
+Name: php5-pear-Date
+%define pear_name Date
+%define pear_sname date
+
+BuildRequires: php-macros
+Provides: php-pear-%{pear_name} pear-%{pear_name}
+# Fix for renaming (package convention)
+Provides: php5-pear-%{pear_sname} = %{version}
+Provides: php-pear-%{pear_sname} = %{version}
+Provides: pear-%{pear_sname} = %{version}
+Obsoletes: php5-pear-%{pear_sname} < %{version}
+Obsoletes: php-pear-%{pear_sname} < %{version}
+Obsoletes: pear-%{pear_sname} < %{version}
+
+%install
+%{__mv} package*.xml %{pear_name}-%{version}
+cd %{pear_name}-%{version}
+PHP_PEAR_PHP_BIN="$(which php) -d memory_limit=50m"
+%{__pear} -v \
+ -d doc_dir=/doc \
+ -d bin_dir=%{_bindir} \
+ -d data_dir=%{peardir}/data \
+ install --offline --nodeps -R "$RPM_BUILD_ROOT" package.xml
+
+%{__install} -D -m 0644 package.xml $RPM_BUILD_ROOT%{php_pearxmldir}/%{pear_name}.xml
+
+%{__rm} -rf $RPM_BUILD_ROOT/{doc,tmp}
+%{__rm} -rf "$RPM_BUILD_ROOT"/%{peardir}/.{filemap,lock,registry,channels,depdb,depdblock}
+
+%php_gen_filelist
+
+%post
+# on `rpm -ivh` PARAM is 1
+# on `rpm -Uvh` PARAM is 2
+if [ "$1" = "1" ]; then
+ %{__pear} install --nodeps --soft --force --register-only %{php_pearxmldir}/%{pear_name}.xml
+fi
+if [ "$1" = "2" ]; then
+ %{__pear} upgrade --offline --register-only %{php_pearxmldir}/%{pear_name}.xml
+fi
+
+%postun
+# on `rpm -e` PARAM is 0
+if [ "$1" = "0" ]; then
+ %{__pear} uninstall --nodeps --ignore-errors --register-only pear.php.net/%{pear_name}
+fi
+
+%clean
+%{__rm} -rf %{buildroot}
+
+%files -f %{name}.files
+%defattr(-,root,root)
+%doc Changes README
+
+%changelog
+
+#############################################################################
+
+And here an Example of the generated filelist:
+
+/usr/share/php5/PEAR/Date.php
+%dir /usr/share/php5/PEAR/Date
+/usr/share/php5/PEAR/Date/Calc.php
+/usr/share/php5/PEAR/Date/Human.php
+/usr/share/php5/PEAR/Date/Span.php
+/usr/share/php5/PEAR/Date/TimeZone.php
+%dir /usr/share/php5/PEAR/test
+%dir /usr/share/php5/PEAR/test/Date
+%dir /usr/share/php5/PEAR/test/Date/tests
+/usr/share/php5/PEAR/test/Date/tests/test_date_methods_span.php
+/usr/share/php5/PEAR/test/Date/tests/testunit_date_span.php
+/usr/share/php5/PEAR/test/Date/tests/test_calc.php
+/usr/share/php5/PEAR/test/Date/tests/calc.php
+/usr/share/php5/PEAR/test/Date/tests/testunit_date.php
+/usr/share/php5/PEAR/test/Date/tests/testunit.php
+%dir /usr/share/php5/PEAR/test/Date/tests/bugs
+/usr/share/php5/PEAR/test/Date/tests/bugs/bug-727-1.phpt
+/usr/share/php5/PEAR/test/Date/tests/bugs/bug-727-2.phpt
+/usr/share/php5/PEAR/test/Date/tests/bugs/bug-727-3.phpt
+/usr/share/php5/PEAR/test/Date/tests/bugs/bug-727-4.phpt
+/usr/share/php5/PEAR/test/Date/tests/bugs/bug-674.phpt
+/usr/share/php5/PEAR/test/Date/tests/bugs/bug-9213.phpt
+/usr/share/php5/PEAR/test/Date/tests/bugs/bug-9414.phpt
+/usr/share/php5/PEAR/test/Date/tests/bugs/bug-8912.phpt
+/usr/share/php5/PEAR/test/Date/tests/bugs/bug-967.phpt
+/var/lib/pear/Date.xml
|
[-]
[+]
|
Added |
install-pear-nozlib.phar
^
|
@@ -0,0 +1,110333 @@
+<?php
+error_reporting(1803);
+if (function_exists('mb_internal_encoding')) {
+ mb_internal_encoding('ASCII');
+}
+if (!class_exists('PHP_Archive')) {/**
+ * PHP_Archive Class (implements .phar)
+ *
+ * @package PHP_Archive
+ * @category PHP
+ */
+/**
+ * PHP_Archive Class (implements .phar)
+ *
+ * PHAR files a singular archive from which an entire application can run.
+ * To use it, simply package it using {@see PHP_Archive_Creator} and use phar://
+ * URIs to your includes. i.e. require_once 'phar://config.php' will include config.php
+ * from the root of the PHAR file.
+ *
+ * Gz code borrowed from the excellent File_Archive package by Vincent Lascaux.
+ *
+ * @copyright Copyright David Shafik and Synaptic Media 2004. All rights reserved.
+ * @author Davey Shafik <davey@synapticmedia.net>
+ * @author Greg Beaver <cellog@php.net>
+ * @link http://www.synapticmedia.net Synaptic Media
+ * @version Id: Archive.php,v 1.52 2007/09/01 20:28:14 cellog Exp $
+ * @package PHP_Archive
+ * @category PHP
+ */
+
+class PHP_Archive
+{
+ const GZ = 0x00001000;
+ const BZ2 = 0x00002000;
+ const SIG = 0x00010000;
+ const SHA1 = 0x0002;
+ const MD5 = 0x0001;
+ /**
+ * Whether this archive is compressed with zlib
+ *
+ * @var bool
+ */
+ private $_compressed;
+ /**
+ * @var string Real path to the .phar archive
+ */
+ private $_archiveName = null;
+ /**
+ * Current file name in the phar
+ * @var string
+ */
+ protected $currentFilename = null;
+ /**
+ * Length of current file in the phar
+ * @var string
+ */
+ protected $internalFileLength = null;
+ /**
+ * Current file statistics (size, creation date, etc.)
+ * @var string
+ */
+ protected $currentStat = null;
+ /**
+ * @var resource|null Pointer to open .phar
+ */
+ protected $fp = null;
+ /**
+ * @var int Current Position of the pointer
+ */
+ protected $position = 0;
+
+ /**
+ * Map actual realpath of phars to meta-data about the phar
+ *
+ * Data is indexed by the alias that is used by internal files. In other
+ * words, if a file is included via:
+ * <code>
+ * require_once 'phar://PEAR.phar/PEAR/Installer.php';
+ * </code>
+ * then the alias is "PEAR.phar"
+ *
+ * Information stored is a boolean indicating whether this .phar is compressed
+ * with zlib, another for bzip2, phar-specific meta-data, and
+ * the precise offset of internal files
+ * within the .phar, used with the {@link $_manifest} to load actual file contents
+ * @var array
+ */
+ private static $_pharMapping = array();
+ /**
+ * Map real file paths to alias used
+ *
+ * @var array
+ */
+ private static $_pharFiles = array();
+ /**
+ * File listing for the .phar
+ *
+ * The manifest is indexed per phar.
+ *
+ * Files within the .phar are indexed by their relative path within the
+ * .phar. Each file has this information in its internal array
+ *
+ * - 0 = uncompressed file size
+ * - 1 = timestamp of when file was added to phar
+ * - 2 = offset of file within phar relative to internal file's start
+ * - 3 = compressed file size (actual size in the phar)
+ * @var array
+ */
+ private static $_manifest = array();
+ /**
+ * Absolute offset of internal files within the .phar, indexed by absolute
+ * path to the .phar
+ *
+ * @var array
+ */
+ private static $_fileStart = array();
+ /**
+ * file name of the phar
+ *
+ * @var string
+ */
+ private $_basename;
+
+
+ /**
+ * Default MIME types used for the web front controller
+ *
+ * @var array
+ */
+ public static $defaultmimes = array(
+ 'aif' => 'audio/x-aiff',
+ 'aiff' => 'audio/x-aiff',
+ 'arc' => 'application/octet-stream',
+ 'arj' => 'application/octet-stream',
+ 'art' => 'image/x-jg',
+ 'asf' => 'video/x-ms-asf',
+ 'asx' => 'video/x-ms-asf',
+ 'avi' => 'video/avi',
+ 'bin' => 'application/octet-stream',
+ 'bm' => 'image/bmp',
+ 'bmp' => 'image/bmp',
+ 'bz2' => 'application/x-bzip2',
+ 'css' => 'text/css',
+ 'doc' => 'application/msword',
+ 'dot' => 'application/msword',
+ 'dv' => 'video/x-dv',
+ 'dvi' => 'application/x-dvi',
+ 'eps' => 'application/postscript',
+ 'exe' => 'application/octet-stream',
+ 'gif' => 'image/gif',
+ 'gz' => 'application/x-gzip',
+ 'gzip' => 'application/x-gzip',
+ 'htm' => 'text/html',
+ 'html' => 'text/html',
+ 'ico' => 'image/x-icon',
+ 'jpe' => 'image/jpeg',
+ 'jpg' => 'image/jpeg',
+ 'jpeg' => 'image/jpeg',
+ 'js' => 'application/x-javascript',
+ 'log' => 'text/plain',
+ 'mid' => 'audio/x-midi',
+ 'mov' => 'video/quicktime',
+ 'mp2' => 'audio/mpeg',
+ 'mp3' => 'audio/mpeg3',
+ 'mpg' => 'audio/mpeg',
+ 'pdf' => 'aplication/pdf',
+ 'png' => 'image/png',
+ 'rtf' => 'application/rtf',
+ 'tif' => 'image/tiff',
+ 'tiff' => 'image/tiff',
+ 'txt' => 'text/plain',
+ 'xml' => 'text/xml',
+ );
+
+ public static $defaultphp = array(
+ 'php' => true
+ );
+
+ public static $defaultphps = array(
+ 'phps' => true
+ );
+
+ public static $deny = array('/.+\.inc$/');
+
+ public static function viewSource($archive, $file)
+ {
+ // security, idea borrowed from PHK
+ if (!file_exists($archive . '.introspect')) {
+ header("HTTP/1.0 404 Not Found");
+ return false;
+ }
+ if (self::_fileExists($archive, $_GET['viewsource'])) {
+ $source = highlight_file('phar://install-pear-nozlib.phar/' .
+ $_GET['viewsource'], true);
+ header('Content-Type: text/html');
+ header('Content-Length: ' . strlen($source));
+ echo '<html><head><title>Source of ',
+ htmlspecialchars($_GET['viewsource']), '</title></head>';
+ echo '<body><h1>Source of ',
|
[-]
[+]
|
Added |
macros.php
^
|
@@ -0,0 +1,75 @@
+# macros.php file
+# macros for module building. handle with care.
+
+#
+# Interface versions exposed by PHP:
+#
+%php_core_api @PHP_APIVER@
+%php_zend_api @PHP_ZENDVER@
+
+# Useful php macros (from Christian Wittmer <chris@computersalat.de>)
+#
+%__php /usr/bin/php
+%__phpize /usr/bin/phpize
+%__php_config /usr/bin/php-config
+%php_version %(%{__php_config} --version)
+#
+%__pear /usr/bin/pear
+%php_peardir %(%{__pear} config-get php_dir)
+%php_pearxmldir /var/lib/pear
+
+# macro: php_pear_gen_filelist
+# do the rpmlint happy filelist generation
+# with %dir in front of directories
+%php_pear_gen_filelist(n)\
+FILES=%{name}.files\
+# fgen_dir func\
+# IN: dir\
+fgen_dir(){\
+%{__cat} >> $FILES << EOF\
+%dir ${1}\
+EOF\
+}\
+# fgen_file func\
+# IN: file\
+fgen_file(){\
+%{__cat} >> $FILES << EOF\
+${1}\
+EOF\
+}\
+# check for files in %{php_peardir}\
+RES=`find ${RPM_BUILD_ROOT}%{php_peardir} -maxdepth 1 -type f`\
+if [ -n "$RES" ]; then\
+ for file in $RES; do\
+ fgen_file "%{php_peardir}/$(basename ${file})"\
+ done\
+fi\
+\
+# get all dirs into array\
+base_dir="${RPM_BUILD_ROOT}%{php_peardir}/"\
+for dir in `find ${base_dir} -type d | sort`; do\
+ if [ "$dir" = "${base_dir}" ]; then\
+ continue\
+ else\
+ el=`echo $dir | %{__awk} -F"${base_dir}" '{print $2}'`\
+ all_dir=(${all_dir[@]} $el)\
+ fi\
+done\
+\
+# build filelist\
+for i in ${all_dir[@]}; do\
+ if [ -d ${base_dir}/${i} ]; then\
+ RES=`find "${base_dir}/${i}" -maxdepth 1 -type f`\
+ if [ -n "$RES" ]; then\
+ fgen_dir "%{php_peardir}/${i}"\
+ for file in $RES; do\
+ fgen_file "%{php_peardir}/${i}/$(basename ${file})"\
+ done\
+ else\
+ fgen_dir "%{php_peardir}/${i}"\
+ fi\
+ fi\
+done\
+# add xml file\
+fgen_file "%php_pearxmldir/%{pear_name}.xml"\
+#
|
[-]
[+]
|
Added |
php-fpm.init
^
|
@@ -0,0 +1,267 @@
+#!/bin/sh
+#
+# Template SUSE system startup script for example service/daemon php-fpm
+# Copyright (C) 1995--2005 Kurt Garloff, SUSE / Novell Inc.
+#
+# This library is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# This library is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
+# USA.
+#
+# /etc/init.d/php-fpm
+# and its symbolic link
+# /(usr/)sbin/rcphp-fpm
+#
+# Template system startup script for some example service/daemon php-fpm
+#
+# LSB compatible service control script; see http://www.linuxbase.org/spec/
+#
+# Note: This template uses functions rc_XXX defined in /etc/rc.status on
+# UnitedLinux/SUSE/Novell based Linux distributions. If you want to base your
+# script on this template and ensure that it works on non UL based LSB
+# compliant Linux distributions, you either have to provide the rc.status
+# functions from UL or change the script to work without them.
+# See skeleton.compat for a template that works with other distros as well.
+#
+### BEGIN INIT INFO
+# Provides: php-fpm
+# Required-Start: $remote_fs $network
+# Should-Start: nginx lighttpd httpd
+# Required-Stop: $network $remote_fs
+# Should-Stop: nginx lighttpd httpd
+# Default-Start: 3 5
+# Default-Stop: 0 1 2 6
+# Short-Description: php-fpm daemon
+# Description: Start php-fpm to
+# continued on second line by '#<TAB>'
+# should contain enough info for the runlevel editor
+# to give admin some idea what this service does and
+# what it's needed for ...
+# (The Short-Description should already be a good hint.)
+### END INIT INFO
+#
+# Any extensions to the keywords given above should be preceeded by
+# X-VendorTag- (X-UnitedLinux- X-SuSE- for us) according to LSB.
+#
+# Notes on Required-Start/Should-Start:
+# * There are two different issues that are solved by Required-Start
+# and Should-Start
+# (a) Hard dependencies: This is used by the runlevel editor to determine
+# which services absolutely need to be started to make the start of
+# this service make sense. Example: nfsserver should have
+# Required-Start: $portmap
+# Also, required services are started before the dependent ones.
+# The runlevel editor will warn about such missing hard dependencies
+# and suggest enabling. During system startup, you may expect an error,
+# if the dependency is not fulfilled.
+# (b) Specifying the init script ordering, not real (hard) dependencies.
+# This is needed by insserv to determine which service should be
+# started first (and at a later stage what services can be started
+# in parallel). The tag Should-Start: is used for this.
+# It tells, that if a service is available, it should be started
+# before. If not, never mind.
+# * When specifying hard dependencies or ordering requirements, you can
+# use names of services (contents of their Provides: section)
+# or pseudo names starting with a $. The following ones are available
+# according to LSB (1.1):
+# $local_fs all local file systems are mounted
+# (most services should need this!)
+# $remote_fs all remote file systems are mounted
+# (note that /usr may be remote, so
+# many services should Require this!)
+# $syslog system logging facility up
+# $network low level networking (eth card, ...)
+# $named hostname resolution available
+# $netdaemons all network daemons are running
+# The $netdaemons pseudo service has been removed in LSB 1.2.
+# For now, we still offer it for backward compatibility.
+# These are new (LSB 1.2):
+# $time the system time has been set correctly
+# $portmap SunRPC portmapping service available
+# UnitedLinux extensions:
+# $ALL indicates that a script should be inserted
+# at the end
+# * The services specified in the stop tags
+# (Required-Stop/Should-Stop)
+# specify which services need to be still running when this service
+# is shut down. Often the entries there are just copies or a subset
+# from the respective start tag.
+# * Should-Start/Stop are now part of LSB as of 2.0,
+# formerly SUSE/Unitedlinux used X-UnitedLinux-Should-Start/-Stop.
+# insserv does support both variants.
+# * X-UnitedLinux-Default-Enabled: yes/no is used at installation time
+# (%fillup_and_insserv macro in %post of many RPMs) to specify whether
+# a startup script should default to be enabled after installation.
+# It's not used by insserv.
+#
+# Note on runlevels:
+# 0 - halt/poweroff 6 - reboot
+# 1 - single user 2 - multiuser without network exported
+# 3 - multiuser w/ network (text mode) 5 - multiuser w/ network and X11 (xdm)
+#
+# Note on script names:
+# http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html
+# A registry has been set up to manage the init script namespace.
+# http://www.lanana.org/
+# Please use the names already registered or register one or use a
+# vendor prefix.
+
+
+# Check for missing binaries (stale symlinks should not happen)
+# Note: Special treatment of stop for LSB conformance
+PHPFPM_BIN=/usr/sbin/php-fpm
+test -x $PHPFPM_BIN || { echo "$PHPFPM_BIN not installed";
+ if [ "$1" = "stop" ]; then exit 0;
+ else exit 5; fi; }
+
+FPM_CONFIG="--fpm-config /etc/php5/fpm/php-fpm.conf"
+
+# Source LSB init functions
+# providing start_daemon, killproc, pidofproc,
+# log_success_msg, log_failure_msg and log_warning_msg.
+# This is currently not used by UnitedLinux based distributions and
+# not needed for init scripts for UnitedLinux only. If it is used,
+# the functions from rc.status should not be sourced or used.
+#. /lib/lsb/init-functions
+
+# Shell functions sourced from /etc/rc.status:
+# rc_check check and set local and overall rc status
+# rc_status check and set local and overall rc status
+# rc_status -v be verbose in local rc status and clear it afterwards
+# rc_status -v -r ditto and clear both the local and overall rc status
+# rc_status -s display "skipped" and exit with status 3
+# rc_status -u display "unused" and exit with status 3
+# rc_failed set local and overall rc status to failed
+# rc_failed <num> set local and overall rc status to <num>
+# rc_reset clear both the local and overall rc status
+# rc_exit exit appropriate to overall rc status
+# rc_active checks whether a service is activated by symlinks
+. /etc/rc.status
+
+# Reset status of this service
+rc_reset
+
+# Return values acc. to LSB for all commands but status:
+# 0 - success
+# 1 - generic or unspecified error
+# 2 - invalid or excess argument(s)
+# 3 - unimplemented feature (e.g. "reload")
+# 4 - user had insufficient privileges
+# 5 - program is not installed
+# 6 - program is not configured
+# 7 - program is not running
+# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
+#
+# Note that starting an already running service, stopping
+# or restarting a not-running service as well as the restart
+# with force-reload (in case signaling is not supported) are
+# considered a success.
+
+case "$1" in
+ start)
+ echo -n "Starting php-fpm"
+ ## Start daemon with startproc(8). If this fails
+ ## the return value is set appropriately by startproc.
+ /sbin/startproc $PHPFPM_BIN $FPM_CONFIG
+
+ # Remember status and be verbose
+ rc_status -v
+ ;;
+ stop)
+ echo -n "Shutting down php-fpm "
+ ## Stop daemon with killproc(8) and if this fails
+ ## killproc sets the return value according to LSB.
+
+ /sbin/killproc -QUIT $PHPFPM_BIN
+
+ # Remember status and be verbose
+ rc_status -v
+ ;;
+ try-restart|condrestart)
+ ## Do a restart only if the service was active before.
+ ## Note: try-restart is now part of LSB (as of 1.9).
+ ## RH has a similar command named condrestart.
+ if test "$1" = "condrestart"; then
+ echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
+ fi
+ $0 status
+ if test $? = 0; then
+ $0 restart
|
|
Added |
php-suse-addons.tar.bz2
^
|
|
Added |
suhosin-0.9.33.tgz
^
|