[arch-commits] Commit in android-tools/trunk (8 files)
Anatol Pomozov
anatolik at archlinux.org
Fri Aug 25 23:30:35 UTC 2017
Date: Friday, August 25, 2017 @ 23:30:34
Author: anatolik
Revision: 253662
upgpkg: android-tools 8.0.0_r4-1
Use to ninja build system. It makes porting and generate_build.rb script development easier
(ninja builds faster then shell script).
Ninja does not allow to use environment variables like CFLAGS so we have to modify generate script
and read envvar there. Unfortunately it pull new build dependencies (ninja & ruby) but it is OK.
Added:
android-tools/trunk/fix_build_core.patch
android-tools/trunk/fix_build_selinux.patch
Modified:
android-tools/trunk/PKGBUILD
android-tools/trunk/generate_build.rb
Deleted:
android-tools/trunk/bash_completion.adb
android-tools/trunk/build.sh
android-tools/trunk/fix_build.patch
android-tools/trunk/openssl-1.1.0.patch
-------------------------+
PKGBUILD | 41 ++++++------
bash_completion.adb | 135 ----------------------------------------
build.sh | 90 ---------------------------
fix_build.patch | 66 -------------------
fix_build_core.patch | 57 +++++++++++++++++
fix_build_selinux.patch | 26 +++++++
generate_build.rb | 153 ++++++++++++++++++++++++++++++++++++----------
openssl-1.1.0.patch | 32 ---------
8 files changed, 228 insertions(+), 372 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2017-08-25 21:06:11 UTC (rev 253661)
+++ PKGBUILD 2017-08-25 23:30:34 UTC (rev 253662)
@@ -4,42 +4,47 @@
# Contributor: Alucryd <alucryd at gmail dot com>
pkgname=android-tools
-pkgver=7.1.2_r27
+pkgver=8.0.0_r4
pkgrel=1
pkgdesc='Android platform tools'
arch=(i686 x86_64)
url='http://tools.android.com/'
license=(Apache MIT)
-depends=(openssl pcre)
+depends=(pcre2 libusb ruby ninja)
optdepends=('python: for mkbootimg script')
makedepends=(git clang gtest)
source=(git+https://android.googlesource.com/platform/system/core#tag=android-$pkgver
git+https://android.googlesource.com/platform/system/extras#tag=android-$pkgver
- git+https://android.googlesource.com/platform/external/libselinux#tag=android-$pkgver
+ git+https://android.googlesource.com/platform/external/boringssl#tag=android-$pkgver
+ git+https://android.googlesource.com/platform/external/selinux#tag=android-$pkgver
git+https://android.googlesource.com/platform/external/f2fs-tools#tag=android-$pkgver
- build.sh # regenerate this file with generate_build.rb tool
- fix_build.patch
- bash_completion.fastboot
- bash_completion.adb
- openssl-1.1.0.patch) # Bash completion file was taken from https://github.com/mbrubeck/android-completion
+ generate_build.rb
+ fix_build_core.patch
+ fix_build_selinux.patch
+ bash_completion.fastboot)
+ # Bash completion file was taken from https://github.com/mbrubeck/android-completion
sha1sums=('SKIP'
'SKIP'
'SKIP'
'SKIP'
- '0a77f23fbbbe25048b228130fd2d290e8d9a1d55'
- '33538c9161c199f1e608d3b8f519adb1cd9d46d5'
- '7004dbd0c193668827174880de6f8434de8ceaee'
- '2e69152091bb9642be058e49ec6cb720a2fd91dc'
- 'e5cad0915d4b4398783ff2b72ad079eb26747fdb')
+ 'SKIP'
+ '578973cebe0a496bf5e83d2c6dd2c29d283637e7'
+ '45e41bab3633bb0be96b238aae3164a5c90721f1'
+ 'ec473160d7445f97bccabd1c32ac0ae2f77900c1'
+ '7004dbd0c193668827174880de6f8434de8ceaee')
prepare() {
- patch -p1 < fix_build.patch
- cd core
- patch -Np1 -i ../openssl-1.1.0.patch
+ PKGVER=$pkgver ./generate_build.rb > build.ninja
+
+ cd $srcdir/core
+ patch -p1 < ../fix_build_core.patch
+
+ cd $srcdir/selinux
+ patch -p1 < ../fix_build_selinux.patch
}
build() {
- PKGVER=$pkgver CC=clang CXX=clang++ ./build.sh
+ ninja
}
package(){
@@ -46,6 +51,4 @@
install -m755 -d "$pkgdir"/usr/bin
install -m755 -t "$pkgdir"/usr/bin fastboot adb core/mkbootimg/mkbootimg
install -Dm 644 bash_completion.fastboot "$pkgdir"/usr/share/bash-completion/completions/fastboot
- #adb completion is provided by bash-completion file now
- #install -Dm 644 bash_completion.adb "$pkgdir"/usr/share/bash-completion/completions/adb
}
Deleted: bash_completion.adb
===================================================================
--- bash_completion.adb 2017-08-25 21:06:11 UTC (rev 253661)
+++ bash_completion.adb 2017-08-25 23:30:34 UTC (rev 253662)
@@ -1,135 +0,0 @@
-## Bash completion for the Android SDK tools.
-##
-## Copyright (c) 2009 Matt Brubeck
-##
-## Permission is hereby granted, free of charge, to any person obtaining a copy
-## of this software and associated documentation files (the "Software"), to deal
-## in the Software without restriction, including without limitation the rights
-## to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-## copies of the Software, and to permit persons to whom the Software is
-## furnished to do so, subject to the following conditions:
-##
-## The above copyright notice and this permission notice shall be included in
-## all copies or substantial portions of the Software.
-##
-## THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-## IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-## FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-## AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-## LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-## OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-## THE SOFTWARE.
-
-
-function _adb()
-{
- local cur prev opts cmds c subcommand device_selected
- COMPREPLY=()
- cur="${COMP_WORDS[COMP_CWORD]}"
- prev="${COMP_WORDS[COMP_CWORD-1]}"
- opts="-d -e -s -p"
- cmds="devices push pull sync shell emu logcat forward jdwp install sideload \
- uninstall bugreport help version wait-for-device start-server \
- reboot reboot-bootloader \
- connect disconnect \
- kill-server get-state get-serialno status-window remount root ppp backup restore"
- cmds_not_need_device="devices help version start-server kill-server connect disconnect"
- subcommand=""
- device_selected=""
-
- # Look for the subcommand.
- c=1
- while [ $c -lt $COMP_CWORD ]; do
- word="${COMP_WORDS[c]}"
- if [ "$word" = "-d" -o "$word" = "-e" -o "$word" = "-s" ]; then
- device_selected=true
- opts="-p"
- fi
- for cmd in $cmds; do
- if [ "$cmd" = "$word" ]; then
- subcommand="$word"
- fi
- done
- c=$((++c))
- done
-
- case "${subcommand}" in
- '')
- case "${prev}" in
- -p)
- return 0;
- ;;
- -s)
- # Use 'adb devices' to list serial numbers.
- COMPREPLY=( $(compgen -W "$(adb devices |
- awk '/(device|recovery|sideload)$/{print $1}')" -- ${cur} ) )
- return 0
- ;;
- esac
- case "${cur}" in
- -*)
- COMPREPLY=( $(compgen -W "$opts" -- ${cur}) )
- return 0
- ;;
- esac
- if [ -z "$device_selected" ]; then
- local num_devices=$(( $(adb devices 2>/dev/null|wc -l) - 2 ))
- if [ "$num_devices" -gt "1" ]; then
- # With multiple devices, you must choose a device first.
- COMPREPLY=( $(compgen -W "${opts} ${cmds_not_need_device}" -- ${cur}) )
- return 0
- fi
- fi
- COMPREPLY=( $(compgen -W "${cmds}" -- ${cur}) )
- return 0
- ;;
- install)
- case "${cur}" in
- -*)
- COMPREPLY=( $(compgen -W "-l -r -s" -- ${cur}) )
- return 0
- ;;
- esac
- ;;
- forward)
- # Filename or installation option.
- COMPREPLY=( $(compgen -W "tcp: localabstract: localreserved: localfilesystem: dev: jdwp:" -- ${cur}) )
- return 0
- ;;
- uninstall)
- case "${cur}" in
- -*)
- COMPREPLY=( $(compgen -W "-k" -- ${cur}) )
- return 0
- ;;
- esac
- ;;
- logcat)
- case "${cur}" in
- -*)
- COMPREPLY=( $(compgen -W "-v -b -c -d -f -g -n -r -s" -- ${cur}) )
- return 0
- ;;
- esac
- case "${prev}" in
- -v)
- COMPREPLY=( $(compgen -W "brief process tag thread raw time long" -- ${cur}) )
- return 0
- ;;
- -b)
- COMPREPLY=( $(compgen -W "radio events main" -- ${cur}) )
- return 0
- ;;
- esac
- ;;
- backup)
- case "${cur}" in
- -*)
- COMPREPLY=( $(compgen -W "-f -apk -noapk -obb -noobb -shared -noshared -all -system -nosystem" -- ${cur}) )
- return 0
- ;;
- esac
- ;;
- esac
-}
-complete -o default -F _adb adb
Deleted: build.sh
===================================================================
--- build.sh 2017-08-25 21:06:11 UTC (rev 253661)
+++ build.sh 2017-08-25 23:30:34 UTC (rev 253662)
@@ -1,90 +0,0 @@
-# This set of commands generated by generate_build.rb script
-
-$CXX -o core/adb/adb.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/adb.cpp
-$CXX -o core/adb/adb_auth.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/adb_auth.cpp
-$CXX -o core/adb/adb_io.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/adb_io.cpp
-$CXX -o core/adb/adb_listeners.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/adb_listeners.cpp
-$CXX -o core/adb/adb_trace.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/adb_trace.cpp
-$CXX -o core/adb/adb_utils.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/adb_utils.cpp
-$CXX -o core/adb/bugreport.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/bugreport.cpp
-$CXX -o core/adb/line_printer.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/line_printer.cpp
-$CXX -o core/adb/sockets.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/sockets.cpp
-$CXX -o core/adb/transport.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/transport.cpp
-$CXX -o core/adb/transport_local.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/transport_local.cpp
-$CXX -o core/adb/transport_usb.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/transport_usb.cpp
-$CXX -o core/adb/sysdeps_unix.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/sysdeps_unix.cpp
-$CXX -o core/adb/fdevent.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/fdevent.cpp
-$CXX -o core/adb/get_my_path_linux.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/get_my_path_linux.cpp
-$CXX -o core/adb/usb_linux.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/usb_linux.cpp
-$CXX -o core/adb/adb_auth_host.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/adb_auth_host.cpp
-$CXX -o core/adb/shell_service_protocol.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/shell_service_protocol.cpp
-$CXX -o core/adb/console.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -D_GNU_SOURCE -DADB_HOST=1 -DWORKAROUND_BUG6558362 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/console.cpp
-$CXX -o core/adb/commandline.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -D_GNU_SOURCE -DADB_HOST=1 -DWORKAROUND_BUG6558362 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/commandline.cpp
-$CXX -o core/adb/adb_client.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -D_GNU_SOURCE -DADB_HOST=1 -DWORKAROUND_BUG6558362 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/adb_client.cpp
-$CXX -o core/adb/services.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -D_GNU_SOURCE -DADB_HOST=1 -DWORKAROUND_BUG6558362 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/services.cpp
-$CXX -o core/adb/file_sync_client.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -D_GNU_SOURCE -DADB_HOST=1 -DWORKAROUND_BUG6558362 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/file_sync_client.cpp
-$CXX -o core/adb/client/main.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -D_GNU_SOURCE -DADB_HOST=1 -DWORKAROUND_BUG6558362 -fpermissive -Icore/include -Icore/base/include -Icore/adb -c core/adb/client/main.cpp
-$CXX -o core/base/file.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_HOST=1 -Icore/base/include -Icore/include -c core/base/file.cpp
-$CXX -o core/base/logging.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_HOST=1 -Icore/base/include -Icore/include -c core/base/logging.cpp
-$CXX -o core/base/parsenetaddress.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_HOST=1 -Icore/base/include -Icore/include -c core/base/parsenetaddress.cpp
-$CXX -o core/base/stringprintf.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_HOST=1 -Icore/base/include -Icore/include -c core/base/stringprintf.cpp
-$CXX -o core/base/strings.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_HOST=1 -Icore/base/include -Icore/include -c core/base/strings.cpp
-$CXX -o core/base/errors_unix.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DADB_HOST=1 -Icore/base/include -Icore/include -c core/base/errors_unix.cpp
-$CC -o core/liblog/log_event_write.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DLIBLOG_LOG_TAG=1005 -DFAKE_LOG_DEVICE=1 -D_GNU_SOURCE -Icore/log/include -Icore/include -c core/liblog/log_event_write.c
-$CC -o core/liblog/fake_log_device.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DLIBLOG_LOG_TAG=1005 -DFAKE_LOG_DEVICE=1 -D_GNU_SOURCE -Icore/log/include -Icore/include -c core/liblog/fake_log_device.c
-$CC -o core/liblog/log_event_list.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DLIBLOG_LOG_TAG=1005 -DFAKE_LOG_DEVICE=1 -D_GNU_SOURCE -Icore/log/include -Icore/include -c core/liblog/log_event_list.c
-$CC -o core/liblog/logger_write.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DLIBLOG_LOG_TAG=1005 -DFAKE_LOG_DEVICE=1 -D_GNU_SOURCE -Icore/log/include -Icore/include -c core/liblog/logger_write.c
-$CC -o core/liblog/config_write.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DLIBLOG_LOG_TAG=1005 -DFAKE_LOG_DEVICE=1 -D_GNU_SOURCE -Icore/log/include -Icore/include -c core/liblog/config_write.c
-$CC -o core/liblog/logger_lock.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DLIBLOG_LOG_TAG=1005 -DFAKE_LOG_DEVICE=1 -D_GNU_SOURCE -Icore/log/include -Icore/include -c core/liblog/logger_lock.c
-$CC -o core/liblog/fake_writer.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DLIBLOG_LOG_TAG=1005 -DFAKE_LOG_DEVICE=1 -D_GNU_SOURCE -Icore/log/include -Icore/include -c core/liblog/fake_writer.c
-$CC -o core/liblog/logger_name.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DLIBLOG_LOG_TAG=1005 -DFAKE_LOG_DEVICE=1 -D_GNU_SOURCE -Icore/log/include -Icore/include -c core/liblog/logger_name.c
-$CC -o core/libcutils/load_file.c.o -std=gnu11 $CFLAGS $CPPFLAGS -D_GNU_SOURCE -Icore/include -c core/libcutils/load_file.c
-$CC -o core/libcutils/socket_local_client_unix.c.o -std=gnu11 $CFLAGS $CPPFLAGS -D_GNU_SOURCE -Icore/include -c core/libcutils/socket_local_client_unix.c
-$CC -o core/libcutils/socket_loopback_client_unix.c.o -std=gnu11 $CFLAGS $CPPFLAGS -D_GNU_SOURCE -Icore/include -c core/libcutils/socket_loopback_client_unix.c
-$CC -o core/libcutils/socket_network_client_unix.c.o -std=gnu11 $CFLAGS $CPPFLAGS -D_GNU_SOURCE -Icore/include -c core/libcutils/socket_network_client_unix.c
-$CC -o core/libcutils/socket_loopback_server_unix.c.o -std=gnu11 $CFLAGS $CPPFLAGS -D_GNU_SOURCE -Icore/include -c core/libcutils/socket_loopback_server_unix.c
-$CC -o core/libcutils/socket_local_server_unix.c.o -std=gnu11 $CFLAGS $CPPFLAGS -D_GNU_SOURCE -Icore/include -c core/libcutils/socket_local_server_unix.c
-$CXX -o core/libcutils/sockets_unix.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -D_GNU_SOURCE -Icore/include -c core/libcutils/sockets_unix.cpp
-$CC -o core/libcutils/socket_inaddr_any_server_unix.c.o -std=gnu11 $CFLAGS $CPPFLAGS -D_GNU_SOURCE -Icore/include -c core/libcutils/socket_inaddr_any_server_unix.c
-$CXX -o core/libcutils/sockets.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -D_GNU_SOURCE -Icore/include -c core/libcutils/sockets.cpp
-$CXX -o core/adb/diagnose_usb.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -Icore/include -Icore/base/include -c core/adb/diagnose_usb.cpp
-$CXX -o adb -lpthread -lcrypto $LDFLAGS core/base/file.cpp.o core/base/logging.cpp.o core/base/parsenetaddress.cpp.o core/base/stringprintf.cpp.o core/base/strings.cpp.o core/base/errors_unix.cpp.o core/liblog/log_event_write.c.o core/liblog/fake_log_device.c.o core/liblog/log_event_list.c.o core/liblog/logger_write.c.o core/liblog/config_write.c.o core/liblog/logger_lock.c.o core/liblog/fake_writer.c.o core/liblog/logger_name.c.o core/libcutils/load_file.c.o core/libcutils/socket_local_client_unix.c.o core/libcutils/socket_loopback_client_unix.c.o core/libcutils/socket_network_client_unix.c.o core/libcutils/socket_loopback_server_unix.c.o core/libcutils/socket_local_server_unix.c.o core/libcutils/sockets_unix.cpp.o core/libcutils/socket_inaddr_any_server_unix.c.o core/libcutils/sockets.cpp.o core/adb/adb.cpp.o core/adb/adb_auth.cpp.o core/adb/adb_io.cpp.o core/adb/adb_listeners.cpp.o core/adb/adb_trace.cpp.o core/adb/adb_utils.cpp.o core/adb/bugreport.cpp.o core/adb/line_printer.cp
p.o core/adb/sockets.cpp.o core/adb/transport.cpp.o core/adb/transport_local.cpp.o core/adb/transport_usb.cpp.o core/adb/sysdeps_unix.cpp.o core/adb/fdevent.cpp.o core/adb/get_my_path_linux.cpp.o core/adb/usb_linux.cpp.o core/adb/adb_auth_host.cpp.o core/adb/shell_service_protocol.cpp.o core/adb/console.cpp.o core/adb/commandline.cpp.o core/adb/adb_client.cpp.o core/adb/services.cpp.o core/adb/file_sync_client.cpp.o core/adb/client/main.cpp.o core/adb/diagnose_usb.cpp.o
-$CXX -o core/fastboot/protocol.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils -Iextras/f2fs_utils -c core/fastboot/protocol.cpp
-$CXX -o core/fastboot/engine.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils -Iextras/f2fs_utils -c core/fastboot/engine.cpp
-$CXX -o core/fastboot/bootimg_utils.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils -Iextras/f2fs_utils -c core/fastboot/bootimg_utils.cpp
-$CXX -o core/fastboot/fastboot.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils -Iextras/f2fs_utils -c core/fastboot/fastboot.cpp
-$CXX -o core/fastboot/util.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils -Iextras/f2fs_utils -c core/fastboot/util.cpp
-$CXX -o core/fastboot/fs.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils -Iextras/f2fs_utils -c core/fastboot/fs.cpp
-$CXX -o core/fastboot/usb_linux.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils -Iextras/f2fs_utils -c core/fastboot/usb_linux.cpp
-$CXX -o core/fastboot/util_linux.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils -Iextras/f2fs_utils -c core/fastboot/util_linux.cpp
-$CXX -o core/fastboot/socket.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils -Iextras/f2fs_utils -c core/fastboot/socket.cpp
-$CXX -o core/fastboot/tcp.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils -Iextras/f2fs_utils -c core/fastboot/tcp.cpp
-$CXX -o core/fastboot/udp.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils -Iextras/f2fs_utils -c core/fastboot/udp.cpp
-$CC -o core/libsparse/backed_block.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -c core/libsparse/backed_block.c
-$CC -o core/libsparse/output_file.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -c core/libsparse/output_file.c
-$CC -o core/libsparse/sparse.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -c core/libsparse/sparse.c
-$CC -o core/libsparse/sparse_crc32.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -c core/libsparse/sparse_crc32.c
-$CC -o core/libsparse/sparse_err.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -c core/libsparse/sparse_err.c
-$CC -o core/libsparse/sparse_read.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -c core/libsparse/sparse_read.c
-$CXX -o core/libziparchive/zip_archive.cc.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -Icore/base/include -Icore/include -c core/libziparchive/zip_archive.cc
-$CXX -o core/libutils/FileMap.cpp.o -std=gnu++14 $CXXFLAGS $CPPFLAGS -Icore/include -c core/libutils/FileMap.cpp
-$CC -o extras/ext4_utils/make_ext4fs.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -Icore/include -Ilibselinux/include -c extras/ext4_utils/make_ext4fs.c
-$CC -o extras/ext4_utils/ext4fixup.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -Icore/include -Ilibselinux/include -c extras/ext4_utils/ext4fixup.c
-$CC -o extras/ext4_utils/ext4_utils.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -Icore/include -Ilibselinux/include -c extras/ext4_utils/ext4_utils.c
-$CC -o extras/ext4_utils/allocate.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -Icore/include -Ilibselinux/include -c extras/ext4_utils/allocate.c
-$CC -o extras/ext4_utils/contents.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -Icore/include -Ilibselinux/include -c extras/ext4_utils/contents.c
-$CC -o extras/ext4_utils/extent.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -Icore/include -Ilibselinux/include -c extras/ext4_utils/extent.c
-$CC -o extras/ext4_utils/indirect.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -Icore/include -Ilibselinux/include -c extras/ext4_utils/indirect.c
-$CC -o extras/ext4_utils/sha1.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -Icore/include -Ilibselinux/include -c extras/ext4_utils/sha1.c
-$CC -o extras/ext4_utils/wipe.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -Icore/include -Ilibselinux/include -c extras/ext4_utils/wipe.c
-$CC -o extras/ext4_utils/crc16.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -Icore/include -Ilibselinux/include -c extras/ext4_utils/crc16.c
-$CC -o extras/ext4_utils/ext4_sb.c.o -std=gnu11 $CFLAGS $CPPFLAGS -Icore/libsparse/include -Icore/include -Ilibselinux/include -c extras/ext4_utils/ext4_sb.c
-$CC -o libselinux/src/callbacks.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -Ilibselinux/include -c libselinux/src/callbacks.c
-$CC -o libselinux/src/check_context.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -Ilibselinux/include -c libselinux/src/check_context.c
-$CC -o libselinux/src/freecon.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -Ilibselinux/include -c libselinux/src/freecon.c
-$CC -o libselinux/src/init.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -Ilibselinux/include -c libselinux/src/init.c
-$CC -o libselinux/src/label.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -Ilibselinux/include -c libselinux/src/label.c
-$CC -o libselinux/src/label_file.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -Ilibselinux/include -c libselinux/src/label_file.c
-$CC -o libselinux/src/label_android_property.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -Ilibselinux/include -c libselinux/src/label_android_property.c
-$CC -o libselinux/src/label_support.c.o -std=gnu11 $CFLAGS $CPPFLAGS -DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -Ilibselinux/include -c libselinux/src/label_support.c
-$CXX -o fastboot -lz -lpcre -lpthread $LDFLAGS core/libsparse/backed_block.c.o core/libsparse/output_file.c.o core/libsparse/sparse.c.o core/libsparse/sparse_crc32.c.o core/libsparse/sparse_err.c.o core/libsparse/sparse_read.c.o core/libziparchive/zip_archive.cc.o core/libcutils/load_file.c.o core/libcutils/socket_local_client_unix.c.o core/libcutils/socket_loopback_client_unix.c.o core/libcutils/socket_network_client_unix.c.o core/libcutils/socket_loopback_server_unix.c.o core/libcutils/socket_local_server_unix.c.o core/libcutils/sockets_unix.cpp.o core/libcutils/socket_inaddr_any_server_unix.c.o core/libcutils/sockets.cpp.o core/liblog/log_event_write.c.o core/liblog/fake_log_device.c.o core/liblog/log_event_list.c.o core/liblog/logger_write.c.o core/liblog/config_write.c.o core/liblog/logger_lock.c.o core/liblog/fake_writer.c.o core/liblog/logger_name.c.o core/libutils/FileMap.cpp.o core/base/file.cpp.o core/base/logging.cpp.o core/base/parsenetaddress.cpp.o core/base/stringprint
f.cpp.o core/base/strings.cpp.o core/base/errors_unix.cpp.o extras/ext4_utils/make_ext4fs.c.o extras/ext4_utils/ext4fixup.c.o extras/ext4_utils/ext4_utils.c.o extras/ext4_utils/allocate.c.o extras/ext4_utils/contents.c.o extras/ext4_utils/extent.c.o extras/ext4_utils/indirect.c.o extras/ext4_utils/sha1.c.o extras/ext4_utils/wipe.c.o extras/ext4_utils/crc16.c.o extras/ext4_utils/ext4_sb.c.o libselinux/src/callbacks.c.o libselinux/src/check_context.c.o libselinux/src/freecon.c.o libselinux/src/init.c.o libselinux/src/label.c.o libselinux/src/label_file.c.o libselinux/src/label_android_property.c.o libselinux/src/label_support.c.o core/fastboot/protocol.cpp.o core/fastboot/engine.cpp.o core/fastboot/bootimg_utils.cpp.o core/fastboot/fastboot.cpp.o core/fastboot/util.cpp.o core/fastboot/fs.cpp.o core/fastboot/usb_linux.cpp.o core/fastboot/util_linux.cpp.o core/fastboot/socket.cpp.o core/fastboot/tcp.cpp.o core/fastboot/udp.cpp.o core/adb/diagnose_usb.cpp.o
Deleted: fix_build.patch
===================================================================
--- fix_build.patch 2017-08-25 21:06:11 UTC (rev 253661)
+++ fix_build.patch 2017-08-25 23:30:34 UTC (rev 253662)
@@ -1,66 +0,0 @@
-diff --git a/core/adb/sysdeps.h b/core/adb/sysdeps.h
-index 75dcc86..867f3ec 100644
---- a/core/adb/sysdeps.h
-+++ b/core/adb/sysdeps.h
-@@ -25,6 +25,7 @@
- #endif
-
- #include <errno.h>
-+#include <sys/syscall.h>
-
- #include <string>
- #include <vector>
-@@ -831,7 +832,16 @@ static __inline__ int adb_is_absolute_host_path(const char* path) {
-
- static __inline__ unsigned long adb_thread_id()
- {
-- return (unsigned long)gettid();
-+ // TODO: this function should be merged with GetThreadId
-+#if defined(__BIONIC__)
-+ return gettid();
-+#elif defined(__APPLE__)
-+ return syscall(SYS_thread_selfid);
-+#elif defined(__linux__)
-+ return syscall(__NR_gettid);
-+#elif defined(_WIN32)
-+ return GetCurrentThreadId();
-+#endif
- }
-
- #endif /* !_WIN32 */
-diff --git a/core/base/errors_unix.cpp b/core/base/errors_unix.cpp
-index 296995e..48269b6 100644
---- a/core/base/errors_unix.cpp
-+++ b/core/base/errors_unix.cpp
-@@ -17,6 +17,7 @@
- #include "android-base/errors.h"
-
- #include <errno.h>
-+#include <string.h>
-
- namespace android {
- namespace base {
-diff --git a/core/base/file.cpp b/core/base/file.cpp
-index da1adba..91a3901 100644
---- a/core/base/file.cpp
-+++ b/core/base/file.cpp
-@@ -20,6 +20,7 @@
- #include <fcntl.h>
- #include <sys/stat.h>
- #include <sys/types.h>
-+#include <string.h>
-
- #include <string>
-
-diff --git a/core/base/logging.cpp b/core/base/logging.cpp
-index 1741871..e97c7f1 100644
---- a/core/base/logging.cpp
-+++ b/core/base/logging.cpp
-@@ -21,6 +21,7 @@
- #include "android-base/logging.h"
-
- #include <libgen.h>
-+#include <string.h>
-
- // For getprogname(3) or program_invocation_short_name.
- #if defined(__ANDROID__) || defined(__APPLE__)
Added: fix_build_core.patch
===================================================================
--- fix_build_core.patch (rev 0)
+++ fix_build_core.patch 2017-08-25 23:30:34 UTC (rev 253662)
@@ -0,0 +1,57 @@
+diff --git a/adb/client/usb_libusb.cpp b/adb/client/usb_libusb.cpp
+index 7adb26213..7596c123b 100644
+--- a/adb/client/usb_libusb.cpp
++++ b/adb/client/usb_libusb.cpp
+@@ -21,6 +21,7 @@
+ #include <stdint.h>
+
+ #include <atomic>
++#include <condition_variable>
+ #include <chrono>
+ #include <memory>
+ #include <mutex>
+@@ -28,7 +29,7 @@
+ #include <thread>
+ #include <unordered_map>
+
+-#include <libusb/libusb.h>
++#include <libusb-1.0/libusb.h>
+
+ #include <android-base/file.h>
+ #include <android-base/logging.h>
+diff --git a/base/errors_unix.cpp b/base/errors_unix.cpp
+index 296995efe..48269b675 100644
+--- a/base/errors_unix.cpp
++++ b/base/errors_unix.cpp
+@@ -17,6 +17,7 @@
+ #include "android-base/errors.h"
+
+ #include <errno.h>
++#include <string.h>
+
+ namespace android {
+ namespace base {
+diff --git a/base/file.cpp b/base/file.cpp
+index d4e58942c..ca7655fa2 100644
+--- a/base/file.cpp
++++ b/base/file.cpp
+@@ -22,6 +22,7 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
++#include <string.h>
+
+ #include <memory>
+ #include <mutex>
+diff --git a/base/logging.cpp b/base/logging.cpp
+index 6357b4ba7..3c7dbce13 100644
+--- a/base/logging.cpp
++++ b/base/logging.cpp
+@@ -23,6 +23,7 @@
+ #include <fcntl.h>
+ #include <libgen.h>
+ #include <time.h>
++#include <string.h>
+
+ // For getprogname(3) or program_invocation_short_name.
+ #if defined(__ANDROID__) || defined(__APPLE__)
Added: fix_build_selinux.patch
===================================================================
--- fix_build_selinux.patch (rev 0)
+++ fix_build_selinux.patch 2017-08-25 23:30:34 UTC (rev 253662)
@@ -0,0 +1,26 @@
+diff --git a/libsepol/src/private.h b/libsepol/src/private.h
+index b884c23b..447fa64b 100644
+--- a/libsepol/src/private.h
++++ b/libsepol/src/private.h
+@@ -14,7 +14,7 @@
+ #endif
+
+ #include <errno.h>
+-#include <dso.h>
++#include "dso.h"
+
+ #ifdef __APPLE__
+ #define __BYTE_ORDER BYTE_ORDER
+diff --git a/libsepol/src/util.c b/libsepol/src/util.c
+index b00251c6..68e7c6a0 100644
+--- a/libsepol/src/util.c
++++ b/libsepol/src/util.c
+@@ -27,7 +27,7 @@
+ #include <sepol/policydb/flask_types.h>
+ #include <sepol/policydb/policydb.h>
+ #include <sepol/policydb/util.h>
+-#include <dso.h>
++#include "dso.h"
+
+ struct val_to_name {
+ unsigned int val;
Modified: generate_build.rb
===================================================================
--- generate_build.rb 2017-08-25 21:06:11 UTC (rev 253661)
+++ generate_build.rb 2017-08-25 23:30:34 UTC (rev 253662)
@@ -14,13 +14,13 @@
outputs = []
for s in sources
ext = File.extname(s)
-
+
case ext
when '.c'
- cc = '$CC'
+ cc = 'cc'
lang_flags = '-std=gnu11 $CFLAGS $CPPFLAGS'
when '.cpp', '.cc'
- cc = '$CXX'
+ cc = 'cxx'
lang_flags = '-std=gnu++14 $CXXFLAGS $CPPFLAGS'
else
raise "Unknown extension #{ext}"
@@ -28,7 +28,7 @@
output = s + '.o'
outputs << output
- puts "#{cc} -o #{output} #{lang_flags} #{cflags} -c #{s}\n"
+ puts "build #{output}: #{cc} #{s}\n cflags = #{lang_flags} #{cflags}"
end
return outputs
@@ -36,14 +36,33 @@
# Links object files
def link(output, objects, ldflags)
- puts "$CXX -o #{output} #{ldflags} $LDFLAGS #{objects.join(' ')}"
+ puts "build #{output}: link #{objects.join(' ')}\n ldflags = #{ldflags} $LDFLAGS"
end
-puts "# This set of commands generated by generate_build.rb script\n\n"
+puts "# This set of commands generated by generate_build.rb script\n\n"
+puts "CC = #{ENV['CC'] || 'clang'}"
+puts "CXX = #{ENV['CXX'] || 'clang++'}\n\n"
+puts "CFLAGS = #{ENV['CFLAGS']}"
+puts "CXXFLAGS = #{ENV['CXXFLAGS']}"
+puts "LDFLAGS = #{ENV['LDFLAGS']}"
+puts "PKGVER = #{ENV['PKGVER']}\n\n"
+
+puts """
+rule cc
+ command = $CC $cflags -c $in -o $out
+
+rule cxx
+ command = $CXX $cflags -c $in -o $out
+
+rule link
+ command = $CXX $ldflags $LDFLAGS $in -o $out
+
+
+"""
+
adbdfiles = %w(
adb.cpp
- adb_auth.cpp
adb_io.cpp
adb_listeners.cpp
adb_trace.cpp
@@ -54,26 +73,28 @@
transport.cpp
transport_local.cpp
transport_usb.cpp
- sysdeps_unix.cpp
-
+ transport_mdns_unsupported.cpp
fdevent.cpp
- get_my_path_linux.cpp
- usb_linux.cpp
-
adb_auth_host.cpp
shell_service_protocol.cpp
)
-libadbd = compile(expand('core/adb', adbdfiles), '-DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -Icore/include -Icore/base/include -Icore/adb')
+libadbd = compile(expand('core/adb', adbdfiles), '-DADB_REVISION="\"$PKGVER\"" -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/include')
adbfiles = %w(
console.cpp
+ socket_spec.cpp
commandline.cpp
adb_client.cpp
services.cpp
file_sync_client.cpp
+ sysdeps_unix.cpp
+ sysdeps/errno.cpp
client/main.cpp
+ client/usb_dispatch.cpp
+ client/usb_linux.cpp
+ client/usb_libusb.cpp
)
-libadb = compile(expand('core/adb', adbfiles), '-D_GNU_SOURCE -DADB_HOST=1 -DWORKAROUND_BUG6558362 -fpermissive -Icore/include -Icore/base/include -Icore/adb')
+libadb = compile(expand('core/adb', adbfiles), '-D_GNU_SOURCE -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb')
basefiles = %w(
file.cpp
@@ -91,16 +112,19 @@
log_event_list.c
logger_write.c
config_write.c
+ config_read.c
logger_lock.c
+ local_logger.c
fake_writer.c
logger_name.c
+ stderr_write.c
+ logprint.c
)
-liblog = compile(expand('core/liblog', logfiles), '-DLIBLOG_LOG_TAG=1005 -DFAKE_LOG_DEVICE=1 -D_GNU_SOURCE -Icore/log/include -Icore/include')
+liblog = compile(expand('core/liblog', logfiles), '-DLIBLOG_LOG_TAG=1006 -DFAKE_LOG_DEVICE=1 -Icore/log/include -Icore/include')
cutilsfiles = %w(
load_file.c
socket_local_client_unix.c
- socket_loopback_client_unix.c
socket_network_client_unix.c
socket_loopback_server_unix.c
socket_local_server_unix.c
@@ -107,6 +131,8 @@
sockets_unix.cpp
socket_inaddr_any_server_unix.c
sockets.cpp
+ android_get_control_file.cpp
+ threads.c
)
libcutils = compile(expand('core/libcutils', cutilsfiles), '-D_GNU_SOURCE -Icore/include')
@@ -115,9 +141,27 @@
)
libdiagnoseusb = compile(expand('core/adb', diagnoseusbfiles), '-Icore/include -Icore/base/include')
-link('adb', libbase + liblog + libcutils + libadbd + libadb + libdiagnoseusb, '-lpthread -lcrypto')
+libcryptofiles = %w(
+ android_pubkey.c
+)
+libcrypto = compile(expand('core/libcrypto_utils', libcryptofiles), '-Icore/libcrypto_utils/include -Iboringssl/include')
+boringsslfiles = %w(
+ crypto/bn/convert.c
+ crypto/bn/bn.c
+ crypto/bio/file.c
+ crypto/bytestring/cbb.c
+ crypto/buf/buf.c
+ crypto/mem.c
+ crypto/base64/base64.c
+)
+boringssl = compile(expand('boringssl/src', boringsslfiles), '-DBORINGSSL_ANDROID_SYSTEM -DOPENSSL_SMALL -DBORINGSSL_IMPLEMENTATION -Iboringssl/include')
+
+
+link('adb', libbase + liblog + libcutils + libadbd + libadb + libdiagnoseusb + libcrypto + boringssl, '-lpthread -lcrypto -lusb-1.0')
+
+
fastbootfiles = %w(
protocol.cpp
engine.cpp
@@ -126,12 +170,11 @@
util.cpp
fs.cpp
usb_linux.cpp
- util_linux.cpp
socket.cpp
tcp.cpp
udp.cpp
)
-libfastboot = compile(expand('core/fastboot', fastbootfiles), '-DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils -Iextras/f2fs_utils')
+libfastboot = compile(expand('core/fastboot', fastbootfiles), '-DFASTBOOT_REVISION="\"$PKGVER\"" -D_GNU_SOURCE -DUSE_F2FS -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils')
sparsefiles = %w(
backed_block.c
@@ -143,6 +186,13 @@
)
libsparse = compile(expand('core/libsparse', sparsefiles), '-Icore/libsparse/include')
+f2fsfiles = %w(
+ f2fs_utils.c
+ f2fs_ioutils.c
+ f2fs_dlutils.c
+)
+f2fs = compile(expand('extras/f2fs_utils', f2fsfiles), '-Iextras/f2fs_utils -If2fs-tools/include -If2fs-tools/mkfs -Icore/libsparse/include -Iselinux/libselinux/include')
+
zipfiles = %w(
zip_archive.cc
)
@@ -166,18 +216,61 @@
crc16.c
ext4_sb.c
)
-libext4 = compile(expand('extras/ext4_utils', ext4files), '-Icore/libsparse/include -Icore/include -Ilibselinux/include')
+libext4 = compile(expand('extras/ext4_utils', ext4files), '-Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include')
selinuxfiles = %w(
- src/callbacks.c
- src/check_context.c
- src/freecon.c
- src/init.c
- src/label.c
- src/label_file.c
- src/label_android_property.c
- src/label_support.c
+ callbacks.c
+ check_context.c
+ freecon.c
+ init.c
+ label.c
+ label_file.c
+ label_support.c
+ setrans_client.c
+ regex.c
+ matchpathcon.c
+ selinux_config.c
+ label_backends_android.c
+ canonicalize_context.c
+ lsetfilecon.c
+ policyvers.c
+ lgetfilecon.c
+ load_policy.c
+ seusers.c
+ sha1.c
+ booleans.c
+ disable.c
+ enabled.c
+ getenforce.c
+ setenforce.c
)
-libselinux = compile(expand('libselinux', selinuxfiles), '-DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -Ilibselinux/include')
+libselinux = compile(expand('selinux/libselinux/src', selinuxfiles), '-DAUDITD_LOG_TAG=1003 -D_GNU_SOURCE -DHOST -DUSE_PCRE2 -DNO_PERSISTENTLY_STORED_PATTERNS -DDISABLE_SETRANS -DDISABLE_BOOL -DNO_MEDIA_BACKEND -DNO_X_BACKEND -DNO_DB_BACKEND -DPCRE2_CODE_UNIT_WIDTH=8 -Iselinux/libselinux/include -Iselinux/libsepol/include')
-link('fastboot', libsparse + libzip + libcutils + liblog + libutil + libbase + libext4 + libselinux + libfastboot + libdiagnoseusb, '-lz -lpcre -lpthread')
+libsepolfiles = %w(
+ policydb_public.c
+ genbools.c
+ debug.c
+ policydb.c
+ conditional.c
+ services.c
+ ebitmap.c
+ util.c
+ assertion.c
+ avtab.c
+ hashtab.c
+ sidtab.c
+ context.c
+ genusers.c
+ context_record.c
+ mls.c
+ avrule_block.c
+ symtab.c
+ policydb_convert.c
+ write.c
+ constraint.c
+ expand.c
+ hierarchy.c
+)
+libsepol = compile(expand('selinux/libsepol/src', libsepolfiles), '-Iselinux/libsepol/include')
+
+link('fastboot', libsparse + libzip + libcutils + liblog + libutil + libbase + libext4 + f2fs + libselinux + libsepol + libfastboot + libdiagnoseusb, '-lz -lpcre2-8 -lpthread -ldl')
Deleted: openssl-1.1.0.patch
===================================================================
--- openssl-1.1.0.patch 2017-08-25 21:06:11 UTC (rev 253661)
+++ openssl-1.1.0.patch 2017-08-25 23:30:34 UTC (rev 253662)
@@ -1,32 +0,0 @@
-diff --git a/adb/adb_auth_host.cpp b/adb/adb_auth_host.cpp
-index 7b6671d73..d9fc00f86 100644
---- a/adb/adb_auth_host.cpp
-+++ b/adb/adb_auth_host.cpp
-@@ -71,6 +71,8 @@ static int RSA_to_RSAPublicKey(RSA *rsa, RSAPublicKey *pkey)
- BIGNUM* rem = BN_new();
- BIGNUM* n = BN_new();
- BIGNUM* n0inv = BN_new();
-+ const BIGNUM* rsa_n;
-+ const BIGNUM* rsa_e;
-
- if (RSA_size(rsa) != RSANUMBYTES) {
- ret = 0;
-@@ -78,7 +80,8 @@ static int RSA_to_RSAPublicKey(RSA *rsa, RSAPublicKey *pkey)
- }
-
- BN_set_bit(r32, 32);
-- BN_copy(n, rsa->n);
-+ RSA_get0_key (rsa, &rsa_n, &rsa_e, NULL);
-+ BN_copy(n, rsa_n);
- BN_set_bit(r, RSANUMWORDS * 32);
- BN_mod_sqr(rr, r, n, ctx);
- BN_div(NULL, rem, n, r32, ctx);
-@@ -92,7 +95,7 @@ static int RSA_to_RSAPublicKey(RSA *rsa, RSAPublicKey *pkey)
- BN_div(n, rem, n, r32, ctx);
- pkey->n[i] = BN_get_word(rem);
- }
-- pkey->exponent = BN_get_word(rsa->e);
-+ pkey->exponent = BN_get_word(rsa_e);
-
- out:
- BN_free(n0inv);
More information about the arch-commits
mailing list