Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c22c7ec2 authored by Abhishek Pandit-Subedi's avatar Abhishek Pandit-Subedi
Browse files

floss: Uprev libchrome package to 1094370

Bug: 267796404
Tag: #floss
Test: Install dpkg and build Floss
Change-Id: Ib51f3c15d8bdc88e4b910f11bf3a20243ef40604
parent b1a65860
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
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
+70 −0
Original line number Diff line number Diff line
#!/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()
+0 −57
Original line number Diff line number Diff line
#!/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
+34 −21
Original line number Diff line number Diff line
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"
+0 −37
Original line number Diff line number Diff line
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
Loading