commit:     7e4a2f6ef864eb9380b5be1fc8d41a7a477f26bf
Author:     Matthew Thode <mthode <AT> mthode <DOT> org>
AuthorDate: Mon Jan  2 00:46:39 2017 +0000
Commit:     Matt Thode <prometheanfire <AT> gentoo <DOT> org>
CommitDate: Mon Jan  2 00:46:39 2017 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=7e4a2f6e

add patches for busybox 1.26.0

 patches/busybox/1.26.0/1.18.1-openvt.diff          | 19 +++++
 .../busybox/1.26.0/busybox-1.20.2-modprobe.patch   | 26 +++++++
 .../busybox/1.26.0/busybox-1.26.0-mdstart.patch    | 80 ++++++++++++++++++++++
 .../busybox/1.26.0/busybox-1.7.4-signal-hack.patch | 28 ++++++++
 4 files changed, 153 insertions(+)

diff --git a/patches/busybox/1.26.0/1.18.1-openvt.diff 
b/patches/busybox/1.26.0/1.18.1-openvt.diff
new file mode 100644
index 0000000..b8a9f8a
--- /dev/null
+++ b/patches/busybox/1.26.0/1.18.1-openvt.diff
@@ -0,0 +1,19 @@
+Based on:
+
+> Allow a slightly wider range of valid vt numbers. Forward-ported from Gentoo
+> Busybox 1.1.3.
+
+> The previous spin of this patch on 1.1.3 had a 'wait(NULL);' right before
+> return EXIT_SUCCESS. I don't think it's needed anymore, so I left it out.
+
+--- a/console-tools/openvt.c   2010-11-22 22:24:58.000000000 +0200
++++ b/console-tools/openvt.c   2010-11-29 15:32:18.000000000 +0200
+@@ -124,7 +124,7 @@ int openvt_main(int argc UNUSED_PARAM, c
+ 
+       if (flags & OPT_c) {
+               /* Check for illegal vt number: < 1 or > 63 */
+-              vtno = xatou_range(str_c, 1, 63);
++              vtno = xatou_range(str_c, 0, 63);
+       } else {
+               vtno = find_free_vtno();
+       }

diff --git a/patches/busybox/1.26.0/busybox-1.20.2-modprobe.patch 
b/patches/busybox/1.26.0/busybox-1.20.2-modprobe.patch
new file mode 100644
index 0000000..491eb05
--- /dev/null
+++ b/patches/busybox/1.26.0/busybox-1.20.2-modprobe.patch
@@ -0,0 +1,26 @@
+diff --git a/modutils/modprobe.c b/modutils/modprobe.c
+index fb6c659..11fa521 100644
+--- a/modutils/modprobe.c
++++ b/modutils/modprobe.c
+@@ -413,7 +413,7 @@ static int do_modprobe(struct module_entry *m)
+       rc = 0;
+       while (m->deps) {
+               struct module_entry *m2;
+-              char *fn, *options;
++              char *fn, *options, *path;
+ 
+               rc = 0;
+               fn = llist_pop(&m->deps); /* we leak it */
+@@ -460,7 +460,11 @@ static int do_modprobe(struct module_entry *m)
+                       continue;
+               }
+ 
+-              rc = bb_init_module(fn, options);
++              path = xmalloc(strlen(fn) + strlen(CONFIG_DEFAULT_MODULES_DIR) 
+ strlen(G.uts.release) + 3);
++              sprintf(path, "%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, 
G.uts.release, fn);
++
++              rc = bb_init_module(path, options);
++              free(path);
+               DBG("loaded %s '%s', rc:%d", fn, options, rc);
+               if (rc == EEXIST)
+                       rc = 0;

diff --git a/patches/busybox/1.26.0/busybox-1.26.0-mdstart.patch 
b/patches/busybox/1.26.0/busybox-1.26.0-mdstart.patch
new file mode 100644
index 0000000..35057b6
--- /dev/null
+++ b/patches/busybox/1.26.0/busybox-1.26.0-mdstart.patch
@@ -0,0 +1,80 @@
+diff --git a/util-linux/mdStart.c b/util-linux/mdStart.c
+--- util-linux/mdStart.c       1969-12-31 18:00:00.000000000 -0600
++++ util-linux/mdStart.c       2017-01-01 18:25:14.582737879 -0600
+@@ -0,0 +1,76 @@
++/*
++ * Linux 2.6(+) RAID Autostarter
++ *
++ * Copyright (C) 2005 by Tim Yamin <[email protected]> <[email protected]>
++ * Copyright (C) 2012 by Sebastian Pipping <[email protected]>
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License as published by
++ * the Free Software Foundation; either version 2 of the License, or
++ * (at your option) any later version.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
++ * General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
++ *
++ */
++//config:config MDSTART
++//config:     bool "mdstart"
++//config:     default n
++//config:     help
++//config:       Allows you to autostart /dev/md devices if using an initramfs 
to
++//config:       boot.
++
++//applet:IF_MDSTART(APPLET(mdstart, BB_DIR_SBIN, BB_SUID_DROP))
++
++//kbuild:lib-$(CONFIG_MDSTART) += mdStart.o
++
++//usage:#define mdstart_trivial_usage
++//usage:      "[PARTITION] MD-NODE [[PARTITION] MD-NODE ...]"
++//usage:
++//usage:#define mdstart_full_usage "\n\n"
++//usage:      "Run the RAID_AUTORUN ioctl on the given MD number"
++
++#include <sys/types.h>
++#include <sys/stat.h>
++#include <fcntl.h>
++#include <sys/ioctl.h>
++#include <linux/major.h>
++#include <linux/raid/md_u.h>
++
++extern int
++mdstart_main(int argc, char *argv[])
++{
++      int i, fd, part = 0, retval = 0;
++
++      if(argc < 2)
++      {
++              bb_show_usage();
++      }
++
++      for(i = 1; i < argc; i++)
++      {
++              if(sscanf(argv[i], "%d", &part) == 1)
++                      continue;
++
++              fd = open(argv[i], 0, 0);
++              if (fd >= 0)
++              {
++                      ioctl(fd, RAID_AUTORUN, part);
++                      close(fd);
++              } else
++              {
++                      printf("Error: Failed to open %s!\n", argv[i]);
++                      retval=1;
++              }
++
++              part = 0;
++      }
++
++      return retval;
++}

diff --git a/patches/busybox/1.26.0/busybox-1.7.4-signal-hack.patch 
b/patches/busybox/1.26.0/busybox-1.7.4-signal-hack.patch
new file mode 100644
index 0000000..ba11830
--- /dev/null
+++ b/patches/busybox/1.26.0/busybox-1.7.4-signal-hack.patch
@@ -0,0 +1,28 @@
+workaround while we get it fixed upstream
+
+http://bugs.gentoo.org/201114
+
+--- libbb/u_signal_names.c
++++ libbb/u_signal_names.c
+@@ -66,7 +66,7 @@
+ #ifdef SIGTERM
+       [SIGTERM  ] = "TERM",
+ #endif
+-#ifdef SIGSTKFLT
++#if defined(SIGSTKFLT) && SIGSTKFLT < 32
+       [SIGSTKFLT] = "STKFLT",
+ #endif
+ #ifdef SIGCHLD
+@@ -90,10 +90,10 @
+ #ifdef SIGURG
+       [SIGURG   ] = "URG",
+ #endif
+-#ifdef SIGXCPU
++#if defined(SIGXCPU) && SIGXCPU < 32
+       [SIGXCPU  ] = "XCPU",
+ #endif
+-#ifdef SIGXFSZ
++#if defined(SIGXFSZ) && SIGXFSZ < 32
+       [SIGXFSZ  ] = "XFSZ",
+ #endif
+ #ifdef SIGVTALRM

Reply via email to