summary refs log tree commit diff
path: root/pkgs/os-specific/linux/chromium-os/common-mk
diff options
context:
space:
mode:
authorJamie McClymont <jamie@kwiius.com>2021-04-02 09:04:16 +0000
committerAlyssa Ross <hi@alyssa.is>2021-06-02 12:25:17 +0000
commitd70c553b32b6381843e6bf5277d54541e368c3a1 (patch)
tree094f5b3468466310db09881d645dbad87d971940 /pkgs/os-specific/linux/chromium-os/common-mk
parent64ad908eb80c9b494454f0e4ac06e691a89fdb22 (diff)
downloadnixpkgs-d70c553b32b6381843e6bf5277d54541e368c3a1.tar
nixpkgs-d70c553b32b6381843e6bf5277d54541e368c3a1.tar.gz
nixpkgs-d70c553b32b6381843e6bf5277d54541e368c3a1.tar.bz2
nixpkgs-d70c553b32b6381843e6bf5277d54541e368c3a1.tar.lz
nixpkgs-d70c553b32b6381843e6bf5277d54541e368c3a1.tar.xz
nixpkgs-d70c553b32b6381843e6bf5277d54541e368c3a1.tar.zst
nixpkgs-d70c553b32b6381843e6bf5277d54541e368c3a1.zip
chromiumOSPackages: 83.13020.0.0-rc1 -> 89.13729.0.0-rc1
* chromiumOSPackages.linux: fix config
* chromiumOSPackages.common-mk: update patches
* chromiumOSPackages.vm_protos: drop GN patch
  The missing dependency has been added upstream.
* chromiumOSPackages.common-mk: disable clang-only warnings
* chromiumOSPackages.sommelier: update patches
  Support for stable xdg-shell was implemented in upstream Sommelier,
  but then reverted because the GTK version that comes with the Debian
  in the container Chromium OS uses was too old to support it.
  That's not a problem for us, of course, but it does mean that we can
  use an upstream implementation of xdg-shell.  So here I switch from
  using Puck's implementation, to reverting the revert of the upstream
  one.
* crosvm: fix outdated Cargo.lock from upstream
* crosvm: update VIRTIO_NET_F_MAC patch (renamed to be less annoying)
* crosvm: add new dependencies
* crosvm: patch boot test so it doesn't fail because of no /dev/log.
* crosvm: disable boot test on x86_64 because it often hangs on the AMD
  EPYC 7401P 24-Core Processor I was testing it on (but not my Intel(R)
  Core(TM) i5-2520M CPU @ 2.50GHz).
* spectrumPackages.linux: drop evged patch
  This has reached the Chromium OS kernel now, so we don't need to apply
  it ourselves any more.

Co-authored-by: Alyssa Ross <hi@alyssa.is>
Cc: Puck Meerburg <puck@puckipedia.com>
Reviewed-by: Alyssa Ross <hi@alyssa.is>
Tested-by: Alyssa Ross <hi@alyssa.is>
Message-Id: <20210529144117.571353-2-hi@alyssa.is>
Message-Id: <20210529144117.571353-3-hi@alyssa.is>
Message-Id: <20210529144117.571353-4-hi@alyssa.is>
Message-Id: <20210529144117.571353-5-hi@alyssa.is>
Message-Id: <20210529144117.571353-6-hi@alyssa.is>
Message-Id: <20210529144117.571353-7-hi@alyssa.is>
Message-Id: <20210529144117.571353-8-hi@alyssa.is>
Message-Id: <20210529144117.571353-9-hi@alyssa.is>
Diffstat (limited to 'pkgs/os-specific/linux/chromium-os/common-mk')
-rw-r--r--pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch115
-rw-r--r--pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch8
-rw-r--r--pkgs/os-specific/linux/chromium-os/common-mk/default.nix6
3 files changed, 100 insertions, 29 deletions
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
index 4b7a2f34779..479cb96eddf 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-don-t-leak-source-absolute-paths.patch
@@ -1,23 +1,25 @@
-From 22f33cfdfacc8c4536a8bf883b4c8b54e30599a3 Mon Sep 17 00:00:00 2001
+From 8b87e0d6ee0e645d1ac2b27c2fba0c97f2929e31 Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Sun, 24 Nov 2019 16:56:11 +0000
-Subject: [PATCH 1/6] common-mk: don't leak source-absolute paths
+Subject: [PATCH 1/4] common-mk: don't leak source-absolute paths
 
 Source-absolute paths like //vm_tools/whatever were being leaked to
 subprocesses, which of course didn't know how to understand them.
 With this patch, source-absolute paths are only used to tell GN the
 outputs, and normal Unix paths are passed to subprocesses.
 ---
- common-mk/external_dependencies/BUILD.gn |  3 ++-
- common-mk/pkg_config.gni                 |  7 +++----
- common-mk/proto_library.gni              | 21 +++++++++++----------
- 3 files changed, 16 insertions(+), 15 deletions(-)
+ common-mk/external_dependencies/BUILD.gn    |  3 ++-
+ common-mk/mojom_bindings_generator.gni      | 12 ++++++------
+ common-mk/mojom_type_mappings_generator.gni |  2 +-
+ common-mk/pkg_config.gni                    |  5 +++--
+ common-mk/proto_library.gni                 | 21 +++++++++++----------
+ 5 files changed, 23 insertions(+), 20 deletions(-)
 
 diff --git a/common-mk/external_dependencies/BUILD.gn b/common-mk/external_dependencies/BUILD.gn
-index 61f571b38..4cb7b93cf 100644
+index dbf45368ff..94aae4e2e2 100644
 --- a/common-mk/external_dependencies/BUILD.gn
 +++ b/common-mk/external_dependencies/BUILD.gn
-@@ -47,6 +47,7 @@ genxml2cpp("dbus-proxies") {
+@@ -45,6 +45,7 @@ genxml2cpp("dbus-proxies") {
  action("cloud_policy_proto_generator") {
    policy_resources_dir = "${sysroot}/usr/share/policy_resources"
    proto_out_dir = "${target_gen_dir}/proto"
@@ -25,26 +27,91 @@ index 61f571b38..4cb7b93cf 100644
    policy_tools_dir = "${sysroot}/usr/share/policy_tools"
  
    script = "${policy_tools_dir}/generate_policy_source.py"
-@@ -58,7 +59,7 @@ action("cloud_policy_proto_generator") {
-     "${proto_out_dir}/cloud_policy.proto",
+@@ -54,7 +55,7 @@ action("cloud_policy_proto_generator") {
    ]
+   outputs = [ "${proto_out_dir}/cloud_policy.proto" ]
    args = [
 -    "--cloud-policy-protobuf=${proto_out_dir}/cloud_policy.proto",
 +    "--cloud-policy-protobuf=${cloud_policy_protobuf_dir}/cloud_policy.proto",
      "--chrome-version-file=${policy_resources_dir}/VERSION",
      "--target-platform=chromeos",
      "--policy-templates-file=${policy_resources_dir}/policy_templates.json",
+diff --git a/common-mk/mojom_bindings_generator.gni b/common-mk/mojom_bindings_generator.gni
+index 038c20ed36..205d7d3037 100644
+--- a/common-mk/mojom_bindings_generator.gni
++++ b/common-mk/mojom_bindings_generator.gni
+@@ -100,7 +100,7 @@ template("generate_mojom_bindings_gen") {
+     args = [
+       "mkdir",
+       "-p",
+-      mojo_templates_dir,
++      rebase_path(mojo_templates_dir),
+     ]
+   }
+ 
+@@ -116,7 +116,7 @@ template("generate_mojom_bindings_gen") {
+     args = [
+       "--use_bundled_pylibs",
+       "-o",
+-      mojo_templates_dir,
++      rebase_path(mojo_templates_dir),
+       "precompile",
+     ]
+     deps = [ ":${mojo_templates_dir_action_name}" ]
+@@ -143,7 +143,7 @@ template("generate_mojom_bindings_gen") {
+     args = [
+       "--mojom-file-list={{response_file_name}}",
+       "--output-root",
+-      _mojo_output_base,
++      rebase_path(_mojo_output_base),
+       "--input-root",
+       mojo_root,  # Mojo depth.
+       "--input-root",
+@@ -188,11 +188,11 @@ template("generate_mojom_bindings_gen") {
+              mojom_bindings_generator,
+              "--use_bundled_pylibs",
+              "--output_dir",
+-             _mojo_output_base,
++             rebase_path(_mojo_output_base),
+              "generate",
+              "--filelist={{response_file_name}}",
+              "--bytecode_path",
+-             mojo_templates_dir,
++             rebase_path(mojo_templates_dir),
+              "-I",
+              mojo_root,  # Mojo include path.
+              "-d",
+@@ -216,7 +216,7 @@ template("generate_mojom_bindings_gen") {
+       foreach(typemap, invoker.typemaps) {
+         args += [
+           "--typemap",
+-          typemap,
++          rebase_path(typemap),
+         ]
+       }
+     }
+diff --git a/common-mk/mojom_type_mappings_generator.gni b/common-mk/mojom_type_mappings_generator.gni
+index ff09397111..959a8b6ca9 100644
+--- a/common-mk/mojom_type_mappings_generator.gni
++++ b/common-mk/mojom_type_mappings_generator.gni
+@@ -21,7 +21,7 @@ template("generate_mojom_type_mappings") {
+     outputs = [ "$target_gen_dir/${target_name}_typemapping" ]
+     args = [
+              "--output",
+-             "$target_gen_dir/${target_name}_typemapping",
++             rebase_path("$target_gen_dir/${target_name}_typemapping"),
+            ] + rebase_path(sources, root_build_dir)
+   }
+ }
 diff --git a/common-mk/pkg_config.gni b/common-mk/pkg_config.gni
-index af3c3fb4c..151c49e56 100644
+index 24e2cf1401..151c49e560 100644
 --- a/common-mk/pkg_config.gni
 +++ b/common-mk/pkg_config.gni
-@@ -81,12 +81,11 @@ template("generate_pkg_config") {
+@@ -81,10 +81,11 @@ template("generate_pkg_config") {
      if (!defined(output_name)) {
        output_name = name
      }
--    outputs = [
--      "${target_out_dir}/${output_name}.pc",
--    ]
+-    outputs = [ "${target_out_dir}/${output_name}.pc" ]
 +    lib_path = "${target_out_dir}/${output_name}.pc"
 +    outputs = [ lib_path ]
  
@@ -55,7 +122,7 @@ index af3c3fb4c..151c49e56 100644
        args += [ "--description=" + description ]
      }
 diff --git a/common-mk/proto_library.gni b/common-mk/proto_library.gni
-index 7fcb08341..692704288 100644
+index 68b7904acc..2bef5f44ef 100644
 --- a/common-mk/proto_library.gni
 +++ b/common-mk/proto_library.gni
 @@ -56,7 +56,7 @@ template("proto_library") {
@@ -106,7 +173,7 @@ index 7fcb08341..692704288 100644
        outputs += [
          "${cc_dir}/{{source_name_part}}.pb.cc",
          "${cc_dir}/{{source_name_part}}.pb.h",
-@@ -208,7 +207,9 @@ template("goproto_library") {
+@@ -218,7 +217,9 @@ template("goproto_library") {
      # otherwise file descriptor var name will conflict.
      # cf) https://github.com/golang/protobuf/issues/109
  
@@ -116,16 +183,16 @@ index 7fcb08341..692704288 100644
  
      # Build protoc command line to run.
      script = "//common-mk/file_generator_wrapper.py"
-@@ -224,7 +225,7 @@ template("goproto_library") {
-       "--proto_path",
-       "${sysroot}/usr/share/proto",
+@@ -258,7 +259,7 @@ template("goproto_library") {
        "--go_out",
--      "${go_out_prefix}${root_gen_dir}/${proto_out_dir}",
-+      "${go_out_prefix}${proto_out_dir}",
+ 
+       # go_out_prefix can be empty, so we can always add a colon here.
+-      "${go_out_prefix}:${root_gen_dir}/${proto_out_dir}",
++      "${go_out_prefix}:${proto_out_dir}",
      ]
      foreach(source, sources) {
        args += [ rebase_path(source) ]
-@@ -234,7 +235,7 @@ template("goproto_library") {
+@@ -268,7 +269,7 @@ template("goproto_library") {
      outputs = []
      foreach(source, invoker.sources) {
        name = get_path_info(source, "name")
@@ -135,5 +202,5 @@ index 7fcb08341..692704288 100644
    }
  }
 -- 
-2.26.2
+2.30.0
 
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch b/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
index 592002c406f..feac017d253 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/0002-common-mk-.gn-don-t-hardcode-env-path.patch
@@ -1,7 +1,7 @@
-From 51ed7b957069bd3765222a466473c696755caa5e Mon Sep 17 00:00:00 2001
+From 1589ff7aa30d61be9ebe4b53a1b8d504b72ff4de Mon Sep 17 00:00:00 2001
 From: Alyssa Ross <hi@alyssa.is>
 Date: Sun, 24 Nov 2019 17:20:46 +0000
-Subject: [PATCH 2/6] common-mk: .gn: don't hardcode env path
+Subject: [PATCH 2/4] common-mk: .gn: don't hardcode env path
 
 This is needlessly non-portable.
 ---
@@ -9,7 +9,7 @@ This is needlessly non-portable.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/.gn b/.gn
-index e7dba8c91..e29fcd61e 100644
+index e7dba8c91c..e29fcd61ee 100644
 --- a/.gn
 +++ b/.gn
 @@ -7,4 +7,4 @@ root = "//common-mk/gn_root/:"
@@ -19,5 +19,5 @@ index e7dba8c91..e29fcd61e 100644
 -script_executable = "/usr/bin/env"
 +script_executable = "env"
 -- 
-2.26.2
+2.30.0
 
diff --git a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
index cc72aab5d15..d617401138f 100644
--- a/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
+++ b/pkgs/os-specific/linux/chromium-os/common-mk/default.nix
@@ -64,7 +64,11 @@ stdenv.mkDerivation ({
     patchShebangs common-mk
   '' + (lib.optionalString (!stdenv.cc.isClang) ''
     substituteInPlace common-mk/BUILD.gn \
-        --replace '"-Wno-c99-designator",' ""
+        --replace '"-Wno-c99-designator",' "" \
+        --replace '"-Wstring-compare",' "" \
+        --replace '"-Wstring-plus-int",' "" \
+        --replace '"-Wxor-used-as-pow",' "" \
+        --replace '"-Wunreachable-code-return",' ""
   '') + postPatch;
 
   nativeBuildInputs = [ gn pkgconfig python3 ninja ] ++ nativeBuildInputs;