From af4f8313df3d4f53c3ae5294c8aa7f673b6b7268 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bartosz=20=C5=9Awi=C4=85tek?= Date: Wed, 22 Feb 2012 00:40:59 +0100 Subject: [PATCH] - update all patches - fix %setup --- apache-mod_vhost_alias_docroot.patch | 23 +++++++++++------------ apache-paths.patch | 19 ++++++++++++------- apache-suexec_fcgi.patch | 21 ++++++--------------- apache-v6only-ENOPROTOOPT.patch | 10 +++++----- apache.spec | 11 +++++------ httpd-2.0.45-encode.patch | 28 ++++------------------------ httpd-2.0.46-sslmutex.patch | 14 ++++++-------- httpd-2.0.48-corelimit.patch | 13 ++++++------- httpd-2.0.48-debuglog.patch | 17 +++++++++-------- 9 files changed, 64 insertions(+), 92 deletions(-) diff --git a/apache-mod_vhost_alias_docroot.patch b/apache-mod_vhost_alias_docroot.patch index 359ff57..6be421c 100644 --- a/apache-mod_vhost_alias_docroot.patch +++ b/apache-mod_vhost_alias_docroot.patch @@ -1,5 +1,5 @@ ---- 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 . */ @@ -8,7 +8,7 @@ + #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; @@ -75,21 +75,20 @@ { /* 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 = ""; diff --git a/apache-paths.patch b/apache-paths.patch index 65bd1e0..e195a15 100644 --- a/apache-paths.patch +++ b/apache-paths.patch @@ -1,8 +1,13 @@ ---- 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 --git a/apache-suexec_fcgi.patch b/apache-suexec_fcgi.patch index d50b484..99bcfc3 100644 --- a/apache-suexec_fcgi.patch +++ b/apache-suexec_fcgi.patch @@ -1,7 +1,6 @@ -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; } @@ -23,7 +22,7 @@ diff -urNp httpd-2.2.8.orig/support/suexec.c httpd-2.2.8/support/suexec.c 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 */ @@ -31,15 +30,7 @@ diff -urNp httpd-2.2.8.orig/support/suexec.c httpd-2.2.8/support/suexec.c 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) { @@ -65,7 +56,7 @@ diff -urNp httpd-2.2.8.orig/support/suexec.c httpd-2.2.8/support/suexec.c } } -@@ -560,20 +592,24 @@ int main(int argc, char *argv[]) +@@ -549,20 +580,24 @@ } /* diff --git a/apache-v6only-ENOPROTOOPT.patch b/apache-v6only-ENOPROTOOPT.patch index 887911d..ab21ad4 100644 --- a/apache-v6only-ENOPROTOOPT.patch +++ b/apache-v6only-ENOPROTOOPT.patch @@ -1,11 +1,11 @@ ---- 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)", diff --git a/apache.spec b/apache.spec index 05c15cb..a6b3176 100644 --- a/apache.spec +++ b/apache.spec @@ -23,7 +23,7 @@ %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 @@ -89,7 +89,6 @@ Patch14: httpd-2.0.48-corelimit.patch 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 @@ -1779,16 +1778,16 @@ Dwa programy testowe/przykładowe cgi: test-cgi and print-env. %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` diff --git a/httpd-2.0.45-encode.patch b/httpd-2.0.45-encode.patch index 82d9a0b..e36728d 100644 --- a/httpd-2.0.45-encode.patch +++ b/httpd-2.0.45-encode.patch @@ -1,33 +1,13 @@ * 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 @@ - -

Error

-
--
-- --
--
-+
-+ -
- - -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 --git a/httpd-2.0.46-sslmutex.patch b/httpd-2.0.46-sslmutex.patch index dadc6e0..82398d0 100644 --- a/httpd-2.0.46-sslmutex.patch +++ b/httpd-2.0.46-sslmutex.patch @@ -1,14 +1,12 @@ -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) { diff --git a/httpd-2.0.48-corelimit.patch b/httpd-2.0.48-corelimit.patch index 1496b4b..b9c1200 100644 --- a/httpd-2.0.48-corelimit.patch +++ b/httpd-2.0.48-corelimit.patch @@ -2,13 +2,12 @@ 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; diff --git a/httpd-2.0.48-debuglog.patch b/httpd-2.0.48-debuglog.patch index 6fac4e2..46d3337 100644 --- a/httpd-2.0.48-debuglog.patch +++ b/httpd-2.0.48-debuglog.patch @@ -9,17 +9,18 @@ go upstream. 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. -- 2.46.0