From: Alyssa Ross <hi@alyssa.is>
To: devel@spectrum-os.org
Cc: Jamie McClymont <jamie@kwiius.com>
Subject: [PATCH nixpkgs v2 3/8] chromiumOSPackages.common-mk: update patches
Date: Sat, 29 May 2021 14:41:12 +0000 [thread overview]
Message-ID: <20210529144117.571353-4-hi@alyssa.is> (raw)
In-Reply-To: <20210529144117.571353-1-hi@alyssa.is>
From: Jamie McClymont <jamie@kwiius.com>
Reviewed-by: Alyssa Ross <hi@alyssa.is>
Tested-by: Alyssa Ross <hi@alyssa.is>
---
...-mk-don-t-leak-source-absolute-paths.patch | 115 ++++++++++++++----
...ommon-mk-.gn-don-t-hardcode-env-path.patch | 8 +-
2 files changed, 95 insertions(+), 28 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
--
2.31.1
next prev parent reply other threads:[~2021-05-29 14:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-29 14:41 [PATCH nixpkgs v2 0/8] chromiumOSPackages: 83.13020.0.0-rc1 -> 89.13729.0.0-rc1 Alyssa Ross
2021-05-29 14:41 ` [PATCH nixpkgs v2 1/8] " Alyssa Ross
2021-05-29 14:41 ` [PATCH nixpkgs v2 2/8] chromiumOSPackages.linux: fix config Alyssa Ross
2021-05-29 14:41 ` Alyssa Ross [this message]
2021-05-29 14:41 ` [PATCH nixpkgs v2 4/8] chromiumOSPackages.vm_protos: drop GN patch Alyssa Ross
2021-05-29 14:41 ` [PATCH nixpkgs v2 5/8] chromiumOSPackages.common-mk: disable clang-only warnings Alyssa Ross
2021-05-29 14:41 ` [PATCH nixpkgs v2 6/8] chromiumOSPackages.sommelier: update patches Alyssa Ross
2021-05-29 14:41 ` [PATCH nixpkgs v2 7/8] crosvm: fix build Alyssa Ross
2021-05-29 14:41 ` [PATCH nixpkgs v2 8/8] spectrumPackages.linux: drop evged patch Alyssa Ross
2021-06-02 12:30 ` [PATCH nixpkgs v2 0/8] chromiumOSPackages: 83.13020.0.0-rc1 -> 89.13729.0.0-rc1 Alyssa Ross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210529144117.571353-4-hi@alyssa.is \
--to=hi@alyssa.is \
--cc=devel@spectrum-os.org \
--cc=jamie@kwiius.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).