Skip to content
Snippets Groups Projects
Commit 2aceb9b8 authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi Committed by Automerger Merge Worker
Browse files

floss: Uprev libchrome package to 1094370 am: c22c7ec2

parents b80fc6d6 c22c7ec2
No related branches found
No related tags found
No related merge requests found
Showing with 148 additions and 155 deletions
libchrome (930012-1) bullseye; urgency=low
libchrome (1094370-1) bullseye; urgency=low
* Upgrade to BASE_VER = 930012
* Upgrade to BASE_VER = 1094370
-- Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Fri, 11 Feb 2022 14:56:00 +0000
-- Abhishek Pandit-Subedi <abhishekpandit@chromium.org> Fri, 13 Feb 2023 14:56:00 +0000
#!/usr/bin/env python3
# Copyright (C) 2023 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import glob
import json
import os
import shutil
import subprocess
import sys
HEADER_TARGETS = [
'//libchrome:install_basever',
'//libchrome:install_buildflag_header',
'//libchrome:install_header',
]
def gn_desc(target):
""" Run gn desc on given target and return json output."""
return json.loads(subprocess.check_output(['gn', 'desc', '--format=json', 'out/Release', target]))
def install_headers(target_dir):
""" Install headers into target directory. """
for target in HEADER_TARGETS:
desc = gn_desc(target)
install_config = desc[target]['metadata']['_install_config'][0]
# Make sure install path doesn't have absolute path
install_path = install_config['install_path'].lstrip('/')
try:
relative_to = install_config['tree_relative_to']
except:
relative_to = os.path.join(os.getcwd(), 'libchrome')
sources = install_config['sources']
# Generate rsync commands for each source mapping. Cp would require
# running makedir which we don't want to do.
for source in sources:
files = glob.glob(source, recursive=True)
for file in files:
target_file = os.path.join(target_dir, install_path, os.path.relpath(file, relative_to))
# Create dirs before copying
os.makedirs(os.path.dirname(target_file), exist_ok=True)
shutil.copyfile(file, target_file)
def main():
if len(sys.argv) != 2:
raise Exception('Expecting 2 params, got {}'.format(sys.argv))
return
install_headers(sys.argv[1])
if __name__ == '__main__':
main()
#!/bin/bash
destdir="$1"
header_dirs=(
base
base/allocator
base/allocator/partition_allocator
base/allocator/partition_allocator/starscan
base/containers
base/debug
base/files
base/functional
base/hash
base/i18n
base/json
base/memory
base/message_loop
base/metrics
base/numerics
base/posix
base/process
base/ranges
base/strings
base/synchronization
base/system
base/task
base/task/common
base/task/sequence_manager
base/task/thread_pool
base/test
base/third_party/icu
base/third_party/nspr
base/third_party/valgrind
base/threading
base/time
base/timer
base/trace_event
base/trace_event/common
base/types
build
components/policy
components/policy/core/common
testing/gmock/include/gmock
testing/gtest/include/gtest
dbus
third_party/abseil-cpp/absl/types
third_party/perfetto/include/perfetto/tracing/
third_party/perfetto/include/perfetto/protozero/
third_party/perfetto/protos/perfetto/trace/track_event/
)
# Install header files.
for d in "${header_dirs[@]}" ; do
mkdir -p "${destdir}/usr/include/libchrome/${d}"
cp libchrome/"${d}"/*.h "${destdir}/usr/include/libchrome/${d}"
done
From 50a4636886c958717213856132fcbb57c3b8ea2a Mon Sep 17 00:00:00 2001
From: Sonny Sasaka <sonnysasaka@chromium.org>
Date: Fri, 19 Mar 2021 16:18:07 -0700
Subject: [PATCH] Add missing includes
---
base/hash/md5.cc | 1 +
crypto/p224_spake.cc | 1 +
2 files changed, 2 insertions(+)
diff --git a/libchrome/base/hash/md5.cc b/libchrome/base/hash/md5.cc
index bdb9990a9..ef8954eaf 100644
--- a/libchrome/base/hash/md5.cc
+++ b/libchrome/base/hash/md5.cc
@@ -24,6 +24,7 @@
#include "base/hash/md5.h"
diff --git a/libchrome/base/hash/md5_nacl.cc b/libchrome/base/hash/md5_nacl.cc
index 7de4b43520..d540b24642 100644
--- a/libchrome/base/hash/md5_nacl.cc
+++ b/libchrome/base/hash/md5_nacl.cc
@@ -22,6 +22,7 @@
*/
#include <stddef.h>
+#include <string.h>
namespace {
#include "base/hash/md5.h"
diff --git a/libchrome/crypto/p224_spake.cc b/libchrome/crypto/p224_spake.cc
index 157410537..de0af5466 100644
index 09f179b24a..9f651de0cf 100644
--- a/libchrome/crypto/p224_spake.cc
+++ b/libchrome/crypto/p224_spake.cc
@@ -8,6 +8,7 @@
......@@ -32,6 +22,29 @@ index 157410537..de0af5466 100644
#include <base/logging.h>
#include <crypto/p224.h>
--
2.20.1
diff --git a/libchrome/base/functional/function_ref.h b/libchrome/base/functional/function_ref.h
index d6442d3532..6dc03da85c 100644
--- a/libchrome/base/functional/function_ref.h
+++ b/libchrome/base/functional/function_ref.h
@@ -5,6 +5,8 @@
#ifndef BASE_FUNCTIONAL_FUNCTION_REF_H_
#define BASE_FUNCTIONAL_FUNCTION_REF_H_
+#include <limits>
+
#include <type_traits>
#include <utility>
diff --git a/libchrome/base/memory/ref_counted.h b/libchrome/base/memory/ref_counted.h
index 9ef94d8476..f70e30748a 100644
--- a/libchrome/base/memory/ref_counted.h
+++ b/libchrome/base/memory/ref_counted.h
@@ -7,6 +7,7 @@
#include <stddef.h>
+#include <limits>
#include <utility>
#include "base/atomic_ref_count.h"
From 1153211a5615156f450a4f521da284a7df4d4e5f Mon Sep 17 00:00:00 2001
From: Abhishek Pandit-Subedi <abhishekpandit@google.com>
Date: Mon, 14 Feb 2022 14:40:41 -0800
Subject: [PATCH] Fix build issues on 930012
---
BUILD.gn | 1 +
base/command_line.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/libchrome/BUILD.gn b/libchrome/BUILD.gn
index 292c08565a..dbe3fb0981 100644
--- a/libchrome/BUILD.gn
+++ b/libchrome/BUILD.gn
@@ -42,6 +42,7 @@ config("libchrome_config") {
"-Wno-unreachable-code-return",
"-Wno-unused-local-typedefs",
"-Xclang-only=-Wno-char-subscripts",
+ "-Wno-implicit-int-float-conversion",
]
# Address sanitizer + coverage builds do not support -z,defs.
diff --git a/libchrome/base/command_line.h b/libchrome/base/command_line.h
index 706726a73e..ad0281283a 100644
--- a/libchrome/base/command_line.h
+++ b/libchrome/base/command_line.h
@@ -19,6 +19,7 @@
#include <stddef.h>
#include <functional>
#include <map>
+#include <memory>
#include <string>
#include <vector>
--
2.35.1.265.g69c8d7142f-goog
From 3841f20ab4c505dacc3bafb5348af79abe211849 Mon Sep 17 00:00:00 2001
From: Andre Braga <andrebraga@google.com>
Date: Mon, 8 Aug 2022 21:13:05 +0000
Subject: [PATCH] Fix build issues when using clang older than v12
---
base/compiler_specific.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libchrome/base/compiler_specific.h b/libchrome/base/compiler_specific.h
index 8660018dc7..ad0e72eb84 100644
--- a/libchrome//base/compiler_specific.h
+++ b/libchrome//base/compiler_specific.h
@@ -370,7 +370,7 @@ inline constexpr bool AnalyzerAssumeTrue(bool arg) {
#endif // defined(__clang_analyzer__)
// Use nomerge attribute to disable optimization of merging multiple same calls.
-#if defined(__clang__) && __has_attribute(nomerge)
+#if defined(__clang__) && __has_attribute(nomerge) && (__clang_major__ >= 12)
#define NOMERGE [[clang::nomerge]]
#else
#define NOMERGE
--
2.37.1.559.g78731f0fdb-goog
From 59c4e2cebd6d74119d110870dbe71ec7557395fe Mon Sep 17 00:00:00 2001
From: Abhishek Pandit-Subedi <abhishekpandit@google.com>
Date: Fri, 3 Feb 2023 15:32:45 -0800
Subject: [PATCH] Perfetto instance hack
---
base/logging.cc | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libchrome/base/logging.cc b/libchrome/base/logging.cc
index 615b432d43..6385604d93 100644
--- a/libchrome/base/logging.cc
+++ b/libchrome/base/logging.cc
@@ -120,6 +120,8 @@ typedef FILE* FileHandle;
#include "base/files/scoped_file.h"
#endif
+perfetto::internal::TrackRegistry *perfetto::internal::TrackRegistry::instance_ = nullptr;
+
namespace logging {
namespace {
--
2.39.1.519.gcb327c4b5f-goog
0001-Remove-absl-from-pkgconfig.patch
0001-Add-missing-includes.patch
0001-rebase_path-for-write_args.patch
0001-Remove-absl-from-pkgconfig.patch
0001-Fix-build-issues-on-930012.patch
0001-Fix-build-issues-when-using-clang-older-than-v12.patch
\ No newline at end of file
0001-Perfetto-instance-hack.patch
......@@ -3,7 +3,7 @@
# gn args
defines =
defines += pkg_config=\"pkg-config\"
defines += libbase_ver=\"930012\"
defines += libbase_ver=\"1094370\"
defines += platform2_root=\"$(shell pwd)/\"
defines += platform_subdir=\"libchrome\"
defines += cxx=\"clang++\"
......@@ -13,7 +13,7 @@ defines += external_cxxflags=[\"-DNDEBUG\", \"-I/usr/src/googletest/googletest/i
defines += external_ldflags=[\"-latomic\", \"-labsl_base\", \"-labsl_bad_variant_access\", \"-labsl_bad_optional_access\"]
defines += enable_werror=false
defines += libdir=\"/usr/lib\"
defines += use={mojo=false asan=false coverage=false crypto=true dbus=true fuzzer=false timers=true cros_host=false profiling=false tcmalloc=false test=false}
defines += use={mojo=false asan=false msan=false ubsan=false coverage=false crypto=true dbus=true fuzzer=false timers=true cros_host=false cros_debug=false profiling=false tcmalloc=false test=false}
# handle parallel build options
njobs=1
......@@ -35,4 +35,4 @@ override_dh_auto_clean:
override_dh_auto_install-arch:
dh_auto_install
debian/install_headers.sh debian/tmp
debian/install_headers.py debian/tmp
......@@ -7,17 +7,17 @@ if [ -z "$1" ]; then
fi
outdir="$1"
pkgdir=libchrome-930012
origtar=libchrome_930012.orig.tar.gz
pkgdir=libchrome-1094370
origtar=libchrome_1094370.orig.tar.gz
scriptdir="$( cd "$( dirname "$0" )" && pwd )"
# Pin the libchrome branch + commit
libchrome_branch=main
libchrome_commit=4b86c42f09b7c8d88b0233c60f59bafeb4d8df19
libchrome_commit=0519670b5b553bdb42e22d05448358a312c5e78e
# Pin the platform2 branch + commit
platform2_branch=main
platform2_commit=4567e833015453b3ea322eec1201cc41ecdfdec0
platform2_commit=a50a38e57053510332e3fe2ba116c0a7952ad511
tmpdir=$(mktemp -d)
echo Generating source package in "${tmpdir}".
......@@ -36,9 +36,14 @@ git clone --branch "${libchrome_branch}" https://chromium.googlesource.com/chrom
cd libchrome
git checkout "${libchrome_commit}"
rm -rf .git
while read -r patch; do
# Apply all patches (even conditional ones).
# If this is problematic on a future revision, we may need to parse
# "libchrome_tools/patches/patches.config" and exclude ones found
# there.
for patch in $(ls "libchrome_tools/patches/" | grep .patch); do
patch -p1 < "libchrome_tools/patches/${patch}"
done < <(grep -E '^[^#]' "libchrome_tools/patches/patches")
done
# Clean up temporary platform2 checkout.
cd ../..
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment