wok rev 9248

Up busybox (1.18.4)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Mar 13 09:36:17 2011 +0100 (2011-03-13)
parents 2067efdf9cc2
children 6b5247b899e5
files busybox-pam/receipt busybox-static/receipt busybox/receipt busybox/stuff/busybox-1.18-cksum.u busybox/stuff/busybox-1.18-wget.u
line diff
     1.1 --- a/busybox-pam/receipt	Sat Mar 12 21:52:41 2011 +0000
     1.2 +++ b/busybox-pam/receipt	Sun Mar 13 09:36:17 2011 +0100
     1.3 @@ -1,7 +1,7 @@
     1.4  # SliTaz package receipt.
     1.5  
     1.6  PACKAGE="busybox-pam"
     1.7 -VERSION="1.18.3"
     1.8 +VERSION="1.18.4"
     1.9  CATEGORY="base-system"
    1.10  SHORT_DESC="Busybox combines tiny versions of many common UNIX utilities."
    1.11  MAINTAINER="pascal.bellard@slitaz.org"
     2.1 --- a/busybox-static/receipt	Sat Mar 12 21:52:41 2011 +0000
     2.2 +++ b/busybox-static/receipt	Sun Mar 13 09:36:17 2011 +0100
     2.3 @@ -1,7 +1,7 @@
     2.4  # SliTaz package receipt.
     2.5  
     2.6  PACKAGE="busybox-static"
     2.7 -VERSION="1.18.3"
     2.8 +VERSION="1.18.4"
     2.9  CATEGORY="base-system"
    2.10  SHORT_DESC="Busybox combines tiny versions of many common UNIX utilities."
    2.11  MAINTAINER="pascal.bellard@slitaz.org"
     3.1 --- a/busybox/receipt	Sat Mar 12 21:52:41 2011 +0000
     3.2 +++ b/busybox/receipt	Sun Mar 13 09:36:17 2011 +0100
     3.3 @@ -1,7 +1,7 @@
     3.4  # SliTaz package receipt.
     3.5  
     3.6  PACKAGE="busybox"
     3.7 -VERSION="1.18.3"
     3.8 +VERSION="1.18.4"
     3.9  CATEGORY="base-system"
    3.10  SHORT_DESC="Busybox combines tiny versions of many common UNIX utilities."
    3.11  MAINTAINER="pascal.bellard@slitaz.org"
    3.12 @@ -21,7 +21,6 @@
    3.13      	patch -p1 < ../stuff/$PACKAGE-${VERSION%.*}-$file || return 1
    3.14  	touch done.$file
    3.15      done <<EOT
    3.16 -wget.u
    3.17  tar.u
    3.18  stat.u
    3.19  ris.u
    3.20 @@ -29,7 +28,6 @@
    3.21  printable.u
    3.22  cmdline.u
    3.23  conspy.u
    3.24 -cksum.u
    3.25  EOT
    3.26      cp ../stuff/$PACKAGE-${VERSION%.*}.config .config
    3.27  }
     4.1 --- a/busybox/stuff/busybox-1.18-cksum.u	Sat Mar 12 21:52:41 2011 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,10 +0,0 @@
     4.4 ---- busybox-1.18.0/coreutils/cksum.c
     4.5 -+++ busybox-1.18.0/coreutils/cksum.c
     4.6 -@@ -38,6 +38,7 @@
     4.7 - 
     4.8 - #define read_buf bb_common_bufsiz1
     4.9 - 		while ((bytes_read = safe_read(fd, read_buf, sizeof(read_buf))) > 0) {
    4.10 -+			length += bytes_read;
    4.11 - 			crc = crc32_block_endian1(crc, read_buf, bytes_read, crc32_table);
    4.12 - 		}
    4.13 - 		close(fd);
     5.1 --- a/busybox/stuff/busybox-1.18-wget.u	Sat Mar 12 21:52:41 2011 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,128 +0,0 @@
     5.4 ---- busybox-1.18.3/networking/wget.c
     5.5 -+++ busybox-1.18.3-wget/networking/wget.c
     5.6 -@@ -446,7 +446,7 @@ static FILE* prepare_ftp_session(FILE **
     5.7 - 
     5.8 - static void NOINLINE retrieve_file_data(FILE *dfp, int output_fd)
     5.9 - {
    5.10 --	char buf[512];
    5.11 -+	char buf[4*1024]; /* made bigger to speed up local xfers */
    5.12 - #if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT
    5.13 - # if ENABLE_FEATURE_WGET_TIMEOUT
    5.14 - 	unsigned second_cnt;
    5.15 -@@ -455,7 +455,6 @@ static void NOINLINE retrieve_file_data(
    5.16 - 
    5.17 - 	polldata.fd = fileno(dfp);
    5.18 - 	polldata.events = POLLIN | POLLPRI;
    5.19 --	ndelay_on(polldata.fd);
    5.20 - #endif
    5.21 - 	progress_meter(PROGRESS_START);
    5.22 - 
    5.23 -@@ -464,6 +463,10 @@ static void NOINLINE retrieve_file_data(
    5.24 - 
    5.25 - 	/* Loops only if chunked */
    5.26 - 	while (1) {
    5.27 -+
    5.28 -+#if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT
    5.29 -+		ndelay_on(polldata.fd);
    5.30 -+#endif
    5.31 - 		while (1) {
    5.32 - 			int n;
    5.33 - 			unsigned rdsz;
    5.34 -@@ -493,22 +496,46 @@ static void NOINLINE retrieve_file_data(
    5.35 - 				progress_meter(PROGRESS_BUMP);
    5.36 - 			}
    5.37 - #endif
    5.38 -+			/* fread internally uses read loop, which in our case
    5.39 -+			 * is usually exited when we get EAGAIN.
    5.40 -+			 * In this case, libc sets error marker on the stream.
    5.41 -+			 * Need to clear it before next fread to avoid possible
    5.42 -+			 * rare false positive ferror below. Rare because usually
    5.43 -+			 * fread gets more than zero bytes, and we don't fall
    5.44 -+			 * into if (n <= 0) ...
    5.45 -+			 */
    5.46 -+			clearerr(dfp);
    5.47 -+			errno = 0;
    5.48 - 			n = safe_fread(buf, rdsz, dfp);
    5.49 -+			/* man fread:
    5.50 -+			 * If error occurs, or EOF is reached, the return value
    5.51 -+			 * is a short item count (or zero).
    5.52 -+			 * fread does not distinguish between EOF and error.
    5.53 -+			 */
    5.54 - 			if (n <= 0) {
    5.55 --				if (ferror(dfp)) {
    5.56 --					/* perror will not work: ferror doesn't set errno */
    5.57 --					bb_error_msg_and_die(bb_msg_read_error);
    5.58 --				}
    5.59 --				break;
    5.60 -+#if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT
    5.61 -+				if (errno == EAGAIN) /* poll lied, there is no data? */
    5.62 -+					continue; /* yes */
    5.63 -+#endif
    5.64 -+				if (ferror(dfp))
    5.65 -+					bb_perror_msg_and_die(bb_msg_read_error);
    5.66 -+				break; /* EOF, not error */
    5.67 - 			}
    5.68 -+
    5.69 - 			xwrite(output_fd, buf, n);
    5.70 - #if ENABLE_FEATURE_WGET_STATUSBAR
    5.71 - 			G.transferred += n;
    5.72 - 			progress_meter(PROGRESS_BUMP);
    5.73 - #endif
    5.74 --			if (G.got_clen)
    5.75 -+			if (G.got_clen) {
    5.76 - 				G.content_len -= n;
    5.77 -+				if (G.content_len == 0)
    5.78 -+					break;
    5.79 -+			}
    5.80 - 		}
    5.81 -+#if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT
    5.82 -+		ndelay_off(polldata.fd);
    5.83 -+#endif
    5.84 - 
    5.85 - 		if (!G.chunked)
    5.86 - 			break;
    5.87 -@@ -706,6 +733,11 @@ int wget_main(int argc UNUSED_PARAM, cha
    5.88 - 		fprintf(sfp, "Host: %s\r\nUser-Agent: %s\r\n",
    5.89 - 			target.host, user_agent);
    5.90 - 
    5.91 -+		/* Ask server to close the connection as soon as we are done
    5.92 -+		 * (IOW: we do not intend to send more requests)
    5.93 -+		 */
    5.94 -+		fprintf(sfp, "Connection: close\r\n");
    5.95 -+
    5.96 - #if ENABLE_FEATURE_WGET_AUTHENTICATION
    5.97 - 		if (target.user) {
    5.98 - 			fprintf(sfp, "Proxy-Authorization: Basic %s\r\n"+6,
    5.99 -@@ -719,22 +751,25 @@ int wget_main(int argc UNUSED_PARAM, cha
   5.100 - 
   5.101 - 		if (G.beg_range)
   5.102 - 			fprintf(sfp, "Range: bytes=%"OFF_FMT"u-\r\n", G.beg_range);
   5.103 -+
   5.104 - #if ENABLE_FEATURE_WGET_LONG_OPTIONS
   5.105 - 		if (extra_headers)
   5.106 - 			fputs(extra_headers, sfp);
   5.107 - 
   5.108 - 		if (opt & WGET_OPT_POST_DATA) {
   5.109 - 			char *estr = URL_escape(post_data);
   5.110 --			fprintf(sfp, "Content-Type: application/x-www-form-urlencoded\r\n");
   5.111 --			fprintf(sfp, "Content-Length: %u\r\n" "\r\n" "%s",
   5.112 --					(int) strlen(estr), estr);
   5.113 --			/*fprintf(sfp, "Connection: Keep-Alive\r\n\r\n");*/
   5.114 --			/*fprintf(sfp, "%s\r\n", estr);*/
   5.115 -+			fprintf(sfp,
   5.116 -+				"Content-Type: application/x-www-form-urlencoded\r\n"
   5.117 -+				"Content-Length: %u\r\n"
   5.118 -+				"\r\n"
   5.119 -+				"%s",
   5.120 -+				(int) strlen(estr), estr
   5.121 -+			);
   5.122 - 			free(estr);
   5.123 - 		} else
   5.124 - #endif
   5.125 --		{ /* If "Connection:" is needed, document why */
   5.126 --			fprintf(sfp, /* "Connection: close\r\n" */ "\r\n");
   5.127 -+		{
   5.128 -+			fprintf(sfp, "\r\n");
   5.129 - 		}
   5.130 - 
   5.131 - 		fflush(sfp);