dpkg: use busybox for rm and tar

This commit is contained in:
Leonid Pliushch 2019-05-12 22:00:46 +03:00
parent 013bdff847
commit d676463e59
3 changed files with 35 additions and 6 deletions

View File

@ -1,9 +1,16 @@
Remove tar options not supported by busybox tar.
diff -u -r ../dpkg-1.17.10/dpkg-deb/extract.c ./dpkg-deb/extract.c
--- ../dpkg-1.17.10/dpkg-deb/extract.c 2014-06-04 02:02:54.000000000 +0200
+++ ./dpkg-deb/extract.c 2014-07-01 16:40:02.785848137 +0200
@@ -327,14 +327,20 @@
diff -uNr dpkg-1.19.4/dpkg-deb/extract.c dpkg-1.19.4.mod/dpkg-deb/extract.c
--- dpkg-1.19.4/dpkg-deb/extract.c 2019-01-23 04:31:39.000000000 +0200
+++ dpkg-1.19.4.mod/dpkg-deb/extract.c 2019-05-12 21:51:55.872339882 +0300
@@ -309,7 +309,7 @@
if (!c3) {
struct command cmd;
- command_init(&cmd, TAR, "tar");
+ command_init(&cmd, "busybox", "tar");
command_add_arg(&cmd, "tar");
if ((taroption & DPKG_TAR_LIST) && (taroption & DPKG_TAR_EXTRACT))
@@ -321,14 +321,20 @@
else
internerr("unknown or missing tar action '%d'", taroption);

View File

@ -0,0 +1,13 @@
diff -uNr dpkg-1.19.4/src/help.c dpkg-1.19.4.mod/src/help.c
--- dpkg-1.19.4/src/help.c 2019-01-23 14:04:28.000000000 +0200
+++ dpkg-1.19.4.mod/src/help.c 2019-05-12 22:08:27.729956232 +0300
@@ -114,8 +114,7 @@
void checkpath(void) {
static const char *const prog_list[] = {
DEFAULTSHELL,
- RM,
- TAR,
+ "busybox",
DIFF,
BACKEND,
/* Mac OS X uses dyld (Mach-O) instead of ld.so (ELF), and does not have

View File

@ -18,3 +18,12 @@ diff -u -r ../dpkg-1.18.2/lib/dpkg/path-remove.c ./lib/dpkg/path-remove.c
return;
if (errno == ENOTDIR) {
/* Either it's a file, or one of the path components is. If
@@ -149,7 +149,7 @@
pid = subproc_fork();
if (pid == 0) {
- execlp(RM, "rm", "-rf", "--", pathname, NULL);
+ execlp("@TERMUX_PREFIX@/bin/busybox", "rm", "-rf", "--", pathname, NULL);
ohshite(_("unable to execute %s (%s)"),
_("rm command for cleanup"), RM);
}