aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/build_defs/pkg
Commit message (Collapse)AuthorAge
* 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
* 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
* 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
* 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
* 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
* Update the url for creating spec filesGravatar Tyler Rockwood2017-09-06
| | | | | | Closes #3640. PiperOrigin-RevId: 167578762
* Automated rollback of commit afed47daac8812154196403a30f89aaf0ccca2b2.Gravatar Googler2017-09-04
| | | | | | | *** Reason for rollback *** Change-Id: Ib90ce99cc2e229bbe749130dbde517a075d6e333 PiperOrigin-RevId: 167319258
* Automated rollback of commit 36178dddc45ee39e302516232c83b0fbc4c5dc37.Gravatar Googler2017-09-01
| | | | | | | | | *** Reason for rollback *** fix the downstream breaks that led to the initial rollback Change-Id: Ib90ce99cc2e229bbe749130dbde517a075d6e333 PiperOrigin-RevId: 167247311
* Automated rollback of commit 39448ebab889a6b5b1ceabcf932adfec9098dfe7.Gravatar dmarting2017-08-28
| | | | | | | | | | | | | *** Reason for rollback *** Break docker builds *** Original change description *** Don't prepend ./ to filenames in pkg_tar rule Change-Id: Ib90ce99cc2e229bbe749130dbde517a075d6e333 PiperOrigin-RevId: 166679861
* Don't prepend ./ to filenames in pkg_tar ruleGravatar Jeff Grafton2017-08-28
| | | | | Change-Id: Ib90ce99cc2e229bbe749130dbde517a075d6e333 PiperOrigin-RevId: 166677549
* Improve pkg_tar warning message.Gravatar Benjamin Peterson2017-08-23
| | | | | | | | Put the label of the target in the warning message. Without it, it's hard to figure out which target one should fix. Change-Id: I694737e80ed74250ea793402443eaf5d2a13d622 PiperOrigin-RevId: 166184377
* More explicit warning for pkg_tar's filesGravatar Damien Martin-Guillerez2017-08-22
| | | | | | | | | So that the user knows the real action to do. Fixes #3401 Change-Id: I1f7ab258b22f832f31c35c83ff52b33bddf0732a PiperOrigin-RevId: 165931509
* Prepare .bzl files to the new semantics of += on listsGravatar vladmos2017-08-17
| | | | | | | | In the future += on lists will work like .extend (by mutating the list) instead of copying the list items to a new list (current behavior). Some .bzl files need to be cleaned up to be compatible with both behaviors. PiperOrigin-RevId: 165528261
* Update files attribute on pkg_tar.Gravatar John Cater2017-08-10
| | | | | Change-Id: I37bb40cae9d8a6ca99460df83b33541972926766 PiperOrigin-RevId: 164726294
* Normalize paths when adding them to the tarball.Gravatar Googler2017-07-24
| | | | PiperOrigin-RevId: 162742684
* Change `files` attr of `pkg_tar` to a dict.Gravatar John Millikin2017-07-12
| | | | | | | | | | The existing support for including a flat list of labels was moved to the `srcs` attribute. See https://github.com/bazelbuild/bazel/issues/3317 for context and motivation. Closes #3318. PiperOrigin-RevId: 161645944
* Make tools/build_defs/pkg/archive.py py3 compatibleGravatar David Flemström2017-05-02
| | | | | | | | | | | | | | | Without this change, any build using python3 and involving this tool fails with: Traceback (most recent call last): File ".../bazel-out/host/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/__main__/../bazel_tools/tools/build_defs/pkg/build_tar.py", line 22, in <module> from tools.build_defs.pkg import archive File ".../bazel-out/host/bin/external/bazel_tools/tools/build_defs/pkg/build_tar.runfiles/bazel_tools/tools/build_defs/pkg/archive.py", line 17, in <module> from StringIO import StringIO ModuleNotFoundError: No module named 'StringIO' Closes #2865. PiperOrigin-RevId: 154808860
* Adjust the visibility of this rule, which is needed for the migration of ↵Gravatar Googler2017-04-28
| | | | | | docker_build to rules_docker. PiperOrigin-RevId: 154431359
* Add possibility to set ownership of files on pkg_tarGravatar Damien Martin-Guillerez2017-04-24
| | | | | Change-Id: Ic8c57c0ce78b5875135d5d1f19629ee40fd8f5f2 PiperOrigin-RevId: 153718869
* Make bazel_bootstrap_distfile_test work on WindowsGravatar Yun Peng2017-02-23
| | | | | | | | -- Change-Id: Ia6c94304fded25de48eda2060c5ec11368ff172c Reviewed-on: https://cr.bazel.build/8991 PiperOrigin-RevId: 148286095 MOS_MIGRATED_REVID=148286095
* Add pkg_rpm build rule to help generating RPM packages. Gravatar John Cater2017-02-06
| | | | | | | | | | RELNOTES: Adds pkg_rpm rule for generating RPM packages. -- Change-Id: I2e83161e29218700bbe7e62186b0b1667e555a7c Reviewed-on: https://cr.bazel.build/8590 PiperOrigin-RevId: 146477490 MOS_MIGRATED_REVID=146477490
* Rollback of commit b7c00d8762d74fb54d0a6b0eb355abc6dc7a97c3.Gravatar Damien Martin-Guillerez2016-12-22
| | | | | | | | | | | | | | *** Reason for rollback *** Does not build: http://ci.bazel.io/job/Bazel/1129/ *** Original change description *** Export dot-format graphs as-is and download dot as an external repo -- PiperOrigin-RevId: 142748151 MOS_MIGRATED_REVID=142748151
* Export dot-format graphs as-is and download dot as an external repoGravatar Kristina Chodorow2016-12-22
| | | | | | -- PiperOrigin-RevId: 142692462 MOS_MIGRATED_REVID=142692462
* Mark pkg_tar dependencies as Python 3 compatibleGravatar Damien Martin-Guillerez2016-11-18
| | | | | | | This should allow to use pkg_tar from project that use python 3 (e.g. TensorFlow). -- MOS_MIGRATED_REVID=139561406
* Change our URL to bazel.buildGravatar Damien Martin-Guillerez2016-10-28
| | | | | -- MOS_MIGRATED_REVID=137500893
* Fix messed-up indentation in make_deb.pyGravatar Benjamin Staffin2016-10-07
| | | | | | | | | | | I'm not sure how this got all crazy the last time I touched this file! This restores the earlier sane line wrapping. Changes are purely whitespace. -- Change-Id: I6bc743de132be74b1be64c45fceba73315d06e72 Reviewed-on: https://bazel-review.googlesource.com/c/5750/ MOS_MIGRATED_REVID=135365348
* Global cleanup change.Gravatar Vladimir Moskva2016-09-07
| | | | | -- MOS_MIGRATED_REVID=132422029
* pkg_deb: Make distribution and urgency adjustableGravatar Benjamin Staffin2016-08-31
| | | | | | | -- Change-Id: Ib2066597f3aeec2b160dd56fd19c60d618cb925d Reviewed-on: https://bazel-review.googlesource.com/#/c/4280 MOS_MIGRATED_REVID=131699503
* Add conffiles support to pkg_debGravatar Michal Rydlo2016-08-26
| | | | | | | | | | | | | pkg_deb can have either conffiles or conffiles_file parameter that propagates the list of conffiles into the deb archive. Also the tests in //tools/build_defs/pkg were fixed to run against the rules from the source tree and not from the bazel distribtution. -- Change-Id: I61c447feef16511acbb0078d91954dcd7d3375f4 Reviewed-on: https://bazel-review.googlesource.com/#/c/5610 MOS_MIGRATED_REVID=131391925
* fixed strip_prefix related with issue#1604Gravatar Zhexuan Yang2016-08-08
| | | | | | | -- Change-Id: I49d4bcdb60052a5cf94049f962732ee2167828f1 Reviewed-on: https://bazel-review.googlesource.com/#/c/4300 MOS_MIGRATED_REVID=129615052
* Global cleanup change.Gravatar Laurent Le Brun2016-07-07
| | | | | -- MOS_MIGRATED_REVID=126687108
* Fixed Bazel deb package dependency on Ubuntu 16.04Gravatar Yun Peng2016-07-01
| | | | | | | | | | Declare openjdk-9-jdk as Conflicts Progress towards #1456 -- Change-Id: I67c17b78f90f81dbcc9c39bf6f3915789662fa94 Reviewed-on: https://bazel-review.googlesource.com/#/c/3951 MOS_MIGRATED_REVID=126402113
* Rename data_path to strip_prefix, and directory to package_dir.Gravatar Yue Gan2016-06-22
| | | | | | | Fixes #1403 -- MOS_MIGRATED_REVID=125543227
* Adds missing arguments. Fixes #1403.Gravatar Yue Gan2016-06-21
| | | | | -- MOS_MIGRATED_REVID=125429700
* Support top-level packages in pkg_tarGravatar Kristina Chodorow2016-05-17
| | | | | | | | | | | | | Previously, _short_path_dirname would take a short path like "libfoo.jar", rfind would return -1, sp[:-1] would return "libfoo.ja", and then _dest_path would strip that prefix off of "libfoo.jar", leaving just "r". Also added some unit tests for these functions. Fixes #1253. -- MOS_MIGRATED_REVID=122527723
* Add generated docs to Jekyll tree build target. Add script for bringing upGravatar David Chen2016-05-09
| | | | | | | | | | | | | | | | | | | | local instance of bazel.io site. * Add a new genrule rule that runs the new jekyll-tree.sh to do the following: * Combine the generated docs for the Build Encyclopedia and Skylark Library with the static site docs * Combine the README.md files for the Docker and Packaging rules with the Jekyll tree * Process the generated docs, replaces instances of "blaze" with "bazel", etc. * Add scripts/serve-docs.sh script that can be used to bring up a local instance of the bazel.io website. As of this patch, it is possible to construct the full Bazel.io site tree from the master branch. -- MOS_MIGRATED_REVID=121813688
* Update octal refs in python script of pkg and docker rulesGravatar Damien Martin-Guillerez2016-03-31
| | | | | | | Fixes #999 -- MOS_MIGRATED_REVID=118675703
* pkg: use a flag file instead of passing the list of arguments in the command ↵Gravatar Damien Martin-Guillerez2016-03-01
| | | | | | | | | line Big pkg can run over the command line limit. -- MOS_MIGRATED_REVID=115950963
* Update documentation of skylark rules: correct load statementsGravatar Damien Martin-Guillerez2016-02-10
| | | | | | | Fixes #864. -- MOS_MIGRATED_REVID=114208872
* Use labels in load statementsGravatar Damien Martin-Guillerez2016-02-02
| | | | | | | | | | | | This will fix some issue with loading skylark rules from @bazel_tools. Tested with ./compile.sh all and also a project that use pkg_tar from @bazel_tools (which is broken at HEAD). -- Change-Id: Iffbb7134ef5fee497890c4d01b85084973d45ad0 Reviewed-on: https://bazel-review.googlesource.com/2800 MOS_MIGRATED_REVID=113508661
* Add the @bazel_tools prefix to docker and pkg toolingGravatar Damien Martin-Guillerez2016-01-27
| | | | | -- MOS_MIGRATED_REVID=113052852
* Don't break long words for debian control fieldsGravatar Andrew Jorgensen2016-01-12
| | | | | | | | | | | | | | | | | By default wrapping can split on `-` characters which creates the chance that any dependency with a `-` in it that falls near the wrap threshold will get split along two lines and render the control file invalid. > Text is preferably wrapped on whitespaces and right after the hyphens > in hyphenated words; only then will long words be broken if necessary, > unless TextWrapper.break_long_words is set to false. https://docs.python.org/3.1/library/textwrap.html#textwrap.TextWrapper.break_long_words Fixes #772. -- Reviewed-on: https://github.com/bazelbuild/bazel/pull/777 MOS_MIGRATED_REVID=111925490
* Make Debian package maintainer scripts executable.Gravatar Piotr Sikora2015-12-15
| | | | | | | | This is required per official documentation: https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html -- MOS_MIGRATED_REVID=110235045
* Fix pkg_tar docs.Gravatar Warren Turkal2015-11-30
| | | | | | | | | | | | | | There is no tars arg. There is a deps arg that appears to work like the tars arg is described in the docs. There is also no debs arg. Signed-off-by: Warren Turkal <wt@penguintechs.org> -- Change-Id: If11e8bcae33b91c41eb11e90fa479becbb36d93c Reviewed-on: https://bazel-review.googlesource.com/2393 MOS_MIGRATED_REVID=108962257
* Generate .changes files to go along with .deb packagesGravatar Benjamin Staffin2015-11-24
| | | | | | | | | | These are quite handy for integration with apt repository management tooling such as reprepro. -- Change-Id: I865fba846b2c0690ddcc558484462dd3c3e62373 Reviewed-on: https://bazel-review.googlesource.com/#/c/2291/4 MOS_MIGRATED_REVID=108603643
* Generate proper filenames for .deb packagesGravatar Benjamin Staffin2015-11-24
| | | | | | | | | | | | | Various tools will break if deb filenames don't follow the right format. Retains a symlink from the <rulename>.deb to the new filename for compatibility. -- Change-Id: Ib8ba5b61fcbfe95469f0d9296a932b2a468bc4c2 Reviewed-on: https://bazel-review.googlesource.com/#/c/2290 MOS_MIGRATED_REVID=108590335