aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/ijar/zip_main.cc
Commit message (Collapse)AuthorAge
* Add support for zipped LLVM profile files.Gravatar Googler2017-06-14
| | | | | | | | | | | | | | | | | | | This change is a follow-up to a recent change which allowed LLVM raw profile files to be directly used with blaze. This change allows zipped LLVM raw profile files. This uses //tools/zip:zipper to extract the zipped file contents. This also adds a new option to //tools/zip:zipper, 'j', to junk directories while unzipping. Tested: blaze test //devtools/blaze/integration:fdo_test blaze test //third_party/ijar/test:zip_test RELNOTES[NEW]: Zipped LLVM profiles are now supported. PiperOrigin-RevId: 158849516
* Ijar: remove spurious error messageGravatar László Csomor2016-12-12
| | | | | | | | | | | | | | | | | | Commit 645dbc4 moved the file stating logic to platform_utils.cc into the `stat_file` method, then commit 8d6da00 added error reporting to that method so callers wouldn't need to report errors on their own. Problem is, one of the callers was using stat_file for simple file existence checking so reporting an error there was spurious. Fixes https://github.com/bazelbuild/bazel/issues/2201 -- Change-Id: I40d1ee2bad8f3d03627c0b5c0bfd593bb5289d23 Reviewed-on: https://cr.bazel.build/7810 PiperOrigin-RevId: 141739581 MOS_MIGRATED_REVID=141739581
* Ijar: can be compiled with MSVCGravatar Laszlo Csomor2016-12-02
| | | | | | | | | | | | | | | | | | We can now build //third_party/ijar/...:all with --cpu=x64_windows_msvc. We also have to use --output_user_root=/c/tmp or something similarly short because //third_party/zlib tickles https://github.com/bazelbuild/bazel/issues/2145 This change takes us closer to compiling Bazel with MSVC. See https://github.com/bazelbuild/bazel/issues/2107 -- PiperOrigin-RevId: 140846600 MOS_MIGRATED_REVID=140846600
* Ijar: extract MakeDirs to platform_utilsGravatar Laszlo Csomor2016-12-01
| | | | | | | | | | | | zip_main.cc no longer needs <unistd.h>. This change takes us closer to compiling ijar, thus Bazel, with MSVC. See https://github.com/bazelbuild/bazel/issues/2157 See https://github.com/bazelbuild/bazel/issues/2107 -- MOS_MIGRATED_REVID=140724421
* Ijar: extract [] to platform_utilsGravatar Laszlo Csomor2016-12-01
| | | | | | | | | | | | zip_main.cc no longer needs <unistd.h>. This change takes us closer to compiling ijar, thus Bazel, with MSVC. See https://github.com/bazelbuild/bazel/issues/2157 See https://github.com/bazelbuild/bazel/issues/2107 -- MOS_MIGRATED_REVID=140723658
* Ijar: extract file reading logic to platform_utilsGravatar Laszlo Csomor2016-12-01
| | | | | | | | | | | This change takes us closer to compiling ijar, thus Bazel, with MSVC. See https://github.com/bazelbuild/bazel/issues/2157 See https://github.com/bazelbuild/bazel/issues/2107 -- MOS_MIGRATED_REVID=140722341
* Ijar: extract file writing logic to platform_utilsGravatar Laszlo Csomor2016-12-01
| | | | | | | | | | | | | | This change takes us closer to compiling ijar, thus Bazel, with MSVC. Also update the StatFile method added by unknown commit to report any errors. See https://github.com/bazelbuild/bazel/issues/2157 See https://github.com/bazelbuild/bazel/issues/2107 -- MOS_MIGRATED_REVID=140719249
* Ijar: extract file stating logic to platform_utilsGravatar Laszlo Csomor2016-12-01
| | | | | | | | | | This change takes us closer to compiling ijar, thus Bazel, with MSVC. See https://github.com/bazelbuild/bazel/issues/2107 and https://github.com/bazelbuild/bazel/issues/2157 -- MOS_MIGRATED_REVID=140717828
* Rollback of commit a6b4cbbd4a4bbb42eefe8fb0e646cd30780394e4.Gravatar Laszlo Csomor2016-10-04
| | | | | | | | | | | | | | | *** Reason for rollback *** Other projects may depend on Ijar without wanting to depend on Bazel. *** Original change description *** Ijar: use utilities from Bazel's source Remove a duplicate implementation of JoinPath. -- MOS_MIGRATED_REVID=135088616
* Rollback of commit fb65f9382f34c2641b5069c30a57a08445b920a3.Gravatar Laszlo Csomor2016-10-04
| | | | | | | | | | | | | | | *** Reason for rollback *** Other projects may depend on Ijar without wanting to depend on Bazel. *** Original change description *** Ijar: use more utilities from Bazel's source Remove duplicate implementations from zip_main.cc -- MOS_MIGRATED_REVID=135086722
* Ijar: use more utilities from Bazel's sourceGravatar Laszlo Csomor2016-10-04
| | | | | | | Remove duplicate implementations from zip_main.cc -- MOS_MIGRATED_REVID=134797116
* Ijar: use utilities from Bazel's sourceGravatar Laszlo Csomor2016-09-30
| | | | | | | Remove a duplicate implementation of JoinPath. -- MOS_MIGRATED_REVID=134778185
* Fixed some documentation in zip_main.ccGravatar Yun Peng2016-08-05
| | | | | -- MOS_MIGRATED_REVID=129429378
* zipper now can specify actual path a file is added toGravatar Yun Peng2016-08-04
| | | | | | | | | | | Examples for how to use <zip_path>=<file> syntax: zipper c x.zip a/b/__init__.py= # Add an empty file at a/b/__init__.py zipper c x.zip a/b/main.py=foo/bar/bin.py # Add file foo/bar/bin.py at a/b/main.py -- Change-Id: I3c09dfb31d082f3ca8036e87affc8d99f7e75fe0 Reviewed-on: https://bazel-review.googlesource.com/#/c/4243 MOS_MIGRATED_REVID=129325719
* Fix owner permissions bug in unzip codeGravatar Justine Tunney2016-08-02
| | | | | | | | This situation arises when a zip file does not contain entries for the directories themselves, but only the files themselves. -- MOS_MIGRATED_REVID=129072925
* Improvements to zipper extraction support (x option):Gravatar Rumou Duan2016-05-12
| | | | | | | | | | 1. Add ability to specify relative output directory through -d option. 2. Add ability to specify a list of archive entries to extract from the zip file. Fixes #630. -- MOS_MIGRATED_REVID=122159723
* ijar: check the return value of getcwd() functionGravatar Thiago Farina2016-04-05
| | | | | | | | | | | | | | | | | Check the return value of getcwd() and if it fails print a message to the user and return -1. This should fix the following warning: third_party/ijar/zip_main.cc:175:32: warning: ignoring return value of 'char* getcwd(char*, size_t)', declared with attribute warn_unused_result [-Wunused-result] getcwd(output_root, PATH_MAX); -- Change-Id: I8857e484f5baf60289d7c19a128f5a4616ae50e4 Reviewed-on: https://bazel-review.googlesource.com/#/c/3230/ MOS_MIGRATED_REVID=119029402
* Support @ syntax for specifying the list of files to zipperGravatar Damien Martin-Guillerez2016-01-21
| | | | | | | | | | | | | | | When creating an archive with //third_party/ijar:zipper, all files to add should be specified as an argument. When adding a lot of files, this leads to reaching the maximum size of the command line. This change add a @filename argument that permit to specify a file containing the list of files to zip. -- Change-Id: I02843588896969ef2d6add26c1c67ff44a27f7de Reviewed-on: https://bazel-review.googlesource.com/#/c/2695/ MOS_MIGRATED_REVID=112678600
* Normalize ijar's header to 'The Bazel Authors'.Gravatar Damien Martin-Guillerez2015-11-19
| | | | | | | | As per discussion with Alan, just use the same copyright than for the rest of Bazel and adds Alan as an author. -- MOS_MIGRATED_REVID=108250408
* Add CRC-32 computation to third_party/ijar:zipperGravatar Damien Martin-Guillerez2015-09-11
| | | | | | | | | This can be a problem for some usage of the produced ZIP file to not compute the CRC-32 correctly. We still skip it for ijar for speed. -- MOS_MIGRATED_REVID=102844157
* Fix a signed vs unsigned comparison warning in the ijar zipper.Gravatar Erik Kuefler2015-09-03
| | | | | | | | | | | | | This is more than just a cosmetic issue. Since groovy and appengine rules depend directly on this target, the zipper gets built in the user's workspace whenever a groovy/appengine target is built. If the workspace is set to upgrade warnings to errors, this can cause builds to fail. -- Change-Id: I6c8b347df14098945c788411fc3e38f9c128596f Reviewed-on: https://bazel-review.googlesource.com/1951 MOS_MIGRATED_REVID=102223767
* Add support for compression in //third_party/ijar:zipperGravatar Damien Martin-Guillerez2015-08-31
| | | | | | | | | | | Add the 'C' flag to //third_party/ijar:zipper to try to compress files using the DEFLATE algorithm. To avoid regression, creation of uncompressed ZIP files is still the default. -- Change-Id: I8ad7182d8f6f152abd56ae472a406cbb8d39fb64 Reviewed-on: https://bazel-review.googlesource.com/#/c/1821/ MOS_MIGRATED_REVID=101925953
* Fix zipper for empty filesGravatar Kristina Chodorow2015-07-02
| | | | | | | It was erroring out because it could not mmap an empty file. -- MOS_MIGRATED_REVID=97338974
* Ijar's zipper: fallback when external attributes is unsetGravatar Damien Martin-Guillerez2015-06-29
| | | | | | | | Some ZIP files does not define external attributes leading to wrong uncompression by the zipper of ijar. -- MOS_MIGRATED_REVID=97117828
* Use the ijar ZIP implementation in Blaze instead of libarchiveGravatar Damien Martin-Guillerez2015-06-01
| | | | | | | | | | | This ZIP implementation is lightweight and rely on zlib for compression. libarchive was a bit tricky to set-up so it's better to use that one. -- Change-Id: I607b492998572e834e095a4606eeb77c0b574542 Reviewed-on: https://bazel-review.googlesource.com/#/c/1410/ MOS_MIGRATED_REVID=94910072
* Fix %O format string in ijar's zipperGravatar Damien Martin-Guillerez2015-06-01
| | | | | | | | | Also remove the leading slash when flattening files Fixes #219. -- MOS_MIGRATED_REVID=94751441
* Refactor ZIP implementation of ijarGravatar Damien Martin-Guillerez2015-05-28
It extracts Zip/Unzip methods of ijar in a separate library. A zipper binary is provided to test that implementation outside. Note that this implementation does not compute CRC-32 and unzip will complain on file zipped with it (but Java won't complain). The error handling has been replaced to use proper error reporting instead of launching abort()'s allover the place so ijar's zip library can be used outside of ijar. Finally, support for ZIP preamble has been added to handle self-extractable ZIP files. -- Change-Id: I833034b4c0054925bada75102fe040db875da789 Reviewed-on: https://bazel-review.googlesource.com/#/c/1371/ MOS_MIGRATED_REVID=94656262