1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/apache/apache.patch Mon Sep 17 19:01:16 2012 +0200 1.3 @@ -0,0 +1,338 @@ 1.4 +Index: build/config_vars.sh.in 1.5 +--- build/config_vars.sh.in.orig 2008-02-05 00:00:07.000000000 +0100 1.6 ++++ build/config_vars.sh.in 2011-05-11 20:35:42.000000000 +0200 1.7 +@@ -35,7 +35,7 @@ 1.8 + APU_CONFIG=@APU_CONFIG@ 1.9 + fi 1.10 + 1.11 +-APR_LIBTOOL="`${APR_CONFIG} --apr-libtool`" 1.12 ++APR_LIBTOOL="@prefix@/share/apache/build/libtool" 1.13 + APR_INCLUDEDIR="`${APR_CONFIG} --includedir`" 1.14 + APU_INCLUDEDIR="`${APU_CONFIG} --includedir`" 1.15 + 1.16 +Index: config.layout 1.17 +--- config.layout.orig 2004-11-21 19:50:36.000000000 +0100 1.18 ++++ config.layout 2011-05-11 20:35:42.000000000 +0200 1.19 +@@ -50,7 +50,7 @@ 1.20 + iconsdir: ${datadir}/icons 1.21 + htdocsdir: ${datadir}/htdocs 1.22 + manualdir: ${datadir}/manual 1.23 +- cgidir: ${datadir}/cgi-bin 1.24 ++ cgidir: ${exec_prefix}/cgi 1.25 + includedir: ${prefix}/include+ 1.26 + localstatedir: ${prefix}/var+ 1.27 + runtimedir: ${localstatedir}/run 1.28 +Index: configure 1.29 +--- configure.orig 2011-05-08 08:52:50.000000000 +0200 1.30 ++++ configure 2011-05-11 20:35:43.000000000 +0200 1.31 +@@ -3605,6 +3605,11 @@ 1.32 + { (exit 1); exit 1; }; } 1.33 + fi 1.34 + 1.35 ++if test "x${USE_BUNDLED_APR}" != "x" ; then 1.36 ++ apr_found=reconfig 1.37 ++ apr_config=srclib/apr/apr-1-config 1.38 ++fi 1.39 ++ 1.40 + if test "$apr_found" = "reconfig"; then 1.41 + 1.42 + # save our work to this point; this allows the sub-package to use it 1.43 +@@ -3965,6 +3970,11 @@ 1.44 + { (exit 1); exit 1; }; } 1.45 + fi 1.46 + 1.47 ++if test "x${USE_BUNDLED_APR}" != "x" ; then 1.48 ++ apu_found=reconfig 1.49 ++ apu_config=srclib/apr-util/apu-1-config 1.50 ++fi 1.51 ++ 1.52 + # Catch some misconfigurations: 1.53 + case ${apr_found}.${apu_found} in 1.54 + reconfig.yes) 1.55 +Index: docs/conf/mime.types 1.56 +--- docs/conf/mime.types.orig 2011-05-03 22:13:58.000000000 +0200 1.57 ++++ docs/conf/mime.types 2011-05-11 20:37:13.000000000 +0200 1.58 +@@ -119,6 +119,7 @@ 1.59 + # application/media_control+xml 1.60 + application/mediaservercontrol+xml mscml 1.61 + application/metalink4+xml meta4 1.62 ++application/metalink+xml metalink 1.63 + application/mets+xml mets 1.64 + # application/mikey 1.65 + application/mods+xml mods 1.66 +Index: docs/docroot/index.html 1.67 +--- docs/docroot/index.html.orig 2004-11-20 21:16:24.000000000 +0100 1.68 ++++ docs/docroot/index.html 2011-05-11 20:35:43.000000000 +0200 1.69 +@@ -1 +1,7 @@ 1.70 +-<html><body><h1>It works!</h1></body></html> 1.71 +\ No newline at end of file 1.72 ++<html> 1.73 ++ <body> 1.74 ++ <h1>It works!</h1> 1.75 ++ It works! Your <a href="http://openpkg.org/">OpenPKG</a> based <a href="http://httpd.apache.org/">Apache</a> HTTP server was successfully installed and started.<br/> 1.76 ++ You now have to read the <a href="/apache-manual/">documentation</a> and configure it according to your local demands. 1.77 ++ </body> 1.78 ++</html> 1.79 +Index: modules/generators/mod_autoindex.c 1.80 +--- modules/generators/mod_autoindex.c.orig 2011-02-10 16:24:20.000000000 +0100 1.81 ++++ modules/generators/mod_autoindex.c 2011-05-11 20:35:43.000000000 +0200 1.82 +@@ -1574,17 +1574,17 @@ 1.83 + 1.84 + ++cols; 1.85 + } 1.86 +- ap_rputs("<th>", r); 1.87 ++ ap_rputs("<th align=\"left\">", r); 1.88 + emit_link(r, "Name", K_NAME, keyid, direction, 1.89 + colargs, static_columns); 1.90 + if (!(autoindex_opts & SUPPRESS_LAST_MOD)) { 1.91 +- ap_rputs("</th><th>", r); 1.92 ++ ap_rputs("</th><th align=\"right\">", r); 1.93 + emit_link(r, "Last modified", K_LAST_MOD, keyid, direction, 1.94 + colargs, static_columns); 1.95 + ++cols; 1.96 + } 1.97 + if (!(autoindex_opts & SUPPRESS_SIZE)) { 1.98 +- ap_rputs("</th><th>", r); 1.99 ++ ap_rputs("</th><th align=\"right\">", r); 1.100 + emit_link(r, "Size", K_SIZE, keyid, direction, 1.101 + colargs, static_columns); 1.102 + ++cols; 1.103 +@@ -1678,7 +1678,14 @@ 1.104 + } 1.105 + 1.106 + if (autoindex_opts & TABLE_INDEXING) { 1.107 +- ap_rputs("<tr>", r); 1.108 ++ char *class; 1.109 ++ if (strcmp(t2, "Parent Directory") == 0) 1.110 ++ class = "updir"; 1.111 ++ else if (ar[x]->isdir) 1.112 ++ class = "dir"; 1.113 ++ else 1.114 ++ class = "file"; 1.115 ++ ap_rvputs(r, "<tr class=\"", class, "\">", NULL); 1.116 + if (!(autoindex_opts & SUPPRESS_ICON)) { 1.117 + ap_rputs("<td valign=\"top\">", r); 1.118 + if (autoindex_opts & ICONS_ARE_LINKS) { 1.119 +@@ -1763,9 +1770,6 @@ 1.120 + desc_width), NULL); 1.121 + } 1.122 + } 1.123 +- else { 1.124 +- ap_rputs("</td><td> ", r); 1.125 +- } 1.126 + } 1.127 + ap_rputs("</td></tr>\n", r); 1.128 + } 1.129 +Index: server/Makefile.in 1.130 +--- server/Makefile.in.orig 2011-04-14 18:37:58.000000000 +0200 1.131 ++++ server/Makefile.in 2011-05-11 20:35:43.000000000 +0200 1.132 +@@ -56,7 +56,8 @@ 1.133 + tmp=export_files_unsorted.txt; \ 1.134 + rm -f $$tmp && touch $$tmp; \ 1.135 + for dir in $(EXPORT_DIRS); do \ 1.136 +- ls $$dir/*.h >> $$tmp; \ 1.137 ++ abs_dir=`cd $$dir && exec pwd`; \ 1.138 ++ ls $$abs_dir/*.h >> $$tmp; \ 1.139 + done; \ 1.140 + for dir in $(EXPORT_DIRS_APR); do \ 1.141 + (ls $$dir/ap[ru].h $$dir/ap[ru]_*.h >> $$tmp 2>/dev/null); \ 1.142 +Index: support/Makefile.in 1.143 +--- support/Makefile.in.orig 2011-04-16 21:09:47.000000000 +0200 1.144 ++++ support/Makefile.in 2011-05-11 20:35:43.000000000 +0200 1.145 +@@ -22,12 +22,6 @@ 1.146 + chmod 755 $(DESTDIR)$(sbindir)/$$i; \ 1.147 + fi ; \ 1.148 + done 1.149 +- @if test -f "$(builddir)/envvars-std"; then \ 1.150 +- cp -p envvars-std $(DESTDIR)$(sbindir); \ 1.151 +- if test ! -f $(DESTDIR)$(sbindir)/envvars; then \ 1.152 +- cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \ 1.153 +- fi ; \ 1.154 +- fi 1.155 + 1.156 + htpasswd_OBJECTS = htpasswd.lo 1.157 + htpasswd: $(htpasswd_OBJECTS) 1.158 +Index: support/apachectl.in 1.159 +--- support/apachectl.in.orig 2006-07-12 05:38:44.000000000 +0200 1.160 ++++ support/apachectl.in 2011-05-11 20:35:43.000000000 +0200 1.161 +@@ -43,11 +43,6 @@ 1.162 + # the path to your httpd binary, including options if necessary 1.163 + HTTPD='@exp_sbindir@/@progname@' 1.164 + # 1.165 +-# pick up any necessary environment variables 1.166 +-if test -f @exp_sbindir@/envvars; then 1.167 +- . @exp_sbindir@/envvars 1.168 +-fi 1.169 +-# 1.170 + # a command that outputs a formatted text version of the HTML at the 1.171 + # url given on the command line. Designed for lynx, however other 1.172 + # programs may work. 1.173 +Index: support/apxs.in 1.174 +--- support/apxs.in.orig 2010-05-10 22:02:56.000000000 +0200 1.175 ++++ support/apxs.in 2011-05-11 20:35:43.000000000 +0200 1.176 +@@ -80,6 +80,7 @@ 1.177 + # the "+" metacharacter at the format string to allow a list to be built by 1.178 + # subsequent occurrences of the same option. 1.179 + sub Getopts { 1.180 ++ no warnings 'deprecated'; 1.181 + my ($argumentative, @ARGV) = @_; 1.182 + my $errs = 0; 1.183 + local $_; 1.184 +@@ -189,9 +190,6 @@ 1.185 + my $httpd = get_vars("sbindir") . "/" . get_vars("progname"); 1.186 + $httpd = eval qq("$httpd"); 1.187 + $httpd = eval qq("$httpd"); 1.188 +-my $envvars = get_vars("sbindir") . "/envvars"; 1.189 +-$envvars = eval qq("$envvars"); 1.190 +-$envvars = eval qq("$envvars"); 1.191 + 1.192 + #allow apxs to be run from the source tree, before installation 1.193 + if ($0 =~ m:support/apxs$:) { 1.194 +@@ -203,7 +201,7 @@ 1.195 + exit 1; 1.196 + } 1.197 + 1.198 +-unless (grep /mod_so/, `. $envvars && $httpd -l`) { 1.199 ++unless (grep /mod_so/, `$httpd -l`) { 1.200 + error("Sorry, no shared object support for Apache"); 1.201 + error("available under your platform. Make sure"); 1.202 + error("the Apache module mod_so is compiled into"); 1.203 +@@ -337,8 +335,7 @@ 1.204 + exit(1); 1.205 + } 1.206 + 1.207 +-my $libtool = `$apr_config --apr-libtool`; 1.208 +-chomp($libtool); 1.209 ++my $libtool = "$prefix/share/apache/build/libtool"; 1.210 + 1.211 + my $apr_includedir = `$apr_config --includes`; 1.212 + chomp($apr_includedir); 1.213 +Index: support/htdigest.c 1.214 +--- support/htdigest.c.orig 2010-09-22 03:35:42.000000000 +0200 1.215 ++++ support/htdigest.c 2011-05-11 20:35:43.000000000 +0200 1.216 +@@ -119,7 +119,7 @@ 1.217 + } 1.218 + 1.219 + 1.220 +-static void add_password(const char *user, const char *realm, apr_file_t *f) 1.221 ++static void add_password(const char *user, const char *realm, const char *pw0, apr_file_t *f) 1.222 + { 1.223 + char *pw; 1.224 + apr_md5_ctx_t context; 1.225 +@@ -130,6 +130,9 @@ 1.226 + unsigned int i; 1.227 + apr_size_t len = sizeof(pwin); 1.228 + 1.229 ++ if (pw0 != NULL) 1.230 ++ pw = pw0; 1.231 ++ else { 1.232 + if (apr_password_get("New password: ", pwin, &len) != APR_SUCCESS) { 1.233 + apr_file_printf(errfile, "password too long"); 1.234 + cleanup_tempfile_and_exit(5); 1.235 +@@ -141,6 +144,7 @@ 1.236 + cleanup_tempfile_and_exit(1); 1.237 + } 1.238 + pw = pwin; 1.239 ++ } 1.240 + apr_file_printf(f, "%s:%s:", user, realm); 1.241 + 1.242 + /* Do MD5 stuff */ 1.243 +@@ -161,7 +165,7 @@ 1.244 + 1.245 + static void usage(void) 1.246 + { 1.247 +- apr_file_printf(errfile, "Usage: htdigest [-c] passwordfile realm username\n"); 1.248 ++ apr_file_printf(errfile, "Usage: htdigest [-c] passwordfile realm username [password]\n"); 1.249 + apr_file_printf(errfile, "The -c flag creates a new file.\n"); 1.250 + exit(1); 1.251 + } 1.252 +@@ -188,6 +192,8 @@ 1.253 + char *dirname; 1.254 + char user[MAX_STRING_LEN]; 1.255 + char realm[MAX_STRING_LEN]; 1.256 ++ char *password = NULL; 1.257 ++ char passwordb[MAX_STRING_LEN]; 1.258 + char line[3 * MAX_STRING_LEN]; 1.259 + char l[3 * MAX_STRING_LEN]; 1.260 + char w[MAX_STRING_LEN]; 1.261 +@@ -209,9 +215,7 @@ 1.262 + #endif 1.263 + 1.264 + apr_signal(SIGINT, (void (*)(int)) interrupted); 1.265 +- if (argc == 5) { 1.266 +- if (strcmp(argv[1], "-c")) 1.267 +- usage(); 1.268 ++ if ((argc == 5 || argc == 6) && strcmp(argv[1], "-c") == 0) { 1.269 + rv = apr_file_open(&f, argv[2], APR_WRITE | APR_CREATE, 1.270 + APR_OS_DEFAULT, cntxt); 1.271 + if (rv != APR_SUCCESS) { 1.272 +@@ -222,15 +226,19 @@ 1.273 + apr_strerror(rv, errmsg, sizeof errmsg)); 1.274 + exit(1); 1.275 + } 1.276 ++ if (argc == 6) { 1.277 ++ apr_cpystrn(passwordb, argv[5], sizeof(passwordb)); 1.278 ++ password = passwordb; 1.279 ++ } 1.280 + apr_cpystrn(user, argv[4], sizeof(user)); 1.281 + apr_cpystrn(realm, argv[3], sizeof(realm)); 1.282 + apr_file_printf(errfile, "Adding password for %s in realm %s.\n", 1.283 + user, realm); 1.284 +- add_password(user, realm, f); 1.285 ++ add_password(user, realm, password, f); 1.286 + apr_file_close(f); 1.287 + exit(0); 1.288 + } 1.289 +- else if (argc != 4) 1.290 ++ else if (argc != 4 && argc != 5) 1.291 + usage(); 1.292 + 1.293 + if (apr_temp_dir_get((const char**)&dirname, cntxt) != APR_SUCCESS) { 1.294 +@@ -253,6 +261,10 @@ 1.295 + } 1.296 + apr_cpystrn(user, argv[3], sizeof(user)); 1.297 + apr_cpystrn(realm, argv[2], sizeof(realm)); 1.298 ++ if (argc == 5) { 1.299 ++ apr_cpystrn(passwordb, argv[4], sizeof(passwordb)); 1.300 ++ password = passwordb; 1.301 ++ } 1.302 + 1.303 + found = 0; 1.304 + while (!(get_line(line, sizeof(line), f))) { 1.305 +@@ -270,13 +282,13 @@ 1.306 + else { 1.307 + apr_file_printf(errfile, "Changing password for user %s in realm %s\n", 1.308 + user, realm); 1.309 +- add_password(user, realm, tfp); 1.310 ++ add_password(user, realm, password, tfp); 1.311 + found = 1; 1.312 + } 1.313 + } 1.314 + if (!found) { 1.315 + apr_file_printf(errfile, "Adding user %s in realm %s\n", user, realm); 1.316 +- add_password(user, realm, tfp); 1.317 ++ add_password(user, realm, password, tfp); 1.318 + } 1.319 + apr_file_close(f); 1.320 + 1.321 +Index: server/util_pcre.c 1.322 +--- server/util_pcre.c.orig 2005-11-10 16:20:05.000000000 +0100 1.323 ++++ server/util_pcre.c 2012-02-05 21:25:24.000000000 +0100 1.324 +@@ -128,6 +128,7 @@ 1.325 + const char *errorptr; 1.326 + int erroffset; 1.327 + int options = 0; 1.328 ++int nsub = 0; 1.329 + 1.330 + if ((cflags & AP_REG_ICASE) != 0) options |= PCRE_CASELESS; 1.331 + if ((cflags & AP_REG_NEWLINE) != 0) options |= PCRE_MULTILINE; 1.332 +@@ -137,7 +138,8 @@ 1.333 + 1.334 + if (preg->re_pcre == NULL) return AP_REG_INVARG; 1.335 + 1.336 +-preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL); 1.337 ++pcre_fullinfo((const pcre *)preg->re_pcre, NULL, PCRE_INFO_CAPTURECOUNT, &nsub); 1.338 ++preg->re_nsub = (apr_size_t)nsub; 1.339 + return 0; 1.340 + } 1.341 +