Index: head/devel/android-tools-adb/Makefile =================================================================== --- head/devel/android-tools-adb/Makefile (revision 516022) +++ head/devel/android-tools-adb/Makefile (revision 516023) @@ -1,82 +1,88 @@ # $FreeBSD$ PORTNAME= android-tools-adb DISTVERSIONPREFIX= platform-tools- -DISTVERSION?= 29.0.4 +DISTVERSION?= 29.0.5 PORTREVISION?= 0 CATEGORIES= devel comms MAINTAINER= jbeich@FreeBSD.org COMMENT= Android debug bridge command line tool LICENSE= APACHE20 USE_GITHUB= yes GH_TUPLE= aosp-mirror:platform_system_core:${DISTVERSIONFULL} CONFLICTS_INSTALL?= ${PORTNAME}-devel-* USES= compiler:c++17-lang pkgconfig ssl uidfix BUILD_WRKSRC= ${WRKSRC}/adb INSTALL_WRKSRC= ${BUILD_WRKSRC} TEST_WRKSRC= ${BUILD_WRKSRC} MAKEFILE?= ${.CURDIR}/files/Makefile MAKE_ENV= BINDIR="${PREFIX}/bin" FILESDIR="${DOCSDIR}" \ VERSION="${DISTVERSION}${DISTVERSIONSUFFIX}" ALL_TARGET= all TEST_TARGET= test PLIST_FILES= bin/adb PORTDOCS= * + +# XXX Remove after FreeBSD 11.2/12.0 reach EOL i.e., around 2020-02-01 +# XXX Switch to bundled libc++ to avoid error-prone reverts +.if !exists(/usr/include/c++/v1/charconv) && exists(/usr/lib/libc++.so) +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-revert-d3d650628c8c +.endif OPTIONS_DEFINE+=MDNSRESPONDER BASH DOCS TEST TEST_PYTHON OPTIONS_DEFAULT=MDNSRESPONDER OPTIONS_SUB= yes .if make(makesum) # for optional distfiles .MAKEFLAGS: WITH="${OPTIONS_DEFINE}" .endif BASH_GH_TUPLE= mbrubeck:android-completion:c1b0656:bashcomp BASH_PLIST_FILES= etc/bash_completion.d/adb BASH_VARS= LICENSE+=MIT LICENSE_COMB=multi DOCS_MAKE_ARGS_OFF= FILES="" FILESDIR="" MDNSRESPONDER_LIB_DEPENDS= libdns_sd.so:net/mDNSResponder MDNSRESPONDER_USES= localbase:ldflags MDNSRESPONDER_LDFLAGS= -ldns_sd MDNSRESPONDER_MAKE_ENV_OFF= MDNSEXT=_unsupported TEST_BUILD_DEPENDS+= googlemock>=1.6.0:devel/googlemock \ googletest>=1.6.0:devel/googletest TEST_ALL_TARGET= adb_test TEST_PYTHON_DESC= ${TEST_DESC:S/tests/python &/} TEST_PYTHON_GH_TUPLE= aosp-mirror:platform_development:${DISTVERSIONFULL}:development TEST_PYTHON_BUILD_DEPENDS=${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock@${PY_FLAVOR} TEST_PYTHON_USES= python:2.7,build post-patch: # XXX Hidden by poudriere/tinderbox, see lindev(4) for FreeBSD < 11.0 @if [ ! -e /dev/full ]; then \ ${REINPLACE_CMD} -e '/TEST/s/[^ ]*ENOSPC/DISABLED_&/' \ ${WRKSRC}/adb/adb_io_test.cpp; \ fi # XXX getcwd fails and not connected upstream @${REINPLACE_CMD} -e '/TEST/s/, /&DISABLED_/' \ ${WRKSRC}/adb/bugreport_test.cpp pre-install-TEST-on: do-test pre-install-TEST_PYTHON-on: # XXX python tests may leave behind running adb server ${SETENV} PATH=${BUILD_WRKSRC}:${PATH} \ PYTHONPATH=${WRKSRC_development}/python-packages \ ${PYTHON_CMD} -m unittest discover -vs ${BUILD_WRKSRC} post-install-BASH-on: ${MKDIR} ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES:H} ${INSTALL_DATA} ${WRKSRC_bashcomp}/android \ ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES} .include Index: head/devel/android-tools-adb/distinfo =================================================================== --- head/devel/android-tools-adb/distinfo (revision 516022) +++ head/devel/android-tools-adb/distinfo (revision 516023) @@ -1,7 +1,7 @@ -TIMESTAMP = 1568309901 -SHA256 (aosp-mirror-platform_system_core-platform-tools-29.0.4_GH0.tar.gz) = 95e20a50253d82b2d5f96b1acd2672c3fbdb57908e44757ba76a25d5d56a4f64 -SIZE (aosp-mirror-platform_system_core-platform-tools-29.0.4_GH0.tar.gz) = 61253830 +TIMESTAMP = 1571358141 +SHA256 (aosp-mirror-platform_system_core-platform-tools-29.0.5_GH0.tar.gz) = a89ed6195862578acc01092e8ca390cd7578725bca9eed77b6b730f334b4c255 +SIZE (aosp-mirror-platform_system_core-platform-tools-29.0.5_GH0.tar.gz) = 68752941 SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c SIZE (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = 5967 -SHA256 (aosp-mirror-platform_development-platform-tools-29.0.4_GH0.tar.gz) = f2dc2264e17be1ce5bd3311d9c4720fa20fa614ece6449b5235d33cdf0fc51e1 -SIZE (aosp-mirror-platform_development-platform-tools-29.0.4_GH0.tar.gz) = 56857949 +SHA256 (aosp-mirror-platform_development-platform-tools-29.0.5_GH0.tar.gz) = 6975dbe199d76f375a4da5b945be1e389611906420f40b3c5c961a33929d2443 +SIZE (aosp-mirror-platform_development-platform-tools-29.0.5_GH0.tar.gz) = 63881721 Index: head/devel/android-tools-adb/files/Makefile =================================================================== --- head/devel/android-tools-adb/files/Makefile (revision 516022) +++ head/devel/android-tools-adb/files/Makefile (revision 516023) @@ -1,142 +1,144 @@ # $FreeBSD$ PROG_CXX=adb NOMAN= # DragonFly, NetBSD, OpenBSD NO_MAN= # FreeBSD BINDIR?=/usr/bin FILESDIR?=${DOCDIR}/${PROG} FILES= OVERVIEW.TXT SERVICES.TXT SYNC.TXT protocol.txt SRCS+= adb.cpp SRCS+= adb_io.cpp SRCS+= adb_listeners.cpp SRCS+= adb_trace.cpp SRCS+= adb_utils.cpp SRCS+= services.cpp SRCS+= shell_service_protocol.cpp SRCS+= socket_spec.cpp SRCS+= ../adb/sockets.cpp SRCS+= sysdeps_unix.cpp SRCS+= transport.cpp SRCS+= transport_local.cpp SRCS+= transport_usb.cpp TEST_SRCS+= adb_io_test.cpp TEST_SRCS+= adb_listeners_test.cpp TEST_SRCS+= adb_utils_test.cpp TEST_SRCS+= bugreport_test.cpp TEST_SRCS+= shell_service_protocol_test.cpp TEST_SRCS+= socket_spec_test.cpp TEST_SRCS+= socket_test.cpp TEST_SRCS+= sysdeps_test.cpp TEST_SRCS+= transport_test.cpp TEST_SRCS+= types_test.cpp .PATH: ${.CURDIR}/client SRCS+= adb_client.cpp SRCS+= adb_install.cpp SRCS+= auth.cpp SRCS+= bugreport.cpp SRCS+= commandline.cpp SRCS+= console.cpp SRCS+= file_sync_client.cpp SRCS+= line_printer.cpp SRCS+= main.cpp SRCS+= transport_mdns${MDNSEXT}.cpp SRCS+= usb_libusb.cpp .PATH: ${.CURDIR}/fdevent SRCS+= fdevent.cpp SRCS+= fdevent_poll.cpp TEST_SRCS+= fdevent_test.cpp .PATH: ${.CURDIR}/sysdeps SRCS+= errno.cpp TEST_SRCS+= stat_test.cpp .PATH: ${.CURDIR}/sysdeps/posix SRCS+= network.cpp .PATH: ${.CURDIR}/../base SRCS+= chrono_utils.cpp SRCS+= file.cpp SRCS+= logging.cpp SRCS+= parsenetaddress.cpp SRCS+= stringprintf.cpp SRCS+= strings.cpp TEST_SRCS+= file_test.cpp TEST_SRCS+= logging_test.cpp TEST_SRCS+= parsenetaddress_test.cpp TEST_SRCS+= stringprintf_test.cpp TEST_SRCS+= strings_test.cpp TEST_SRCS+= test_main.cpp TEST_SRCS+= test_utils.cpp .PATH: ${.CURDIR}/../diagnose_usb SRCS+= diagnose_usb.cpp .PATH: ${.CURDIR}/../libcrypto_utils SRCS+= android_pubkey.c .PATH: ${.CURDIR}/../libcrypto_utils/tests TEST_SRCS+= android_pubkey_test.cpp .PATH: ${.CURDIR}/../libcutils SRCS+= socket_inaddr_any_server_unix.cpp SRCS+= socket_local_client_unix.cpp SRCS+= socket_local_server_unix.cpp SRCS+= socket_network_client_unix.cpp SRCS+= ../libcutils/sockets.cpp SRCS+= threads.cpp # DragonFly, NetBSD, OpenBSD CPPFLAGS.sockets.cpp+= -o ${.TARGET} CPPFLAGS+= -DPLATFORM_TOOLS_VERSION="\"${VERSION:U0.0.0}\"" CPPFLAGS+= -DADB_HOST=1 CPPFLAGS+= -Doff64_t=off_t CPPFLAGS+= -Dlseek64=lseek +CPPFLAGS+= -Dpread64=pread +CPPFLAGS+= -Dpwrite64=pwrite CPPFLAGS+= -I${.CURDIR} CPPFLAGS+= -I${.CURDIR}/client CPPFLAGS+= -I${.CURDIR}/../include CPPFLAGS+= -I${.CURDIR}/../base/include CPPFLAGS+= -I${.CURDIR}/../diagnose_usb/include CPPFLAGS+= -I${.CURDIR}/../libcrypto_utils/include CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} CPPFLAGS+= $$(${PKG_CONFIG} libcrypto --cflags 2>/dev/null) CPPFLAGS+= $$(${PKG_CONFIG} libusb-1.0 --cflags 2>/dev/null) CXXFLAGS+= -std=gnu++2a .ifndef COMPILE.c CFLAGS+= ${CPPFLAGS} CXXFLAGS+= ${CPPFLAGS} .endif TEST_CPPFLAGS+= $$(${PKG_CONFIG} gtest --cflags) TEST_CPPFLAGS+= $$(${PKG_CONFIG} gmock --cflags) .for f in ${TEST_SRCS} CPPFLAGS.${f}+= ${TEST_CPPFLAGS} .endfor LDADD+= $$(${PKG_CONFIG} libcrypto --libs 2>/dev/null || echo -lcrypto) LDADD+= $$(${PKG_CONFIG} libusb-1.0 --libs 2>/dev/null || echo -lusb) LDADD+= \-lpthread DPADD+= ${LIBCRYPTO} ${LIBPTHREAD} ${LIBUSB} TEST_LDADD+= $$(${PKG_CONFIG} gtest --libs) TEST_LDADD+= $$(${PKG_CONFIG} gmock --libs) TEST_OBJS+= ${TEST_SRCS:R:S/$/.o/} CLEANFILES+= ${PROG}_test ${TEST_OBJS} PKG_CONFIG?= pkg-config beforeinstall: ${INSTALL} -d ${DESTDIR}${FILESDIR} .include test: ${PROG}_test @for f in ${.ALLSRC}; do ./$$f; done ${PROG}_test: ${OBJS:Nmain.o:Nadb_install.o:Ncommandline.o} ${TEST_OBJS} ${CXX} ${CPPFLAGS} ${CXXFLAGS} ${LDFLAGS} -o $@ $> ${LDADD} ${TEST_LDADD} Index: head/devel/android-tools-adb/files/extra-patch-revert-d3d650628c8c =================================================================== --- head/devel/android-tools-adb/files/extra-patch-revert-d3d650628c8c (nonexistent) +++ head/devel/android-tools-adb/files/extra-patch-revert-d3d650628c8c (revision 516023) @@ -0,0 +1,56 @@ +In file included from adb_utils.cpp:19: +adb/adb_utils.h:19:10: fatal error: 'charconv' file not found +#include + ^~~~~~~~~~ + +--- adb/adb_utils.h.orig 2019-10-18 00:22:21 UTC ++++ adb/adb_utils.h +@@ -16,7 +16,6 @@ + + #pragma once + +-#include + #include + #include + #include +@@ -113,17 +112,33 @@ inline std::string_view StripTrailingNulls(std::string + // Base-10 stroll on a string_view. + template + inline bool ParseUint(T* result, std::string_view str, std::string_view* remaining = nullptr) { +- T value; +- const auto res = std::from_chars(str.begin(), str.end(), value); +- if (res.ec != std::errc{}) { ++ if (str.empty() || !isdigit(str[0])) { + return false; + } +- if (res.ptr != str.end() && !remaining) { +- return false; ++ ++ T value = 0; ++ std::string_view::iterator it; ++ constexpr T max = std::numeric_limits::max(); ++ for (it = str.begin(); it != str.end() && isdigit(*it); ++it) { ++ if (value > max / 10) { ++ return false; ++ } ++ ++ value *= 10; ++ ++ T digit = *it - '0'; ++ if (value > max - digit) { ++ return false; ++ } ++ ++ value += digit; + } ++ *result = value; + if (remaining) { +- *remaining = std::string_view(res.ptr, str.end() - res.ptr); ++ *remaining = str.substr(it - str.begin()); ++ } else { ++ return it == str.end(); + } +- *result = value; ++ + return true; + } Property changes on: head/devel/android-tools-adb/files/extra-patch-revert-d3d650628c8c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-adb/files/patch-adb_client_adb__install.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_client_adb__install.cpp (revision 516022) +++ head/devel/android-tools-adb/files/patch-adb_client_adb__install.cpp (revision 516023) @@ -1,11 +1,105 @@ ---- adb/client/adb_install.cpp.orig 2019-08-13 02:10:58 UTC +--- adb/client/adb_install.cpp.orig 2019-10-18 00:22:21 UTC +++ adb/client/adb_install.cpp -@@ -214,7 +214,7 @@ static int install_app_streamed(int argc, const char** - return 1; +@@ -35,9 +35,11 @@ + #include "adb_utils.h" + #include "client/file_sync_client.h" + #include "commandline.h" ++#if defined(ENABLE_FASTDEPLOY) + #include "fastdeploy.h" + + static constexpr int kFastDeployMinApi = 24; ++#endif + + namespace { + +@@ -167,6 +169,7 @@ static int install_app_streamed(int argc, const char** + } + + if (use_fastdeploy) { ++#if defined(ENABLE_FASTDEPLOY) + auto metadata = extract_metadata(file); + if (metadata.has_value()) { + // pass all but 1st (command) and last (apk path) parameters through to pm for +@@ -175,6 +178,9 @@ static int install_app_streamed(int argc, const char** + auto patchFd = install_patch(pm_args.size(), pm_args.data()); + return stream_patch(file, std::move(metadata.value()), std::move(patchFd)); } ++#else ++ error_exit("fastdeploy is disabled"); ++#endif + } + struct stat sb; +@@ -189,7 +195,7 @@ static int install_app_streamed(int argc, const char** + return 1; + } + -#ifdef __linux__ +#if !defined(__APPLE__) && !defined(_WIN32) - posix_fadvise(local_fd.get(), 0, 0, POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE); + posix_fadvise(local_fd.get(), 0, 0, POSIX_FADV_SEQUENTIAL | POSIX_FADV_NOREUSE); #endif +@@ -263,6 +269,7 @@ static int install_app_legacy(int argc, const char** a + argv[last_apk] = apk_dest.c_str(); /* destination name, not source location */ + + if (use_fastdeploy) { ++#if defined(ENABLE_FASTDEPLOY) + auto metadata = extract_metadata(apk_file[0]); + if (metadata.has_value()) { + auto patchFd = apply_patch_on_device(apk_dest.c_str()); +@@ -273,6 +280,9 @@ static int install_app_legacy(int argc, const char** a + + return status; + } ++#else ++ error_exit("fastdeploy is disabled"); ++#endif + } + + if (do_sync_push(apk_file, apk_dest.c_str(), false)) { +@@ -288,7 +298,9 @@ int install_app(int argc, const char** argv) { + InstallMode installMode = INSTALL_DEFAULT; + bool use_fastdeploy = false; + bool is_reinstall = false; ++#if defined(ENABLE_FASTDEPLOY) + FastDeploy_AgentUpdateStrategy agent_update_strategy = FastDeploy_AgentUpdateDifferentVersion; ++#endif + + for (int i = 1; i < argc; i++) { + if (!strcmp(argv[i], "--streaming")) { +@@ -309,13 +321,19 @@ int install_app(int argc, const char** argv) { + use_fastdeploy = false; + } else if (!strcmp(argv[i], "--force-agent")) { + processedArgIndicies.push_back(i); ++#if defined(ENABLE_FASTDEPLOY) + agent_update_strategy = FastDeploy_AgentUpdateAlways; ++#endif + } else if (!strcmp(argv[i], "--date-check-agent")) { + processedArgIndicies.push_back(i); ++#if defined(ENABLE_FASTDEPLOY) + agent_update_strategy = FastDeploy_AgentUpdateNewerTimeStamp; ++#endif + } else if (!strcmp(argv[i], "--version-check-agent")) { + processedArgIndicies.push_back(i); ++#if defined(ENABLE_FASTDEPLOY) + agent_update_strategy = FastDeploy_AgentUpdateDifferentVersion; ++#endif + } + } + +@@ -327,6 +345,7 @@ int install_app(int argc, const char** argv) { + error_exit("Attempting to use streaming install on unsupported device"); + } + ++#if defined(ENABLE_FASTDEPLOY) + if (use_fastdeploy && get_device_api_level() < kFastDeployMinApi) { + printf("Fast Deploy is only compatible with devices of API version %d or higher, " + "ignoring.\n", +@@ -334,6 +353,7 @@ int install_app(int argc, const char** argv) { + use_fastdeploy = false; + } + fastdeploy_set_agent_update_strategy(agent_update_strategy); ++#endif + + std::vector passthrough_argv; + for (int i = 0; i < argc; i++) { Index: head/devel/android-tools-adb/files/patch-adb_client_auth.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_client_auth.cpp (revision 516022) +++ head/devel/android-tools-adb/files/patch-adb_client_auth.cpp (revision 516023) @@ -1,43 +1,44 @@ ---- adb/client/auth.cpp.orig 2019-07-17 19:54:09 UTC +--- adb/client/auth.cpp.orig 2019-10-18 00:22:21 UTC +++ adb/client/auth.cpp -@@ -34,7 +34,9 @@ +@@ -34,7 +34,10 @@ #include #include #include +#if defined(OPENSSL_IS_BORINGSSL) #include +#endif ++#include #include #include #include -@@ -52,6 +54,30 @@ static std::mutex& g_keys_mutex = *new std::mutex; +@@ -52,6 +55,30 @@ static std::mutex& g_keys_mutex = *new std::mutex; static std::map>& g_keys = *new std::map>; static std::map& g_monitored_paths = *new std::map; + +#if !defined(OPENSSL_IS_BORINGSSL) +// https://boringssl.googlesource.com/boringssl/+/6601402%5E!/ +static int EVP_EncodedLength(size_t *out_len, size_t len) { + if (len + 2 < len) { + return 0; + } + len += 2; + len /= 3; + + if (((len << 2) >> 2) != len) { + return 0; + } + len <<= 2; + + if (len + 1 < len) { + return 0; + } + len++; + + *out_len = len; + return 1; +} +#endif static std::string get_user_info() { std::string hostname; Index: head/devel/android-tools-adb/files/patch-adb_client_commandline.cpp =================================================================== --- head/devel/android-tools-adb/files/patch-adb_client_commandline.cpp (revision 516022) +++ head/devel/android-tools-adb/files/patch-adb_client_commandline.cpp (revision 516023) @@ -1,28 +1,38 @@ ---- adb/client/commandline.cpp.orig 2019-07-17 19:54:09 UTC +--- adb/client/commandline.cpp.orig 2019-10-18 00:22:21 UTC +++ adb/client/commandline.cpp -@@ -1016,7 +1016,11 @@ static int ppp(int argc, const char** argv) { +@@ -59,7 +59,9 @@ + #include "bugreport.h" + #include "client/file_sync_client.h" + #include "commandline.h" ++#if defined(ENABLE_FASTDEPLOY) + #include "fastdeploy.h" ++#endif + #include "services.h" + #include "shell_protocol.h" + #include "sysdeps/chrono.h" +@@ -1012,7 +1014,11 @@ static int ppp(int argc, const char** argv) { // copy args const char** ppp_args = (const char**)alloca(sizeof(char*) * argc + 1); +#if defined(__DragonFly__) || defined(__FreeBSD__) + ppp_args[0] = "ppp"; +#else ppp_args[0] = "pppd"; +#endif for (i = 2 ; i < argc ; i++) { //argv[2] and beyond become ppp_args[1] and beyond ppp_args[i - 1] = argv[i]; -@@ -1028,8 +1032,13 @@ static int ppp(int argc, const char** argv) { +@@ -1024,8 +1030,13 @@ static int ppp(int argc, const char** argv) { adb_close(STDERR_FILENO); adb_close(fd); +#if defined(__DragonFly__) || defined(__FreeBSD__) + execvp("ppp", (char* const*)ppp_args); + perror_exit("exec ppp failed"); +#else execvp("pppd", (char* const*)ppp_args); perror_exit("exec pppd failed"); +#endif } // parent side Index: head/devel/android-tools-fastboot/Makefile =================================================================== --- head/devel/android-tools-fastboot/Makefile (revision 516022) +++ head/devel/android-tools-fastboot/Makefile (revision 516023) @@ -1,60 +1,61 @@ # $FreeBSD$ PORTNAME= android-tools-fastboot DISTVERSIONPREFIX= platform-tools- -DISTVERSION?= 29.0.4 +DISTVERSION?= 29.0.5 PORTREVISION?= 0 CATEGORIES= devel sysutils MASTER_SITES= https://salsa.debian.org/android-tools-team/android-tools/raw/706e754/debian/:manpage DISTFILES= fastboot.1:manpage EXTRACT_ONLY= ${DISTFILES:N*\:manpage:C/:.*//} MAINTAINER= jbeich@FreeBSD.org COMMENT= Android Fastboot protocol CLI tool LICENSE= APACHE20 BSD2CLAUSE LICENSE_COMB= multi USE_GITHUB= yes GH_TUPLE= aosp-mirror:platform_system_core:${DISTVERSIONFULL} \ + jbeich:platform_external_avb:${DISTVERSIONFULL}:avb/avb \ jbeich:platform_system_extras:${DISTVERSIONFULL}:extras/extras \ jbeich:platform_system_tools_mkbootimg:${DISTVERSIONFULL}:mkbootimg/mkbootimg CONFLICTS_INSTALL?= ${PORTNAME}-devel-* USES= compiler:c++17-lang pkgconfig ssl uidfix BUILD_WRKSRC= ${WRKSRC}/fastboot INSTALL_WRKSRC= ${BUILD_WRKSRC} MAKEFILE?= ${.CURDIR}/files/Makefile MAKE_ENV= BINDIR="${PREFIX}/bin" EXTRADIR="${FILESDIR}" \ FILESDIR="${DOCSDIR}" \ VERSION="${DISTVERSION}${DISTVERSIONSUFFIX}" \ MANDIR="${PREFIX}/man/man" PLIST_FILES= bin/fastboot \ man/man1/fastboot.1.gz PORTDOCS= * SUB_FILES= pkg-message OPTIONS_DEFINE= BASH DOCS OPTIONS_SUB= yes .if make(makesum) # for optional distfiles .MAKEFLAGS: WITH="${OPTIONS_DEFINE}" .endif BASH_GH_TUPLE= mbrubeck:android-completion:c1b0656:bashcomp BASH_PLIST_FILES= etc/bash_completion.d/fastboot BASH_VARS= LICENSE+=MIT DOCS_MAKE_ARGS_OFF= FILES="" FILESDIR="" post-extract: @${CP} ${_DISTDIR}/${DISTFILES:M*\:manpage:C/:.*//} \ ${BUILD_WRKSRC} post-install-BASH-on: ${MKDIR} ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES:H} ${INSTALL_DATA} ${WRKSRC_bashcomp}/android \ ${STAGEDIR}${PREFIX}/${BASH_PLIST_FILES} .include Index: head/devel/android-tools-fastboot/distinfo =================================================================== --- head/devel/android-tools-fastboot/distinfo (revision 516022) +++ head/devel/android-tools-fastboot/distinfo (revision 516023) @@ -1,11 +1,13 @@ -TIMESTAMP = 1568309901 +TIMESTAMP = 1571358141 SHA256 (fastboot.1) = 2af01b064440952a82f1602691a0fecc030302722a71444946fb70d9c423d283 SIZE (fastboot.1) = 5906 -SHA256 (aosp-mirror-platform_system_core-platform-tools-29.0.4_GH0.tar.gz) = 95e20a50253d82b2d5f96b1acd2672c3fbdb57908e44757ba76a25d5d56a4f64 -SIZE (aosp-mirror-platform_system_core-platform-tools-29.0.4_GH0.tar.gz) = 61253830 -SHA256 (jbeich-platform_system_extras-platform-tools-29.0.4_GH0.tar.gz) = b273a90d91132732b1fa77df273ee219cdafa0f71b000350d406d720a1b59fda -SIZE (jbeich-platform_system_extras-platform-tools-29.0.4_GH0.tar.gz) = 210790487 -SHA256 (jbeich-platform_system_tools_mkbootimg-platform-tools-29.0.4_GH0.tar.gz) = 743b5cbcacbc635238f7113c8ddcab212729e7abbbf50816b389b7a4a6442970 -SIZE (jbeich-platform_system_tools_mkbootimg-platform-tools-29.0.4_GH0.tar.gz) = 6619 +SHA256 (aosp-mirror-platform_system_core-platform-tools-29.0.5_GH0.tar.gz) = a89ed6195862578acc01092e8ca390cd7578725bca9eed77b6b730f334b4c255 +SIZE (aosp-mirror-platform_system_core-platform-tools-29.0.5_GH0.tar.gz) = 68752941 +SHA256 (jbeich-platform_external_avb-platform-tools-29.0.5_GH0.tar.gz) = 276c9b656f99dbf80a0fd8e06bdbdcf5d24916902e3b215b18b24cad858be5bc +SIZE (jbeich-platform_external_avb-platform-tools-29.0.5_GH0.tar.gz) = 797490 +SHA256 (jbeich-platform_system_extras-platform-tools-29.0.5_GH0.tar.gz) = 5183a633aec89474cbe0c53875983e7719436e106a4a7aa1e9097a93bb8a3883 +SIZE (jbeich-platform_system_extras-platform-tools-29.0.5_GH0.tar.gz) = 276210581 +SHA256 (jbeich-platform_system_tools_mkbootimg-platform-tools-29.0.5_GH0.tar.gz) = 772b13294ffcab508ad27461e1bdcb1ce3d95bacf10ed2191f62b2493e1b6aed +SIZE (jbeich-platform_system_tools_mkbootimg-platform-tools-29.0.5_GH0.tar.gz) = 12180 SHA256 (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = ca3311ba47a5edd56c929ac9aae57c02c2c3f1636519c5f67abb00b6e3ecd75c SIZE (mbrubeck-android-completion-c1b0656_GH0.tar.gz) = 5967 Index: head/devel/android-tools-fastboot/files/patch-liblog_stderr__write.cpp =================================================================== --- head/devel/android-tools-fastboot/files/patch-liblog_stderr__write.cpp (revision 516022) +++ head/devel/android-tools-fastboot/files/patch-liblog_stderr__write.cpp (nonexistent) @@ -1,12 +0,0 @@ ---- liblog/stderr_write.cpp.orig 2019-08-13 02:10:58 UTC -+++ liblog/stderr_write.cpp -@@ -55,8 +55,8 @@ struct stderrContext { - - struct android_log_transport_write stderrLoggerWrite = { - .node = {&stderrLoggerWrite.node, &stderrLoggerWrite.node}, -- .context.priv = NULL, - .name = "stderr", -+ .context = { .priv = NULL }, // GCC - .available = stderrAvailable, - .open = stderrOpen, - .close = stderrClose, Property changes on: head/devel/android-tools-fastboot/files/patch-liblog_stderr__write.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/android-tools-fastboot/files/Makefile =================================================================== --- head/devel/android-tools-fastboot/files/Makefile (revision 516022) +++ head/devel/android-tools-fastboot/files/Makefile (revision 516023) @@ -1,122 +1,120 @@ # $FreeBSD$ PROG_CXX=fastboot BINDIR?=/usr/bin FILESDIR?=${DOCDIR}/${PROG} FILES= README.md SRCS+= bootimg_utils.cpp SRCS+= fastboot.cpp SRCS+= fastboot_driver.cpp SRCS+= ../fastboot/fs.cpp SRCS+= main.cpp SRCS+= socket.cpp SRCS+= tcp.cpp SRCS+= udp.cpp SRCS+= util.cpp .PATH: ${EXTRADIR} SRCS+= usb_libusb.cpp # required by fastboot, diagnose_usb and libziparchive .PATH: ${.CURDIR}/../base SRCS+= errors_unix.cpp SRCS+= file.cpp SRCS+= logging.cpp SRCS+= mapped_file.cpp SRCS+= parsenetaddress.cpp SRCS+= stringprintf.cpp SRCS+= strings.cpp SRCS+= threads.cpp # required by fastboot .PATH: ${.CURDIR}/../diagnose_usb SRCS+= diagnose_usb.cpp # required by fs_mgr/liblp .PATH: ${.CURDIR}/../extras/ext4_utils SRCS+= ext4_sb.cpp SRCS+= ext4_utils.cpp # required by fastboot .PATH: ${.CURDIR}/../fs_mgr/liblp SRCS+= images.cpp SRCS+= partition_opener.cpp SRCS+= reader.cpp SRCS+= utility.cpp SRCS+= writer.cpp # required by fastboot .PATH: ${.CURDIR}/../libcutils SRCS+= android_get_control_file.cpp SRCS+= ../libcutils/sockets.cpp SRCS+= socket_inaddr_any_server_unix.cpp SRCS+= socket_network_client_unix.cpp SRCS+= sockets_unix.cpp # DragonFly, NetBSD, OpenBSD CPPFLAGS.sockets.cpp+= -o ${.TARGET} # required by base and libutils .PATH: ${.CURDIR}/../liblog -SRCS+= config_read.cpp -SRCS+= config_write.cpp SRCS+= fake_log_device.cpp SRCS+= fake_writer.cpp SRCS+= logger_lock.cpp SRCS+= logger_name.cpp SRCS+= logger_write.cpp SRCS+= logprint.cpp -SRCS+= stderr_write.cpp # required by fastboot .PATH: ${.CURDIR}/../libsparse SRCS+= backed_block.cpp SRCS+= output_file.cpp SRCS+= sparse.cpp SRCS+= sparse_crc32.cpp SRCS+= sparse_err.cpp SRCS+= sparse_read.cpp # required by fastboot .PATH: ${.CURDIR}/../libziparchive SRCS+= zip_archive.cc CPPFLAGS+= -DPLATFORM_TOOLS_VERSION="\"${VERSION:U0.0.0}\"" CPPFLAGS+= -Doff64_t=off_t CPPFLAGS+= -Dftruncate64=ftruncate CPPFLAGS+= -Dlseek64=lseek CPPFLAGS+= -Dmmap64=mmap CPPFLAGS+= -Dpread64=pread CPPFLAGS+= -DFAKE_LOG_DEVICE=1 CPPFLAGS+= -I${.CURDIR} CPPFLAGS+= -I${.CURDIR}/../include -CPPFLAGS+= -I${.CURDIR}/../mkbootimg/include/bootimg +CPPFLAGS+= -I${.CURDIR}/../avb CPPFLAGS+= -I${.CURDIR}/../base/include CPPFLAGS+= -I${.CURDIR}/../diagnose_usb/include CPPFLAGS+= -I${.CURDIR}/../extras/ext4_utils/include CPPFLAGS+= -I${.CURDIR}/../fs_mgr/liblp/include CPPFLAGS+= -I${.CURDIR}/../libsparse/include CPPFLAGS+= -I${.CURDIR}/../libziparchive/include +CPPFLAGS+= -I${.CURDIR}/../mkbootimg/include/bootimg CPPFLAGS+= ${CPPFLAGS.${.IMPSRC:T}} CPPFLAGS+= $$(${PKG_CONFIG} libcrypto --cflags 2>/dev/null) CPPFLAGS+= $$(${PKG_CONFIG} libusb-1.0 --cflags 2>/dev/null) CXXFLAGS+= -D__STDC_LIMIT_MACROS # DragonFly CXXFLAGS+= -std=gnu++17 .ifndef COMPILE.c CFLAGS+= ${CPPFLAGS} CXXFLAGS+= ${CPPFLAGS} .endif LDADD+= $$(${PKG_CONFIG} libcrypto --libs 2>/dev/null || echo -lcrypto) LDADD+= $$(${PKG_CONFIG} libusb-1.0 --libs 2>/dev/null || echo -lusb) LDADD+= -lz \-lpthread DPADD+= ${LIBPTHREAD} ${LIBUSB} ${LIBZ} PKG_CONFIG?= pkg-config beforeinstall: ${INSTALL} -d ${DESTDIR}${FILESDIR} .include Index: head/devel/android-tools-fastboot/files/patch-base_include_android-base_endian.h =================================================================== --- head/devel/android-tools-fastboot/files/patch-base_include_android-base_endian.h (nonexistent) +++ head/devel/android-tools-fastboot/files/patch-base_include_android-base_endian.h (revision 516023) @@ -0,0 +1,58 @@ +--- base/include/android-base/endian.h.orig 2019-10-18 00:22:21 UTC ++++ base/include/android-base/endian.h +@@ -50,6 +50,8 @@ + #if defined(__APPLE__) + /* macOS has some of the basics. */ + #include ++#elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#include + #else + /* Windows has some of the basics as well. */ + #include +@@ -71,22 +73,39 @@ + + #define ntohq(x) __builtin_bswap64(x) + ++#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) + #define htobe16(x) __builtin_bswap16(x) + #define htobe32(x) __builtin_bswap32(x) + #define htobe64(x) __builtin_bswap64(x) ++#endif + ++#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#define betoh16(x) be16toh(x) ++#define betoh32(x) be32toh(x) ++#define betoh64(x) be64toh(x) ++#else + #define betoh16(x) __builtin_bswap16(x) + #define betoh32(x) __builtin_bswap32(x) + #define betoh64(x) __builtin_bswap64(x) ++#endif + ++#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) + #define htole16(x) (x) + #define htole32(x) (x) + #define htole64(x) (x) ++#endif + ++#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) ++#define letoh16(x) le16toh(x) ++#define letoh32(x) le32toh(x) ++#define letoh64(x) le64toh(x) ++#else + #define letoh16(x) (x) + #define letoh32(x) (x) + #define letoh64(x) (x) ++#endif + ++#if !defined(__DragonFly__) && !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) + #define be16toh(x) __builtin_bswap16(x) + #define be32toh(x) __builtin_bswap32(x) + #define be64toh(x) __builtin_bswap64(x) +@@ -94,5 +113,6 @@ + #define le16toh(x) (x) + #define le32toh(x) (x) + #define le64toh(x) (x) ++#endif + + #endif Property changes on: head/devel/android-tools-fastboot/files/patch-base_include_android-base_endian.h ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/android-tools-fastboot/files/patch-fastboot_fastboot.cpp =================================================================== --- head/devel/android-tools-fastboot/files/patch-fastboot_fastboot.cpp (revision 516022) +++ head/devel/android-tools-fastboot/files/patch-fastboot_fastboot.cpp (revision 516023) @@ -1,24 +1,25 @@ ---- fastboot/fastboot.cpp.orig 2019-08-13 02:10:58 UTC +--- fastboot/fastboot.cpp.orig 2019-10-18 00:22:21 UTC +++ fastboot/fastboot.cpp -@@ -58,9 +58,20 @@ +@@ -59,10 +59,21 @@ #include #include #include +#ifdef PLATFORM_TOOLS_VERSION +#include +namespace android { namespace build { +std::string GetBuildNumber() { + struct utsname uts; + if (uname(&uts) == -1) + return "unknown"; + return uts.sysname; +}}} +#else #include --#include - #include ++#include +#endif -+#include + #include + #include +-#include #include #include Index: head/devel/android-tools-fastboot/files/patch-liblog_fake__writer.cpp =================================================================== --- head/devel/android-tools-fastboot/files/patch-liblog_fake__writer.cpp (revision 516022) +++ head/devel/android-tools-fastboot/files/patch-liblog_fake__writer.cpp (revision 516023) @@ -1,12 +1,11 @@ ---- liblog/fake_writer.cpp.orig 2019-07-17 19:54:09 UTC +--- liblog/fake_writer.cpp.orig 2019-10-18 00:22:21 UTC +++ liblog/fake_writer.cpp -@@ -33,8 +33,8 @@ static int logFds[(int)LOG_ID_MAX] = {-1, -1, -1, -1, - +@@ -34,7 +34,7 @@ static int logFds[(int)LOG_ID_MAX] = {-1, -1, -1, -1, struct android_log_transport_write fakeLoggerWrite = { - .node = {&fakeLoggerWrite.node, &fakeLoggerWrite.node}, -- .context.priv = &logFds, .name = "fake", + .logMask = 0, +- .context.priv = &logFds, + .context = { .priv = &logFds }, // GCC - .available = NULL, + .available = fakeAvailable, .open = fakeOpen, .close = fakeClose,