Forráskód Böngészése

new package: apache-php4 1.3.37 (Apache HTTP Server providing optional PHP4 support (legacy))

Christoph Schug 19 éve
szülő
commit
d223032424

+ 116 - 0
apache-php4/apache-php4.patch

@@ -0,0 +1,116 @@
+Index: apache_1.3.37/conf/mime.types
+--- apache_1.3.37/conf/mime.types.orig	2004-11-24 20:10:19 +0100
++++ apache_1.3.37/conf/mime.types	2006-09-10 14:51:11 +0200
+@@ -265,6 +265,22 @@
+ application/vnd.novadigm.edm
+ application/vnd.novadigm.edx
+ application/vnd.novadigm.ext
++application/vnd.oasis.opendocument.text odt
++application/vnd.oasis.opendocument.spreadsheet ods
++application/vnd.oasis.opendocument.presentation odp
++application/vnd.oasis.opendocument.graphics odg
++application/vnd.oasis.opendocument.chart odc
++application/vnd.oasis.opendocument.formula odf
++application/vnd.oasis.opendocument.image odi
++application/vnd.oasis.opendocument.text-template ott
++application/vnd.oasis.opendocument.spreadsheet-template ots
++application/vnd.oasis.opendocument.presentation-template otp
++application/vnd.oasis.opendocument.graphics-template otg
++application/vnd.oasis.opendocument.chart-template otc
++application/vnd.oasis.opendocument.formula-template oft
++application/vnd.oasis.opendocument.image-template oti
++application/vnd.oasis.opendocument.text-master odm
++application/vnd.oasis.opendocument.text-web oth
+ application/vnd.obn
+ application/vnd.osa.netdeploy
+ application/vnd.palm
+Index: apache_1.3.37/configure
+--- apache_1.3.37/configure.orig	2006-07-12 10:16:05 +0200
++++ apache_1.3.37/configure	2006-09-10 14:49:50 +0200
+@@ -1175,10 +1175,10 @@
+ ##   or we cannot support the case where the relative
+ ##   path is just the emtpy one, i.e. ""]
+ ##
+-runtimedir_relative=`echo $runtimedir | sed -e "s:^$prefix/*::" -e 's:\(.\)$:\1/:'`
+-logfiledir_relative=`echo $logfiledir | sed -e "s:^$prefix/*::" -e 's:\(.\)$:\1/:'`
+-sysconfdir_relative=`echo $sysconfdir | sed -e "s:^$prefix/*::" -e 's:\(.\)$:\1/:'`
+-libexecdir_relative=`echo $libexecdir | sed -e "s:^$prefix/*::" -e 's:\(.\)$:\1/:'`
++runtimedir_relative="$runtimedir/"
++logfiledir_relative="$logfiledir/"
++sysconfdir_relative="$sysconfdir/"
++libexecdir_relative="$libexecdir/"
+ 
+ ##
+ ##  check and debug
+Index: apache_1.3.37/src/Configure
+--- apache_1.3.37/src/Configure.orig	2006-07-12 10:16:05 +0200
++++ apache_1.3.37/src/Configure	2006-09-10 14:49:50 +0200
+@@ -1158,14 +1158,20 @@
+ 	    SHLIB_SUFFIX_DEPTH=0
+ 	    ;;
+ 	*-solaris2*)
+-	    if [ "x`$CC -v 2>&1 | grep gcc`" != "x" ]; then
+-	        CFLAGS_SHLIB="-fPIC"
+-	    else
+-	        CFLAGS_SHLIB="-KPIC"
+-	    fi
++	    CFLAGS_SHLIB="-KPIC"
+ 	    LDFLAGS_SHLIB="-G"
+-	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
+ 	    LDFLAGS_SHLIB_EXPORT=""
++	    for word in `$CC -v 2>&1` ; do
++            case $word in 
++            --with-gnu-ld)
++                LDFLAGS_SHLIB="-shared"
++                ;;
++            *gcc*)
++                CFLAGS_SHLIB="-fPIC"
++                ;;
++            esac
++        done
++	    LDFLAGS_MOD_SHLIB=$LDFLAGS_SHLIB
+ 	    SHLIB_SUFFIX_DEPTH=1
+ 	    ;;
+ 	*-sunos4*)
+@@ -1874,27 +1880,12 @@
+ # set the default, based on whether expat-lite is bundled. if it is present,
+ # then we can always include expat.
+ if [ "x$RULE_EXPAT" = "xdefault" ]; then
+-    if [ -d ./lib/expat-lite/ ]; then
+-        RULE_EXPAT=yes
+-    else
+-        RULE_EXPAT=no
+-    fi
++    RULE_EXPAT=no
+ fi
+ 
+ if [ "x$RULE_EXPAT" = "xyes" ]; then
+-    if ./helpers/TestCompile lib expat; then
+-        echo " + using system Expat"
+-        LIBS="$LIBS -lexpat"
+-    else
+-        if [ ! -d ./lib/expat-lite/ ]; then
+-            echo "ERROR: RULE_EXPAT set to \"yes\" but is not available."
+-	    exit 1
+-        fi
+-        echo " + using builtin Expat"
+-        EXPATLIB="lib/expat-lite/libexpat.a"
+-        APLIBDIRS="expat-lite $APLIBDIRS"
+-        CFLAGS="$CFLAGS -DUSE_EXPAT -I\$(SRCDIR)/lib/expat-lite"
+-    fi
++    echo " + using system Expat"
++    LIBS="$LIBS -lexpat"
+ fi
+ 
+ ####################################################################
+Index: apache_1.3.37/src/main/util_script.c
+--- apache_1.3.37/src/main/util_script.c.orig	2006-07-12 10:16:05 +0200
++++ apache_1.3.37/src/main/util_script.c	2006-09-10 14:49:50 +0200
+@@ -204,6 +204,7 @@
+ 	}
+     }
+ 
++    if (!(env_path = ap_pstrdup(r->pool, ap_table_get(r->subprocess_env, "PATH"))))
+     if (!(env_path = ap_pstrdup(r->pool, getenv("PATH")))) {
+ 	env_path = DEFAULT_PATH;
+     }

+ 103 - 0
apache-php4/apache-php4.patch.modauthkerb

@@ -0,0 +1,103 @@
+Index: Makefile.libdir
+--- /dev/null	2007-01-20 15:04:24 +0100
++++ Makefile.libdir	2007-01-20 15:03:31 +0100
+@@ -0,0 +1 @@
++mod_auth_kerb
+Index: Makefile.tmpl
+--- /dev/null	2007-01-20 15:04:24 +0100
++++ Makefile.tmpl	2007-01-20 15:03:31 +0100
+@@ -0,0 +1,46 @@
++
++LIB=libmod_auth_kerb.$(LIBEXT)
++
++OBJS=src/mod_auth_kerb.o \
++     spnegokrb5/asn1_MechType.o \
++     spnegokrb5/asn1_MechTypeList.o \
++     spnegokrb5/asn1_ContextFlags.o \
++     spnegokrb5/asn1_NegTokenInit.o \
++     spnegokrb5/asn1_NegTokenTarg.o \
++     spnegokrb5/der_get.o \
++     spnegokrb5/der_put.o \
++     spnegokrb5/der_free.o \
++     spnegokrb5/der_length.o \
++     spnegokrb5/der_copy.o \
++     spnegokrb5/timegm.o \
++     spnegokrb5/init_sec_context.o \
++     spnegokrb5/accept_sec_context.o \
++     spnegokrb5/encapsulate.o \
++     spnegokrb5/decapsulate.o \
++     spnegokrb5/external.o
++
++all: lib
++
++lib: $(LIB)
++
++libmod_auth_kerb.$(LIBEXT): $(OBJS)
++	rm -f $@
++	ar cr $@ $(OBJS)
++	$(RANLIB) $@
++
++.SUFFIXES: .o
++
++.c.o:
++	$(CC) -c -I. -Ispnegokrb5 $(INCLUDES) $(CFLAGS) -o $@ $<
++
++clean:
++	rm -f $(OBJS) $(LIB)
++
++distclean: clean
++	-rm -f Makefile
++
++#Dependencies
++
++$(OBJS): Makefile
++
++# DO NOT REMOVE
+Index: libmod_auth_kerb.module
+--- /dev/null	2007-01-20 15:04:24 +0100
++++ libmod_auth_kerb.module	2007-01-20 15:03:31 +0100
+@@ -0,0 +1,8 @@
++Name: auth_kerb_module
++ConfigStart
++    echo "++ FUCK"
++    KERBEROS_CFLAGS="`krb5-config --cflags gssapi`"
++    KERBEROS_LIBS="`krb5-config --libs gssapi`"
++    CFLAGS="$KERBEROS_CFLAGS $CFLAGS"
++    LIBS="$KERBEROS_LIBS $LIBS"
++ConfigEnd
+Index: src/mod_auth_kerb.c
+--- src/mod_auth_kerb.c.orig	2006-11-22 11:32:58 +0100
++++ src/mod_auth_kerb.c	2007-01-20 15:07:51 +0100
+@@ -745,7 +745,7 @@
+    return ret;
+ }
+ 
+-static int
++static void
+ krb5_cache_cleanup(void *data)
+ {
+    krb5_context context;
+@@ -756,7 +756,7 @@
+    problem = krb5_init_context(&context);
+    if (problem) {
+       /* ap_log_error(APLOG_MARK, APLOG_ERR, 0, NULL, "krb5_init_context() failed"); */
+-      return HTTP_INTERNAL_SERVER_ERROR;
++      return;
+    }
+ 
+    problem = krb5_cc_resolve(context, cache_name, &cache);
+@@ -764,12 +764,12 @@
+       /* log_error(APLOG_MARK, APLOG_ERR, 0, NULL, 
+                 "krb5_cc_resolve() failed (%s: %s)",
+ 	        cache_name, krb5_get_err_text(context, problem)); */
+-      return HTTP_INTERNAL_SERVER_ERROR;
++      return;
+    }
+ 
+    krb5_cc_destroy(context, cache);
+    krb5_free_context(context);
+-   return OK;
++   return;
+ }
+ 
+ static int

+ 21 - 0
apache-php4/apache-php4.patch.modauthradius

@@ -0,0 +1,21 @@
+Security Fix (CVE-2005-0108)
+http://security.lss.hr/en/index.php?page=details&ID=LSS-2005-01-02
+
+Index: mod_auth_radius.c
+--- mod_auth_radius.c.orig	2003-03-24 20:16:15 +0100
++++ mod_auth_radius.c	2007-01-21 00:12:03 +0100
+@@ -971,9 +971,12 @@
+   }
+   return attr;
+ }
+-#define radcpy(STRING, ATTR) {memcpy(STRING, ATTR->data, ATTR->length - 2); \
+-                              (STRING)[ATTR->length - 2] = 0;}
+ 
++#define radcpy(STRING, ATTR) do { \
++				  unsigned char len = ATTR->length; \
++				  if (len >= 2) len-=2; \
++				  memcpy(STRING, ATTR->data, len); \
++				  (STRING)[len] = 0;} while (0)
+ 
+ /* authentication module utility functions */
+ static int

+ 50 - 0
apache-php4/apache-php4.patch.modowa

@@ -0,0 +1,50 @@
+diff -Nur modowa.orig/src/Makefile.libdir modowa/src/Makefile.libdir
+--- modowa.orig/src/Makefile.libdir	1970-01-01 01:00:00.000000000 +0100
++++ modowa/src/Makefile.libdir	2004-04-14 11:17:13.000000000 +0200
+@@ -0,0 +1,4 @@
++##
++##  Makefile.libdir
++##
++
+diff -Nur modowa.orig/src/Makefile.tmpl modowa/src/Makefile.tmpl
+--- modowa.orig/src/Makefile.tmpl	1970-01-01 01:00:00.000000000 +0100
++++ modowa/src/Makefile.tmpl	2004-04-14 12:49:13.000000000 +0200
+@@ -0,0 +1,27 @@
++##
++##  Makefile.tmpl
++##
++
++LIB=libowa.$(LIBEXT)
++EXTRA_INCLUDES=-I. @l_oracle_cflags@
++
++OBJS=modowa.o owacache.o owadoc.o owafile.o owahand.o owanls.o owaplsql.o owasql.o owautil.o
++
++all: lib
++
++lib: $(LIB)
++
++libowa.a: $(OBJS)
++	rm -f $@
++	ar cr $@ $(OBJS)
++	$(RANLIB) $@
++
++.c.o:
++	$(CC) -c $(INCLUDES) $(CFLAGS) $<
++
++clean:
++	rm -f $(LIB) $(OBJS)
++
++distclean: clean
++	rm -f Makefile
++
+diff -Nur modowa.orig/src/owafile.c modowa/src/owafile.c
+--- modowa.orig/src/owafile.c	2004-01-21 01:45:29.000000000 +0100
++++ modowa/src/owafile.c	2004-06-04 12:52:29.250118040 +0200
+@@ -1199,7 +1199,7 @@
+     os_objhand fd;
+     int        flags = O_WRONLY | O_CREAT;
+     if (append_flag) flags |= O_APPEND;
+-    fd = open(fpath, flags, 0600);
++    fd = open(fpath, flags, 0644);
+     return(fd);
+ }

+ 355 - 0
apache-php4/apache-php4.patch.php

@@ -0,0 +1,355 @@
+Index: ext/pdf/pdf.c
+--- ext/pdf/pdf.c.orig	2004-09-13 19:12:13 +0200
++++ ext/pdf/pdf.c	2005-04-01 07:52:31 +0200
+@@ -240,6 +240,16 @@
+ ZEND_GET_MODULE(pdf)
+ #endif
+ 
++ZEND_BEGIN_MODULE_GLOBALS(pdf)
++FILE *fp;
++ZEND_END_MODULE_GLOBALS(pdf)
++ZEND_DECLARE_MODULE_GLOBALS(pdf)
++#ifdef ZTS
++#define PDF_G(v) TSRMG(pdf_globals_id, zend_pdf_globals *, v)
++#else
++#define PDF_G(v) (pdf_globals.v)
++#endif
++
+ /* {{{ _free_pdf_doc
+  */
+ static void _free_pdf_doc(zend_rsrc_list_entry *rsrc TSRMLS_DC)
+@@ -305,6 +315,15 @@
+ }
+ /* }}} */
+ 
++/* {{{ pdf_flushwrite_fp
++ */
++static size_t pdf_flushwrite_fp(PDF *p, void *data, size_t size)
++{
++	FILE *fp = PDF_G(fp);
++	return fwrite(data, size, 1, fp);
++}
++/* }}} */
++
+ /* {{{ pdf_flushwrite
+  */
+ static size_t pdf_flushwrite(PDF *p, void *data, size_t size)
+@@ -339,8 +358,13 @@
+ 
+ /* {{{ PHP_MINIT_FUNCTION
+  */
++static void php_pdf_init_globals (zend_pdf_globals *g)
++{
++	g->fp = NULL;
++}
+ PHP_MINIT_FUNCTION(pdf)
+ {
++	ZEND_INIT_MODULE_GLOBALS(pdf, php_pdf_init_globals, NULL);
+ 	if ((PDF_get_majorversion() != PDFLIB_MAJORVERSION) ||
+ 			(PDF_get_minorversion() != PDFLIB_MINORVERSION)) {
+ 		php_error(E_ERROR,"PDFlib error: Version mismatch in wrapper code");
+@@ -469,9 +493,8 @@
+ 	pdf = PDF_new2(custom_errorhandler, pdf_emalloc, pdf_realloc, pdf_efree, NULL);
+ 
+ 	if(fp) {
+-		if (PDF_open_fp(pdf, fp) < 0) {
+-			RETURN_FALSE;
+-		}
++		PDF_G(fp) = fp;
++		PDF_begin_document_callback(pdf, pdf_flushwrite_fp, "");
+ 	} else {
+ 		PDF_open_mem(pdf, pdf_flushwrite);
+ 	}
+
+________________________________________________________________________
+
+Fix build against recent IMAP c-client versions, should be fixed in
+upcoming 4.4.5 release
+-> http://bugs.php.net/bug.php?id=39401
+-> http://cvs.php.net/viewvc.cgi/php-src/ext/imap/php_imap.c?r1=1.142.2.44.2.10&r2=1.142.2.44.2.11
+-> http://cvs.php.net/viewvc.cgi/php-src/ext/imap/config.m4?r1=1.49.2.15&r2=1.49.2.15.2.1
+
+Index: ext/imap/php_imap.c
+--- ext/imap/php_imap.c.orig	Fri Aug 11 17:07:00 2006
++++ ext/imap/php_imap.c	Tue Feb  6 15:55:03 2007
+@@ -74,7 +74,11 @@
+ void rfc822_date(char *date);
+ char *cpystr(const char *str);
+ char *cpytxt(SIZEDTEXT *dst, char *text, unsigned long size);
++#ifndef HAVE_NEW_MIME2TEXT
+ long utf8_mime2text(SIZEDTEXT *src, SIZEDTEXT *dst);
++#else
++long utf8_mime2text (SIZEDTEXT *src, SIZEDTEXT *dst, long flags);
++#endif
+ unsigned long find_rightmost_bit(unsigned long *valptr);
+ void fs_give(void **block);
+ void *fs_get(size_t size);
+@@ -2064,7 +2068,11 @@
+ 	dest.size = 0;
+ 
+ 	cpytxt(&src, Z_STRVAL_PP(str), Z_STRLEN_PP(str));
++#ifndef HAVE_NEW_MIME2TEXT
+ 	utf8_mime2text(&src, &dest);
++#else
++	utf8_mime2text(&src, &dest, U8T_CANONICAL);
++#endif
+ 	RETURN_STRINGL(dest.data, strlen(dest.data), 1);
+ }
+ /* }}} */
+
+Index: ext/imap/config.m4
+--- ext/imap/config.m4.orig	2005/01/11 04:56:57	1.49.2.15
++++ ext/imap/config.m4	2007/01/29 10:08:17	1.49.2.15.2.1
+@@ -126,6 +126,49 @@
+     AC_EGREP_HEADER(mail_fetch_overview_sequence, $IMAP_INC_DIR/mail.h, [
+       AC_DEFINE(HAVE_IMAP2004,1,[ ])
+     ])
++
++    dnl Check for new version of the utf8_mime2text() function
++    old_CFLAGS=$CFLAGS
++    CFLAGS="-I$IMAP_INC_DIR"
++    AC_CACHE_CHECK(for utf8_mime2text signature, ac_cv_utf8_mime2text,
++      AC_TRY_COMPILE([
++#include <stdio.h>
++#include <c-client.h>
++      ],[
++        SIZEDTEXT *src, *dst;
++        utf8_mime2text(src, dst);
++      ],[
++        ac_cv_utf8_mime2text=old
++      ],[
++        ac_cv_utf8_mime2text=new
++      ])
++    )
++    if test "$ac_cv_utf8_mime2text" = "new"; then
++      AC_DEFINE(HAVE_NEW_MIME2TEXT, 1, [Whether utf8_mime2text() has new signature])
++    fi
++    CFLAGS=$old_CPPFLAGS
++
++    old_CFLAGS=$CFLAGS
++    CFLAGS="-I$IMAP_INC_DIR"
++    AC_CACHE_CHECK(for U8T_CANONICAL, ac_cv_u8t_canonical,
++      AC_TRY_COMPILE([
++#include <c-client.h>
++      ],[
++         int i = U8T_CANONICAL;
++      ],[
++         ac_cv_u8t_canonical=yes
++      ],[
++         ac_cv_u8t_canonical=no
++      ])
++    )
++    CFLAGS=$old_CPPFLAGS
++
++    if test "$ac_cv_u8t_canonical" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then
++        AC_MSG_ERROR([utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information.])
++    fi
++    if test "$ac_cv_u8t_canonical" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then
++        AC_MSG_ERROR([utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information.])
++    fi
+ 
+     dnl Check for c-client version 2001
+     old_CPPFLAGS=$CPPFLAGS
+Index: configure
+--- configure.orig	Tue Aug 15 14:01:18 2006
++++ configure	Tue Feb  6 15:34:40 2007
+@@ -58193,6 +58193,158 @@
+ rm -f conftest*
+ 
+ 
++        old_CFLAGS=$CFLAGS
++    CFLAGS="-I$IMAP_INC_DIR"
++    echo "$as_me:$LINENO: checking for utf8_mime2text signature" >&5
++echo $ECHO_N "checking for utf8_mime2text signature... $ECHO_C" >&6
++if test "${ac_cv_utf8_mime2text+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h.  */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h.  */
++
++#include <stdio.h>
++#include <c-client.h>
++
++int
++main ()
++{
++
++        SIZEDTEXT *src, *dst;
++        utf8_mime2text(src, dst);
++
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>conftest.er1
++  ac_status=$?
++  grep -v '^ *+' conftest.er1 >conftest.err
++  rm -f conftest.er1
++  cat conftest.err >&5
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); }; } &&
++	 { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++
++        ac_cv_utf8_mime2text=old
++
++else
++  echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++        ac_cv_utf8_mime2text=new
++
++fi
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++fi
++echo "$as_me:$LINENO: result: $ac_cv_utf8_mime2text" >&5
++echo "${ECHO_T}$ac_cv_utf8_mime2text" >&6
++    if test "$ac_cv_utf8_mime2text" = "new"; then
++
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_NEW_MIME2TEXT 1
++_ACEOF
++
++    fi
++    CFLAGS=$old_CPPFLAGS
++
++    old_CFLAGS=$CFLAGS
++    CFLAGS="-I$IMAP_INC_DIR"
++    echo "$as_me:$LINENO: checking for U8T_CANONICAL" >&5
++echo $ECHO_N "checking for U8T_CANONICAL... $ECHO_C" >&6
++if test "${ac_cv_u8t_canonical+set}" = set; then
++  echo $ECHO_N "(cached) $ECHO_C" >&6
++else
++  cat >conftest.$ac_ext <<_ACEOF
++/* confdefs.h.  */
++_ACEOF
++cat confdefs.h >>conftest.$ac_ext
++cat >>conftest.$ac_ext <<_ACEOF
++/* end confdefs.h.  */
++
++#include <c-client.h>
++
++int
++main ()
++{
++
++         int i = U8T_CANONICAL;
++
++  ;
++  return 0;
++}
++_ACEOF
++rm -f conftest.$ac_objext
++if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
++  (eval $ac_compile) 2>conftest.er1
++  ac_status=$?
++  grep -v '^ *+' conftest.er1 >conftest.err
++  rm -f conftest.er1
++  cat conftest.err >&5
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); } &&
++	 { ac_try='test -z "$ac_c_werror_flag"
++			 || test ! -s conftest.err'
++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); }; } &&
++	 { ac_try='test -s conftest.$ac_objext'
++  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
++  (eval $ac_try) 2>&5
++  ac_status=$?
++  echo "$as_me:$LINENO: \$? = $ac_status" >&5
++  (exit $ac_status); }; }; then
++
++         ac_cv_u8t_canonical=yes
++
++else
++  echo "$as_me: failed program was:" >&5
++sed 's/^/| /' conftest.$ac_ext >&5
++
++
++         ac_cv_u8t_canonical=no
++
++fi
++rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
++
++fi
++echo "$as_me:$LINENO: result: $ac_cv_u8t_canonical" >&5
++echo "${ECHO_T}$ac_cv_u8t_canonical" >&6
++    CFLAGS=$old_CPPFLAGS
++
++    if test "$ac_cv_u8t_canonical" = "no" && test "$ac_cv_utf8_mime2text" = "new"; then
++        { { echo "$as_me:$LINENO: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information." >&5
++echo "$as_me: error: utf8_mime2text() has new signature, but U8T_CANONICAL is missing. This should not happen. Check config.log for additional information." >&2;}
++   { (exit 1); exit 1; }; }
++    fi
++    if test "$ac_cv_u8t_canonical" = "yes" && test "$ac_cv_utf8_mime2text" = "old"; then
++        { { echo "$as_me:$LINENO: error: utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information." >&5
++echo "$as_me: error: utf8_mime2text() has old signature, but U8T_CANONICAL is present. This should not happen. Check config.log for additional information." >&2;}
++   { (exit 1); exit 1; }; }
++    fi
++
+         old_CPPFLAGS=$CPPFLAGS
+     CPPFLAGS=-I$IMAP_INC_DIR
+     cat >conftest.$ac_ext <<_ACEOF
+Index: main/php_config.h.in
+--- main/php_config.h.in.orig	Tue Aug 15 14:01:21 2006
++++ main/php_config.h.in	Tue Feb  6 17:02:00 2007
+@@ -1748,6 +1748,9 @@
+ /*   */
+ #undef HAVE_IMAP2001
+ 
++/* Whether utf8_mime2text() has new signature */
++#undef HAVE_NEW_MIME2TEXT
++
+ /*   */
+ #undef HAVE_LIBPAM
+ 
+________________________________________________________________________
+
+Allow building against cURL 7.16.0 and higher
+-> http://cvs.php.net/viewvc.cgi/php-src/ext/curl/curl.c?hideattic=0&r1=1.124.2.30.2.13&r2=1.124.2.30.2.14
+
+Index: ext/curl/curl.c
+--- ext/curl/curl.c.orig	Thu Aug 10 19:27:11 2006
++++ ext/curl/curl.c	Tue Feb  6 17:28:02 2007
+@@ -258,7 +258,9 @@
+ 	REGISTER_CURL_CONSTANT(CURLOPT_FTPAPPEND);
+ 	REGISTER_CURL_CONSTANT(CURLOPT_NETRC);
+ 	REGISTER_CURL_CONSTANT(CURLOPT_FOLLOWLOCATION);
++#if CURLOPT_FTPASCII != 0
+ 	REGISTER_CURL_CONSTANT(CURLOPT_FTPASCII);
++#endif
+ 	REGISTER_CURL_CONSTANT(CURLOPT_PUT);
+ #if CURLOPT_MUTE != 0
+ 	REGISTER_CURL_CONSTANT(CURLOPT_MUTE);
+@@ -296,7 +298,9 @@
+ 	REGISTER_CURL_CONSTANT(CURLOPT_FILETIME);
+ 	REGISTER_CURL_CONSTANT(CURLOPT_WRITEFUNCTION);
+ 	REGISTER_CURL_CONSTANT(CURLOPT_READFUNCTION);
++#if CURLOPT_PASSWDFUNCTION != 0
+ 	REGISTER_CURL_CONSTANT(CURLOPT_PASSWDFUNCTION);
++#endif
+ 	REGISTER_CURL_CONSTANT(CURLOPT_HEADERFUNCTION);
+ 	REGISTER_CURL_CONSTANT(CURLOPT_MAXREDIRS);
+ 	REGISTER_CURL_CONSTANT(CURLOPT_MAXCONNECTS);

+ 39 - 0
apache-php4/apache-php4.patch.suphp

@@ -0,0 +1,39 @@
+Index: src/Configuration.cpp
+--- src/Configuration.cpp.orig	2005-02-27 18:53:05 +0100
++++ src/Configuration.cpp	2005-09-07 13:31:39 +0200
+@@ -21,6 +21,8 @@
+ #include <string>
+ #include <vector>
+ 
++#include "config.h"
++
+ #include "IniFile.hpp"
+ #include "Util.hpp"
+ 
+@@ -81,7 +83,11 @@
+ }
+ 
+ suPHP::Configuration::Configuration() {
++#ifdef OPT_LOGFILE
++    this->logfile = OPT_LOGFILE;
++#else
+     this->logfile = "/var/log/suphp.log";
++#endif
+ #ifdef OPT_APACHE_USER
+     this->webserver_user = OPT_APACHE_USER;
+ #else
+Index: src/apache/mod_suphp.c
+--- src/apache/mod_suphp.c.orig	2005-02-27 18:56:37 +0100
++++ src/apache/mod_suphp.c	2005-09-07 13:32:19 +0200
+@@ -249,9 +249,9 @@
+     {"suPHP_UserGroup", suphp_handle_cmd_user_group, NULL, 
+      RSRC_CONF|ACCESS_CONF, TAKE2, "User and group scripts shall be run as"},
+ #endif 
+-    {"suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, ACCESS_CONF,
++    {"suPHP_AddHandler", suphp_handle_cmd_add_handler, NULL, RSRC_CONF|ACCESS_CONF,
+      ITERATE, "Tells mod_suphp to handle these MIME-types"},
+-    {"suphp_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, ACCESS_CONF,
++    {"suphp_RemoveHandler", suphp_handle_cmd_remove_handler, NULL, RSRC_CONF|ACCESS_CONF,
+      ITERATE, "Tells mod_suphp not to handle these MIME-types"},
+     {NULL}
+ };

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 1458 - 0
apache-php4/apache-php4.spec


+ 258 - 0
apache-php4/apache.base

@@ -0,0 +1,258 @@
+##
+##  apache.base -- Apache Base/Default Configuration
+##  ______________________________________________________
+##
+##  PLEASE DO NOT EDIT THIS FILE!! ADJUST CONFIGURATION BY 
+##  OVERRIDING DIRECTIVES IN "apache.conf" INSTEAD, PLEASE!
+##  ______________________________________________________
+##
+
+#   global server
+ServerType             standalone
+ServerRoot             @l_prefix@
+ServerAdmin            root@@l_hostname@.@l_domainname@
+ServerName             @l_hostname@.@l_domainname@
+ServerTokens           os
+User                   @l_nusr@
+Group                  @l_ngrp@
+Port                   80
+
+#   runtime files
+PidFile                @l_prefix@/var/apache/run/apache.pid
+ScoreBoardFile         @l_prefix@/var/apache/run/apache.sb
+
+#  server behaviour
+Timeout                300
+KeepAlive              on
+MaxKeepAliveRequests   100
+KeepAliveTimeout       15
+MinSpareServers        5
+MaxSpareServers        10
+StartServers           5
+MaxClients             150
+MaxRequestsPerChild    0
+HostnameLookups        off
+UseCanonicalName       on
+
+#   access logging
+LogFormat              "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
+LogFormat              "%h %l %u %t \"%r\" %>s %b" common
+LogFormat              "%{Referer}i -> %U" referer
+LogFormat              "%{User-agent}i" agent
+CustomLog              @l_prefix@/var/apache/log/access.log common env=!ignore_global_access
+
+#   error logging
+LogLevel               warn
+ErrorLog               @l_prefix@/var/apache/log/error.log
+ServerSignature        on
+
+#   secure root directory
+<Directory />
+    Options FollowSymLinks
+    AllowOverride None
+</Directory>
+
+#   configure global document root
+DocumentRoot @l_prefix@/share/apache/htdocs
+<IfModule mod_alias.c>
+    Alias /apache-htdocs @l_prefix@/share/apache/htdocs
+</IfModule>
+<Directory "@l_prefix@/share/apache/htdocs">
+    Options Indexes FollowSymLinks MultiViews
+    AllowOverride none
+    Order allow,deny
+    Allow from all
+</Directory>
+
+#   default directories and files
+<IfModule mod_userdir.c>
+    UserDir public_html
+</IfModule>
+<IfModule mod_dir.c>
+    DirectoryIndex index.html
+</IfModule>
+
+#   local configuration files
+AccessFileName .htaccess
+<Files ~ "^\.ht">
+    Order allow,deny
+    Deny from all
+    Satisfy All
+</Files>
+
+#   global Icons and CGI directory
+<IfModule mod_alias.c>
+    Alias /apache-icons @l_prefix@/share/apache/icons
+    <Directory "@l_prefix@/share/apache/icons">
+        Options Indexes MultiViews
+        AllowOverride None
+        Order allow,deny
+        Allow from all
+    </Directory>
+    ScriptAlias /openpkg-cgi "@l_prefix@/cgi"
+    <Directory "@l_prefix@/cgi">
+        AllowOverride None
+        Options None
+        Order allow,deny
+        Allow from all
+    </Directory>
+</IfModule>
+
+#   automatic CGI recognition by extension
+<IfModule mod_cgi.c>
+    AddHandler cgi-script .cgi
+</IfModule>
+
+#   automatic directory indexing
+<IfModule mod_autoindex.c>
+    IndexOptions  FancyIndexing
+    ReadmeName    README
+    HeaderName    HEADER
+    IndexIgnore   .??* *~ *# HEADER* README* RCS CVS *,v *,t
+    DefaultIcon            /apache-icons/unknown.gif
+    AddIcon                /apache-icons/back.gif        ..
+    AddIcon                /apache-icons/dir.gif         ^^DIRECTORY^^
+    AddIcon                /apache-icons/blank.gif       ^^BLANKICON^^
+    AddIcon                /apache-icons/binary.gif      .bin .exe
+    AddIcon                /apache-icons/binhex.gif      .hqx
+    AddIcon                /apache-icons/tar.gif         .tar
+    AddIcon                /apache-icons/world2.gif      .wrl .wrl.gz .vrml .vrm .iv
+    AddIcon                /apache-icons/compressed.gif  .Z .z .tgz .gz .zip
+    AddIcon                /apache-icons/a.gif           .ps .ai .eps
+    AddIcon                /apache-icons/layout.gif      .html .shtml .htm .pdf
+    AddIcon                /apache-icons/text.gif        .txt
+    AddIcon                /apache-icons/c.gif           .c
+    AddIcon                /apache-icons/p.gif           .pl .py
+    AddIcon                /apache-icons/f.gif           .for
+    AddIcon                /apache-icons/dvi.gif         .dvi
+    AddIcon                /apache-icons/uuencoded.gif   .uu
+    AddIcon                /apache-icons/script.gif      .conf .sh .shar .csh .ksh .tcl
+    AddIcon                /apache-icons/tex.gif         .tex
+    AddIcon                /apache-icons/bomb.gif        core
+    AddIconByEncoding (CMP,/apache-icons/compressed.gif) x-compress x-gzip
+    AddIconByType     (TXT,/apache-icons/text.gif)       text/*
+    AddIconByType     (IMG,/apache-icons/image2.gif)     image/*
+    AddIconByType     (SND,/apache-icons/sound2.gif)     audio/*
+    AddIconByType     (VID,/apache-icons/movie.gif)      video/*
+</IfModule>
+
+#   MIME types and content negotiation
+DefaultType text/plain
+<IfModule mod_mime.c>
+    TypesConfig   @l_prefix@/etc/apache/mime.types
+    AddType       application/x-tar  .tgz
+    AddEncoding   x-compress   Z
+    AddEncoding   x-gzip       gz tgz
+    AddLanguage   da           .dk
+    AddLanguage   nl           .nl
+    AddLanguage   en           .en
+    AddLanguage   et           .ee
+    AddLanguage   fr           .fr
+    AddLanguage   de           .de
+    AddLanguage   el           .el
+    AddLanguage   he           .he
+    AddCharset    ISO-8859-8   .iso8859-8
+    AddLanguage   it           .it
+    AddLanguage   ja           .ja
+    AddCharset    ISO-2022-JP  .jis
+    AddLanguage   kr           .kr
+    AddCharset    ISO-2022-KR  .iso-kr
+    AddLanguage   no           .no
+    AddLanguage   pl           .po
+    AddCharset    ISO-8859-2   .iso-pl
+    AddLanguage   pt           .pt
+    AddLanguage   pt-br        .pt-br
+    AddLanguage   ltz          .lu
+    AddLanguage   ca           .ca
+    AddLanguage   es           .es
+    AddLanguage   sv           .se
+    AddLanguage   cz           .cz
+    AddLanguage   ru           .ru
+    AddLanguage   tw           .tw
+    AddCharset    Big5         .Big5 .big5
+    AddCharset    WINDOWS-1251 .cp-1251
+    AddCharset    CP866        .cp866
+    AddCharset    ISO-8859-5   .iso-ru
+    AddCharset    KOI8-R       .koi8-r
+    AddCharset    UCS-2        .ucs2
+    AddCharset    UCS-4        .ucs4
+    AddCharset    UTF-8        .utf8
+</IfModule>
+<IfModule mod_negotiation.c>
+    LanguagePriority en da nl et fr de el it ja kr no pl pt pt-br ru ltz ca es sv tw
+</IfModule>
+<IfModule mod_mime_magic.c>
+    MIMEMagicFile @l_prefix@/etc/apache/mime.magic
+</IfModule>
+
+#   browser specifics
+<IfModule mod_setenvif.c>
+    BrowserMatch "Mozilla/2"       nokeepalive
+    BrowserMatch "MSIE 4\.0b2;"    nokeepalive downgrade-1.0 force-response-1.0
+    BrowserMatch "RealPlayer 4\.0" force-response-1.0
+    BrowserMatch "Java/1\.0"       force-response-1.0
+    BrowserMatch "JDK/1\.0"        force-response-1.0
+</IfModule>
+
+#   SSL/TLS support
+<IfModule mod_ssl.c>
+    SSLRandomSeed           startup builtin
+    SSLRandomSeed           connect builtin
+    SSLMutex                sem
+    SSLSessionCache         shmcb:@l_prefix@/var/apache/run/ssl_scache(512000)
+    SSLSessionCacheTimeout  300
+    SSLLog                  @l_prefix@/var/apache/log/ssl.log
+    SSLLogLevel             warn
+    SSLCipherSuite          ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
+    SetEnvIf User-Agent ".*MSIE.*" \
+             nokeepalive ssl-unclean-shutdown \
+             downgrade-1.0 force-response-1.0
+    <Files ~ "\.(cgi|shtml|pl|phtml|php?)$">
+        SSLOptions +StdEnvVars
+    </Files>
+    <Directory "@l_prefix@/cgi">
+        SSLOptions +StdEnvVars
+    </Directory>
+</IfModule>
+
+#   mod_fastcgi support
+<IfModule mod_fastcgi.c>
+    FastCgiIpcDir "@l_prefix@/var/apache/fastcgi"
+    <Files ~ "\.fcgi$">
+        SetHandler fastcgi-script
+        Options    +ExecCGI
+    </Files>
+</IfModule>
+
+#   mod_perl support
+<IfModule mod_perl.c>
+    #   default initializations
+    PerlRequire "@l_prefix@/etc/apache/apache.pl"
+
+    #   activate standard Perl CGI support
+    PerlModule Apache::Registry
+    PerlModule Apache::PerlRun
+    <Files ~ "\.pl$">
+        SetHandler  perl-script
+        PerlHandler Apache::PerlRun
+        Options     +ExecCGI
+    </Files>
+</IfModule>
+
+#   PHP4 support
+<IfModule mod_php4.c>
+    AddType application/x-httpd-php .php
+</IfModule>
+
+#   suPHP support
+<IfModule mod_suphp.c>
+    suPHP_Engine      on
+    suPHP_ConfigPath  @l_prefix@/etc/php
+    suPHP_AddHandler  x-httpd-php
+    AddHandler        x-httpd-php .suphp
+</IfModule>
+
+#   include Apache add-on configurations
+#   (mainly provided by other packages)
+Include "@l_prefix@/etc/apache/apache.d/*.conf"
+

+ 33 - 0
apache-php4/apache.conf

@@ -0,0 +1,33 @@
+##
+##  apache.conf -- Apache Custom Configuration
+##
+
+#   include Apache default/base configuration
+Include "@l_prefix@/etc/apache/apache.base"
+
+Listen          127.0.0.1:80
+NameVirtualHost 127.0.0.1:80
+
+<VirtualHost 127.0.0.1:80>
+    ServerName        @l_hostname@.@l_domainname@
+    ServerAlias       localhost.@l_domainname@
+    ServerAdmin       root@localhost.@l_domainname@
+    ServerSignature   on
+
+    DocumentRoot @l_prefix@/share/apache/htdocs
+    <Directory @l_prefix@/share/apache/htdocs>
+        Options       Indexes FollowSymLinks MultiViews
+        AllowOverride none
+        Order         allow,deny
+        Allow         from all
+    </Directory>
+
+    ScriptAlias /cgi-bin @l_prefix@/cgi
+    <Directory @l_prefix@/cgi>
+        Options       Indexes FollowSymLinks MultiViews ExecCGI
+        AllowOverride None
+        Order         allow,deny
+        Allow         from all
+    </Directory>
+</VirtualHost>
+

+ 16 - 0
apache-php4/apache.pl

@@ -0,0 +1,16 @@
+##
+##  apache.pl -- Apache Perl/mod_perl Startup Script
+##
+
+$ENV{MOD_PERL} or die "you are not running mod_perl";
+
+#   strict run-time environment
+use strict;
+
+#   extended module search path
+use lib qw();
+
+#   detailed error messages
+use Carp();
+$SIG{__WARN__} = \&Carp::cluck;
+

+ 20 - 0
apache-php4/apache.sh

@@ -0,0 +1,20 @@
+##
+##  apache.sh -- Apache Shell Environment Script
+##
+
+#
+#   Run-time paths
+#
+
+export PATH="@l_path@"
+export LD_LIBRARY_PATH="@l_ld_library_path@"
+
+#
+#   Oracle client support
+#
+
+#export ORACLE_HOME="@l_prefix@/libexec/oracle-barebone"
+#export ORACLE_SID="oracle"
+#export NLS_LANG=""
+#export NLS_NUMERIC_CHARACTERS=".,"
+

+ 22 - 0
apache-php4/php.ini

@@ -0,0 +1,22 @@
+;;
+;;  php.ini -- PHP Configuration
+;;
+
+[PHP]
+
+;   Resource Limits
+register_globals   = off    ; Global variables are no longer registered for input data
+safe_mode          = on     ; Enable Safe Mode (file UID comparisons)
+safe_mode_gid      = off    ; Whether to relax Safe Mode to file GID comparisons
+allow_url_fopen    = off    ; Disable the opening of remote URLs
+display_errors     = off    ; Errors will NOT be displayed
+log_errors         = on     ; Errors will be logged
+max_execution_time = 60     ; Maximum execution time of each script, in seconds
+max_input_time     = 60     ; Maximum amount of time each script may spend parsing request data
+memory_limit       = 8M     ; Maximum amount of memory a script may consume
+post_max_size      = 8M     ; Maximum amount of POST data accepted
+
+;   Include Paths
+include_path          = ".:@l_prefix@/lib/php"
+safe_mode_include_dir = "@l_prefix@/lib/php"
+

+ 99 - 0
apache-php4/rc.apache

@@ -0,0 +1,99 @@
+#!@l_prefix@/bin/openpkg rc
+##
+##  rc.apache -- Run-Commands
+##
+
+%config
+    apache_enable="$openpkg_rc_def"
+    apache_log_files="@l_prefix@/var/apache/log/access.log"
+    apache_log_prolog="true"
+    apache_log_epilog="true"
+    apache_log_numfiles="10"
+    apache_log_minsize="1M"
+    apache_log_complevel="9"
+    apache_err_files="@l_prefix@/var/apache/log/error.log"
+    apache_err_prolog="true"
+    apache_err_epilog="true"
+    apache_err_numfiles="10"
+    apache_err_minsize="1M"
+    apache_err_complevel="9"
+    apache_ssl_files="@l_prefix@/var/apache/log/ssl.log"
+    apache_ssl_prolog="true"
+    apache_ssl_epilog="true"
+    apache_ssl_numfiles="10"
+    apache_ssl_minsize="1M"
+    apache_ssl_complevel="9"
+
+%common
+    apache_pidfile="@l_prefix@/var/apache/run/apache.pid"
+    apache_signal () {
+        [ -f $apache_pidfile ] && kill -$1 `cat $apache_pidfile`
+    }
+
+%status -u @l_susr@ -o
+    apache_usable="no"
+    apache_active="no"
+    @l_prefix@/sbin/apache -t 2>/dev/null && apache_usable="yes"
+    rcService apache enable yes && \
+        apache_signal 0 && apache_active="yes"
+    echo "apache_enable=\"$apache_enable\""
+    echo "apache_usable=\"$apache_usable\""
+    echo "apache_active=\"$apache_active\""
+
+%start -u @l_susr@
+    rcService apache enable yes || exit 0
+    rcService apache active yes && exit 0
+    ( cd @l_prefix@/var/apache/run
+      [ -e @l_prefix@/etc/apache/apache.sh ] && \
+          . @l_prefix@/etc/apache/apache.sh
+      @l_prefix@/sbin/apache
+    ) || exit $?
+
+%stop -u @l_susr@
+    rcService apache enable yes || exit 0
+    rcService apache active no  && exit 0
+    apache_signal TERM
+    sleep 2
+    rm -f $apache_pidfile >/dev/null 2>&1 || true
+
+%restart -u @l_susr@
+    rcService apache enable yes || exit 0
+    rcService apache active no  && exit 0
+    @l_prefix@/sbin/apache -t || exit $?
+    rc apache stop
+    sleep 4
+    rc apache start
+
+%reload -u @l_susr@
+    rcService apache enable yes || exit 0
+    rcService apache active no  && exit 0
+    @l_prefix@/sbin/apache -t || exit $?
+    apache_signal USR1
+
+%daily -u @l_susr@
+    rcService apache enable yes || exit 0
+    if [ ".$apache_log_files" != . ]; then
+        shtool rotate -f \
+            -n ${apache_log_numfiles} -s ${apache_log_minsize} -d \
+            -z ${apache_log_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \
+            -P "${apache_log_prolog}" \
+            -E "${apache_log_epilog} && rc apache reload" \
+            $apache_log_files
+    fi
+    if [ ".$apache_err_files" != . ]; then
+        shtool rotate -f \
+            -n ${apache_err_numfiles} -s ${apache_err_minsize} -d \
+            -z ${apache_err_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \
+            -P "${apache_err_prolog}" \
+            -E "${apache_err_epilog} && rc apache reload" \
+            $apache_err_files
+    fi
+    if [ ".$apache_ssl_files" != . ]; then
+        shtool rotate -f \
+            -n ${apache_ssl_numfiles} -s ${apache_ssl_minsize} -d \
+            -z ${apache_ssl_complevel} -m 644 -o @l_susr@ -g @l_mgrp@ \
+            -P "${apache_ssl_prolog}" \
+            -E "${apache_ssl_epilog} && rc apache reload" \
+            $apache_ssl_files
+    fi
+