gvisor/bazel: use python2 to build runsc-debian
$ bazel build runsc:runsc-debian File ".../bazel_tools/tools/build_defs/pkg/make_deb.py", line 311, in GetFlagValue: flagvalue = flagvalue.decode('utf-8') AttributeError: 'str' object has no attribute 'decode' make_deb.py is incompatible with Python3. https://github.com/bazelbuild/bazel/issues/8443 PiperOrigin-RevId: 253691923
This commit is contained in:
parent
99d286370d
commit
66cc0e9f92
|
@ -1,6 +1,6 @@
|
|||
FROM ubuntu:bionic
|
||||
|
||||
RUN apt-get update && apt-get install -y curl gnupg2 git
|
||||
RUN apt-get update && apt-get install -y curl gnupg2 git python3
|
||||
RUN echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list && \
|
||||
curl https://bazel.build/bazel-release.pub.gpg | apt-key add -
|
||||
RUN apt-get update && apt-get install -y bazel && apt-get clean
|
||||
|
|
|
@ -96,6 +96,11 @@ pkg_deb(
|
|||
maintainer = "The gVisor Authors <gvisor-dev@googlegroups.com>",
|
||||
package = "runsc",
|
||||
postinst = "debian/postinst.sh",
|
||||
tags = [
|
||||
# TODO(b/135475885): pkg_deb requires python2:
|
||||
# https://github.com/bazelbuild/bazel/issues/8443
|
||||
"manual",
|
||||
],
|
||||
version_file = ":version.txt",
|
||||
visibility = [
|
||||
"//visibility:public",
|
||||
|
|
|
@ -92,6 +92,14 @@ build_everything() {
|
|||
"${BUILD_PACKAGES[@]}"
|
||||
}
|
||||
|
||||
build_runsc_debian() {
|
||||
cd ${WORKSPACE_DIR}
|
||||
|
||||
# TODO(b/135475885): pkg_deb is incompatible with Python3.
|
||||
# https://github.com/bazelbuild/bazel/issues/8443
|
||||
bazel build --host_force_python=py2 runsc:runsc-debian
|
||||
}
|
||||
|
||||
# Run simple tests runs the tests that require no special setup or
|
||||
# configuration.
|
||||
run_simple_tests() {
|
||||
|
@ -277,6 +285,8 @@ main() {
|
|||
run_syscall_tests
|
||||
run_runsc_do_tests
|
||||
|
||||
build_runsc_debian
|
||||
|
||||
# Build other flavors too.
|
||||
build_everything dbg
|
||||
|
||||
|
|
Loading…
Reference in New Issue