tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
busybox: 1.27.2 -> 1.28.0
adisbladis
8 years ago
65774cb2
8c1e47a3
+9
-24
2 changed files
expand all
collapse all
unified
split
pkgs
os-specific
linux
busybox
busybox-in-store.patch
default.nix
+6
-6
pkgs/os-specific/linux/busybox/busybox-in-store.patch
···
1
Allow BusyBox to be invoked as "<something>-busybox". This is
2
necessary when it's run from the Nix store as <hash>-busybox during
3
stdenv bootstrap.
4
-
--- busybox-1.26.1-orig/libbb/appletlib.orig 2016-10-26 19:54:20.510957575 -0400
5
-
+++ busybox-1.26.1/libbb/appletlib.c 2016-10-26 19:48:31.590862853 -0400
6
-
@@ -887,7 +887,7 @@
7
static NORETURN void run_applet_and_exit(const char *name, char **argv)
8
{
9
# if ENABLE_BUSYBOX
10
- if (is_prefixed_with(name, "busybox"))
11
+ if (strstr(name, "busybox") != 0)
12
-
exit(busybox_main(argv));
13
# endif
14
# if NUM_APPLETS > 0
15
-
@@ -981,7 +981,7 @@ int main(int argc UNUSED_PARAM, char **argv)
16
-
17
lbb_prepare("busybox" IF_FEATURE_INDIVIDUAL(, argv));
18
# if !ENABLE_BUSYBOX
19
- if (argv[1] && is_prefixed_with(bb_basename(argv[0]), "busybox"))
···
1
Allow BusyBox to be invoked as "<something>-busybox". This is
2
necessary when it's run from the Nix store as <hash>-busybox during
3
stdenv bootstrap.
4
+
--- a/libbb/appletlib.c
5
+
+++ b/libbb/appletlib.c
6
+
@@ -947,7 +947,7 @@ void FAST_FUNC run_applet_no_and_exit(int applet_no, const char *name, char **ar
7
static NORETURN void run_applet_and_exit(const char *name, char **argv)
8
{
9
# if ENABLE_BUSYBOX
10
- if (is_prefixed_with(name, "busybox"))
11
+ if (strstr(name, "busybox") != 0)
12
+
exit(busybox_main(/*unused:*/ 0, argv));
13
# endif
14
# if NUM_APPLETS > 0
15
+
@@ -1045,7 +1045,7 @@ int main(int argc UNUSED_PARAM, char **argv)
16
+
17
lbb_prepare("busybox" IF_FEATURE_INDIVIDUAL(, argv));
18
# if !ENABLE_BUSYBOX
19
- if (argv[1] && is_prefixed_with(bb_basename(argv[0]), "busybox"))
+3
-18
pkgs/os-specific/linux/busybox/default.nix
···
27
in
28
29
stdenv.mkDerivation rec {
30
-
name = "busybox-1.27.2";
31
32
# Note to whoever is updating busybox: please verify that:
33
# nix-build pkgs/stdenv/linux/make-bootstrap-tools.nix -A test
34
# still builds after the update.
35
src = fetchurl {
36
url = "http://busybox.net/downloads/${name}.tar.bz2";
37
-
sha256 = "1pv3vs2w4l2wnw5qb0rkbpvjjdd1fwjv87miavqq0r0ynqbfajwx";
38
};
39
40
hardeningDisable = [ "format" ] ++ lib.optionals enableStatic [ "fortify" ];
41
42
patches = [
43
-
./busybox-in-store.patch
44
-
(fetchpatch {
45
-
name = "CVE-2017-15873.patch";
46
-
url = "https://git.busybox.net/busybox/patch/?id=0402cb32df015d9372578e3db27db47b33d5c7b0";
47
-
sha256 = "1s3xqifd0dww19mbnzrks0i1az0qwd884sxjzrx33d6a9jxv4dzn";
48
-
})
49
-
(fetchpatch {
50
-
name = "CVE-2017-15874.patch";
51
-
url = "https://git.busybox.net/busybox/patch/?id=9ac42c500586fa5f10a1f6d22c3f797df11b1f6b";
52
-
sha256 = "0169p4ylz9zd14ghhb39yfjvbdca2kb21pphylfh9ny7i484ahql";
53
-
})
54
-
(fetchpatch {
55
-
name = "CVE-2017-16544.patch";
56
-
url = "https://git.busybox.net/busybox/patch/?id=c3797d40a1c57352192c6106cc0f435e7d9c11e8";
57
-
sha256 = "1q3lkc4xczxrzhz73x2r0w7kmd6y33zhcnz3478nk5xi0qr66mcy";
58
-
})
59
];
60
61
configurePhase = ''
···
27
in
28
29
stdenv.mkDerivation rec {
30
+
name = "busybox-1.28.0";
31
32
# Note to whoever is updating busybox: please verify that:
33
# nix-build pkgs/stdenv/linux/make-bootstrap-tools.nix -A test
34
# still builds after the update.
35
src = fetchurl {
36
url = "http://busybox.net/downloads/${name}.tar.bz2";
37
+
sha256 = "1701carjf02y7r3djm1yvyd5kzrcxm4szinp7agfv7fmvfvm6ib0";
38
};
39
40
hardeningDisable = [ "format" ] ++ lib.optionals enableStatic [ "fortify" ];
41
42
patches = [
43
+
./busybox-in-store.patch
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
44
];
45
46
configurePhase = ''