Clean up unused experimental containers. (#250)
* Clean up unused experimental containers.
* Fix tests.
diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml
index 38ec123..3d7b701 100644
--- a/.bazelci/presubmit.yml
+++ b/.bazelci/presubmit.yml
@@ -18,7 +18,6 @@
- "//configs/ubuntu16_04_clang:msan-ubuntu16_04-clang-1.1-bazel_0.18.0-autoconfig_test"
- "//container/debian8/builders/rbe-debian8:toolchain-test"
- "//container/ubuntu16_04/builders/rbe-ubuntu16_04:toolchain-test"
- - "//container/experimental/rbe-debian9:toolchain-test"
- "//container/ubuntu16_04/builders/bazel:bazel_0.18.0-test"
- "//container/ubuntu16_04/builders/bazel_docker_gcloud:bazel_0.18.0_docker_gcloud-test"
- "//container/debian8/builders/bazel:bazel_0.18.0-test"
diff --git a/WORKSPACE b/WORKSPACE
index 8f5c685..9837304 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -15,10 +15,6 @@
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
load(
- "//rules/skylib:package_names.bzl",
- "jessie_package_names",
-)
-load(
"//repositories:repositories.bzl",
bazel_toolchains_repositories = "repositories",
)
@@ -46,16 +42,6 @@
go_register_toolchains()
-load(
- "@distroless//package_manager:package_manager.bzl",
- "dpkg_list",
- "dpkg_src",
- "package_manager_repositories",
-)
-
-# This is only needed by the old package manager.
-package_manager_repositories()
-
container_pull(
name = "official_jessie",
registry = "index.docker.io",
@@ -79,54 +65,6 @@
repository = "google/clang-debian8",
)
-# The Debian snapshot datetime to use.
-# This is kept up-to-date with https://github.com/GoogleCloudPlatform/base-images-docker/blob/master/WORKSPACE.
-DEB_SNAPSHOT = "20180312T052343Z"
-
-dpkg_src(
- name = "debian_jessie",
- arch = "amd64",
- distro = "jessie",
- sha256 = "20720c9367e9454dee3d173e4d3fd85ab5530292f4ec6654feb5a810b6bb37ce",
- snapshot = DEB_SNAPSHOT,
- url = "http://snapshot.debian.org/archive",
-)
-
-dpkg_src(
- name = "debian_jessie_backports",
- arch = "amd64",
- distro = "jessie-backports",
- sha256 = "28afadff87f53bcb754d571df4174f0b8cbabd1600be82a062932df6eb4b7b70",
- snapshot = DEB_SNAPSHOT,
- url = "http://snapshot.debian.org/archive",
-)
-
-dpkg_src(
- name = "debian_jessie_ca_certs",
- arch = "amd64",
- distro = "jessie",
- sha256 = "26e8275be588d35313eac65a1a88b17a1052eb323255048b13bdf0653421a9f2",
- snapshot = "20161107T033615Z",
- url = "http://snapshot.debian.org/archive",
-)
-
-dpkg_list(
- name = "jessie_package_bundle",
- packages = jessie_package_names(),
- sources = [
- "@debian_jessie//file:Packages.json",
- "@debian_jessie_backports//file:Packages.json",
- ],
-)
-
-dpkg_list(
- name = "jessie_ca_certs_package_bundle",
- packages = ["ca-certificates-java"],
- sources = [
- "@debian_jessie_ca_certs//file:Packages.json",
- ],
-)
-
# Test purpose only. bazel-toolchains repo at release for Bazel 0.10.0.
# https://github.com/bazelbuild/bazel-toolchains/releases/tag/acffd62
http_file(
diff --git a/container/build.py b/container/build.py
index b841445..662b62b 100644
--- a/container/build.py
+++ b/container/build.py
@@ -83,7 +83,7 @@
LATEST_BAZEL_VERSION = "0.19.2"
SUPPORTED_TYPES = [
- "rbe-debian8", "rbe-debian9", "rbe-ubuntu16_04", "ubuntu16_04-bazel",
+ "rbe-debian8", "rbe-ubuntu16_04", "ubuntu16_04-bazel",
"ubuntu16_04-bazel-docker-gcloud", "debian8-bazel", "ubuntu14_04-bazel"
]
@@ -95,7 +95,6 @@
# the package of target to build it.
TYPE_PACKAGE_MAP = {
"rbe-debian8": "container/debian8/builders/rbe-debian8",
- "rbe-debian9": "container/experimental/rbe-debian9",
"rbe-ubuntu16_04": "container/ubuntu16_04/builders/rbe-ubuntu16_04",
"ubuntu16_04-bazel": "container/ubuntu16_04/builders/bazel",
"ubuntu16_04-bazel-docker-gcloud":
@@ -107,7 +106,6 @@
# Map to store all supported container type and the name of target to build it.
TYPE_TARGET_MAP = {
"rbe-debian8": "toolchain",
- "rbe-debian9": "toolchain",
"rbe-ubuntu16_04": "toolchain",
"ubuntu16_04-bazel": "bazel_{}".format(LATEST_BAZEL_VERSION),
"ubuntu16_04-bazel-docker-gcloud":
@@ -120,8 +118,6 @@
TYPE_TARBALL_MAP = {
"rbe-debian8":
"toolchain-packages.tar",
- "rbe-debian9":
- "toolchain-packages.tar",
"rbe-ubuntu16_04":
"toolchain-packages.tar",
"ubuntu16_04-bazel":
diff --git a/container/common/rbe-base.yaml b/container/common/rbe-base.yaml
index 722c4c0..e63d44b 100644
--- a/container/common/rbe-base.yaml
+++ b/container/common/rbe-base.yaml
@@ -6,6 +6,10 @@
command: 'ar'
args: ['--version']
expectedOutput: ['GNU ar .*']
+- name: 'check-curl'
+ command: 'curl'
+ args: ['--version']
+ expectedOutput: ['curl .* \(x86_64-pc-linux-gnu\).*']
- name: 'check-ed'
command: 'ed'
args: ['--version']
diff --git a/container/debian8/builders/rbe-debian8/rbe-debian8.yaml b/container/debian8/builders/rbe-debian8/rbe-debian8.yaml
index 2cbc113..9e9547c 100644
--- a/container/debian8/builders/rbe-debian8/rbe-debian8.yaml
+++ b/container/debian8/builders/rbe-debian8/rbe-debian8.yaml
@@ -1,13 +1,5 @@
schemaVersion: "2.0.0"
-# This is failing in Debian9 base. Once resolved, move this test to
-# container/common/rbe-base.yaml.
-commandTests:
-- name: 'check-curl'
- command: 'curl'
- args: ['--version']
- expectedOutput: ['curl .* \(x86_64-pc-linux-gnu\).*']
-
metadataTest:
env:
- key: 'PATH'
diff --git a/container/experimental/rbe-debian8/BUILD b/container/experimental/rbe-debian8/BUILD
deleted file mode 100644
index e1c9414..0000000
--- a/container/experimental/rbe-debian8/BUILD
+++ /dev/null
@@ -1,137 +0,0 @@
-# Copyright 2017 The Bazel Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-licenses(["notice"]) # Apache 2.0
-
-package(default_visibility = ["//visibility:public"])
-
-load("@distroless//cacerts:cacerts.bzl", "cacerts")
-load("@jessie_package_bundle//file:packages.bzl", "packages")
-load(
- "//skylib:packages.bzl",
- "base_layer_packages",
- "clang_layer_packages",
- "java_layer_packages",
- "python_layer_packages",
-)
-load("@io_bazel_rules_docker//contrib:test.bzl", "container_test")
-load(
- "@io_bazel_rules_docker//container:container.bzl",
- "container_image",
- "container_layer",
-)
-load("//container/common/clang:clang.bzl", "clang_env")
-
-cacerts(
- name = "cacerts",
- deb = packages["ca-certificates"],
-)
-
-container_image(
- name = "toolchain",
- base = "@debian8//image",
- cmd = [
- "/bin/sh",
- "-c",
- "/bin/bash",
- ],
- env = {
- "LANG": "C.UTF-8",
- "LANGUAGE": "C.UTF-8",
- "LC_ALL": "C.UTF-8",
- },
- layers = [
- "base-ltl",
- "clang-ltl",
- "python-ltl",
- "go-ltl",
- "java-ltl",
- ],
- tags = ["manual"],
-)
-
-container_layer(
- name = "base-ltl",
- debs = base_layer_packages(),
- tags = ["manual"],
- tars = [
- ":cacerts.tar",
- ],
-)
-
-container_layer(
- name = "clang-ltl",
- debs = clang_layer_packages(),
- env = clang_env,
- tags = ["manual"],
- tars = [
- "//third_party/clang:debian8_tar",
- "//third_party/libcxx:debian8_tar",
- ],
-)
-
-container_layer(
- name = "go-ltl",
- env = {
- "GOPATH": "/go",
- "PATH": "$PATH:/usr/local/go/bin",
- },
- tags = ["manual"],
- tars = ["//third_party/golang:tar"],
-)
-
-container_layer(
- name = "java-ltl",
- debs = java_layer_packages(),
- env = {
- "JAVA_HOME": "/usr/lib/jvm/java-8-openjdk-amd64",
- },
- symlinks = {
- "/usr/bin/java": "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java",
- },
- tags = ["manual"],
-)
-
-container_layer(
- name = "python-ltl",
- debs = python_layer_packages(),
- env = {
- "PATH": "$PATH:/opt/python3.6/bin",
- },
- symlinks = {
- "/usr/bin/python": "/usr/bin/python2.7",
- "/usr/bin/python3": "/opt/python3.6/bin/python3.6",
- "/opt/python3.6/bin/python3": "/opt/python3.6/bin/python3.6",
- "/opt/python3.6/bin/pip3": "/opt/python3.6/bin/pip3.6",
- "/opt/python3.6/bin/easy_install3": "/opt/python3.6/bin/easy_install-3.6",
- },
- tags = ["manual"],
- tars = ["//third_party/python:debian8_tar"],
-)
-
-container_test(
- name = "toolchain-test",
- configs = [
- "//container/common:go.yaml",
- "//container/common:java.yaml",
- "//container/common:python2.yaml",
- "//container/common:python3.yaml",
- "//container/common:rbe-base.yaml",
- "//container/common/clang:clang.yaml",
- "//container/debian8:debian8.yaml",
- "//container/debian8/builders/rbe-debian8:rbe-debian8.yaml",
- ],
- image = ":toolchain",
- verbose = True,
-)
diff --git a/container/experimental/rbe-debian9/BUILD b/container/experimental/rbe-debian9/BUILD
deleted file mode 100644
index 13f5ccc..0000000
--- a/container/experimental/rbe-debian9/BUILD
+++ /dev/null
@@ -1,171 +0,0 @@
-# Copyright 2017 The Bazel Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-licenses(["notice"]) # Apache 2.0
-
-package(default_visibility = ["//visibility:public"])
-
-load(
- "//rules/container:docker_toolchains.bzl",
- "language_tool_layer",
- "toolchain_container",
-)
-load("@io_bazel_rules_docker//contrib:test.bzl", "container_test")
-load("//container/common/clang:clang.bzl", "clang_env")
-
-JAVA_CLEANUP_COMMANDS = (
- "rm -rf " +
- "/etc/ssl/certs/java/cacerts " +
- "/tmp/hsperfdata_root/* " +
- "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/classes.jsa"
-)
-
-PYTHON_CLEANUP_COMMANDS = (
- "find /usr/lib/python* -name __pycache__ -exec rm -rf {} +"
-)
-
-toolchain_container(
- name = "toolchain",
- base = "@debian9//image",
- cmd = [
- "/bin/sh",
- "-c",
- "/bin/bash",
- ],
- env = {
- # PATH envvar is a special case, and currently only the one in the
- # topmost layer is set. So that we override it here to include all.
- "PATH": "$PATH:/usr/local/go/bin",
- "LANG": "C.UTF-8",
- "LANGUAGE": "C.UTF-8",
- "LC_ALL": "C.UTF-8",
- },
- language_layers = [
- "base-ltl",
- "clang-ltl",
- "go-ltl",
- "java-ltl",
- "java10-ltl",
- "python-ltl",
- ],
-)
-
-language_tool_layer(
- name = "base-ltl",
- base = "@debian9//image",
- packages = [
- "binutils",
- "ca-certificates",
- "curl",
- "ed",
- "file",
- "git",
- "less",
- "netcat",
- "openssh-client",
- "patch",
- "unzip",
- "wget",
- "zip",
- ],
-)
-
-language_tool_layer(
- name = "clang-ltl",
- base = "@debian9//image",
- env = clang_env,
- packages = [
- "libstdc++-6-dev",
- ],
- tars = [
- "//third_party/clang:debian9_tar",
- "//third_party/libcxx:debian9_tar",
- ],
-)
-
-language_tool_layer(
- name = "go-ltl",
- base = "@debian9//image",
- env = {
- "GOPATH": "/go",
- "PATH": "$PATH:/usr/local/go/bin",
- },
- tars = ["//third_party/golang:tar"],
-)
-
-language_tool_layer(
- name = "java-ltl",
- additional_repos = [
- "deb http://deb.debian.org/debian stretch-backports main",
- ],
- base = "@debian9//image",
- env = {
- "JAVA_HOME": "/usr/lib/jvm/java-8-openjdk-amd64",
- },
- installation_cleanup_commands = JAVA_CLEANUP_COMMANDS,
- packages = [
- "ca-certificates-java",
- "openjdk-8-jdk-headless",
- "openjdk-8-jre-headless",
- ],
- symlinks = {
- "/usr/bin/java": "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java",
- },
-)
-
-language_tool_layer(
- name = "java10-ltl",
- base = "@debian9//image",
- tars = [
- "//third_party/openjdk:open_jdk_tar",
- "//third_party/openjdk:open_jdk_src_tar",
- ],
-)
-
-language_tool_layer(
- name = "python-ltl",
- additional_repos = [
- "deb http://httpredir.debian.org/debian testing main",
- ],
- base = "@debian9//image",
- installation_cleanup_commands = PYTHON_CLEANUP_COMMANDS,
- packages = [
- "python-dev",
- "python-numpy",
- "python-pip",
- "python-setuptools",
- "python3.6",
- "python3.6-dev",
- "python3-numpy",
- "python3-pip",
- "python3-setuptools",
- ],
- symlinks = {
- "/usr/bin/python": "/usr/bin/python2.7",
- },
-)
-
-container_test(
- name = "toolchain-test",
- configs = [
- ":rbe-debian9.yaml",
- "//container/common:go.yaml",
- "//container/common:java.yaml",
- "//container/common:python2.yaml",
- "//container/common:rbe-base.yaml",
- "//container/common/clang:clang.yaml",
- ],
- image = ":toolchain",
- verbose = True,
-)
diff --git a/container/experimental/rbe-debian9/rbe-debian9.yaml b/container/experimental/rbe-debian9/rbe-debian9.yaml
deleted file mode 100644
index 228ff5f..0000000
--- a/container/experimental/rbe-debian9/rbe-debian9.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
-schemaVersion: "2.0.0"
-
-# Distro-specific tests
-fileContentTests:
-- name: 'os-version'
- expectedContents: ['Debian GNU/Linux 9']
- path: '/etc/issue.net'
-
-fileExistenceTests:
-- name: 'Python3'
- path: '/usr/bin/python3'
- shouldExist: true
-
-commandTests:
-- name: 'python3-version'
- command: 'python3'
- args: ['-V']
- expectedOutput: ['Python 3.6.*']
-
-metadataTest:
- env:
- - key: 'PATH'
- value: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/go/bin'
diff --git a/container/test/BUILD b/container/test/BUILD
deleted file mode 100644
index 263db40..0000000
--- a/container/test/BUILD
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright 2017 The Bazel Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-licenses(["notice"]) # Apache 2.0
-
-package(default_visibility = ["//visibility:public"])
-
-exports_files(glob(["**"]))
diff --git a/container/ubuntu16_04/builders/rbe-ubuntu16_04/rbe-ubuntu16_04.yaml b/container/ubuntu16_04/builders/rbe-ubuntu16_04/rbe-ubuntu16_04.yaml
index 2cbc113..9e9547c 100644
--- a/container/ubuntu16_04/builders/rbe-ubuntu16_04/rbe-ubuntu16_04.yaml
+++ b/container/ubuntu16_04/builders/rbe-ubuntu16_04/rbe-ubuntu16_04.yaml
@@ -1,13 +1,5 @@
schemaVersion: "2.0.0"
-# This is failing in Debian9 base. Once resolved, move this test to
-# container/common/rbe-base.yaml.
-commandTests:
-- name: 'check-curl'
- command: 'curl'
- args: ['--version']
- expectedOutput: ['curl .* \(x86_64-pc-linux-gnu\).*']
-
metadataTest:
env:
- key: 'PATH'
diff --git a/repositories/images.bzl b/repositories/images.bzl
index 97b5f9d..c93a49c 100644
--- a/repositories/images.bzl
+++ b/repositories/images.bzl
@@ -77,14 +77,6 @@
repository = "google/debian8",
)
- if "debian9" not in excludes:
- container_pull(
- name = "debian9",
- digest = toolchain_container_sha256s()["debian9"],
- registry = "marketplace.gcr.io",
- repository = "google/debian9",
- )
-
if "ubuntu16_04" not in excludes:
container_pull(
name = "ubuntu16_04",
diff --git a/repositories/repositories.bzl b/repositories/repositories.bzl
index 0647915..7b7c013 100644
--- a/repositories/repositories.bzl
+++ b/repositories/repositories.bzl
@@ -29,13 +29,11 @@
"//third_party/clang:revision.bzl",
"CLANG_REVISION",
"DEBIAN8_CLANG_SHA256",
- "DEBIAN9_CLANG_SHA256",
"UBUNTU16_04_CLANG_SHA256",
)
load(
"//third_party/libcxx:revision.bzl",
"DEBIAN8_LIBCXX_SHA256",
- "DEBIAN9_LIBCXX_SHA256",
"LIBCXX_REVISION",
"UBUNTU16_04_LIBCXX_SHA256",
)
@@ -88,14 +86,6 @@
urls = ["https://github.com/GoogleContainerTools/base-images-docker/archive/4f13bab1c063aa7d7388f62a6807317e252bcae0.tar.gz"],
)
- if "distroless" not in excludes:
- http_archive(
- name = "distroless",
- sha256 = "daf9b18ca2d4ae11501846a311011ef2fa2c8db95529c5b5f6069977967712e0",
- strip_prefix = "distroless-10f0810b962145e4636282005226c4eb72519182",
- urls = ["https://github.com/GoogleCloudPlatform/distroless/archive/10f0810b962145e4636282005226c4eb72519182.tar.gz"],
- )
-
# ================================ GPG Keys ================================
# Bazel gpg key necessary to install Bazel in the containers.
if "bazel_gpg" not in excludes:
@@ -156,14 +146,6 @@
urls = ["https://storage.googleapis.com/clang-builds-stable/clang-debian8/clang_" + CLANG_REVISION + ".tar.gz"],
)
- if "debian9_clang_release" not in excludes:
- http_file(
- name = "debian9_clang_release",
- downloaded_file_path = "clang_" + CLANG_REVISION + ".tar.gz",
- sha256 = DEBIAN9_CLANG_SHA256,
- urls = ["https://storage.googleapis.com/clang-builds-stable/clang-debian9/clang_" + CLANG_REVISION + ".tar.gz"],
- )
-
if "ubuntu16_04_clang_release" not in excludes:
http_file(
name = "ubuntu16_04_clang_release",
@@ -181,14 +163,6 @@
urls = ["https://storage.googleapis.com/clang-builds-stable/clang-debian8/libcxx-msan_" + LIBCXX_REVISION + ".tar.gz"],
)
- if "debian9_libcxx_release" not in excludes:
- http_file(
- name = "debian9_libcxx_release",
- downloaded_file_path = "libcxx-msan_" + LIBCXX_REVISION + ".tar.gz",
- sha256 = DEBIAN9_LIBCXX_SHA256,
- urls = ["https://storage.googleapis.com/clang-builds-stable/clang-debian9/libcxx-msan_" + LIBCXX_REVISION + ".tar.gz"],
- )
-
if "ubuntu16_04_libcxx_release" not in excludes:
http_file(
name = "ubuntu16_04_libcxx_release",
diff --git a/rules/docker_config.bzl b/rules/docker_config.bzl
index a6e9938..03ed18b 100644
--- a/rules/docker_config.bzl
+++ b/rules/docker_config.bzl
@@ -408,7 +408,7 @@
This rule is implemented by extending the container_image rule in
https://github.com/bazelbuild/rules_docker. The rule installs debs packages
to run bazel (using the package manager rules offered by
- https://github.com/GoogleCloudPlatform/distroless/tree/master/package_manager).
+ https://github.com/GoogleContainerTools/base-images-docker).
The rule creates the container with a command that pulls a repo from github,
and runs bazel build for a series of remote repos. Files generated in these
repos are copied to a mount point inside the Bazel output tree.
diff --git a/rules/skylib/BUILD b/rules/skylib/BUILD
deleted file mode 100644
index 278ccba..0000000
--- a/rules/skylib/BUILD
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2017 The Bazel Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-
-licenses(["notice"]) # Apache 2.0
-
-package(default_visibility = ["//visibility:public"])
-
-load("@bazel_skylib//:skylark_library.bzl", "skylark_library")
-
-skylark_library(
- name = "packages",
- srcs = [
- "package_names.bzl",
- "packages.bzl",
- ],
-)
diff --git a/rules/skylib/package_names.bzl b/rules/skylib/package_names.bzl
deleted file mode 100644
index fdcad5b..0000000
--- a/rules/skylib/package_names.bzl
+++ /dev/null
@@ -1,457 +0,0 @@
-# Copyright 2017 The Bazel Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""package_names.bzl contains definitions of functions that return lists of package names.
-
-This includes all package names for a given distro (i.e., def
-<distro>_package_names) as well as private defs defining all packages for a
-given tool (a tool requires several packages to be installed). This file also
-contains a struct with the names of all tools. Lastly, this file defines a map
-from tools to package names for each distro (i.e., def <distro>_tools()).
-"""
-
-tool_names = struct(
- bazel = "bazel",
- binutils = "binutils",
- curl = "curl",
- ed = "ed",
- file = "file",
- gcc = "gcc",
- git = "git",
- java = "java",
- java_no_ca_certs = "java_no_ca_certs",
- less = "less",
- lib_cpp = "lib_cpp",
- netcat = "netcat",
- openssh_client = "openssh_client",
- patch = "patch",
- python3_dev = "python3_dev",
- python3_numpy = "python3_numpy",
- python3_pip = "python3_pip",
- python_dev = "python_dev",
- python_numpy = "python_numpy",
- python_pip = "python_pip",
- wget = "wget",
- zip = "zip",
-)
-
-def jessie_tools():
- return {
- tool_names.binutils: _jessie_binutils_package_names(),
- tool_names.curl: _jessie_curl_package_names(),
- tool_names.ed: _jessie_ed_package_names(),
- tool_names.file: _jessie_file_package_names(),
- tool_names.gcc: _jessie_gcc_package_names(),
- tool_names.git: _jessie_git_package_names(),
- tool_names.java: _jessie_java_package_names(),
- tool_names.java_no_ca_certs: _jessie_java_no_ca_certs_package_names(),
- tool_names.less: _jessie_less_package_names(),
- tool_names.lib_cpp: _jessie_lib_cpp_package_names(),
- tool_names.netcat: _jessie_netcat_package_names(),
- tool_names.openssh_client: _jessie_openssh_client_package_names(),
- tool_names.patch: _jessie_patch_package_names(),
- tool_names.python_dev: _jessie_python_dev_package_names(),
- tool_names.python_numpy: _jessie_python_numpy_package_names(),
- tool_names.python_pip: _jessie_python_pip_package_names(),
- tool_names.python3_dev: _jessie_python3_dev_package_names(),
- tool_names.python3_numpy: _jessie_python3_numpy_package_names(),
- tool_names.python3_pip: _jessie_python3_pip_package_names(),
- tool_names.wget: _jessie_wget_package_names(),
- tool_names.zip: _zip_package_names(),
- }
-
-def jessie_package_names():
- return _package_names(jessie_tools)
-
-def _package_names(tools):
- packages = []
- for tool in tools().values():
- packages.extend(tool)
- return depset(packages).to_list()
-
-def _jessie_binutils_package_names():
- return [
- "binutils",
- ]
-
-def _jessie_curl_package_names():
- return [
- "curl",
- "libcurl3",
- "libffi6",
- "libgmp10",
- "libgnutls-deb0-28",
- "libgssapi-krb5-2",
- "libhogweed2",
- "libidn11",
- "libk5crypto3",
- "libkeyutils1",
- "libkrb5-3",
- "libkrb5support0",
- "libldap-2.4-2",
- "libnettle4",
- "libp11-kit0",
- "librtmp1",
- "libsasl2-2",
- "libsasl2-modules-db",
- "libssh2-1",
- "libtasn1-6",
- ]
-
-def _jessie_gcc_package_names():
- return [
- "binutils",
- "cpp",
- "cpp-4.9",
- "g++",
- "g++-4.9",
- "gcc",
- "gcc-4.9",
- "libasan1",
- "libatomic1",
- "libc-dev-bin",
- "libc6-dev",
- "libcilkrts5",
- "libcloog-isl4",
- "libgcc-4.9-dev",
- "libgmp10",
- "libgomp1",
- "libisl10",
- "libitm1",
- "liblsan0",
- "libmpc3",
- "libmpfr4",
- "libquadmath0",
- "libstdc++-4.9-dev",
- "libtsan0",
- "libubsan0",
- "linux-libc-dev",
- ]
-
-def _jessie_ed_package_names():
- return [
- "ed",
- ]
-
-def _jessie_file_package_names():
- return [
- "file",
- "libmagic1",
- ]
-
-def _jessie_git_package_names():
- return [
- "git",
- "git-man",
- "libcurl3-gnutls",
- "liberror-perl",
- "libexpat1",
- "libffi6",
- "libgdbm3",
- "libgmp10",
- "libgnutls-deb0-28",
- "libgssapi-krb5-2",
- "libhogweed2",
- "libidn11",
- "libk5crypto3",
- "libkeyutils1",
- "libkrb5-3",
- "libkrb5support0",
- "libldap-2.4-2",
- "libnettle4",
- "libp11-kit0",
- "librtmp1",
- "libsasl2-2",
- "libsasl2-modules-db",
- "libssh2-1",
- "libtasn1-6",
- "perl",
- "perl-modules",
- # Though not strictly required, we get a 'Problem with the SSL CA cert'
- # errror w/o these packages
- "ca-certificates",
- "libssl1.0.0",
- "openssl",
- ]
-
-def _jessie_java_no_ca_certs_package_names():
- return [
- "fontconfig-config",
- "fonts-dejavu-core",
- "java-common",
- "libavahi-client3",
- "libavahi-common-data",
- "libavahi-common3",
- "libcups2",
- "libdbus-1-3",
- "libexpat1",
- "libffi6",
- "libfontconfig1",
- "libfreetype6",
- "libgmp10",
- "libgnutls-deb0-28",
- "libgssapi-krb5-2",
- "libhogweed2",
- "libjpeg62-turbo",
- "libk5crypto3",
- "libkeyutils1",
- "libkrb5-3",
- "libkrb5support0",
- "liblcms2-2",
- "libnettle4",
- "libnspr4",
- "libnss3",
- "libp11-kit0",
- "libpcsclite1",
- "libpng12-0",
- "libsqlite3-0",
- "libtasn1-6",
- "libx11-6",
- "libx11-data",
- "libxau6",
- "libxcb1",
- "libxdmcp6",
- "libxext6",
- "libxi6",
- "libxrender1",
- "libxtst6",
- "openjdk-8-jdk-headless",
- "openjdk-8-jre-headless",
- "ucf",
- "x11-common",
- "zlib1g",
- ]
-
-def _jessie_java_package_names():
- return _jessie_java_no_ca_certs_package_names() + ["ca-certificates-java"]
-
-def _jessie_less_package_names():
- return [
- "less",
- "libc6",
- "libtinfo5",
- "debianutils",
- ]
-
-def _jessie_lib_cpp_package_names():
- return [
- "libasan1",
- "libatomic1",
- "libc-dev-bin",
- "libc6-dev",
- "libcilkrts5",
- "libgcc-4.9-dev",
- "libgomp1",
- "libitm1",
- "liblsan0",
- "libquadmath0",
- "libstdc++-4.9-dev",
- "libtsan0",
- "libubsan0",
- "linux-libc-dev",
- ]
-
-def _jessie_netcat_package_names():
- return [
- "netcat",
- "netcat-traditional",
- ]
-
-def _jessie_openssh_client_package_names():
- return [
- "libbsd0",
- "libedit2",
- "libgssapi-krb5-2",
- "libk5crypto3",
- "libkeyutils1",
- "libkrb5-3",
- "libkrb5support0",
- "openssh-client",
- ]
-
-def _jessie_patch_package_names():
- return [
- "libc6",
- "patch",
- ]
-
-def _jessie_python3_dev_package_names():
- return [
- "dh-python",
- "libc-dev-bin",
- "libc6-dev",
- "libexpat1",
- "libexpat1-dev",
- "libffi6",
- "libmpdec2",
- "libpython3-dev",
- "libpython3-stdlib",
- "libpython3.4",
- "libpython3.4-dev",
- "libpython3.4-minimal",
- "libpython3.4-stdlib",
- "libsqlite3-0",
- "linux-libc-dev",
- "mime-support",
- "python3",
- "python3-dev",
- "python3-minimal",
- "python3.4",
- "python3.4-dev",
- "python3.4-minimal",
- ]
-
-def _jessie_python3_numpy_package_names():
- return [
- "dh-python",
- "libblas-common",
- "libblas3",
- "libexpat1",
- "libffi6",
- "libgfortran3",
- "liblapack3",
- "libmpdec2",
- "libpython3-stdlib",
- "libpython3.4-minimal",
- "libpython3.4-stdlib",
- "libquadmath0",
- "libsqlite3-0",
- "mime-support",
- "python3",
- "python3-minimal",
- "python3-numpy",
- "python3.4",
- "python3.4-minimal",
- ]
-
-def _jessie_python3_pip_package_names():
- return [
- "dh-python",
- "libexpat1",
- "libffi6",
- "libmpdec2",
- "libpython3-stdlib",
- "libpython3.4-minimal",
- "libpython3.4-stdlib",
- "libsqlite3-0",
- "mime-support",
- "python3",
- "python3-chardet",
- "python3-colorama",
- "python3-distlib",
- "python3-html5lib",
- "python3-minimal",
- "python3-pip",
- "python3-pkg-resources",
- "python3-requests",
- "python3-setuptools",
- "python3-six",
- "python3-urllib3",
- "python3.4",
- "python3.4-minimal",
- ]
-
-def _jessie_python_dev_package_names():
- return [
- "libc-dev-bin",
- "libc6-dev",
- "libexpat1",
- "libexpat1-dev",
- "libffi6",
- "libpython-dev",
- "libpython-stdlib",
- "libpython2.7",
- "libpython2.7-dev",
- "libpython2.7-minimal",
- "libpython2.7-stdlib",
- "libsqlite3-0",
- "linux-libc-dev",
- "mime-support",
- "python",
- "python-dev",
- "python-minimal",
- "python2.7",
- "python2.7-dev",
- "python2.7-minimal",
- ]
-
-def _jessie_python_pip_package_names():
- return [
- "libexpat1",
- "libffi6",
- "libpython-stdlib",
- "libpython2.7-minimal",
- "libpython2.7-stdlib",
- "libsqlite3-0",
- "mime-support",
- "python",
- "python-chardet",
- "python-colorama",
- "python-distlib",
- "python-html5lib",
- "python-minimal",
- "python-pip",
- "python-pkg-resources",
- "python-requests",
- "python-setuptools",
- "python-six",
- "python-urllib3",
- "python2.7",
- "python2.7-minimal",
- ]
-
-def _jessie_python_numpy_package_names():
- return [
- "libblas-common",
- "libblas3",
- "libexpat1",
- "libffi6",
- "libgfortran3",
- "liblapack3",
- "libpython-stdlib",
- "libpython2.7-minimal",
- "libpython2.7-stdlib",
- "libquadmath0",
- "libsqlite3-0",
- "mime-support",
- "python",
- "python-minimal",
- "python-numpy",
- "python2.7",
- "python2.7-minimal",
- ]
-
-def _jessie_wget_package_names():
- return [
- "libffi6",
- "libgmp10",
- "libgnutls-deb0-28",
- "libhogweed2",
- "libicu52",
- "libidn11",
- "libnettle4",
- "libp11-kit0",
- "libpsl0",
- "libtasn1-6",
- "wget",
- # Needed for cert validation done by wget
- "ca-certificates",
- "libssl1.0.0",
- "openssl",
- ]
-
-def _zip_package_names():
- return [
- "zip",
- "unzip",
- ]
diff --git a/rules/skylib/packages.bzl b/rules/skylib/packages.bzl
deleted file mode 100644
index fa4e353..0000000
--- a/rules/skylib/packages.bzl
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 2017 The Bazel Authors. All rights reserved.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-"""packages.bzl contains definitions of functions that return packages.
-
-Uses package_names.bzl to resolve packages needed for
-tools installed in different containers.
-"""
-
-load(
- "@jessie_ca_certs_package_bundle//file:packages.bzl",
- ca_certs_packages = "packages",
-)
-load(
- "@jessie_package_bundle//file:packages.bzl",
- jessie_packages = "packages",
-)
-load(
- ":package_names.bzl",
- "jessie_tools",
- "tool_names",
-)
-
-def get_jessie_packages(pkg_list):
- """Common function for getting jessie packages."""
- return [jessie_packages[p] for p in pkg_list]
-
-def base_layer_packages():
- """Base packages for fully loaded toolchain."""
- base_tools = [
- tool_names.binutils,
- tool_names.curl,
- tool_names.ed,
- tool_names.file,
- tool_names.git,
- tool_names.less,
- tool_names.netcat,
- tool_names.openssh_client,
- tool_names.patch,
- tool_names.wget,
- tool_names.zip,
- ]
- packages = []
- for tool in base_tools:
- packages.extend(get_jessie_packages(jessie_tools()[tool]))
- return depset(packages).to_list()
-
-def clang_layer_packages():
- """Packages for the clang layer."""
- clang_tools = [
- tool_names.binutils,
- tool_names.lib_cpp,
- ]
- packages = []
- for tool in clang_tools:
- packages.extend(get_jessie_packages(jessie_tools()[tool]))
- return depset(packages).to_list()
-
-def python_layer_packages():
- """Packages for the python layer."""
- python_tools = [
- tool_names.python_dev,
- tool_names.python_numpy,
- tool_names.python_pip,
- tool_names.python3_dev,
- tool_names.python3_numpy,
- tool_names.python3_pip,
- ]
- packages = []
- for tool in python_tools:
- packages.extend(get_jessie_packages(jessie_tools()[tool]))
- return depset(packages).to_list()
-
-def java_layer_packages():
- """Packages for the java layer."""
- java_tools = [
- tool_names.java_no_ca_certs,
- ]
- packages = []
- for tool in java_tools:
- packages.extend(get_jessie_packages(jessie_tools()[tool]))
- packages.append(ca_certs_packages["ca-certificates-java"])
- return depset(packages).to_list()
diff --git a/rules/toolchain_containers.bzl b/rules/toolchain_containers.bzl
index 3f221f1..439baa2 100644
--- a/rules/toolchain_containers.bzl
+++ b/rules/toolchain_containers.bzl
@@ -5,8 +5,6 @@
###########################################################
# gcr.io/cloud-marketplace/google/debian8:latest
"debian8": "sha256:a6df7738c401aef6bf9c113eb1eea7f3921417fd4711ea28100681f2fe483ea2",
- # gcr.io/cloud-marketplace/google/debian9:latest
- "debian9": "sha256:741d18b41622814ae6eab29b0679dd45318437998213a5cb5532003846b435e1",
# gcr.io/cloud-marketplace/google/ubuntu16_04:latest
"ubuntu16_04": "sha256:df51b5c52d71c9867cd9c1c88c81f67a85ff87f1defe7e9b7ac5fb7d652596bf",
diff --git a/third_party/clang/BUILD b/third_party/clang/BUILD
index 1e73424..2f186d6 100644
--- a/third_party/clang/BUILD
+++ b/third_party/clang/BUILD
@@ -35,16 +35,6 @@
)
pkg_tar(
- name = "debian9_tar",
- package_dir = "/usr/local/",
- strip_prefix = ".",
- tags = ["manual"],
- deps = [
- "@debian9_clang_release//file",
- ],
-)
-
-pkg_tar(
name = "ubuntu16_04_tar",
package_dir = "/usr/local/",
strip_prefix = ".",
diff --git a/third_party/clang/revision.bzl b/third_party/clang/revision.bzl
index 32d99d5..cf172b7 100644
--- a/third_party/clang/revision.bzl
+++ b/third_party/clang/revision.bzl
@@ -2,6 +2,4 @@
DEBIAN8_CLANG_SHA256 = "96ae880a99c7dd3a20b5eaa202cb713e8cb9820a8e99b06aed6b1f5024a884d9"
-DEBIAN9_CLANG_SHA256 = "8def099f798f03c014d7e4c21547cf69e92ca26c01812cb33bf90c5d3f9b4204"
-
UBUNTU16_04_CLANG_SHA256 = "ee84daf8acffc4a702205a378e8dbdd0e580c58b53ef1381bb35694cae935963"
diff --git a/third_party/libcxx/BUILD b/third_party/libcxx/BUILD
index c1b94b2..7b91a1b 100644
--- a/third_party/libcxx/BUILD
+++ b/third_party/libcxx/BUILD
@@ -35,16 +35,6 @@
)
pkg_tar(
- name = "debian9_tar",
- package_dir = "/usr/local/",
- strip_prefix = ".",
- tags = ["manual"],
- deps = [
- "@debian9_libcxx_release//file",
- ],
-)
-
-pkg_tar(
name = "ubuntu16_04_tar",
package_dir = "/usr/local/",
strip_prefix = ".",
diff --git a/third_party/libcxx/revision.bzl b/third_party/libcxx/revision.bzl
index 63c1604..be5c256 100644
--- a/third_party/libcxx/revision.bzl
+++ b/third_party/libcxx/revision.bzl
@@ -2,6 +2,4 @@
DEBIAN8_LIBCXX_SHA256 = "1f28a992888e1da7a369e1e231ea31efa096954ed2b02065d73fb14e5982b922"
-DEBIAN9_LIBCXX_SHA256 = "3d60d0150da75ea617f7bca1de5914cb6f2f4d831d53dd4e8fb011f4a2bad8b2"
-
UBUNTU16_04_LIBCXX_SHA256 = "3c814866724768a4e331f75dd015e4dcc9ae894dc4a320b7f332d5238e41e956"