summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander M Pickering <alex@cogarr.net>2024-11-11 12:27:03 -0600
committerAlexander M Pickering <alex@cogarr.net>2024-11-11 12:27:03 -0600
commitc0add6f460d368939558291e5579dfe28b6727fc (patch)
tree28767a570ff2bdc21d6dfdd4516506e12d758762
parent2453144d35095bc743b0b0aac28888027d920d0d (diff)
downloadbusybox-w32-packaging-c0add6f460d368939558291e5579dfe28b6727fc.tar.gz
busybox-w32-packaging-c0add6f460d368939558291e5579dfe28b6727fc.tar.bz2
busybox-w32-packaging-c0add6f460d368939558291e5579dfe28b6727fc.zip
Add colors
-rw-r--r--libressl.patch49
-rw-r--r--meta.lua2
2 files changed, 26 insertions, 25 deletions
diff --git a/libressl.patch b/libressl.patch
index ee924e6..6af3b51 100644
--- a/libressl.patch
+++ b/libressl.patch
@@ -135,7 +135,7 @@ index 9f1dd67ec..7e8da6df2 100644
135 static void tls_xwrite(tls_state_t *tls, int len) 135 static void tls_xwrite(tls_state_t *tls, int len)
136 { 136 {
137diff --git a/networking/wget.c b/networking/wget.c 137diff --git a/networking/wget.c b/networking/wget.c
138index 6a64836fb..3f1213af1 100644 138index 6a64836fb..3bd573e0a 100644
139--- a/networking/wget.c 139--- a/networking/wget.c
140+++ b/networking/wget.c 140+++ b/networking/wget.c
141@@ -169,7 +169,8 @@ 141@@ -169,7 +169,8 @@
@@ -158,7 +158,7 @@ index 6a64836fb..3f1213af1 100644
158- bb_simple_perror_msg_and_die("error getting response"); 158- bb_simple_perror_msg_and_die("error getting response");
159+ printf("wget fgets_trim_sanitize 2\n"); 159+ printf("wget fgets_trim_sanitize 2\n");
160+ if (fgets(G.wget_buf, sizeof(G.wget_buf), fp) == NULL){ 160+ if (fgets(G.wget_buf, sizeof(G.wget_buf), fp) == NULL){
161+ bb_simple_perror_msg_and_die("error getting response: %s",strerror(errno)); 161+ bb_error_msg_and_die("error getting response: %s",strerror(errno));
162+ } 162+ }
163 clear_alarm(); 163 clear_alarm();
164 164
@@ -194,7 +194,7 @@ index 6a64836fb..3f1213af1 100644
194 static int spawn_https_helper_openssl(const char *host, unsigned port) 194 static int spawn_https_helper_openssl(const char *host, unsigned port)
195 { 195 {
196 char *allocated = NULL; 196 char *allocated = NULL;
197@@ -777,6 +788,37 @@ static int spawn_https_helper_openssl(const char *host, unsigned port) 197@@ -777,6 +788,38 @@ static int spawn_https_helper_openssl(const char *host, unsigned port)
198 # endif 198 # endif
199 return sp[0]; 199 return sp[0];
200 } 200 }
@@ -226,13 +226,14 @@ index 6a64836fb..3f1213af1 100644
226+ tls_config_free(config); 226+ tls_config_free(config);
227+ free(allocated); 227+ free(allocated);
228+ free(servername); 228+ free(servername);
229+ printf("Connected sp %s\n");
229+ return sp[0]; 230+ return sp[0];
230+} 231+}
231+# endif 232+# endif
232 #endif 233 #endif
233 234
234 #if ENABLE_FEATURE_WGET_HTTPS 235 #if ENABLE_FEATURE_WGET_HTTPS
235@@ -1151,6 +1193,7 @@ static void download_one_url(const char *url) 236@@ -1151,6 +1194,7 @@ static void download_one_url(const char *url)
236 server.user = NULL; 237 server.user = NULL;
237 target.user = NULL; 238 target.user = NULL;
238 239
@@ -240,7 +241,7 @@ index 6a64836fb..3f1213af1 100644
240 parse_url(url, &target); 241 parse_url(url, &target);
241 242
242 /* Use the proxy if necessary */ 243 /* Use the proxy if necessary */
243@@ -1172,6 +1215,7 @@ static void download_one_url(const char *url) 244@@ -1172,6 +1216,7 @@ static void download_one_url(const char *url)
244 server.host = target.host; 245 server.host = target.host;
245 } 246 }
246 } 247 }
@@ -248,7 +249,7 @@ index 6a64836fb..3f1213af1 100644
248 249
249 if (ENABLE_FEATURE_IPV6) 250 if (ENABLE_FEATURE_IPV6)
250 strip_ipv6_scope_id(target.host); 251 strip_ipv6_scope_id(target.host);
251@@ -1191,6 +1235,7 @@ static void download_one_url(const char *url) 252@@ -1191,6 +1236,7 @@ static void download_one_url(const char *url)
252 G.fname_out = fname_out_alloc = xstrdup(G.fname_out); 253 G.fname_out = fname_out_alloc = xstrdup(G.fname_out);
253 } 254 }
254 } 255 }
@@ -256,7 +257,7 @@ index 6a64836fb..3f1213af1 100644
256 #if ENABLE_FEATURE_WGET_STATUSBAR 257 #if ENABLE_FEATURE_WGET_STATUSBAR
257 G.curfile = bb_get_last_path_component_nostrip(G.fname_out); 258 G.curfile = bb_get_last_path_component_nostrip(G.fname_out);
258 #endif 259 #endif
259@@ -1206,15 +1251,19 @@ static void download_one_url(const char *url) 260@@ -1206,15 +1252,19 @@ static void download_one_url(const char *url)
260 * We are not sure it exists on remote side */ 261 * We are not sure it exists on remote side */
261 } 262 }
262 263
@@ -276,7 +277,7 @@ index 6a64836fb..3f1213af1 100644
276 /*G.content_len = 0; - redundant, got_clen = 0 is enough */ 277 /*G.content_len = 0; - redundant, got_clen = 0 is enough */
277 G.got_clen = 0; 278 G.got_clen = 0;
278 G.chunked = 0; 279 G.chunked = 0;
279@@ -1229,37 +1278,49 @@ static void download_one_url(const char *url) 280@@ -1229,37 +1279,49 @@ static void download_one_url(const char *url)
280 281
281 /* Open socket to http(s) server */ 282 /* Open socket to http(s) server */
282 #if ENABLE_FEATURE_WGET_OPENSSL 283 #if ENABLE_FEATURE_WGET_OPENSSL
@@ -328,7 +329,7 @@ index 6a64836fb..3f1213af1 100644
328 /* Send HTTP request */ 329 /* Send HTTP request */
329 if (use_proxy) { 330 if (use_proxy) {
330 SENDFMT(sfp, "GET %s://%s/%s HTTP/1.1\r\n", 331 SENDFMT(sfp, "GET %s://%s/%s HTTP/1.1\r\n",
331@@ -1270,6 +1331,7 @@ static void download_one_url(const char *url) 332@@ -1270,6 +1332,7 @@ static void download_one_url(const char *url)
332 (option_mask32 & WGET_OPT_POST) ? "POST" : "GET", 333 (option_mask32 & WGET_OPT_POST) ? "POST" : "GET",
333 target.path); 334 target.path);
334 } 335 }
@@ -336,7 +337,7 @@ index 6a64836fb..3f1213af1 100644
336 if (!USR_HEADER_HOST) 337 if (!USR_HEADER_HOST)
337 SENDFMT(sfp, "Host: %s\r\n", target.host); 338 SENDFMT(sfp, "Host: %s\r\n", target.host);
338 if (!USR_HEADER_USER_AGENT) 339 if (!USR_HEADER_USER_AGENT)
339@@ -1280,6 +1342,7 @@ static void download_one_url(const char *url) 340@@ -1280,6 +1343,7 @@ static void download_one_url(const char *url)
340 */ 341 */
341 SENDFMT(sfp, "Connection: close\r\n"); 342 SENDFMT(sfp, "Connection: close\r\n");
342 343
@@ -344,7 +345,7 @@ index 6a64836fb..3f1213af1 100644
344 #if ENABLE_FEATURE_WGET_AUTHENTICATION 345 #if ENABLE_FEATURE_WGET_AUTHENTICATION
345 if (target.user && !USR_HEADER_AUTH) { 346 if (target.user && !USR_HEADER_AUTH) {
346 SENDFMT(sfp, "Proxy-Authorization: Basic %s\r\n"+6, 347 SENDFMT(sfp, "Proxy-Authorization: Basic %s\r\n"+6,
347@@ -1291,6 +1354,7 @@ static void download_one_url(const char *url) 348@@ -1291,6 +1355,7 @@ static void download_one_url(const char *url)
348 } 349 }
349 #endif 350 #endif
350 351
@@ -352,7 +353,7 @@ index 6a64836fb..3f1213af1 100644
352 if (G.beg_range != 0 && !USR_HEADER_RANGE) 353 if (G.beg_range != 0 && !USR_HEADER_RANGE)
353 SENDFMT(sfp, "Range: bytes=%"OFF_FMT"u-\r\n", G.beg_range); 354 SENDFMT(sfp, "Range: bytes=%"OFF_FMT"u-\r\n", G.beg_range);
354 355
355@@ -1300,6 +1364,7 @@ static void download_one_url(const char *url) 356@@ -1300,6 +1365,7 @@ static void download_one_url(const char *url)
356 fputs(G.extra_headers, sfp); 357 fputs(G.extra_headers, sfp);
357 } 358 }
358 359
@@ -360,7 +361,7 @@ index 6a64836fb..3f1213af1 100644
360 if (option_mask32 & WGET_OPT_POST_FILE) { 361 if (option_mask32 & WGET_OPT_POST_FILE) {
361 int fd = xopen_stdin(G.post_file); 362 int fd = xopen_stdin(G.post_file);
362 G.post_data = xmalloc_read(fd, NULL); 363 G.post_data = xmalloc_read(fd, NULL);
363@@ -1314,15 +1379,18 @@ static void download_one_url(const char *url) 364@@ -1314,15 +1380,18 @@ static void download_one_url(const char *url)
364 ); 365 );
365 } 366 }
366 # if ENABLE_PLATFORM_MINGW32 367 # if ENABLE_PLATFORM_MINGW32
@@ -379,7 +380,7 @@ index 6a64836fb..3f1213af1 100644
379 } else 380 } else
380 # else 381 # else
381 SENDFMT(sfp, 382 SENDFMT(sfp,
382@@ -1338,6 +1406,7 @@ static void download_one_url(const char *url) 383@@ -1338,6 +1407,7 @@ static void download_one_url(const char *url)
383 SENDFMT(sfp, "\r\n"); 384 SENDFMT(sfp, "\r\n");
384 } 385 }
385 386
@@ -387,7 +388,7 @@ index 6a64836fb..3f1213af1 100644
387 fflush(sfp); 388 fflush(sfp);
388 389
389 /* Tried doing this unconditionally. 390 /* Tried doing this unconditionally.
390@@ -1358,14 +1427,21 @@ static void download_one_url(const char *url) 391@@ -1358,14 +1428,21 @@ static void download_one_url(const char *url)
391 * Retrieve HTTP response line and check for "200" status code. 392 * Retrieve HTTP response line and check for "200" status code.
392 */ 393 */
393 read_response: 394 read_response:
@@ -409,7 +410,7 @@ index 6a64836fb..3f1213af1 100644
409 switch (status) { 410 switch (status) {
410 case 0: 411 case 0:
411 case 100: 412 case 100:
412@@ -1441,6 +1517,7 @@ However, in real world it was observed that some web servers 413@@ -1441,6 +1518,7 @@ However, in real world it was observed that some web servers
413 /* 414 /*
414 * Retrieve HTTP headers. 415 * Retrieve HTTP headers.
415 */ 416 */
@@ -417,7 +418,7 @@ index 6a64836fb..3f1213af1 100644
417 while ((str = get_sanitized_hdr(sfp)) != NULL) { 418 while ((str = get_sanitized_hdr(sfp)) != NULL) {
418 static const char keywords[] ALIGN1 = 419 static const char keywords[] ALIGN1 =
419 "content-length\0""transfer-encoding\0""location\0"; 420 "content-length\0""transfer-encoding\0""location\0";
420@@ -1497,6 +1574,7 @@ However, in real world it was observed that some web servers 421@@ -1497,6 +1575,7 @@ However, in real world it was observed that some web servers
421 goto establish_session; 422 goto establish_session;
422 } 423 }
423 } 424 }
@@ -425,7 +426,7 @@ index 6a64836fb..3f1213af1 100644
425 // if (status >= 300) 426 // if (status >= 300)
426 // bb_error_msg_and_die("bad redirection (no Location: header from server)"); 427 // bb_error_msg_and_die("bad redirection (no Location: header from server)");
427 428
428@@ -1514,6 +1592,7 @@ However, in real world it was observed that some web servers 429@@ -1514,6 +1593,7 @@ However, in real world it was observed that some web servers
429 430
430 free(lsa); 431 free(lsa);
431 432
@@ -433,7 +434,7 @@ index 6a64836fb..3f1213af1 100644
433 if (!(option_mask32 & WGET_OPT_SPIDER)) { 434 if (!(option_mask32 & WGET_OPT_SPIDER)) {
434 if (G.output_fd < 0) 435 if (G.output_fd < 0)
435 G.output_fd = xopen(G.fname_out, G.o_flags); 436 G.output_fd = xopen(G.fname_out, G.o_flags);
436@@ -1536,6 +1615,7 @@ However, in real world it was observed that some web servers 437@@ -1536,6 +1616,7 @@ However, in real world it was observed that some web servers
437 /* ftpcmd("QUIT", NULL, sfp); - why bother? */ 438 /* ftpcmd("QUIT", NULL, sfp); - why bother? */
438 } 439 }
439 #endif 440 #endif
@@ -441,7 +442,7 @@ index 6a64836fb..3f1213af1 100644
441 fclose(sfp); 442 fclose(sfp);
442 443
443 free(server.allocated); 444 free(server.allocated);
444@@ -1544,11 +1624,13 @@ However, in real world it was observed that some web servers 445@@ -1544,11 +1625,13 @@ However, in real world it was observed that some web servers
445 free(target.user); 446 free(target.user);
446 free(fname_out_alloc); 447 free(fname_out_alloc);
447 free(redirected_path); 448 free(redirected_path);
@@ -455,7 +456,7 @@ index 6a64836fb..3f1213af1 100644
455 #if ENABLE_FEATURE_WGET_LONG_OPTIONS 456 #if ENABLE_FEATURE_WGET_LONG_OPTIONS
456 static const char wget_longopts[] ALIGN1 = 457 static const char wget_longopts[] ALIGN1 =
457 /* name, has_arg, val */ 458 /* name, has_arg, val */
458@@ -1590,6 +1672,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") 459@@ -1590,6 +1673,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0")
459 #endif 460 #endif
460 461
461 INIT_G(); 462 INIT_G();
@@ -463,7 +464,7 @@ index 6a64836fb..3f1213af1 100644
463 464
464 #if ENABLE_FEATURE_WGET_TIMEOUT 465 #if ENABLE_FEATURE_WGET_TIMEOUT
465 G.timeout_seconds = 900; 466 G.timeout_seconds = 900;
466@@ -1626,6 +1709,8 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") 467@@ -1626,6 +1710,8 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0")
467 IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_data) 468 IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_data)
468 IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_file) 469 IF_FEATURE_WGET_LONG_OPTIONS(, &G.post_file)
469 ); 470 );
@@ -472,7 +473,7 @@ index 6a64836fb..3f1213af1 100644
472 #if 0 /* option bits debug */ 473 #if 0 /* option bits debug */
473 if (option_mask32 & WGET_OPT_RETRIES) bb_error_msg("-t NUM"); 474 if (option_mask32 & WGET_OPT_RETRIES) bb_error_msg("-t NUM");
474 if (option_mask32 & WGET_OPT_nsomething) bb_error_msg("-nsomething"); 475 if (option_mask32 & WGET_OPT_nsomething) bb_error_msg("-nsomething");
475@@ -1670,6 +1755,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") 476@@ -1670,6 +1756,7 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0")
476 } 477 }
477 #endif 478 #endif
478 479
@@ -480,7 +481,7 @@ index 6a64836fb..3f1213af1 100644
480 G.output_fd = -1; 481 G.output_fd = -1;
481 G.o_flags = O_WRONLY | O_CREAT | O_TRUNC | O_EXCL; 482 G.o_flags = O_WRONLY | O_CREAT | O_TRUNC | O_EXCL;
482 if (G.fname_out) { /* -O FILE ? */ 483 if (G.fname_out) { /* -O FILE ? */
483@@ -1691,8 +1777,11 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0") 484@@ -1691,8 +1778,11 @@ IF_DESKTOP( "no-parent\0" No_argument "\xf0")
484 } 485 }
485 } 486 }
486 487
diff --git a/meta.lua b/meta.lua
index 6e217a1..6d5a0b7 100644
--- a/meta.lua
+++ b/meta.lua
@@ -28,7 +28,7 @@ for opti_k, opti_v, rel_k, rel_v, _, comp_v in cartesian(optimizations, debug, c
28 ["busybox.exe"] = true 28 ["busybox.exe"] = true
29 }, 29 },
30 env = { 30 env = {
31 CFLAGS = opti_v .. " " .. rel_v, 31 CFLAGS = opti_v .. " " .. rel_v .. " -fdiagnostics-color=always",
32 } 32 }
33 } 33 }
34 if opti_k == "zero" then 34 if opti_k == "zero" then