update to latest
This commit is contained in:
parent
6ded5b3ec8
commit
41af786fe1
3 changed files with 85 additions and 44 deletions
|
|
@ -1,5 +1,30 @@
|
|||
diff --git a/adb/sysdeps/posix/network.cpp b/adb/sysdeps/posix/network.cpp
|
||||
index ecd1fd24e..e27d813cd 100644
|
||||
--- a/adb/sysdeps/posix/network.cpp
|
||||
+++ b/adb/sysdeps/posix/network.cpp
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
-#include <string>
|
||||
+#include <string.h>
|
||||
|
||||
#include "adb_unique_fd.h"
|
||||
|
||||
diff --git a/adb/types.h b/adb/types.h
|
||||
index c6b3f0703..25a068bf2 100644
|
||||
--- a/adb/types.h
|
||||
+++ b/adb/types.h
|
||||
@@ -17,6 +17,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
+#include <cstring>
|
||||
#include <deque>
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
diff --git a/base/errors_unix.cpp b/base/errors_unix.cpp
|
||||
index 296995e..48269b6 100644
|
||||
index 296995efe..48269b675 100644
|
||||
--- a/base/errors_unix.cpp
|
||||
+++ b/base/errors_unix.cpp
|
||||
@@ -17,6 +17,7 @@
|
||||
|
|
@ -11,7 +36,7 @@ index 296995e..48269b6 100644
|
|||
namespace android {
|
||||
namespace base {
|
||||
diff --git a/base/file.cpp b/base/file.cpp
|
||||
index 81b04d7..2fd2b6e 100644
|
||||
index 2f697a1cc..81aef5758 100644
|
||||
--- a/base/file.cpp
|
||||
+++ b/base/file.cpp
|
||||
@@ -22,6 +22,7 @@
|
||||
|
|
@ -23,11 +48,11 @@ index 81b04d7..2fd2b6e 100644
|
|||
#include <memory>
|
||||
#include <mutex>
|
||||
diff --git a/base/logging.cpp b/base/logging.cpp
|
||||
index 6357b4b..3c7dbce 100644
|
||||
index 35054ac82..1f6ff5b03 100644
|
||||
--- a/base/logging.cpp
|
||||
+++ b/base/logging.cpp
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <fcntl.h>
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <inttypes.h>
|
||||
#include <libgen.h>
|
||||
#include <time.h>
|
||||
+#include <string.h>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
%global date 20170311
|
||||
%global git_commit e7195be7725a
|
||||
%global date 20180608
|
||||
%global git_commit 158dd05b8aeb
|
||||
|
||||
%global packdname core-%{git_commit}
|
||||
%global extras_git_commit 61f6603
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
Name: android-tools
|
||||
Version: %{date}git%{git_commit}
|
||||
Release: 7%{?dist}
|
||||
Release: 1%{?dist}
|
||||
Summary: Android platform tools(adb, fastboot)
|
||||
|
||||
Group: Applications/System
|
||||
|
|
@ -23,7 +23,7 @@ License: ASL 2.0 and (ASL 2.0 and BSD)
|
|||
URL: http://developer.android.com/guide/developing/tools/
|
||||
|
||||
# using git archive since upstream hasn't created tarballs.
|
||||
# git archive --format=tar --prefix=%%{packdname}/ %%{git_commit} adb base fastboot libcrypto_utils libcutils liblog libsparse libutils libziparchive mkbootimg include | xz > %%{packdname}.tar.xz
|
||||
# git archive --format=tar --prefix=%%{packdname}/ %%{git_commit} adb base diagnose_usb fastboot libcrypto_utils libcutils liblog libsparse libsystem libutils libziparchive mkbootimg include | xz > %%{packdname}.tar.xz
|
||||
# https://android.googlesource.com/platform/system/core.git
|
||||
# git archive --format=tar --prefix=extras/ %%{extras_git_commit} ext4_utils f2fs_utils | xz > %%{extras_packdname}.tar.xz
|
||||
# https://android.googlesource.com/platform/system/extras.git
|
||||
|
|
@ -45,9 +45,6 @@ Patch1: 0001-Add-string-h.patch
|
|||
Patch2: 0002-libusb-modifications.patch
|
||||
Patch3: 0003-atomic-fix.patch
|
||||
Patch4: 0004-bz1441234.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1470740
|
||||
Patch5: 0001-adb-don-t-reset-usb-when-connecting-it.patch
|
||||
Patch6: 0001-adb-fix-two-device-offline-problems.patch
|
||||
|
||||
Requires(post): systemd
|
||||
Requires(preun): systemd
|
||||
|
|
@ -101,8 +98,6 @@ setup between the host and the target phone as adb.
|
|||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
|
||||
cp -p %{SOURCE5} 51-android.rules
|
||||
|
||||
|
|
@ -139,8 +134,8 @@ install -p -D -m 0644 %{SOURCE6} \
|
|||
|
||||
|
||||
%changelog
|
||||
* Tue Feb 27 2018 Bastien Nocera <bnocera@redhat.com> - 20170311gite7195be7725a-7
|
||||
- Fix USB resets when adb daemon is started (#1470740)
|
||||
* Fri Jun 08 2018 Rob Clark <rclark@redhat.com> - 20180608git158dd05b8aeb-1
|
||||
- Update to latest
|
||||
|
||||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 20170311gite7195be7725a-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||||
|
|
|
|||
|
|
@ -4,6 +4,22 @@
|
|||
# separate parts easily.
|
||||
# This script tries to mimic Android build rules.
|
||||
|
||||
# generate fake build/version.h:
|
||||
puts "mkdir build\n"
|
||||
puts "cat > build/version.h <<EOL\n"
|
||||
puts "#ifndef BUILD_VERSION_H\n"
|
||||
puts "#define BUILD_VERSION_H\n"
|
||||
puts "#include <string>\n"
|
||||
puts "namespace android {\n"
|
||||
puts "namespace build {\n"
|
||||
puts "static inline std::string GetBuildNumber(void) {\n"
|
||||
puts " return \"$PKGVER\";\n"
|
||||
puts "}\n"
|
||||
puts "}\n"
|
||||
puts "}\n"
|
||||
puts "#endif\n"
|
||||
puts "EOL\n"
|
||||
|
||||
def expand(dir, files)
|
||||
files.map{|f| File.join(dir,f)}
|
||||
end
|
||||
|
|
@ -21,7 +37,7 @@ def compile(sources, cflags)
|
|||
lang_flags = '-std=gnu11 $CFLAGS $CPPFLAGS'
|
||||
when '.cpp', '.cc'
|
||||
cc = 'g++'
|
||||
lang_flags = '-std=gnu++14 $CXXFLAGS $CPPFLAGS'
|
||||
lang_flags = '-std=gnu++1z $CXXFLAGS $CPPFLAGS'
|
||||
else
|
||||
raise "Unknown extension #{ext}"
|
||||
end
|
||||
|
|
@ -48,37 +64,39 @@ adbdfiles = %w(
|
|||
socket_spec.cpp
|
||||
adb_listeners.cpp
|
||||
adb_utils.cpp
|
||||
adb_unique_fd.cpp
|
||||
sockets.cpp
|
||||
transport.cpp
|
||||
transport_local.cpp
|
||||
transport_usb.cpp
|
||||
services.cpp
|
||||
adb_trace.cpp
|
||||
diagnose_usb.cpp
|
||||
adb_auth_host.cpp
|
||||
client/auth.cpp
|
||||
../diagnose_usb/diagnose_usb.cpp
|
||||
sysdeps_unix.cpp
|
||||
sysdeps/posix/network.cpp
|
||||
)
|
||||
libadbd = compile(expand('adb', adbdfiles), '-DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -I../boringssl/include -Iadb -Iinclude -Ibase/include -Ilibcrypto_utils/include')
|
||||
libadbd = compile(expand('adb', adbdfiles), '-DADB_REVISION=\"$PKGVER\" -DADB_HOST=1 -fpermissive -I. -Idiagnose_usb/include -I../boringssl/include -Iadb -Iinclude -Ibase/include -Ilibcrypto_utils/include')
|
||||
|
||||
adbshfiles = %w(
|
||||
fdevent.cpp
|
||||
shell_service.cpp
|
||||
daemon/shell_service.cpp
|
||||
shell_service_protocol.cpp
|
||||
)
|
||||
libadbsh = compile(expand('adb', adbshfiles), '-DADB_REVISION=\"$PKGVER\" -DADB_HOST=0 -D_Nonnull= -D_Nullable= -fpermissive -Iadb -Iinclude -Ibase/include')
|
||||
|
||||
adbfiles = %w(
|
||||
console.cpp
|
||||
bugreport.cpp
|
||||
commandline.cpp
|
||||
adb_client.cpp
|
||||
client/console.cpp
|
||||
client/bugreport.cpp
|
||||
client/commandline.cpp
|
||||
client/adb_client.cpp
|
||||
sysdeps/errno.cpp
|
||||
file_sync_client.cpp
|
||||
line_printer.cpp
|
||||
transport_mdns.cpp
|
||||
client/file_sync_client.cpp
|
||||
client/line_printer.cpp
|
||||
client/transport_mdns.cpp
|
||||
client/main.cpp
|
||||
)
|
||||
libadb = compile(expand('adb', adbfiles), '-DADB_REVISION=\"$PKGVER\" -D_GNU_SOURCE -DADB_HOST=1 -D_Nonnull= -D_Nullable= -fpermissive -Iadb -I../mdnsresponder/mDNSShared -Iinclude -Ibase/include')
|
||||
libadb = compile(expand('adb', adbfiles), '-DADB_REVISION=\"$PKGVER\" -D_GNU_SOURCE -DADB_HOST=1 -D_Nonnull= -D_Nullable= -fpermissive -Iadb -I../mdnsresponder/mDNSShared -Iinclude -Ibase/include -Ilibcrypto_utils/include')
|
||||
|
||||
basefiles = %w(
|
||||
file.cpp
|
||||
|
|
@ -87,6 +105,8 @@ basefiles = %w(
|
|||
stringprintf.cpp
|
||||
strings.cpp
|
||||
errors_unix.cpp
|
||||
threads.cpp
|
||||
properties.cpp
|
||||
)
|
||||
libbase = compile(expand('base', basefiles), '-DADB_HOST=1 -D_GNU_SOURCE -Ibase/include -Iinclude')
|
||||
|
||||
|
|
@ -104,16 +124,15 @@ logfiles = %w(
|
|||
fake_log_device.c
|
||||
fake_writer.c
|
||||
)
|
||||
liblog = compile(expand('liblog', logfiles), '-DLIBLOG_LOG_TAG=1005 -DFAKE_LOG_DEVICE=1 -D_GNU_SOURCE -Ilog/include -Iinclude')
|
||||
liblog = compile(expand('liblog', logfiles), '-DLIBLOG_LOG_TAG=1005 -DFAKE_LOG_DEVICE=1 -D_GNU_SOURCE -Ilog/include -Iinclude -Ilibsystem/include')
|
||||
|
||||
cutilsfiles = %w(
|
||||
load_file.c
|
||||
socket_inaddr_any_server_unix.c
|
||||
socket_local_client_unix.c
|
||||
socket_local_server_unix.c
|
||||
socket_loopback_server_unix.c
|
||||
socket_network_client_unix.c
|
||||
threads.c
|
||||
load_file.cpp
|
||||
socket_inaddr_any_server_unix.cpp
|
||||
socket_local_client_unix.cpp
|
||||
socket_local_server_unix.cpp
|
||||
socket_network_client_unix.cpp
|
||||
threads.cpp
|
||||
sockets.cpp
|
||||
android_get_control_file.cpp
|
||||
sockets_unix.cpp
|
||||
|
|
@ -156,8 +175,10 @@ fastbootfiles = %w(
|
|||
util.cpp
|
||||
fs.cpp
|
||||
usb_linux.cpp
|
||||
main.cpp
|
||||
../base/test_utils.cpp
|
||||
)
|
||||
libfastboot = compile(expand('fastboot', fastbootfiles), '-DFASTBOOT_REVISION=\"$PKGVER\" -D_GNU_SOURCE -Iadb -Iinclude -Imkbootimg -Ibase/include -Ilibsparse/include -I../extras/ext4_utils/include -I../extras/f2fs_utils')
|
||||
libfastboot = compile(expand('fastboot', fastbootfiles), '-DFASTBOOT_VERSION=\"$PKGVER\" -D_GNU_SOURCE -Iadb -Iinclude -Imkbootimg/include/bootimg -Ibase/include -Ilibsparse/include -Idiagnose_usb/include -Ilibziparchive/include -I../extras/ext4_utils/include -I../extras/f2fs_utils')
|
||||
|
||||
sparsefiles = %w(
|
||||
backed_block.c
|
||||
|
|
@ -165,14 +186,14 @@ sparsefiles = %w(
|
|||
sparse.c
|
||||
sparse_crc32.c
|
||||
sparse_err.c
|
||||
sparse_read.c
|
||||
sparse_read.cpp
|
||||
)
|
||||
libsparse = compile(expand('libsparse', sparsefiles), '-Ilibsparse/include')
|
||||
libsparse = compile(expand('libsparse', sparsefiles), '-Ilibsparse/include -Ibase/include')
|
||||
|
||||
zipfiles = %w(
|
||||
zip_archive.cc
|
||||
)
|
||||
libzip = compile(expand('libziparchive', zipfiles), '-Ibase/include -Iinclude')
|
||||
libzip = compile(expand('libziparchive', zipfiles), '-Ibase/include -Iinclude -Ilibziparchive/include')
|
||||
|
||||
utilfiles = %w(
|
||||
FileMap.cpp
|
||||
|
|
@ -194,16 +215,16 @@ ext4files = %w(
|
|||
)
|
||||
libext4 = compile(expand('../extras/ext4_utils', ext4files), '-Ilibsparse/include -Iinclude -I../extras/ext4_utils/include')
|
||||
|
||||
link('fastboot/fastboot', libsparse + libzip + liblog + libutil + libcutils + boringcrypto + libcryptoutils + libbase + libext4 + libfastboot + libadbsh + libadbd, '-lpthread -lselinux -lz -lcrypto -lutil -lusb-1.0')
|
||||
link('fastboot/fastboot', libsparse + libzip + liblog + libutil + libcutils + boringcrypto + libcryptoutils + libext4 + libfastboot + libadbsh + libadbd + mdns + libbase, '-lpthread -lselinux -lz -lcrypto -lutil -lusb-1.0')
|
||||
|
||||
simg2imgfiles = %w(
|
||||
simg2img.c
|
||||
)
|
||||
libsimg2img = compile(expand('libsparse', simg2imgfiles), '-Iinclude -Ilibsparse/include')
|
||||
link('libsparse/simg2img', libsparse + libsimg2img, '-lz')
|
||||
link('libsparse/simg2img', libsparse + libsimg2img + libbase, '-lz')
|
||||
|
||||
img2simgfiles = %w(
|
||||
img2simg.c
|
||||
)
|
||||
libimg2simg = compile(expand('libsparse', img2simgfiles), '-Iinclude -Ilibsparse/include')
|
||||
link('libsparse/img2simg', libsparse + libimg2simg, '-lz')
|
||||
link('libsparse/img2simg', libsparse + libimg2simg + libbase, '-lz')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue