diff --git a/internal/rosa/busybox.go b/internal/rosa/busybox.go index 0f9210f..8ea881c 100644 --- a/internal/rosa/busybox.go +++ b/internal/rosa/busybox.go @@ -317,10 +317,6 @@ exec clang \ EOF chmod +x /bin/gcc -cd /usr/src/busybox -chmod +w editors editors/awk.c -patch -p 1 < /usr/src/patches/awk-fix-literal-backslash.patch - cd "$(mktemp -d)" make \ KBUILD_SRC=/usr/src/busybox \ @@ -345,17 +341,16 @@ cp -v busybox /work/system/bin/ ln -vs ../system/bin/hush /work/bin/sh mkdir -vp /work/usr/bin/ ln -vs ../../system/bin/busybox /work/usr/bin/env -`, pkg.Path(AbsUsrSrc.Append("busybox"), true, pkg.NewHTTPGetTar( - &http.Client{Transport: &http.Transport{ - // busybox website is really slow to respond - TLSHandshakeTimeout: 2 * time.Minute, - }}, - "https://busybox.net/downloads/busybox-"+version+".tar.bz2", - mustDecode(checksum), - pkg.TarBzip2, - )), pkg.Path( - AbsUsrSrc.Append("patches", "awk-fix-literal-backslash.patch"), false, - pkg.NewFile("awk-fix-literal-backslash.patch", []byte(`diff --git a/editors/awk.c b/editors/awk.c +`, pkg.Path(AbsUsrSrc.Append("busybox"), true, t.NewPatchedSource( + "busybox", version, pkg.NewHTTPGetTar( + &http.Client{Transport: &http.Transport{ + // busybox website is really slow to respond + TLSHandshakeTimeout: 2 * time.Minute, + }}, + "https://busybox.net/downloads/busybox-"+version+".tar.bz2", + mustDecode(checksum), + pkg.TarBzip2, + ), true, [2]string{"awk-fix-literal-backslash", `diff --git a/editors/awk.c b/editors/awk.c index 64e752f4b..40f5ba7f7 100644 --- a/editors/awk.c +++ b/editors/awk.c @@ -373,7 +368,7 @@ index 64e752f4b..40f5ba7f7 100644 + } bslash = 0; } - }`)), - )) + }`}, + ))) } func init() { artifactsF[Busybox] = Toolchain.newBusybox }