Leonid Plyushch
7 years ago
committed by
Fredrik Fornwall
7 changed files with 189 additions and 4 deletions
@ -0,0 +1,27 @@ |
|||
diff -uNr apt-1.4.8/apt-pkg/aptconfiguration.cc apt-1.4.8.mod/apt-pkg/aptconfiguration.cc
|
|||
--- apt-1.4.8/apt-pkg/aptconfiguration.cc 2017-09-13 19:47:33.000000000 +0300
|
|||
+++ apt-1.4.8.mod/apt-pkg/aptconfiguration.cc 2018-06-19 13:51:30.203757806 +0300
|
|||
@@ -35,10 +35,10 @@
|
|||
// setDefaultConfigurationForCompressors /*{{{*/ |
|||
static void setDefaultConfigurationForCompressors() { |
|||
// Set default application paths to check for optional compression types |
|||
- _config->CndSet("Dir::Bin::gzip", "/bin/gzip");
|
|||
- _config->CndSet("Dir::Bin::bzip2", "/bin/bzip2");
|
|||
- _config->CndSet("Dir::Bin::xz", "/usr/bin/xz");
|
|||
- _config->CndSet("Dir::Bin::lz4", "/usr/bin/lz4");
|
|||
+ _config->CndSet("Dir::Bin::gzip", "@TERMUX_PREFIX@/bin/gzip");
|
|||
+ _config->CndSet("Dir::Bin::bzip2", "@TERMUX_PREFIX@/bin/bzip2");
|
|||
+ _config->CndSet("Dir::Bin::xz", "@TERMUX_PREFIX@/bin/xz");
|
|||
+ _config->CndSet("Dir::Bin::lz4", "@TERMUX_PREFIX@/bin/lz4");
|
|||
if (FileExists(_config->Find("Dir::Bin::xz")) == true) { |
|||
_config->Set("Dir::Bin::lzma", _config->Find("Dir::Bin::xz")); |
|||
_config->Set("APT::Compressor::lzma::Binary", "xz"); |
|||
@@ -51,7 +51,7 @@
|
|||
_config->Set("APT::Compressor::lzma::UncompressArg::", "-d"); |
|||
} |
|||
} else { |
|||
- _config->CndSet("Dir::Bin::lzma", "/usr/bin/lzma");
|
|||
+ _config->CndSet("Dir::Bin::lzma", "@TERMUX_PREFIX@/bin/lzma");
|
|||
if (_config->Exists("APT::Compressor::lzma::CompressArg") == false) { |
|||
_config->Set("APT::Compressor::lzma::CompressArg::", "--suffix="); |
|||
_config->Set("APT::Compressor::lzma::CompressArg::", "-6"); |
@ -0,0 +1,12 @@ |
|||
diff -uNr apt-1.4.8/apt-pkg/contrib/cdromutl.cc apt-1.4.8.mod/apt-pkg/contrib/cdromutl.cc
|
|||
--- apt-1.4.8/apt-pkg/contrib/cdromutl.cc 2017-09-13 19:47:33.000000000 +0300
|
|||
+++ apt-1.4.8.mod/apt-pkg/contrib/cdromutl.cc 2018-06-19 13:55:06.720435620 +0300
|
|||
@@ -268,7 +268,7 @@
|
|||
string FindMountPointForDevice(const char *devnode) |
|||
{ |
|||
// this is the order that mount uses as well |
|||
- std::vector<std::string> const mounts = _config->FindVector("Dir::state::MountPoints", "/etc/mtab,/proc/mount");
|
|||
+ std::vector<std::string> const mounts = _config->FindVector("Dir::state::MountPoints", "@TERMUX_PREFIX@/etc/mtab,/proc/mount");
|
|||
|
|||
for (std::vector<std::string>::const_iterator m = mounts.begin(); m != mounts.end(); ++m) |
|||
if (FileExists(*m) == true) |
@ -0,0 +1,24 @@ |
|||
diff -uNr apt-1.4.8/apt-pkg/contrib/fileutl.cc apt-1.4.8.mod/apt-pkg/contrib/fileutl.cc
|
|||
--- apt-1.4.8/apt-pkg/contrib/fileutl.cc 2018-06-19 13:55:47.313771042 +0300
|
|||
+++ apt-1.4.8.mod/apt-pkg/contrib/fileutl.cc 2018-06-19 13:41:41.387060822 +0300
|
|||
@@ -3068,7 +3068,7 @@
|
|||
setenv("LOGNAME", pw->pw_name, 1); |
|||
auto const shell = flNotDir(pw->pw_shell); |
|||
if (shell == "false" || shell == "nologin") |
|||
- setenv("SHELL", "/bin/sh", 1);
|
|||
+ setenv("SHELL", "@TERMUX_PREFIX@/bin/sh", 1);
|
|||
else |
|||
setenv("SHELL", pw->pw_shell, 1); |
|||
auto const apt_setenv_tmp = [](char const * const env) { |
|||
diff -uNr apt-1.4.8/apt-pkg/contrib/fileutl.cc apt-1.4.8.mod/apt-pkg/contrib/fileutl.cc
|
|||
--- apt-1.4.8/apt-pkg/contrib/fileutl.cc 2018-06-19 16:51:22.570980141 +0300
|
|||
+++ apt-1.4.8.mod/apt-pkg/contrib/fileutl.cc 2018-06-19 16:52:20.507649790 +0300
|
|||
@@ -108,7 +108,7 @@
|
|||
_exit(100); |
|||
} |
|||
|
|||
- if (chdir("/tmp/") != 0)
|
|||
+ if (chdir("@TERMUX_PREFIX@/tmp/") != 0)
|
|||
_exit(100); |
|||
|
|||
unsigned int Count = 1; |
@ -0,0 +1,12 @@ |
|||
diff -uNr apt-1.4.8/methods/rsh.cc apt-1.4.8.mod/methods/rsh.cc
|
|||
--- apt-1.4.8/methods/rsh.cc 2017-09-13 19:47:33.000000000 +0300
|
|||
+++ apt-1.4.8.mod/methods/rsh.cc 2018-06-19 13:41:50.497061290 +0300
|
|||
@@ -152,7 +152,7 @@
|
|||
if (Host.empty() == false) { |
|||
Args[i++] = Host.c_str(); |
|||
} |
|||
- Args[i++] = "/bin/sh";
|
|||
+ Args[i++] = "@TERMUX_PREFIX@/bin/sh";
|
|||
Args[i] = 0; |
|||
execvp(Args[0],(char **)Args); |
|||
exit(100); |
Loading…
Reference in new issue