Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: patches/busybox/1.32.0/, patches/busybox/1.31.1/
Date: Tue, 04 Aug 2020 09:27:54
Message-Id: 1596532006.32d6c84b9fea8841df83c16caff20042c273209f.whissi@gentoo
1 commit: 32d6c84b9fea8841df83c16caff20042c273209f
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Tue Aug 4 09:06:46 2020 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Tue Aug 4 09:06:46 2020 +0000
6 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=32d6c84b
7
8 Bump busybox to v1.32.0
9
10 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
11
12 patches/busybox/1.31.1/README | 11 ----
13 patches/busybox/1.31.1/busybox-1.18.1-openvt.diff | 19 -------
14 .../busybox/1.31.1/busybox-1.20.2-modprobe.patch | 26 ---------
15 .../busybox/1.31.1/busybox-1.31.1-glibc-2.31.patch | 61 ----------------------
16 .../busybox/1.31.1/busybox-1.7.4-signal-hack.patch | 28 ----------
17 .../busybox/1.32.0/busybox-1.20.2-modprobe.patch | 46 ++++++++++++++++
18 ...-1.30.1-allow-for-genkernel-cross-compile.patch | 0
19 7 files changed, 46 insertions(+), 145 deletions(-)
20
21 diff --git a/patches/busybox/1.31.1/README b/patches/busybox/1.31.1/README
22 deleted file mode 100644
23 index 654c172..0000000
24 --- a/patches/busybox/1.31.1/README
25 +++ /dev/null
26 @@ -1,11 +0,0 @@
27 -1.18.1-mdstart.diff:
28 -This adds a 'mdstart' command to busybox, which is used for the activation of
29 -individual mdraid arrays. It originated with 1.1.3+gentoo or earlier.
30 -Patch ported from 1.7.4 to 1.18.1 by Denis Kaganovich.
31 -
32 -1.18.1-openvt.diff:
33 -It is unknown what problem this patch fixes. It may no longer be needed.
34 -Patch ported from 1.7.4 to 1.18.1 by Denis Kaganovich.
35 -
36 -busybox-1.7.4-signal-hack.patch:
37 -It is unknown what this patch does. It may no longer be needed.
38
39 diff --git a/patches/busybox/1.31.1/busybox-1.18.1-openvt.diff b/patches/busybox/1.31.1/busybox-1.18.1-openvt.diff
40 deleted file mode 100644
41 index b8a9f8a..0000000
42 --- a/patches/busybox/1.31.1/busybox-1.18.1-openvt.diff
43 +++ /dev/null
44 @@ -1,19 +0,0 @@
45 -Based on:
46 -
47 -> Allow a slightly wider range of valid vt numbers. Forward-ported from Gentoo
48 -> Busybox 1.1.3.
49 -
50 -> The previous spin of this patch on 1.1.3 had a 'wait(NULL);' right before
51 -> return EXIT_SUCCESS. I don't think it's needed anymore, so I left it out.
52 -
53 ---- a/console-tools/openvt.c 2010-11-22 22:24:58.000000000 +0200
54 -+++ b/console-tools/openvt.c 2010-11-29 15:32:18.000000000 +0200
55 -@@ -124,7 +124,7 @@ int openvt_main(int argc UNUSED_PARAM, c
56 -
57 - if (flags & OPT_c) {
58 - /* Check for illegal vt number: < 1 or > 63 */
59 -- vtno = xatou_range(str_c, 1, 63);
60 -+ vtno = xatou_range(str_c, 0, 63);
61 - } else {
62 - vtno = find_free_vtno();
63 - }
64
65 diff --git a/patches/busybox/1.31.1/busybox-1.20.2-modprobe.patch b/patches/busybox/1.31.1/busybox-1.20.2-modprobe.patch
66 deleted file mode 100644
67 index 491eb05..0000000
68 --- a/patches/busybox/1.31.1/busybox-1.20.2-modprobe.patch
69 +++ /dev/null
70 @@ -1,26 +0,0 @@
71 -diff --git a/modutils/modprobe.c b/modutils/modprobe.c
72 -index fb6c659..11fa521 100644
73 ---- a/modutils/modprobe.c
74 -+++ b/modutils/modprobe.c
75 -@@ -413,7 +413,7 @@ static int do_modprobe(struct module_entry *m)
76 - rc = 0;
77 - while (m->deps) {
78 - struct module_entry *m2;
79 -- char *fn, *options;
80 -+ char *fn, *options, *path;
81 -
82 - rc = 0;
83 - fn = llist_pop(&m->deps); /* we leak it */
84 -@@ -460,7 +460,11 @@ static int do_modprobe(struct module_entry *m)
85 - continue;
86 - }
87 -
88 -- rc = bb_init_module(fn, options);
89 -+ path = xmalloc(strlen(fn) + strlen(CONFIG_DEFAULT_MODULES_DIR) + strlen(G.uts.release) + 3);
90 -+ sprintf(path, "%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, G.uts.release, fn);
91 -+
92 -+ rc = bb_init_module(path, options);
93 -+ free(path);
94 - DBG("loaded %s '%s', rc:%d", fn, options, rc);
95 - if (rc == EEXIST)
96 - rc = 0;
97
98 diff --git a/patches/busybox/1.31.1/busybox-1.31.1-glibc-2.31.patch b/patches/busybox/1.31.1/busybox-1.31.1-glibc-2.31.patch
99 deleted file mode 100644
100 index 48fb46c..0000000
101 --- a/patches/busybox/1.31.1/busybox-1.31.1-glibc-2.31.patch
102 +++ /dev/null
103 @@ -1,61 +0,0 @@
104 -https://git.busybox.net/busybox/commit/?id=d3539be8f27b8cbfdfee460fe08299158f08bcd9
105 -
106 ---- a/coreutils/date.c
107 -+++ b/coreutils/date.c
108 -@@ -279,6 +279,9 @@ int date_main(int argc UNUSED_PARAM, char **argv)
109 - time(&ts.tv_sec);
110 - #endif
111 - }
112 -+#if !ENABLE_FEATURE_DATE_NANO
113 -+ ts.tv_nsec = 0;
114 -+#endif
115 - localtime_r(&ts.tv_sec, &tm_time);
116 -
117 - /* If date string is given, update tm_time, and maybe set date */
118 -@@ -301,9 +304,10 @@ int date_main(int argc UNUSED_PARAM, char **argv)
119 - if (date_str[0] != '@')
120 - tm_time.tm_isdst = -1;
121 - ts.tv_sec = validate_tm_time(date_str, &tm_time);
122 -+ ts.tv_nsec = 0;
123 -
124 - /* if setting time, set it */
125 -- if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) {
126 -+ if ((opt & OPT_SET) && clock_settime(CLOCK_REALTIME, &ts) < 0) {
127 - bb_perror_msg("can't set date");
128 - }
129 - }
130 ---- a/libbb/missing_syscalls.c
131 -+++ b/libbb/missing_syscalls.c
132 -@@ -15,14 +15,6 @@ pid_t getsid(pid_t pid)
133 - return syscall(__NR_getsid, pid);
134 - }
135 -
136 --int stime(const time_t *t)
137 --{
138 -- struct timeval tv;
139 -- tv.tv_sec = *t;
140 -- tv.tv_usec = 0;
141 -- return settimeofday(&tv, NULL);
142 --}
143 --
144 - int sethostname(const char *name, size_t len)
145 - {
146 - return syscall(__NR_sethostname, name, len);
147 ---- a/util-linux/rdate.c
148 -+++ b/util-linux/rdate.c
149 -@@ -95,9 +95,13 @@ int rdate_main(int argc UNUSED_PARAM, char **argv)
150 - if (!(flags & 2)) { /* no -p (-s may be present) */
151 - if (time(NULL) == remote_time)
152 - bb_error_msg("current time matches remote time");
153 -- else
154 -- if (stime(&remote_time) < 0)
155 -+ else {
156 -+ struct timespec ts;
157 -+ ts.tv_sec = remote_time;
158 -+ ts.tv_nsec = 0;
159 -+ if (clock_settime(CLOCK_REALTIME, &ts) < 0)
160 - bb_perror_msg_and_die("can't set time of day");
161 -+ }
162 - }
163 -
164 - if (flags != 1) /* not lone -s */
165
166 diff --git a/patches/busybox/1.31.1/busybox-1.7.4-signal-hack.patch b/patches/busybox/1.31.1/busybox-1.7.4-signal-hack.patch
167 deleted file mode 100644
168 index ba11830..0000000
169 --- a/patches/busybox/1.31.1/busybox-1.7.4-signal-hack.patch
170 +++ /dev/null
171 @@ -1,28 +0,0 @@
172 -workaround while we get it fixed upstream
173 -
174 -http://bugs.gentoo.org/201114
175 -
176 ---- libbb/u_signal_names.c
177 -+++ libbb/u_signal_names.c
178 -@@ -66,7 +66,7 @@
179 - #ifdef SIGTERM
180 - [SIGTERM ] = "TERM",
181 - #endif
182 --#ifdef SIGSTKFLT
183 -+#if defined(SIGSTKFLT) && SIGSTKFLT < 32
184 - [SIGSTKFLT] = "STKFLT",
185 - #endif
186 - #ifdef SIGCHLD
187 -@@ -90,10 +90,10 @
188 - #ifdef SIGURG
189 - [SIGURG ] = "URG",
190 - #endif
191 --#ifdef SIGXCPU
192 -+#if defined(SIGXCPU) && SIGXCPU < 32
193 - [SIGXCPU ] = "XCPU",
194 - #endif
195 --#ifdef SIGXFSZ
196 -+#if defined(SIGXFSZ) && SIGXFSZ < 32
197 - [SIGXFSZ ] = "XFSZ",
198 - #endif
199 - #ifdef SIGVTALRM
200
201 diff --git a/patches/busybox/1.32.0/busybox-1.20.2-modprobe.patch b/patches/busybox/1.32.0/busybox-1.20.2-modprobe.patch
202 new file mode 100644
203 index 0000000..9021a0f
204 --- /dev/null
205 +++ b/patches/busybox/1.32.0/busybox-1.20.2-modprobe.patch
206 @@ -0,0 +1,46 @@
207 +Load modules by absolute path in busybox modprobe
208 +
209 +Our switch to busybox modprobe broke ZFS module loading where busybox
210 +modprobe would load two modules and then fail. Limited developer time
211 +resulted in a hack being put into place to repeat modprobe until ZFS
212 +appeared. However, this was never a real long term solution.
213 +
214 +Recent analysis with strace suggests that loading two modules corrupts
215 +busybox's current working directory inside the kernel. Consequently,
216 +subsequent tests where absolute paths were used instead of relative ones
217 +made the problem disappear.
218 +
219 +Modifying busybox to use full paths when loading modules makes module
220 +loading work on all affected kernels. While the long term plan is to fix
221 +the kernel, this workaround will be needed indefinitely for affected
222 +kernels, even after mainline Linux is fixed.
223 +
224 +Signed-off-by: Richard Yao <ryao@g.o>
225 +
226 +Added via commit 006a5d6d56e622b5ef82e5a066ca7af7b8c2aeed.
227 +
228 +--- a/modutils/modprobe.c
229 ++++ b/modutils/modprobe.c
230 +@@ -413,7 +413,7 @@ static int do_modprobe(struct module_entry *m)
231 + rc = 0;
232 + while (m->deps) {
233 + struct module_entry *m2;
234 +- char *fn, *options;
235 ++ char *fn, *options, *path;
236 +
237 + rc = 0;
238 + fn = llist_pop(&m->deps); /* we leak it */
239 +@@ -460,7 +460,11 @@ static int do_modprobe(struct module_entry *m)
240 + continue;
241 + }
242 +
243 +- rc = bb_init_module(fn, options);
244 ++ path = xmalloc(strlen(fn) + strlen(CONFIG_DEFAULT_MODULES_DIR) + strlen(G.uts.release) + 3);
245 ++ sprintf(path, "%s/%s/%s", CONFIG_DEFAULT_MODULES_DIR, G.uts.release, fn);
246 ++
247 ++ rc = bb_init_module(path, options);
248 ++ free(path);
249 + DBG("loaded %s '%s', rc:%d", fn, options, rc);
250 + if (rc == EEXIST)
251 + rc = 0;
252 +
253
254 diff --git a/patches/busybox/1.31.1/busybox-1.30.1-allow-for-genkernel-cross-compile.patch b/patches/busybox/1.32.0/busybox-1.30.1-allow-for-genkernel-cross-compile.patch
255 similarity index 100%
256 rename from patches/busybox/1.31.1/busybox-1.30.1-allow-for-genkernel-cross-compile.patch
257 rename to patches/busybox/1.32.0/busybox-1.30.1-allow-for-genkernel-cross-compile.patch