这是indexloc提供的服务,不要输入任何密码
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions packages/apt-file/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,21 @@ TERMUX_PKG_DESCRIPTION="search for files within packages"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=3.3
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=http://deb.debian.org/debian/pool/main/a/apt-file/apt-file_${TERMUX_PKG_VERSION}.tar.xz
TERMUX_PKG_SHA256=2ab7109340054f0073c690d62d055c31bf69e1f50fb65b080bbf0d4ae572dae7
TERMUX_PKG_DEPENDS="apt, libapt-pkg-perl, libregexp-assemble-perl, perl"
TERMUX_PKG_REPLACES="whatprovides"
TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_PLATFORM_INDEPENDENT=true
TERMUX_PKG_EXTRA_MAKE_ARGS="DESTDIR=$TERMUX_PREFIX BINDIR=$TERMUX_PREFIX/bin \
MANDIR=$TERMUX_PREFIX/share/man/man1"
TERMUX_PKG_EXTRA_MAKE_ARGS="
DESTDIR=$TERMUX_PREFIX
BINDIR=$TERMUX_PREFIX/bin
MANDIR=$TERMUX_PREFIX/share/man/man1
"


termux_step_post_make_install() {
mkdir -p $TERMUX_PREFIX/etc/bash_completion.d/
cp $TERMUX_PKG_SRCDIR/debian/bash-completion \
$TERMUX_PREFIX/etc/bash_completion.d/apt-file
install -Dm644 "$TERMUX_PKG_SRCDIR/debian/bash-completion" \
"$TERMUX_PREFIX/etc/bash_completion.d/apt-file"
}
76 changes: 21 additions & 55 deletions packages/apt/0000-cmake-fix.patch
Original file line number Diff line number Diff line change
@@ -1,19 +1,8 @@
diff -uNr apt-2.1.13/apt-pkg/CMakeLists.txt apt-2.1.13.mod/apt-pkg/CMakeLists.txt
--- apt-2.1.13/apt-pkg/CMakeLists.txt 2020-12-10 16:40:27.000000000 +0200
+++ apt-2.1.13.mod/apt-pkg/CMakeLists.txt 2020-12-11 18:10:24.236801758 +0200
@@ -52,7 +52,7 @@
)

target_link_libraries(apt-pkg
- PRIVATE -lutil ${CMAKE_DL_LIBS} ${RESOLV_LIBRARIES}
+ PRIVATE ${CMAKE_DL_LIBS} ${RESOLV_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${ZLIB_LIBRARIES}
${BZIP2_LIBRARIES}
diff -uNr apt-2.2.0/CMakeLists.txt apt-2.2.0.mod/CMakeLists.txt
--- apt-2.2.0/CMakeLists.txt 2020-12-10 16:40:27.000000000 +0200
+++ apt-2.2.0.mod/CMakeLists.txt 2020-12-11 18:10:24.236801758 +0200
@@ -189,14 +189,6 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 19e61cd14..a4b9a8aa4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -193,14 +193,6 @@ if (NOT HAVE_SIGHANDLER_T)
endif()
endif()

Expand All @@ -28,56 +17,33 @@ diff -uNr apt-2.2.0/CMakeLists.txt apt-2.2.0.mod/CMakeLists.txt
# Configure some variables like package, version and architecture.
set(PACKAGE ${PROJECT_NAME})
set(PACKAGE_MAIL "APT Development Team <deity@lists.debian.org>")
@@ -209,10 +201,6 @@
message(STATUS "Found dpkg data dir: ${DPKG_DATADIR_CMD}")
set(DPKG_DATADIR "${DPKG_DATADIR_CMD}" CACHE PATH "dpkg data directory")
endif()
-if (NOT DEFINED COMMON_ARCH)
- execute_process(COMMAND dpkg-architecture -qDEB_HOST_ARCH
- OUTPUT_VARIABLE COMMON_ARCH OUTPUT_STRIP_TRAILING_WHITESPACE)
-endif()
if (NOT DEFINED ROOT_GROUP)
execute_process(COMMAND id -gn root
OUTPUT_VARIABLE ROOT_GROUP OUTPUT_STRIP_TRAILING_WHITESPACE)
@@ -243,7 +231,6 @@
@@ -255,7 +247,6 @@ add_subdirectory(doc)
add_subdirectory(dselect)
add_subdirectory(ftparchive)
add_subdirectory(methods)
-add_subdirectory(test)

if (USE_NLS)
add_subdirectory(po)
diff -uNr apt-2.1.13/methods/CMakeLists.txt apt-2.1.13.mod/methods/CMakeLists.txt
--- apt-2.1.13/methods/CMakeLists.txt 2020-12-10 16:40:27.000000000 +0200
+++ apt-2.1.13.mod/methods/CMakeLists.txt 2020-12-11 18:11:00.833144879 +0200
@@ -11,7 +11,6 @@
add_executable(cdrom cdrom.cc)
add_executable(http http.cc basehttp.cc $<TARGET_OBJECTS:connectlib>)
add_executable(mirror mirror.cc)
-add_executable(ftp ftp.cc $<TARGET_OBJECTS:connectlib>)
add_executable(rred rred.cc)
add_executable(rsh rsh.cc)

@@ -23,12 +22,11 @@

# Additional libraries to link against for networked stuff
target_link_libraries(http $<$<BOOL:${GNUTLS_FOUND}>:${GNUTLS_LIBRARIES}> $<$<BOOL:${SYSTEMD_FOUND}>:${SYSTEMD_LIBRARIES}>)
-target_link_libraries(ftp $<$<BOOL:${GNUTLS_FOUND}>:${GNUTLS_LIBRARIES}>)

target_link_libraries(rred apt-private)

# Install the library
-install(TARGETS file copy store gpgv cdrom http ftp rred rsh mirror
+install(TARGETS file copy store gpgv cdrom http rred rsh mirror
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/methods)
diff --git a/apt-pkg/CMakeLists.txt b/apt-pkg/CMakeLists.txt
index 7aaacd9d9..b577e4f12 100644
--- a/apt-pkg/CMakeLists.txt
+++ b/apt-pkg/CMakeLists.txt
@@ -61,7 +61,7 @@ target_include_directories(apt-pkg
)

add_links(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods mirror mirror+ftp mirror+http mirror+https mirror+file mirror+copy)
target_link_libraries(apt-pkg
- PRIVATE -lutil ${CMAKE_DL_LIBS} ${RESOLV_LIBRARIES}
+ PRIVATE ${CMAKE_DL_LIBS} ${RESOLV_LIBRARIES}
${CMAKE_THREAD_LIBS_INIT}
${ZLIB_LIBRARIES}
${BZIP2_LIBRARIES}
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt
index 3060949..3ce03b6 100644
index 2df0ce721..25441d936 100644
--- a/doc/CMakeLists.txt
+++ b/doc/CMakeLists.txt
@@ -1,15 +1,6 @@
include(Documentation)
@@ -3,15 +3,6 @@ include(Documentation)
endif()

set(LINGUAS
- de
Expand Down
56 changes: 30 additions & 26 deletions packages/apt/0003-no-srv-records.patch
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
diff -uNr apt-2.1.18/apt-pkg/contrib/srvrec.cc apt-2.1.18.mod/apt-pkg/contrib/srvrec.cc
--- apt-2.1.18/apt-pkg/contrib/srvrec.cc 2021-01-13 18:37:30.000000000 +0200
+++ apt-2.1.18.mod/apt-pkg/contrib/srvrec.cc 2021-02-03 21:38:17.382553856 +0200
diff --git a/apt-pkg/contrib/srvrec.cc b/apt-pkg/contrib/srvrec.cc
index 3ddb95abb..3275b6da2 100644
--- a/apt-pkg/contrib/srvrec.cc
+++ b/apt-pkg/contrib/srvrec.cc
@@ -6,6 +6,7 @@

##################################################################### */
Expand All @@ -9,14 +10,15 @@ diff -uNr apt-2.1.18/apt-pkg/contrib/srvrec.cc apt-2.1.18.mod/apt-pkg/contrib/sr
#include <config.h>

#include <netdb.h>
@@ -202,3 +203,4 @@
@@ -210,3 +211,4 @@ SrvRec PopFromSrvRecs(std::vector<SrvRec> &Recs)

return selected;
}
+#endif
diff -uNr apt-2.1.18/apt-pkg/contrib/srvrec.h apt-2.1.18.mod/apt-pkg/contrib/srvrec.h
--- apt-2.1.18/apt-pkg/contrib/srvrec.h 2021-01-13 18:37:30.000000000 +0200
+++ apt-2.1.18.mod/apt-pkg/contrib/srvrec.h 2021-02-03 21:38:17.386553898 +0200
diff --git a/apt-pkg/contrib/srvrec.h b/apt-pkg/contrib/srvrec.h
index 1e981d3d7..f49c91737 100644
--- a/apt-pkg/contrib/srvrec.h
+++ b/apt-pkg/contrib/srvrec.h
@@ -8,6 +8,7 @@
/*}}}*/
#ifndef SRVREC_H
Expand All @@ -25,44 +27,46 @@ diff -uNr apt-2.1.18/apt-pkg/contrib/srvrec.h apt-2.1.18.mod/apt-pkg/contrib/srv

#include <string>
#include <vector>
@@ -54,3 +55,4 @@
@@ -55,3 +56,4 @@ APT_PUBLIC bool GetSrvRecords(std::string host, int port, std::vector<SrvRec> &R
APT_PUBLIC SrvRec PopFromSrvRecs(std::vector<SrvRec> &Recs);

#endif
+#endif
diff -uNr apt-2.1.18/cmdline/apt-helper.cc apt-2.1.18.mod/cmdline/apt-helper.cc
--- apt-2.1.18/cmdline/apt-helper.cc 2021-01-13 18:37:30.000000000 +0200
+++ apt-2.1.18.mod/cmdline/apt-helper.cc 2021-02-03 21:38:17.386553898 +0200
@@ -106,6 +106,7 @@
diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc
index 4404259d8..518c98179 100644
--- a/cmdline/apt-helper.cc
+++ b/cmdline/apt-helper.cc
@@ -106,6 +106,7 @@ static bool DoDownloadFile(CommandLine &CmdL) /*{{{*/

return true;
}
+#ifndef __ANDROID__
/*}}}*/
static bool DoSrvLookup(CommandLine &CmdL) /*{{{*/
{
@@ -134,6 +135,7 @@
@@ -134,6 +135,7 @@ static bool DoSrvLookup(CommandLine &CmdL) /*{{{*/
return true;
}
/*}}}*/
+#endif
static const APT::Configuration::Compressor *FindCompressor(std::vector<APT::Configuration::Compressor> const &compressors, std::string const &name) /*{{{*/
{
APT::Configuration::Compressor const * compressor = NULL;
@@ -311,7 +313,9 @@
@@ -341,7 +343,9 @@ static std::vector<aptDispatchWithHelp> GetCommands() /*{{{*/
{
return {
{"download-file", &DoDownloadFile, _("download the given uri to the target-path")},
{"download-file", &DoDownloadFile, _("download the given uri to the target-path")},
+#ifndef __ANDROID__
{"srv-lookup", &DoSrvLookup, _("lookup a SRV record (e.g. _http._tcp.ftp.debian.org)")},
{"srv-lookup", &DoSrvLookup, _("lookup a SRV record (e.g. _http._tcp.ftp.debian.org)")},
+#endif
{"cat-file", &DoCatFile, _("concatenate files, with automatic decompression")},
{"auto-detect-proxy", &DoAutoDetectProxy, _("detect proxy using apt.conf")},
{"wait-online", &DoWaitOnline, _("wait for system to be online")},
diff -uNr apt-2.1.18/methods/connect.cc apt-2.1.18.mod/methods/connect.cc
--- apt-2.1.18/methods/connect.cc 2021-01-13 18:37:30.000000000 +0200
+++ apt-2.1.18.mod/methods/connect.cc 2021-02-03 21:41:48.220687372 +0200
@@ -49,7 +49,9 @@
{"cat-file", &DoCatFile, _("concatenate files, with automatic decompression")},
{"hash-file", &DoHashFile, _("hash file")},
{"auto-detect-proxy", &DoAutoDetectProxy, _("detect proxy using apt.conf")},
diff --git a/methods/connect.cc b/methods/connect.cc
index 96c169e79..27d7c727b 100644
--- a/methods/connect.cc
+++ b/methods/connect.cc
@@ -52,7 +52,9 @@ static std::string LastService;
static struct addrinfo *LastHostAddr = 0;
static struct addrinfo *LastUsed = 0;

Expand All @@ -72,7 +76,7 @@ diff -uNr apt-2.1.18/methods/connect.cc apt-2.1.18.mod/methods/connect.cc

// Set of IP/hostnames that we timed out before or couldn't resolve
static std::set<std::string> bad_addr;
@@ -486,6 +488,10 @@
@@ -489,6 +491,10 @@ ResultState Connect(std::string Host, int Port, const char *Service,
// Used by getaddrinfo(); prefer port if given, else fallback to service
std::string ServiceNameOrPort = Port != 0 ? std::to_string(Port) : Service;

Expand All @@ -83,15 +87,15 @@ diff -uNr apt-2.1.18/methods/connect.cc apt-2.1.18.mod/methods/connect.cc
if(LastHost != Host || LastService != ServiceNameOrPort)
{
SrvRecords.clear();
@@ -503,7 +509,6 @@
@@ -506,7 +512,6 @@ ResultState Connect(std::string Host, int Port, const char *Service,
}
}

- size_t stackSize = 0;
// try to connect in the priority order of the srv records
std::string initialHost{std::move(Host)};
auto const initialPort = Port;
@@ -525,6 +530,7 @@
@@ -528,6 +533,7 @@ ResultState Connect(std::string Host, int Port, const char *Service,
}
Host = std::move(initialHost);
Port = initialPort;
Expand Down
Loading