---- old/modules/mappers/mod_vhost_alias.c 2006-07-24 13:07:15.000000000 +0100
-+++ new/modules/mappers/mod_vhost_alias.c 2006-07-24 13:09:21.000000000 +0100
+--- httpd-2.4.1/modules/mappers/mod_vhost_alias.c.orig 2011-06-05 23:33:12.000000000 +0200
++++ httpd-2.4.1/modules/mappers/mod_vhost_alias.c 2012-02-22 00:31:43.952644535 +0100
@@ -33,6 +33,8 @@
* both written by James Grinter <jrg@blodwen.demon.co.uk>.
*/
+
#include "apr.h"
#include "apr_strings.h"
- #include "apr_hooks.h"
+ #include "ap_hooks.h"
@@ -67,6 +69,7 @@
const char *cgi_root;
mva_mode_e doc_root_mode;
{
/* 0..9 9..0 */
enum { MAXDOTS = 19 };
-@@ -378,6 +400,13 @@
- else {
- r->filename = apr_pstrcat(r->pool, buf, uri, NULL);
- }
-+
+@@ -377,6 +399,12 @@
+ r->filename = apr_pstrcat(r->pool, docroot, uri, NULL);
+ ap_set_context_info(r, NULL, docroot);
+ ap_set_document_root(r, docroot);
+ if (conf->set_doc_root) {
-+ request_rec *top = (r->main)?r->main:r;
-+ core_server_config *core = (core_server_config *) ap_get_module_config(r->server->module_config, &core_module);
++ request_rec *top = (r->main)?r->main:r;
++ core_server_config *core = (core_server_config *) ap_get_module_config(r->server->module_config, &core_module);
+
-+ core->ap_document_root = apr_pstrdup(top->pool, buf);
++ core->ap_document_root = apr_pstrdup(top->pool, buf);
+ }
}
static int mva_translate(request_rec *r)
-@@ -426,7 +455,7 @@
+@@ -425,7 +453,7 @@
* canonical_path buffer.
*/
r->canonical_filename = "";
---- httpd-2.2.0/docs/cgi-examples/printenv.save 2005-12-26 23:09:55.000000000 +0200
-+++ httpd-2.2.0/docs/cgi-examples/printenv 2005-12-26 23:09:55.000000000 +0200
-@@ -1,4 +1,4 @@
--#!/usr/local/bin/perl
+--- httpd-2.4.1/docs/cgi-examples/printenv.orig 2008-09-06 22:26:15.000000000 +0200
++++ httpd-2.4.1/docs/cgi-examples/printenv 2012-02-22 00:03:03.259441113 +0100
+@@ -1,9 +1,5 @@
+-#
+#!/usr/bin/perl
- ##
- ## printenv -- demo CGI program which just prints its environment
- ##
+
+-# To permit this cgi, replace # on the first line above with the
+-# appropriate #!/path/to/perl shebang, and set this script executable
+-# with chmod 755.
+-#
+ # Note that it is subject to cross site scripting attacks on MS IE
+ # and any other browser which fails to honor RFC2616, so never use
+ # it in a live server environment, it is provided only for testing.
-diff -urNp httpd-2.2.8.orig/support/suexec.c httpd-2.2.8/support/suexec.c
---- httpd-2.2.8.orig/support/suexec.c 2006-07-12 05:38:44.000000000 +0200
-+++ httpd-2.2.8/support/suexec.c 2008-05-13 21:04:25.000000000 +0200
-@@ -245,6 +245,21 @@ static void clean_env(void)
+--- httpd-2.4.1/support/suexec.c.orig 2011-07-13 21:11:21.000000000 +0200
++++ httpd-2.4.1/support/suexec.c 2012-02-22 00:26:17.549340557 +0100
+@@ -234,6 +234,21 @@
environ = cleanenv;
}
int main(int argc, char *argv[])
{
int userdir = 0; /* ~userdir flag */
-@@ -261,6 +276,7 @@ int main(int argc, char *argv[])
+@@ -249,6 +264,7 @@
char dwd[AP_MAXPATH]; /* docroot working directory */
struct passwd *pw; /* password entry holder */
struct group *gr; /* group entry holder */
struct stat dir_info; /* directory info holder */
struct stat prg_info; /* program info holder */
-@@ -270,6 +286,7 @@ int main(int argc, char *argv[])
- clean_env();
-
- prog = argv[0];
-+
- /*
- * Check existence/validity of the UID of the user
- * running this program. Error out if invalid.
-@@ -382,8 +399,23 @@ int main(int argc, char *argv[])
+@@ -369,8 +385,23 @@
}
else {
if ((pw = getpwuid(atoi(target_uname))) == NULL) {
}
}
-@@ -560,20 +592,24 @@ int main(int argc, char *argv[])
+@@ -549,20 +580,24 @@
}
/*
---- httpd-2.0.48/server/listen.c.orig Mon Mar 31 06:30:52 2003
-+++ httpd-2.0.48/server/listen.c Wed Mar 3 12:05:09 2004
-@@ -120,7 +120,7 @@
+--- httpd-2.4.1/server/listen.c.orig 2011-12-05 01:08:01.000000000 +0100
++++ httpd-2.4.1/server/listen.c 2012-02-22 00:22:21.899829142 +0100
+@@ -76,7 +76,7 @@
#if APR_HAVE_IPV6
if (server->bind_addr->family == APR_INET6) {
stat = apr_socket_opt_set(s, APR_IPV6_V6ONLY, v6only_setting);
- if (stat != APR_SUCCESS && stat != APR_ENOTIMPL) {
-+ if (stat != APR_SUCCESS && stat != APR_ENOTIMPL && stat != ENOPROTOOPT) {
- ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p,
++ if (stat != APR_SUCCESS && stat != APR_ENOTIMPL && stat != ENOPROTOOPT) {
+ ap_log_perror(APLOG_MARK, APLOG_CRIT, stat, p, APLOGNO(00069)
"make_sock: for address %pI, apr_socket_opt_set: "
"(IPV6_V6ONLY)",
%bcond_with bucketeer # debug one
# this is internal macro, don't change to %%apache_modules_api
-%define _apache_modules_api 20051115
+%define _apache_modules_api 20120211
%define openssl_ver 0.9.8i
%define apr_ver 1:1.4.5
Patch15: httpd-2.0.48-debuglog.patch
Patch18: %{name}-v6only-ENOPROTOOPT.patch
Patch19: %{name}-conffile-path.patch
-Patch20: %{name}-apxs.patch
Patch23: %{name}-suexec_fcgi.patch
Patch24: %{name}-bug-48094.patch
# http://scripts.mit.edu/trac/browser/trunk/server/common/patches/httpd-2.2.x-mod_ssl-sessioncaching.patch?rev=1348
%patch15 -p1
%patch18 -p1
%patch19 -p1
-%patch20 -p1
%patch23 -p1
%patch24 -p1
-%patch25 -p1
+# seems already applied
+#%%patch25 -p1
%patch26 -p1
-%patch28 -p1
+%{?with_itk:%patch28 -p1}
%patch29 -p1
# using system apr, apr-util and pcre
-%{__rm} -r srclib/{apr,apr-util,pcre}
+#%%{__rm} -r srclib/{apr,apr-util,pcre}
# sanity check
MODULES_API=`awk '/#define MODULE_MAGIC_NUMBER_MAJOR/ {print $3}' include/ap_mmn.h`
* don't HTML-escape the SERVER_NAME variable
-* do escape SERVER_NAME in error docs
-* remove dates from error pages (#86474), since they won't be in the right
-language
-diff -ur httpd-2.2.0.org/docs/error/include/bottom.html httpd-2.2.0/docs/error/include/bottom.html
---- httpd-2.2.0.org/docs/error/include/bottom.html 2004-11-20 21:16:24.000000000 +0100
-+++ httpd-2.2.0/docs/error/include/bottom.html 2005-12-02 23:04:57.540690250 +0100
-@@ -5,10 +5,8 @@
-
- <h2>Error <!--#echo encoding="none" var="REDIRECT_STATUS" --></h2>
- <address>
-- <a href="/"><!--#echo var="SERVER_NAME" --></a><br />
-- <!--#config timefmt="%c" -->
-- <span><!--#echo var="DATE_LOCAL" --><br />
-- <!--#echo var="SERVER_SOFTWARE" --></span>
-+ <a href="/"><!--#echo encoding="entity" var="SERVER_NAME" --></a><br />
-+ <span><!--#echo var="SERVER_SOFTWARE" --></span>
- </address>
- </body>
- </html>
-diff -ur httpd-2.2.0.org/server/util_script.c httpd-2.2.0/server/util_script.c
---- httpd-2.2.0.org/server/util_script.c 2005-11-10 16:20:05.000000000 +0100
-+++ httpd-2.2.0/server/util_script.c 2005-12-02 23:04:50.848272000 +0100
-@@ -224,8 +224,7 @@
+--- httpd-2.4.1/server/util_script.c.orig 2012-02-09 16:09:00.000000000 +0100
++++ httpd-2.4.1/server/util_script.c 2012-02-21 23:59:00.129432524 +0100
+@@ -229,8 +229,7 @@
apr_table_addn(e, "SERVER_SIGNATURE", ap_psignature("", r));
apr_table_addn(e, "SERVER_SOFTWARE", ap_get_server_banner());
- apr_table_addn(e, "SERVER_NAME",
-- ap_escape_html(r->pool, ap_get_server_name(r)));
+- ap_escape_html(r->pool, ap_get_server_name_for_url(r)));
+ apr_table_addn(e, "SERVER_NAME", ap_get_server_name(r));
apr_table_addn(e, "SERVER_ADDR", r->connection->local_ip); /* Apache */
apr_table_addn(e, "SERVER_PORT",
-diff -urbB httpd-2.2.0.org/modules/ssl/ssl_engine_mutex.c httpd-2.2.0/modules/ssl/ssl_engine_mutex.c
---- httpd-2.2.0.org/modules/ssl/ssl_engine_mutex.c 2005-11-10 16:20:05.000000000 +0100
-+++ httpd-2.2.0/modules/ssl/ssl_engine_mutex.c 2005-12-02 23:11:09.183916500 +0100
-@@ -45,6 +45,10 @@
- if (mc->pMutex) {
+--- httpd-2.4.1/modules/ssl/ssl_engine_mutex.c.orig 2011-12-05 01:08:01.000000000 +0100
++++ httpd-2.4.1/modules/ssl/ssl_engine_mutex.c 2012-02-22 00:07:35.402966515 +0100
+@@ -47,6 +47,9 @@
return TRUE;
}
-+
+
+ if (mc->szMutexFile)
+ apr_file_remove(mc->szMutexFile, p);
+
- if ((rv = apr_global_mutex_create(&mc->pMutex, mc->szMutexFile,
- mc->nMutexMech, s->process->pool))
+ if ((rv = ap_global_mutex_create(&mc->pMutex, NULL, SSL_CACHE_MUTEX_TYPE,
+ NULL, s, s->process->pool, 0))
!= APR_SUCCESS) {
Automatically raise the core file size limit if CoreDumpDirectory
is configured.
---- httpd-2.0.48/server/core.c.corelimit
-+++ httpd-2.0.48/server/core.c
-@@ -4233,6 +4233,25 @@
-
- ap_set_version(pconf);
- ap_setup_make_content_type(pconf);
-+
+--- httpd-2.4.1/server/core.c.orig 2012-02-22 00:09:24.000000000 +0100
++++ httpd-2.4.1/server/core.c 2012-02-22 00:15:07.329200901 +0100
+@@ -4433,6 +4433,24 @@
+ }
+ apr_pool_cleanup_register(pconf, NULL, ap_mpm_end_gen_helper,
+ apr_pool_cleanup_null);
+#ifdef RLIMIT_CORE
+ if (ap_coredumpdir_configured) {
+ struct rlimit lim;
Note this patch depends on the pie patch.
---- httpd-2.0.48/include/http_log.h.debuglog
-+++ httpd-2.0.48/include/http_log.h
-@@ -130,7 +130,11 @@
-
- extern int AP_DECLARE_DATA ap_default_loglevel;
-
+--- httpd-2.4.1/include/http_log.h.orig 2011-12-03 00:19:04.000000000 +0100
++++ httpd-2.4.1/include/http_log.h 2012-02-22 00:19:37.989185555 +0100
+@@ -280,7 +280,12 @@
+ * @see ap_log_rerror
+ * @see ap_log_cserror
+ */
+#ifdef AP_FNAME
-+#define APLOG_MARK AP_FNAME,__LINE__
++#define APLOG_MARK AP_FNAME,__LINE__,APLOG_MODULE_INDEX
+#else
- #define APLOG_MARK __FILE__,__LINE__
+ #define APLOG_MARK __FILE__,__LINE__,APLOG_MODULE_INDEX
+#endif
++
/**
* Set up for logging to stderr.