diff -r 5a93a7863039 -r f805be991d7f apache/apache.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/apache/apache.patch Mon Sep 17 19:01:16 2012 +0200
@@ -0,0 +1,338 @@
+Index: build/config_vars.sh.in
+--- build/config_vars.sh.in.orig 2008-02-05 00:00:07.000000000 +0100
++++ build/config_vars.sh.in 2011-05-11 20:35:42.000000000 +0200
+@@ -35,7 +35,7 @@
+ APU_CONFIG=@APU_CONFIG@
+ fi
+
+-APR_LIBTOOL="`${APR_CONFIG} --apr-libtool`"
++APR_LIBTOOL="@prefix@/share/apache/build/libtool"
+ APR_INCLUDEDIR="`${APR_CONFIG} --includedir`"
+ APU_INCLUDEDIR="`${APU_CONFIG} --includedir`"
+
+Index: config.layout
+--- config.layout.orig 2004-11-21 19:50:36.000000000 +0100
++++ config.layout 2011-05-11 20:35:42.000000000 +0200
+@@ -50,7 +50,7 @@
+ iconsdir: ${datadir}/icons
+ htdocsdir: ${datadir}/htdocs
+ manualdir: ${datadir}/manual
+- cgidir: ${datadir}/cgi-bin
++ cgidir: ${exec_prefix}/cgi
+ includedir: ${prefix}/include+
+ localstatedir: ${prefix}/var+
+ runtimedir: ${localstatedir}/run
+Index: configure
+--- configure.orig 2011-05-08 08:52:50.000000000 +0200
++++ configure 2011-05-11 20:35:43.000000000 +0200
+@@ -3605,6 +3605,11 @@
+ { (exit 1); exit 1; }; }
+ fi
+
++if test "x${USE_BUNDLED_APR}" != "x" ; then
++ apr_found=reconfig
++ apr_config=srclib/apr/apr-1-config
++fi
++
+ if test "$apr_found" = "reconfig"; then
+
+ # save our work to this point; this allows the sub-package to use it
+@@ -3965,6 +3970,11 @@
+ { (exit 1); exit 1; }; }
+ fi
+
++if test "x${USE_BUNDLED_APR}" != "x" ; then
++ apu_found=reconfig
++ apu_config=srclib/apr-util/apu-1-config
++fi
++
+ # Catch some misconfigurations:
+ case ${apr_found}.${apu_found} in
+ reconfig.yes)
+Index: docs/conf/mime.types
+--- docs/conf/mime.types.orig 2011-05-03 22:13:58.000000000 +0200
++++ docs/conf/mime.types 2011-05-11 20:37:13.000000000 +0200
+@@ -119,6 +119,7 @@
+ # application/media_control+xml
+ application/mediaservercontrol+xml mscml
+ application/metalink4+xml meta4
++application/metalink+xml metalink
+ application/mets+xml mets
+ # application/mikey
+ application/mods+xml mods
+Index: docs/docroot/index.html
+--- docs/docroot/index.html.orig 2004-11-20 21:16:24.000000000 +0100
++++ docs/docroot/index.html 2011-05-11 20:35:43.000000000 +0200
+@@ -1 +1,7 @@
+-
It works!
+\ No newline at end of file
++
++
++ It works!
++ It works! Your OpenPKG based Apache HTTP server was successfully installed and started.
++ You now have to read the documentation and configure it according to your local demands.
++
++
+Index: modules/generators/mod_autoindex.c
+--- modules/generators/mod_autoindex.c.orig 2011-02-10 16:24:20.000000000 +0100
++++ modules/generators/mod_autoindex.c 2011-05-11 20:35:43.000000000 +0200
+@@ -1574,17 +1574,17 @@
+
+ ++cols;
+ }
+- ap_rputs("", r);
++ ap_rputs(" | ", r);
+ emit_link(r, "Name", K_NAME, keyid, direction,
+ colargs, static_columns);
+ if (!(autoindex_opts & SUPPRESS_LAST_MOD)) {
+- ap_rputs(" | ", r);
++ ap_rputs(" | ", r);
+ emit_link(r, "Last modified", K_LAST_MOD, keyid, direction,
+ colargs, static_columns);
+ ++cols;
+ }
+ if (!(autoindex_opts & SUPPRESS_SIZE)) {
+- ap_rputs(" | ", r);
++ ap_rputs(" | ", r);
+ emit_link(r, "Size", K_SIZE, keyid, direction,
+ colargs, static_columns);
+ ++cols;
+@@ -1678,7 +1678,14 @@
+ }
+
+ if (autoindex_opts & TABLE_INDEXING) {
+- ap_rputs(" | ", r);
++ char *class;
++ if (strcmp(t2, "Parent Directory") == 0)
++ class = "updir";
++ else if (ar[x]->isdir)
++ class = "dir";
++ else
++ class = "file";
++ ap_rvputs(r, "
", NULL);
+ if (!(autoindex_opts & SUPPRESS_ICON)) {
+ ap_rputs("", r);
+ if (autoindex_opts & ICONS_ARE_LINKS) {
+@@ -1763,9 +1770,6 @@
+ desc_width), NULL);
+ }
+ }
+- else {
+- ap_rputs(" | ", r);
+- }
+ }
+ ap_rputs(" |
\n", r);
+ }
+Index: server/Makefile.in
+--- server/Makefile.in.orig 2011-04-14 18:37:58.000000000 +0200
++++ server/Makefile.in 2011-05-11 20:35:43.000000000 +0200
+@@ -56,7 +56,8 @@
+ tmp=export_files_unsorted.txt; \
+ rm -f $$tmp && touch $$tmp; \
+ for dir in $(EXPORT_DIRS); do \
+- ls $$dir/*.h >> $$tmp; \
++ abs_dir=`cd $$dir && exec pwd`; \
++ ls $$abs_dir/*.h >> $$tmp; \
+ done; \
+ for dir in $(EXPORT_DIRS_APR); do \
+ (ls $$dir/ap[ru].h $$dir/ap[ru]_*.h >> $$tmp 2>/dev/null); \
+Index: support/Makefile.in
+--- support/Makefile.in.orig 2011-04-16 21:09:47.000000000 +0200
++++ support/Makefile.in 2011-05-11 20:35:43.000000000 +0200
+@@ -22,12 +22,6 @@
+ chmod 755 $(DESTDIR)$(sbindir)/$$i; \
+ fi ; \
+ done
+- @if test -f "$(builddir)/envvars-std"; then \
+- cp -p envvars-std $(DESTDIR)$(sbindir); \
+- if test ! -f $(DESTDIR)$(sbindir)/envvars; then \
+- cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \
+- fi ; \
+- fi
+
+ htpasswd_OBJECTS = htpasswd.lo
+ htpasswd: $(htpasswd_OBJECTS)
+Index: support/apachectl.in
+--- support/apachectl.in.orig 2006-07-12 05:38:44.000000000 +0200
++++ support/apachectl.in 2011-05-11 20:35:43.000000000 +0200
+@@ -43,11 +43,6 @@
+ # the path to your httpd binary, including options if necessary
+ HTTPD='@exp_sbindir@/@progname@'
+ #
+-# pick up any necessary environment variables
+-if test -f @exp_sbindir@/envvars; then
+- . @exp_sbindir@/envvars
+-fi
+-#
+ # a command that outputs a formatted text version of the HTML at the
+ # url given on the command line. Designed for lynx, however other
+ # programs may work.
+Index: support/apxs.in
+--- support/apxs.in.orig 2010-05-10 22:02:56.000000000 +0200
++++ support/apxs.in 2011-05-11 20:35:43.000000000 +0200
+@@ -80,6 +80,7 @@
+ # the "+" metacharacter at the format string to allow a list to be built by
+ # subsequent occurrences of the same option.
+ sub Getopts {
++ no warnings 'deprecated';
+ my ($argumentative, @ARGV) = @_;
+ my $errs = 0;
+ local $_;
+@@ -189,9 +190,6 @@
+ my $httpd = get_vars("sbindir") . "/" . get_vars("progname");
+ $httpd = eval qq("$httpd");
+ $httpd = eval qq("$httpd");
+-my $envvars = get_vars("sbindir") . "/envvars";
+-$envvars = eval qq("$envvars");
+-$envvars = eval qq("$envvars");
+
+ #allow apxs to be run from the source tree, before installation
+ if ($0 =~ m:support/apxs$:) {
+@@ -203,7 +201,7 @@
+ exit 1;
+ }
+
+-unless (grep /mod_so/, `. $envvars && $httpd -l`) {
++unless (grep /mod_so/, `$httpd -l`) {
+ error("Sorry, no shared object support for Apache");
+ error("available under your platform. Make sure");
+ error("the Apache module mod_so is compiled into");
+@@ -337,8 +335,7 @@
+ exit(1);
+ }
+
+-my $libtool = `$apr_config --apr-libtool`;
+-chomp($libtool);
++my $libtool = "$prefix/share/apache/build/libtool";
+
+ my $apr_includedir = `$apr_config --includes`;
+ chomp($apr_includedir);
+Index: support/htdigest.c
+--- support/htdigest.c.orig 2010-09-22 03:35:42.000000000 +0200
++++ support/htdigest.c 2011-05-11 20:35:43.000000000 +0200
+@@ -119,7 +119,7 @@
+ }
+
+
+-static void add_password(const char *user, const char *realm, apr_file_t *f)
++static void add_password(const char *user, const char *realm, const char *pw0, apr_file_t *f)
+ {
+ char *pw;
+ apr_md5_ctx_t context;
+@@ -130,6 +130,9 @@
+ unsigned int i;
+ apr_size_t len = sizeof(pwin);
+
++ if (pw0 != NULL)
++ pw = pw0;
++ else {
+ if (apr_password_get("New password: ", pwin, &len) != APR_SUCCESS) {
+ apr_file_printf(errfile, "password too long");
+ cleanup_tempfile_and_exit(5);
+@@ -141,6 +144,7 @@
+ cleanup_tempfile_and_exit(1);
+ }
+ pw = pwin;
++ }
+ apr_file_printf(f, "%s:%s:", user, realm);
+
+ /* Do MD5 stuff */
+@@ -161,7 +165,7 @@
+
+ static void usage(void)
+ {
+- apr_file_printf(errfile, "Usage: htdigest [-c] passwordfile realm username\n");
++ apr_file_printf(errfile, "Usage: htdigest [-c] passwordfile realm username [password]\n");
+ apr_file_printf(errfile, "The -c flag creates a new file.\n");
+ exit(1);
+ }
+@@ -188,6 +192,8 @@
+ char *dirname;
+ char user[MAX_STRING_LEN];
+ char realm[MAX_STRING_LEN];
++ char *password = NULL;
++ char passwordb[MAX_STRING_LEN];
+ char line[3 * MAX_STRING_LEN];
+ char l[3 * MAX_STRING_LEN];
+ char w[MAX_STRING_LEN];
+@@ -209,9 +215,7 @@
+ #endif
+
+ apr_signal(SIGINT, (void (*)(int)) interrupted);
+- if (argc == 5) {
+- if (strcmp(argv[1], "-c"))
+- usage();
++ if ((argc == 5 || argc == 6) && strcmp(argv[1], "-c") == 0) {
+ rv = apr_file_open(&f, argv[2], APR_WRITE | APR_CREATE,
+ APR_OS_DEFAULT, cntxt);
+ if (rv != APR_SUCCESS) {
+@@ -222,15 +226,19 @@
+ apr_strerror(rv, errmsg, sizeof errmsg));
+ exit(1);
+ }
++ if (argc == 6) {
++ apr_cpystrn(passwordb, argv[5], sizeof(passwordb));
++ password = passwordb;
++ }
+ apr_cpystrn(user, argv[4], sizeof(user));
+ apr_cpystrn(realm, argv[3], sizeof(realm));
+ apr_file_printf(errfile, "Adding password for %s in realm %s.\n",
+ user, realm);
+- add_password(user, realm, f);
++ add_password(user, realm, password, f);
+ apr_file_close(f);
+ exit(0);
+ }
+- else if (argc != 4)
++ else if (argc != 4 && argc != 5)
+ usage();
+
+ if (apr_temp_dir_get((const char**)&dirname, cntxt) != APR_SUCCESS) {
+@@ -253,6 +261,10 @@
+ }
+ apr_cpystrn(user, argv[3], sizeof(user));
+ apr_cpystrn(realm, argv[2], sizeof(realm));
++ if (argc == 5) {
++ apr_cpystrn(passwordb, argv[4], sizeof(passwordb));
++ password = passwordb;
++ }
+
+ found = 0;
+ while (!(get_line(line, sizeof(line), f))) {
+@@ -270,13 +282,13 @@
+ else {
+ apr_file_printf(errfile, "Changing password for user %s in realm %s\n",
+ user, realm);
+- add_password(user, realm, tfp);
++ add_password(user, realm, password, tfp);
+ found = 1;
+ }
+ }
+ if (!found) {
+ apr_file_printf(errfile, "Adding user %s in realm %s\n", user, realm);
+- add_password(user, realm, tfp);
++ add_password(user, realm, password, tfp);
+ }
+ apr_file_close(f);
+
+Index: server/util_pcre.c
+--- server/util_pcre.c.orig 2005-11-10 16:20:05.000000000 +0100
++++ server/util_pcre.c 2012-02-05 21:25:24.000000000 +0100
+@@ -128,6 +128,7 @@
+ const char *errorptr;
+ int erroffset;
+ int options = 0;
++int nsub = 0;
+
+ if ((cflags & AP_REG_ICASE) != 0) options |= PCRE_CASELESS;
+ if ((cflags & AP_REG_NEWLINE) != 0) options |= PCRE_MULTILINE;
+@@ -137,7 +138,8 @@
+
+ if (preg->re_pcre == NULL) return AP_REG_INVARG;
+
+-preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL);
++pcre_fullinfo((const pcre *)preg->re_pcre, NULL, PCRE_INFO_CAPTURECOUNT, &nsub);
++preg->re_nsub = (apr_size_t)nsub;
+ return 0;
+ }
+