Gentoo Archives: gentoo-commits

From: Matt Thode <prometheanfire@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: patches/busybox/1.26.0/
Date: Mon, 02 Jan 2017 02:51:12
Message-Id: 1483317999.7e4a2f6ef864eb9380b5be1fc8d41a7a477f26bf.prometheanfire@gentoo
1 commit: 7e4a2f6ef864eb9380b5be1fc8d41a7a477f26bf
2 Author: Matthew Thode <mthode <AT> mthode <DOT> org>
3 AuthorDate: Mon Jan 2 00:46:39 2017 +0000
4 Commit: Matt Thode <prometheanfire <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 2 00:46:39 2017 +0000
6 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=7e4a2f6e
7
8 add patches for busybox 1.26.0
9
10 patches/busybox/1.26.0/1.18.1-openvt.diff | 19 +++++
11 .../busybox/1.26.0/busybox-1.20.2-modprobe.patch | 26 +++++++
12 .../busybox/1.26.0/busybox-1.26.0-mdstart.patch | 80 ++++++++++++++++++++++
13 .../busybox/1.26.0/busybox-1.7.4-signal-hack.patch | 28 ++++++++
14 4 files changed, 153 insertions(+)
15
16 diff --git a/patches/busybox/1.26.0/1.18.1-openvt.diff b/patches/busybox/1.26.0/1.18.1-openvt.diff
17 new file mode 100644
18 index 0000000..b8a9f8a
19 --- /dev/null
20 +++ b/patches/busybox/1.26.0/1.18.1-openvt.diff
21 @@ -0,0 +1,19 @@
22 +Based on:
23 +
24 +> Allow a slightly wider range of valid vt numbers. Forward-ported from Gentoo
25 +> Busybox 1.1.3.
26 +
27 +> The previous spin of this patch on 1.1.3 had a 'wait(NULL);' right before
28 +> return EXIT_SUCCESS. I don't think it's needed anymore, so I left it out.
29 +
30 +--- a/console-tools/openvt.c 2010-11-22 22:24:58.000000000 +0200
31 ++++ b/console-tools/openvt.c 2010-11-29 15:32:18.000000000 +0200
32 +@@ -124,7 +124,7 @@ int openvt_main(int argc UNUSED_PARAM, c
33 +
34 + if (flags & OPT_c) {
35 + /* Check for illegal vt number: < 1 or > 63 */
36 +- vtno = xatou_range(str_c, 1, 63);
37 ++ vtno = xatou_range(str_c, 0, 63);
38 + } else {
39 + vtno = find_free_vtno();
40 + }
41
42 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
43 new file mode 100644
44 index 0000000..491eb05
45 --- /dev/null
46 +++ b/patches/busybox/1.26.0/busybox-1.20.2-modprobe.patch
47 @@ -0,0 +1,26 @@
48 +diff --git a/modutils/modprobe.c b/modutils/modprobe.c
49 +index fb6c659..11fa521 100644
50 +--- a/modutils/modprobe.c
51 ++++ b/modutils/modprobe.c
52 +@@ -413,7 +413,7 @@ static int do_modprobe(struct module_entry *m)
53 + rc = 0;
54 + while (m->deps) {
55 + struct module_entry *m2;
56 +- char *fn, *options;
57 ++ char *fn, *options, *path;
58 +
59 + rc = 0;
60 + fn = llist_pop(&m->deps); /* we leak it */
61 +@@ -460,7 +460,11 @@ static int do_modprobe(struct module_entry *m)
62 + continue;
63 + }
64 +
65 +- rc = bb_init_module(fn, options);
66 ++ path = xmalloc(strlen(fn) + strlen(CONFIG_DEFAULT_MODULES_DIR) + strlen(G.uts.release) + 3);
67 ++ sprintf(path, "%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, G.uts.release, fn);
68 ++
69 ++ rc = bb_init_module(path, options);
70 ++ free(path);
71 + DBG("loaded %s '%s', rc:%d", fn, options, rc);
72 + if (rc == EEXIST)
73 + rc = 0;
74
75 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
76 new file mode 100644
77 index 0000000..35057b6
78 --- /dev/null
79 +++ b/patches/busybox/1.26.0/busybox-1.26.0-mdstart.patch
80 @@ -0,0 +1,80 @@
81 +diff --git a/util-linux/mdStart.c b/util-linux/mdStart.c
82 +--- util-linux/mdStart.c 1969-12-31 18:00:00.000000000 -0600
83 ++++ util-linux/mdStart.c 2017-01-01 18:25:14.582737879 -0600
84 +@@ -0,0 +1,76 @@
85 ++/*
86 ++ * Linux 2.6(+) RAID Autostarter
87 ++ *
88 ++ * Copyright (C) 2005 by Tim Yamin <plasmaroo@g.o> <plasm@××××××.uk>
89 ++ * Copyright (C) 2012 by Sebastian Pipping <sebastian@×××××××.org>
90 ++ *
91 ++ * This program is free software; you can redistribute it and/or modify
92 ++ * it under the terms of the GNU General Public License as published by
93 ++ * the Free Software Foundation; either version 2 of the License, or
94 ++ * (at your option) any later version.
95 ++ *
96 ++ * This program is distributed in the hope that it will be useful,
97 ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
98 ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
99 ++ * General Public License for more details.
100 ++ *
101 ++ * You should have received a copy of the GNU General Public License
102 ++ * along with this program; if not, write to the Free Software
103 ++ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
104 ++ *
105 ++ */
106 ++//config:config MDSTART
107 ++//config: bool "mdstart"
108 ++//config: default n
109 ++//config: help
110 ++//config: Allows you to autostart /dev/md devices if using an initramfs to
111 ++//config: boot.
112 ++
113 ++//applet:IF_MDSTART(APPLET(mdstart, BB_DIR_SBIN, BB_SUID_DROP))
114 ++
115 ++//kbuild:lib-$(CONFIG_MDSTART) += mdStart.o
116 ++
117 ++//usage:#define mdstart_trivial_usage
118 ++//usage: "[PARTITION] MD-NODE [[PARTITION] MD-NODE ...]"
119 ++//usage:
120 ++//usage:#define mdstart_full_usage "\n\n"
121 ++//usage: "Run the RAID_AUTORUN ioctl on the given MD number"
122 ++
123 ++#include <sys/types.h>
124 ++#include <sys/stat.h>
125 ++#include <fcntl.h>
126 ++#include <sys/ioctl.h>
127 ++#include <linux/major.h>
128 ++#include <linux/raid/md_u.h>
129 ++
130 ++extern int
131 ++mdstart_main(int argc, char *argv[])
132 ++{
133 ++ int i, fd, part = 0, retval = 0;
134 ++
135 ++ if(argc < 2)
136 ++ {
137 ++ bb_show_usage();
138 ++ }
139 ++
140 ++ for(i = 1; i < argc; i++)
141 ++ {
142 ++ if(sscanf(argv[i], "%d", &part) == 1)
143 ++ continue;
144 ++
145 ++ fd = open(argv[i], 0, 0);
146 ++ if (fd >= 0)
147 ++ {
148 ++ ioctl(fd, RAID_AUTORUN, part);
149 ++ close(fd);
150 ++ } else
151 ++ {
152 ++ printf("Error: Failed to open %s!\n", argv[i]);
153 ++ retval=1;
154 ++ }
155 ++
156 ++ part = 0;
157 ++ }
158 ++
159 ++ return retval;
160 ++}
161
162 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
163 new file mode 100644
164 index 0000000..ba11830
165 --- /dev/null
166 +++ b/patches/busybox/1.26.0/busybox-1.7.4-signal-hack.patch
167 @@ -0,0 +1,28 @@
168 +workaround while we get it fixed upstream
169 +
170 +http://bugs.gentoo.org/201114
171 +
172 +--- libbb/u_signal_names.c
173 ++++ libbb/u_signal_names.c
174 +@@ -66,7 +66,7 @@
175 + #ifdef SIGTERM
176 + [SIGTERM ] = "TERM",
177 + #endif
178 +-#ifdef SIGSTKFLT
179 ++#if defined(SIGSTKFLT) && SIGSTKFLT < 32
180 + [SIGSTKFLT] = "STKFLT",
181 + #endif
182 + #ifdef SIGCHLD
183 +@@ -90,10 +90,10 @
184 + #ifdef SIGURG
185 + [SIGURG ] = "URG",
186 + #endif
187 +-#ifdef SIGXCPU
188 ++#if defined(SIGXCPU) && SIGXCPU < 32
189 + [SIGXCPU ] = "XCPU",
190 + #endif
191 +-#ifdef SIGXFSZ
192 ++#if defined(SIGXFSZ) && SIGXFSZ < 32
193 + [SIGXFSZ ] = "XFSZ",
194 + #endif
195 + #ifdef SIGVTALRM