FreeBSD Bugzilla – Attachment 231204 Details for
Bug 261363
devel/bazel: update to 5.0.0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Refreshed patch for devel/bazel to update to 5.0.0
bazel.diff (text/plain), 12.33 KB, created by
Klaus Aehlig
on 2022-01-21 08:00:48 UTC
(
hide
)
Description:
Refreshed patch for devel/bazel to update to 5.0.0
Filename:
MIME Type:
Creator:
Klaus Aehlig
Created:
2022-01-21 08:00:48 UTC
Size:
12.33 KB
patch
obsolete
>diff -ruN bazel.orig/Makefile bazel/Makefile >--- bazel.orig/Makefile 2022-01-21 08:45:28.483477000 +0100 >+++ bazel/Makefile 2022-01-21 08:45:34.451863000 +0100 >@@ -1,7 +1,7 @@ > # Created by: Klaus Aehlig <aehlig@linta.de> > > PORTNAME= bazel >-DISTVERSION= 4.2.1 >+DISTVERSION= 5.0.0 > CATEGORIES= devel java > MASTER_SITES= https://storage.googleapis.com/bazel/${PORTVERSION}/rc${FINALRC}/ > DISTNAME= bazel-${PORTVERSION}rc${FINALRC}-dist >@@ -25,7 +25,7 @@ > CPE_VENDOR= google > > USE_JAVA= yes >-JAVA_VERSION= 1.8 >+JAVA_VERSION= 11 > JAVA_VENDOR= openjdk > JAVA_BUILD= yes > JAVA_RUN= yes >@@ -40,7 +40,7 @@ > # In bazel, a release is always code-wise identical to the final release candidate. > # Hence we can also download that one and so have a simple way to also test earlier release > # candidates. >-FINALRC= 2 >+FINALRC= 4 > > .include <bsd.port.pre.mk> > >@@ -55,6 +55,7 @@ > pre-patch: > @${CP} ${FILESDIR}/extra-patch-absl_base_internal_unscaledcycleclock.cc \ > ${FILESDIR}/extra-patch-bazel_grpc__deps.bzl \ >+ ${FILESDIR}/extra-patch-bazel_build_defs.bzl \ > ${WRKSRC}/third_party/grpc/ > > # Have the location of the system-wide rc file reside ${ETCDIR}. >@@ -65,7 +66,8 @@ > -e "s|/etc/bazel.bazelrc|${ETCDIR}/bazel.bazelrc|" \ > ${WRKSRC}/src/main/cpp/BUILD > @${ECHO_CMD} build --strategy=Javac=standalone >> ${WRKSRC}/scripts/packages/bazel.bazelrc >- @${ECHO_CMD} build --host_javabase=@local_jdk//:jdk >> ${WRKSRC}/scripts/packages/bazel.bazelrc >+ @${ECHO_CMD} build --java_runtime_version=${JAVA_VERSION} >> ${WRKSRC}/scripts/packages/bazel.bazelrc >+ @${ECHO_CMD} build --tool_java_runtime_version=${JAVA_VERSION} >> ${WRKSRC}/scripts/packages/bazel.bazelrc > @${ECHO_CMD} build --action_env=PATH=/bin:/usr/bin/:${LOCALBASE}/bin >> ${WRKSRC}/scripts/packages/bazel.bazelrc > @${REINPLACE_CMD} \ > -e 's|^\(PYTHON_BIN=.*\)|if [ "%VERSION%" = "3" ] ; then PYTHON_BIN=${PYTHON_CMD}; else \1 ; fi|' \ >@@ -73,6 +75,9 @@ > @${REINPLACE_CMD} \ > -e 's|%%PYTHON_CMD%%|${PYTHON_CMD}|' \ > ${WRKSRC}/src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java >+ @${REINPLACE_CMD} \ >+ -e 's|%%JAVA_HOME%%|${JAVA_HOME}|' \ >+ ${WRKSRC}/src/main/cpp/blaze_util_bsd.cc > > do-build: > @${MKDIR} ${WRKDIR}/bazel_tmp >@@ -82,12 +87,14 @@ > fi ; \ > cd ${WRKSRC} && \ > ${SETENV} BAZEL_SH=${LOCALBASE}/bin/bash \ >+ JAVA_HOME=${JAVA_HOME} \ >+ JAVA_VERSION=${JAVA_VERSION} \ > TMPDIR=${WRKDIR}/bazel_tmp \ > EMBED_LABEL='${PORTVERSION}' \ > PATH=${LOCALBASE}/bin:$$PATH \ > SOURCE_DATE_EPOCH=$${SOURCE_DATE_EPOCH} \ > BAZEL_JAVAC_OPTS=${BAZEL_JAVAC_OPTS} \ >- EXTRA_BAZEL_ARGS=--host_javabase=@local_jdk//:jdk \ >+ EXTRA_BAZEL_ARGS='--host_javabase=@local_jdk//:jdk --tool_java_runtime_version=local_jdk --java_language_version=${JAVA_VERSION} --tool_java_language_version=${JAVA_VERSION}' \ > ${LOCALBASE}/bin/bash ./compile.sh) > > do-install: >diff -ruN bazel.orig/distinfo bazel/distinfo >--- bazel.orig/distinfo 2022-01-21 08:45:28.490363000 +0100 >+++ bazel/distinfo 2022-01-21 08:45:34.451924000 +0100 >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1630150517 >-SHA256 (bazel-4.2.1rc2-dist.zip) = d92998f7503a74e9e4f8aef5c81d85849abfed51d9d8fb622103c4eb5d1330a7 >-SIZE (bazel-4.2.1rc2-dist.zip) = 279265298 >+TIMESTAMP = 1642256198 >+SHA256 (bazel-5.0.0rc4-dist.zip) = c077713b8ee63691b0d5a658ddb6daf879f6082d3cbdd6d610d79f250675350b >+SIZE (bazel-5.0.0rc4-dist.zip) = 235869975 >diff -ruN bazel.orig/files/extra-patch-bazel_build_defs.bzl bazel/files/extra-patch-bazel_build_defs.bzl >--- bazel.orig/files/extra-patch-bazel_build_defs.bzl 1970-01-01 01:00:00.000000000 +0100 >+++ bazel/files/extra-patch-bazel_build_defs.bzl 2022-01-21 08:45:34.451801000 +0100 >@@ -0,0 +1,10 @@ >+--- bazel/build_defs.bzl.orig 2022-01-20 13:04:32.306692000 +0100 >++++ bazel/build_defs.bzl 2022-01-20 13:05:02.002057000 +0100 >+@@ -35,6 +35,7 @@ >+ # "-Wshorten-64-to-32", # not in GCC (and my Kokoro images doesn't have Clang) >+ "-Werror", >+ "-Wno-long-long", >++ "-Wno-deprecated-copy", >+ # copybara:strip_end >+ ], >+ }) >diff -ruN bazel.orig/files/extra-patch-bazel_grpc__deps.bzl bazel/files/extra-patch-bazel_grpc__deps.bzl >--- bazel.orig/files/extra-patch-bazel_grpc__deps.bzl 2022-01-21 08:45:28.492394000 +0100 >+++ bazel/files/extra-patch-bazel_grpc__deps.bzl 2022-01-21 08:45:34.451736000 +0100 >@@ -1,10 +1,18 @@ >---- a/bazel/grpc_deps.bzl.orig 2021-10-11 15:54:07.083144000 +0200 >-+++ b/bazel/grpc_deps.bzl 2021-10-11 16:02:48.722952000 +0200 >-@@ -239,6 +239,7 @@ >- if "com_google_absl" not in native.existing_rules(): >+--- a/bazel/grpc_deps.bzl >++++ b/bazel/grpc_deps.bzl >+@@ -284,6 +284,7 @@ > http_archive( > name = "com_google_absl", >+ sha256 = "35f22ef5cb286f09954b7cc4c85b5a3f6221c9d4df6b8c4a1e9d399555b366ee", > + patches = ["//third_party/grpc:extra-patch-absl_base_internal_unscaledcycleclock.cc"], >- sha256 = "f368a8476f4e2e0eccf8a7318b98dafbe30b2600f4e3cf52636e5eb145aba06a", >- strip_prefix = "abseil-cpp-df3ea785d8c30a9503321a3d35ee7d35808f190d", >+ strip_prefix = "abseil-cpp-997aaf3a28308eba1b9156aa35ab7bca9688e9f6", > urls = [ >+ "https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/997aaf3a28308eba1b9156aa35ab7bca9688e9f6.tar.gz", >+@@ -339,6 +340,7 @@ >+ http_archive( >+ name = "upb", >+ sha256 = "6a5f67874af66b239b709c572ac1a5a00fdb1b29beaf13c3e6f79b1ba10dc7c4", >++ patches = ["//third_party/grpc:extra-patch-bazel_build_defs.bzl"], >+ strip_prefix = "upb-2de300726a1ba2de9a468468dc5ff9ed17a3215f", >+ urls = [ >+ "https://storage.googleapis.com/grpc-bazel-mirror/github.com/protocolbuffers/upb/archive/2de300726a1ba2de9a468468dc5ff9ed17a3215f.tar.gz", >diff -ruN bazel.orig/files/patch-WORKSPACE bazel/files/patch-WORKSPACE >--- bazel.orig/files/patch-WORKSPACE 2022-01-21 08:45:28.501221000 +0100 >+++ bazel/files/patch-WORKSPACE 1970-01-01 01:00:00.000000000 +0100 >@@ -1,14 +0,0 @@ >---- WORKSPACE.orig 2021-10-11 09:54:26 UTC >-+++ WORKSPACE >-@@ -1232,7 +1232,10 @@ register_toolchains("//src/main/res:empty_rc_toolchain >- http_archive( >- name = "com_github_grpc_grpc", >- patch_args = ["-p1"], >-- patches = ["//third_party/grpc:grpc_1.33.1.patch"], >-+ patches = [ >-+ "//third_party/grpc:grpc_1.33.1.patch", >-+ "//third_party/grpc:extra-patch-bazel_grpc__deps.bzl", >-+ ], >- sha256 = "58eaee5c0f1bd0b92ebe1fa0606ec8f14798500620e7444726afcaf65041cb63", >- strip_prefix = "grpc-1.33.1", >- urls = [ >diff -ruN bazel.orig/files/patch-distdir_deps.bzl bazel/files/patch-distdir_deps.bzl >--- bazel.orig/files/patch-distdir_deps.bzl 1970-01-01 01:00:00.000000000 +0100 >+++ bazel/files/patch-distdir_deps.bzl 2022-01-21 08:45:34.451201000 +0100 >@@ -0,0 +1,10 @@ >+--- distdir_deps.bzl.orig 1979-12-31 23:00:00 UTC >++++ distdir_deps.bzl >+@@ -130,6 +130,7 @@ DIST_DEPS = { >+ "patch_args": ["-p1"], >+ "patches": [ >+ "//third_party/grpc:grpc_1.41.0.patch", >++ "//third_party/grpc:extra-patch-bazel_grpc__deps.bzl", >+ ], >+ "used_in": [ >+ "additional_distfiles", >diff -ruN bazel.orig/files/patch-scripts_bootstrap_BUILD.bootstrap bazel/files/patch-scripts_bootstrap_BUILD.bootstrap >--- bazel.orig/files/patch-scripts_bootstrap_BUILD.bootstrap 1970-01-01 01:00:00.000000000 +0100 >+++ bazel/files/patch-scripts_bootstrap_BUILD.bootstrap 2022-01-21 08:45:34.451535000 +0100 >@@ -0,0 +1,13 @@ >+--- scripts/bootstrap/BUILD.bootstrap.orig 1979-12-31 23:00:00 UTC >++++ scripts/bootstrap/BUILD.bootstrap >+@@ -16,8 +16,8 @@ default_java_toolchain( >+ "-XX:TieredStopAtLevel=1", >+ ], >+ singlejar = ["//src/tools/singlejar:singlejar"], >+- source_version = "8", >++ source_version = "11", >+ tags = ["manual"], >+- target_version = "8", >++ target_version = "11", >+ visibility = ["//visibility:public"], >+ ) >diff -ruN bazel.orig/files/patch-src_main_cpp_blaze_util_bsd.cc bazel/files/patch-src_main_cpp_blaze_util_bsd.cc >--- bazel.orig/files/patch-src_main_cpp_blaze_util_bsd.cc 1970-01-01 01:00:00.000000000 +0100 >+++ bazel/files/patch-src_main_cpp_blaze_util_bsd.cc 2022-01-21 08:45:34.451668000 +0100 >@@ -0,0 +1,11 @@ >+--- src/main/cpp/blaze_util_bsd.cc.orig 1979-12-31 23:00:00 UTC >++++ src/main/cpp/blaze_util_bsd.cc >+@@ -14,7 +14,7 @@ >+ >+ #if defined(__FreeBSD__) >+ # define HAVE_PROCSTAT >+-# define STANDARD_JAVABASE "/usr/local/openjdk8" >++# define STANDARD_JAVABASE "%%JAVA_HOME%%" >+ #elif defined(__OpenBSD__) >+ # define STANDARD_JAVABASE "/usr/local/jdk-1.8.0" >+ #else >diff -ruN bazel.orig/files/patch-src_main_java_com_google_devtools_build_lib_bazel_rules_python_BazelPythonSemantics.java bazel/files/patch-src_main_java_com_google_devtools_build_lib_bazel_rules_python_BazelPythonSemantics.java >--- bazel.orig/files/patch-src_main_java_com_google_devtools_build_lib_bazel_rules_python_BazelPythonSemantics.java 2022-01-21 08:45:28.491717000 +0100 >+++ bazel/files/patch-src_main_java_com_google_devtools_build_lib_bazel_rules_python_BazelPythonSemantics.java 2022-01-21 08:45:34.451269000 +0100 >@@ -1,13 +1,13 @@ > --- src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java.orig 1979-12-31 23:00:00 UTC > +++ src/main/java/com/google/devtools/build/lib/bazel/rules/python/BazelPythonSemantics.java >-@@ -247,9 +247,9 @@ public class BazelPythonSemantics implem >+@@ -238,9 +238,8 @@ >+ >+ if (OS.getCurrent() != OS.WINDOWS) { > PathFragment shExecutable = ShToolchain.getPathOrError(ruleContext); >- // TODO(#8685): Remove this special-case handling as part of making the proper shebang a >- // property of the Python toolchain configuration. >-- String pythonExecutableName = OS.getCurrent() == OS.OPENBSD ? "python3" : "python"; >-+ String pythonExecutableName = "%%PYTHON_CMD%%"; >- // NOTE: keep the following line intact to support nix builds >+- String pythonExecutableName = "python3"; >+- // NOTE: keep the following line intact to support nix builds > - String pythonShebang = "#!/usr/bin/env " + pythonExecutableName; >++ String pythonExecutableName = "%%PYTHON_CMD%%"; > + String pythonShebang = "#!" + pythonExecutableName; > ruleContext.registerAction( > new SpawnAction.Builder() >diff -ruN bazel.orig/files/patch-tools__jdk__default_java_toolchain.bzl bazel/files/patch-tools__jdk__default_java_toolchain.bzl >--- bazel.orig/files/patch-tools__jdk__default_java_toolchain.bzl 2022-01-21 08:45:28.500853000 +0100 >+++ bazel/files/patch-tools__jdk__default_java_toolchain.bzl 1970-01-01 01:00:00.000000000 +0100 >@@ -1,39 +0,0 @@ >---- tools/jdk/default_java_toolchain.bzl.orig 1979-12-31 23:00:00 UTC >-+++ tools/jdk/default_java_toolchain.bzl >-@@ -21,27 +21,6 @@ JDK8_JVM_OPTS = [ >- ] >- >- JDK9_JVM_OPTS = [ >-- # Allow JavaBuilder to access internal javac APIs. >-- "--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED", >-- "--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED", >-- "--add-exports=jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED", >-- "--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED", >-- "--add-exports=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED", >-- "--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED", >-- "--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED", >-- "--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED", >-- "--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED", >-- "--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED", >-- >-- # override the javac in the JDK. >-- "--patch-module=java.compiler=$(location @bazel_tools//tools/jdk:java_compiler_jar)", >-- "--patch-module=jdk.compiler=$(location @bazel_tools//tools/jdk:jdk_compiler_jar)", >-- >-- # quiet warnings from com.google.protobuf.UnsafeUtil, >-- # see: https://github.com/google/protobuf/issues/3781 >-- # and: https://github.com/bazelbuild/bazel/issues/5599 >-- "--add-opens=java.base/java.nio=ALL-UNNAMED", >-- "--add-opens=java.base/java.lang=ALL-UNNAMED", >- ] >- >- DEFAULT_JAVACOPTS = [ >-@@ -67,7 +46,7 @@ DEFAULT_TOOLCHAIN_CONFIGURATION = { >- "javac_supports_workers": 1, >- "jvm_opts": select({ >- "@bazel_tools//src/conditions:openbsd": JDK8_JVM_OPTS, >-- "//conditions:default": JDK9_JVM_OPTS, >-+ "//conditions:default": JDK8_JVM_OPTS, >- }), >- "misc": DEFAULT_JAVACOPTS, >- "singlejar": ["@bazel_tools//tools/jdk:singlejar"],
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
aehlig
:
maintainer-approval+
Actions:
View
|
Diff
Attachments on
bug 261363
:
231187
| 231204