Mon, 28 Jan 2013 17:37:18 +0100
Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.
1 Index: build/config_vars.sh.in
2 --- build/config_vars.sh.in.orig 2008-02-05 00:00:07.000000000 +0100
3 +++ build/config_vars.sh.in 2011-05-11 20:35:42.000000000 +0200
4 @@ -35,7 +35,7 @@
5 APU_CONFIG=@APU_CONFIG@
6 fi
8 -APR_LIBTOOL="`${APR_CONFIG} --apr-libtool`"
9 +APR_LIBTOOL="@prefix@/share/apache/build/libtool"
10 APR_INCLUDEDIR="`${APR_CONFIG} --includedir`"
11 APU_INCLUDEDIR="`${APU_CONFIG} --includedir`"
13 Index: config.layout
14 --- config.layout.orig 2004-11-21 19:50:36.000000000 +0100
15 +++ config.layout 2011-05-11 20:35:42.000000000 +0200
16 @@ -50,7 +50,7 @@
17 iconsdir: ${datadir}/icons
18 htdocsdir: ${datadir}/htdocs
19 manualdir: ${datadir}/manual
20 - cgidir: ${datadir}/cgi-bin
21 + cgidir: ${exec_prefix}/cgi
22 includedir: ${prefix}/include+
23 localstatedir: ${prefix}/var+
24 runtimedir: ${localstatedir}/run
25 Index: configure
26 --- configure.orig 2011-05-08 08:52:50.000000000 +0200
27 +++ configure 2011-05-11 20:35:43.000000000 +0200
28 @@ -3605,6 +3605,11 @@
29 { (exit 1); exit 1; }; }
30 fi
32 +if test "x${USE_BUNDLED_APR}" != "x" ; then
33 + apr_found=reconfig
34 + apr_config=srclib/apr/apr-1-config
35 +fi
36 +
37 if test "$apr_found" = "reconfig"; then
39 # save our work to this point; this allows the sub-package to use it
40 @@ -3965,6 +3970,11 @@
41 { (exit 1); exit 1; }; }
42 fi
44 +if test "x${USE_BUNDLED_APR}" != "x" ; then
45 + apu_found=reconfig
46 + apu_config=srclib/apr-util/apu-1-config
47 +fi
48 +
49 # Catch some misconfigurations:
50 case ${apr_found}.${apu_found} in
51 reconfig.yes)
52 Index: docs/conf/mime.types
53 --- docs/conf/mime.types.orig 2011-05-03 22:13:58.000000000 +0200
54 +++ docs/conf/mime.types 2011-05-11 20:37:13.000000000 +0200
55 @@ -119,6 +119,7 @@
56 # application/media_control+xml
57 application/mediaservercontrol+xml mscml
58 application/metalink4+xml meta4
59 +application/metalink+xml metalink
60 application/mets+xml mets
61 # application/mikey
62 application/mods+xml mods
63 Index: docs/docroot/index.html
64 --- docs/docroot/index.html.orig 2004-11-20 21:16:24.000000000 +0100
65 +++ docs/docroot/index.html 2011-05-11 20:35:43.000000000 +0200
66 @@ -1 +1,7 @@
67 -<html><body><h1>It works!</h1></body></html>
68 \ No newline at end of file
69 +<html>
70 + <body>
71 + <h1>It works!</h1>
72 + 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/>
73 + You now have to read the <a href="/apache-manual/">documentation</a> and configure it according to your local demands.
74 + </body>
75 +</html>
76 Index: modules/generators/mod_autoindex.c
77 --- modules/generators/mod_autoindex.c.orig 2011-02-10 16:24:20.000000000 +0100
78 +++ modules/generators/mod_autoindex.c 2011-05-11 20:35:43.000000000 +0200
79 @@ -1574,17 +1574,17 @@
81 ++cols;
82 }
83 - ap_rputs("<th>", r);
84 + ap_rputs("<th align=\"left\">", r);
85 emit_link(r, "Name", K_NAME, keyid, direction,
86 colargs, static_columns);
87 if (!(autoindex_opts & SUPPRESS_LAST_MOD)) {
88 - ap_rputs("</th><th>", r);
89 + ap_rputs("</th><th align=\"right\">", r);
90 emit_link(r, "Last modified", K_LAST_MOD, keyid, direction,
91 colargs, static_columns);
92 ++cols;
93 }
94 if (!(autoindex_opts & SUPPRESS_SIZE)) {
95 - ap_rputs("</th><th>", r);
96 + ap_rputs("</th><th align=\"right\">", r);
97 emit_link(r, "Size", K_SIZE, keyid, direction,
98 colargs, static_columns);
99 ++cols;
100 @@ -1678,7 +1678,14 @@
101 }
103 if (autoindex_opts & TABLE_INDEXING) {
104 - ap_rputs("<tr>", r);
105 + char *class;
106 + if (strcmp(t2, "Parent Directory") == 0)
107 + class = "updir";
108 + else if (ar[x]->isdir)
109 + class = "dir";
110 + else
111 + class = "file";
112 + ap_rvputs(r, "<tr class=\"", class, "\">", NULL);
113 if (!(autoindex_opts & SUPPRESS_ICON)) {
114 ap_rputs("<td valign=\"top\">", r);
115 if (autoindex_opts & ICONS_ARE_LINKS) {
116 @@ -1763,9 +1770,6 @@
117 desc_width), NULL);
118 }
119 }
120 - else {
121 - ap_rputs("</td><td> ", r);
122 - }
123 }
124 ap_rputs("</td></tr>\n", r);
125 }
126 Index: server/Makefile.in
127 --- server/Makefile.in.orig 2011-04-14 18:37:58.000000000 +0200
128 +++ server/Makefile.in 2011-05-11 20:35:43.000000000 +0200
129 @@ -56,7 +56,8 @@
130 tmp=export_files_unsorted.txt; \
131 rm -f $$tmp && touch $$tmp; \
132 for dir in $(EXPORT_DIRS); do \
133 - ls $$dir/*.h >> $$tmp; \
134 + abs_dir=`cd $$dir && exec pwd`; \
135 + ls $$abs_dir/*.h >> $$tmp; \
136 done; \
137 for dir in $(EXPORT_DIRS_APR); do \
138 (ls $$dir/ap[ru].h $$dir/ap[ru]_*.h >> $$tmp 2>/dev/null); \
139 Index: support/Makefile.in
140 --- support/Makefile.in.orig 2011-04-16 21:09:47.000000000 +0200
141 +++ support/Makefile.in 2011-05-11 20:35:43.000000000 +0200
142 @@ -22,12 +22,6 @@
143 chmod 755 $(DESTDIR)$(sbindir)/$$i; \
144 fi ; \
145 done
146 - @if test -f "$(builddir)/envvars-std"; then \
147 - cp -p envvars-std $(DESTDIR)$(sbindir); \
148 - if test ! -f $(DESTDIR)$(sbindir)/envvars; then \
149 - cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \
150 - fi ; \
151 - fi
153 htpasswd_OBJECTS = htpasswd.lo
154 htpasswd: $(htpasswd_OBJECTS)
155 Index: support/apachectl.in
156 --- support/apachectl.in.orig 2006-07-12 05:38:44.000000000 +0200
157 +++ support/apachectl.in 2011-05-11 20:35:43.000000000 +0200
158 @@ -43,11 +43,6 @@
159 # the path to your httpd binary, including options if necessary
160 HTTPD='@exp_sbindir@/@progname@'
161 #
162 -# pick up any necessary environment variables
163 -if test -f @exp_sbindir@/envvars; then
164 - . @exp_sbindir@/envvars
165 -fi
166 -#
167 # a command that outputs a formatted text version of the HTML at the
168 # url given on the command line. Designed for lynx, however other
169 # programs may work.
170 Index: support/apxs.in
171 --- support/apxs.in.orig 2010-05-10 22:02:56.000000000 +0200
172 +++ support/apxs.in 2011-05-11 20:35:43.000000000 +0200
173 @@ -80,6 +80,7 @@
174 # the "+" metacharacter at the format string to allow a list to be built by
175 # subsequent occurrences of the same option.
176 sub Getopts {
177 + no warnings 'deprecated';
178 my ($argumentative, @ARGV) = @_;
179 my $errs = 0;
180 local $_;
181 @@ -189,9 +190,6 @@
182 my $httpd = get_vars("sbindir") . "/" . get_vars("progname");
183 $httpd = eval qq("$httpd");
184 $httpd = eval qq("$httpd");
185 -my $envvars = get_vars("sbindir") . "/envvars";
186 -$envvars = eval qq("$envvars");
187 -$envvars = eval qq("$envvars");
189 #allow apxs to be run from the source tree, before installation
190 if ($0 =~ m:support/apxs$:) {
191 @@ -203,7 +201,7 @@
192 exit 1;
193 }
195 -unless (grep /mod_so/, `. $envvars && $httpd -l`) {
196 +unless (grep /mod_so/, `$httpd -l`) {
197 error("Sorry, no shared object support for Apache");
198 error("available under your platform. Make sure");
199 error("the Apache module mod_so is compiled into");
200 @@ -337,8 +335,7 @@
201 exit(1);
202 }
204 -my $libtool = `$apr_config --apr-libtool`;
205 -chomp($libtool);
206 +my $libtool = "$prefix/share/apache/build/libtool";
208 my $apr_includedir = `$apr_config --includes`;
209 chomp($apr_includedir);
210 Index: support/htdigest.c
211 --- support/htdigest.c.orig 2010-09-22 03:35:42.000000000 +0200
212 +++ support/htdigest.c 2011-05-11 20:35:43.000000000 +0200
213 @@ -119,7 +119,7 @@
214 }
217 -static void add_password(const char *user, const char *realm, apr_file_t *f)
218 +static void add_password(const char *user, const char *realm, const char *pw0, apr_file_t *f)
219 {
220 char *pw;
221 apr_md5_ctx_t context;
222 @@ -130,6 +130,9 @@
223 unsigned int i;
224 apr_size_t len = sizeof(pwin);
226 + if (pw0 != NULL)
227 + pw = pw0;
228 + else {
229 if (apr_password_get("New password: ", pwin, &len) != APR_SUCCESS) {
230 apr_file_printf(errfile, "password too long");
231 cleanup_tempfile_and_exit(5);
232 @@ -141,6 +144,7 @@
233 cleanup_tempfile_and_exit(1);
234 }
235 pw = pwin;
236 + }
237 apr_file_printf(f, "%s:%s:", user, realm);
239 /* Do MD5 stuff */
240 @@ -161,7 +165,7 @@
242 static void usage(void)
243 {
244 - apr_file_printf(errfile, "Usage: htdigest [-c] passwordfile realm username\n");
245 + apr_file_printf(errfile, "Usage: htdigest [-c] passwordfile realm username [password]\n");
246 apr_file_printf(errfile, "The -c flag creates a new file.\n");
247 exit(1);
248 }
249 @@ -188,6 +192,8 @@
250 char *dirname;
251 char user[MAX_STRING_LEN];
252 char realm[MAX_STRING_LEN];
253 + char *password = NULL;
254 + char passwordb[MAX_STRING_LEN];
255 char line[3 * MAX_STRING_LEN];
256 char l[3 * MAX_STRING_LEN];
257 char w[MAX_STRING_LEN];
258 @@ -209,9 +215,7 @@
259 #endif
261 apr_signal(SIGINT, (void (*)(int)) interrupted);
262 - if (argc == 5) {
263 - if (strcmp(argv[1], "-c"))
264 - usage();
265 + if ((argc == 5 || argc == 6) && strcmp(argv[1], "-c") == 0) {
266 rv = apr_file_open(&f, argv[2], APR_WRITE | APR_CREATE,
267 APR_OS_DEFAULT, cntxt);
268 if (rv != APR_SUCCESS) {
269 @@ -222,15 +226,19 @@
270 apr_strerror(rv, errmsg, sizeof errmsg));
271 exit(1);
272 }
273 + if (argc == 6) {
274 + apr_cpystrn(passwordb, argv[5], sizeof(passwordb));
275 + password = passwordb;
276 + }
277 apr_cpystrn(user, argv[4], sizeof(user));
278 apr_cpystrn(realm, argv[3], sizeof(realm));
279 apr_file_printf(errfile, "Adding password for %s in realm %s.\n",
280 user, realm);
281 - add_password(user, realm, f);
282 + add_password(user, realm, password, f);
283 apr_file_close(f);
284 exit(0);
285 }
286 - else if (argc != 4)
287 + else if (argc != 4 && argc != 5)
288 usage();
290 if (apr_temp_dir_get((const char**)&dirname, cntxt) != APR_SUCCESS) {
291 @@ -253,6 +261,10 @@
292 }
293 apr_cpystrn(user, argv[3], sizeof(user));
294 apr_cpystrn(realm, argv[2], sizeof(realm));
295 + if (argc == 5) {
296 + apr_cpystrn(passwordb, argv[4], sizeof(passwordb));
297 + password = passwordb;
298 + }
300 found = 0;
301 while (!(get_line(line, sizeof(line), f))) {
302 @@ -270,13 +282,13 @@
303 else {
304 apr_file_printf(errfile, "Changing password for user %s in realm %s\n",
305 user, realm);
306 - add_password(user, realm, tfp);
307 + add_password(user, realm, password, tfp);
308 found = 1;
309 }
310 }
311 if (!found) {
312 apr_file_printf(errfile, "Adding user %s in realm %s\n", user, realm);
313 - add_password(user, realm, tfp);
314 + add_password(user, realm, password, tfp);
315 }
316 apr_file_close(f);
318 Index: server/util_pcre.c
319 --- server/util_pcre.c.orig 2005-11-10 16:20:05.000000000 +0100
320 +++ server/util_pcre.c 2012-02-05 21:25:24.000000000 +0100
321 @@ -128,6 +128,7 @@
322 const char *errorptr;
323 int erroffset;
324 int options = 0;
325 +int nsub = 0;
327 if ((cflags & AP_REG_ICASE) != 0) options |= PCRE_CASELESS;
328 if ((cflags & AP_REG_NEWLINE) != 0) options |= PCRE_MULTILINE;
329 @@ -137,7 +138,8 @@
331 if (preg->re_pcre == NULL) return AP_REG_INVARG;
333 -preg->re_nsub = pcre_info((const pcre *)preg->re_pcre, NULL, NULL);
334 +pcre_fullinfo((const pcre *)preg->re_pcre, NULL, PCRE_INFO_CAPTURECOUNT, &nsub);
335 +preg->re_nsub = (apr_size_t)nsub;
336 return 0;
337 }