Fredrik Fornwall
9 years ago
24 changed files with 288 additions and 279 deletions
@ -1,11 +0,0 @@ |
|||||
diff -u -r ../upstream.git/Makefile ./Makefile
|
|
||||
--- ../upstream.git/Makefile 2013-12-07 14:12:14.000000000 +0100
|
|
||||
+++ ./Makefile 2014-05-03 23:46:58.870093099 +0200
|
|
||||
@@ -21,7 +21,6 @@
|
|
||||
$(MAKE) -C dselect $@ |
|
||||
$(MAKE) -C doc $@ |
|
||||
$(MAKE) -C po $@ |
|
||||
- $(MAKE) -C test $@
|
|
||||
|
|
||||
all headers library clean veryclean binary program doc manpages debiandoc test update-po: startup dirs |
|
||||
|
|
@ -1,46 +0,0 @@ |
|||||
diff -u -r ../upstream.git/cmdline/apt-key.in ./cmdline/apt-key.in
|
|
||||
--- ../upstream.git/cmdline/apt-key.in 2014-04-25 13:39:00.000000000 +0200
|
|
||||
+++ ./cmdline/apt-key.in 2014-06-03 11:55:07.623749140 +0200
|
|
||||
@@ -40,10 +40,7 @@
|
|
||||
TMP_KEYRING=${APT_DIR}/var/lib/apt/keyrings/maybe-import-keyring.gpg |
|
||||
|
|
||||
requires_root() { |
|
||||
- if [ "$(id -u)" -ne 0 ]; then
|
|
||||
- echo >&1 "ERROR: This command can only be used by root."
|
|
||||
- exit 1
|
|
||||
- fi
|
|
||||
+ # We do not require root
|
|
||||
} |
|
||||
|
|
||||
# gpg defaults to mode 0600 for new keyrings. Create one with 0644 instead. |
|
||||
@@ -216,11 +213,11 @@
|
|
||||
remove_key_from_keyring "$FORCED_KEYRING" "$1" |
|
||||
else |
|
||||
# otherwise all known keyrings are up for inspection |
|
||||
- local TRUSTEDFILE="/etc/apt/trusted.gpg"
|
|
||||
+ local TRUSTEDFILE="@TERMUX_PREFIX@/etc/apt/trusted.gpg"
|
|
||||
eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring) |
|
||||
eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f) |
|
||||
remove_key_from_keyring "$TRUSTEDFILE" "$1" |
|
||||
- TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
|
|
||||
+ TRUSTEDPARTS="@TERMUX_PREFIX@/etc/apt/trusted.gpg.d"
|
|
||||
eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d) |
|
||||
if [ -d "$TRUSTEDPARTS" ]; then |
|
||||
for trusted in $(run-parts --list "$TRUSTEDPARTS" --regex '^.*\.gpg$'); do |
|
||||
@@ -278,14 +275,14 @@
|
|
||||
done |
|
||||
|
|
||||
if [ -z "$TRUSTEDFILE" ]; then |
|
||||
- TRUSTEDFILE="/etc/apt/trusted.gpg"
|
|
||||
+ TRUSTEDFILE="@TERMUX_PREFIX@/etc/apt/trusted.gpg"
|
|
||||
eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring) |
|
||||
eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f) |
|
||||
if [ -r "$TRUSTEDFILE" ]; then |
|
||||
GPG="$GPG --keyring $TRUSTEDFILE" |
|
||||
fi |
|
||||
GPG="$GPG --primary-keyring $TRUSTEDFILE" |
|
||||
- TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
|
|
||||
+ TRUSTEDPARTS="@TERMUX_PREFIX@/etc/apt/trusted.gpg.d"
|
|
||||
eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d) |
|
||||
if [ -d "$TRUSTEDPARTS" ]; then |
|
||||
# strip / suffix as gpg will double-slash in that case (#665411) |
|
@ -0,0 +1,12 @@ |
|||||
|
diff -u -r ../apt-1.1.3/apt-pkg/contrib/gpgv.cc ./apt-pkg/contrib/gpgv.cc
|
||||
|
--- ../apt-1.1.3/apt-pkg/contrib/gpgv.cc 2015-11-30 03:08:24.000000000 -0500
|
||||
|
+++ ./apt-pkg/contrib/gpgv.cc 2015-12-03 16:57:57.183003187 -0500
|
||||
|
@@ -47,7 +47,7 @@
|
||||
|
int const &statusfd, int fd[2], std::string const &key) |
||||
|
{ |
||||
|
#define EINTERNAL 111 |
||||
|
- std::string const aptkey = _config->FindFile("Dir::Bin::apt-key", "/usr/bin/apt-key");
|
||||
|
+ std::string const aptkey = _config->FindFile("Dir::Bin::apt-key", "@TERMUX_PREFIX@/bin/apt-key");
|
||||
|
|
||||
|
bool const Debug = _config->FindB("Debug::Acquire::gpgv", false); |
||||
|
|
@ -0,0 +1,31 @@ |
|||||
|
diff -u -r ../apt-1.1.3/apt-pkg/contrib/srvrec.cc ./apt-pkg/contrib/srvrec.cc
|
||||
|
--- ../apt-1.1.3/apt-pkg/contrib/srvrec.cc 2015-11-30 03:08:24.000000000 -0500
|
||||
|
+++ ./apt-pkg/contrib/srvrec.cc 2015-12-03 16:21:54.397715576 -0500
|
||||
|
@@ -40,14 +40,27 @@
|
||||
|
struct servent *s_ent = nullptr; |
||||
|
std::vector<char> buf(1024); |
||||
|
|
||||
|
+#ifdef __ANDROID__
|
||||
|
+ s_ent = getservbyport(htons(port), "tcp");
|
||||
|
+ if (s_ent == nullptr) return false;
|
||||
|
+#else
|
||||
|
res = getservbyport_r(htons(port), "tcp", &s_ent_buf, buf.data(), buf.size(), &s_ent); |
||||
|
if (res != 0 || s_ent == nullptr) |
||||
|
return false; |
||||
|
+#endif
|
||||
|
|
||||
|
strprintf(target, "_%s._tcp.%s", s_ent->s_name, host.c_str()); |
||||
|
return GetSrvRecords(target, Result); |
||||
|
} |
||||
|
|
||||
|
+/* Bionic has res_init() but it's not in any header */
|
||||
|
+#ifdef __ANDROID__
|
||||
|
+extern "C" int res_init();
|
||||
|
+extern "C" int res_query(const char* dname, int class_, int type_, unsigned char* answer, int anslen);
|
||||
|
+extern "C" int __dn_skipname(const unsigned char* comp_dn, const unsigned char* eom);
|
||||
|
+static inline int dn_skipname(const unsigned char* a, const unsigned char* b) { return __dn_skipname(a,b); }
|
||||
|
+#endif
|
||||
|
+
|
||||
|
bool GetSrvRecords(std::string name, std::vector<SrvRec> &Result) |
||||
|
{ |
||||
|
unsigned char answer[PACKETSZ]; |
@ -0,0 +1,28 @@ |
|||||
|
diff -u -r ../apt-1.1.3/apt-pkg/deb/debrecords.cc ./apt-pkg/deb/debrecords.cc
|
||||
|
--- ../apt-1.1.3/apt-pkg/deb/debrecords.cc 2015-11-30 03:08:24.000000000 -0500
|
||||
|
+++ ./apt-pkg/deb/debrecords.cc 2015-12-03 16:30:51.506746167 -0500
|
||||
|
@@ -25,7 +25,9 @@
|
||||
|
#include <sstream> |
||||
|
#include <string> |
||||
|
#include <vector> |
||||
|
+#ifndef __ANDROID__
|
||||
|
#include <langinfo.h> |
||||
|
+#endif
|
||||
|
|
||||
|
#include <apti18n.h> |
||||
|
/*}}}*/ |
||||
|
@@ -143,12 +145,14 @@
|
||||
|
orig = Section.FindS("Description"); |
||||
|
} |
||||
|
|
||||
|
+#ifndef __ANDROID__
|
||||
|
char const * const codeset = nl_langinfo(CODESET); |
||||
|
if (strcmp(codeset,"UTF-8") != 0) { |
||||
|
string dest; |
||||
|
UTF8ToCodeset(codeset, orig, &dest); |
||||
|
return dest; |
||||
|
} |
||||
|
+#endif
|
||||
|
|
||||
|
return orig; |
||||
|
} |
@ -0,0 +1,11 @@ |
|||||
|
diff -u -r ../apt-1.1.3/apt-pkg/edsp/edspsystem.cc ./apt-pkg/edsp/edspsystem.cc
|
||||
|
--- ../apt-1.1.3/apt-pkg/edsp/edspsystem.cc 2015-11-30 03:08:24.000000000 -0500
|
||||
|
+++ ./apt-pkg/edsp/edspsystem.cc 2015-12-03 16:33:49.052450163 -0500
|
||||
|
@@ -21,6 +21,7 @@
|
||||
|
|
||||
|
#include <stddef.h> |
||||
|
#include <unistd.h> |
||||
|
+#include <stdlib.h> /* For mkdtemp */
|
||||
|
|
||||
|
#include <string> |
||||
|
#include <vector> |
@ -1,12 +0,0 @@ |
|||||
diff -u -r ../apt-0.9.16.1/apt-pkg/makefile ./apt-pkg/makefile
|
|
||||
--- ../apt-0.9.16.1/apt-pkg/makefile 2014-03-15 17:59:06.000000000 +0100
|
|
||||
+++ ./apt-pkg/makefile 2014-03-25 01:26:00.600685588 +0100
|
|
||||
@@ -14,7 +14,7 @@
|
|
||||
LIBRARY=apt-pkg |
|
||||
MAJOR=$(LIBAPTPKG_MAJOR) |
|
||||
MINOR=$(LIBAPTPKG_RELEASE) |
|
||||
-SLIBS=$(PTHREADLIB) $(INTLLIBS) -lutil -ldl
|
|
||||
+SLIBS=$(PTHREADLIB) $(INTLLIBS) -ldl
|
|
||||
ifeq ($(HAVE_ZLIB),yes) |
|
||||
SLIBS+= -lz |
|
||||
endif |
|
@ -0,0 +1,12 @@ |
|||||
|
diff -u -r ../apt-1.1.3/apt-pkg/makefile ./apt-pkg/makefile
|
||||
|
--- ../apt-1.1.3/apt-pkg/makefile 2015-11-30 03:08:24.000000000 -0500
|
||||
|
+++ ./apt-pkg/makefile 2015-12-03 16:37:32.041569392 -0500
|
||||
|
@@ -15,7 +15,7 @@
|
||||
|
LIBRARY=apt-pkg |
||||
|
MAJOR=$(LIBAPTPKG_MAJOR) |
||||
|
MINOR=$(LIBAPTPKG_RELEASE) |
||||
|
-SLIBS=$(PTHREADLIB) $(INTLLIBS) -lutil -ldl -lresolv
|
||||
|
+SLIBS=$(PTHREADLIB) $(INTLLIBS) -ldl
|
||||
|
ifeq ($(HAVE_ZLIB),yes) |
||||
|
SLIBS+= -lz |
||||
|
endif |
@ -0,0 +1,11 @@ |
|||||
|
diff -u -r ../apt-1.1.3/cmdline/apt-helper.cc ./cmdline/apt-helper.cc
|
||||
|
--- ../apt-1.1.3/cmdline/apt-helper.cc 2015-11-30 03:08:24.000000000 -0500
|
||||
|
+++ ./cmdline/apt-helper.cc 2015-12-03 16:49:25.049283100 -0500
|
||||
|
@@ -28,6 +28,7 @@
|
||||
|
#include <iostream> |
||||
|
#include <string> |
||||
|
#include <vector> |
||||
|
+#include <stdlib.h> // For atoi
|
||||
|
|
||||
|
#include <apti18n.h> |
||||
|
/*}}}*/ |
@ -0,0 +1,42 @@ |
|||||
|
diff -u -r ../apt-1.1.3/cmdline/apt-key.in ./cmdline/apt-key.in
|
||||
|
--- ../apt-1.1.3/cmdline/apt-key.in 2015-11-30 03:08:24.000000000 -0500
|
||||
|
+++ ./cmdline/apt-key.in 2015-12-03 16:55:22.860914040 -0500
|
||||
|
@@ -19,10 +19,7 @@
|
||||
|
aptkey_echo() { echo "$@"; } |
||||
|
|
||||
|
requires_root() { |
||||
|
- if [ "$(id -u)" -ne 0 ]; then
|
||||
|
- echo >&2 "ERROR: This command can only be used by root."
|
||||
|
- exit 1
|
||||
|
- fi
|
||||
|
+ continue
|
||||
|
} |
||||
|
|
||||
|
get_fingerprints_of_keyring() { |
||||
|
@@ -212,7 +209,7 @@
|
||||
|
if [ -s "$TRUSTEDFILE" ]; then |
||||
|
$ACTION "$TRUSTEDFILE" "$@" |
||||
|
fi |
||||
|
- local TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
|
||||
|
+ local TRUSTEDPARTS="@TERMUX_PREFIX@/etc/apt/trusted.gpg.d"
|
||||
|
eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d) |
||||
|
if [ -d "$TRUSTEDPARTS" ]; then |
||||
|
# strip / suffix as gpg will double-slash in that case (#665411) |
||||
|
@@ -286,7 +283,7 @@
|
||||
|
fi |
||||
|
else |
||||
|
# otherwise all known keyrings are merged |
||||
|
- local TRUSTEDPARTS="/etc/apt/trusted.gpg.d"
|
||||
|
+ local TRUSTEDPARTS="@TERMUX_PREFIX@/etc/apt/trusted.gpg.d"
|
||||
|
eval $(apt-config shell TRUSTEDPARTS Dir::Etc::TrustedParts/d) |
||||
|
if [ -d "$TRUSTEDPARTS" ]; then |
||||
|
# ignore errors mostly for non-existing $TRUSTEDFILE |
||||
|
@@ -441,7 +438,7 @@
|
||||
|
done |
||||
|
|
||||
|
if [ -z "$TRUSTEDFILE" ]; then |
||||
|
- TRUSTEDFILE="/etc/apt/trusted.gpg"
|
||||
|
+ TRUSTEDFILE="@TERMUX_PREFIX@/etc/apt/trusted.gpg"
|
||||
|
eval $(apt-config shell TRUSTEDFILE Apt::GPGV::TrustedKeyring) |
||||
|
eval $(apt-config shell TRUSTEDFILE Dir::Etc::Trusted/f) |
||||
|
fi |
@ -0,0 +1,12 @@ |
|||||
|
diff -u -r ../apt-1.1.3/cmdline/makefile ./cmdline/makefile
|
||||
|
--- ../apt-1.1.3/cmdline/makefile 2015-11-30 03:08:24.000000000 -0500
|
||||
|
+++ ./cmdline/makefile 2015-12-03 16:50:46.792294882 -0500
|
||||
|
@@ -49,7 +49,7 @@
|
||||
|
|
||||
|
# The apt-helper |
||||
|
PROGRAM=apt-helper |
||||
|
-SLIBS = -lapt-pkg -lapt-private $(INTLLIBS) -lresolv
|
||||
|
+SLIBS = -lapt-pkg -lapt-private $(INTLLIBS)
|
||||
|
LIB_MAKES = apt-pkg/makefile apt-private/makefile |
||||
|
SOURCE = apt-helper.cc |
||||
|
include $(PROGRAM_H) |
@ -1,15 +0,0 @@ |
|||||
diff -u -r ../upstream.git/configure.ac ./configure.ac
|
|
||||
--- ../upstream.git/configure.ac 2014-06-18 14:12:32.000000000 +0200
|
|
||||
+++ ./configure.ac 2014-06-18 23:18:51.219899072 +0200
|
|
||||
@@ -89,11 +89,6 @@
|
|
||||
AC_MSG_ERROR([failed: I need CURL due https support]), |
|
||||
) |
|
||||
|
|
||||
-AC_LANG_PUSH([C++])
|
|
||||
-AC_CHECK_HEADER(gtest/gtest.h,,
|
|
||||
- AC_MSG_ERROR([failed: I need gtest to build tests]),
|
|
||||
-)
|
|
||||
-AC_LANG_POP([C++])
|
|
||||
|
|
||||
|
|
||||
AC_SUBST(BDBLIB) |
|
@ -0,0 +1,41 @@ |
|||||
|
diff -u -r ../apt-1.1.3/apt-pkg/contrib/fileutl.cc ./apt-pkg/contrib/fileutl.cc
|
||||
|
--- ../apt-1.1.3/apt-pkg/contrib/fileutl.cc 2015-11-30 03:08:24.000000000 -0500
|
||||
|
+++ ./apt-pkg/contrib/fileutl.cc 2015-12-03 17:43:23.360831115 -0500
|
||||
|
@@ -100,7 +100,7 @@
|
||||
|
_exit(100); |
||||
|
} |
||||
|
|
||||
|
- if (chdir("/tmp/") != 0)
|
||||
|
+ if (chdir("@TERMUX_PREFIX@/tmp/") != 0)
|
||||
|
_exit(100); |
||||
|
|
||||
|
unsigned int Count = 1; |
||||
|
@@ -2102,6 +2102,7 @@
|
||||
|
std::vector<std::string> Glob(std::string const &pattern, int flags) |
||||
|
{ |
||||
|
std::vector<std::string> result; |
||||
|
+#ifndef __ANDROID__
|
||||
|
glob_t globbuf; |
||||
|
int glob_res; |
||||
|
unsigned int i; |
||||
|
@@ -2121,6 +2122,7 @@
|
||||
|
result.push_back(string(globbuf.gl_pathv[i])); |
||||
|
|
||||
|
globfree(&globbuf); |
||||
|
+#endif
|
||||
|
return result; |
||||
|
} |
||||
|
/*}}}*/ |
||||
|
@@ -2136,10 +2138,10 @@
|
||||
|
struct stat st; |
||||
|
if (!tmpdir || strlen(tmpdir) == 0 || // tmpdir is set |
||||
|
stat(tmpdir, &st) != 0 || (st.st_mode & S_IFDIR) == 0) // exists and is directory |
||||
|
- tmpdir = "/tmp";
|
||||
|
+ tmpdir = "@TERMUX_PREFIX@/tmp";
|
||||
|
else if (geteuid() != 0 && // root can do everything anyway |
||||
|
faccessat(-1, tmpdir, R_OK | W_OK | X_OK, AT_EACCESS | AT_SYMLINK_NOFOLLOW) != 0) // current user has rwx access to directory |
||||
|
- tmpdir = "/tmp";
|
||||
|
+ tmpdir = "@TERMUX_PREFIX@/tmp";
|
||||
|
|
||||
|
return string(tmpdir); |
||||
|
} |
@ -1,27 +0,0 @@ |
|||||
diff -u -r ../upstream.git/apt-pkg/deb/debrecords.cc ./apt-pkg/deb/debrecords.cc
|
|
||||
--- ../upstream.git/apt-pkg/deb/debrecords.cc 2014-04-25 13:39:00.000000000 +0200
|
|
||||
+++ ./apt-pkg/deb/debrecords.cc 2014-07-01 16:47:41.913835586 +0200
|
|
||||
@@ -22,7 +22,9 @@
|
|
||||
#include <algorithm> |
|
||||
#include <string> |
|
||||
#include <vector> |
|
||||
+#ifndef __ANDROID__
|
|
||||
#include <langinfo.h> |
|
||||
+#endif
|
|
||||
/*}}}*/ |
|
||||
|
|
||||
using std::string; |
|
||||
@@ -151,11 +153,13 @@
|
|
||||
orig = Section.FindS(string("Description-").append(*l).c_str()); |
|
||||
} |
|
||||
|
|
||||
+#ifndef __ANDROID__
|
|
||||
char const * const codeset = nl_langinfo(CODESET); |
|
||||
if (strcmp(codeset,"UTF-8") != 0) { |
|
||||
UTF8ToCodeset(codeset, orig, &dest); |
|
||||
orig = dest; |
|
||||
} |
|
||||
+#endif
|
|
||||
|
|
||||
return orig; |
|
||||
} |
|
@ -1,26 +0,0 @@ |
|||||
diff -u -r ../apt-1.0.9.4/apt-pkg/deb/dpkgpm.cc ./apt-pkg/deb/dpkgpm.cc
|
|
||||
--- ../apt-1.0.9.4/apt-pkg/deb/dpkgpm.cc 2014-12-03 10:06:58.000000000 -0500
|
|
||||
+++ ./apt-pkg/deb/dpkgpm.cc 2014-12-07 07:17:09.210804305 -0500
|
|
||||
@@ -27,7 +27,9 @@
|
|
||||
#include <errno.h> |
|
||||
#include <fcntl.h> |
|
||||
#include <grp.h> |
|
||||
-#include <pty.h>
|
|
||||
+#ifndef __ANDROID__
|
|
||||
+# include <pty.h>
|
|
||||
+#endif
|
|
||||
#include <pwd.h> |
|
||||
#include <signal.h> |
|
||||
#include <stddef.h> |
|
||||
@@ -1075,7 +1077,11 @@
|
|
||||
|
|
||||
_error->PushToStack(); |
|
||||
|
|
||||
+#ifdef __ANDROID__
|
|
||||
+ d->master = open("/dev/ptmx", O_RDWR | O_NOCTTY);
|
|
||||
+# else
|
|
||||
d->master = posix_openpt(O_RDWR | O_NOCTTY); |
|
||||
+#endif
|
|
||||
if (d->master == -1) |
|
||||
_error->Errno("posix_openpt", _("Can not write log (%s)"), _("Is /dev/pts mounted?")); |
|
||||
else if (unlockpt(d->master) == -1) |
|
@ -1,67 +0,0 @@ |
|||||
diff -u -r ../upstream.git/apt-pkg/contrib/fileutl.cc ./apt-pkg/contrib/fileutl.cc
|
|
||||
--- ../upstream.git/apt-pkg/contrib/fileutl.cc 2014-05-05 14:01:59.000000000 +0200
|
|
||||
+++ ./apt-pkg/contrib/fileutl.cc 2014-06-06 00:09:17.233239376 +0200
|
|
||||
@@ -46,7 +46,9 @@
|
|
||||
#include <dirent.h> |
|
||||
#include <signal.h> |
|
||||
#include <errno.h> |
|
||||
+#ifndef __ANDROID__
|
|
||||
#include <glob.h> |
|
||||
+#endif
|
|
||||
|
|
||||
#include <set> |
|
||||
#include <algorithm> |
|
||||
@@ -93,7 +95,7 @@
|
|
||||
_exit(100); |
|
||||
} |
|
||||
|
|
||||
- if (chdir("/tmp/") != 0)
|
|
||||
+ if (chdir("@TERMUX_PREFIX@/tmp/") != 0)
|
|
||||
_exit(100); |
|
||||
|
|
||||
unsigned int Count = 1; |
|
||||
@@ -1883,7 +1885,11 @@
|
|
||||
FileFdErrno("read","Unable to read original size of gzipped file"); |
|
||||
return 0; |
|
||||
} |
|
||||
+#ifdef __ANDROID__
|
|
||||
+ size = letoh32(size);
|
|
||||
+#else
|
|
||||
size = le32toh(size); |
|
||||
+#endif
|
|
||||
|
|
||||
if (lseek(iFd, oldPos, SEEK_SET) < 0) |
|
||||
{ |
|
||||
@@ -1998,6 +2004,7 @@
|
|
||||
std::vector<std::string> Glob(std::string const &pattern, int flags) |
|
||||
{ |
|
||||
std::vector<std::string> result; |
|
||||
+#ifndef __ANDROID__
|
|
||||
glob_t globbuf; |
|
||||
int glob_res; |
|
||||
unsigned int i; |
|
||||
@@ -2017,6 +2024,7 @@
|
|
||||
result.push_back(string(globbuf.gl_pathv[i])); |
|
||||
|
|
||||
globfree(&globbuf); |
|
||||
+#endif
|
|
||||
return result; |
|
||||
} |
|
||||
/*}}}*/ |
|
||||
@@ -2025,15 +2033,10 @@
|
|
||||
{ |
|
||||
const char *tmpdir = getenv("TMPDIR"); |
|
||||
|
|
||||
-#ifdef P_tmpdir
|
|
||||
- if (!tmpdir)
|
|
||||
- tmpdir = P_tmpdir;
|
|
||||
-#endif
|
|
||||
-
|
|
||||
// check that tmpdir is set and exists |
|
||||
struct stat st; |
|
||||
if (!tmpdir || strlen(tmpdir) == 0 || stat(tmpdir, &st) != 0) |
|
||||
- tmpdir = "/tmp";
|
|
||||
+ tmpdir = "@TERMUX_PREFIX@/tmp";
|
|
||||
|
|
||||
return string(tmpdir); |
|
||||
} |
|
@ -1,12 +0,0 @@ |
|||||
diff -u -r ../upstream.git/apt-pkg/contrib/gpgv.cc ./apt-pkg/contrib/gpgv.cc
|
|
||||
--- ../upstream.git/apt-pkg/contrib/gpgv.cc 2014-04-25 13:39:00.000000000 +0200
|
|
||||
+++ ./apt-pkg/contrib/gpgv.cc 2014-06-06 00:18:13.209224724 +0200
|
|
||||
@@ -43,7 +84,7 @@
|
|
||||
int const &statusfd, int fd[2]) |
|
||||
{ |
|
||||
#define EINTERNAL 111 |
|
||||
- std::string const gpgvpath = _config->Find("Dir::Bin::gpg", "/usr/bin/gpgv");
|
|
||||
+ std::string const gpgvpath = _config->Find("Dir::Bin::gpg", "@TERMUX_PREFIX@/bin/gpgv");
|
|
||||
// FIXME: remove support for deprecated APT::GPGV setting |
|
||||
std::string const trustedFile = _config->Find("APT::GPGV::TrustedKeyring", _config->FindFile("Dir::Etc::Trusted")); |
|
||||
std::string const trustedPath = _config->FindDir("Dir::Etc::TrustedParts"); |
|
@ -1,11 +0,0 @@ |
|||||
diff -u -r ../apt-0.9.16.1/apt-pkg/install-progress.cc ./apt-pkg/install-progress.cc
|
|
||||
--- ../apt-0.9.16.1/apt-pkg/install-progress.cc 2014-03-15 17:23:45.000000000 +0100
|
|
||||
+++ ./apt-pkg/install-progress.cc 2014-03-25 01:16:03.436701913 +0100
|
|
||||
@@ -15,6 +15,7 @@
|
|
||||
#include <fcntl.h> |
|
||||
#include <algorithm> |
|
||||
#include <stdio.h> |
|
||||
+#include <termios.h>
|
|
||||
|
|
||||
#include <apti18n.h> |
|
||||
|
|
@ -0,0 +1,37 @@ |
|||||
|
diff -u -r ../apt-1.1.3/methods/makefile ./methods/makefile
|
||||
|
--- ../apt-1.1.3/methods/makefile 2015-11-30 03:08:24.000000000 -0500
|
||||
|
+++ ./methods/makefile 2015-12-03 16:45:46.819879625 -0500
|
||||
|
@@ -46,21 +46,21 @@
|
||||
|
|
||||
|
# The http method |
||||
|
PROGRAM=http |
||||
|
-SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS) -lresolv
|
||||
|
+SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
|
||||
|
LIB_MAKES = apt-pkg/makefile |
||||
|
SOURCE = http.cc http_main.cc rfc2553emu.cc connect.cc server.cc |
||||
|
include $(PROGRAM_H) |
||||
|
|
||||
|
# The https method |
||||
|
PROGRAM=https |
||||
|
-SLIBS = -lapt-pkg -lcurl $(INTLLIBS) -lresolv
|
||||
|
+SLIBS = -lapt-pkg -lcurl $(INTLLIBS)
|
||||
|
LIB_MAKES = apt-pkg/makefile |
||||
|
SOURCE = https.cc server.cc |
||||
|
include $(PROGRAM_H) |
||||
|
|
||||
|
# The ftp method |
||||
|
PROGRAM=ftp |
||||
|
-SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS) -lresolv
|
||||
|
+SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS)
|
||||
|
LIB_MAKES = apt-pkg/makefile |
||||
|
SOURCE = ftp.cc rfc2553emu.cc connect.cc |
||||
|
include $(PROGRAM_H) |
||||
|
@@ -81,7 +81,7 @@
|
||||
|
|
||||
|
# The mirror method |
||||
|
PROGRAM=mirror |
||||
|
-SLIBS = -lapt-pkg $(SOCKETLIBS) -lresolv
|
||||
|
+SLIBS = -lapt-pkg $(SOCKETLIBS)
|
||||
|
LIB_MAKES = apt-pkg/makefile |
||||
|
SOURCE = mirror.cc http.cc rfc2553emu.cc connect.cc server.cc |
||||
|
include $(PROGRAM_H) |
@ -1,12 +0,0 @@ |
|||||
diff -u -r ../upstream.git/buildlib/configure.mak ./buildlib/configure.mak
|
|
||||
--- ../upstream.git/buildlib/configure.mak 2013-12-07 14:12:14.000000000 +0100
|
|
||||
+++ ./buildlib/configure.mak 2014-03-11 15:33:01.000000000 +0100
|
|
||||
@@ -55,7 +55,7 @@
|
|
||||
aclocal -I buildlib |
|
||||
|
|
||||
$(BUILDDIR)/config.status: configure |
|
||||
- /usr/bin/test -e $(BUILDDIR) || mkdir $(BUILDDIR)
|
|
||||
+ test -e $(BUILDDIR) || mkdir $(BUILDDIR)
|
|
||||
(HERE=`pwd`; cd $(BUILDDIR) && $$HERE/configure) |
|
||||
|
|
||||
$(addprefix $(BUILDDIR)/,$(CONVERTED)): $(BUILDDIR)/config.status |
|
Loading…
Reference in new issue