920b1667d4
If the Bouncy Castle Crypto libraries are unsigned, issues result with the Eclipse build, since they rely on the copy that exists in the libraries copied by the download_file.py script. As a workaround, use a genrule in ConvertKey to unsign the JARs manually. Change-Id: I44d6ad5b05a18258e8bf5400c42f1cbd159e59b2
51 lines
1.0 KiB
Python
51 lines
1.0 KiB
Python
include_defs('//lib/maven.defs')
|
|
|
|
genrule(
|
|
name = 'bcprov__unsign',
|
|
cmd = ' && '.join([
|
|
'unzip -qd $TMP $(location //lib/bouncycastle:bcprov)',
|
|
'cd $TMP',
|
|
'zip -Drq $OUT . -x META-INF/\*.RSA META-INF/\*.DSA META-INF/\*.SF META-INF/\*.LIST',
|
|
]),
|
|
out = 'bcprov-unsigned.jar',
|
|
)
|
|
|
|
prebuilt_jar(
|
|
name = 'bcprov',
|
|
binary_jar = ':bcprov__unsign',
|
|
)
|
|
|
|
genrule(
|
|
name = 'bcpkix__unsign',
|
|
cmd = ' && '.join([
|
|
'unzip -qd $TMP $(location //lib/bouncycastle:bcpkix)',
|
|
'cd $TMP',
|
|
'zip -Drq $OUT . -x META-INF/\*.RSA META-INF/\*.DSA META-INF/\*.SF META-INF/\*.LIST',
|
|
]),
|
|
out = 'bcpkix-unsigned.jar',
|
|
)
|
|
|
|
prebuilt_jar(
|
|
name = 'bcpkix',
|
|
binary_jar = ':bcpkix__unsign',
|
|
)
|
|
|
|
java_library(
|
|
name = 'convertkey__lib',
|
|
srcs = glob(['src/main/java/**/*.java']),
|
|
deps = [
|
|
':bcprov',
|
|
':bcpkix',
|
|
'//lib:jsch',
|
|
'//lib/log:nop',
|
|
'//lib/mina:sshd',
|
|
],
|
|
)
|
|
|
|
java_binary(
|
|
name = 'convertkey',
|
|
deps = [':convertkey__lib'],
|
|
main_class = 'com.googlesource.gerrit.convertkey.ConvertKey',
|
|
)
|
|
|