diff options
Diffstat (limited to 'patches')
| -rw-r--r-- | patches/bazel-mock-repos.patch | 527 | ||||
| -rw-r--r-- | patches/bazel-workspace.patch | 58 |
2 files changed, 585 insertions, 0 deletions
diff --git a/patches/bazel-mock-repos.patch b/patches/bazel-mock-repos.patch new file mode 100644 index 0000000..7cc133d --- /dev/null +++ b/patches/bazel-mock-repos.patch | |||
| @@ -0,0 +1,527 @@ | |||
| 1 | Taken from https://salsa.debian.org/bazel-team/bazel-bootstrap/-/raw/2e1af7d3d0ec789a71c16f5ecd07232efc0f262a/debian/patches/mock_repos.patch | ||
| 2 | |||
| 3 | Description: Create mock repositories to prevent packaging binary archives | ||
| 4 | Workaround created for Debian by upstream to prevent packaging archive files | ||
| 5 | in Debian "source." This recreates only the portions of those .zip and .tar.gz | ||
| 6 | files that are required for building Bazel on Debian. | ||
| 7 | Author: Yun Peng <pcloudy@google.com> | ||
| 8 | Origin: upstream, https://github.com/meteorcloudy/bazel/commit/1c38681aec9dee4eeeeac6196154c01e67878d65 | ||
| 9 | Forwarded: not-needed | ||
| 10 | Last-Update: 2020-07-22 | ||
| 11 | |||
| 12 | --- /dev/null | ||
| 13 | +++ b/mock_repos/bazel_skydoc/BUILD | ||
| 14 | @@ -0,0 +1 @@ | ||
| 15 | + | ||
| 16 | --- /dev/null | ||
| 17 | +++ b/mock_repos/bazel_skydoc/WORKSPACE | ||
| 18 | @@ -0,0 +1 @@ | ||
| 19 | + | ||
| 20 | --- /dev/null | ||
| 21 | +++ b/mock_repos/bazel_skydoc/setup.bzl | ||
| 22 | @@ -0,0 +1,18 @@ | ||
| 23 | +# Copyright 2020 The Bazel Authors. All rights reserved. | ||
| 24 | +# | ||
| 25 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 26 | +# you may not use this file except in compliance with the License. | ||
| 27 | +# You may obtain a copy of the License at | ||
| 28 | +# | ||
| 29 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 30 | +# | ||
| 31 | +# Unless required by applicable law or agreed to in writing, software | ||
| 32 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 33 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 34 | +# See the License for the specific language governing permissions and | ||
| 35 | +# limitations under the License. | ||
| 36 | + | ||
| 37 | +"""Mocks rules defined in io_bazel_skydoc.""" | ||
| 38 | + | ||
| 39 | +def stardoc_repositories(**kwargs): | ||
| 40 | + pass | ||
| 41 | --- /dev/null | ||
| 42 | +++ b/mock_repos/bazel_skydoc/stardoc/BUILD | ||
| 43 | @@ -0,0 +1 @@ | ||
| 44 | + | ||
| 45 | --- /dev/null | ||
| 46 | +++ b/mock_repos/bazel_skydoc/stardoc/html_tables_stardoc.bzl | ||
| 47 | @@ -0,0 +1,18 @@ | ||
| 48 | +# Copyright 2020 The Bazel Authors. All rights reserved. | ||
| 49 | +# | ||
| 50 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 51 | +# you may not use this file except in compliance with the License. | ||
| 52 | +# You may obtain a copy of the License at | ||
| 53 | +# | ||
| 54 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 55 | +# | ||
| 56 | +# Unless required by applicable law or agreed to in writing, software | ||
| 57 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 58 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 59 | +# See the License for the specific language governing permissions and | ||
| 60 | +# limitations under the License. | ||
| 61 | + | ||
| 62 | +"""Mocks rules defined in io_bazel_skydoc.""" | ||
| 63 | + | ||
| 64 | +def html_tables_stardoc(**kwargs): | ||
| 65 | + pass | ||
| 66 | --- /dev/null | ||
| 67 | +++ b/mock_repos/bazel_skydoc/stardoc/stardoc.bzl | ||
| 68 | @@ -0,0 +1,18 @@ | ||
| 69 | +# Copyright 2020 The Bazel Authors. All rights reserved. | ||
| 70 | +# | ||
| 71 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 72 | +# you may not use this file except in compliance with the License. | ||
| 73 | +# You may obtain a copy of the License at | ||
| 74 | +# | ||
| 75 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 76 | +# | ||
| 77 | +# Unless required by applicable law or agreed to in writing, software | ||
| 78 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 79 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 80 | +# See the License for the specific language governing permissions and | ||
| 81 | +# limitations under the License. | ||
| 82 | + | ||
| 83 | +"""Mocks rules defined in io_bazel_skydoc.""" | ||
| 84 | + | ||
| 85 | +def stardoc(**kwargs): | ||
| 86 | + pass | ||
| 87 | --- /dev/null | ||
| 88 | +++ b/mock_repos/bazel_skylib/BUILD | ||
| 89 | @@ -0,0 +1 @@ | ||
| 90 | + | ||
| 91 | --- /dev/null | ||
| 92 | +++ b/mock_repos/bazel_skylib/WORKSPACE | ||
| 93 | @@ -0,0 +1 @@ | ||
| 94 | + | ||
| 95 | --- /dev/null | ||
| 96 | +++ b/mock_repos/bazel_skylib/bzl_library.bzl | ||
| 97 | @@ -0,0 +1,18 @@ | ||
| 98 | +# Copyright 2020 The Bazel Authors. All rights reserved. | ||
| 99 | +# | ||
| 100 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 101 | +# you may not use this file except in compliance with the License. | ||
| 102 | +# You may obtain a copy of the License at | ||
| 103 | +# | ||
| 104 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 105 | +# | ||
| 106 | +# Unless required by applicable law or agreed to in writing, software | ||
| 107 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 108 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 109 | +# See the License for the specific language governing permissions and | ||
| 110 | +# limitations under the License. | ||
| 111 | + | ||
| 112 | +"""Mocks rules defined in bazel_skylib.""" | ||
| 113 | + | ||
| 114 | +def bzl_library(**kwargs): | ||
| 115 | + pass | ||
| 116 | --- /dev/null | ||
| 117 | +++ b/mock_repos/platforms/BUILD | ||
| 118 | @@ -0,0 +1,15 @@ | ||
| 119 | +package(default_visibility = ["//visibility:public"]) | ||
| 120 | + | ||
| 121 | +licenses(["notice"]) | ||
| 122 | + | ||
| 123 | +exports_files(["LICENSE"]) | ||
| 124 | + | ||
| 125 | +filegroup( | ||
| 126 | + name = "srcs", | ||
| 127 | + srcs = [ | ||
| 128 | + "BUILD", | ||
| 129 | + "WORKSPACE", | ||
| 130 | + "//cpu:srcs", | ||
| 131 | + "//os:srcs", | ||
| 132 | + ], | ||
| 133 | +) | ||
| 134 | --- /dev/null | ||
| 135 | +++ b/mock_repos/platforms/WORKSPACE | ||
| 136 | @@ -0,0 +1 @@ | ||
| 137 | +workspace(name = "platforms") | ||
| 138 | --- /dev/null | ||
| 139 | +++ b/mock_repos/platforms/cpu/BUILD | ||
| 140 | @@ -0,0 +1,76 @@ | ||
| 141 | +# Standard cpu name constraint_setting and constraint_values | ||
| 142 | +licenses(["notice"]) | ||
| 143 | + | ||
| 144 | +package( | ||
| 145 | + default_visibility = ["//visibility:public"], | ||
| 146 | +) | ||
| 147 | + | ||
| 148 | +filegroup( | ||
| 149 | + name = "srcs", | ||
| 150 | + srcs = glob(["**"]), | ||
| 151 | +) | ||
| 152 | + | ||
| 153 | +# To add a new constraint_value see https://github.com/bazelbuild/platforms. | ||
| 154 | +constraint_setting(name = "cpu") | ||
| 155 | + | ||
| 156 | +# TODO(b/136237408): Remove this generic CPU name and replace with a specific one. | ||
| 157 | +constraint_value( | ||
| 158 | + name = "aarch64", | ||
| 159 | + constraint_setting = ":cpu", | ||
| 160 | +) | ||
| 161 | + | ||
| 162 | +# TODO(b/136237408): Remove this generic CPU name and replace with a specific one. | ||
| 163 | +constraint_value( | ||
| 164 | + name = "arm", | ||
| 165 | + constraint_setting = ":cpu", | ||
| 166 | +) | ||
| 167 | + | ||
| 168 | +constraint_value( | ||
| 169 | + name = "arm64_32", | ||
| 170 | + constraint_setting = ":cpu", | ||
| 171 | +) | ||
| 172 | + | ||
| 173 | +constraint_value( | ||
| 174 | + name = "arm64", | ||
| 175 | + constraint_setting = ":cpu", | ||
| 176 | +) | ||
| 177 | + | ||
| 178 | +constraint_value( | ||
| 179 | + name = "arm64e", | ||
| 180 | + constraint_setting = ":cpu", | ||
| 181 | +) | ||
| 182 | + | ||
| 183 | +constraint_value( | ||
| 184 | + name = "armv7", | ||
| 185 | + constraint_setting = ":cpu", | ||
| 186 | +) | ||
| 187 | + | ||
| 188 | +constraint_value( | ||
| 189 | + name = "armv7k", | ||
| 190 | + constraint_setting = ":cpu", | ||
| 191 | +) | ||
| 192 | + | ||
| 193 | +constraint_value( | ||
| 194 | + name = "i386", | ||
| 195 | + constraint_setting = ":cpu", | ||
| 196 | +) | ||
| 197 | + | ||
| 198 | +constraint_value( | ||
| 199 | + name = "ppc", | ||
| 200 | + constraint_setting = ":cpu", | ||
| 201 | +) | ||
| 202 | + | ||
| 203 | +constraint_value( | ||
| 204 | + name = "s390x", | ||
| 205 | + constraint_setting = ":cpu", | ||
| 206 | +) | ||
| 207 | + | ||
| 208 | +constraint_value( | ||
| 209 | + name = "x86_32", | ||
| 210 | + constraint_setting = ":cpu", | ||
| 211 | +) | ||
| 212 | + | ||
| 213 | +constraint_value( | ||
| 214 | + name = "x86_64", | ||
| 215 | + constraint_setting = ":cpu", | ||
| 216 | +) | ||
| 217 | --- /dev/null | ||
| 218 | +++ b/mock_repos/platforms/os/BUILD | ||
| 219 | @@ -0,0 +1,78 @@ | ||
| 220 | +# Standard constraint_setting and constraint_values to be used in platforms. | ||
| 221 | +licenses(["notice"]) | ||
| 222 | + | ||
| 223 | +package( | ||
| 224 | + default_visibility = ["//visibility:public"], | ||
| 225 | +) | ||
| 226 | + | ||
| 227 | +filegroup( | ||
| 228 | + name = "srcs", | ||
| 229 | + srcs = glob(["**"]), | ||
| 230 | +) | ||
| 231 | + | ||
| 232 | +# To add a new constraint_value see https://github.com/bazelbuild/platforms. | ||
| 233 | +constraint_setting(name = "os") | ||
| 234 | + | ||
| 235 | +constraint_value( | ||
| 236 | + name = "freebsd", | ||
| 237 | + constraint_setting = ":os", | ||
| 238 | +) | ||
| 239 | + | ||
| 240 | +constraint_value( | ||
| 241 | + name = "openbsd", | ||
| 242 | + constraint_setting = ":os", | ||
| 243 | +) | ||
| 244 | + | ||
| 245 | +constraint_value( | ||
| 246 | + name = "android", | ||
| 247 | + constraint_setting = ":os", | ||
| 248 | +) | ||
| 249 | + | ||
| 250 | +constraint_value( | ||
| 251 | + name = "linux", | ||
| 252 | + constraint_setting = ":os", | ||
| 253 | +) | ||
| 254 | + | ||
| 255 | +constraint_value( | ||
| 256 | + name = "windows", | ||
| 257 | + constraint_setting = ":os", | ||
| 258 | +) | ||
| 259 | + | ||
| 260 | +# For platforms with no OS, like microcontrollers. | ||
| 261 | +constraint_value( | ||
| 262 | + name = "none", | ||
| 263 | + constraint_setting = ":os", | ||
| 264 | +) | ||
| 265 | + | ||
| 266 | +### Apple OS Values | ||
| 267 | + | ||
| 268 | +constraint_value( | ||
| 269 | + name = "ios", | ||
| 270 | + constraint_setting = ":os", | ||
| 271 | +) | ||
| 272 | + | ||
| 273 | +# TODO(b/138656886): Rename this to macos instead of osx. | ||
| 274 | +constraint_value( | ||
| 275 | + name = "osx", | ||
| 276 | + constraint_setting = ":os", | ||
| 277 | +) | ||
| 278 | + | ||
| 279 | +alias( | ||
| 280 | + name = "macos", | ||
| 281 | + actual = ":osx", | ||
| 282 | +) | ||
| 283 | + | ||
| 284 | +constraint_value( | ||
| 285 | + name = "tvos", | ||
| 286 | + constraint_setting = ":os", | ||
| 287 | +) | ||
| 288 | + | ||
| 289 | +constraint_value( | ||
| 290 | + name = "watchos", | ||
| 291 | + constraint_setting = ":os", | ||
| 292 | +) | ||
| 293 | + | ||
| 294 | +constraint_value( | ||
| 295 | + name = "qnx", | ||
| 296 | + constraint_setting = ":os", | ||
| 297 | +) | ||
| 298 | --- /dev/null | ||
| 299 | +++ b/mock_repos/remote_java_tools_linux/BUILD | ||
| 300 | @@ -0,0 +1,7 @@ | ||
| 301 | +package(default_visibility = ["//visibility:public"]) | ||
| 302 | + | ||
| 303 | +filegroup( | ||
| 304 | + name = "JacocoCoverage", | ||
| 305 | + srcs = ["java_tools/JacocoCoverage_jarjar_deploy.jar"], | ||
| 306 | +) | ||
| 307 | + | ||
| 308 | --- /dev/null | ||
| 309 | +++ b/mock_repos/remote_java_tools_linux/WORKSPACE | ||
| 310 | @@ -0,0 +1 @@ | ||
| 311 | + | ||
| 312 | --- /dev/null | ||
| 313 | +++ b/mock_repos/rules_cc/WORKSPACE | ||
| 314 | @@ -0,0 +1 @@ | ||
| 315 | + | ||
| 316 | --- /dev/null | ||
| 317 | +++ b/mock_repos/rules_cc/cc/BUILD | ||
| 318 | @@ -0,0 +1 @@ | ||
| 319 | + | ||
| 320 | --- /dev/null | ||
| 321 | +++ b/mock_repos/rules_cc/cc/defs.bzl | ||
| 322 | @@ -0,0 +1,36 @@ | ||
| 323 | +# Copyright 2020 The Bazel Authors. All rights reserved. | ||
| 324 | +# | ||
| 325 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 326 | +# you may not use this file except in compliance with the License. | ||
| 327 | +# You may obtain a copy of the License at | ||
| 328 | +# | ||
| 329 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 330 | +# | ||
| 331 | +# Unless required by applicable law or agreed to in writing, software | ||
| 332 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 333 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 334 | +# See the License for the specific language governing permissions and | ||
| 335 | +# limitations under the License. | ||
| 336 | + | ||
| 337 | +"""Mocks rules defined in rules_cc.""" | ||
| 338 | + | ||
| 339 | +def cc_binary(**kwargs): | ||
| 340 | + native.cc_binary(**kwargs) | ||
| 341 | + | ||
| 342 | +def cc_library(**kwargs): | ||
| 343 | + native.cc_library(**kwargs) | ||
| 344 | + | ||
| 345 | +def cc_test(**kwargs): | ||
| 346 | + native.cc_test(**kwargs) | ||
| 347 | + | ||
| 348 | +def objc_library(**kwargs): | ||
| 349 | + native.objc_library(**kwargs) | ||
| 350 | + | ||
| 351 | +def cc_proto_library(**kwargs): | ||
| 352 | + native.cc_proto_library(**kwargs) | ||
| 353 | + | ||
| 354 | +def cc_toolchain(**kwargs): | ||
| 355 | + native.cc_toolchain(**kwargs) | ||
| 356 | + | ||
| 357 | +def cc_toolchain_suite(**kwargs): | ||
| 358 | + native.cc_toolchain_suite(**kwargs) | ||
| 359 | --- /dev/null | ||
| 360 | +++ b/mock_repos/rules_java/WORKSPACE | ||
| 361 | @@ -0,0 +1 @@ | ||
| 362 | + | ||
| 363 | --- /dev/null | ||
| 364 | +++ b/mock_repos/rules_java/java/BUILD | ||
| 365 | @@ -0,0 +1 @@ | ||
| 366 | + | ||
| 367 | --- /dev/null | ||
| 368 | +++ b/mock_repos/rules_java/java/defs.bzl | ||
| 369 | @@ -0,0 +1,39 @@ | ||
| 370 | +# Copyright 2020 The Bazel Authors. All rights reserved. | ||
| 371 | +# | ||
| 372 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 373 | +# you may not use this file except in compliance with the License. | ||
| 374 | +# You may obtain a copy of the License at | ||
| 375 | +# | ||
| 376 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 377 | +# | ||
| 378 | +# Unless required by applicable law or agreed to in writing, software | ||
| 379 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 380 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 381 | +# See the License for the specific language governing permissions and | ||
| 382 | +# limitations under the License. | ||
| 383 | + | ||
| 384 | +"""Mocks rules defined in rules_java.""" | ||
| 385 | + | ||
| 386 | +def java_binary(**kwargs): | ||
| 387 | + native.java_binary(**kwargs) | ||
| 388 | + | ||
| 389 | +def java_library(**kwargs): | ||
| 390 | + native.java_library(**kwargs) | ||
| 391 | + | ||
| 392 | +def java_test(**kwargs): | ||
| 393 | + native.java_test(**kwargs) | ||
| 394 | + | ||
| 395 | +def java_proto_library(**kwargs): | ||
| 396 | + native.java_proto_library(**kwargs) | ||
| 397 | + | ||
| 398 | +def java_import(**kwargs): | ||
| 399 | + native.java_import(**kwargs) | ||
| 400 | + | ||
| 401 | +def java_toolchain(**kwargs): | ||
| 402 | + native.java_toolchain(**kwargs) | ||
| 403 | + | ||
| 404 | +def java_runtime(**kwargs): | ||
| 405 | + native.java_runtime(**kwargs) | ||
| 406 | + | ||
| 407 | +def java_plugin(**kwargs): | ||
| 408 | + native.java_plugin(**kwargs) | ||
| 409 | --- /dev/null | ||
| 410 | +++ b/mock_repos/rules_pkg/BUILD | ||
| 411 | @@ -0,0 +1 @@ | ||
| 412 | + | ||
| 413 | --- /dev/null | ||
| 414 | +++ b/mock_repos/rules_pkg/WORKSPACE | ||
| 415 | @@ -0,0 +1 @@ | ||
| 416 | + | ||
| 417 | --- /dev/null | ||
| 418 | +++ b/mock_repos/rules_pkg/deps.bzl | ||
| 419 | @@ -0,0 +1,18 @@ | ||
| 420 | +# Copyright 2020 The Bazel Authors. All rights reserved. | ||
| 421 | +# | ||
| 422 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 423 | +# you may not use this file except in compliance with the License. | ||
| 424 | +# You may obtain a copy of the License at | ||
| 425 | +# | ||
| 426 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 427 | +# | ||
| 428 | +# Unless required by applicable law or agreed to in writing, software | ||
| 429 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 430 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 431 | +# See the License for the specific language governing permissions and | ||
| 432 | +# limitations under the License. | ||
| 433 | + | ||
| 434 | +"""Mocks rules defined in rules_pkg.""" | ||
| 435 | + | ||
| 436 | +def rules_pkg_dependencies(**kwargs): | ||
| 437 | + pass | ||
| 438 | --- /dev/null | ||
| 439 | +++ b/mock_repos/rules_pkg/pkg.bzl | ||
| 440 | @@ -0,0 +1,18 @@ | ||
| 441 | +# Copyright 2020 The Bazel Authors. All rights reserved. | ||
| 442 | +# | ||
| 443 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 444 | +# you may not use this file except in compliance with the License. | ||
| 445 | +# You may obtain a copy of the License at | ||
| 446 | +# | ||
| 447 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 448 | +# | ||
| 449 | +# Unless required by applicable law or agreed to in writing, software | ||
| 450 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 451 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 452 | +# See the License for the specific language governing permissions and | ||
| 453 | +# limitations under the License. | ||
| 454 | + | ||
| 455 | +"""Mocks rules defined in rules_pkg.""" | ||
| 456 | + | ||
| 457 | +def pkg_tar(**kwargs): | ||
| 458 | + pass | ||
| 459 | --- /dev/null | ||
| 460 | +++ b/mock_repos/rules_proto/WORKSPACE | ||
| 461 | @@ -0,0 +1 @@ | ||
| 462 | +workspace(name = "rules_proto") | ||
| 463 | --- /dev/null | ||
| 464 | +++ b/mock_repos/rules_proto/proto/BUILD | ||
| 465 | @@ -0,0 +1 @@ | ||
| 466 | +# Intentionally left empty (for now). | ||
| 467 | --- /dev/null | ||
| 468 | +++ b/mock_repos/rules_proto/proto/defs.bzl | ||
| 469 | @@ -0,0 +1,27 @@ | ||
| 470 | +# Copyright 2019 The Bazel Authors. All rights reserved. | ||
| 471 | +# | ||
| 472 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 473 | +# you may not use this file except in compliance with the License. | ||
| 474 | +# You may obtain a copy of the License at | ||
| 475 | +# | ||
| 476 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 477 | +# | ||
| 478 | +# Unless required by applicable law or agreed to in writing, software | ||
| 479 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 480 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 481 | +# See the License for the specific language governing permissions and | ||
| 482 | +# limitations under the License. | ||
| 483 | + | ||
| 484 | +load("//proto/private:native.bzl", "NativeProtoInfo", "native_proto_common") | ||
| 485 | + | ||
| 486 | +def proto_lang_toolchain(**attrs): | ||
| 487 | + native.proto_lang_toolchain(**attrs) | ||
| 488 | + | ||
| 489 | +def proto_library(**attrs): | ||
| 490 | + native.proto_library(**attrs) | ||
| 491 | + | ||
| 492 | +ProtoInfo = NativeProtoInfo | ||
| 493 | +"""Encapsulates information provided by `proto_library`. | ||
| 494 | + | ||
| 495 | +https://docs.bazel.build/versions/master/skylark/lib/ProtoInfo.html | ||
| 496 | +""" | ||
| 497 | --- /dev/null | ||
| 498 | +++ b/mock_repos/rules_proto/proto/private/BUILD | ||
| 499 | @@ -0,0 +1 @@ | ||
| 500 | +# Intentionally left empty (for now). | ||
| 501 | --- /dev/null | ||
| 502 | +++ b/mock_repos/rules_proto/proto/private/native.bzl | ||
| 503 | @@ -0,0 +1,24 @@ | ||
| 504 | +# Copyright 2019 The Bazel Authors. All rights reserved. | ||
| 505 | +# | ||
| 506 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 507 | +# you may not use this file except in compliance with the License. | ||
| 508 | +# You may obtain a copy of the License at | ||
| 509 | +# | ||
| 510 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 511 | +# | ||
| 512 | +# Unless required by applicable law or agreed to in writing, software | ||
| 513 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 514 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 515 | +# See the License for the specific language governing permissions and | ||
| 516 | +# limitations under the License. | ||
| 517 | + | ||
| 518 | +# Redefine native symbols with a new name as a workaround for | ||
| 519 | +# exporting them in `//proto:defs.bzl` with their original name. | ||
| 520 | +# | ||
| 521 | +# While we cannot force users to load these symbol due to the lack of a | ||
| 522 | +# whitelisting mechanism, we can still export them and tell users to | ||
| 523 | +# load it to make a future migration to pure Starlark easier. | ||
| 524 | + | ||
| 525 | +NativeProtoInfo = ProtoInfo | ||
| 526 | + | ||
| 527 | +native_proto_common = proto_common | ||
diff --git a/patches/bazel-workspace.patch b/patches/bazel-workspace.patch new file mode 100644 index 0000000..552b9dc --- /dev/null +++ b/patches/bazel-workspace.patch | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | Adapted from https://salsa.debian.org/bazel-team/bazel-bootstrap/-/raw/2e1af7d3d0ec789a71c16f5ecd07232efc0f262a/debian/patches/WORKSPACE.patch | ||
| 2 | |||
| 3 | Description: Debian-specific fixes in WORKSPACE file | ||
| 4 | Bazel needs to download some dependencies just to properly parse the | ||
| 5 | WORKSPACE file. We comment some load statements so that it won’t download | ||
| 6 | the things we don’t need for building Bazel binary. Also, remove @io_bazel | ||
| 7 | reference that was causing ccache failures. | ||
| 8 | Author: Yun Peng <pcloudy@google.com> | ||
| 9 | Origin: upstream, https://github.com/meteorcloudy/bazel/commit/1c38681aec9dee4eeeeac6196154c01e67878d65 | ||
| 10 | Forwarded: not-needed | ||
| 11 | Last-Update: 2020-07-22 | ||
| 12 | |||
| 13 | --- a/WORKSPACE | ||
| 14 | +++ b/WORKSPACE | ||
| 15 | @@ -1188,22 +1170,6 @@ | ||
| 16 | |||
| 17 | stardoc_repositories() | ||
| 18 | |||
| 19 | -load("@io_bazel_rules_sass//:package.bzl", "rules_sass_dependencies") | ||
| 20 | - | ||
| 21 | -rules_sass_dependencies() | ||
| 22 | - | ||
| 23 | -load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies") | ||
| 24 | - | ||
| 25 | -build_bazel_rules_nodejs_dependencies() | ||
| 26 | - | ||
| 27 | -load("@build_bazel_rules_nodejs//:index.bzl", "node_repositories") | ||
| 28 | - | ||
| 29 | -node_repositories() | ||
| 30 | - | ||
| 31 | -load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories") | ||
| 32 | - | ||
| 33 | -sass_repositories() | ||
| 34 | - | ||
| 35 | register_execution_platforms("//:default_host_platform") # buildozer: disable=positional-args | ||
| 36 | |||
| 37 | # Tools for building deb, rpm and tar files. | ||
| 38 | @@ -1241,20 +1211,6 @@ | ||
| 39 | ], | ||
| 40 | ) | ||
| 41 | |||
| 42 | -# Projects using gRPC as an external dependency must call both grpc_deps() and | ||
| 43 | -# grpc_extra_deps(). | ||
| 44 | -load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") | ||
| 45 | - | ||
| 46 | -grpc_deps() | ||
| 47 | - | ||
| 48 | -load("@com_github_grpc_grpc//bazel:grpc_extra_deps.bzl", "grpc_extra_deps") | ||
| 49 | - | ||
| 50 | -grpc_extra_deps() | ||
| 51 | - | ||
| 52 | load("//tools/distributions/debian:deps.bzl", "debian_deps") | ||
| 53 | |||
| 54 | debian_deps() | ||
| 55 | - | ||
| 56 | -load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") | ||
| 57 | - | ||
| 58 | -bazel_skylib_workspace() | ||
