Date: Sat, 16 Apr 2016 11:38:16 +0000 (UTC) From: Jan Beich <jbeich@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r413436 - in head/devel: android-tools-adb android-tools-adb-devel android-tools-adb-devel/files android-tools-adb/files Message-ID: <201604161138.u3GBcGeX053198@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jbeich Date: Sat Apr 16 11:38:16 2016 New Revision: 413436 URL: https://svnweb.freebsd.org/changeset/ports/413436 Log: devel/android-tools-adb-devel: update to n.p.2.43 Changes: https://android.googlesource.com/platform/system/core/+log/371e7ea170d7..ba430e363427/adb Added: head/devel/android-tools-adb-devel/files/patch-adb_transport.cpp (contents, props changed) head/devel/android-tools-adb-devel/files/patch-libcrypto__utils_android__pubkey.c (contents, props changed) head/devel/android-tools-adb-devel/files/patch-liblog_logger__write.c (contents, props changed) head/devel/android-tools-adb/files/extra-patch-liblog_logd__write.c (contents, props changed) - copied, changed from r413435, head/devel/android-tools-adb/files/patch-liblog_logd__write.c Deleted: head/devel/android-tools-adb/files/patch-liblog_logd__write.c Modified: head/devel/android-tools-adb-devel/Makefile (contents, props changed) head/devel/android-tools-adb-devel/distinfo (contents, props changed) head/devel/android-tools-adb-devel/files/Makefile (contents, props changed) head/devel/android-tools-adb/Makefile (contents, props changed) Modified: head/devel/android-tools-adb-devel/Makefile ============================================================================== --- head/devel/android-tools-adb-devel/Makefile Sat Apr 16 11:22:54 2016 (r413435) +++ head/devel/android-tools-adb-devel/Makefile Sat Apr 16 11:38:16 2016 (r413436) @@ -1,8 +1,8 @@ # $FreeBSD$ -# Hint: git describe --abbrev=12 --match android-n-preview-1 -DISTVERSION= n-preview-1-554 -DISTVERSIONSUFFIX= -g371e7ea170d7 +# Hint: git describe --abbrev=12 --match android-n-preview-2 +DISTVERSION= n-preview-2-45 +DISTVERSIONSUFFIX= -g643bc369ef8d PORTREVISION= 0 PKGNAMESUFFIX= -devel @@ -19,7 +19,7 @@ OPTIONS_DEFINE= TEST_PYTHON TEST_PYTHON_DESC= ${TEST_DESC:S/tests/python &/} TEST_PYTHON_GH_PROJECT= platform_development:development -TEST_PYTHON_GH_TAGNAME= ${GH_MYTAG}-81-g782e50b09923:development +TEST_PYTHON_GH_TAGNAME= ${GH_MYTAG}-7-gd66a831ffc05:development TEST_PYTHON_BUILD_DEPENDS=${PYTHON_PKGNAMEPREFIX}mock>0:devel/py-mock TEST_PYTHON_USES= python:2.7,build Modified: head/devel/android-tools-adb-devel/distinfo ============================================================================== --- head/devel/android-tools-adb-devel/distinfo Sat Apr 16 11:22:54 2016 (r413435) +++ head/devel/android-tools-adb-devel/distinfo Sat Apr 16 11:38:16 2016 (r413436) @@ -1,6 +1,6 @@ -SHA256 (android-platform_system_core-android-n-preview-1-554-g371e7ea170d7_GH0.tar.gz) = 6672ae5e1088335f2f721b357f178163c19259abe38a8b307ebb0c8b37b291cb -SIZE (android-platform_system_core-android-n-preview-1-554-g371e7ea170d7_GH0.tar.gz) = 1536079 +SHA256 (android-platform_system_core-android-n-preview-2-45-g643bc369ef8d_GH0.tar.gz) = 03c3d7895ee24f8be00ddf38d69582ae8ed1314e1b5767b0c15c6a1e6cc3a525 +SIZE (android-platform_system_core-android-n-preview-2-45-g643bc369ef8d_GH0.tar.gz) = 1515393 SHA256 (mbrubeck-android-completion-3b0fabe_GH0.tar.gz) = dc774f101acd9514baf3e7a0ac610068116f2c093b94987ba59203a39a6439dc SIZE (mbrubeck-android-completion-3b0fabe_GH0.tar.gz) = 5948 -SHA256 (android-platform_development-android-n-preview-1-81-g782e50b09923_GH0.tar.gz) = 8dda5fadfa5919f4c1346f2343d553ddcfc55fcb385586407ec49bbb6972521f -SIZE (android-platform_development-android-n-preview-1-81-g782e50b09923_GH0.tar.gz) = 167771145 +SHA256 (android-platform_development-android-n-preview-2-7-gd66a831ffc05_GH0.tar.gz) = d17c1ac1ea597f897b9768104e3dac86922ba3a6edabddfbde3858dc75c7de93 +SIZE (android-platform_development-android-n-preview-2-7-gd66a831ffc05_GH0.tar.gz) = 167896858 Modified: head/devel/android-tools-adb-devel/files/Makefile ============================================================================== --- head/devel/android-tools-adb-devel/files/Makefile Sat Apr 16 11:22:54 2016 (r413435) +++ head/devel/android-tools-adb-devel/files/Makefile Sat Apr 16 11:38:16 2016 (r413436) @@ -58,6 +58,12 @@ TEST_SRCS+= strings_test.cpp TEST_SRCS+= test_main.cpp TEST_SRCS+= test_utils.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.c SRCS+= socket_local_client_unix.c @@ -70,9 +76,13 @@ SRCS+= threads.c # required by base/file.cpp .PATH: ${.CURDIR}/../liblog +SRCS+= config_write.c SRCS+= fake_log_device.c -SRCS+= logd_write.c -CPPFLAGS.logd_write.c+= -DFAKE_LOG_DEVICE=1 +SRCS+= fake_writer.c +SRCS+= logger_lock.c +SRCS+= logger_name.c +SRCS+= logger_write.c +CPPFLAGS.config_write.c+= -DFAKE_LOG_DEVICE=1 REVISION?= $$(${GIT} rev-parse --short=12 HEAD 2>/dev/null || echo unknown) @@ -86,6 +96,7 @@ CPPFLAGS+= -D_FILE_OFFSET_BITS=64 CPPFLAGS+= -I${.CURDIR} CPPFLAGS+= -I${.CURDIR}/../include CPPFLAGS+= -I${.CURDIR}/../base/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) Added: head/devel/android-tools-adb-devel/files/patch-adb_transport.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/android-tools-adb-devel/files/patch-adb_transport.cpp Sat Apr 16 11:38:16 2016 (r413436) @@ -0,0 +1,26 @@ +[----------] 9 tests from transport +[ RUN ] transport.kick_transport +transport_test.cpp:97: Failure +Value of: t.fd + Actual: -1 +Expected: 42 +[ FAILED ] transport.kick_transport (42 ms) +[ RUN ] transport.kick_transport_already_kicked +[ OK ] transport.kick_transport_already_kicked (1 ms) + +--- adb/transport.cpp.orig 2016-04-16 01:50:54 UTC ++++ adb/transport.cpp +@@ -307,9 +307,13 @@ void kick_transport(atransport* t) { + adb_mutex_lock(&transport_lock); + // As kick_transport() can be called from threads without guarantee that t is valid, + // check if the transport is in transport_list first. ++#ifdef __GLIBC__ + if (std::find(transport_list.begin(), transport_list.end(), t) != transport_list.end()) { ++#endif + kick_transport_locked(t); ++#ifdef __GLIBC__ + } ++#endif + adb_mutex_unlock(&transport_lock); + } + Added: head/devel/android-tools-adb-devel/files/patch-libcrypto__utils_android__pubkey.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/android-tools-adb-devel/files/patch-libcrypto__utils_android__pubkey.c Sat Apr 16 11:38:16 2016 (r413436) @@ -0,0 +1,79 @@ +--- libcrypto_utils/android_pubkey.c.orig 2016-04-16 00:01:39 UTC ++++ libcrypto_utils/android_pubkey.c +@@ -110,6 +110,76 @@ cleanup: + return ret; + } + ++#if !defined(OPENSSL_IS_BORINGSSL) ++// https://android.googlesource.com/platform/external/chromium_org/third_party/boringssl/src/+/6887edb%5E!/ ++ ++/* constant_time_select_ulong returns |x| if |v| is 1 and |y| if |v| is 0. Its ++ * behavior is undefined if |v| takes any other value. */ ++static BN_ULONG constant_time_select_ulong(int v, BN_ULONG x, BN_ULONG y) { ++ BN_ULONG mask = v; ++ mask--; ++ ++ return (~mask & x) | (mask & y); ++} ++ ++/* constant_time_le_size_t returns 1 if |x| <= |y| and 0 otherwise. |x| and |y| ++ * must not have their MSBs set. */ ++static int constant_time_le_size_t(size_t x, size_t y) { ++ return ((x - y - 1) >> (sizeof(size_t) * 8 - 1)) & 1; ++} ++ ++/* read_word_padded returns the |i|'th word of |in|, if it is not out of ++ * bounds. Otherwise, it returns 0. It does so without branches on the size of ++ * |in|, however it necessarily does not have the same memory access pattern. If ++ * the access would be out of bounds, it reads the last word of |in|. |in| must ++ * not be zero. */ ++static BN_ULONG read_word_padded(const BIGNUM *in, size_t i) { ++ /* Read |in->d[i]| if valid. Otherwise, read the last word. */ ++ BN_ULONG l = in->d[constant_time_select_ulong( ++ constant_time_le_size_t(in->dmax, i), in->dmax - 1, i)]; ++ ++ /* Clamp to zero if above |d->top|. */ ++ return constant_time_select_ulong(constant_time_le_size_t(in->top, i), 0, l); ++} ++ ++static int BN_bn2bin_padded(uint8_t *out, size_t len, const BIGNUM *in) { ++ size_t i; ++ BN_ULONG l; ++ ++ /* Special case for |in| = 0. Just branch as the probability is negligible. */ ++ if (BN_is_zero(in)) { ++ memset(out, 0, len); ++ return 1; ++ } ++ ++ /* Check if the integer is too big. This case can exit early in non-constant ++ * time. */ ++ if ((size_t)in->top > (len + (BN_BYTES - 1)) / BN_BYTES) { ++ return 0; ++ } ++ if ((len % BN_BYTES) != 0) { ++ l = read_word_padded(in, len / BN_BYTES); ++ if (l >> (8 * (len % BN_BYTES)) != 0) { ++ return 0; ++ } ++ } ++ ++ /* Write the bytes out one by one. Serialization is done without branching on ++ * the bits of |in| or on |in->top|, but if the routine would otherwise read ++ * out of bounds, the memory access pattern can't be fixed. However, for an ++ * RSA key of size a multiple of the word size, the probability of BN_BYTES ++ * leading zero octets is low. ++ * ++ * See Falko Stenzke, "Manger's Attack revisited", ICICS 2010. */ ++ i = len; ++ while (i--) { ++ l = read_word_padded(in, i / BN_BYTES); ++ *(out++) = (uint8_t)(l >> (8 * (i % BN_BYTES))) & 0xff; ++ } ++ return 1; ++} ++#endif ++ + static bool android_pubkey_encode_bignum(const BIGNUM* num, uint8_t* buffer) { + if (!BN_bn2bin_padded(buffer, ANDROID_PUBKEY_MODULUS_SIZE, num)) { + return false; Added: head/devel/android-tools-adb-devel/files/patch-liblog_logger__write.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/devel/android-tools-adb-devel/files/patch-liblog_logger__write.c Sat Apr 16 11:38:16 2016 (r413436) @@ -0,0 +1,16 @@ +--- liblog/logger_write.c.orig 2016-04-16 00:01:39 UTC ++++ liblog/logger_write.c +@@ -15,12 +15,12 @@ + */ + + #include <errno.h> +-#include <stdatomic.h> + #include <stdlib.h> + #include <string.h> + #include <sys/time.h> + + #ifdef __BIONIC__ ++#include <stdatomic.h> + #include <android/set_abort_message.h> + #endif + Modified: head/devel/android-tools-adb/Makefile ============================================================================== --- head/devel/android-tools-adb/Makefile Sat Apr 16 11:22:54 2016 (r413435) +++ head/devel/android-tools-adb/Makefile Sat Apr 16 11:38:16 2016 (r413436) @@ -27,6 +27,7 @@ CONFLICTS_INSTALL?= ${PORTNAME}-devel-* .ifndef EXTRA_PATCHES EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-base_include_base_logging.h EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-base_file__test.cpp +EXTRA_PATCHES+= ${PATCHDIR}/extra-patch-liblog_logd__write.c .endif USES= compiler:c++11-lib uidfix Copied and modified: head/devel/android-tools-adb/files/extra-patch-liblog_logd__write.c (from r413435, head/devel/android-tools-adb/files/patch-liblog_logd__write.c) ==============================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201604161138.u3GBcGeX053198>