11 Commits

Author SHA1 Message Date
David Ostrovsky
6e0a3e5da8 Buck: extend the tool chain to support unsigning JARs
After switching to Eclipse Maven repository for pulling JGit lib, we
have the problem that according to Eclipse release train the JARs have
to be signed. That collids with our jgit patch for diff deserialization.

To rectify that, add `unsign` parameter to maven_jar() function.

Change-Id: Ib7bfa5d16f980a64b887d61a4b4ec325e6ffb0a1
2013-10-28 21:30:53 +01:00
David Pursehouse
71a869fefe Update jgit to 3.1.0.201310021548-r
Change-Id: Ib1526cd97353933dee1b76de33239cbcb31107b0
2013-10-23 20:09:48 +02:00
David Ostrovsky
56fe1f8dc3 BUCK: fix build against unpublished JARs
This change fixes the following problems:

* MAVEN_LOCAL definition must be prefixed with 'file://' for curl to work
* src_sha1 was unnecessary required to define source artifact
* update the documentation that sha1 must not be provided

Change-Id: I1cee6588897c928f01bac5cc9fb252251f4f8027
2013-08-16 16:26:59 +00:00
Shawn Pearce
e585fc0449 Define MAVEN_LOCAL for unpublished Maven JARs
Standardize the definition of MAVEN_LOCAL as ~/.m2/repository.
This makes it slightly easier to point to a custom build of a
dependency such as gwtorm or PrologCafe by installing the JAR to
the local Maven repository and updating the maven_jar() rule to
use repository = MAVEN_LOCAL instead of GERRIT.

Change-Id: I2e54d1039608c0195a992dbc12fe74bb513466c6
2013-08-14 15:40:35 -07:00
David Pursehouse
e277fc3f74 download_file: Catch exceptions raised from shutil.copyfile
shutil.copyfile can raise shutil.Error and IOError.  Catch these and
exit with error status after logging the error to the console.

Change-Id: I63b8caa371cc7034bbb3f19d0bd3fdd0446af2bf
2013-08-08 10:50:20 +09:00
David Pursehouse
8ea0650c8c download_file: Exit with error if extracting files from zip fails
If extracting files fails, it prints the error message but then
continues.

Make it exit with error status in this case.

Change-Id: I19fafda68a85b46300a1abaf6a86567cf1f712b0
2013-08-08 10:48:51 +09:00
Shawn Pearce
f98b3798a6 Support build where ~/ and $(pwd) are different filesystems
download_file caches original zips in ~/.gerritcodereview/buck-cache.
If this is a different filesystem than $(pwd)/buck-out a symlink
was used to connect the build file with the original archive. This
confuses Buck when creating the $SRCDIR for a genrule().

If a hardlink does not work, copy the file.

Change-Id: If66c59fb6aecc93b5a3e85cdd76ef880538875ff
2013-08-06 12:20:30 -07:00
Shawn Pearce
d500500b5e Update URLs for Google Cloud Storage
Per [1] the correct URL is <bucket>.storage.googleapis.com/<object>.
Update existing references to project resources to use this domain
name instead of the old name.

[1] https://developers.google.com/storage/docs/reference-uris

Change-Id: I3788cfb4504b3908d2b5eccbdf52beffc3d18387
2013-06-21 11:01:45 -07:00
Sasa Zivkov
4709fff0f3 Better error reporting when curl is not installed
If buck build was done on a system without curl installed
a misleading error message would be printed out:

  error creating directory /home/user/.gerritcodereview/buck-cache

However, the real error was that invocation of curl failed. Since
it was an OSError it was handled with the wrong except block.

Separate handling of the OSError for the folder creation and curl
invocation.

Change-Id: Ic7e7c2c2704ea4cbccff4689dffe17a436108395
2013-06-13 17:41:19 +02:00
Shawn Pearce
eb2eeec491 Delete corrupt cache entries from ~/.gerritcodereview/buck-cache
If the SHA-1 does not match the downloaded file content, delete the
file from the cache. This allows a user to fix whatever connectivity
problem led to the corruption and re-run buck build to download
the correct content.

Change-Id: I2f72fb2b187675ec9d5cda650d8982bc93a00189
2013-05-22 17:54:32 -07:00
Shawn Pearce
8713eb859e Rename download_jar to download_file
This is a generic downloader that can be used for other
dependencies, like ZIP files containing JS.

Change-Id: I643f81fc06d790cebaa0eb677fa232ba0c652053
2013-05-20 11:25:59 -07:00