aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/build_defs
Commit message (Collapse)AuthorAge
...
* Automatic code cleanup.Gravatar laurentlb2018-03-07
| | | | PiperOrigin-RevId: 188182739
* Preserve the source directory tree in the RPM BUILD directoryGravatar mmikitka2018-03-05
| | | | | | | | Previously, there was a risk of filename collisions, since all data files were flattened into the BUILD directory. Closes #4747. PiperOrigin-RevId: 187870196
* Remove unnecessary copy of source SPEC file to temporary destinationGravatar mmikitka2018-03-01
| | | | | | | | | | | | Previous behaviour: * The CopyAndRewrite function would raise a write permission denied error on the output file, which had permissions 0555, when the input SPEC file was auto-generated. Current behaviour: * Do not copy the input SPEC file (auto-generated or otherwise) to the destination in the temporary working directory since the CopyAndRewrite function will generate the output file regardless. This allows the package to support static or auto-generated SPEC files. Closes #4716. PiperOrigin-RevId: 187511568
* Change pkg_rpm changelog to optionalGravatar mmikitka2018-03-01
| | | | | | | | The changelog is not used by make_rpm.py, and I don't have a need for it since I auto-generate the SPEC file, which includes a "%changelog" section, prior to invoking the pkg_rpm rule. Closes #4717. PiperOrigin-RevId: 187494400
* Support patching of git repositories as wellGravatar Klaus Aehlig2018-03-01
| | | | | | | | | | By simply sharing the utility function. In this way, we get feature parity between git_repository and http_archive. Fixes #4676. Change-Id: I99b300e42b2f267d8d04fd965f09c24f3ae54f10 PiperOrigin-RevId: 187450644
* external repos: add a Skylark library for common tasksGravatar Klaus Aehlig2018-02-28
| | | | | | | | ...thus avoiding having them several times for the various repository rules, each with slightly different behavior and bugs. Change-Id: I6cec0c0dd0901453458903e226ceb2098a93cdd8 PiperOrigin-RevId: 187306904
* Pass tags from java_import_external rule to the generated java_import rule.Gravatar Googler2018-02-26
| | | | | | | | | | The tags attribute is already implicit on every rule. This also will help power https://github.com/bazelbuild/bazel/issues/1372#issuecomment-364001669 RELNOTES[NEW]: Pass `tags` from `java_import_external` rule to the generated `java_import` rule. PiperOrigin-RevId: 187019602
* http_archive: fix doc-stringGravatar Klaus Aehlig2018-02-20
| | | | | | | | | Since the http_archive inherits the native download_and_extract function, the support of plain tar archives introduced in 4c8fa1bab507fa7f0a1cbeac0724751d9b574f89 applies here as well. Fix the doc strings accordingly. Change-Id: Ica4037215abf7498c3a8ec9f21ac32b2e59e8966 PiperOrigin-RevId: 186293816
* http_archive: allow parameter for a single URLGravatar Klaus Aehlig2018-02-20
| | | | | | | | | | | ...to ease transition from the native http_archive rule. In this way, switching from the native http_archive rule to the skylark one literally is only adding load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") Change-Id: I0d3a16ad9ab046b975ea64c97dd201e7a9d70a6a PiperOrigin-RevId: 186285020
* new_git_repository: support date-based shallow clonesGravatar Klaus Aehlig2018-02-13
| | | | | | | | | | | | | | Add an optional 'shallow_since' parameter to new_git_repository to allow more shallow clones. As opposed to a fixed depths, specifying a date does not get outdated if the branch progresses further. Also, use fully shallow clones if no commit is specified. A (floating) branch or tag can always be cloned in a truly shallow fashion. Improves on #4359. Change-Id: I8459c8f55042c98da2e43f57b7960a291004d26b PiperOrigin-RevId: 185504534
* Fix parameter names in docsGravatar Googler2018-02-12
| | | | | RELNOTES: None PiperOrigin-RevId: 185436886
* git_repository: add missing args to doc stringGravatar Klaus Aehlig2018-02-12
| | | | | Change-Id: Id898aafaf1a5dec16e5639f50981c1051caa70eb PiperOrigin-RevId: 185390071
* sha256 python tool: stream instead of reading whole file beforehandGravatar Hadrien Chauvin2018-02-05
| | | | | | | | This is a rather small change to a Python tool used to produce a SHA256 hash. Currently, the whole file is loaded in memory before computing the hash, which causes problem when large files are processed. For instance, github.com/bazelbuild/rules_docker uses it to compute the hash of Docker images, which can be multiple GB in size. This PR avoids the tool to cause issues in a limited-memory environment. Closes #4243. PiperOrigin-RevId: 184518900
* http_archive: allow top-level BUILD files to be overriddenGravatar Klaus Aehlig2018-02-01
| | | | | | | | | ..by the `build_file` parameter, even if the external repository contains a top-level BUILD file. While there, also add a test verifying that this is also possible via the `build_file_content`. Change-Id: I1b875c147cfcd6f1c70b8efeb10c2b406eeacf6a PiperOrigin-RevId: 184134041
* http_archive: remove outdated commentGravatar Klaus Aehlig2018-02-01
| | | | | | | | http_archive from @bazel_tools does know how to bring its own BUILD file by now. Change-Id: I9bbda6635f4459b77600e9ee6db3284f826d7931 PiperOrigin-RevId: 184129975
* Change git clone to pull all history, so all needed commits can be accessed.Gravatar John Cater2018-01-30
| | | | | | | Fixes #4537. Change-Id: I28afcbc89e230e319788c2426e57d43c1ad5dfee PiperOrigin-RevId: 183827742
* Make pkg defs Python 2/3 compatibleGravatar treuherz2018-01-26
| | | | | | | | | | | Use BytesIO instead of StringIO, change strings to bytes throughout the archiving code. Needed to import from Six in a couple of places. As discussed in #1580 Closes #3850. PiperOrigin-RevId: 183429066
* http_archive: work around #2700Gravatar Klaus Aehlig2018-01-25
| | | | | | | | | | Move the print statement about the used BUILD file earlier in the _http_archive_impl function, so that the BUILD file is accessed before we call out to the network for the first time. In this way, we avoid fetching the same file twice in a single build. Change-Id: I2b9be4e6a00da2de0cde56896d84c0ba9721456d PiperOrigin-RevId: 183251555
* Update make_rpm.py to check whether rpmbuild is present and report an error ↵Gravatar John Cater2018-01-24
| | | | | | | | | if not. Fixes #4065. Change-Id: I17a5d2ee4befc5e467b0a195311566db246eb167 PiperOrigin-RevId: 183087906
* http_archive: allow using the shipped BUILD fileGravatar Klaus Aehlig2018-01-23
| | | | | | | | | | Bazel may also depend on external repositories that already contain build files. When using http_archive from @bazel_tools also support that use case, by supporting simply omitting `build_file` and `build_file_contents`. Change-Id: I40a9b85ae0aba850c73104d2e2fe7f7ee814e093 PiperOrigin-RevId: 182893460
* http_archive: support programmatic patchingGravatar Klaus Aehlig2018-01-16
| | | | | | | | | | | Support applying a sequence of commands to an http_archive, after the patch files are applied. In this way, tasks like shebang-fixes can easily be added. Fixes #3395. Change-Id: Ifdad584a852efd425c436d57ef71a0d681488629 PiperOrigin-RevId: 182037265
* Support patches in http_archiveGravatar Klaus Aehlig2018-01-15
| | | | | | | | | | | Support applying a sequence of patches for external repositories imported via http_archive. (Note that we only support the version from @bazel_tools, not the deprecated native rules.) Works towards #3395. Change-Id: I96c746acc04790b051eb686856c04a3ff3c90059 PiperOrigin-RevId: 181975322
* Use BAZEL_SH if available instead of hard-coding bash in git.bzlGravatar Dmitry Lomov2018-01-15
| | | | | | | Fixes #3699. Change-Id: I44028476be96037334a1ae48de450d625925676f PiperOrigin-RevId: 181962926
* Add support for strip_prefix to {new_}git_repository skylark rulesGravatar Ed Baunton2018-01-10
| | | | | | | | | | | | Continuation of https://github.com/bazelbuild/bazel/pull/4356 An approach at supporting strip_prefix with the git skylark rules. This approach unfortunately uses symlinks since you cannot clone a subset of a git repository. It creates a tmp directory which is the 'real' clone and then provides a link in place of the expected location of the repository to the path of the required prefix. Behaviour is only changed if a strip_prefix is provided. Closes #4368. PiperOrigin-RevId: 181438640
* Use --depth=1 on git clone for git_repository skylark rulesGravatar Ed Baunton2018-01-08
| | | | | | | | Fixes https://github.com/bazelbuild/bazel/issues/4359 Closes #4360. PiperOrigin-RevId: 181161619
* fix git.bzl error when outputRoot is in a git repoGravatar kabakaev2018-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `_clone_or_update()` should `git clone` external repositories only if repo is absent. Unfortunately, it may happen that the bazel outputRoot (~/.cache/bazel by default) is a subdirectory of some other git working copy. For example, user may track his whole home directory in git and add `.config` to .gitignore. In that case, it is not enough to check if the cache dir is a git repo. One must check that the cache dir holds a root of a git working copy. In other words, the `.git` folder must be in the repo dir, not on any level above. * Steps to reproduce ```bash cd ~/.cache git init cd /some/project/that/uses/bazel-git_repository mv WORKSPACE WORKSPACE.orig (echo "load('@bazel_tools//tools/build_defs/repo:git.bzl', 'git_repository')" ; cat WORKSPACE.orig) > WORKSPACE bazel --batch build :all || echo "Ah, there is a bug" ``` Read on for definitive info. * clone any project that uses `git_repository` ```bash [arch@archlinux bazelbuild]$ git clone https://github.com/bazelbuild/bazel-watcher.git [arch@archlinux bazelbuild]$ cd bazel-watcher ``` * enable Skylark implementation of `git_repository` as documented in https://github.com/bazelbuild/bazel/issues/1408#issuecomment-276815467 ```bash [arch@archlinux bazel-watcher]$ mv WORKSPACE WORKSPACE.orig [arch@archlinux bazel-watcher]$ (echo "load('@bazel_tools//tools/build_defs/repo:git.bzl', 'git_repository')" ; cat WORKSPACE.orig) > WORKSPACE [arch@archlinux bazel-watcher]$ grep -v ^# WORKSPACE |head -n4 load('@bazel_tools//tools/build_defs/repo:git.bzl', 'git_repository') git_repository( name = "com_github_bazelbuild_bazel_integration_testing", ``` * (optionally) define custom Bazel `outputRoot` directory (default is ~/.cache/bazel) ```bash [arch@archlinux bazel-watcher]$ rm -rf /tmp/.cache/ ; mkdir /tmp/.cache/ [arch@archlinux bazel-watcher]$ export TEST_TMPDIR=/tmp/.cache/bazel ``` * try building the project to make sure everything works as expected ```bash [arch@archlinux bazel-watcher]$ bazel --batch build :all INFO: $TEST_TMPDIR defined: output root default is '/tmp/.cache/bazel' and max_idle_secs default is '15'. Extracting Bazel installation... WARNING: /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing/WORKSPACE:1: Workspace name in /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing/WORKSPACE (@build_bazel_integration_testing) does not match the name given in the repository's definition (@com_github_bazelbuild_bazel_integration_testing); this will cause a build error in future versions INFO: Analysed target //:go_prefix (6 packages loaded). INFO: Found 1 target... Target //:go_prefix up-to-date (nothing to build) INFO: Elapsed time: 15.088s, Critical Path: 0.05s INFO: Build completed successfully, 1 total action [arch@archlinux bazel-watcher]$ echo $? 0 ``` * reproduce the issue by placing the `outputRoot` under a git working copy ```bash [arch@archlinux bazel-watcher]$ rm -rf /tmp/.cache/ ; mkdir /tmp/.cache/ [arch@archlinux bazel-watcher]$ cd /tmp/.cache/ ; git init Initialized empty Git repository in /tmp/.cache/.git/ [arch@archlinux .cache]$ cd - [arch@archlinux bazel-watcher]$ bazel --batch build :all INFO: $TEST_TMPDIR defined: output root default is '/tmp/.cache/bazel' and max_idle_secs default is '15'. Extracting Bazel installation... ERROR: error loading package '': Encountered error while reading extension file 'tools/repositories.bzl': no such package '@com_github_bazelbuild_bazel_integration_testing//tools': Traceback (most recent call last): File "/tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl", line 69 _clone_or_update(ctx) File "/tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl", line 44, in _clone_or_update fail(("error cloning %s:\n%s" % (ctx....))) error cloning com_github_bazelbuild_bazel_integration_testing: + cd /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external + cd /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing + git reset --hard 55a6a70dbcc2cc7699ee715746fb1452788f8d3c fatal: Could not parse object '55a6a70dbcc2cc7699ee715746fb1452788f8d3c'. + git fetch origin 55a6a70dbcc2cc7699ee715746fb1452788f8d3c:55a6a70dbcc2cc7699ee715746fb1452788f8d3c fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ERROR: error loading package '': Encountered error while reading extension file 'tools/repositories.bzl': no such package '@com_github_bazelbuild_bazel_integration_testing//tools': Traceback (most recent call last): File "/tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl", line 69 _clone_or_update(ctx) File "/tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl", line 44, in _clone_or_update fail(("error cloning %s:\n%s" % (ctx....))) error cloning com_github_bazelbuild_bazel_integration_testing: + cd /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external + cd /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing + git reset --hard 55a6a70dbcc2cc7699ee715746fb1452788f8d3c fatal: Could not parse object '55a6a70dbcc2cc7699ee715746fb1452788f8d3c'. + git fetch origin 55a6a70dbcc2cc7699ee715746fb1452788f8d3c:55a6a70dbcc2cc7699ee715746fb1452788f8d3c fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. INFO: Elapsed time: 4.974s FAILED: Build did NOT complete successfully (0 packages loaded) ``` * let's find out why it failed ```bash [arch@archlinux bazel-watcher]$ grep rev-parse /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl if ! ( cd '{dir}' && git rev-parse --git-dir ) >/dev/null 2>&1; then [arch@archlinux bazel-watcher]$ cd /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing [arch@archlinux com_github_bazelbuild_bazel_integration_testing]$ git rev-parse --git-dir /tmp/.cache/.git [arch@archlinux com_github_bazelbuild_bazel_integration_testing]$ cd - ``` * let's fix git.bzl ```bash [arch@archlinux bazel-watcher]$ sed -i -E 's/git rev-parse --git-dir/[[ "$(git rev-parse --git-dir)" == '.git' ]]/' /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl [arch@archlinux bazel-watcher]$ grep rev-parse /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/bazel_tools/tools/build_defs/repo/git.bzl if ! ( cd '{dir}' && [[ "$(git rev-parse --git-dir)" == .git ]] ) >/dev/null 2>&1; then ``` * make sure that Bazel works again ```bash [arch@archlinux bazel-watcher]$ ls -a /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing . .. [arch@archlinux bazel-watcher]$ bazel --batch build :all INFO: $TEST_TMPDIR defined: output root default is '/tmp/.cache/bazel' and max_idle_secs default is '15'. Error: corrupt installation: file '/tmp/.cache/bazel/_bazel_arch/install/f20169627a8110e2cc3d005319e97c94/_embedded_binaries/embedded_tools/tools/build_defs/repo/git.bzl' modified. Please remove '/tmp/.cache/bazel/_bazel_arch/install/f20169627a8110e2cc3d005319e97c94' and try again. [arch@archlinux bazel-watcher]$ touch -m -t 202712120101 /tmp/.cache/bazel/_bazel_arch/install/f20169627a8110e2cc3d005319e97c94/_embedded_binaries/embedded_tools/tools/build_defs/repo/git.bzl [arch@archlinux bazel-watcher]$ bazel --batch build :all INFO: $TEST_TMPDIR defined: output root default is '/tmp/.cache/bazel' and max_idle_secs default is '15'. WARNING: /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing/WORKSPACE:1: Workspace name in /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing/WORKSPACE (@build_bazel_integration_testing) does not match the name given in the repository's definition (@com_github_bazelbuild_bazel_integration_testing); this will cause a build error in future versions INFO: Analysed target //:go_prefix (6 packages loaded). INFO: Found 1 target... Target //:go_prefix up-to-date (nothing to build) INFO: Elapsed time: 13.318s, Critical Path: 0.07s INFO: Build completed successfully, 1 total action [arch@archlinux bazel-watcher]$ ls -a /tmp/.cache/bazel/_bazel_arch/f2207b308c89ea5d32323052637210b1/external/com_github_bazelbuild_bazel_integration_testing . .. AUTHORS bazel_integration_test bazel_integration_test.bzl bazel_version.bzl BUILD .ci CODEOWNERS CONTRIBUTING.md .git .gitignore go java javatests LICENSE README.md tools WORKSPACE ``` Closes #4358. PiperOrigin-RevId: 181151078
* Remove usages of `+` on dictsGravatar vladmos2018-01-03
| | | | | | | | | The `+` operator on dicts is deprecated and will be removed. This change makes Bazel files compatible with the new behavior. Fixes #4346. PiperOrigin-RevId: 180702882
* Raise path error for failing read in GetTarFile.Gravatar Andreas Bergmeier2017-12-21
| | | | | | Closes #4282. PiperOrigin-RevId: 179783690
* Python 3 fixes for tools/build_defs, jdk, objcGravatar Googler2017-12-19
| | | | | RELNOTES: None PiperOrigin-RevId: 179596587
* Update tools/ modules for compatibility with python 3.Gravatar Akira Baruah2017-12-18
| | | | | | | | | Fixes #4097. Fixes part of #4310. Closes #4265. PiperOrigin-RevId: 179437184
* Fix some broken targets and failing tests.Gravatar ajmichael2017-12-06
| | | | | RELNOTES: None PiperOrigin-RevId: 178099410
* Expressly fetch remote and ref when using git_repositoryGravatar Ed Baunton2017-11-29
| | | | | | | | | | | | | | | | When I clone from a git repo that doesn't have the default branch the same as the branch that I want ; it doesn't seem to fetch the appropriate branch. I am using a name rather than explicit sha. What happens is: ``` + git reset --hard build-with-bazel fatal: ambiguous argument 'build-with-bazel': unknown revision or path not in the working tree. ``` because it hasn't fetched that ref. Closes #4039. PiperOrigin-RevId: 177298578
* Fix gflags mark_flag_as_required warning.Gravatar Austin Schuh2017-11-21
| | | | | | | | | | | | I'm getting .../bazel-out/host/bin/external/bazel_tools/tools/build_defs/pkg/make_deb.runfiles/bazel_tools/third_party/py/gflags/gflags/__init__.py:284: UserWarning: Flag architecture has a non-None default value; therefore, mark_flag_as_required will pass even if flag is not specified in the command line! 'command line!' % flag_name) So, let's not mark it as required if a default is passed in! Change-Id: Iad9a3886ce0ff21ce26eb7fa17a986be4c4af5cf PiperOrigin-RevId: 176480367
* Add deps attributes to the Skylark maven_{a,j}ar rules.Gravatar ajmichael2017-11-14
| | | | | | | | | | | | | | | | | | | | | | | | | | The deps are passed through into the generated java_import and aar_import rules. This is necessary for AARs with resource dependencies since maven_aar ignores transitive dependencies. It's less significant for the Java rules, since typically JARs on Maven are compiled class files and as such only have runtime dependencies. Example usage: ``` # WORKSPACE load("@bazel_tools//tools/build_defs/repo:maven_rules.bzl", "maven_aar") maven_aar( name = "android_image_cropper", artifact = "com.theartofdev.edmodo:android-image-cropper:2.3.1", deps = [ "@androidsdk//com.android.support:appcompat-v7-24.1.1", ], ) ``` Fixes https://github.com/bazelbuild/bazel/issues/2863. Fixes https://github.com/bazelbuild/bazel/issues/3980. Also, cleans up some broken stuff in the tests (sadly, they don't run on jenkins, so nothing caught that they were broken). test_maven_jar_with_classifier_skylark still does not work, so I disabled. RELNOTES: Add deps attribute to Skylark maven_aar and maven_jar workspace rules. PiperOrigin-RevId: 175698282
* Update java.bzl best practices regarding HTTPSGravatar jart2017-11-10
| | | | | | | | | | | While HTTP is faster and SHA256 already guaranteed data hasn't been tampered with, it does give visibility over the wire regarding which jars are being transmitted. The true purpose of this change is to bring these practices into greater consistency with Google's broader vision of using HTTPS as much as possible. PiperOrigin-RevId: 175328286
* Export hash.bzl.Gravatar Nathan Herring2017-11-03
| | | | | | | | This allows Skylib `skylark_library` users to use `hash.bzl` as a file dependency without the base Bazel rules having to import the actual `skylark_library` rule from Skylib. Closes #4000. PiperOrigin-RevId: 174337147
* Add a missing argument to the code in ↵Gravatar lberki2017-10-16
| | | | | | | | | https://github.com/bazelbuild/bazel/commit/aee6fb8d21e17c855025f0db6bb52e2cd7a2f642. Progress towards #3424. RELNOTES: None. PiperOrigin-RevId: 172293805
* Update the Apple rules according to the new API because it was deemed better toGravatar lberki2017-10-12
| | | | | | | | | put the environment data behind apple_common as opposed to xcode_config. Progress towards https://github.com/bazelbuild/bazel/issues/3424 . RELNOTES: None. PiperOrigin-RevId: 171931324
* Add tests for the Skylark-based implementation of git repository rules.Gravatar John Cater2017-10-11
| | | | | | | Fixes #3825. Change-Id: I59cb0edb50af30991153a1a684e613853df22dd2 PiperOrigin-RevId: 171687620
* Make the Apple Skylark rule be able to fetch environment data from theGravatar lberki2017-10-06
| | | | | | | | | | | | xcode_config rule in addition to ctx.fragments.apple . Subsequent Bazel versions won't support these methods on ctx.fragments.apple and thus need to be updated. Progress towards https://github.com/bazelbuild/bazel/issues/3424 . RELNOTES: None. PiperOrigin-RevId: 171021097
* tools/build_defs/pkg/pkg.bzl: move load statement to the beginningGravatar Klaus Aehlig2017-10-02
| | | | | | | | ...so that bazel does not complain about internal files when run with --all_incompatible_changes. Change-Id: I9a12a7ab0cd6a92351fe17addd601d531f203aff PiperOrigin-RevId: 170694212
* Make gzipped pkg_tar outputs repeatableGravatar Philipp Schrader2017-09-27
| | | | | | | | | | | | | | | The current implementation allows the gzip module to use the current time as a timestamp. Python2 unfortunately doesn't expose this in the tarfile module so it's easy to overlook. This patch separates the gzip process by creating a separate file object manually and bypassing the gzip compression in the tarfile module. Fixes #1844 Change-Id: I19b265bf55314d38bdd53ccf20c49ecfe6d7618b PiperOrigin-RevId: 170077036
* Make control.tar.gz in pkg_deb repeatableGravatar Philipp Schrader2017-09-25
| | | | | | | | | | | This patch sets the mtime attribute of gzip explicitly to zero. Python2 doesn't expose this via the tarfile module so we have to create an explicit gzip instance. Fixes #3723 Change-Id: I4ce38a317bb92481562b67075d1272f1aebdf9d6 PiperOrigin-RevId: 169881504
* docker_pull: rely on the main repository docker_buildGravatar Damien Martin-Guillerez2017-09-22
| | | | | | | | | | | | | The legacy docker_build was removed from bazel_tools but we need to use it for our integration test so refer to the one in the main repository. Also restore the visibility, just excluding it from bazel_tools is enough and docker_pull needs to call it from other repository. Change-Id: I8a8a5781859960030ae996db95fbaf9c54ec596a PiperOrigin-RevId: 169664916
* Automated rollback of commit ca216f5eb4b1f1892219db0f578495bbbdbaa875.Gravatar philwo2017-09-15
| | | | | | | | | | | | | | | *** Reason for rollback *** Breaks Bazel building itself on FreeBSD, also #3739. *** Original change description *** Introduce empty "toolchain_category" rule for labels that will be used as categories of toolchains for the purpose of toolchain selection. Up to now, we've used the native toolchain_type rule for this purpose. That rule depends on a number of configuration fragments that supply build variables - we don't want toolchains to need to depend on those fragments as well. E.g. toolchain_type depends on JvmConfiguration, but we would like toolchains to work with --experimental_disable_jvm. PiperOrigin-RevId: 168810566
* Remove docker rules from @bazel_toolsGravatar Googler2017-09-14
| | | | | | | | | ... and lock down the visibility to only the Bazel project, please see https://github.com/bazelbuild/rules_docker instead. RELNOTES[INC]: @bazel_tools//tools/build_defs/docker:docker.bzl is no longer available, please see https://github.com/bazelbuild/rules_docker. PiperOrigin-RevId: 168650438
* Introduce empty "toolchain_category" rule for labels that will be used asGravatar cpeyser2017-09-14
| | | | | | | | categories of toolchains for the purpose of toolchain selection. Up to now, we've used the native toolchain_type rule for this purpose. That rule depends on a number of configuration fragments that supply build variables - we don't want toolchains to need to depend on those fragments as well. E.g. toolchain_type depends on JvmConfiguration, but we would like toolchains to work with --experimental_disable_jvm. PiperOrigin-RevId: 168577759
* Remove swift_library and tests, lives in the apple rules repo now.Gravatar thomasvl2017-09-11
| | | | | RELNOTES: The swift_library rule that is distributed with Bazel has been deleted. Users who wish to compile Swift should use the rules in https://github.com/bazelbuild/rules_apple instead. PiperOrigin-RevId: 168032330
* Remove the old copy of apple_genrule. It lives in apple rules.Gravatar thomasvl2017-09-11
| | | | | RELNOTES: The apple_genrule rule that is distributed with Bazel has been deleted. Users who wish to use genrules with Xcode's DEVELOPER_DIR set should use the rules in https://github.com/bazelbuild/rules_apple instead. PiperOrigin-RevId: 168027826
* Update the url for creating spec filesGravatar Tyler Rockwood2017-09-06
| | | | | | Closes #3640. PiperOrigin-RevId: 167578762