mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
community/android-tools to 29.0.1-1
This commit is contained in:
parent
5d2e4fdabf
commit
21a6c42644
5 changed files with 184 additions and 122 deletions
|
@ -8,8 +8,9 @@
|
||||||
buildarch=28
|
buildarch=28
|
||||||
|
|
||||||
pkgname=android-tools
|
pkgname=android-tools
|
||||||
pkgver=9.0.0_r45
|
pkgver=29.0.1
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
|
tag=platform-tools-$pkgver
|
||||||
pkgdesc='Android platform tools'
|
pkgdesc='Android platform tools'
|
||||||
arch=(x86_64)
|
arch=(x86_64)
|
||||||
url='http://tools.android.com/'
|
url='http://tools.android.com/'
|
||||||
|
@ -19,13 +20,13 @@ optdepends=('python: for mkbootimg script')
|
||||||
makedepends=(git clang gtest ruby cmake ninja go-pie)
|
makedepends=(git clang gtest ruby cmake ninja go-pie)
|
||||||
provides=(fastboot adb)
|
provides=(fastboot adb)
|
||||||
conflicts=(fastboot adb)
|
conflicts=(fastboot adb)
|
||||||
_boringssl_commit=`curl https://android.googlesource.com/platform/external/boringssl/+/refs/tags/android-$pkgver/BORINGSSL_REVISION?format=TEXT | base64 -d`
|
_boringssl_commit=`curl https://android.googlesource.com/platform/external/boringssl/+/refs/tags/$tag/BORINGSSL_REVISION?format=TEXT | base64 -d`
|
||||||
source=(git+https://android.googlesource.com/platform/system/core#tag=android-$pkgver
|
source=(git+https://android.googlesource.com/platform/system/core#tag=$tag
|
||||||
git+https://android.googlesource.com/platform/system/extras#tag=android-$pkgver
|
git+https://android.googlesource.com/platform/system/extras#tag=$tag
|
||||||
git+https://android.googlesource.com/platform/external/selinux#tag=android-$pkgver
|
git+https://android.googlesource.com/platform/external/selinux#tag=$tag
|
||||||
git+https://android.googlesource.com/platform/external/f2fs-tools#tag=android-$pkgver
|
git+https://android.googlesource.com/platform/external/f2fs-tools#tag=$tag
|
||||||
git+https://android.googlesource.com/platform/external/e2fsprogs#tag=android-$pkgver
|
git+https://android.googlesource.com/platform/external/e2fsprogs#tag=$tag
|
||||||
git+https://android.googlesource.com/platform/external/avb#tag=android-$pkgver
|
git+https://android.googlesource.com/platform/external/avb#tag=$tag
|
||||||
git+https://boringssl.googlesource.com/boringssl#commit=$_boringssl_commit
|
git+https://boringssl.googlesource.com/boringssl#commit=$_boringssl_commit
|
||||||
generate_build.rb
|
generate_build.rb
|
||||||
fix_build_core.patch
|
fix_build_core.patch
|
||||||
|
@ -40,16 +41,14 @@ sha1sums=('SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'238507086a99134820cc9900545cbff06772dc30'
|
'8510f5031c386c855f9be15cd8055237db290a33'
|
||||||
'62446582a96b3a39e5d91e3e2ef8b8b38a5a735e'
|
'16cf92e7ddbec79a672152a07837474ad8ad6356'
|
||||||
'ec473160d7445f97bccabd1c32ac0ae2f77900c1'
|
'b2ccf6dac3577d230f910e668ae70af6051fee46'
|
||||||
'5df8c7e00a4066733d59050e8e1fcd4cc2b22104'
|
'bcebdf1e706a3c3da175234840c6ee4e13652012'
|
||||||
'7004dbd0c193668827174880de6f8434de8ceaee')
|
'7004dbd0c193668827174880de6f8434de8ceaee')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
# for the Android version calculation see FS#63200
|
PLATFORM_TOOLS_VERSION="$pkgver" LDFLAGS='-Wl,-z,relro,-z,now' ./generate_build.rb > build.ninja
|
||||||
android_sdk_ver=`curl https://android.googlesource.com/platform/development/+/refs/tags/android-$pkgver/sdk/plat_tools_source.prop_template?format=TEXT | base64 -d | sed -n 's/^Pkg.Revision=\(.*\)$/\1/p'`
|
|
||||||
PKGVER="$android_sdk_ver-$pkgver" LDFLAGS='-Wl,-z,relro,-z,now' ./generate_build.rb > build.ninja
|
|
||||||
|
|
||||||
cd $srcdir/core
|
cd $srcdir/core
|
||||||
patch -p1 < ../fix_build_core.patch
|
patch -p1 < ../fix_build_core.patch
|
||||||
|
@ -73,6 +72,8 @@ build() {
|
||||||
|
|
||||||
package(){
|
package(){
|
||||||
install -m755 -d "$pkgdir"/usr/bin
|
install -m755 -d "$pkgdir"/usr/bin
|
||||||
install -m755 -t "$pkgdir"/usr/bin fastboot adb mke2fs.android e2fsdroid ext2simg core/mkbootimg/mkbootimg avb/avbtool
|
install -m755 -t "$pkgdir"/usr/bin fastboot adb mke2fs.android e2fsdroid ext2simg avb/avbtool
|
||||||
|
install -Dm 755 core/mkbootimg/mkbootimg.py "$pkgdir"/usr/bin/mkbootimg
|
||||||
|
install -Dm 755 core/mkbootimg/unpack_bootimg.py "$pkgdir"/usr/bin/unpack_bootimg
|
||||||
install -Dm 644 bash_completion.fastboot "$pkgdir"/usr/share/bash-completion/completions/fastboot
|
install -Dm 644 bash_completion.fastboot "$pkgdir"/usr/share/bash-completion/completions/fastboot
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,46 @@
|
||||||
|
diff --git a/adb/adb.cpp b/adb/adb.cpp
|
||||||
|
index 24d4292d02..e4ad76b7c3 100644
|
||||||
|
--- a/adb/adb.cpp
|
||||||
|
+++ b/adb/adb.cpp
|
||||||
|
@@ -44,8 +44,6 @@
|
||||||
|
#include <android-base/parsenetaddress.h>
|
||||||
|
#include <android-base/stringprintf.h>
|
||||||
|
#include <android-base/strings.h>
|
||||||
|
-#include <build/version.h>
|
||||||
|
-#include <platform_tools_version.h>
|
||||||
|
|
||||||
|
#include "adb_auth.h"
|
||||||
|
#include "adb_io.h"
|
||||||
|
@@ -66,10 +64,10 @@ std::string adb_version() {
|
||||||
|
// Don't change the format of this --- it's parsed by ddmlib.
|
||||||
|
return android::base::StringPrintf(
|
||||||
|
"Android Debug Bridge version %d.%d.%d\n"
|
||||||
|
- "Version %s-%s\n"
|
||||||
|
+ "Version %s-ArchLinux\n"
|
||||||
|
"Installed as %s\n",
|
||||||
|
ADB_VERSION_MAJOR, ADB_VERSION_MINOR, ADB_SERVER_VERSION,
|
||||||
|
- PLATFORM_TOOLS_VERSION, android::build::GetBuildNumber().c_str(),
|
||||||
|
+ PLATFORM_TOOLS_VERSION,
|
||||||
|
android::base::GetExecutablePath().c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
diff --git a/adb/client/main.cpp b/adb/client/main.cpp
|
||||||
|
index 0c5c28f1b3..b6a1281521 100644
|
||||||
|
--- a/adb/client/main.cpp
|
||||||
|
+++ b/adb/client/main.cpp
|
||||||
|
@@ -118,10 +118,6 @@ int adb_server_main(int is_daemon, const std::string& socket_spec, int ack_reply
|
||||||
|
init_transport_registration();
|
||||||
|
init_reconnect_handler();
|
||||||
|
|
||||||
|
- if (!getenv("ADB_MDNS") || strcmp(getenv("ADB_MDNS"), "0") != 0) {
|
||||||
|
- init_mdns_transport_discovery();
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
if (!getenv("ADB_USB") || strcmp(getenv("ADB_USB"), "0") != 0) {
|
||||||
|
usb_init();
|
||||||
|
} else {
|
||||||
diff --git a/adb/client/usb_libusb.cpp b/adb/client/usb_libusb.cpp
|
diff --git a/adb/client/usb_libusb.cpp b/adb/client/usb_libusb.cpp
|
||||||
index 46c3f58ec5..a0c36f0151 100644
|
index 53f01a0ce5..5be0d91085 100644
|
||||||
--- a/adb/client/usb_libusb.cpp
|
--- a/adb/client/usb_libusb.cpp
|
||||||
+++ b/adb/client/usb_libusb.cpp
|
+++ b/adb/client/usb_libusb.cpp
|
||||||
@@ -22,6 +22,7 @@
|
@@ -22,6 +22,7 @@
|
||||||
|
@ -20,7 +61,7 @@ index 46c3f58ec5..a0c36f0151 100644
|
||||||
#include <android-base/file.h>
|
#include <android-base/file.h>
|
||||||
#include <android-base/logging.h>
|
#include <android-base/logging.h>
|
||||||
diff --git a/adb/client/usb_linux.cpp b/adb/client/usb_linux.cpp
|
diff --git a/adb/client/usb_linux.cpp b/adb/client/usb_linux.cpp
|
||||||
index 1f376a4c93..f1d6779159 100644
|
index 81b8306436..b4f09caab8 100644
|
||||||
--- a/adb/client/usb_linux.cpp
|
--- a/adb/client/usb_linux.cpp
|
||||||
+++ b/adb/client/usb_linux.cpp
|
+++ b/adb/client/usb_linux.cpp
|
||||||
@@ -29,6 +29,7 @@
|
@@ -29,6 +29,7 @@
|
||||||
|
@ -29,19 +70,31 @@ index 1f376a4c93..f1d6779159 100644
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
+#include <sys/sysmacros.h>
|
+#include <sys/sysmacros.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
#include <sys/sysmacros.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
|
||||||
diff --git a/adb/sysdeps/posix/network.cpp b/adb/sysdeps/posix/network.cpp
|
diff --git a/adb/sysdeps/posix/network.cpp b/adb/sysdeps/posix/network.cpp
|
||||||
index ecd1fd24ec..86166c0e2c 100644
|
index c5c227568f..99686f15fb 100644
|
||||||
--- a/adb/sysdeps/posix/network.cpp
|
--- a/adb/sysdeps/posix/network.cpp
|
||||||
+++ b/adb/sysdeps/posix/network.cpp
|
+++ b/adb/sysdeps/posix/network.cpp
|
||||||
@@ -21,6 +21,7 @@
|
@@ -22,6 +22,7 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
+#include <string.h>
|
+#include <string.h>
|
||||||
|
|
||||||
#include "adb_unique_fd.h"
|
#include <android-base/logging.h>
|
||||||
|
#include <android-base/stringprintf.h>
|
||||||
|
diff --git a/adb/types.h b/adb/types.h
|
||||||
|
index cd1366dfbe..1eb7e4b6d7 100644
|
||||||
|
--- a/adb/types.h
|
||||||
|
+++ b/adb/types.h
|
||||||
|
@@ -22,6 +22,7 @@
|
||||||
|
#include <type_traits>
|
||||||
|
#include <utility>
|
||||||
|
#include <vector>
|
||||||
|
+#include <cstring>
|
||||||
|
|
||||||
|
#include <android-base/logging.h>
|
||||||
|
|
||||||
diff --git a/base/errors_unix.cpp b/base/errors_unix.cpp
|
diff --git a/base/errors_unix.cpp b/base/errors_unix.cpp
|
||||||
index 296995efe2..48269b6750 100644
|
index 296995efe2..48269b6750 100644
|
||||||
|
@ -56,10 +109,10 @@ index 296995efe2..48269b6750 100644
|
||||||
namespace android {
|
namespace android {
|
||||||
namespace base {
|
namespace base {
|
||||||
diff --git a/base/file.cpp b/base/file.cpp
|
diff --git a/base/file.cpp b/base/file.cpp
|
||||||
index 2f697a1cc1..81aef5758c 100644
|
index 3dfcfbb7ec..1b5c0203f0 100644
|
||||||
--- a/base/file.cpp
|
--- a/base/file.cpp
|
||||||
+++ b/base/file.cpp
|
+++ b/base/file.cpp
|
||||||
@@ -22,6 +22,7 @@
|
@@ -26,6 +26,7 @@
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
@ -68,19 +121,42 @@ index 2f697a1cc1..81aef5758c 100644
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
diff --git a/base/logging.cpp b/base/logging.cpp
|
diff --git a/base/logging.cpp b/base/logging.cpp
|
||||||
index a31feefab2..d746cc4d78 100644
|
index f89168c0fc..da522019dc 100644
|
||||||
--- a/base/logging.cpp
|
--- a/base/logging.cpp
|
||||||
+++ b/base/logging.cpp
|
+++ b/base/logging.cpp
|
||||||
@@ -23,6 +23,7 @@
|
@@ -24,6 +24,7 @@
|
||||||
#include <fcntl.h>
|
#include <inttypes.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
+#include <string.h>
|
+#include <string.h>
|
||||||
|
|
||||||
// For getprogname(3) or program_invocation_short_name.
|
// For getprogname(3) or program_invocation_short_name.
|
||||||
#if defined(__ANDROID__) || defined(__APPLE__)
|
#if defined(__ANDROID__) || defined(__APPLE__)
|
||||||
|
diff --git a/fastboot/fastboot.cpp b/fastboot/fastboot.cpp
|
||||||
|
index 39abc4a3b1..4bea3bc84b 100644
|
||||||
|
--- a/fastboot/fastboot.cpp
|
||||||
|
+++ b/fastboot/fastboot.cpp
|
||||||
|
@@ -58,9 +58,7 @@
|
||||||
|
#include <android-base/stringprintf.h>
|
||||||
|
#include <android-base/strings.h>
|
||||||
|
#include <android-base/unique_fd.h>
|
||||||
|
-#include <build/version.h>
|
||||||
|
#include <liblp/liblp.h>
|
||||||
|
-#include <platform_tools_version.h>
|
||||||
|
#include <sparse/sparse.h>
|
||||||
|
#include <ziparchive/zip_archive.h>
|
||||||
|
|
||||||
|
@@ -1678,7 +1676,7 @@ int FastBootTool::Main(int argc, char* argv[]) {
|
||||||
|
setvbuf(stdout, nullptr, _IONBF, 0);
|
||||||
|
setvbuf(stderr, nullptr, _IONBF, 0);
|
||||||
|
} else if (name == "version") {
|
||||||
|
- fprintf(stdout, "fastboot version %s-%s\n", PLATFORM_TOOLS_VERSION, android::build::GetBuildNumber().c_str());
|
||||||
|
+ fprintf(stdout, "fastboot version %s-ArchLinux\n", PLATFORM_TOOLS_VERSION);
|
||||||
|
fprintf(stdout, "Installed as %s\n", android::base::GetExecutablePath().c_str());
|
||||||
|
return 0;
|
||||||
|
#if !defined(_WIN32)
|
||||||
diff --git a/fastboot/fs.cpp b/fastboot/fs.cpp
|
diff --git a/fastboot/fs.cpp b/fastboot/fs.cpp
|
||||||
index c30ca1e4b3..fdc042ff36 100644
|
index 8c0aa6bf4e..3ad5b53568 100644
|
||||||
--- a/fastboot/fs.cpp
|
--- a/fastboot/fs.cpp
|
||||||
+++ b/fastboot/fs.cpp
|
+++ b/fastboot/fs.cpp
|
||||||
@@ -117,7 +117,7 @@ static int generate_ext4_image(const char* fileName, long long partSize,
|
@@ -117,7 +117,7 @@ static int generate_ext4_image(const char* fileName, long long partSize,
|
||||||
|
@ -92,23 +168,35 @@ index c30ca1e4b3..fdc042ff36 100644
|
||||||
std::vector<const char*> mke2fs_args = {mke2fs_path.c_str(), "-t", "ext4", "-b"};
|
std::vector<const char*> mke2fs_args = {mke2fs_path.c_str(), "-t", "ext4", "-b"};
|
||||||
|
|
||||||
std::string block_size_str = std::to_string(block_size);
|
std::string block_size_str = std::to_string(block_size);
|
||||||
diff --git a/libsparse/sparse_read.cpp b/libsparse/sparse_read.cpp
|
diff --git a/fs_mgr/liblp/reader.cpp b/fs_mgr/liblp/reader.cpp
|
||||||
index 4379635270..ccb565bb63 100644
|
index dcee6d2d86..6fcd613ab6 100644
|
||||||
--- a/libsparse/sparse_read.cpp
|
--- a/fs_mgr/liblp/reader.cpp
|
||||||
+++ b/libsparse/sparse_read.cpp
|
+++ b/fs_mgr/liblp/reader.cpp
|
||||||
@@ -26,6 +26,7 @@
|
@@ -19,6 +19,7 @@
|
||||||
|
#include <stddef.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <unistd.h>
|
||||||
#include <string>
|
+#include <cstring>
|
||||||
+#include <string.h>
|
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
|
diff --git a/fs_mgr/liblp/writer.cpp b/fs_mgr/liblp/writer.cpp
|
||||||
|
index bffcb7e6e1..6b36a641a6 100644
|
||||||
|
--- a/fs_mgr/liblp/writer.cpp
|
||||||
|
+++ b/fs_mgr/liblp/writer.cpp
|
||||||
|
@@ -20,6 +20,7 @@
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <sparse/sparse.h>
|
#include <string>
|
||||||
|
+#include <cstring>
|
||||||
|
|
||||||
|
#include <android-base/file.h>
|
||||||
|
#include <android-base/unique_fd.h>
|
||||||
diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc
|
diff --git a/libziparchive/zip_archive.cc b/libziparchive/zip_archive.cc
|
||||||
index 5e5e7afd18..ebbc819a7a 100644
|
index f4b6c74f8c..6b3610cfe3 100644
|
||||||
--- a/libziparchive/zip_archive.cc
|
--- a/libziparchive/zip_archive.cc
|
||||||
+++ b/libziparchive/zip_archive.cc
|
+++ b/libziparchive/zip_archive.cc
|
||||||
@@ -29,6 +29,7 @@
|
@@ -30,6 +30,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
diff --git a/contrib/android/perms.c b/contrib/android/perms.c
|
diff --git a/contrib/android/perms.c b/contrib/android/perms.c
|
||||||
index d83ad35a..dca5b620 100644
|
index 9c5ec05b..865cc907 100644
|
||||||
--- a/contrib/android/perms.c
|
--- a/contrib/android/perms.c
|
||||||
+++ b/contrib/android/perms.c
|
+++ b/contrib/android/perms.c
|
||||||
@@ -5,6 +5,7 @@
|
@@ -5,6 +5,7 @@
|
||||||
|
@ -29,10 +29,10 @@ index 505b3c9c..7be5105f 100644
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define _INLINE_ extern __inline__
|
#define _INLINE_ extern __inline__
|
||||||
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
|
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
|
||||||
index 470e7d7a..95a41e0d 100644
|
index 185be5df..833d9d87 100644
|
||||||
--- a/lib/ext2fs/ext2fs.h
|
--- a/lib/ext2fs/ext2fs.h
|
||||||
+++ b/lib/ext2fs/ext2fs.h
|
+++ b/lib/ext2fs/ext2fs.h
|
||||||
@@ -1743,7 +1743,7 @@ extern const struct ext2_inode *ext2fs_const_inode(const struct ext2_inode_large
|
@@ -1767,7 +1767,7 @@ extern const struct ext2_inode *ext2fs_const_inode(const struct ext2_inode_large
|
||||||
#define _INLINE_ extern
|
#define _INLINE_ extern
|
||||||
#else
|
#else
|
||||||
#if (__STDC_VERSION__ >= 199901L)
|
#if (__STDC_VERSION__ >= 199901L)
|
||||||
|
@ -41,43 +41,3 @@ index 470e7d7a..95a41e0d 100644
|
||||||
#else
|
#else
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define _INLINE_ extern __inline__
|
#define _INLINE_ extern __inline__
|
||||||
diff --git a/misc/create_inode.c b/misc/create_inode.c
|
|
||||||
index 1373b46b..e6f34bd9 100644
|
|
||||||
--- a/misc/create_inode.c
|
|
||||||
+++ b/misc/create_inode.c
|
|
||||||
@@ -403,7 +403,7 @@ static ssize_t my_pread(int fd, void *buf, size_t count, off_t offset)
|
|
||||||
}
|
|
||||||
#endif /* !defined HAVE_PREAD64 && !defined HAVE_PREAD */
|
|
||||||
|
|
||||||
-static errcode_t copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
|
|
||||||
+static errcode_t e2_copy_file_range(ext2_filsys fs, int fd, ext2_file_t e2_file,
|
|
||||||
off_t start, off_t end, char *buf,
|
|
||||||
char *zerobuf)
|
|
||||||
{
|
|
||||||
@@ -477,7 +477,7 @@ static errcode_t try_lseek_copy(ext2_filsys fs, int fd, struct stat *statbuf,
|
|
||||||
|
|
||||||
data_blk = data & ~(fs->blocksize - 1);
|
|
||||||
hole_blk = (hole + (fs->blocksize - 1)) & ~(fs->blocksize - 1);
|
|
||||||
- err = copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf,
|
|
||||||
+ err = e2_copy_file_range(fs, fd, e2_file, data_blk, hole_blk, buf,
|
|
||||||
zerobuf);
|
|
||||||
if (err)
|
|
||||||
return err;
|
|
||||||
@@ -527,7 +527,7 @@ static errcode_t try_fiemap_copy(ext2_filsys fs, int fd, ext2_file_t e2_file,
|
|
||||||
}
|
|
||||||
for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents;
|
|
||||||
i++, ext++) {
|
|
||||||
- err = copy_file_range(fs, fd, e2_file, ext->fe_logical,
|
|
||||||
+ err = e2_copy_file_range(fs, fd, e2_file, ext->fe_logical,
|
|
||||||
ext->fe_logical + ext->fe_length,
|
|
||||||
buf, zerobuf);
|
|
||||||
if (err)
|
|
||||||
@@ -580,7 +580,7 @@ static errcode_t copy_file(ext2_filsys fs, int fd, struct stat *statbuf,
|
|
||||||
goto out;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
- err = copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf,
|
|
||||||
+ err = e2_copy_file_range(fs, fd, e2_file, 0, statbuf->st_size, buf,
|
|
||||||
zerobuf);
|
|
||||||
out:
|
|
||||||
ext2fs_free_mem(&zerobuf);
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ index b884c23b..447fa64b 100644
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
#define __BYTE_ORDER BYTE_ORDER
|
#define __BYTE_ORDER BYTE_ORDER
|
||||||
diff --git a/libsepol/src/util.c b/libsepol/src/util.c
|
diff --git a/libsepol/src/util.c b/libsepol/src/util.c
|
||||||
index b00251c6..68e7c6a0 100644
|
index a4008882..d79a8335 100644
|
||||||
--- a/libsepol/src/util.c
|
--- a/libsepol/src/util.c
|
||||||
+++ b/libsepol/src/util.c
|
+++ b/libsepol/src/util.c
|
||||||
@@ -27,7 +27,7 @@
|
@@ -27,7 +27,7 @@
|
||||||
|
|
|
@ -21,7 +21,7 @@ def compile(sources, cflags)
|
||||||
lang_flags = "-std=gnu11 $CFLAGS $CPPFLAGS"
|
lang_flags = "-std=gnu11 $CFLAGS $CPPFLAGS"
|
||||||
when ".cpp", ".cc"
|
when ".cpp", ".cc"
|
||||||
cc = "cxx"
|
cc = "cxx"
|
||||||
lang_flags = "-std=gnu++17 $CXXFLAGS $CPPFLAGS"
|
lang_flags = "-std=gnu++2a $CXXFLAGS $CPPFLAGS"
|
||||||
else
|
else
|
||||||
raise "Unknown extension #{ext}"
|
raise "Unknown extension #{ext}"
|
||||||
end
|
end
|
||||||
|
@ -52,7 +52,7 @@ puts "CXX = #{ENV["CXX"] || "clang++"}\n\n"
|
||||||
puts "CFLAGS = #{ENV["CFLAGS"]}"
|
puts "CFLAGS = #{ENV["CFLAGS"]}"
|
||||||
puts "CXXFLAGS = #{ENV["CXXFLAGS"]}"
|
puts "CXXFLAGS = #{ENV["CXXFLAGS"]}"
|
||||||
puts "LDFLAGS = #{ENV["LDFLAGS"]}"
|
puts "LDFLAGS = #{ENV["LDFLAGS"]}"
|
||||||
puts "PKGVER = #{ENV["PKGVER"]}\n\n"
|
puts "PLATFORM_TOOLS_VERSION = #{ENV["PLATFORM_TOOLS_VERSION"]}\n\n"
|
||||||
|
|
||||||
puts "" "
|
puts "" "
|
||||||
rule cc
|
rule cc
|
||||||
|
@ -73,60 +73,62 @@ adbdfiles = %w(
|
||||||
adb_listeners.cpp
|
adb_listeners.cpp
|
||||||
adb_trace.cpp
|
adb_trace.cpp
|
||||||
adb_utils.cpp
|
adb_utils.cpp
|
||||||
bugreport.cpp
|
|
||||||
line_printer.cpp
|
|
||||||
sockets.cpp
|
sockets.cpp
|
||||||
transport.cpp
|
transport.cpp
|
||||||
transport_local.cpp
|
transport_local.cpp
|
||||||
transport_usb.cpp
|
transport_usb.cpp
|
||||||
transport_mdns_unsupported.cpp
|
|
||||||
fdevent.cpp
|
fdevent.cpp
|
||||||
adb_auth_host.cpp
|
|
||||||
shell_service_protocol.cpp
|
shell_service_protocol.cpp
|
||||||
)
|
)
|
||||||
libadbd = compile(expand("core/adb", adbdfiles), '-DADB_VERSION="\"$PKGVER\"" -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/include')
|
libadbd = compile(expand("core/adb", adbdfiles), '-DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" -DADB_HOST=1 -Icore/include -Icore/base/include -Icore/adb -Icore/libcrypto_utils/include -Iboringssl/include -Icore/diagnose_usb/include')
|
||||||
|
|
||||||
adbfiles = %w(
|
adbfiles = %w(
|
||||||
console.cpp
|
|
||||||
socket_spec.cpp
|
socket_spec.cpp
|
||||||
commandline.cpp
|
|
||||||
adb_client.cpp
|
|
||||||
services.cpp
|
services.cpp
|
||||||
file_sync_client.cpp
|
|
||||||
sysdeps_unix.cpp
|
sysdeps_unix.cpp
|
||||||
sysdeps/errno.cpp
|
sysdeps/errno.cpp
|
||||||
client/main.cpp
|
client/main.cpp
|
||||||
|
client/adb_client.cpp
|
||||||
|
client/auth.cpp
|
||||||
|
client/commandline.cpp
|
||||||
client/usb_dispatch.cpp
|
client/usb_dispatch.cpp
|
||||||
client/usb_linux.cpp
|
client/usb_linux.cpp
|
||||||
client/usb_libusb.cpp
|
client/usb_libusb.cpp
|
||||||
|
client/bugreport.cpp
|
||||||
|
client/file_sync_client.cpp
|
||||||
|
client/line_printer.cpp
|
||||||
|
client/adb_install.cpp
|
||||||
|
client/console.cpp
|
||||||
sysdeps/posix/network.cpp
|
sysdeps/posix/network.cpp
|
||||||
)
|
)
|
||||||
libadb = compile(expand("core/adb", adbfiles), "-D_GNU_SOURCE -DADB_HOST=1 -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 -Icore/libcrypto_utils/include -Iboringssl/include")
|
||||||
|
|
||||||
basefiles = %w(
|
basefiles = %w(
|
||||||
file.cpp
|
file.cpp
|
||||||
logging.cpp
|
logging.cpp
|
||||||
|
threads.cpp
|
||||||
|
mapped_file.cpp
|
||||||
parsenetaddress.cpp
|
parsenetaddress.cpp
|
||||||
stringprintf.cpp
|
stringprintf.cpp
|
||||||
strings.cpp
|
strings.cpp
|
||||||
errors_unix.cpp
|
errors_unix.cpp
|
||||||
test_utils.cpp
|
test_utils.cpp
|
||||||
|
chrono_utils.cpp
|
||||||
)
|
)
|
||||||
libbase = compile(expand("core/base", basefiles), "-DADB_HOST=1 -Icore/base/include -Icore/include")
|
libbase = compile(expand("core/base", basefiles), "-DADB_HOST=1 -Icore/base/include -Icore/include")
|
||||||
|
|
||||||
logfiles = %w(
|
logfiles = %w(
|
||||||
log_event_write.c
|
log_event_write.cpp
|
||||||
fake_log_device.c
|
fake_log_device.cpp
|
||||||
log_event_list.c
|
log_event_list.cpp
|
||||||
logger_write.c
|
logger_write.cpp
|
||||||
config_write.c
|
config_write.cpp
|
||||||
config_read.c
|
config_read.cpp
|
||||||
logger_lock.c
|
logger_lock.cpp
|
||||||
local_logger.c
|
fake_writer.cpp
|
||||||
fake_writer.c
|
logger_name.cpp
|
||||||
logger_name.c
|
stderr_write.cpp
|
||||||
stderr_write.c
|
logprint.cpp
|
||||||
logprint.c
|
|
||||||
)
|
)
|
||||||
liblog = compile(expand("core/liblog", logfiles), "-DLIBLOG_LOG_TAG=1006 -D_XOPEN_SOURCE=700 -DFAKE_LOG_DEVICE=1 -Icore/log/include -Icore/include")
|
liblog = compile(expand("core/liblog", logfiles), "-DLIBLOG_LOG_TAG=1006 -D_XOPEN_SOURCE=700 -DFAKE_LOG_DEVICE=1 -Icore/log/include -Icore/include")
|
||||||
|
|
||||||
|
@ -143,12 +145,12 @@ cutilsfiles = %w(
|
||||||
fs_config.cpp
|
fs_config.cpp
|
||||||
canned_fs_config.cpp
|
canned_fs_config.cpp
|
||||||
)
|
)
|
||||||
libcutils = compile(expand("core/libcutils", cutilsfiles), "-D_GNU_SOURCE -Icore/libcutils/include -Icore/include")
|
libcutils = compile(expand("core/libcutils", cutilsfiles), "-D_GNU_SOURCE -Icore/libcutils/include -Icore/include -Icore/base/include")
|
||||||
|
|
||||||
diagnoseusbfiles = %w(
|
diagnoseusbfiles = %w(
|
||||||
diagnose_usb.cpp
|
diagnose_usb.cpp
|
||||||
)
|
)
|
||||||
libdiagnoseusb = compile(expand("core/adb", diagnoseusbfiles), "-Icore/include -Icore/base/include")
|
libdiagnoseusb = compile(expand("core/diagnose_usb", diagnoseusbfiles), "-Icore/include -Icore/base/include -Icore/diagnose_usb/include")
|
||||||
|
|
||||||
libcryptofiles = %w(
|
libcryptofiles = %w(
|
||||||
android_pubkey.c
|
android_pubkey.c
|
||||||
|
@ -162,8 +164,6 @@ boringssl = ["boringssl/build/crypto/libcrypto.a"]
|
||||||
link("adb", libbase + liblog + libcutils + libadbd + libadb + libdiagnoseusb + libcrypto + boringssl, "-lpthread -lusb-1.0")
|
link("adb", libbase + liblog + libcutils + libadbd + libadb + libdiagnoseusb + libcrypto + boringssl, "-lpthread -lusb-1.0")
|
||||||
|
|
||||||
fastbootfiles = %w(
|
fastbootfiles = %w(
|
||||||
protocol.cpp
|
|
||||||
engine.cpp
|
|
||||||
bootimg_utils.cpp
|
bootimg_utils.cpp
|
||||||
fastboot.cpp
|
fastboot.cpp
|
||||||
util.cpp
|
util.cpp
|
||||||
|
@ -172,15 +172,26 @@ fastbootfiles = %w(
|
||||||
socket.cpp
|
socket.cpp
|
||||||
tcp.cpp
|
tcp.cpp
|
||||||
udp.cpp
|
udp.cpp
|
||||||
|
main.cpp
|
||||||
|
fastboot_driver.cpp
|
||||||
)
|
)
|
||||||
libfastboot = compile(expand("core/fastboot", fastbootfiles), '-DFASTBOOT_VERSION="\"$PKGVER\"" -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -DUSE_F2FS -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils -Icore/libziparchive/include -Icore/mkbootimg/include/bootimg')
|
libfastboot = compile(expand("core/fastboot", fastbootfiles), '-DPLATFORM_TOOLS_VERSION="\"$PLATFORM_TOOLS_VERSION\"" -D_GNU_SOURCE -D_XOPEN_SOURCE=700 -DUSE_F2FS -Icore/base/include -Icore/include -Icore/adb -Icore/libsparse/include -Icore/mkbootimg -Iextras/ext4_utils/include -Iextras/f2fs_utils -Icore/libziparchive/include -Icore/mkbootimg/include/bootimg -Icore/fs_mgr/liblp/include -Icore/diagnose_usb/include')
|
||||||
|
|
||||||
|
fsmgrfiles = %w(
|
||||||
|
liblp/reader.cpp
|
||||||
|
liblp/writer.cpp
|
||||||
|
liblp/utility.cpp
|
||||||
|
liblp/partition_opener.cpp
|
||||||
|
liblp/images.cpp
|
||||||
|
)
|
||||||
|
libfsmgr = compile(expand("core/fs_mgr", fsmgrfiles), '-Icore/fs_mgr/liblp/include -Icore/base/include -Iextras/ext4_utils/include -Icore/libsparse/include')
|
||||||
|
|
||||||
sparsefiles = %w(
|
sparsefiles = %w(
|
||||||
backed_block.c
|
backed_block.cpp
|
||||||
output_file.c
|
output_file.cpp
|
||||||
sparse.c
|
sparse.cpp
|
||||||
sparse_crc32.c
|
sparse_crc32.cpp
|
||||||
sparse_err.c
|
sparse_err.cpp
|
||||||
sparse_read.cpp
|
sparse_read.cpp
|
||||||
)
|
)
|
||||||
libsparse = compile(expand("core/libsparse", sparsefiles), "-Icore/libsparse/include -Icore/base/include")
|
libsparse = compile(expand("core/libsparse", sparsefiles), "-Icore/libsparse/include -Icore/base/include")
|
||||||
|
@ -200,11 +211,11 @@ utilfiles = %w(
|
||||||
libutil = compile(expand("core/libutils", utilfiles), "-Icore/include")
|
libutil = compile(expand("core/libutils", utilfiles), "-Icore/include")
|
||||||
|
|
||||||
ext4files = %w(
|
ext4files = %w(
|
||||||
ext4_utils.c
|
ext4_utils.cpp
|
||||||
wipe.c
|
wipe.cpp
|
||||||
ext4_sb.c
|
ext4_sb.cpp
|
||||||
)
|
)
|
||||||
libext4 = compile(expand("extras/ext4_utils", ext4files), "-D_GNU_SOURCE -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include")
|
libext4 = compile(expand("extras/ext4_utils", ext4files), "-D_GNU_SOURCE -Icore/libsparse/include -Icore/include -Iselinux/libselinux/include -Iextras/ext4_utils/include -Icore/base/include")
|
||||||
|
|
||||||
selinuxfiles = %w(
|
selinuxfiles = %w(
|
||||||
callbacks.c
|
callbacks.c
|
||||||
|
@ -258,10 +269,11 @@ libsepolfiles = %w(
|
||||||
constraint.c
|
constraint.c
|
||||||
expand.c
|
expand.c
|
||||||
hierarchy.c
|
hierarchy.c
|
||||||
|
kernel_to_common.c
|
||||||
)
|
)
|
||||||
libsepol = compile(expand("selinux/libsepol/src", libsepolfiles), "-Iselinux/libsepol/include")
|
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")
|
link("fastboot", libfsmgr + libsparse + libzip + libcutils + liblog + libutil + libbase + libext4 + f2fs + libselinux + libsepol + libfastboot + libdiagnoseusb + boringssl, "-lz -lpcre2-8 -lpthread -ldl")
|
||||||
|
|
||||||
# mke2fs.android - a ustom version of mke2fs that supports --android_sparse (FS#56955)
|
# mke2fs.android - a ustom version of mke2fs that supports --android_sparse (FS#56955)
|
||||||
libext2fsfiles = %w(
|
libext2fsfiles = %w(
|
||||||
|
@ -357,6 +369,7 @@ libext2fsfiles = %w(
|
||||||
lib/support/quotaio.c
|
lib/support/quotaio.c
|
||||||
lib/support/quotaio_tree.c
|
lib/support/quotaio_tree.c
|
||||||
lib/support/quotaio_v2.c
|
lib/support/quotaio_v2.c
|
||||||
|
lib/uuid/clear.c
|
||||||
lib/uuid/gen_uuid.c
|
lib/uuid/gen_uuid.c
|
||||||
lib/uuid/isnull.c
|
lib/uuid/isnull.c
|
||||||
lib/uuid/pack.c
|
lib/uuid/pack.c
|
||||||
|
|
Loading…
Reference in a new issue