aboutsummaryrefslogtreecommitdiffstats
path: root/main/busybox
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-01-15 08:10:15 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-01-15 08:12:12 +0000
commitd61c73c912a0e51f738a31a6478e2aa8faf4d35d (patch)
tree067846ab0acc32576c5bd75849755dfd089f2546 /main/busybox
parent988241da2f95e5329dff5ca9c62e90cd1e513c32 (diff)
downloadaports-d61c73c912a0e51f738a31a6478e2aa8faf4d35d.tar.bz2
aports-d61c73c912a0e51f738a31a6478e2aa8faf4d35d.tar.xz
main/busybox: replace with add patches from upstream
Diffstat (limited to 'main/busybox')
-rw-r--r--main/busybox/0001-Revert-ash-make-var-unicode-aware.patch77
-rw-r--r--main/busybox/0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch52
-rw-r--r--main/busybox/APKBUILD24
-rw-r--r--main/busybox/busybox-1.23.0-ash.patch34
-rw-r--r--main/busybox/busybox-1.23.0-modprobe.patch203
-rw-r--r--main/busybox/busybox-1.23.0-vi.patch49
6 files changed, 300 insertions, 139 deletions
diff --git a/main/busybox/0001-Revert-ash-make-var-unicode-aware.patch b/main/busybox/0001-Revert-ash-make-var-unicode-aware.patch
deleted file mode 100644
index a7ea60f3ab..0000000000
--- a/main/busybox/0001-Revert-ash-make-var-unicode-aware.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 9b1736cc9ad620fef7d386e12ed52aab73319cef Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Thu, 25 Dec 2014 16:56:20 +0100
-Subject: [PATCH] Revert "ash: make ${#var} unicode-aware"
-
-This reverts commit e9ab07c211b283c0f798628858eaaef93a4893aa.
----
- shell/ash.c | 39 +++++++++++++--------------------------
- 1 file changed, 13 insertions(+), 26 deletions(-)
-
-diff --git a/shell/ash.c b/shell/ash.c
-index 90fb00f..337d63d 100644
---- a/shell/ash.c
-+++ b/shell/ash.c
-@@ -2128,22 +2128,6 @@ lookupvar(const char *name)
- return NULL;
- }
-
--static void reinit_unicode_for_ash(void)
--{
-- /* Unicode support should be activated even if LANG is set
-- * _during_ shell execution, not only if it was set when
-- * shell was started. Therefore, re-check LANG every time:
-- */
-- if (ENABLE_FEATURE_CHECK_UNICODE_IN_ENV
-- || ENABLE_UNICODE_USING_LOCALE
-- ) {
-- const char *s = lookupvar("LC_ALL");
-- if (!s) s = lookupvar("LC_CTYPE");
-- if (!s) s = lookupvar("LANG");
-- reinit_unicode(s);
-- }
--}
--
- /*
- * Search the environment of a builtin command.
- */
-@@ -6829,15 +6813,7 @@ evalvar(char *p, int flags, struct strlist *var_str_list)
- varunset(p, var, 0, 0);
-
- if (subtype == VSLENGTH) {
-- ssize_t n = varlen;
-- if (n > 0) {
-- reinit_unicode_for_ash();
-- if (unicode_status == UNICODE_ON) {
-- const char *val = lookupvar(var);
-- n = unicode_strlen(val);
-- }
-- }
-- cvtnum(n > 0 ? n : 0);
-+ cvtnum(varlen > 0 ? varlen : 0);
- goto record;
- }
-
-@@ -9696,7 +9672,18 @@ preadfd(void)
- # if ENABLE_FEATURE_TAB_COMPLETION
- line_input_state->path_lookup = pathval();
- # endif
-- reinit_unicode_for_ash();
-+ /* Unicode support should be activated even if LANG is set
-+ * _during_ shell execution, not only if it was set when
-+ * shell was started. Therefore, re-check LANG every time:
-+ */
-+ if (ENABLE_FEATURE_CHECK_UNICODE_IN_ENV
-+ || ENABLE_UNICODE_USING_LOCALE
-+ ) {
-+ const char *s = lookupvar("LC_ALL");
-+ if (!s) s = lookupvar("LC_CTYPE");
-+ if (!s) s = lookupvar("LANG");
-+ reinit_unicode(s);
-+ }
- nr = read_line_input(line_input_state, cmdedit_prompt, buf, IBUFSIZ, timeout);
- if (nr == 0) {
- /* Ctrl+C pressed */
---
-2.2.1
-
diff --git a/main/busybox/0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch b/main/busybox/0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch
deleted file mode 100644
index 5d76f47325..0000000000
--- a/main/busybox/0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From a1aa214134b2843ab30f5fbe9a71321984bd3120 Mon Sep 17 00:00:00 2001
-From: Natanael Copa <ncopa@alpinelinux.org>
-Date: Fri, 26 Dec 2014 09:32:59 +0100
-Subject: [PATCH] modprobe: allow slashes in modaliases with 'modprobe -a'
-
----
- modutils/modprobe.c | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/modutils/modprobe.c b/modutils/modprobe.c
-index f090428..6ccc18e 100644
---- a/modutils/modprobe.c
-+++ b/modutils/modprobe.c
-@@ -238,17 +238,6 @@ static void add_probe(const char *name)
- {
- struct module_entry *m;
-
-- /*
-- * get_or_add_modentry() strips path from name and works
-- * on remaining basename.
-- * This would make "rmmod dir/name" and "modprobe dir/name"
-- * to work like "rmmod name" and "modprobe name",
-- * which is wrong, and can be abused via implicit modprobing:
-- * "ifconfig /usbserial up" tries to modprobe netdev-/usbserial.
-- */
-- if (strchr(name, '/'))
-- bb_error_msg_and_die("malformed module name '%s'", name);
--
- m = get_or_add_modentry(name);
- if (!(option_mask32 & (OPT_REMOVE | OPT_SHOW_DEPS))
- && (m->flags & MODULE_FLAG_LOADED)
-@@ -617,6 +606,17 @@ int modprobe_main(int argc UNUSED_PARAM, char **argv)
- } else {
- /* First argument is module name, rest are parameters */
- DBG("probing just module %s", *argv);
-+ /*
-+ * get_or_add_modentry() strips path from name and works
-+ * on remaining basename.
-+ * This would make "rmmod dir/name" and "modprobe dir/name"
-+ * to work like "rmmod name" and "modprobe name",
-+ * which is wrong, and can be abused via implicit modprobing:
-+ * "ifconfig /usbserial up" tries to modprobe netdev-/usbserial.
-+ */
-+ if (strchr(argv[0], '/'))
-+ bb_error_msg_and_die("malformed module name '%s'", argv[0]);
-+
- add_probe(argv[0]);
- G.cmdline_mopts = parse_cmdline_module_options(argv, /*quote_spaces:*/ 1);
- }
---
-2.2.1
-
diff --git a/main/busybox/APKBUILD b/main/busybox/APKBUILD
index aeaddb2911..bfdebea1eb 100644
--- a/main/busybox/APKBUILD
+++ b/main/busybox/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=busybox
pkgver=1.23.0
-pkgrel=2
+pkgrel=3
pkgdesc="Size optimized toolbox of many common UNIX utilities"
url=http://busybox.net
arch="all"
@@ -22,6 +22,10 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
loginutils-sha512.patch
udhcpc-discover-retries.patch
+ busybox-1.23.0-ash.patch
+ busybox-1.23.0-modprobe.patch
+ busybox-1.23.0-vi.patch
+
0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
0001-ifupdown-use-x-hostname-NAME-with-udhcpc.patch
@@ -32,9 +36,6 @@ source="http://busybox.net/downloads/$pkgname-$pkgver.tar.bz2
1001-fbsplash-support-console-switching.patch
1002-fbsplash-support-image-and-bar-alignment-and-positio.patch
- 0001-Revert-ash-make-var-unicode-aware.patch
- 0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch
-
busyboxconfig
glibc.patch"
@@ -123,6 +124,9 @@ b5375210f13fd6e1ca61a565e8fabd35 busybox-uname-is-not-gnu.patch
c5a8dbc8696db6da9c4624b0e11d8fba bb-app-location.patch
8c42c9ef0f0419c314c86bcaf7796106 loginutils-sha512.patch
91a7584a562a72ba886936558e576bbd udhcpc-discover-retries.patch
+31bbf1c3957a939a4508528055a300ec busybox-1.23.0-ash.patch
+345f21ccf074904aa591206fc056285d busybox-1.23.0-modprobe.patch
+539be43937fdb198c111b077b0771f3b busybox-1.23.0-vi.patch
04eeda8c49d4688e6dec02451f8b6aae 0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
e1c183cbe1ca18a0fa0d9597314076c9 0001-ifupdown-use-x-hostname-NAME-with-udhcpc.patch
239dbe5dae5d36bbf73548b2749a22b1 0001-linedit-deluser-use-POSIX-getpwent-instead-of-getpwe.patch
@@ -130,8 +134,6 @@ e1c183cbe1ca18a0fa0d9597314076c9 0001-ifupdown-use-x-hostname-NAME-with-udhcpc.
699ce5aa1095ba4419cd595cec8a8f75 1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch
b56d306ccba574da78dff060b7330806 1001-fbsplash-support-console-switching.patch
4fe5f9e973674c7db3d07f295c363a7c 1002-fbsplash-support-image-and-bar-alignment-and-positio.patch
-387da51492382fa190bab9fa1302a310 0001-Revert-ash-make-var-unicode-aware.patch
-0d7a945ae3ffe754c2b324b8c0de2a19 0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch
3cff842a3618c84465d7ef5425c8749b busyboxconfig
befaac2c59c380e36a452b3f1c1d4a3a glibc.patch"
sha256sums="483ab594dd962ddbb332fd24e36ffdd6e36ac2182fbff055c56e1ca49fda09e4 busybox-1.23.0.tar.bz2
@@ -142,6 +144,9 @@ a31ce8bcb8b81b20e80ffa407600a530d085806c6471f4e4249fcb3a491b79ef busybox-uname-
576366b4d50f1078da6c0364ef70415de92d97c93c64f4d790b11d7a34cdccd2 bb-app-location.patch
57674b20158c0b266ed028b0c65299f9cbcad7d33d19c9fcc403d3967daba493 loginutils-sha512.patch
90825a443339f1c8c249d05f7b025ce53e374d305f8e113d98d45146b105494d udhcpc-discover-retries.patch
+fed81c2c8d2cda7d710e2825c549a0fe42fcb58fd342866729c37e9789d5c9e5 busybox-1.23.0-ash.patch
+e59ce711b44bb0fdc7adb5bed648287ce4a3212ac1e4afd94bdf5bd6ae0fb590 busybox-1.23.0-modprobe.patch
+24595c896674c282c7ab264355d4a7dfb819e86d12cbdc2e7d101689027cffe1 busybox-1.23.0-vi.patch
2e9d56335ca39e944b9abd9ecc91d0e47a3fe3434f8b7ec3f526bc8fa0895ada 0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
53563c6dc4db13004d0b37f7bf1748e861b5a5c4244c1d34f102c23b689420c5 0001-ifupdown-use-x-hostname-NAME-with-udhcpc.patch
ac2cd5fed91bfaec22ed1f2766396d0feb29b9b96f20b2c12d5d8ac8769afae9 0001-linedit-deluser-use-POSIX-getpwent-instead-of-getpwe.patch
@@ -149,8 +154,6 @@ ac2cd5fed91bfaec22ed1f2766396d0feb29b9b96f20b2c12d5d8ac8769afae9 0001-linedit-d
043963183cad556bdae5d5608180f0cb76cf7eede175cd97aa002a787780500f 1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch
b8b0b16ed67b0159256193b1d2108b8ef9aa8a334ab81e463bb970c71257da9a 1001-fbsplash-support-console-switching.patch
e1f3fad8e21dfd72cfcae7ab3ba31d7938e964e0f9ec08b2da0b14d462435424 1002-fbsplash-support-image-and-bar-alignment-and-positio.patch
-e470de005aab40c1e68c35080a63f0f5e48d9cdf02cb869991a24e69fe9b7240 0001-Revert-ash-make-var-unicode-aware.patch
-ae265e9027b053a4401d3e7e72cc26787fb9b207a47dddc6ce4b44d93763f71c 0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch
342bb69c144a1e63d7a7fe4c24578ce5b483c09751ac16bb36d1b88929068141 busyboxconfig
c604ef791c31d35a8c5ee4558d21428a46f37a6d762c4a7e29864f4037fc44a0 glibc.patch"
sha512sums="02c8f9dd9e47ad67b417fa58ba952bbdda6e79bad5399fba3d8217803053c2fd045228bd76d56e97d40c98296841dc66e4fa829887c05378a83bdeabafeb7f72 busybox-1.23.0.tar.bz2
@@ -161,6 +164,9 @@ eb7cce973bfd53ce3350713437b9e2751becfb8dfb10b14f27c4f812297c403b90f80dc2906179d4
5c42b05be69c834c9fd5372c6b0d55a6399c74146a94ea09eae7285dd4fa75d1bde38bf7ab73e98638f65eb72db02115453cbdfe85a0085d742940366f617c7d bb-app-location.patch
69af4800fcf765b4ae029daced7ff171b6b04d810c94a987c7ba848e275a27b77b18b38df1b85f4a12c4a47ed42f62e0768260eb1198e2aff1c3cea898b85c61 loginutils-sha512.patch
34415fe69f6b8d42756046aa8e6d9e4f64a3b0ceb9f57c4c988e35870fe975f05d0ac76f1f9a712196e9c59e67aa2a54abf398242009134fb3aca342c25a3646 udhcpc-discover-retries.patch
+e70fc7b37f18b14638f3526ae1730bb178c190d6bb6c931beadbc5ef3d883dee9b994624af62641ca75edc50cae0e1259f3d52ffcf0d3cb78ceac90000df8962 busybox-1.23.0-ash.patch
+13088f5d2e2b2da8155697d6e1787815a49bc1b353650fa596d99be966c836a967f774725d8258508239f041d5c6f74a55abe407f917a51b2f5b72d75b0c2e5a busybox-1.23.0-modprobe.patch
+b9099407a17ab29b30e9aa3cc30f1b0d05115cf14b49fcfb41167a6f2c77eafd7455f07e9b2ccaa5770cfa45e6458c3931d618c1330ed3ec4e8b613575db3d19 busybox-1.23.0-vi.patch
f2ed7bf994766a20ceecb28bea8c66307b6b66cdd7099408b1f29a529786ce07e55824b21256321708663e00d6fe9428480b0d3e121b67d6ebd8a8a87b1486d1 0001-ifupdown-pass-interface-device-name-for-ipv6-route-c.patch
b1a1cc2ada657a3d3364c8c96853575d73784e769cd8768c170c27a3e59abd2beace75dff6d5047c4391725e961d93149f9c3f45ed75fb1c582bf18b818282c9 0001-ifupdown-use-x-hostname-NAME-with-udhcpc.patch
6781b10ca078296b243373d2c3f2bca2507a9df18a6b06d051e9ce84ed31a238aef3b2bb085daf12b145550be68c07c854272bd78a6f77da9197779b9c7cd9e9 0001-linedit-deluser-use-POSIX-getpwent-instead-of-getpwe.patch
@@ -168,7 +174,5 @@ a35b66cd28b79ccc14b47315ac94677fdf8c14d8a6e8956707e71fb50d453dfc5b4b822832cd1fae
2a8e9360e1cedd26bdb70d8cc036ef0abc7588bf2eee147c1c7436d7a40763f8e31d346b980145a36649130a2f811d299e4f46f7e1b60a8165a60ae9e79727d5 1000-fbsplash-use-virtual-y-size-in-mmap-size-calculation.patch
a181dd54e8e11cf1199edb1b1fcd4b7402bbf142593b6014f32c6815bb7093b56899ad0fcc9f73c382f56203ac5274fb3d51fa070feb541436f23c31680f1a69 1001-fbsplash-support-console-switching.patch
c33073416f7da2805a20f3f456f869217171c8fbfdef85f4ae481307aeb1e1b5717084bbbc619010fa5500c3f3f49b6468d5c122024fcc49d637c82427a3f553 1002-fbsplash-support-image-and-bar-alignment-and-positio.patch
-ea6bb04b2a16399a6c193a118e11a33595df95d0a3be612ea650ed7d4a3f58d0ae5c3e7d19925fc723d8da75ff0c437902ac0e13153df6e9252591366a1741ef 0001-Revert-ash-make-var-unicode-aware.patch
-6cff50ebea720d7ccdb07bf8ca52ead07f357b33a77587103c850ba3c3fb0c9e20d95fa4e6080723f9e90d38a2a5fc8067a5dc997835af20f260be026ad85b42 0001-modprobe-allow-slashes-in-modaliases-with-modprobe-a.patch
2efb13f23c48a4dc3e2eb6343256694719c3425fe8ddd36ce9fb1837e45fafa3326c2630a08d731abc6bbc104536218d095b2d997861c5b35a7f7907177d2e66 busyboxconfig
1d2739379dab1deb3eae7cffd4845300eb7d30f7343b4a1209b21a5680860d55080ad45fdefe098b249ce3040c01951fa7f0a79cd447b2d7b260eb000099d9dc glibc.patch"
diff --git a/main/busybox/busybox-1.23.0-ash.patch b/main/busybox/busybox-1.23.0-ash.patch
new file mode 100644
index 0000000000..fb494aa251
--- /dev/null
+++ b/main/busybox/busybox-1.23.0-ash.patch
@@ -0,0 +1,34 @@
+--- busybox-1.23.0/shell/ash.c
++++ busybox-1.23.0-ash/shell/ash.c
+@@ -6746,6 +6746,14 @@ varvalue(char *name, int varflags, int f
+ len = strlen(p);
+ if (!(subtype == VSPLUS || subtype == VSLENGTH))
+ memtodest(p, len, syntax, quotes);
++#if ENABLE_UNICODE_SUPPORT
++ if (subtype == VSLENGTH && len > 0) {
++ reinit_unicode_for_ash();
++ if (unicode_status == UNICODE_ON) {
++ len = unicode_strlen(p);
++ }
++ }
++#endif
+ return len;
+ }
+
+@@ -6829,15 +6837,7 @@ evalvar(char *p, int flags, struct strli
+ varunset(p, var, 0, 0);
+
+ if (subtype == VSLENGTH) {
+- ssize_t n = varlen;
+- if (n > 0) {
+- reinit_unicode_for_ash();
+- if (unicode_status == UNICODE_ON) {
+- const char *val = lookupvar(var);
+- n = unicode_strlen(val);
+- }
+- }
+- cvtnum(n > 0 ? n : 0);
++ cvtnum(varlen > 0 ? varlen : 0);
+ goto record;
+ }
+
diff --git a/main/busybox/busybox-1.23.0-modprobe.patch b/main/busybox/busybox-1.23.0-modprobe.patch
new file mode 100644
index 0000000000..69fa8510b4
--- /dev/null
+++ b/main/busybox/busybox-1.23.0-modprobe.patch
@@ -0,0 +1,203 @@
+--- busybox-1.23.0/modutils/depmod.c
++++ busybox-1.23.0-modprobe/modutils/depmod.c
+@@ -51,7 +51,11 @@ static int FAST_FUNC parse_module(const
+
+ info->dnext = info->dprev = info;
+ info->name = xstrdup(fname + 2); /* skip "./" */
+- info->modname = xstrdup(filename2modname(fname, modname));
++ info->modname = xstrdup(
++ filename2modname(
++ bb_get_last_path_component_nostrip(fname),
++ modname
++ ));
+ for (ptr = image; ptr < image + len - 10; ptr++) {
+ if (strncmp(ptr, "depends=", 8) == 0) {
+ char *u;
+@@ -242,17 +246,18 @@ int depmod_main(int argc UNUSED_PARAM, c
+ if (!(option_mask32 & OPT_n))
+ xfreopen_write("modules.alias", stdout);
+ for (m = modules; m != NULL; m = m->next) {
++ char modname[MODULE_NAME_LEN];
+ const char *fname = bb_basename(m->name);
+- int fnlen = strchrnul(fname, '.') - fname;
++ filename2modname(fname, modname);
+ while (m->aliases) {
+ /* Last word can well be m->modname instead,
+ * but depmod from module-init-tools 3.4
+ * uses module basename, i.e., no s/-/_/g.
+ * (pathname and .ko.* are still stripped)
+ * Mimicking that... */
+- printf("alias %s %.*s\n",
++ printf("alias %s %s\n",
+ (char*)llist_pop(&m->aliases),
+- fnlen, fname);
++ modname);
+ }
+ }
+ #endif
+@@ -260,12 +265,13 @@ int depmod_main(int argc UNUSED_PARAM, c
+ if (!(option_mask32 & OPT_n))
+ xfreopen_write("modules.symbols", stdout);
+ for (m = modules; m != NULL; m = m->next) {
++ char modname[MODULE_NAME_LEN];
+ const char *fname = bb_basename(m->name);
+- int fnlen = strchrnul(fname, '.') - fname;
++ filename2modname(fname, modname);
+ while (m->symbols) {
+- printf("alias symbol:%s %.*s\n",
++ printf("alias symbol:%s %s\n",
+ (char*)llist_pop(&m->symbols),
+- fnlen, fname);
++ modname);
+ }
+ }
+ #endif
+--- busybox-1.23.0/modutils/modprobe.c
++++ busybox-1.23.0-modprobe/modutils/modprobe.c
+@@ -229,26 +229,20 @@ static ALWAYS_INLINE struct module_entry
+ {
+ return helper_get_module(module, 1);
+ }
+-static ALWAYS_INLINE struct module_entry *get_modentry(const char *module)
++/* So far this function always gets a module pathname, never an alias name.
++ * The crucial difference is that pathname needs dirname stripping,
++ * while alias name must NOT do it!
++ * Testcase where dirname stripping is likely to go wrong: "modprobe devname:snd/timer"
++ */
++static ALWAYS_INLINE struct module_entry *get_modentry(const char *pathname)
+ {
+- return helper_get_module(module, 0);
++ return helper_get_module(bb_get_last_path_component_nostrip(pathname), 0);
+ }
+
+ static void add_probe(const char *name)
+ {
+ struct module_entry *m;
+
+- /*
+- * get_or_add_modentry() strips path from name and works
+- * on remaining basename.
+- * This would make "rmmod dir/name" and "modprobe dir/name"
+- * to work like "rmmod name" and "modprobe name",
+- * which is wrong, and can be abused via implicit modprobing:
+- * "ifconfig /usbserial up" tries to modprobe netdev-/usbserial.
+- */
+- if (strchr(name, '/'))
+- bb_error_msg_and_die("malformed module name '%s'", name);
+-
+ m = get_or_add_modentry(name);
+ if (!(option_mask32 & (OPT_REMOVE | OPT_SHOW_DEPS))
+ && (m->flags & MODULE_FLAG_LOADED)
+@@ -510,7 +504,7 @@ static void load_modules_dep(void)
+ colon = last_char_is(tokens[0], ':');
+ if (colon == NULL)
+ continue;
+- *colon = 0;
++ *colon = '\0';
+
+ m = get_modentry(tokens[0]);
+ if (m == NULL)
+@@ -557,7 +551,6 @@ int modprobe_main(int argc UNUSED_PARAM,
+
+ if (opt & OPT_LIST_ONLY) {
+ int i;
+- char name[MODULE_NAME_LEN];
+ char *colon, *tokens[2];
+ parser_t *p = config_open2(CONFIG_DEFAULT_DEPMOD_FILE, xfopen_for_read);
+
+@@ -569,10 +562,14 @@ int modprobe_main(int argc UNUSED_PARAM,
+ if (!colon)
+ continue;
+ *colon = '\0';
+- filename2modname(tokens[0], name);
+ if (!argv[0])
+ puts(tokens[0]);
+ else {
++ char name[MODULE_NAME_LEN];
++ filename2modname(
++ bb_get_last_path_component_nostrip(tokens[0]),
++ name
++ );
+ for (i = 0; argv[i]; i++) {
+ if (fnmatch(argv[i], name, 0) == 0) {
+ puts(tokens[0]);
+--- busybox-1.23.0/modutils/modprobe-small.c
++++ busybox-1.23.0-modprobe/modutils/modprobe-small.c
+@@ -149,9 +149,13 @@ static void replace(char *s, char what,
+ static char *filename2modname(const char *filename, char *modname)
+ {
+ int i;
+- char *from;
++ const char *from;
+
+- from = bb_get_last_path_component_nostrip(filename);
++ // Disabled since otherwise "modprobe dir/name" would work
++ // as if it is "modprobe name". It is unclear why
++ // 'basenamization' was here in the first place.
++ //from = bb_get_last_path_component_nostrip(filename);
++ from = filename;
+ for (i = 0; i < (MODULE_NAME_LEN-1) && from[i] != '\0' && from[i] != '.'; i++)
+ modname[i] = (from[i] == '-') ? '_' : from[i];
+ modname[i] = '\0';
+@@ -631,6 +635,14 @@ static void process_module(char *name, c
+ infovec = find_alias(name);
+ }
+
++ if (!infovec) {
++ /* both dirscan and find_alias found nothing */
++ if (!is_rmmod && applet_name[0] != 'd') /* it wasn't rmmod or depmod */
++ bb_error_msg("module '%s' not found", name);
++//TODO: _and_die()? or should we continue (un)loading modules listed on cmdline?
++ goto ret;
++ }
++
+ /* There can be more than one module for the given alias. For example,
+ * "pci:v00008086d00007010sv00000000sd00000000bc01sc01i80" matches
+ * ata_piix because it has alias "pci:v00008086d00007010sv*sd*bc*sc*i*"
+@@ -646,7 +658,8 @@ static void process_module(char *name, c
+ int r;
+ char modname[MODULE_NAME_LEN];
+
+- filename2modname(info->pathname, modname);
++ filename2modname(
++ bb_get_last_path_component_nostrip(info->pathname), modname);
+ r = delete_module(modname, O_NONBLOCK | O_EXCL);
+ dbg1_error_msg("delete_module('%s', O_NONBLOCK | O_EXCL):%d", modname, r);
+ if (r != 0) {
+@@ -669,14 +682,6 @@ static void process_module(char *name, c
+ */
+ }
+
+- if (!infovec) {
+- /* both dirscan and find_alias found nothing */
+- if (!is_rmmod && applet_name[0] != 'd') /* it wasn't rmmod or depmod */
+- bb_error_msg("module '%s' not found", name);
+-//TODO: _and_die()? or should we continue (un)loading modules listed on cmdline?
+- goto ret;
+- }
+-
+ infoidx = 0;
+ while ((info = infovec[infoidx++]) != NULL) {
+ /* Iterate thru dependencies, trying to (un)load them */
+--- busybox-1.23.0/modutils/modutils.c
++++ busybox-1.23.0-modprobe/modutils/modutils.c
+@@ -48,13 +48,17 @@ int FAST_FUNC string_to_llist(char *stri
+ char* FAST_FUNC filename2modname(const char *filename, char *modname)
+ {
+ int i;
+- char *from;
++ const char *from;
+
+ if (filename == NULL)
+ return NULL;
+ if (modname == NULL)
+ modname = xmalloc(MODULE_NAME_LEN);
+- from = bb_get_last_path_component_nostrip(filename);
++ // Disabled since otherwise "modprobe dir/name" would work
++ // as if it is "modprobe name". It is unclear why
++ // 'basenamization' was here in the first place.
++ //from = bb_get_last_path_component_nostrip(filename);
++ from = filename;
+ for (i = 0; i < (MODULE_NAME_LEN-1) && from[i] != '\0' && from[i] != '.'; i++)
+ modname[i] = (from[i] == '-') ? '_' : from[i];
+ modname[i] = '\0';
diff --git a/main/busybox/busybox-1.23.0-vi.patch b/main/busybox/busybox-1.23.0-vi.patch
new file mode 100644
index 0000000000..3a07ab9d9a
--- /dev/null
+++ b/main/busybox/busybox-1.23.0-vi.patch
@@ -0,0 +1,49 @@
+--- busybox-1.23.0/editors/vi.c
++++ busybox-1.23.0-vi/editors/vi.c
+@@ -542,9 +542,6 @@ static void cookmode(void); // return to
+ static int mysleep(int);
+ static int readit(void); // read (maybe cursor) key from stdin
+ static int get_one_char(void); // read 1 char from stdin
+-#if !ENABLE_FEATURE_VI_READONLY
+-#define file_insert(fn, p, update_ro_status) file_insert(fn, p)
+-#endif
+ // file_insert might reallocate text[]!
+ static int file_insert(const char *, char *, int);
+ static int file_write(char *, char *, char *);
+@@ -1325,7 +1322,7 @@ static void colon(char *buf)
+ q = next_line(q);
+ { // dance around potentially-reallocated text[]
+ uintptr_t ofs = q - text;
+- size = file_insert(fn, q, /*update_ro:*/ 0);
++ size = file_insert(fn, q, 0);
+ q = text + ofs;
+ }
+ if (size < 0)
+@@ -2905,7 +2902,7 @@ static char *get_input_line(const char *
+ }
+
+ // might reallocate text[]!
+-static int file_insert(const char *fn, char *p, int update_ro_status)
++static int file_insert(const char *fn, char *p, int initial)
+ {
+ int cnt = -1;
+ int fd, size;
+@@ -2918,7 +2915,8 @@ static int file_insert(const char *fn, c
+
+ fd = open(fn, O_RDONLY);
+ if (fd < 0) {
+- status_line_bold_errno(fn);
++ if (!initial)
++ status_line_bold_errno(fn);
+ return cnt;
+ }
+
+@@ -2946,7 +2944,7 @@ static int file_insert(const char *fn, c
+ close(fd);
+
+ #if ENABLE_FEATURE_VI_READONLY
+- if (update_ro_status
++ if (initial
+ && ((access(fn, W_OK) < 0) ||
+ /* root will always have access()
+ * so we check fileperms too */