]> git.pld-linux.org Git - packages/busybox.git/commitdiff
- rel 2; upstream patches auto/th/busybox-1_18_3-2
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 17 Feb 2011 21:33:43 +0000 (21:33 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    busybox-1.18.3-buildsys.patch -> 1.1
    busybox-1.18.3-modutils24.patch -> 1.1
    busybox-1.18.3-wget.patch -> 1.1
    busybox.spec -> 1.186

busybox-1.18.3-buildsys.patch [new file with mode: 0644]
busybox-1.18.3-modutils24.patch [new file with mode: 0644]
busybox-1.18.3-wget.patch [new file with mode: 0644]
busybox.spec

diff --git a/busybox-1.18.3-buildsys.patch b/busybox-1.18.3-buildsys.patch
new file mode 100644 (file)
index 0000000..330b73f
--- /dev/null
@@ -0,0 +1,10 @@
+--- busybox-1.18.3/Config.in
++++ busybox-1.18.3-buildsys/Config.in
+@@ -126,7 +126,6 @@ config FEATURE_INSTALLER
+ config INSTALL_NO_USR
+       bool "Don't use /usr"
+       default n
+-      depends on FEATURE_INSTALLER
+       help
+         Disable use of /usr. busybox --install and "make install"
+         will install applets only to /bin and /sbin,
diff --git a/busybox-1.18.3-modutils24.patch b/busybox-1.18.3-modutils24.patch
new file mode 100644 (file)
index 0000000..2b13787
--- /dev/null
@@ -0,0 +1,36 @@
+--- busybox-1.18.3/modutils/modutils-24.c
++++ busybox-1.18.3-modutils24/modutils/modutils-24.c
+@@ -2474,6 +2474,7 @@ new_process_module_arguments(struct obj_
+               n = 0;
+               p = val;
+               while (*p != 0) {
++                      char sv_ch;
+                       char *endp;
+                       if (++n > max)
+@@ -2482,14 +2483,17 @@ new_process_module_arguments(struct obj_
+                       switch (*pinfo) {
+                       case 's':
+                               len = strcspn(p, ",");
++                              sv_ch = p[len];
+                               p[len] = 0;
+                               obj_string_patch(f, sym->secidx,
+                                                loc - contents, p);
+                               loc += tgt_sizeof_char_p;
+                               p += len;
++                              *p = sv_ch;
+                               break;
+                       case 'c':
+                               len = strcspn(p, ",");
++                              sv_ch = p[len];
+                               p[len] = 0;
+                               if (len >= charssize)
+                                       bb_error_msg_and_die("string too long for %s (max %ld)", param,
+@@ -2497,6 +2501,7 @@ new_process_module_arguments(struct obj_
+                               strcpy((char *) loc, p);
+                               loc += charssize;
+                               p += len;
++                              *p = sv_ch;
+                               break;
+                       case 'b':
+                               *loc++ = strtoul(p, &endp, 0);
diff --git a/busybox-1.18.3-wget.patch b/busybox-1.18.3-wget.patch
new file mode 100644 (file)
index 0000000..88cfc91
--- /dev/null
@@ -0,0 +1,128 @@
+--- busybox-1.18.3/networking/wget.c
++++ busybox-1.18.3-wget/networking/wget.c
+@@ -446,7 +446,7 @@ static FILE* prepare_ftp_session(FILE **
+ static void NOINLINE retrieve_file_data(FILE *dfp, int output_fd)
+ {
+-      char buf[512];
++      char buf[4*1024]; /* made bigger to speed up local xfers */
+ #if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT
+ # if ENABLE_FEATURE_WGET_TIMEOUT
+       unsigned second_cnt;
+@@ -455,7 +455,6 @@ static void NOINLINE retrieve_file_data(
+       polldata.fd = fileno(dfp);
+       polldata.events = POLLIN | POLLPRI;
+-      ndelay_on(polldata.fd);
+ #endif
+       progress_meter(PROGRESS_START);
+@@ -464,6 +463,10 @@ static void NOINLINE retrieve_file_data(
+       /* Loops only if chunked */
+       while (1) {
++
++#if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT
++              ndelay_on(polldata.fd);
++#endif
+               while (1) {
+                       int n;
+                       unsigned rdsz;
+@@ -493,22 +496,46 @@ static void NOINLINE retrieve_file_data(
+                               progress_meter(PROGRESS_BUMP);
+                       }
+ #endif
++                      /* fread internally uses read loop, which in our case
++                       * is usually exited when we get EAGAIN.
++                       * In this case, libc sets error marker on the stream.
++                       * Need to clear it before next fread to avoid possible
++                       * rare false positive ferror below. Rare because usually
++                       * fread gets more than zero bytes, and we don't fall
++                       * into if (n <= 0) ...
++                       */
++                      clearerr(dfp);
++                      errno = 0;
+                       n = safe_fread(buf, rdsz, dfp);
++                      /* man fread:
++                       * If error occurs, or EOF is reached, the return value
++                       * is a short item count (or zero).
++                       * fread does not distinguish between EOF and error.
++                       */
+                       if (n <= 0) {
+-                              if (ferror(dfp)) {
+-                                      /* perror will not work: ferror doesn't set errno */
+-                                      bb_error_msg_and_die(bb_msg_read_error);
+-                              }
+-                              break;
++#if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT
++                              if (errno == EAGAIN) /* poll lied, there is no data? */
++                                      continue; /* yes */
++#endif
++                              if (ferror(dfp))
++                                      bb_perror_msg_and_die(bb_msg_read_error);
++                              break; /* EOF, not error */
+                       }
++
+                       xwrite(output_fd, buf, n);
+ #if ENABLE_FEATURE_WGET_STATUSBAR
+                       G.transferred += n;
+                       progress_meter(PROGRESS_BUMP);
+ #endif
+-                      if (G.got_clen)
++                      if (G.got_clen) {
+                               G.content_len -= n;
++                              if (G.content_len == 0)
++                                      break;
++                      }
+               }
++#if ENABLE_FEATURE_WGET_STATUSBAR || ENABLE_FEATURE_WGET_TIMEOUT
++              ndelay_off(polldata.fd);
++#endif
+               if (!G.chunked)
+                       break;
+@@ -706,6 +733,11 @@ int wget_main(int argc UNUSED_PARAM, cha
+               fprintf(sfp, "Host: %s\r\nUser-Agent: %s\r\n",
+                       target.host, user_agent);
++              /* Ask server to close the connection as soon as we are done
++               * (IOW: we do not intend to send more requests)
++               */
++              fprintf(sfp, "Connection: close\r\n");
++
+ #if ENABLE_FEATURE_WGET_AUTHENTICATION
+               if (target.user) {
+                       fprintf(sfp, "Proxy-Authorization: Basic %s\r\n"+6,
+@@ -719,22 +751,25 @@ int wget_main(int argc UNUSED_PARAM, cha
+               if (G.beg_range)
+                       fprintf(sfp, "Range: bytes=%"OFF_FMT"u-\r\n", G.beg_range);
++
+ #if ENABLE_FEATURE_WGET_LONG_OPTIONS
+               if (extra_headers)
+                       fputs(extra_headers, sfp);
+               if (opt & WGET_OPT_POST_DATA) {
+                       char *estr = URL_escape(post_data);
+-                      fprintf(sfp, "Content-Type: application/x-www-form-urlencoded\r\n");
+-                      fprintf(sfp, "Content-Length: %u\r\n" "\r\n" "%s",
+-                                      (int) strlen(estr), estr);
+-                      /*fprintf(sfp, "Connection: Keep-Alive\r\n\r\n");*/
+-                      /*fprintf(sfp, "%s\r\n", estr);*/
++                      fprintf(sfp,
++                              "Content-Type: application/x-www-form-urlencoded\r\n"
++                              "Content-Length: %u\r\n"
++                              "\r\n"
++                              "%s",
++                              (int) strlen(estr), estr
++                      );
+                       free(estr);
+               } else
+ #endif
+-              { /* If "Connection:" is needed, document why */
+-                      fprintf(sfp, /* "Connection: close\r\n" */ "\r\n");
++              {
++                      fprintf(sfp, "\r\n");
+               }
+               fflush(sfp);
index d88c02a1ab985ea9265940bf67883977ba160917..65d5fa8a5a12b532d346ba3d76a41dc712d025ff 100644 (file)
@@ -37,7 +37,7 @@ Summary(pt_BR.UTF-8): BusyBox é um conjunto de utilitários UNIX em um único b
 Name:          busybox
 # stable line only
 Version:       1.18.3
-Release:       1
+Release:       2
 License:       GPL
 Group:         Applications
 Source0:       http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
@@ -45,6 +45,9 @@ Source0:      http://www.busybox.net/downloads/%{name}-%{version}.tar.bz2
 Source1:       %{name}.config
 Source2:       %{name}-initrd.config
 %{?with_altconfig:Source3:     %{cfgfile}}
+Patch100:      busybox-1.18.3-buildsys.patch
+Patch101:      busybox-1.18.3-modutils24.patch
+Patch102:      busybox-1.18.3-wget.patch
 Patch1:                %{name}-logconsole.patch
 Patch2:                %{name}-printf-gettext.patch
 Patch3:                %{name}-loadfont.patch
@@ -151,6 +154,9 @@ Statycznie skonsolidowany busybox dla initrd.
 
 %prep
 %setup -q
+%patch100 -p1
+%patch101 -p1
+%patch102 -p1
 %patch1 -p1
 %patch2 -p1
 #%patch3 -p1
This page took 0.192473 seconds and 4 git commands to generate.