<div dir="ltr">Btw, these are the Toybox patches I'm running with:<div><br></div><div><div>diff -ru toybox-0.5.2.orig/lib/portability.c toybox-0.5.2/lib/portability.c</div><div>--- toybox-0.5.2.orig/lib/portability.c<span class="" style="white-space:pre"> </span>2015-02-26 02:42:24.000000000 +0000</div><div>+++ toybox-0.5.2/lib/portability.c<span class="" style="white-space:pre">      </span>2015-03-13 20:07:48.017855796 +0000</div><div>@@ -45,7 +45,7 @@</div><div>       new_line = realloc(*linep, new_len);</div><div>       if (!new_line) return -1;</div><div>       *np = new_len;</div><div>-      *linep = new_line;</div><div>+      line = *linep = new_line;</div><div>     }</div><div> </div><div>     line[i] = ch;</div><div>@@ -59,7 +59,7 @@</div><div>     new_line = realloc(*linep, new_len);</div><div>     if (!new_line) return -1;</div><div>     *np = new_len;</div><div>-    *linep = new_line;</div><div>+    line = *linep = new_line;</div><div>   }</div><div>   line[i + 1] = '\0';</div><div> </div><div>diff -ru toybox-0.5.2.orig/toys/posix/cp.c toybox-0.5.2/toys/posix/cp.c</div><div>--- toybox-0.5.2.orig/toys/posix/cp.c<span class="" style="white-space:pre">      </span>2015-02-26 02:42:24.000000000 +0000</div><div>+++ toybox-0.5.2/toys/posix/cp.c<span class="" style="white-space:pre">        </span>2015-03-13 20:08:18.990360352 +0000</div><div>@@ -391,6 +391,7 @@</div><div>   }</div><div> </div><div>   if (toys.optflags & FLAG_D) {</div><div>+    TT.destname = toys.optargs[toys.optc-1];</div><div>     if (mkpathat(AT_FDCWD, TT.destname, 0, 2))</div><div>       perror_exit("-D '%s'", TT.destname);</div><div>     if (toys.optc == 1) return;</div><div>diff -ru toybox-0.5.2.orig/toys/posix/find.c toybox-0.5.2/toys/posix/find.c</div><div>--- toybox-0.5.2.orig/toys/posix/find.c<span class="" style="white-space:pre"> </span>2015-02-26 02:42:24.000000000 +0000</div><div>+++ toybox-0.5.2/toys/posix/find.c<span class="" style="white-space:pre">      </span>2015-03-13 20:07:20.927409060 +0000</div><div>@@ -435,7 +435,7 @@</div><div>           if (aa->dir && TT.topdir == -1) TT.topdir = xopen(".", 0);</div><div> </div><div>         // collect names and execute commands</div><div>-        } else if (check) {</div><div>+        } else {</div><div>           char *name, *ss1 = ss[1];</div><div>           struct double_list **ddl;</div><div> </div><div>@@ -443,6 +443,7 @@</div><div>           aa = (void *)llist_pop(&argdata);</div><div>           ss += aa->arglen + 1;</div><div> </div><div>+          if (check) {</div><div>           // name is always a new malloc, so we can always free it.</div><div>           name = aa->dir ? xstrdup(new->name) : dirtree_path(new, 0);</div><div> </div><div>@@ -479,6 +480,7 @@</div><div>           dlist_add(ddl, name);</div><div>           aa->namecount++;</div><div>           if (!aa->plus) test = flush_exec(new, aa);</div><div>+          }</div><div>         }</div><div> </div><div>         // Argument consumed, skip the check.</div><div>diff -ru toybox-0.5.2.orig/toys/posix/grep.c toybox-0.5.2/toys/posix/grep.c</div><div>--- toybox-0.5.2.orig/toys/posix/grep.c<span class="" style="white-space:pre">       </span>2015-02-26 02:42:24.000000000 +0000</div><div>+++ toybox-0.5.2/toys/posix/grep.c<span class="" style="white-space:pre">      </span>2015-03-13 20:07:48.017855796 +0000</div><div>@@ -75,6 +75,17 @@</div><div>     return;</div><div>   }</div><div> </div><div>+  struct stat stat;</div><div>+  if (fstat(fd, &stat) != 0) {</div><div>+    perror_msg("%s", name);</div><div>+    fclose(file);</div><div>+    return;</div><div>+  }</div><div>+  if (S_ISDIR(stat.st_mode)) {</div><div>+    fclose(file);</div><div>+    return;</div><div>+  }</div><div>+  </div><div>   for (;;) {</div><div>     char *line = 0, *start;</div><div>     regmatch_t matches[3];</div></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 13 March 2015 at 06:32, David Halls <span dir="ltr"><<a href="mailto:dahalls@gmail.com" target="_blank">dahalls@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I note that if you're building a nontrivial amount of stuff,<br>
chroot-setup is probably your friend. Otherwise you'll install stuff<br>
into / until you fill it up, it's generally only got 100 megs or so of<br>
space. (Half of physical memory.)<br></blockquote><div><br></div></span><div>I'm installing everything I build into /home/install, don't touch the rest. Then /home/install itself becomes a sqf so it can't be messed with either.</div><span class=""><div> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I still have a todo item from you (grep segfault with uClibc). I should<br>
go fix that now. (I had enough work getting the move to initramfs<br>
working I just shipped it once it built LFS on the targets. I'm still a<br>
kernel version behind, it's still running uclibc instead of musl...)<br></blockquote><div><br></div></span><div>No worries, I automate the patching anyway.</div><div>Aboriginal is good enough for me as it is, although uclibc could probably to with some love/replacement.</div><div><br></div></div></div></div>
</blockquote></div><br></div>