summary refs log tree commit diff
path: root/pkgs/os-specific/linux/chromium-os/common-mk/0001-common-mk-Adjust-policy-gen-script-cmdline-args.patch
blob: 4829d6eba70c46c9407ed8965b6f307733239bf6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
From fc07988a1837ea947af231d9371a7d7b96618f52 Mon Sep 17 00:00:00 2001
From: Pavol Marko <pmarko@google.com>
Date: Wed, 4 Sep 2019 15:21:46 +0200
Subject: [PATCH 01/11] common-mk: Adjust policy gen script cmdline args

The cmdline args interface of the policy source generation script
'generate_policy_source.py' has changed on the Chromium side as of
CL:1687818. Change invocations accordingly.
While here, remove the targets 'cloud_policy_proto_generator' /
'user_policy-protos' of common-mk/external_dependencies.gyp as the
usages have been migrated to gn.

BUG=chromium:981128
TEST=build_packages

Cq-Depend: chromium:1786282
Change-Id: I308465451c6cee96319ea5ec104a799f1761d3ab
Reviewed-on: https://chromium-review.googlesource.com/1785600
Tested-by: Pavol Marko <pmarko@chromium.org>
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Pavol Marko <pmarko@chromium.org>
---
 common-mk/external_dependencies.gyp      | 42 ------------------------
 common-mk/external_dependencies/BUILD.gn |  7 ++--
 2 files changed, 3 insertions(+), 46 deletions(-)

diff --git a/common-mk/external_dependencies.gyp b/common-mk/external_dependencies.gyp
index 34eaa59ce..751f8566d 100644
--- a/common-mk/external_dependencies.gyp
+++ b/common-mk/external_dependencies.gyp
@@ -49,33 +49,6 @@
       ],
       'includes': ['xml2cpp.gypi'],
     },
-    {
-      'target_name': 'cloud_policy_proto_generator',
-      'type': 'none',
-      'hard_dependency': 1,
-      'variables': {
-        'policy_tools_dir': '<(sysroot)/usr/share/policy_tools',
-        'policy_resources_dir': '<(sysroot)/usr/share/policy_resources',
-        'proto_out_dir': '<(SHARED_INTERMEDIATE_DIR)/proto',
-      },
-      'actions': [{
-        'action_name': 'run_generate_script',
-        'inputs': [
-          '<(policy_tools_dir)/generate_policy_source.py',
-          '<(policy_resources_dir)/policy_templates.json',
-          '<(policy_resources_dir)/VERSION',
-        ],
-        'outputs': [ '<(proto_out_dir)/cloud_policy.proto' ],
-        'action': [
-          'python', '<(policy_tools_dir)/generate_policy_source.py',
-          '--cloud-policy-protobuf=<(proto_out_dir)/cloud_policy.proto',
-          '<(policy_resources_dir)/VERSION',
-          '<(OS)',
-          '1',         # chromeos-flag
-          '<(policy_resources_dir)/policy_templates.json',
-        ],
-      }],
-    },
     {
       'target_name': 'policy-protos',
       'type': 'static_library',
@@ -95,21 +68,6 @@
       ],
       'includes': ['protoc.gypi'],
     },
-    {
-      'target_name': 'user_policy-protos',
-      'type': 'static_library',
-      'variables': {
-        'proto_in_dir': '<(SHARED_INTERMEDIATE_DIR)/proto',
-        'proto_out_dir': 'include/bindings',
-      },
-      'dependencies': [
-        'cloud_policy_proto_generator',
-      ],
-      'sources': [
-        '<(proto_in_dir)/cloud_policy.proto',
-      ],
-      'includes': ['protoc.gypi'],
-    },
     {
       'target_name': 'install_attributes-proto',
       'type': 'static_library',
diff --git a/common-mk/external_dependencies/BUILD.gn b/common-mk/external_dependencies/BUILD.gn
index 61774bf8f..4ec1665e3 100644
--- a/common-mk/external_dependencies/BUILD.gn
+++ b/common-mk/external_dependencies/BUILD.gn
@@ -59,10 +59,9 @@ action("cloud_policy_proto_generator") {
   ]
   args = [
     "--cloud-policy-protobuf=${proto_out_dir}/cloud_policy.proto",
-    "${policy_resources_dir}/VERSION",
-    "${OS}",
-    "1",  # chromeos-flag
-    "${policy_resources_dir}/policy_templates.json",
+    "--chrome-version-file=${policy_resources_dir}/VERSION",
+    "--target-platform=chromeos",
+    "--policy-templates-file=${policy_resources_dir}/policy_templates.json",
   ]
 }
 
-- 
2.23.0