From ae081b8dc1adf510a9fdffd7e2526abc37d68fcf Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 16 Jun 2021 17:41:24 +0200 Subject: [PATCH 01/38] ReachabilityCheckerTestCase: fix reachable from self test case Change-Id: I8f94a0a0ff401f1691b3757002756b4e83dd8640 Signed-off-by: Han-Wen Nienhuys --- .../org/eclipse/jgit/revwalk/ReachabilityCheckerTestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ReachabilityCheckerTestCase.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ReachabilityCheckerTestCase.java index 092033449..a4411e56a 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ReachabilityCheckerTestCase.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/ReachabilityCheckerTestCase.java @@ -88,7 +88,7 @@ public void reachable() throws Exception { assertReachable("reachable from another tip", checker.areAllReachable(Arrays.asList(a), Stream.of(b2))); assertReachable("reachable from itself", - checker.areAllReachable(Arrays.asList(a), Stream.of(b2))); + checker.areAllReachable(Arrays.asList(a), Stream.of(a))); } @Test From 64b0dee98fab8dd145ea389d3d7b18d9dcaab218 Mon Sep 17 00:00:00 2001 From: andrewxian2000 Date: Tue, 15 Jun 2021 09:58:52 +1200 Subject: [PATCH 02/38] Fix garbage collection failing to delete pack file The loosen() method has opened pack file and the open pack file handle may prevent it from being deleted e.g. on Windows. Fix this by closing the pack file only after loosen() finished. Bug: 574178 Change-Id: Icd59931a218d84c9c97b450eea87b21ed01248ff Signed-off-by: andrew.xian2000@gmail.com Signed-off-by: Matthias Sohn --- .../src/org/eclipse/jgit/internal/storage/file/GC.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java index 9ffff9f66..40c075ec5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java @@ -344,10 +344,10 @@ private void deleteOldPacks(Collection oldPacks, && repo.getFS() .lastModifiedInstant(oldPack.getPackFile()) .toEpochMilli() < packExpireDate) { - oldPack.close(); if (shouldLoosen) { loosen(inserter, reader, oldPack, ids); } + oldPack.close(); prunePack(oldPack.getPackFile()); } } From ed5be35e2ef69b23260d4ec1ce3cabfc4aee0c95 Mon Sep 17 00:00:00 2001 From: Luca Milanesio Date: Sat, 19 Jun 2021 01:50:35 +0100 Subject: [PATCH 03/38] Remove use of deprecated getAllRefs() in ReceivePack Repository.getAllRefs() is deprecated and should not be used anymore. Leverage the ref-db and the retrieval of refs by prefix and adapt the result to the expected refname/ref map. Bug: 534731 Change-Id: I37a9092859f220ddc4e5063d01544f3e82208be8 Signed-off-by: Luca Milanesio --- .../eclipse/jgit/transport/ReceivePack.java | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java index 79f60c320..58f8895e0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java @@ -29,6 +29,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.io.UncheckedIOException; import java.text.MessageFormat; import java.util.ArrayList; import java.util.Collections; @@ -37,6 +38,8 @@ import java.util.Map; import java.util.Set; import java.util.concurrent.TimeUnit; +import java.util.function.Function; +import java.util.stream.Collectors; import org.eclipse.jgit.annotations.Nullable; import org.eclipse.jgit.errors.InvalidObjectIdException; @@ -441,7 +444,7 @@ public Map getAdvertisedRefs() { */ public void setAdvertisedRefs(Map allRefs, Set additionalHaves) { - refs = allRefs != null ? allRefs : db.getAllRefs(); + refs = allRefs != null ? allRefs : getAllRefs(); refs = refFilter.filter(refs); advertisedHaves.clear(); @@ -1295,6 +1298,21 @@ public ReceivedPackStatistics getReceivedPackStatistics() { return stats; } + /** + * Extract the full list of refs from the ref-db. + * + * @return Map of all refname/ref + */ + private Map getAllRefs() { + try { + return db.getRefDatabase().getRefs().stream() + .collect(Collectors.toMap(Ref::getName, + Function.identity())); + } catch (IOException e) { + throw new UncheckedIOException(e); + } + } + /** * Receive a list of commands from the input. * From d947e849806891f315bbc869494527906a9ec58f Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sun, 27 Jun 2021 19:06:19 +0200 Subject: [PATCH 04/38] Fix typo in javadoc of PathTreeFilterHandler Change-Id: Icf0dc814baf0dc44addd102d9c03b821b4022a84 --- .../src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java index 96c72d9dc..653511947 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java @@ -25,7 +25,7 @@ import org.kohsuke.args4j.spi.Setter; /** - * Create a {@link org.eclipse.jgit.treewalk.filter.TreeFilter} to patch math + * Create a {@link org.eclipse.jgit.treewalk.filter.TreeFilter} to match path * names. *

* This handler consumes all arguments to the end of the command line, and is From 0b9193e69fccdd4c9decb6a94400607d7484e6de Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sun, 27 Jun 2021 22:18:33 +0200 Subject: [PATCH 05/38] [pgm] Fix default meta variable defined in StopOptionHandler Change-Id: I703718e2476d40d34b11083414ac0ed5e34bf90a --- .../resources/org/eclipse/jgit/pgm/internal/CLIText.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties index 38deab99a..97450033e 100644 --- a/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties +++ b/org.eclipse.jgit.pgm/resources/org/eclipse/jgit/pgm/internal/CLIText.properties @@ -8,7 +8,7 @@ VAL=VAL # default meta variable defined in the org.kohsuke.args4j.spi.ExplicitBooleanOptionHandler VALUE=VAL # default meta variable defined in the org.kohsuke.args4j.spi.StopOptionHandler -ARGUMENTS=ARGUMENTS +ARGS=ARGS # default meta variable defined in the org.kohsuke.args4j.spi.OneArgumentOptionHandler N=N From 4acedc5d2e61b80b9ff61ab2c64fa1de6f300412 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Tue, 29 Jun 2021 21:43:44 +0200 Subject: [PATCH 06/38] Update 4.20 target platform to use final 4.20 release Change-Id: I8d6a1617a7713faf5186cfb5b2a084d0f1f9e63f --- .../org.eclipse.jgit.target/jgit-4.20-staging.tpd | 8 -------- .../{jgit-4.20-staging.target => jgit-4.20.target} | 4 ++-- .../org.eclipse.jgit.target/jgit-4.20.tpd | 8 ++++++++ 3 files changed, 10 insertions(+), 10 deletions(-) delete mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.tpd rename org.eclipse.jgit.packaging/org.eclipse.jgit.target/{jgit-4.20-staging.target => jgit-4.20.target} (97%) create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.tpd deleted file mode 100644 index de929b56b..000000000 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.tpd +++ /dev/null @@ -1,8 +0,0 @@ -target "jgit-4.20-staging" with source configurePhase - -include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" - -location "https://download.eclipse.org/staging/2021-06/" { - org.eclipse.osgi lazy -} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target similarity index 97% rename from org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.target rename to org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target index c0324adad..6ec6d393e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20-staging.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target @@ -1,7 +1,7 @@ - + @@ -90,7 +90,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd new file mode 100644 index 000000000..c750cbefa --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd @@ -0,0 +1,8 @@ +target "jgit-4.20" with source configurePhase + +include "projects/jetty-9.4.x.tpd" +include "orbit/R20210602031627-2021-06.tpd" + +location "https://download.eclipse.org/releases/2021-06/" { + org.eclipse.osgi lazy +} From 1c6bd377ffd39a9473a54012ba8f515e55ee1709 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Tue, 29 Jun 2021 21:44:06 +0200 Subject: [PATCH 07/38] Add 4.21 target platform Change-Id: I88d32956fd7ad5c23aa395abd88f35359b519b79 --- .../org.eclipse.jgit.target/jgit-4.21.target | 96 +++++++++++++++++++ .../org.eclipse.jgit.target/jgit-4.21.tpd | 8 ++ 2 files changed, 104 insertions(+) create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target new file mode 100644 index 000000000..243526e3a --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd new file mode 100644 index 000000000..9387d9480 --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd @@ -0,0 +1,8 @@ +target "jgit-4.21" with source configurePhase + +include "projects/jetty-9.4.x.tpd" +include "orbit/R20210602031627-2021-06.tpd" + +location "https://download.eclipse.org/staging/2021-09/" { + org.eclipse.osgi lazy +} From 66c9c7bf876bd81ebf57a769f14f5403861f83db Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Tue, 11 May 2021 09:04:52 +0200 Subject: [PATCH 08/38] Update target platform to I20210626190330 Update - com.google.gson to 2.8.7.v20210624-1215 - javaewah to 1.1.12.v20210622-2206 - org.apache.sshd.osgi to 2.7.0.v20210623-0618 - org.apache.sshd.sftp to 2.7.0.v20210623-0618 - org.tukaani.xz to 1.9.0.v20210624-1259 - Apache MINA sshd to 2.7.0 - Remove work-arounds for problems resolved upstream since 2.6.0, and adapt to upstream API changes. - update DEPENDENCIES. CQ: 23469 CQ: 23470 CQ: 23496 CQ: 23497 CQ: 23498 Bug: 574220 Change-Id: I898b216c3492f8488fbf25fa4b49f1250f86f3c8 Also-by: David Ostrovsky Signed-off-by: Thomas Wolf Signed-off-by: Matthias Sohn --- DEPENDENCIES | 87 +++---- WORKSPACE | 20 +- .../META-INF/MANIFEST.MF | 50 ++-- .../org.eclipse.jgit.target/jgit-4.10.target | 24 +- .../org.eclipse.jgit.target/jgit-4.10.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.11.target | 24 +- .../org.eclipse.jgit.target/jgit-4.11.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.12.target | 24 +- .../org.eclipse.jgit.target/jgit-4.12.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.13.target | 24 +- .../org.eclipse.jgit.target/jgit-4.13.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.14.target | 24 +- .../org.eclipse.jgit.target/jgit-4.14.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.15.target | 24 +- .../org.eclipse.jgit.target/jgit-4.15.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.16.target | 24 +- .../org.eclipse.jgit.target/jgit-4.16.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.17.target | 24 +- .../org.eclipse.jgit.target/jgit-4.17.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.18.target | 24 +- .../org.eclipse.jgit.target/jgit-4.18.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.19.target | 24 +- .../org.eclipse.jgit.target/jgit-4.19.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.20.target | 24 +- .../org.eclipse.jgit.target/jgit-4.20.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.21.target | 24 +- .../org.eclipse.jgit.target/jgit-4.21.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.6.target | 24 +- .../org.eclipse.jgit.target/jgit-4.6.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.7.target | 24 +- .../org.eclipse.jgit.target/jgit-4.7.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.8.target | 24 +- .../org.eclipse.jgit.target/jgit-4.8.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.9.target | 24 +- .../org.eclipse.jgit.target/jgit-4.9.tpd | 2 +- .../orbit/I20210626190330.tpd | 66 ++++++ .../orbit/R20210602031627-2021-06.tpd | 2 +- .../META-INF/MANIFEST.MF | 26 +- .../META-INF/MANIFEST.MF | 94 ++++---- .../transport/sshd/JGitClientSession.java | 12 +- .../sshd/JGitKexExtensionHandler.java | 163 ------------- .../sshd/JGitPublicKeyAuthFactory.java | 35 --- .../sshd/JGitPublicKeyAuthentication.java | 224 ------------------ .../transport/sshd/SshdSessionFactory.java | 6 +- pom.xml | 8 +- 45 files changed, 426 insertions(+), 783 deletions(-) create mode 100644 org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210626190330.tpd delete mode 100644 org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitKexExtensionHandler.java delete mode 100644 org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthFactory.java delete mode 100644 org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java diff --git a/DEPENDENCIES b/DEPENDENCIES index 9dbca62b0..674ef91d1 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -1,6 +1,6 @@ maven/mavencentral/args4j/args4j/2.33, MIT, approved, CQ11068 -maven/mavencentral/com.google.code.gson/gson/2.8.6, Apache-2.0, approved, CQ23102 -maven/mavencentral/com.googlecode.javaewah/JavaEWAH/1.1.7, Apache-2.0, approved, CQ11658 +maven/mavencentral/com.google.code.gson/gson/2.8.7, Apache-2.0, approved, CQ23496 +maven/mavencentral/com.googlecode.javaewah/JavaEWAH/1.1.12, Apache-2.0, approved, CQ23497 maven/mavencentral/com.jcraft/jsch/0.1.55, BSD-3-Clause, approved, CQ19435 maven/mavencentral/com.jcraft/jzlib/1.1.1, BSD-2-Clause, approved, CQ6218 maven/mavencentral/commons-codec/commons-codec/1.11, Apache-2.0, approved, CQ15971 @@ -8,59 +8,60 @@ maven/mavencentral/commons-logging/commons-logging/1.2, Apache-2.0, approved, CQ maven/mavencentral/javax.servlet/javax.servlet-api/3.1.0, Apache-2.0 AND (CDDL-1.1 OR GPL-2.0 WITH Classpath-exception-2.0), approved, emo_ip_team maven/mavencentral/junit/junit/4.13, , approved, CQ22796 maven/mavencentral/log4j/log4j/1.2.15, Apache-2.0, approved, CQ7837 -maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.9.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/net.bytebuddy/byte-buddy/1.9.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.9.0, Apache-2.0, restricted, clearlydefined +maven/mavencentral/net.bytebuddy/byte-buddy/1.9.0, Apache-2.0, restricted, clearlydefined maven/mavencentral/net.i2p.crypto/eddsa/0.3.0, CC0, approved, CQ17804 -maven/mavencentral/net.sf.jopt-simple/jopt-simple/4.6, MIT, approved, clearlydefined +maven/mavencentral/net.sf.jopt-simple/jopt-simple/4.6, MIT, approved, CQ14441 maven/mavencentral/org.apache.ant/ant-launcher/1.10.10, Apache-2.0 AND W3C AND LicenseRef-Public-Domain, approved, CQ15560 maven/mavencentral/org.apache.ant/ant/1.10.10, Apache-2.0 AND W3C AND LicenseRef-Public-Domain, approved, CQ15560 maven/mavencentral/org.apache.commons/commons-compress/1.19, Apache-2.0, approved, clearlydefined -maven/mavencentral/org.apache.commons/commons-math3/3.2, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.apache.commons/commons-math3/3.2, Apache-2.0, approved, CQ14559 maven/mavencentral/org.apache.httpcomponents/httpclient/4.5.13, Apache-2.0, approved, CQ22761 -maven/mavencentral/org.apache.httpcomponents/httpcore/4.4.14, Apache-2.0, approved, CQ18704 -maven/mavencentral/org.apache.sshd/sshd-common/2.6.0, Apache-2.0 AND ISC, approved, CQ22992 -maven/mavencentral/org.apache.sshd/sshd-core/2.6.0, Apache-2.0 AND ISC, approved, CQ22992 -maven/mavencentral/org.apache.sshd/sshd-osgi/2.6.0, Apache-2.0 AND ISC, approved, CQ22992 -maven/mavencentral/org.apache.sshd/sshd-sftp/2.6.0, Apache-2.0 AND ISC, approved, CQ22993 -maven/mavencentral/org.assertj/assertj-core/3.14.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.apache.httpcomponents/httpcore/4.4.14, Apache-2.0, approved, CQ23528 +maven/mavencentral/org.apache.sshd/sshd-common/2.7.0, Apache-2.0 and ISC, approved, CQ23469 +maven/mavencentral/org.apache.sshd/sshd-core/2.7.0, Apache-2.0, approved, CQ23469 +maven/mavencentral/org.apache.sshd/sshd-osgi/2.7.0, Apache-2.0 and ISC, approved, CQ23469 +maven/mavencentral/org.apache.sshd/sshd-sftp/2.7.0, Apache-2.0, approved, CQ23470 +maven/mavencentral/org.assertj/assertj-core/3.14.0, Apache-2.0, approved, CQ21437 maven/mavencentral/org.bouncycastle/bcpg-jdk15on/1.65, Apache-2.0, approved, CQ21975 maven/mavencentral/org.bouncycastle/bcpkix-jdk15on/1.65, MIT AND LicenseRef-Public-Domain, approved, CQ21976 maven/mavencentral/org.bouncycastle/bcprov-jdk15on/1.65.01, MIT AND LicenseRef-Public-Domain, approved, CQ21977 -maven/mavencentral/org.eclipse.jetty/jetty-http/9.4.41.v20210516, , approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-io/9.4.41.v20210516, , approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-security/9.4.41.v20210516, , approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-server/9.4.41.v20210516, , approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-servlet/9.4.41.v20210516, , approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-util-ajax/9.4.41.v20210516, , approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-util/9.4.41.v20210516, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant.test/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.archive/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.gpg.bc/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.apache/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.server/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.test/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit.http/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit.ssh/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.server.test/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.server/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.test/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.pgm.test/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.pgm/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.apache.test/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.apache/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.jsch/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.test/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ui/5.12.0-SNAPSHOT, , approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit/5.12.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-http/9.4.42.v20210604, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-io/9.4.42.v20210604, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-security/9.4.42.v20210604, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-server/9.4.42.v20210604, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-servlet/9.4.42.v20210604, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-util-ajax/9.4.42.v20210604, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-util/9.4.42.v20210604, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.archive/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.gpg.bc/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.apache/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.server/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit.http/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit.ssh/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.server.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.server/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.pgm.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.pgm/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.apache.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.apache/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.jsch/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ui/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse maven/mavencentral/org.hamcrest/hamcrest-core/1.3, BSD-2-Clause, approved, CQ7063 maven/mavencentral/org.mockito/mockito-core/2.23.0, MIT, approved, CQ17976 maven/mavencentral/org.objenesis/objenesis/2.6, Apache-2.0, approved, CQ15478 maven/mavencentral/org.openjdk.jmh/jmh-core/1.21, GPL-2.0, approved, CQ20517 maven/mavencentral/org.openjdk.jmh/jmh-generator-annprocess/1.21, GPL-2.0, approved, CQ20518 maven/mavencentral/org.osgi/org.osgi.core/4.3.1, Apache-2.0, approved, CQ10111 -maven/mavencentral/org.slf4j/slf4j-api/1.7.30, MIT, approved, CQ13368 +maven/mavencentral/org.slf4j/jcl-over-slf4j/1.7.30, Apache-2.0, approved, CQ12843 +maven/mavencentral/org.slf4j/slf4j-api/1.7.30, MIT, approved, CQ23467 maven/mavencentral/org.slf4j/slf4j-log4j12/1.7.30, MIT, approved, CQ7665 -maven/mavencentral/org.tukaani/xz/1.8, LicenseRef-Public-Domain, approved, CQ15386 +maven/mavencentral/org.tukaani/xz/1.9, LicenseRef-Public-Domain, approved, CQ23498 diff --git a/WORKSPACE b/WORKSPACE index 518e657ed..68305b4a7 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -105,8 +105,8 @@ maven_jar( maven_jar( name = "javaewah", - artifact = "com.googlecode.javaewah:JavaEWAH:1.1.7", - sha1 = "570dde3cd706ae10c62fe19b150928cfdb415e87", + artifact = "com.googlecode.javaewah:JavaEWAH:1.1.12", + sha1 = "9feecc2b24d6bc9ff865af8d082f192238a293eb", ) maven_jar( @@ -123,14 +123,14 @@ maven_jar( maven_jar( name = "sshd-osgi", - artifact = "org.apache.sshd:sshd-osgi:2.6.0", - sha1 = "40e365bb799e1bff3d31dc858b1e59a93c123f29", + artifact = "org.apache.sshd:sshd-osgi:2.7.0", + sha1 = "a101aad0f79ad424498098f7e91c39d3d92177c1", ) maven_jar( name = "sshd-sftp", - artifact = "org.apache.sshd:sshd-sftp:2.6.0", - sha1 = "6eddfe8fdf59a3d9a49151e4177f8c1bebeb30c9", + artifact = "org.apache.sshd:sshd-sftp:2.7.0", + sha1 = "0c9eff7145e20b338c1dd6aca36ba93ed7c0147c", ) maven_jar( @@ -171,8 +171,8 @@ maven_jar( maven_jar( name = "tukaani-xz", - artifact = "org.tukaani:xz:1.8", - sha1 = "c4f7d054303948eb6a4066194253886c8af07128", + artifact = "org.tukaani:xz:1.9", + sha1 = "1ea4bec1a921180164852c65006d928617bd2caf", ) maven_jar( @@ -233,8 +233,8 @@ maven_jar( maven_jar( name = "gson", - artifact = "com.google.code.gson:gson:2.8.6", - sha1 = "9180733b7df8542621dc12e21e87557e8c99b8cb", + artifact = "com.google.code.gson:gson:2.8.7", + sha1 = "69d9503ea0a40ee16f0bcdac7e3eaf83d0fa914a", ) JETTY_VER = "9.4.42.v20210604" diff --git a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF index 16aeb12bd..83fc93e57 100644 --- a/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.junit.ssh/META-INF/MANIFEST.MF @@ -8,31 +8,31 @@ Bundle-Localization: plugin Bundle-Vendor: %Bundle-Vendor Bundle-ActivationPolicy: lazy Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: org.apache.sshd.common;version="[2.6.0,2.7.0)", - org.apache.sshd.common.config.keys;version="[2.6.0,2.7.0)", - org.apache.sshd.common.file.virtualfs;version="[2.6.0,2.7.0)", - org.apache.sshd.common.helpers;version="[2.6.0,2.7.0)", - org.apache.sshd.common.io;version="[2.6.0,2.7.0)", - org.apache.sshd.common.kex;version="[2.6.0,2.7.0)", - org.apache.sshd.common.keyprovider;version="[2.6.0,2.7.0)", - org.apache.sshd.common.session;version="[2.6.0,2.7.0)", - org.apache.sshd.common.signature;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.buffer;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.logging;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.security;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.threads;version="[2.6.0,2.7.0)", - org.apache.sshd.core;version="[2.6.0,2.7.0)", - org.apache.sshd.server;version="[2.6.0,2.7.0)", - org.apache.sshd.server.auth;version="[2.6.0,2.7.0)", - org.apache.sshd.server.auth.gss;version="[2.6.0,2.7.0)", - org.apache.sshd.server.auth.keyboard;version="[2.6.0,2.7.0)", - org.apache.sshd.server.auth.password;version="[2.6.0,2.7.0)", - org.apache.sshd.server.command;version="[2.6.0,2.7.0)", - org.apache.sshd.server.session;version="[2.6.0,2.7.0)", - org.apache.sshd.server.shell;version="[2.6.0,2.7.0)", - org.apache.sshd.server.subsystem;version="[2.6.0,2.7.0)", - org.apache.sshd.sftp;version="[2.6.0,2.7.0)", - org.apache.sshd.sftp.server;version="[2.6.0,2.7.0)", +Import-Package: org.apache.sshd.common;version="[2.7.0,2.8.0)", + org.apache.sshd.common.config.keys;version="[2.7.0,2.8.0)", + org.apache.sshd.common.file.virtualfs;version="[2.7.0,2.8.0)", + org.apache.sshd.common.helpers;version="[2.7.0,2.8.0)", + org.apache.sshd.common.io;version="[2.7.0,2.8.0)", + org.apache.sshd.common.kex;version="[2.7.0,2.8.0)", + org.apache.sshd.common.keyprovider;version="[2.7.0,2.8.0)", + org.apache.sshd.common.session;version="[2.7.0,2.8.0)", + org.apache.sshd.common.signature;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.buffer;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.logging;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.security;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.threads;version="[2.7.0,2.8.0)", + org.apache.sshd.core;version="[2.7.0,2.8.0)", + org.apache.sshd.server;version="[2.7.0,2.8.0)", + org.apache.sshd.server.auth;version="[2.7.0,2.8.0)", + org.apache.sshd.server.auth.gss;version="[2.7.0,2.8.0)", + org.apache.sshd.server.auth.keyboard;version="[2.7.0,2.8.0)", + org.apache.sshd.server.auth.password;version="[2.7.0,2.8.0)", + org.apache.sshd.server.command;version="[2.7.0,2.8.0)", + org.apache.sshd.server.session;version="[2.7.0,2.8.0)", + org.apache.sshd.server.shell;version="[2.7.0,2.8.0)", + org.apache.sshd.server.subsystem;version="[2.7.0,2.8.0)", + org.apache.sshd.sftp;version="[2.7.0,2.8.0)", + org.apache.sshd.sftp.server;version="[2.7.0,2.8.0)", org.eclipse.jgit.annotations;version="[5.13.0,5.14.0)", org.eclipse.jgit.api;version="[5.13.0,5.14.0)", org.eclipse.jgit.api.errors;version="[5.13.0,5.14.0)", diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target index 12dfd8f8f..7f883f4a7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd index 6ba77b983..bcd86760c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd @@ -1,7 +1,7 @@ target "jgit-4.10" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/2018-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target index 43831780c..9016ab435 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd index f29a9fee2..e1c0375ff 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd @@ -1,7 +1,7 @@ target "jgit-4.11" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/2019-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target index 21bc9e672..36ea8bc91 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd index 35bf3b081..237b6cb17 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd @@ -1,7 +1,7 @@ target "jgit-4.12" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/2019-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target index cef88b13a..6297d72a8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd index 6da9b00c1..1a943184a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd @@ -1,7 +1,7 @@ target "jgit-4.13" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/2019-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target index de5e4dd50..0e5788bf6 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd index 70dce0ce3..0c142d093 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd @@ -1,7 +1,7 @@ target "jgit-4.14" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/2019-12/201912181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target index 583e32363..3d4cd71da 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd index edf5cec8d..66c721b4c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd @@ -1,7 +1,7 @@ target "jgit-4.15" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/2020-03/202003181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target index 3ccd87405..050c81d1a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd index 54e8a9649..b20ee44db 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd @@ -1,7 +1,7 @@ target "jgit-4.16" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/2020-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target index ac80f7f46..d6e3c00c4 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd index 2b2af1a9f..371028c76 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd @@ -1,7 +1,7 @@ target "jgit-4.17" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/2020-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target index cfee63015..0bdc78d40 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd index 0f42bb67f..1cec6341f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd @@ -1,7 +1,7 @@ target "jgit-4.18" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/2020-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target index a550bb4ff..2edbd18cb 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd index 5e4305c51..3d51ba4e3 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd @@ -1,7 +1,7 @@ target "jgit-4.19-staging" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/staging/2021-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target index 6ec6d393e..586606091 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd index c750cbefa..68cd623d6 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd @@ -1,7 +1,7 @@ target "jgit-4.20" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/2021-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target index 243526e3a..3eabf74c2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd index 9387d9480..ea2eb1458 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd @@ -1,7 +1,7 @@ target "jgit-4.21" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/staging/2021-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index 07e065519..e02f1eaf4 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd index 96a6073e1..a6a67da84 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd @@ -1,7 +1,7 @@ target "jgit-4.6" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/neon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index 272ffc0c2..4bc2c758e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd index bfb68b220..e08732c1a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd @@ -1,7 +1,7 @@ target "jgit-4.7" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/oxygen/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target index 367771488..81daee8ce 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd index e3e6b217b..80d06ab0e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd @@ -1,7 +1,7 @@ target "jgit-4.8" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/photon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target index 86fdad697..ae8b96727 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target @@ -1,7 +1,7 @@ - + @@ -25,14 +25,14 @@ - - + + - - + + @@ -55,10 +55,10 @@ - - - - + + + + @@ -84,9 +84,9 @@ - - - + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd index 938d80b87..d82bcba69 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd @@ -1,7 +1,7 @@ target "jgit-4.9" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/R20210602031627-2021-06.tpd" +include "orbit/I20210626190330.tpd" location "https://download.eclipse.org/releases/2018-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210626190330.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210626190330.tpd new file mode 100644 index 000000000..cd7846bdc --- /dev/null +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210626190330.tpd @@ -0,0 +1,66 @@ +target "I20210626190330" with source configurePhase +// see https://download.eclipse.org/tools/orbit/downloads/ + +location "https://download.eclipse.org/tools/orbit/downloads/drops/I20210626190330/repository" { + com.google.gson [2.8.7.v20210624-1215,2.8.7.v20210624-1215] + com.google.gson.source [2.8.7.v20210624-1215,2.8.7.v20210624-1215] + com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902] + com.jcraft.jsch.source [0.1.55.v20190404-1902,0.1.55.v20190404-1902] + com.jcraft.jzlib [1.1.1.v201205102305,1.1.1.v201205102305] + com.jcraft.jzlib.source [1.1.1.v201205102305,1.1.1.v201205102305] + javaewah [1.1.12.v20210622-2206,1.1.12.v20210622-2206] + javaewah.source [1.1.12.v20210622-2206,1.1.12.v20210622-2206] + javax.servlet [3.1.0.v201410161800,3.1.0.v201410161800] + javax.servlet.source [3.1.0.v201410161800,3.1.0.v201410161800] + net.bytebuddy.byte-buddy [1.9.0.v20181107-1410,1.9.0.v20181107-1410] + net.bytebuddy.byte-buddy-agent [1.9.0.v20181106-1534,1.9.0.v20181106-1534] + net.bytebuddy.byte-buddy-agent.source [1.9.0.v20181106-1534,1.9.0.v20181106-1534] + net.bytebuddy.byte-buddy.source [1.9.0.v20181107-1410,1.9.0.v20181107-1410] + net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323] + net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323] + org.apache.ant [1.10.10.v20210426-1926,1.10.10.v20210426-1926] + org.apache.ant.source [1.10.10.v20210426-1926,1.10.10.v20210426-1926] + org.apache.commons.codec [1.14.0.v20200818-1422,1.14.0.v20200818-1422] + org.apache.commons.codec.source [1.14.0.v20200818-1422,1.14.0.v20200818-1422] + org.apache.commons.compress [1.19.0.v20200106-2343,1.19.0.v20200106-2343] + org.apache.commons.compress.source [1.19.0.v20200106-2343,1.19.0.v20200106-2343] + org.apache.commons.logging [1.2.0.v20180409-1502,1.2.0.v20180409-1502] + org.apache.commons.logging.source [1.2.0.v20180409-1502,1.2.0.v20180409-1502] + org.apache.httpcomponents.httpclient [4.5.13.v20210128-2225,4.5.13.v20210128-2225] + org.apache.httpcomponents.httpclient.source [4.5.13.v20210128-2225,4.5.13.v20210128-2225] + org.apache.httpcomponents.httpcore [4.4.14.v20210128-2225,4.4.14.v20210128-2225] + org.apache.httpcomponents.httpcore.source [4.4.14.v20210128-2225,4.4.14.v20210128-2225] + org.apache.log4j [1.2.15.v201012070815,1.2.15.v201012070815] + org.apache.log4j.source [1.2.15.v201012070815,1.2.15.v201012070815] + org.apache.sshd.osgi [2.7.0.v20210623-0618,2.7.0.v20210623-0618] + org.apache.sshd.osgi.source [2.7.0.v20210623-0618,2.7.0.v20210623-0618] + org.apache.sshd.sftp [2.7.0.v20210623-0618,2.7.0.v20210623-0618] + org.apache.sshd.sftp.source [2.7.0.v20210623-0618,2.7.0.v20210623-0618] + org.assertj [3.14.0.v20200120-1926,3.14.0.v20200120-1926] + org.assertj.source [3.14.0.v20200120-1926,3.14.0.v20200120-1926] + org.bouncycastle.bcpg [1.65.0.v20200527-1955,1.65.0.v20200527-1955] + org.bouncycastle.bcpg.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955] + org.bouncycastle.bcpkix [1.65.0.v20200527-1955,1.65.0.v20200527-1955] + org.bouncycastle.bcpkix.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955] + org.bouncycastle.bcprov [1.65.1.v20200529-1514,1.65.1.v20200529-1514] + org.bouncycastle.bcprov.source [1.65.1.v20200529-1514,1.65.1.v20200529-1514] + org.hamcrest [1.1.0.v20090501071000,1.1.0.v20090501071000] + org.hamcrest.core [1.3.0.v20180420-1519,1.3.0.v20180420-1519] + org.hamcrest.core.source [1.3.0.v20180420-1519,1.3.0.v20180420-1519] + org.hamcrest.library [1.3.0.v20180524-2246,1.3.0.v20180524-2246] + org.hamcrest.library.source [1.3.0.v20180524-2246,1.3.0.v20180524-2246] + org.junit [4.13.0.v20200204-1500,4.13.0.v20200204-1500] + org.junit.source [4.13.0.v20200204-1500,4.13.0.v20200204-1500] + org.kohsuke.args4j [2.33.0.v20160323-2218,2.33.0.v20160323-2218] + org.kohsuke.args4j.source [2.33.0.v20160323-2218,2.33.0.v20160323-2218] + org.mockito [2.23.0.v20200310-1642,2.23.0.v20200310-1642] + org.mockito.source [2.23.0.v20200310-1642,2.23.0.v20200310-1642] + org.objenesis [2.6.0.v20180420-1519,2.6.0.v20180420-1519] + org.objenesis.source [2.6.0.v20180420-1519,2.6.0.v20180420-1519] + org.slf4j.api [1.7.30.v20200204-2150,1.7.30.v20200204-2150] + org.slf4j.api.source [1.7.30.v20200204-2150,1.7.30.v20200204-2150] + org.slf4j.binding.log4j12 [1.7.30.v20201108-2042,1.7.30.v20201108-2042] + org.slf4j.binding.log4j12.source [1.7.30.v20201108-2042,1.7.30.v20201108-2042] + org.tukaani.xz [1.9.0.v20210624-1259,1.9.0.v20210624-1259] + org.tukaani.xz.source [1.9.0.v20210624-1259,1.9.0.v20210624-1259] +} diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd index 83b5bb3fd..d56839ec4 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd @@ -1,4 +1,4 @@ -target "R20210602031627-2021-06" with source configurePhase +target "I20210626190330" with source configurePhase // see https://download.eclipse.org/tools/orbit/downloads/ location "https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository" { diff --git a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF index ccbed6d87..ddb475dc1 100644 --- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF @@ -7,19 +7,19 @@ Bundle-Version: 5.13.0.qualifier Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: org.apache.sshd.client.config.hosts;version="[2.6.0,2.7.0)", - org.apache.sshd.common;version="[2.6.0,2.7.0)", - org.apache.sshd.common.auth;version="[2.6.0,2.7.0)", - org.apache.sshd.common.config.keys;version="[2.6.0,2.7.0)", - org.apache.sshd.common.helpers;version="[2.6.0,2.7.0)", - org.apache.sshd.common.keyprovider;version="[2.6.0,2.7.0)", - org.apache.sshd.common.session;version="[2.6.0,2.7.0)", - org.apache.sshd.common.signature;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.net;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.security;version="[2.6.0,2.7.0)", - org.apache.sshd.core;version="[2.6.0,2.7.0)", - org.apache.sshd.server;version="[2.6.0,2.7.0)", - org.apache.sshd.server.forward;version="[2.6.0,2.7.0)", +Import-Package: org.apache.sshd.client.config.hosts;version="[2.7.0,2.8.0)", + org.apache.sshd.common;version="[2.7.0,2.8.0)", + org.apache.sshd.common.auth;version="[2.7.0,2.8.0)", + org.apache.sshd.common.config.keys;version="[2.7.0,2.8.0)", + org.apache.sshd.common.helpers;version="[2.7.0,2.8.0)", + org.apache.sshd.common.keyprovider;version="[2.7.0,2.8.0)", + org.apache.sshd.common.session;version="[2.7.0,2.8.0)", + org.apache.sshd.common.signature;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.net;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.security;version="[2.7.0,2.8.0)", + org.apache.sshd.core;version="[2.7.0,2.8.0)", + org.apache.sshd.server;version="[2.7.0,2.8.0)", + org.apache.sshd.server.forward;version="[2.7.0,2.8.0)", org.eclipse.jgit.api;version="[5.13.0,5.14.0)", org.eclipse.jgit.api.errors;version="[5.13.0,5.14.0)", org.eclipse.jgit.internal.transport.sshd.proxy;version="[5.13.0,5.14.0)", diff --git a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF index 7a1ce6ba6..81f7e2146 100644 --- a/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache/META-INF/MANIFEST.MF @@ -33,53 +33,53 @@ Export-Package: org.eclipse.jgit.internal.transport.sshd;version="5.13.0";x-inte org.apache.sshd.client.session, org.apache.sshd.client.keyverifier" Import-Package: net.i2p.crypto.eddsa;version="[0.3.0,0.4.0)", - org.apache.sshd.agent;version="[2.6.0,2.7.0)", - org.apache.sshd.client;version="[2.6.0,2.7.0)", - org.apache.sshd.client.auth;version="[2.6.0,2.7.0)", - org.apache.sshd.client.auth.keyboard;version="[2.6.0,2.7.0)", - org.apache.sshd.client.auth.password;version="[2.6.0,2.7.0)", - org.apache.sshd.client.auth.pubkey;version="[2.6.0,2.7.0)", - org.apache.sshd.client.channel;version="[2.6.0,2.7.0)", - org.apache.sshd.client.config.hosts;version="[2.6.0,2.7.0)", - org.apache.sshd.client.config.keys;version="[2.6.0,2.7.0)", - org.apache.sshd.client.future;version="[2.6.0,2.7.0)", - org.apache.sshd.client.keyverifier;version="[2.6.0,2.7.0)", - org.apache.sshd.client.session;version="[2.6.0,2.7.0)", - org.apache.sshd.client.session.forward;version="[2.6.0,2.7.0)", - org.apache.sshd.common;version="[2.6.0,2.7.0)", - org.apache.sshd.common.auth;version="[2.6.0,2.7.0)", - org.apache.sshd.common.channel;version="[2.6.0,2.7.0)", - org.apache.sshd.common.compression;version="[2.6.0,2.7.0)", - org.apache.sshd.common.config.keys;version="[2.6.0,2.7.0)", - org.apache.sshd.common.config.keys.loader;version="[2.6.0,2.7.0)", - org.apache.sshd.common.config.keys.loader.openssh.kdf;version="[2.6.0,2.7.0)", - org.apache.sshd.common.digest;version="[2.6.0,2.7.0)", - org.apache.sshd.common.forward;version="[2.6.0,2.7.0)", - org.apache.sshd.common.future;version="[2.6.0,2.7.0)", - org.apache.sshd.common.helpers;version="[2.6.0,2.7.0)", - org.apache.sshd.common.io;version="[2.6.0,2.7.0)", - org.apache.sshd.common.kex;version="[2.6.0,2.7.0)", - org.apache.sshd.common.kex.extension;version="[2.6.0,2.7.0)", - org.apache.sshd.common.kex.extension.parser;version="[2.6.0,2.7.0)", - org.apache.sshd.common.keyprovider;version="[2.6.0,2.7.0)", - org.apache.sshd.common.mac;version="[2.6.0,2.7.0)", - org.apache.sshd.common.random;version="[2.6.0,2.7.0)", - org.apache.sshd.common.session;version="[2.6.0,2.7.0)", - org.apache.sshd.common.session.helpers;version="[2.6.0,2.7.0)", - org.apache.sshd.common.signature;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.buffer;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.closeable;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.io;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.io.resource;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.logging;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.net;version="[2.6.0,2.7.0)", - org.apache.sshd.common.util.security;version="[2.6.0,2.7.0)", - org.apache.sshd.core;version="[2.6.0,2.7.0)", - org.apache.sshd.server.auth;version="[2.6.0,2.7.0)", - org.apache.sshd.sftp;version="[2.6.0,2.7.0)", - org.apache.sshd.sftp.client;version="[2.6.0,2.7.0)", - org.apache.sshd.sftp.common;version="[2.6.0,2.7.0)", + org.apache.sshd.agent;version="[2.7.0,2.8.0)", + org.apache.sshd.client;version="[2.7.0,2.8.0)", + org.apache.sshd.client.auth;version="[2.7.0,2.8.0)", + org.apache.sshd.client.auth.keyboard;version="[2.7.0,2.8.0)", + org.apache.sshd.client.auth.password;version="[2.7.0,2.8.0)", + org.apache.sshd.client.auth.pubkey;version="[2.7.0,2.8.0)", + org.apache.sshd.client.channel;version="[2.7.0,2.8.0)", + org.apache.sshd.client.config.hosts;version="[2.7.0,2.8.0)", + org.apache.sshd.client.config.keys;version="[2.7.0,2.8.0)", + org.apache.sshd.client.future;version="[2.7.0,2.8.0)", + org.apache.sshd.client.keyverifier;version="[2.7.0,2.8.0)", + org.apache.sshd.client.session;version="[2.7.0,2.8.0)", + org.apache.sshd.client.session.forward;version="[2.7.0,2.8.0)", + org.apache.sshd.common;version="[2.7.0,2.8.0)", + org.apache.sshd.common.auth;version="[2.7.0,2.8.0)", + org.apache.sshd.common.channel;version="[2.7.0,2.8.0)", + org.apache.sshd.common.compression;version="[2.7.0,2.8.0)", + org.apache.sshd.common.config.keys;version="[2.7.0,2.8.0)", + org.apache.sshd.common.config.keys.loader;version="[2.7.0,2.8.0)", + org.apache.sshd.common.config.keys.loader.openssh.kdf;version="[2.7.0,2.8.0)", + org.apache.sshd.common.digest;version="[2.7.0,2.8.0)", + org.apache.sshd.common.forward;version="[2.7.0,2.8.0)", + org.apache.sshd.common.future;version="[2.7.0,2.8.0)", + org.apache.sshd.common.helpers;version="[2.7.0,2.8.0)", + org.apache.sshd.common.io;version="[2.7.0,2.8.0)", + org.apache.sshd.common.kex;version="[2.7.0,2.8.0)", + org.apache.sshd.common.kex.extension;version="[2.7.0,2.8.0)", + org.apache.sshd.common.kex.extension.parser;version="[2.7.0,2.8.0)", + org.apache.sshd.common.keyprovider;version="[2.7.0,2.8.0)", + org.apache.sshd.common.mac;version="[2.7.0,2.8.0)", + org.apache.sshd.common.random;version="[2.7.0,2.8.0)", + org.apache.sshd.common.session;version="[2.7.0,2.8.0)", + org.apache.sshd.common.session.helpers;version="[2.7.0,2.8.0)", + org.apache.sshd.common.signature;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.buffer;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.closeable;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.io;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.io.resource;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.logging;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.net;version="[2.7.0,2.8.0)", + org.apache.sshd.common.util.security;version="[2.7.0,2.8.0)", + org.apache.sshd.core;version="[2.7.0,2.8.0)", + org.apache.sshd.server.auth;version="[2.7.0,2.8.0)", + org.apache.sshd.sftp;version="[2.7.0,2.8.0)", + org.apache.sshd.sftp.client;version="[2.7.0,2.8.0)", + org.apache.sshd.sftp.common;version="[2.7.0,2.8.0)", org.eclipse.jgit.annotations;version="[5.13.0,5.14.0)", org.eclipse.jgit.errors;version="[5.13.0,5.14.0)", org.eclipse.jgit.fnmatch;version="[5.13.0,5.14.0)", diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java index f9e80121e..7656fe8d0 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java @@ -136,8 +136,8 @@ public void setProxyHandler(StatefulProxyConnector handler) { } @Override - protected IoWriteFuture sendIdentification(String ident) - throws IOException { + protected IoWriteFuture sendIdentification(String ident, + List extraLines) throws Exception { StatefulProxyConnector proxy = proxyHandler; if (proxy != null) { try { @@ -145,7 +145,8 @@ protected IoWriteFuture sendIdentification(String ident) // from the peer only once the initial sendKexInit() following // this call to sendIdentification() has returned! proxy.runWhenDone(() -> { - JGitClientSession.super.sendIdentification(ident); + JGitClientSession.super.sendIdentification(ident, + extraLines); return null; }); // Called only from the ClientSessionImpl constructor, where the @@ -157,12 +158,11 @@ protected IoWriteFuture sendIdentification(String ident) throw new IOException(other.getLocalizedMessage(), other); } } - return super.sendIdentification(ident); + return super.sendIdentification(ident, extraLines); } @Override - protected byte[] sendKexInit() - throws IOException, GeneralSecurityException { + protected byte[] sendKexInit() throws Exception { StatefulProxyConnector proxy = proxyHandler; if (proxy != null) { try { diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitKexExtensionHandler.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitKexExtensionHandler.java deleted file mode 100644 index 9446aaa7d..000000000 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitKexExtensionHandler.java +++ /dev/null @@ -1,163 +0,0 @@ -/* - * Copyright (C) 2021 Thomas Wolf and others - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Distribution License v. 1.0 which is available at - * https://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -package org.eclipse.jgit.internal.transport.sshd; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.TreeSet; - -import org.apache.sshd.common.AttributeRepository.AttributeKey; -import org.apache.sshd.common.NamedFactory; -import org.apache.sshd.common.kex.KexProposalOption; -import org.apache.sshd.common.kex.extension.KexExtensionHandler; -import org.apache.sshd.common.kex.extension.KexExtensions; -import org.apache.sshd.common.kex.extension.parser.ServerSignatureAlgorithms; -import org.apache.sshd.common.session.Session; -import org.apache.sshd.common.signature.Signature; -import org.apache.sshd.common.util.logging.AbstractLoggingBean; -import org.eclipse.jgit.util.StringUtils; - -/** - * Do not use the DefaultClientKexExtensionHandler from sshd; it doesn't work - * properly because of misconceptions. See SSHD-1141. - * - * @see SSHD-1141 - */ -public class JGitKexExtensionHandler extends AbstractLoggingBean - implements KexExtensionHandler { - - /** Singleton instance. */ - public static final JGitKexExtensionHandler INSTANCE = new JGitKexExtensionHandler(); - - /** - * Session {@link AttributeKey} used to store whether the extension - * indicator was already sent. - */ - private static final AttributeKey CLIENT_PROPOSAL_MADE = new AttributeKey<>(); - - /** - * Session {@link AttributeKey} storing the algorithms announced by the - * server as known. - */ - public static final AttributeKey> SERVER_ALGORITHMS = new AttributeKey<>(); - - private JGitKexExtensionHandler() { - // No public instantiation for singleton - } - - @Override - public boolean isKexExtensionsAvailable(Session session, - AvailabilityPhase phase) throws IOException { - return !AvailabilityPhase.PREKEX.equals(phase); - } - - @Override - public void handleKexInitProposal(Session session, boolean initiator, - Map proposal) throws IOException { - // If it's the very first time, we may add the marker telling the server - // that we are ready to handle SSH_MSG_EXT_INFO - if (session == null || session.isServerSession() || !initiator) { - return; - } - if (session.getAttribute(CLIENT_PROPOSAL_MADE) != null) { - return; - } - String kexAlgorithms = proposal.get(KexProposalOption.SERVERKEYS); - if (StringUtils.isEmptyOrNull(kexAlgorithms)) { - return; - } - List algorithms = new ArrayList<>(); - // We're a client. We mustn't send the server extension, and we should - // send the client extension only once. - for (String algo : kexAlgorithms.split(",")) { //$NON-NLS-1$ - if (KexExtensions.CLIENT_KEX_EXTENSION.equalsIgnoreCase(algo) - || KexExtensions.SERVER_KEX_EXTENSION - .equalsIgnoreCase(algo)) { - continue; - } - algorithms.add(algo); - } - // Tell the server that we want to receive SSH2_MSG_EXT_INFO - algorithms.add(KexExtensions.CLIENT_KEX_EXTENSION); - if (log.isDebugEnabled()) { - log.debug( - "handleKexInitProposal({}): proposing HostKeyAlgorithms {}", //$NON-NLS-1$ - session, algorithms); - } - proposal.put(KexProposalOption.SERVERKEYS, - String.join(",", algorithms)); //$NON-NLS-1$ - session.setAttribute(CLIENT_PROPOSAL_MADE, Boolean.TRUE); - } - - @Override - public boolean handleKexExtensionRequest(Session session, int index, - int count, String name, byte[] data) throws IOException { - if (ServerSignatureAlgorithms.NAME.equals(name)) { - handleServerSignatureAlgorithms(session, - ServerSignatureAlgorithms.INSTANCE.parseExtension(data)); - } - return true; - } - - /** - * Perform updates after a server-sig-algs extension has been received. - * - * @param session - * the message was received for - * @param serverAlgorithms - * signature algorithm names announced by the server - */ - protected void handleServerSignatureAlgorithms(Session session, - Collection serverAlgorithms) { - if (log.isDebugEnabled()) { - log.debug("handleServerSignatureAlgorithms({}): {}", session, //$NON-NLS-1$ - serverAlgorithms); - } - // Client determines order; server says what it supports. Re-order - // such that supported ones are at the front, in client order, - // followed by unsupported ones, also in client order. - if (serverAlgorithms != null && !serverAlgorithms.isEmpty()) { - List> clientAlgorithms = new ArrayList<>( - session.getSignatureFactories()); - if (log.isDebugEnabled()) { - log.debug( - "handleServerSignatureAlgorithms({}): PubkeyAcceptedAlgorithms before: {}", //$NON-NLS-1$ - session, clientAlgorithms); - } - List> unknown = new ArrayList<>(); - Set known = new TreeSet<>(String.CASE_INSENSITIVE_ORDER); - known.addAll(serverAlgorithms); - for (Iterator> iter = clientAlgorithms - .iterator(); iter.hasNext();) { - NamedFactory algo = iter.next(); - if (!known.contains(algo.getName())) { - unknown.add(algo); - iter.remove(); - } - } - // Re-add the unknown ones at the end. Per RFC 8308, some - // servers may not announce _all_ their supported algorithms, - // and a client may use unknown algorithms. - clientAlgorithms.addAll(unknown); - if (log.isDebugEnabled()) { - log.debug( - "handleServerSignatureAlgorithms({}): PubkeyAcceptedAlgorithms after: {}", //$NON-NLS-1$ - session, clientAlgorithms); - } - session.setAttribute(SERVER_ALGORITHMS, known); - session.setSignatureFactories(clientAlgorithms); - } - } -} diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthFactory.java deleted file mode 100644 index 0e3e24dcf..000000000 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthFactory.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2018, 2021 Thomas Wolf and others - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Distribution License v. 1.0 which is available at - * https://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -package org.eclipse.jgit.internal.transport.sshd; - -import java.io.IOException; - -import org.apache.sshd.client.auth.pubkey.UserAuthPublicKey; -import org.apache.sshd.client.auth.pubkey.UserAuthPublicKeyFactory; -import org.apache.sshd.client.session.ClientSession; - -/** - * A customized authentication factory for public key user authentication. - */ -public class JGitPublicKeyAuthFactory extends UserAuthPublicKeyFactory { - - /** The singleton {@link JGitPublicKeyAuthFactory}. */ - public static final JGitPublicKeyAuthFactory FACTORY = new JGitPublicKeyAuthFactory(); - - private JGitPublicKeyAuthFactory() { - super(); - } - - @Override - public UserAuthPublicKey createUserAuth(ClientSession session) - throws IOException { - return new JGitPublicKeyAuthentication(getSignatureFactories()); - } -} diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java deleted file mode 100644 index 675509442..000000000 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (C) 2018, 2021 Thomas Wolf and others - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Distribution License v. 1.0 which is available at - * https://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: BSD-3-Clause - */ -package org.eclipse.jgit.internal.transport.sshd; - -import java.io.IOException; -import java.security.PublicKey; -import java.security.spec.InvalidKeySpecException; -import java.text.MessageFormat; -import java.util.Deque; -import java.util.HashSet; -import java.util.LinkedList; -import java.util.List; -import java.util.Set; - -import org.apache.sshd.client.auth.pubkey.UserAuthPublicKey; -import org.apache.sshd.client.session.ClientSession; -import org.apache.sshd.common.NamedFactory; -import org.apache.sshd.common.NamedResource; -import org.apache.sshd.common.RuntimeSshException; -import org.apache.sshd.common.SshConstants; -import org.apache.sshd.common.config.keys.KeyUtils; -import org.apache.sshd.common.signature.Signature; -import org.apache.sshd.common.signature.SignatureFactoriesHolder; -import org.apache.sshd.common.util.buffer.Buffer; - -/** - * Custom {@link UserAuthPublicKey} implementation fixing SSHD-1105: if there - * are several signature algorithms applicable for a public key type, we must - * try them all, in the correct order. - * - * @see SSHD-1105 - * @see Bug - * 572056 - */ -public class JGitPublicKeyAuthentication extends UserAuthPublicKey { - - private final Deque currentAlgorithms = new LinkedList<>(); - - private String chosenAlgorithm; - - JGitPublicKeyAuthentication(List> factories) { - super(factories); - } - - @Override - protected boolean sendAuthDataRequest(ClientSession session, String service) - throws Exception { - if (current == null) { - currentAlgorithms.clear(); - chosenAlgorithm = null; - } - String currentAlgorithm = null; - if (current != null && !currentAlgorithms.isEmpty()) { - currentAlgorithm = currentAlgorithms.poll(); - if (chosenAlgorithm != null) { - Set knownServerAlgorithms = session.getAttribute( - JGitKexExtensionHandler.SERVER_ALGORITHMS); - if (knownServerAlgorithms != null - && knownServerAlgorithms.contains(chosenAlgorithm)) { - // We've tried key 'current' with 'chosenAlgorithm', but it - // failed. However, the server had told us it supported - // 'chosenAlgorithm'. Thus it makes no sense to continue - // with this key and other signature algorithms. Skip to the - // next key, if any. - currentAlgorithm = null; - } - } - } - if (currentAlgorithm == null) { - try { - if (keys == null || !keys.hasNext()) { - if (log.isDebugEnabled()) { - log.debug( - "sendAuthDataRequest({})[{}] no more keys to send", //$NON-NLS-1$ - session, service); - } - current = null; - return false; - } - current = keys.next(); - currentAlgorithms.clear(); - chosenAlgorithm = null; - } catch (Error e) { // Copied from superclass - throw new RuntimeSshException(e); - } - } - PublicKey key; - try { - key = current.getPublicKey(); - } catch (Error e) { // Copied from superclass - throw new RuntimeSshException(e); - } - if (currentAlgorithm == null) { - String keyType = KeyUtils.getKeyType(key); - Set aliases = new HashSet<>( - KeyUtils.getAllEquivalentKeyTypes(keyType)); - aliases.add(keyType); - List> existingFactories; - if (current instanceof SignatureFactoriesHolder) { - existingFactories = ((SignatureFactoriesHolder) current) - .getSignatureFactories(); - } else { - existingFactories = getSignatureFactories(); - } - if (existingFactories != null) { - if (log.isDebugEnabled()) { - log.debug( - "sendAuthDataRequest({})[{}] selecting from PubKeyAcceptedAlgorithms {}", //$NON-NLS-1$ - session, service, - NamedResource.getNames(existingFactories)); - } - // Select the factories by name and in order - existingFactories.forEach(f -> { - if (aliases.contains(f.getName())) { - currentAlgorithms.add(f.getName()); - } - }); - } - currentAlgorithm = currentAlgorithms.isEmpty() ? keyType - : currentAlgorithms.poll(); - } - String name = getName(); - if (log.isDebugEnabled()) { - log.debug( - "sendAuthDataRequest({})[{}] send SSH_MSG_USERAUTH_REQUEST request {} type={} - fingerprint={}", //$NON-NLS-1$ - session, service, name, currentAlgorithm, - KeyUtils.getFingerPrint(key)); - } - - chosenAlgorithm = currentAlgorithm; - Buffer buffer = session - .createBuffer(SshConstants.SSH_MSG_USERAUTH_REQUEST); - buffer.putString(session.getUsername()); - buffer.putString(service); - buffer.putString(name); - buffer.putBoolean(false); - buffer.putString(currentAlgorithm); - buffer.putPublicKey(key); - session.writePacket(buffer); - return true; - } - - @Override - protected boolean processAuthDataRequest(ClientSession session, - String service, Buffer buffer) throws Exception { - String name = getName(); - int cmd = buffer.getUByte(); - if (cmd != SshConstants.SSH_MSG_USERAUTH_PK_OK) { - throw new IllegalStateException(MessageFormat.format( - SshdText.get().pubkeyAuthWrongCommand, - SshConstants.getCommandMessageName(cmd), - session.getConnectAddress(), session.getServerVersion())); - } - PublicKey key; - try { - key = current.getPublicKey(); - } catch (Error e) { // Copied from superclass - throw new RuntimeSshException(e); - } - String rspKeyAlgorithm = buffer.getString(); - PublicKey rspKey = buffer.getPublicKey(); - if (log.isDebugEnabled()) { - log.debug( - "processAuthDataRequest({})[{}][{}] SSH_MSG_USERAUTH_PK_OK type={}, fingerprint={}", //$NON-NLS-1$ - session, service, name, rspKeyAlgorithm, - KeyUtils.getFingerPrint(rspKey)); - } - if (!KeyUtils.compareKeys(rspKey, key)) { - throw new InvalidKeySpecException(MessageFormat.format( - SshdText.get().pubkeyAuthWrongKey, - KeyUtils.getFingerPrint(key), - KeyUtils.getFingerPrint(rspKey), - session.getConnectAddress(), session.getServerVersion())); - } - if (!chosenAlgorithm.equalsIgnoreCase(rspKeyAlgorithm)) { - // 'algo' SHOULD be the same as 'chosenAlgorithm', which is the one - // we sent above. See https://tools.ietf.org/html/rfc4252#page-9 . - // - // However, at least Github (SSH-2.0-babeld-383743ad) servers seem - // to return the key type, not the algorithm name. - // - // So we don't check but just log the inconsistency. We sign using - // 'chosenAlgorithm' in any case, so we don't really care what the - // server says here. - log.warn(MessageFormat.format( - SshdText.get().pubkeyAuthWrongSignatureAlgorithm, - chosenAlgorithm, rspKeyAlgorithm, session.getConnectAddress(), - session.getServerVersion())); - } - String username = session.getUsername(); - Buffer out = session - .createBuffer(SshConstants.SSH_MSG_USERAUTH_REQUEST); - out.putString(username); - out.putString(service); - out.putString(name); - out.putBoolean(true); - out.putString(chosenAlgorithm); - out.putPublicKey(key); - if (log.isDebugEnabled()) { - log.debug( - "processAuthDataRequest({})[{}][{}]: signing with algorithm {}", //$NON-NLS-1$ - session, service, name, chosenAlgorithm); - } - appendSignature(session, service, name, username, chosenAlgorithm, key, - out); - session.writePacket(out); - return true; - } - - @Override - protected void releaseKeys() throws IOException { - currentAlgorithms.clear(); - current = null; - chosenAlgorithm = null; - super.releaseKeys(); - } -} diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java index 2d7e0c7c7..d52e24adf 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java @@ -32,6 +32,7 @@ import org.apache.sshd.client.SshClient; import org.apache.sshd.client.auth.UserAuthFactory; import org.apache.sshd.client.auth.keyboard.UserAuthKeyboardInteractiveFactory; +import org.apache.sshd.client.auth.pubkey.UserAuthPublicKeyFactory; import org.apache.sshd.client.config.hosts.HostConfigEntryResolver; import org.apache.sshd.common.NamedFactory; import org.apache.sshd.common.SshException; @@ -47,9 +48,7 @@ import org.eclipse.jgit.internal.transport.sshd.AuthenticationCanceledException; import org.eclipse.jgit.internal.transport.sshd.CachingKeyPairProvider; import org.eclipse.jgit.internal.transport.sshd.GssApiWithMicAuthFactory; -import org.eclipse.jgit.internal.transport.sshd.JGitKexExtensionHandler; import org.eclipse.jgit.internal.transport.sshd.JGitPasswordAuthFactory; -import org.eclipse.jgit.internal.transport.sshd.JGitPublicKeyAuthFactory; import org.eclipse.jgit.internal.transport.sshd.JGitServerKeyVerifier; import org.eclipse.jgit.internal.transport.sshd.JGitSshClient; import org.eclipse.jgit.internal.transport.sshd.JGitSshConfig; @@ -217,7 +216,6 @@ public SshdSession getSession(URIish uri, new JGitUserInteraction(credentialsProvider)); client.setUserAuthFactories(getUserAuthFactories()); client.setKeyIdentityProvider(defaultKeysProvider); - client.setKexExtensionHandler(JGitKexExtensionHandler.INSTANCE); // JGit-specific things: JGitSshClient jgitClient = (JGitSshClient) client; jgitClient.setKeyCache(getKeyCache()); @@ -579,7 +577,7 @@ private List getUserAuthFactories() { // Password auth doesn't have this problem. return Collections.unmodifiableList( Arrays.asList(GssApiWithMicAuthFactory.INSTANCE, - JGitPublicKeyAuthFactory.FACTORY, + UserAuthPublicKeyFactory.INSTANCE, JGitPasswordAuthFactory.INSTANCE, UserAuthKeyboardInteractiveFactory.INSTANCE)); } diff --git a/pom.xml b/pom.xml index 226c7c723..3a2d325bf 100644 --- a/pom.xml +++ b/pom.xml @@ -152,10 +152,10 @@ ${project.build.directory}/META-INF/MANIFEST.MF 5.12.0.202106070339-r - 2.6.0 + 2.7.0 0.1.55 1.1.1 - 1.1.7 + 1.1.12 4.13 1C 2.33 @@ -170,7 +170,7 @@ 1.2.15 3.3.0 1.7.0 - 2.8.6 + 2.8.7 1.65 4.2.3 3.1.2 @@ -705,7 +705,7 @@ org.tukaani xz - 1.8 + 1.9 true From caf3fbe8bfac560b7b2048044a1ccaf9cfa65709 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Tue, 29 Jun 2021 21:34:49 +0200 Subject: [PATCH 09/38] Update JMH used in benchmarks to 1.32 Change-Id: I98734165de8256ab1461733169957efbfa5f36e4 CQ: 23499 CQ: 23500 --- DEPENDENCIES | 4 ++-- WORKSPACE | 6 +++--- org.eclipse.jgit.benchmarks/pom.xml | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DEPENDENCIES b/DEPENDENCIES index 674ef91d1..bd90df414 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -58,8 +58,8 @@ maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit/5.13.0-SNAPSHOT, BSD-3-Clau maven/mavencentral/org.hamcrest/hamcrest-core/1.3, BSD-2-Clause, approved, CQ7063 maven/mavencentral/org.mockito/mockito-core/2.23.0, MIT, approved, CQ17976 maven/mavencentral/org.objenesis/objenesis/2.6, Apache-2.0, approved, CQ15478 -maven/mavencentral/org.openjdk.jmh/jmh-core/1.21, GPL-2.0, approved, CQ20517 -maven/mavencentral/org.openjdk.jmh/jmh-generator-annprocess/1.21, GPL-2.0, approved, CQ20518 +maven/mavencentral/org.openjdk.jmh/jmh-core/1.32, GPL-2.0, approved, CQ23499 +maven/mavencentral/org.openjdk.jmh/jmh-generator-annprocess/1.32, GPL-2.0, approved, CQ23500 maven/mavencentral/org.osgi/org.osgi.core/4.3.1, Apache-2.0, approved, CQ10111 maven/mavencentral/org.slf4j/jcl-over-slf4j/1.7.30, Apache-2.0, approved, CQ12843 maven/mavencentral/org.slf4j/slf4j-api/1.7.30, MIT, approved, CQ23467 diff --git a/WORKSPACE b/WORKSPACE index 68305b4a7..025c28fb4 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -55,20 +55,20 @@ exports_files(["WORKSPACE"], visibility = ["//visibility:public"]) ], ) -JMH_VERS = "1.21" +JMH_VERS = "1.32" maven_jar( name = "jmh-core", artifact = "org.openjdk.jmh:jmh-core:" + JMH_VERS, attach_source = False, - sha1 = "442447101f63074c61063858033fbfde8a076873", + sha1 = "9a8b69ea08118fd4e5d30a152d37b7087ee4a720", ) maven_jar( name = "jmh-annotations", artifact = "org.openjdk.jmh:jmh-generator-annprocess:" + JMH_VERS, attach_source = False, - sha1 = "7aac374614a8a76cad16b91f1a4419d31a7dcda3", + sha1 = "0a28eccc75e0d65984ce25e1ec4dd021a0ca6c57", ) maven_jar( diff --git a/org.eclipse.jgit.benchmarks/pom.xml b/org.eclipse.jgit.benchmarks/pom.xml index a2dcdb541..5e34572ad 100644 --- a/org.eclipse.jgit.benchmarks/pom.xml +++ b/org.eclipse.jgit.benchmarks/pom.xml @@ -23,7 +23,7 @@ UTF-8 1.8 - 1.21 + 1.32 benchmarks From 729c92d72370d1ca08213b0dc114ef351ff39305 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Thu, 8 Jul 2021 18:15:04 +0200 Subject: [PATCH 10/38] Update jetty to 9.4.43.v20210629 Change-Id: I4ceea58cb0a04d041ca4e698e096a00ccd12bfc0 --- WORKSPACE | 30 +++++++------- .../org.eclipse.jgit.target/jgit-4.10.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.11.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.12.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.13.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.14.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.15.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.16.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.17.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.18.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.19.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.20.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.21.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.6.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.7.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.8.target | 40 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.9.target | 40 +++++++++---------- .../projects/jetty-9.4.x.tpd | 38 +++++++++--------- pom.xml | 2 +- 19 files changed, 355 insertions(+), 355 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 025c28fb4..5e28525ea 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -237,55 +237,55 @@ maven_jar( sha1 = "69d9503ea0a40ee16f0bcdac7e3eaf83d0fa914a", ) -JETTY_VER = "9.4.42.v20210604" +JETTY_VER = "9.4.43.v20210629" maven_jar( name = "jetty-servlet", artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER, - sha1 = "2b0529a22eab56f9a5553dd963e79edee7ffc1b5", - src_sha1 = "3351f1fdde7a9bc214f42283af82f002666c777d", + sha1 = "ee000c7dcdbe7b4ef94e3fa67be8f56a46915944", + src_sha1 = "50236764fe1d3619ca07f346e148189c4f5b801a", ) maven_jar( name = "jetty-security", artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER, - sha1 = "8f755242d4d73d98bef0055546aa53cf1ca456d9", - src_sha1 = "1442ba55bfdf147fdd9d8386627838b36af7a555", + sha1 = "ae1958da077c46bac61be9b8de2b45a3aa112353", + src_sha1 = "6e5271e91da37e381f566e0db07ab4d936d86104", ) maven_jar( name = "jetty-server", artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER, - sha1 = "f5f95cdabe677bd8aad9e80f5e125c5b1c5011aa", - src_sha1 = "bdf93b825e7a7478a4a47d1c7569fc468f8c949e", + sha1 = "8ba04f6b5d00223983684a563a3edaa12282bcf0", + src_sha1 = "51600567dbd082fb03feeb9c786f5e7cc9e0a17d", ) maven_jar( name = "jetty-http", artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER, - sha1 = "2b0bb748d2388c6aa981ab29bc0a6a695dee31a4", - src_sha1 = "9f5b97a66ce62f03ce67b4f06936caa0ea9ba695", + sha1 = "5171466337a6da7efbf317490b9c4574c0b4b640", + src_sha1 = "52f477161fd0fc90869f48a145aa2c86624c496e", ) maven_jar( name = "jetty-io", artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER, - sha1 = "581c5bb1aca96934e6961315fff066000c783659", - src_sha1 = "6822c5df4877b9d631543dd3e048bb1f0d9c7249", + sha1 = "acf672c64ac21851069c5b5b789e5c185a25933f", + src_sha1 = "824d5cffce7a72af7c11d9cd87f86184e2a05c17", ) maven_jar( name = "jetty-util", artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER, - sha1 = "16b116e9982c2037fd4bf05ce2525ccd5917eb9c", - src_sha1 = "e31bf18e992a5fd6e0e60f752b4edac4d57ca7cf", + sha1 = "97306fd3c76171602caad2acc54ca779c9240d5f", + src_sha1 = "dffff7271c248d4e21e2b1629c57896b8e631051", ) maven_jar( name = "jetty-util-ajax", artifact = "org.eclipse.jetty:jetty-util-ajax:" + JETTY_VER, - sha1 = "dfff709928e92d8fd4888d53dbdfb024a4aa92f9", - src_sha1 = "6b59220ec832e41ed433581409006a567691a75c", + sha1 = "2500d180c6e8e28eb3b75372b6ea9d457cf37658", + src_sha1 = "682470f5ad074e64fc0e9c93bdc2784482f79362", ) BOUNCYCASTLE_VER = "1.65" diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target index 7f883f4a7..f34c6acd7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target index 9016ab435..46c58612c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target index 36ea8bc91..026f802f5 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target index 6297d72a8..ed8e16008 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target index 0e5788bf6..91354d0c9 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target index 3d4cd71da..800ce1eab 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target index 050c81d1a..c92411966 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target index d6e3c00c4..6cd285e6e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target index 0bdc78d40..5b99d63b6 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target index 2edbd18cb..2633473ff 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target index 586606091..32b529aa3 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target index 3eabf74c2..9184f29e7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index e02f1eaf4..319fd0300 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index 4bc2c758e..d2bf990df 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target index 81daee8ce..19fcf8488 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target index ae8b96727..f7785cf51 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target @@ -1,28 +1,28 @@ - + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd index 8645e9ba2..bcfd22169 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/projects/jetty-9.4.x.tpd @@ -1,22 +1,22 @@ target "jetty-9.4.x" with source configurePhase -location jetty-9.4.40 "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.42.v20210604/" { - org.eclipse.jetty.client [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.client.source [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.continuation [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.continuation.source [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.http [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.http.source [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.io [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.io.source [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.security [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.security.source [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.server [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.server.source [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.servlet [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.servlet.source [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.util [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.util.source [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.util.ajax [9.4.42.v20210604,9.4.42.v20210604] - org.eclipse.jetty.util.ajax.source [9.4.42.v20210604,9.4.42.v20210604] +location jetty-9.4.x "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.43.v20210629/" { + org.eclipse.jetty.client [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.client.source [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.continuation [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.continuation.source [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.http [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.http.source [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.io [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.io.source [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.security [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.security.source [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.server [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.server.source [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.servlet [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.servlet.source [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.util [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.util.source [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.util.ajax [9.4.43.v20210629,9.4.43.v20210629] + org.eclipse.jetty.util.ajax.source [9.4.43.v20210629,9.4.43.v20210629] } diff --git a/pom.xml b/pom.xml index 3a2d325bf..01b6434ad 100644 --- a/pom.xml +++ b/pom.xml @@ -162,7 +162,7 @@ 1.19 4.3.1 3.1.0 - 9.4.42.v20210604 + 9.4.43.v20210629 0.15.3 4.5.13 4.4.14 From 1e391d47bad6e18cc5c3f87041e562c3f18a35c7 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Thu, 8 Jul 2021 21:54:38 +0200 Subject: [PATCH 11/38] Update orbit to S20210705204906 Change-Id: Ib4ec9f80a8a346fa8c709e58f8076372d14eca64 --- .../org.eclipse.jgit.target/jgit-4.10.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.10.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.11.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.11.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.12.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.12.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.13.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.13.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.14.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.14.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.15.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.15.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.16.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.16.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.17.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.17.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.18.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.18.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.19.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.19.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.20.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.20.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.21.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.21.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.6.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.6.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.7.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.7.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.8.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.8.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.9.target | 6 +++--- .../org.eclipse.jgit.target/jgit-4.9.tpd | 2 +- .../orbit/R20210602031627-2021-06.tpd | 2 +- .../orbit/{I20210626190330.tpd => S20210705204906.tpd} | 4 ++-- 34 files changed, 67 insertions(+), 67 deletions(-) rename org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/{I20210626190330.tpd => S20210705204906.tpd} (98%) diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target index f34c6acd7..44a3c78c2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd index bcd86760c..19b121d39 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd @@ -1,7 +1,7 @@ target "jgit-4.10" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/2018-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target index 46c58612c..df8edf409 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd index e1c0375ff..ea5cfca14 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd @@ -1,7 +1,7 @@ target "jgit-4.11" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/2019-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target index 026f802f5..9ec8d28a2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd index 237b6cb17..6bd6483e6 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd @@ -1,7 +1,7 @@ target "jgit-4.12" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/2019-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target index ed8e16008..04e472ce2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd index 1a943184a..6cff6b292 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd @@ -1,7 +1,7 @@ target "jgit-4.13" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/2019-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target index 91354d0c9..a5ce93e42 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd index 0c142d093..68fc3cae1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd @@ -1,7 +1,7 @@ target "jgit-4.14" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/2019-12/201912181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target index 800ce1eab..765f34949 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd index 66c721b4c..312432644 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd @@ -1,7 +1,7 @@ target "jgit-4.15" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/2020-03/202003181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target index c92411966..123ab6944 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd index b20ee44db..8f87c866c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd @@ -1,7 +1,7 @@ target "jgit-4.16" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/2020-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target index 6cd285e6e..cde727d3c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd index 371028c76..7ae2b1d30 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd @@ -1,7 +1,7 @@ target "jgit-4.17" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/2020-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target index 5b99d63b6..cdd280dd7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd index 1cec6341f..6bac8370a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd @@ -1,7 +1,7 @@ target "jgit-4.18" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/2020-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target index 2633473ff..ad706d844 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd index 3d51ba4e3..3cc1ebc15 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd @@ -1,7 +1,7 @@ target "jgit-4.19-staging" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/staging/2021-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target index 32b529aa3..46f9f6754 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd index 68cd623d6..f4ffd40e6 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd @@ -1,7 +1,7 @@ target "jgit-4.20" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/2021-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target index 9184f29e7..d55c62c9f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd index ea2eb1458..1e9d4f004 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd @@ -1,7 +1,7 @@ target "jgit-4.21" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/staging/2021-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index 319fd0300..b8540d094 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd index a6a67da84..530aeb75d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd @@ -1,7 +1,7 @@ target "jgit-4.6" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/neon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index d2bf990df..8ebcceec8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd index e08732c1a..f59dc2baa 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd @@ -1,7 +1,7 @@ target "jgit-4.7" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/oxygen/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target index 19fcf8488..3164a7eb7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd index 80d06ab0e..d228d3d18 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd @@ -1,7 +1,7 @@ target "jgit-4.8" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/photon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target index f7785cf51..2ec5bf8df 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target @@ -1,7 +1,7 @@ - + @@ -22,7 +22,7 @@ - + @@ -86,7 +86,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd index d82bcba69..21af8b1d8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd @@ -1,7 +1,7 @@ target "jgit-4.9" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210626190330.tpd" +include "orbit/S20210705204906.tpd" location "https://download.eclipse.org/releases/2018-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd index d56839ec4..ff007bc36 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd @@ -1,4 +1,4 @@ -target "I20210626190330" with source configurePhase +target "S20210705204906" with source configurePhase // see https://download.eclipse.org/tools/orbit/downloads/ location "https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository" { diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210626190330.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20210705204906.tpd similarity index 98% rename from org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210626190330.tpd rename to org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20210705204906.tpd index cd7846bdc..4cd68c86f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210626190330.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20210705204906.tpd @@ -1,7 +1,7 @@ -target "I20210626190330" with source configurePhase +target "S20210705204906" with source configurePhase // see https://download.eclipse.org/tools/orbit/downloads/ -location "https://download.eclipse.org/tools/orbit/downloads/drops/I20210626190330/repository" { +location "https://download.eclipse.org/tools/orbit/downloads/drops/S20210705204906/repository" { com.google.gson [2.8.7.v20210624-1215,2.8.7.v20210624-1215] com.google.gson.source [2.8.7.v20210624-1215,2.8.7.v20210624-1215] com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902] From 27a1fa1872da9d0da9147941aa6b372dee48cefb Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Tue, 29 Jun 2021 22:57:09 +0200 Subject: [PATCH 12/38] [sshd] Implement SSH config KexAlgorithms Make the used KEX algorithms configurable via the ssh config. Also implement adding algorithms not in the default set: since sshd 2.6.0 deprecated SHA1-based algorithms, it is possible that the default set has not all available algorithms, so adding algorithms makes sense. This enables users who have to use a git server that only supports old SHA1-based key exchange methods to enable those methods in the ssh config: KexAlgorithms +diffie-hellman-group1-sha1 There are two more SHA1 algorithms that are not enabled by default: diffie-hellman-group14-sha1 and diffie-hellman-group-exchange-sha1. KeyAlgorithms accepts a comma-separated list of algorithm names. Since adding algorithms is now supported, adapt the handling of signature algorithms, too. Make sure that definitions for the KEX exchange signature (HostKeyAlgorithms) don't conflict with the definition for signatures for pubkey auth (PubkeyAcceptedAlgorithms). HostKeyAlgorithms updates the signature factories set on the session to include the default factories plus any that might have been added via the SSH config. Move the handling of PubkeyAcceptedAlgorithms from the client to the JGitPubkeyAuthentication, where it can be done only if pubkey auth is attempted at all and where it can store its adapted list of factories locally. Bug: 574636 Change-Id: Ia5d5f174bbc8e5b41e10ec2c25216d861174e7c3 Signed-off-by: Thomas Wolf --- .../META-INF/MANIFEST.MF | 1 + .../jgit/transport/sshd/ApacheSshTest.java | 43 +++++ .../transport/sshd/SshdText.properties | 1 + .../transport/sshd/JGitClientSession.java | 150 ++++++++++++++++-- .../sshd/JGitPublicKeyAuthFactory.java | 35 ++++ .../sshd/JGitPublicKeyAuthentication.java | 64 ++++++++ .../transport/sshd/JGitSshClient.java | 20 +-- .../internal/transport/sshd/SshdText.java | 1 + .../transport/sshd/SshdSessionFactory.java | 4 +- 9 files changed, 282 insertions(+), 37 deletions(-) create mode 100644 org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthFactory.java create mode 100644 org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java diff --git a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF index ddb475dc1..1ac8faaa4 100644 --- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF @@ -12,6 +12,7 @@ Import-Package: org.apache.sshd.client.config.hosts;version="[2.7.0,2.8.0)", org.apache.sshd.common.auth;version="[2.7.0,2.8.0)", org.apache.sshd.common.config.keys;version="[2.7.0,2.8.0)", org.apache.sshd.common.helpers;version="[2.7.0,2.8.0)", + org.apache.sshd.common.kex;version="[2.7.0,2.8.0)", org.apache.sshd.common.keyprovider;version="[2.7.0,2.8.0)", org.apache.sshd.common.session;version="[2.7.0,2.8.0)", org.apache.sshd.common.signature;version="[2.7.0,2.8.0)", diff --git a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java index c56d2307c..c1f5fef3c 100644 --- a/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java +++ b/org.eclipse.jgit.ssh.apache.test/tst/org/eclipse/jgit/transport/sshd/ApacheSshTest.java @@ -34,13 +34,18 @@ import org.apache.sshd.client.config.hosts.KnownHostEntry; import org.apache.sshd.client.config.hosts.KnownHostHashValue; +import org.apache.sshd.common.NamedFactory; import org.apache.sshd.common.config.keys.AuthorizedKeyEntry; import org.apache.sshd.common.config.keys.KeyUtils; import org.apache.sshd.common.config.keys.PublicKeyEntry; import org.apache.sshd.common.config.keys.PublicKeyEntryResolver; +import org.apache.sshd.common.kex.BuiltinDHFactories; +import org.apache.sshd.common.kex.DHFactory; +import org.apache.sshd.common.kex.KeyExchangeFactory; import org.apache.sshd.common.session.Session; import org.apache.sshd.common.util.net.SshdSocketAddress; import org.apache.sshd.server.ServerAuthenticationManager; +import org.apache.sshd.server.ServerBuilder; import org.apache.sshd.server.SshServer; import org.apache.sshd.server.forward.StaticDecisionForwardingFilter; import org.eclipse.jgit.api.Git; @@ -702,4 +707,42 @@ public void testConnectAuthSshRsa() throws Exception { session.disconnect(); } } + + /** + * Tests that one can log in at an even poorer server that also only has the + * SHA1 KEX methods available. Apparently this is the case for at least some + * Microsoft TFS instances. The user has to enable the poor KEX methods in + * the ssh config explicitly; we don't enable them by default. + * + * @throws Exception + * on failure + */ + @Test + public void testConnectOnlyRsaSha1() throws Exception { + try (SshServer oldServer = createServer(TEST_USER, publicKey1)) { + oldServer.setSignatureFactoriesNames("ssh-rsa"); + List sha1Factories = BuiltinDHFactories + .parseDHFactoriesList( + "diffie-hellman-group1-sha1,diffie-hellman-group14-sha1") + .getParsedFactories(); + assertEquals(2, sha1Factories.size()); + List kexFactories = NamedFactory + .setUpTransformedFactories(true, sha1Factories, + ServerBuilder.DH2KEX); + oldServer.setKeyExchangeFactories(kexFactories); + oldServer.start(); + registerServer(oldServer); + installConfig("Host server", // + "HostName localhost", // + "Port " + oldServer.getPort(), // + "User " + TEST_USER, // + "IdentityFile " + privateKey1.getAbsolutePath(), // + "KexAlgorithms +diffie-hellman-group1-sha1"); + RemoteSession session = getSessionFactory().getSession( + new URIish("ssh://server/doesntmatter"), null, FS.DETECTED, + 10000); + assertNotNull(session); + session.disconnect(); + } + } } diff --git a/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties b/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties index 5bc086767..defcbdcfc 100644 --- a/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties +++ b/org.eclipse.jgit.ssh.apache/resources/org/eclipse/jgit/internal/transport/sshd/SshdText.properties @@ -8,6 +8,7 @@ configInvalidProxyJump=Ssh config, host ''{0}'': Cannot parse ProxyJump ''{1}'' configNoKnownAlgorithms=Ssh config ''{0}'' ''{1}'' resulted in empty list (none known, or all known removed); using default. configProxyJumpNotSsh=Non-ssh URI in ProxyJump ssh config configProxyJumpWithPath=ProxyJump ssh config: jump host specification must not have a path +configUnknownAlgorithm=Ssh config {0}: ignoring unknown algorithm ''{1}'' in {2} {3} ftpCloseFailed=Closing the SFTP channel failed gssapiFailure=GSS-API error for mechanism OID {0} gssapiInitFailure=GSS-API initialization failure for mechanism {0} diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java index 7656fe8d0..066cec38b 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018, 2019 Thomas Wolf and others + * Copyright (C) 2018, 2021 Thomas Wolf and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -29,17 +29,26 @@ import java.util.Objects; import java.util.Set; +import org.apache.sshd.client.ClientBuilder; import org.apache.sshd.client.ClientFactoryManager; import org.apache.sshd.client.config.hosts.HostConfigEntry; import org.apache.sshd.client.keyverifier.ServerKeyVerifier; import org.apache.sshd.client.session.ClientSessionImpl; import org.apache.sshd.common.AttributeRepository; import org.apache.sshd.common.FactoryManager; +import org.apache.sshd.common.NamedResource; import org.apache.sshd.common.PropertyResolver; import org.apache.sshd.common.config.keys.KeyUtils; import org.apache.sshd.common.io.IoSession; import org.apache.sshd.common.io.IoWriteFuture; +import org.apache.sshd.common.kex.BuiltinDHFactories; +import org.apache.sshd.common.kex.DHFactory; import org.apache.sshd.common.kex.KexProposalOption; +import org.apache.sshd.common.kex.KeyExchangeFactory; +import org.apache.sshd.common.kex.extension.KexExtensionHandler; +import org.apache.sshd.common.kex.extension.KexExtensions; +import org.apache.sshd.common.signature.BuiltinSignatures; +import org.apache.sshd.common.kex.extension.KexExtensionHandler.AvailabilityPhase; import org.apache.sshd.common.util.Readable; import org.apache.sshd.common.util.buffer.Buffer; import org.eclipse.jgit.errors.InvalidPatternException; @@ -70,6 +79,8 @@ public class JGitClientSession extends ClientSessionImpl { */ private static final int DEFAULT_MAX_IDENTIFICATION_SIZE = 64 * 1024; + private static final AttributeKey INITIAL_KEX_DONE = new AttributeKey<>(); + private HostConfigEntry hostConfig; private CredentialsProvider credentialsProvider; @@ -219,6 +230,32 @@ protected Map setNegotiationResult( return result; } + Set getAllAvailableSignatureAlgorithms() { + Set allAvailable = new HashSet<>(); + BuiltinSignatures.VALUES.forEach(s -> allAvailable.add(s.getName())); + BuiltinSignatures.getRegisteredExtensions() + .forEach(s -> allAvailable.add(s.getName())); + return allAvailable; + } + + private void setNewFactories(Collection defaultFactories, + Collection finalFactories) { + // If new factory names were added make sure we actually have factories + // for them all. + // + // But add new ones at the end: we don't want to change the order for + // pubkey auth, and any new ones added here were not included in the + // default set for some reason, such as being deprecated or weak. + // + // The order for KEX is determined by the order in the proposal string, + // but the order in pubkey auth is determined by the order in the + // factory list (possibly overridden via ssh config + // PubkeyAcceptedAlgorithms; see JGitPublicKeyAuthentication). + Set resultSet = new LinkedHashSet<>(defaultFactories); + resultSet.addAll(finalFactories); + setSignatureFactoriesNames(resultSet); + } + @Override protected String resolveAvailableSignaturesProposal( FactoryManager manager) { @@ -229,16 +266,17 @@ protected String resolveAvailableSignaturesProposal( .getProperty(SshConstants.HOST_KEY_ALGORITHMS); if (!StringUtils.isEmptyOrNull(algorithms)) { List result = modifyAlgorithmList(defaultSignatures, - algorithms, SshConstants.HOST_KEY_ALGORITHMS); + getAllAvailableSignatureAlgorithms(), algorithms, + SshConstants.HOST_KEY_ALGORITHMS); if (!result.isEmpty()) { if (log.isDebugEnabled()) { log.debug(SshConstants.HOST_KEY_ALGORITHMS + ' ' + result); } + setNewFactories(defaultSignatures, result); return String.join(",", result); //$NON-NLS-1$ } log.warn(format(SshdText.get().configNoKnownAlgorithms, - SshConstants.HOST_KEY_ALGORITHMS, - algorithms)); + SshConstants.HOST_KEY_ALGORITHMS, algorithms)); } // No HostKeyAlgorithms; using default -- change order to put existing // keys first. @@ -261,6 +299,10 @@ protected String resolveAvailableSignaturesProposal( if (log.isDebugEnabled()) { log.debug(SshConstants.HOST_KEY_ALGORITHMS + ' ' + reordered); } + // Make sure we actually have factories for them all. + if (reordered.size() > defaultSignatures.size()) { + setNewFactories(defaultSignatures, reordered); + } return String.join(",", reordered); //$NON-NLS-1$ } if (log.isDebugEnabled()) { @@ -270,15 +312,87 @@ protected String resolveAvailableSignaturesProposal( return String.join(",", defaultSignatures); //$NON-NLS-1$ } + private List determineKexProposal() { + List kexFactories = getKeyExchangeFactories(); + List defaultKexMethods = NamedResource + .getNameList(kexFactories); + HostConfigEntry config = resolveAttribute( + JGitSshClient.HOST_CONFIG_ENTRY); + String algorithms = config.getProperty(SshConstants.KEX_ALGORITHMS); + if (!StringUtils.isEmptyOrNull(algorithms)) { + Set allAvailable = new HashSet<>(); + BuiltinDHFactories.VALUES + .forEach(s -> allAvailable.add(s.getName())); + BuiltinDHFactories.getRegisteredExtensions() + .forEach(s -> allAvailable.add(s.getName())); + List result = modifyAlgorithmList(defaultKexMethods, + allAvailable, algorithms, SshConstants.KEX_ALGORITHMS); + if (!result.isEmpty()) { + // If new ones were added, update the installed factories + Set configuredKexMethods = new HashSet<>( + defaultKexMethods); + List newKexFactories = new ArrayList<>(); + result.forEach(name -> { + if (!configuredKexMethods.contains(name)) { + DHFactory factory = BuiltinDHFactories + .resolveFactory(name); + if (factory == null) { + // Should not occur here + if (log.isDebugEnabled()) { + log.debug( + "determineKexProposal({}) unknown KEX algorithm {} ignored", //$NON-NLS-1$ + this, name); + } + } else { + newKexFactories + .add(ClientBuilder.DH2KEX.apply(factory)); + } + } + }); + if (!newKexFactories.isEmpty()) { + newKexFactories.addAll(kexFactories); + setKeyExchangeFactories(newKexFactories); + } + return result; + } + log.warn(format(SshdText.get().configNoKnownAlgorithms, + SshConstants.KEX_ALGORITHMS, algorithms)); + } + return defaultKexMethods; + } + + @Override + protected String resolveSessionKexProposal(String hostKeyTypes) + throws IOException { + String kexMethods = String.join(",", determineKexProposal()); //$NON-NLS-1$ + Boolean isRekey = getAttribute(INITIAL_KEX_DONE); + if (isRekey == null || !isRekey.booleanValue()) { + // First time + KexExtensionHandler extHandler = getKexExtensionHandler(); + if (extHandler != null && extHandler.isKexExtensionsAvailable(this, + AvailabilityPhase.PROPOSAL)) { + if (kexMethods.isEmpty()) { + kexMethods = KexExtensions.CLIENT_KEX_EXTENSION; + } else { + kexMethods += ',' + KexExtensions.CLIENT_KEX_EXTENSION; + } + } + setAttribute(INITIAL_KEX_DONE, Boolean.TRUE); + } + if (log.isDebugEnabled()) { + log.debug(SshConstants.KEX_ALGORITHMS + ' ' + kexMethods); + } + return kexMethods; + } + /** * Modifies a given algorithm list according to a list from the ssh config, - * including remove ('-') and reordering ('^') operators. Addition ('+') is - * not handled since we have no way of adding dynamically implementations, - * and the defaultList is supposed to contain all known implementations - * already. + * including add ('+'), remove ('-') and reordering ('^') operators. * * @param defaultList * to modify + * @param allAvailable + * all available values * @param fromConfig * telling how to modify the {@code defaultList}, must not be * {@code null} or empty @@ -288,22 +402,22 @@ protected String resolveAvailableSignaturesProposal( * set */ public List modifyAlgorithmList(List defaultList, - String fromConfig, String overrideKey) { + Set allAvailable, String fromConfig, String overrideKey) { Set defaults = new LinkedHashSet<>(); defaults.addAll(defaultList); switch (fromConfig.charAt(0)) { case '+': - // Additions make not much sense -- it's either in - // defaultList already, or we have no implementation for - // it. No point in proposing it. - return defaultList; + List newSignatures = filteredList(allAvailable, overrideKey, + fromConfig.substring(1)); + defaults.addAll(newSignatures); + return new ArrayList<>(defaults); case '-': // This takes wildcard patterns! removeFromList(defaults, overrideKey, fromConfig.substring(1)); return new ArrayList<>(defaults); case '^': // Specified entries go to the front of the default list - List allSignatures = filteredList(defaults, + List allSignatures = filteredList(allAvailable, overrideKey, fromConfig.substring(1)); Set atFront = new HashSet<>(allSignatures); for (String sig : defaults) { @@ -315,7 +429,7 @@ public List modifyAlgorithmList(List defaultList, default: // Default is overridden -- only accept the ones for which we do // have an implementation. - return filteredList(defaults, fromConfig); + return filteredList(allAvailable, overrideKey, fromConfig); } } @@ -342,11 +456,15 @@ private void removeFromList(Set current, String key, } } - private List filteredList(Set known, String values) { + private List filteredList(Set known, String key, + String values) { List newNames = new ArrayList<>(); for (String newValue : values.split("\\s*,\\s*")) { //$NON-NLS-1$ if (known.contains(newValue)) { newNames.add(newValue); + } else { + log.warn(format(SshdText.get().configUnknownAlgorithm, this, + newValue, key, values)); } } return newNames; diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthFactory.java new file mode 100644 index 000000000..0e3e24dcf --- /dev/null +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthFactory.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2018, 2021 Thomas Wolf and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.internal.transport.sshd; + +import java.io.IOException; + +import org.apache.sshd.client.auth.pubkey.UserAuthPublicKey; +import org.apache.sshd.client.auth.pubkey.UserAuthPublicKeyFactory; +import org.apache.sshd.client.session.ClientSession; + +/** + * A customized authentication factory for public key user authentication. + */ +public class JGitPublicKeyAuthFactory extends UserAuthPublicKeyFactory { + + /** The singleton {@link JGitPublicKeyAuthFactory}. */ + public static final JGitPublicKeyAuthFactory FACTORY = new JGitPublicKeyAuthFactory(); + + private JGitPublicKeyAuthFactory() { + super(); + } + + @Override + public UserAuthPublicKey createUserAuth(ClientSession session) + throws IOException { + return new JGitPublicKeyAuthentication(getSignatureFactories()); + } +} diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java new file mode 100644 index 000000000..08da18f5a --- /dev/null +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitPublicKeyAuthentication.java @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2018, 2021 Thomas Wolf and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.internal.transport.sshd; + +import static java.text.MessageFormat.format; +import static org.eclipse.jgit.transport.SshConstants.PUBKEY_ACCEPTED_ALGORITHMS; + +import java.util.List; + +import org.apache.sshd.client.auth.pubkey.UserAuthPublicKey; +import org.apache.sshd.client.config.hosts.HostConfigEntry; +import org.apache.sshd.client.session.ClientSession; +import org.apache.sshd.common.NamedFactory; +import org.apache.sshd.common.signature.Signature; +import org.eclipse.jgit.util.StringUtils; + +/** + * Custom {@link UserAuthPublicKey} implementation for handling SSH config + * PubkeyAcceptedAlgorithms. + */ +public class JGitPublicKeyAuthentication extends UserAuthPublicKey { + + JGitPublicKeyAuthentication(List> factories) { + super(factories); + } + + @Override + public void init(ClientSession rawSession, String service) + throws Exception { + if (!(rawSession instanceof JGitClientSession)) { + throw new IllegalStateException("Wrong session type: " //$NON-NLS-1$ + + rawSession.getClass().getCanonicalName()); + } + JGitClientSession session = ((JGitClientSession) rawSession); + HostConfigEntry hostConfig = session.getHostConfigEntry(); + // Set signature algorithms for public key authentication + String pubkeyAlgos = hostConfig.getProperty(PUBKEY_ACCEPTED_ALGORITHMS); + if (!StringUtils.isEmptyOrNull(pubkeyAlgos)) { + List signatures = session.getSignatureFactoriesNames(); + signatures = session.modifyAlgorithmList(signatures, + session.getAllAvailableSignatureAlgorithms(), pubkeyAlgos, + PUBKEY_ACCEPTED_ALGORITHMS); + if (!signatures.isEmpty()) { + if (log.isDebugEnabled()) { + log.debug(PUBKEY_ACCEPTED_ALGORITHMS + ' ' + signatures); + } + setSignatureFactoriesNames(signatures); + } else { + log.warn(format(SshdText.get().configNoKnownAlgorithms, + PUBKEY_ACCEPTED_ALGORITHMS, pubkeyAlgos)); + } + } + // If we don't set signature factories here, the default ones from the + // session will be used. + super.init(session, service); + } +} diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java index 071e1979d..ae12c2028 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitSshClient.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018, 2020 Thomas Wolf and others + * Copyright (C) 2018, 2021 Thomas Wolf and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -267,24 +267,6 @@ private JGitClientSession createSession(IoSession ioSession, session.setUsername(username); session.setConnectAddress(address); session.setHostConfigEntry(hostConfig); - // Set signature algorithms for public key authentication - String pubkeyAlgos = hostConfig - .getProperty(SshConstants.PUBKEY_ACCEPTED_ALGORITHMS); - if (!StringUtils.isEmptyOrNull(pubkeyAlgos)) { - List signatures = getSignatureFactoriesNames(); - signatures = session.modifyAlgorithmList(signatures, pubkeyAlgos, - SshConstants.PUBKEY_ACCEPTED_ALGORITHMS); - if (!signatures.isEmpty()) { - if (log.isDebugEnabled()) { - log.debug(SshConstants.PUBKEY_ACCEPTED_ALGORITHMS + ' ' - + signatures); - } - session.setSignatureFactoriesNames(signatures); - } else { - log.warn(format(SshdText.get().configNoKnownAlgorithms, - SshConstants.PUBKEY_ACCEPTED_ALGORITHMS, pubkeyAlgos)); - } - } if (session.getCredentialsProvider() == null) { session.setCredentialsProvider(getCredentialsProvider()); } diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java index 73c2288cc..c0f571962 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/SshdText.java @@ -28,6 +28,7 @@ public static SshdText get() { /***/ public String configNoKnownAlgorithms; /***/ public String configProxyJumpNotSsh; /***/ public String configProxyJumpWithPath; + /***/ public String configUnknownAlgorithm; /***/ public String ftpCloseFailed; /***/ public String gssapiFailure; /***/ public String gssapiInitFailure; diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java index d52e24adf..cad959c90 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java @@ -32,7 +32,6 @@ import org.apache.sshd.client.SshClient; import org.apache.sshd.client.auth.UserAuthFactory; import org.apache.sshd.client.auth.keyboard.UserAuthKeyboardInteractiveFactory; -import org.apache.sshd.client.auth.pubkey.UserAuthPublicKeyFactory; import org.apache.sshd.client.config.hosts.HostConfigEntryResolver; import org.apache.sshd.common.NamedFactory; import org.apache.sshd.common.SshException; @@ -49,6 +48,7 @@ import org.eclipse.jgit.internal.transport.sshd.CachingKeyPairProvider; import org.eclipse.jgit.internal.transport.sshd.GssApiWithMicAuthFactory; import org.eclipse.jgit.internal.transport.sshd.JGitPasswordAuthFactory; +import org.eclipse.jgit.internal.transport.sshd.JGitPublicKeyAuthFactory; import org.eclipse.jgit.internal.transport.sshd.JGitServerKeyVerifier; import org.eclipse.jgit.internal.transport.sshd.JGitSshClient; import org.eclipse.jgit.internal.transport.sshd.JGitSshConfig; @@ -577,7 +577,7 @@ private List getUserAuthFactories() { // Password auth doesn't have this problem. return Collections.unmodifiableList( Arrays.asList(GssApiWithMicAuthFactory.INSTANCE, - UserAuthPublicKeyFactory.INSTANCE, + JGitPublicKeyAuthFactory.FACTORY, JGitPasswordAuthFactory.INSTANCE, UserAuthKeyboardInteractiveFactory.INSTANCE)); } From 4c5c3e9fb8e6f11cee3245a4b374a96b9a4f0ee4 Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Tue, 29 Jun 2021 23:08:02 +0200 Subject: [PATCH 13/38] [sshd] Distinguish key type and signature algorithm for host key Since the introduction of the rsa-sha2-512 and rsa-sha2-256 signature types, the key type for RSA is no longer automatically the signature algorithm. We re-order the list for the host key proposal such that keys we already have are preferred; this minimizes warnings about new host keys. When doing so, put all of rsa-sha2-512, rsa-sha2-256, and ssh-rsa at the front, in that order, not just ssh-rsa. This ensures that we do prefer RSA keys if we already have an RSA host key, but at the same time we still prefer the stronger signature algorithms over the weaker and deprecated SHA1-based ssh-rsa signature. It also helps avoid a bug found in some Github versions where the Github SSH server uses a rsa-sha2-512 signature even though ssh-rsa was negotiated.[1] [1] https://www.eclipse.org/forums/index.php/t/1108282/ Bug: 574635 Change-Id: I0a49dcfa0c2c93f23118c983cd0bc9e5a467d886 Signed-off-by: Thomas Wolf --- .../jgit/internal/transport/sshd/JGitClientSession.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java index 066cec38b..2133a29cc 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java @@ -47,6 +47,7 @@ import org.apache.sshd.common.kex.KeyExchangeFactory; import org.apache.sshd.common.kex.extension.KexExtensionHandler; import org.apache.sshd.common.kex.extension.KexExtensions; +import org.apache.sshd.common.keyprovider.KeyPairProvider; import org.apache.sshd.common.signature.BuiltinSignatures; import org.apache.sshd.common.kex.extension.KexExtensionHandler.AvailabilityPhase; import org.apache.sshd.common.util.Readable; @@ -291,6 +292,11 @@ protected String resolveAvailableSignaturesProposal( if (key != null) { String keyType = KeyUtils.getKeyType(key); if (keyType != null) { + if (KeyPairProvider.SSH_RSA.equals(keyType)) { + // Add all available signatures for ssh-rsa. + reordered.add(KeyUtils.RSA_SHA512_KEY_TYPE_ALIAS); + reordered.add(KeyUtils.RSA_SHA256_KEY_TYPE_ALIAS); + } reordered.add(keyType); } } From 13777a3a6265ee68966547e69de83410e0621dfc Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Tue, 18 May 2021 21:44:18 +0200 Subject: [PATCH 14/38] [sshd] Ignore revoked keys in OpenSshServerKeyDatabase.lookup() It makes no sense to return revoked keys. Change-Id: I99eee1de3dba5c0c8d275b7c1a24053874b3cb03 Signed-off-by: Thomas Wolf --- .../sshd/OpenSshServerKeyDatabase.java | 25 ++++++++++++------- .../transport/sshd/ServerKeyDatabase.java | 4 +-- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java index 1a530b774..85e406f42 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018, 2019 Thomas Wolf and others + * Copyright (C) 2018, 2021 Thomas Wolf and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Distribution License v. 1.0 which is available at @@ -182,10 +182,13 @@ public List lookup(@NonNull String connectAddress, for (HostKeyFile file : filesToUse) { for (HostEntryPair current : file.get()) { KnownHostEntry entry = current.getHostEntry(); - for (SshdSocketAddress host : candidates) { - if (entry.isHostMatch(host.getHostName(), host.getPort())) { - result.add(current.getServerKey()); - break; + if (!isRevoked(entry)) { + for (SshdSocketAddress host : candidates) { + if (entry.isHostMatch(host.getHostName(), + host.getPort())) { + result.add(current.getServerKey()); + break; + } } } } @@ -266,6 +269,10 @@ private static class RevokedKeyException extends Exception { private static final long serialVersionUID = 1L; } + private boolean isRevoked(KnownHostEntry entry) { + return MARKER_REVOKED.equals(entry.getMarker()); + } + private boolean find(Collection candidates, PublicKey serverKey, List entries, HostEntryPair[] modified) throws RevokedKeyException { @@ -273,22 +280,22 @@ private boolean find(Collection candidates, KnownHostEntry entry = current.getHostEntry(); for (SshdSocketAddress host : candidates) { if (entry.isHostMatch(host.getHostName(), host.getPort())) { - boolean isRevoked = MARKER_REVOKED - .equals(entry.getMarker()); + boolean revoked = isRevoked(entry); if (KeyUtils.compareKeys(serverKey, current.getServerKey())) { // Exact match - if (isRevoked) { + if (revoked) { throw new RevokedKeyException(); } modified[0] = null; return true; - } else if (!isRevoked) { + } else if (!revoked) { // Server sent a different key modified[0] = current; // Keep going -- maybe there's another entry for this // host } + break; } } } diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/ServerKeyDatabase.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/ServerKeyDatabase.java index b8e6cfd14..b1b3c1808 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/ServerKeyDatabase.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/ServerKeyDatabase.java @@ -30,7 +30,7 @@ public interface ServerKeyDatabase { /** - * Retrieves all known host keys for the given addresses. + * Retrieves all known and not revoked host keys for the given addresses. * * @param connectAddress * IP address the session tried to connect to @@ -39,7 +39,7 @@ public interface ServerKeyDatabase { * @param config * giving access to potentially interesting configuration * settings - * @return the list of known keys for the given addresses + * @return the list of known and not revoked keys for the given addresses */ @NonNull List lookup(@NonNull String connectAddress, From e0ba98edd2b40876aa7aaae4b59a24ae2412a20a Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Sun, 11 Jul 2021 14:21:40 +0200 Subject: [PATCH 15/38] Update orbit to I20210711110031 and update - assertj to 3.20.2.v20210706-1104 - hamcrest to 2.2.0.v20210711-0821 - classes which were in org.hamcrest.core 1.3 and org.hamcrest.library 1.3 were all moved to org.hamcrest in 2.2 - the annotation org.hamcrest.Factory was removed and is no longer needed - junit 4.13 requires hamcrest-core and hamcrest-library 1.3 therefore keep them in the target platform CQ: 23501 Change-Id: Ife871c0343b611be9203aed7f86577e85bbf5c95 --- DEPENDENCIES | 22 +++++++++---------- WORKSPACE | 16 +++++--------- lib/BUILD | 3 +-- .../META-INF/MANIFEST.MF | 2 +- .../META-INF/MANIFEST.MF | 3 +-- .../META-INF/MANIFEST.MF | 5 ++--- org.eclipse.jgit.http.test/pom.xml | 4 ++-- .../META-INF/MANIFEST.MF | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../org.eclipse.jgit.target/jgit-4.10.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.10.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.11.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.11.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.12.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.12.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.13.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.13.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.14.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.14.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.15.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.15.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.16.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.16.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.17.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.17.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.18.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.18.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.19.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.19.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.20.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.20.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.21.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.21.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.6.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.6.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.7.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.7.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.8.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.8.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.9.target | 11 +++++----- .../org.eclipse.jgit.target/jgit-4.9.tpd | 2 +- ...20210705204906.tpd => I20210711110031.tpd} | 11 +++++----- .../orbit/R20210602031627-2021-06.tpd | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../META-INF/MANIFEST.MF | 2 +- .../META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.test/META-INF/MANIFEST.MF | 6 ++--- org.eclipse.jgit.test/pom.xml | 4 ++-- .../jgit/transport/ObjectIdMatcher.java | 2 -- pom.xml | 4 +++- 50 files changed, 155 insertions(+), 147 deletions(-) rename org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/{S20210705204906.tpd => I20210711110031.tpd} (92%) diff --git a/DEPENDENCIES b/DEPENDENCIES index bd90df414..fe173bb5b 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -8,8 +8,8 @@ maven/mavencentral/commons-logging/commons-logging/1.2, Apache-2.0, approved, CQ maven/mavencentral/javax.servlet/javax.servlet-api/3.1.0, Apache-2.0 AND (CDDL-1.1 OR GPL-2.0 WITH Classpath-exception-2.0), approved, emo_ip_team maven/mavencentral/junit/junit/4.13, , approved, CQ22796 maven/mavencentral/log4j/log4j/1.2.15, Apache-2.0, approved, CQ7837 -maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.9.0, Apache-2.0, restricted, clearlydefined -maven/mavencentral/net.bytebuddy/byte-buddy/1.9.0, Apache-2.0, restricted, clearlydefined +maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.9.0, Apache-2.0, approved, clearlydefined +maven/mavencentral/net.bytebuddy/byte-buddy/1.9.0, Apache-2.0, approved, clearlydefined maven/mavencentral/net.i2p.crypto/eddsa/0.3.0, CC0, approved, CQ17804 maven/mavencentral/net.sf.jopt-simple/jopt-simple/4.6, MIT, approved, CQ14441 maven/mavencentral/org.apache.ant/ant-launcher/1.10.10, Apache-2.0 AND W3C AND LicenseRef-Public-Domain, approved, CQ15560 @@ -22,17 +22,17 @@ maven/mavencentral/org.apache.sshd/sshd-common/2.7.0, Apache-2.0 and ISC, approv maven/mavencentral/org.apache.sshd/sshd-core/2.7.0, Apache-2.0, approved, CQ23469 maven/mavencentral/org.apache.sshd/sshd-osgi/2.7.0, Apache-2.0 and ISC, approved, CQ23469 maven/mavencentral/org.apache.sshd/sshd-sftp/2.7.0, Apache-2.0, approved, CQ23470 -maven/mavencentral/org.assertj/assertj-core/3.14.0, Apache-2.0, approved, CQ21437 +maven/mavencentral/org.assertj/assertj-core/3.20.2, Apache-2.0, approved, CQ23501 maven/mavencentral/org.bouncycastle/bcpg-jdk15on/1.65, Apache-2.0, approved, CQ21975 maven/mavencentral/org.bouncycastle/bcpkix-jdk15on/1.65, MIT AND LicenseRef-Public-Domain, approved, CQ21976 maven/mavencentral/org.bouncycastle/bcprov-jdk15on/1.65.01, MIT AND LicenseRef-Public-Domain, approved, CQ21977 -maven/mavencentral/org.eclipse.jetty/jetty-http/9.4.42.v20210604, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-io/9.4.42.v20210604, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-security/9.4.42.v20210604, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-server/9.4.42.v20210604, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-servlet/9.4.42.v20210604, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-util-ajax/9.4.42.v20210604, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-util/9.4.42.v20210604, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-http/9.4.43.v20210629, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-io/9.4.43.v20210629, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-security/9.4.43.v20210629, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-server/9.4.43.v20210629, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-servlet/9.4.43.v20210629, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-util-ajax/9.4.43.v20210629, EPL-2.0, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-util/9.4.43.v20210629, EPL-2.0, approved, eclipse maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.archive/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse @@ -55,7 +55,7 @@ maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.jsch/5.13.0-SNAPSHOT, B maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ui/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.hamcrest/hamcrest-core/1.3, BSD-2-Clause, approved, CQ7063 +maven/mavencentral/org.hamcrest/hamcrest/2.2, BSD-2-Clause, approved, clearlydefined maven/mavencentral/org.mockito/mockito-core/2.23.0, MIT, approved, CQ17976 maven/mavencentral/org.objenesis/objenesis/2.6, Apache-2.0, approved, CQ15478 maven/mavencentral/org.openjdk.jmh/jmh-core/1.32, GPL-2.0, approved, CQ23499 diff --git a/WORKSPACE b/WORKSPACE index 5e28525ea..b415c7af2 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -188,15 +188,9 @@ maven_jar( ) maven_jar( - name = "hamcrest-library", - artifact = "org.hamcrest:hamcrest-library:1.3", - sha1 = "4785a3c21320980282f9f33d0d1264a69040538f", -) - -maven_jar( - name = "hamcrest-core", - artifact = "org.hamcrest:hamcrest-core:1.3", - sha1 = "42a25dc3219429f0e5d060061f71acb49bf010a0", + name = "hamcrest", + artifact = "org.hamcrest:hamcrest:2.2", + sha1 = "1820c0968dba3a11a1b30669bb1f01978a91dedc", ) maven_jar( @@ -207,8 +201,8 @@ maven_jar( maven_jar( name = "assertj-core", - artifact = "org.assertj:assertj-core:3.14.0", - sha1 = "3b7b0fcac821f3d167764e9926573cd64f78f9e9", + artifact = "org.assertj:assertj-core:3.20.2", + sha1 = "66f1f0ebd6db2b24e4a731979171da16ba919cd5", ) BYTE_BUDDY_VERSION = "1.9.0" diff --git a/lib/BUILD b/lib/BUILD index 83709a305..cf08b945f 100644 --- a/lib/BUILD +++ b/lib/BUILD @@ -205,8 +205,7 @@ java_library( exports = [ "@bytebuddy-agent//jar", "@bytebuddy//jar", - "@hamcrest-core//jar", - "@hamcrest-library//jar", + "@hamcrest//jar", "@junit//jar", "@mockito//jar", "@objenesis//jar", diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF index aeac06ada..63f0305ff 100644 --- a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF @@ -13,5 +13,5 @@ Import-Package: org.apache.tools.ant, org.eclipse.jgit.junit;version="[5.13.0,5.14.0)", org.eclipse.jgit.lib;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", - org.hamcrest.core;version="[1.1.0,2.0.0)", + org.hamcrest.core;version="[2.2.0,3.0.0)", org.junit;version="[4.13,5.0.0)" diff --git a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF index 9b8062920..e5ac4fc16 100644 --- a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF @@ -15,10 +15,9 @@ Import-Package: org.bouncycastle.jce.provider;version="[1.65.0,2.0.0)", org.eclipse.jgit.gpg.bc.internal;version="[5.13.0,5.14.0)", org.eclipse.jgit.gpg.bc.internal.keys;version="[5.13.0,5.14.0)", org.eclipse.jgit.util.sha1;version="[5.13.0,5.14.0)", + org.hamcrest;version="[2.2.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", org.junit.runners;version="[4.13,5.0.0)" Export-Package: org.eclipse.jgit.gpg.bc.internal;x-internal:=true, org.eclipse.jgit.gpg.bc.internal.keys;x-internal:=true -Require-Bundle: org.hamcrest.core;bundle-version="[1.1.0,2.0.0)", - org.hamcrest.library;bundle-version="[1.1.0,2.0.0)" diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF index 1aef1cd36..c012c9040 100644 --- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF @@ -48,10 +48,9 @@ Import-Package: javax.servlet;version="[2.5.0,3.2.0)", org.eclipse.jgit.transport.http.apache;version="[5.13.0,5.14.0)", org.eclipse.jgit.transport.resolver;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", - org.hamcrest;version="[1.1.0,2.0.0)", - org.hamcrest.core;version="[1.1.0,2.0.0)", + org.hamcrest;version="[2.2.0,3.0.0)", + org.hamcrest.core;version="[2.2.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.rules;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", org.junit.runners;version="[4.13,5.0.0)" -Require-Bundle: org.hamcrest.library;bundle-version="[1.1.0,2.0.0)" diff --git a/org.eclipse.jgit.http.test/pom.xml b/org.eclipse.jgit.http.test/pom.xml index d3c154d42..0ecc88380 100644 --- a/org.eclipse.jgit.http.test/pom.xml +++ b/org.eclipse.jgit.http.test/pom.xml @@ -52,9 +52,9 @@ org.hamcrest - hamcrest-library + hamcrest test - [1.1.0,2.0.0) + ${hamcrest-version} diff --git a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF index 3ab248e61..3b208aafe 100644 --- a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF @@ -46,7 +46,7 @@ Import-Package: javax.servlet;version="[3.1.0,4.0.0)", org.eclipse.jgit.treewalk;version="[5.13.0,5.14.0)", org.eclipse.jgit.treewalk.filter;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", - org.hamcrest.core;version="[1.1.0,2.0.0)", + org.hamcrest.core;version="[2.2.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.rules;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF index 35f2af02b..5a7bbad06 100644 --- a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF @@ -19,7 +19,7 @@ Import-Package: org.eclipse.jgit.api;version="[5.13.0,5.14.0)", org.eclipse.jgit.treewalk;version="[5.13.0,5.14.0)", org.eclipse.jgit.treewalk.filter;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", - org.hamcrest.core;version="[1.1.0,2.0.0)", + org.hamcrest.core;version="[2.2.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", org.junit.runners;version="[4.13,5.0.0)" diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target index 44a3c78c2..bbcb96234 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd index 19b121d39..635ff49f1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd @@ -1,7 +1,7 @@ target "jgit-4.10" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/2018-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target index df8edf409..a96716489 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd index ea5cfca14..b33916d59 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd @@ -1,7 +1,7 @@ target "jgit-4.11" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/2019-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target index 9ec8d28a2..4e8fbe1d1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd index 6bd6483e6..29e070d05 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd @@ -1,7 +1,7 @@ target "jgit-4.12" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/2019-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target index 04e472ce2..6325b5972 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd index 6cff6b292..18b3d5cfc 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd @@ -1,7 +1,7 @@ target "jgit-4.13" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/2019-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target index a5ce93e42..4cc1f21ae 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd index 68fc3cae1..2140d943c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd @@ -1,7 +1,7 @@ target "jgit-4.14" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/2019-12/201912181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target index 765f34949..cca13da1c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd index 312432644..97588dba5 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd @@ -1,7 +1,7 @@ target "jgit-4.15" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/2020-03/202003181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target index 123ab6944..c36d2ef85 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd index 8f87c866c..6f5cc8aa7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd @@ -1,7 +1,7 @@ target "jgit-4.16" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/2020-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target index cde727d3c..b91ed7c71 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd index 7ae2b1d30..911418195 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd @@ -1,7 +1,7 @@ target "jgit-4.17" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/2020-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target index cdd280dd7..d93bdf70b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd index 6bac8370a..4e6c59a01 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd @@ -1,7 +1,7 @@ target "jgit-4.18" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/2020-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target index ad706d844..0769e5357 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd index 3cc1ebc15..c0fa592a0 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd @@ -1,7 +1,7 @@ target "jgit-4.19-staging" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/staging/2021-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target index 46f9f6754..11b7151db 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd index f4ffd40e6..aba2a259a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd @@ -1,7 +1,7 @@ target "jgit-4.20" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/2021-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target index d55c62c9f..e23f4142c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd index 1e9d4f004..f35d6b8f4 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd @@ -1,7 +1,7 @@ target "jgit-4.21" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/staging/2021-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index b8540d094..098773f53 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd index 530aeb75d..4f10e7ded 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd @@ -1,7 +1,7 @@ target "jgit-4.6" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/neon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index 8ebcceec8..79f21315e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd index f59dc2baa..0970da67c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd @@ -1,7 +1,7 @@ target "jgit-4.7" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/oxygen/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target index 3164a7eb7..b98319a07 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd index d228d3d18..8d602b39f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd @@ -1,7 +1,7 @@ target "jgit-4.8" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/photon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target index 2ec5bf8df..640ced321 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target @@ -1,7 +1,7 @@ - + @@ -59,15 +59,16 @@ - - + + - + + @@ -86,7 +87,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd index 21af8b1d8..2ec27c6f7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd @@ -1,7 +1,7 @@ target "jgit-4.9" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/S20210705204906.tpd" +include "orbit/I20210711110031.tpd" location "https://download.eclipse.org/releases/2018-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20210705204906.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210711110031.tpd similarity index 92% rename from org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20210705204906.tpd rename to org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210711110031.tpd index 4cd68c86f..c0413400d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/S20210705204906.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210711110031.tpd @@ -1,7 +1,7 @@ -target "S20210705204906" with source configurePhase +target "I20210711110031" with source configurePhase // see https://download.eclipse.org/tools/orbit/downloads/ -location "https://download.eclipse.org/tools/orbit/downloads/drops/S20210705204906/repository" { +location "https://download.eclipse.org/tools/orbit/downloads/drops/I20210711110031/repository" { com.google.gson [2.8.7.v20210624-1215,2.8.7.v20210624-1215] com.google.gson.source [2.8.7.v20210624-1215,2.8.7.v20210624-1215] com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902] @@ -36,15 +36,16 @@ location "https://download.eclipse.org/tools/orbit/downloads/drops/S202107052049 org.apache.sshd.osgi.source [2.7.0.v20210623-0618,2.7.0.v20210623-0618] org.apache.sshd.sftp [2.7.0.v20210623-0618,2.7.0.v20210623-0618] org.apache.sshd.sftp.source [2.7.0.v20210623-0618,2.7.0.v20210623-0618] - org.assertj [3.14.0.v20200120-1926,3.14.0.v20200120-1926] - org.assertj.source [3.14.0.v20200120-1926,3.14.0.v20200120-1926] + org.assertj [3.20.2.v20210706-1104,3.20.2.v20210706-1104] + org.assertj.source [3.20.2.v20210706-1104,3.20.2.v20210706-1104] org.bouncycastle.bcpg [1.65.0.v20200527-1955,1.65.0.v20200527-1955] org.bouncycastle.bcpg.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955] org.bouncycastle.bcpkix [1.65.0.v20200527-1955,1.65.0.v20200527-1955] org.bouncycastle.bcpkix.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955] org.bouncycastle.bcprov [1.65.1.v20200529-1514,1.65.1.v20200529-1514] org.bouncycastle.bcprov.source [1.65.1.v20200529-1514,1.65.1.v20200529-1514] - org.hamcrest [1.1.0.v20090501071000,1.1.0.v20090501071000] + org.hamcrest [2.2.0.v20210711-0821,2.2.0.v20210711-0821] + org.hamcrest.source [2.2.0.v20210711-0821,2.2.0.v20210711-0821] org.hamcrest.core [1.3.0.v20180420-1519,1.3.0.v20180420-1519] org.hamcrest.core.source [1.3.0.v20180420-1519,1.3.0.v20180420-1519] org.hamcrest.library [1.3.0.v20180524-2246,1.3.0.v20180524-2246] diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd index ff007bc36..83b5bb3fd 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210602031627-2021-06.tpd @@ -1,4 +1,4 @@ -target "S20210705204906" with source configurePhase +target "R20210602031627-2021-06" with source configurePhase // see https://download.eclipse.org/tools/orbit/downloads/ location "https://download.eclipse.org/tools/orbit/downloads/drops/R20210602031627/repository" { diff --git a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF index 30dfef5cc..31629b224 100644 --- a/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF @@ -25,7 +25,7 @@ Import-Package: org.eclipse.jgit.api;version="[5.13.0,5.14.0)", org.eclipse.jgit.treewalk;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", org.eclipse.jgit.util.io;version="[5.13.0,5.14.0)", - org.hamcrest.core;bundle-version="[1.1.0,2.0.0)", + org.hamcrest.core;bundle-version="[2.2.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.rules;version="[4.13,5.0.0)", org.kohsuke.args4j;version="[2.33.0,3.0.0)" diff --git a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF index 1ac8faaa4..d5256c40c 100644 --- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF @@ -30,7 +30,7 @@ Import-Package: org.apache.sshd.client.config.hosts;version="[2.7.0,2.8.0)", org.eclipse.jgit.transport;version="[5.13.0,5.14.0)", org.eclipse.jgit.transport.sshd;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", + org.hamcrest;version="[2.2.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)" -Require-Bundle: org.hamcrest.core;bundle-version="[1.3.0,2.0.0)" diff --git a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF index 276ba5d19..945ebb6a4 100644 --- a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF @@ -14,7 +14,7 @@ Import-Package: com.jcraft.jsch;version="[0.1.54,0.2.0)", org.eclipse.jgit.lib;version="[5.13.0,5.14.0)", org.eclipse.jgit.transport;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", + org.hamcrest;version="[2.2.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)" -Require-Bundle: org.hamcrest.core;bundle-version="[1.3.0,2.0.0)" diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF index 2cc7681a4..8b50e010c 100644 --- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF @@ -15,7 +15,7 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", org.apache.commons.compress.compressors.bzip2;version="[1.15.0,2.0)", org.apache.commons.compress.compressors.gzip;version="[1.15.0,2.0)", org.apache.commons.compress.compressors.xz;version="[1.15.0,2.0)", - org.assertj.core.api;version="[3.14.0,4.0.0)", + org.assertj.core.api;version="[3.20.0,4.0.0)", org.eclipse.jgit.annotations;version="[5.13.0,5.14.0)", org.eclipse.jgit.api;version="[5.13.0,5.14.0)", org.eclipse.jgit.api.errors;version="[5.13.0,5.14.0)", @@ -69,6 +69,8 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", org.eclipse.jgit.util.io;version="[5.13.0,5.14.0)", org.eclipse.jgit.util.sha1;version="[5.13.0,5.14.0)", + org.hamcrest;version="[2.2.0,3.0.0)", + org.hamcrest.collection;version="[2.2.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", org.junit.function;version="[4.13.0,5.0.0)", @@ -82,5 +84,3 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", org.objenesis;version="[2.6.0,3.0.0)", org.slf4j;version="[1.7.0,2.0.0)", org.tukaani.xz;version="[1.6.0,2.0)" -Require-Bundle: org.hamcrest.core;bundle-version="[1.1.0,2.0.0)", - org.hamcrest.library;bundle-version="[1.1.0,2.0.0)" diff --git a/org.eclipse.jgit.test/pom.xml b/org.eclipse.jgit.test/pom.xml index 21236fb77..d403c95ec 100644 --- a/org.eclipse.jgit.test/pom.xml +++ b/org.eclipse.jgit.test/pom.xml @@ -60,9 +60,9 @@ org.hamcrest - hamcrest-library + hamcrest test - [1.1.0,2.0.0) + ${hamcrest-version} diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ObjectIdMatcher.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ObjectIdMatcher.java index c3df19a23..77e8afb2b 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ObjectIdMatcher.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ObjectIdMatcher.java @@ -16,7 +16,6 @@ import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.Sets; import org.hamcrest.Description; -import org.hamcrest.Factory; import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; @@ -59,7 +58,6 @@ protected boolean matchesSafely(Collection resultOids) { * @return true if examined and specified sets contains exactly the same * elements. */ - @Factory static Matcher> hasOnlyObjectIds( String... oids) { return new ObjectIdMatcher(Sets.of(oids)); diff --git a/pom.xml b/pom.xml index 01b6434ad..345b58497 100644 --- a/pom.xml +++ b/pom.xml @@ -179,6 +179,8 @@ ${maven-surefire-plugin-version} 3.8.1 2.8.8 + 2.2 + 3.20.2 jacoco @@ -796,7 +798,7 @@ org.assertj assertj-core - 3.14.0 + ${assertj-version} From 02344254ea7ddd97c21ea7b50fcb9a49932c3251 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 14 Jul 2021 22:30:06 +0200 Subject: [PATCH 16/38] Update orbit to I20210713220109 update - org.apache.commons.compress to 1.20.0.v20210713-192 - org.bouncycastle.bcpg to 1.69.0.v20210713-1924 - org.bouncycastle.bcpkix to 1.69.0.v20210713-1924 - org.bouncycastle.bcprov to 1.69.0.v20210713-1924 - add org.bouncycastle.bcutil 1.69.0.v20210713-1924 In bazel build don't expose bouncycastle to org.eclipse.jgit since it's not used there anymore since code depending on bouncycastle was moved to org.eclipse.jgit.gpg.bc. CQ: 21771 CQ: 23471 CQ: 23472 CQ: 23473 CQ: 23474 Change-Id: Id3d94c00c39bbc57e3f49a61150841249dc3985c --- DEPENDENCIES | 10 ++++--- WORKSPACE | 27 ++++++++++++------- lib/BUILD | 13 ++++++--- org.eclipse.jgit.gpg.bc.test/BUILD | 1 + org.eclipse.jgit.gpg.bc/BUILD | 1 + org.eclipse.jgit.gpg.bc/pom.xml | 5 ++++ .../org.eclipse.jgit.target/jgit-4.10.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.10.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.11.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.11.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.12.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.12.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.13.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.13.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.14.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.14.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.15.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.15.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.16.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.16.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.17.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.17.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.18.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.18.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.19.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.19.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.20.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.20.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.21.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.21.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.6.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.6.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.7.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.7.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.8.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.8.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.9.target | 22 ++++++++------- .../org.eclipse.jgit.target/jgit-4.9.tpd | 2 +- .../{I20210711110031.tpd => staging.tpd} | 22 ++++++++------- pom.xml | 12 ++++++--- 40 files changed, 269 insertions(+), 206 deletions(-) rename org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/{I20210711110031.tpd => staging.tpd} (82%) diff --git a/DEPENDENCIES b/DEPENDENCIES index fe173bb5b..268495abc 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -14,7 +14,7 @@ maven/mavencentral/net.i2p.crypto/eddsa/0.3.0, CC0, approved, CQ17804 maven/mavencentral/net.sf.jopt-simple/jopt-simple/4.6, MIT, approved, CQ14441 maven/mavencentral/org.apache.ant/ant-launcher/1.10.10, Apache-2.0 AND W3C AND LicenseRef-Public-Domain, approved, CQ15560 maven/mavencentral/org.apache.ant/ant/1.10.10, Apache-2.0 AND W3C AND LicenseRef-Public-Domain, approved, CQ15560 -maven/mavencentral/org.apache.commons/commons-compress/1.19, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.apache.commons/commons-compress/1.20, Apache-2.0 AND BSD-3-Clause AND LicenseRef-Public-Domain, approved, CQ21771 maven/mavencentral/org.apache.commons/commons-math3/3.2, Apache-2.0, approved, CQ14559 maven/mavencentral/org.apache.httpcomponents/httpclient/4.5.13, Apache-2.0, approved, CQ22761 maven/mavencentral/org.apache.httpcomponents/httpcore/4.4.14, Apache-2.0, approved, CQ23528 @@ -23,9 +23,10 @@ maven/mavencentral/org.apache.sshd/sshd-core/2.7.0, Apache-2.0, approved, CQ2346 maven/mavencentral/org.apache.sshd/sshd-osgi/2.7.0, Apache-2.0 and ISC, approved, CQ23469 maven/mavencentral/org.apache.sshd/sshd-sftp/2.7.0, Apache-2.0, approved, CQ23470 maven/mavencentral/org.assertj/assertj-core/3.20.2, Apache-2.0, approved, CQ23501 -maven/mavencentral/org.bouncycastle/bcpg-jdk15on/1.65, Apache-2.0, approved, CQ21975 -maven/mavencentral/org.bouncycastle/bcpkix-jdk15on/1.65, MIT AND LicenseRef-Public-Domain, approved, CQ21976 -maven/mavencentral/org.bouncycastle/bcprov-jdk15on/1.65.01, MIT AND LicenseRef-Public-Domain, approved, CQ21977 +maven/mavencentral/org.bouncycastle/bcpg-jdk15on/1.69, MIT and Apache-2.0, approved, CQ23472 +maven/mavencentral/org.bouncycastle/bcpkix-jdk15on/1.69, MIT, approved, CQ23473 +maven/mavencentral/org.bouncycastle/bcprov-jdk15on/1.69, MIT, approved, CQ23471 +maven/mavencentral/org.bouncycastle/bcutil-jdk15on/1.69, MIT, approved, CQ23474 maven/mavencentral/org.eclipse.jetty/jetty-http/9.4.43.v20210629, EPL-2.0, approved, eclipse maven/mavencentral/org.eclipse.jetty/jetty-io/9.4.43.v20210629, EPL-2.0, approved, eclipse maven/mavencentral/org.eclipse.jetty/jetty-security/9.4.43.v20210629, EPL-2.0, approved, eclipse @@ -55,6 +56,7 @@ maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.jsch/5.13.0-SNAPSHOT, B maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ui/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.hamcrest/hamcrest-core/1.3, BSD-2-Clause, approved, CQ7063 maven/mavencentral/org.hamcrest/hamcrest/2.2, BSD-2-Clause, approved, clearlydefined maven/mavencentral/org.mockito/mockito-core/2.23.0, MIT, approved, CQ17976 maven/mavencentral/org.objenesis/objenesis/2.6, Apache-2.0, approved, CQ15478 diff --git a/WORKSPACE b/WORKSPACE index b415c7af2..1324ce46a 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -165,8 +165,8 @@ maven_jar( maven_jar( name = "commons-compress", - artifact = "org.apache.commons:commons-compress:1.19", - sha1 = "7e65777fb451ddab6a9c054beb879e521b7eab78", + artifact = "org.apache.commons:commons-compress:1.20", + sha1 = "b8df472b31e1f17c232d2ad78ceb1c84e00c641b", ) maven_jar( @@ -282,25 +282,32 @@ maven_jar( src_sha1 = "682470f5ad074e64fc0e9c93bdc2784482f79362", ) -BOUNCYCASTLE_VER = "1.65" +BOUNCYCASTLE_VER = "1.69" maven_jar( name = "bcpg", artifact = "org.bouncycastle:bcpg-jdk15on:" + BOUNCYCASTLE_VER, - sha1 = "f32fc02cc29c9fdcc35c0de4d16964f01777067c", - src_sha1 = "508476d5383c7d086b400f5e7c5a8cf4dc8ac4e2", + sha1 = "d99a08c3f651b26e8eb668e941b0bbd2c09ece08", + src_sha1 = "de1fc261b44a8eb60583413a31ffc98ce3dce38b", ) maven_jar( name = "bcprov", - artifact = "org.bouncycastle:bcprov-jdk15on:1.65.01", - sha1 = "0fbd478ea7b07acc3902b9585a37fd88393f8427", - src_sha1 = "8f54635075628c69b6c037e800dd0b03ffb8dd51", + artifact = "org.bouncycastle:bcprov-jdk15on:" + BOUNCYCASTLE_VER, + sha1 = "91e1628251cf3ca90093ce9d0fe67e5b7dab3850", + src_sha1 = "67dc6476845f6b29cb520b5df61db65ae56718e4", +) + +maven_jar( + name = "bcutil", + artifact = "org.bouncycastle:bcutil-jdk15on:" + BOUNCYCASTLE_VER, + sha1 = "c3edf93d346e97f64f041e448e7455c39c7eff64", + src_sha1 = "deeb3fbbf373e05e2a20941f9a8ce90e9aeab3d2", ) maven_jar( name = "bcpkix", artifact = "org.bouncycastle:bcpkix-jdk15on:" + BOUNCYCASTLE_VER, - sha1 = "c9507d93e4b453320b57d9ac21bdd67d65a00bbc", - src_sha1 = "16c71e83af43927d20ccad19defcbb0babcbdb26", + sha1 = "45c36fb72fafb0b688c6af795e6cc803f6f79ee5", + src_sha1 = "8bc5214401459bd91eea816b516079da38374e90", ) diff --git a/lib/BUILD b/lib/BUILD index cf08b945f..d6cdccb22 100644 --- a/lib/BUILD +++ b/lib/BUILD @@ -159,7 +159,6 @@ java_library( java_library( name = "bcpg", visibility = [ - "//org.eclipse.jgit:__pkg__", "//org.eclipse.jgit.gpg.bc:__pkg__", "//org.eclipse.jgit.gpg.bc.test:__pkg__", "//org.eclipse.jgit.test:__pkg__", @@ -170,7 +169,6 @@ java_library( java_library( name = "bcprov", visibility = [ - "//org.eclipse.jgit:__pkg__", "//org.eclipse.jgit.gpg.bc:__pkg__", "//org.eclipse.jgit.gpg.bc.test:__pkg__", "//org.eclipse.jgit.test:__pkg__", @@ -178,10 +176,19 @@ java_library( exports = ["@bcprov//jar"], ) +java_library( + name = "bcutil", + visibility = [ + "//org.eclipse.jgit.gpg.bc:__pkg__", + "//org.eclipse.jgit.gpg.bc.test:__pkg__", + "//org.eclipse.jgit.test:__pkg__", + ], + exports = ["@bcutil//jar"], +) + java_library( name = "bcpkix", visibility = [ - "//org.eclipse.jgit:__pkg__", "//org.eclipse.jgit.gpg.bc:__pkg__", "//org.eclipse.jgit.test:__pkg__", ], diff --git a/org.eclipse.jgit.gpg.bc.test/BUILD b/org.eclipse.jgit.gpg.bc.test/BUILD index 4c86effab..35b125f21 100644 --- a/org.eclipse.jgit.gpg.bc.test/BUILD +++ b/org.eclipse.jgit.gpg.bc.test/BUILD @@ -15,6 +15,7 @@ junit_tests( deps = [ "//lib:bcpg", "//lib:bcprov", + "//lib:bcutil", "//lib:junit", "//org.eclipse.jgit.gpg.bc:gpg-bc", "//org.eclipse.jgit:jgit", diff --git a/org.eclipse.jgit.gpg.bc/BUILD b/org.eclipse.jgit.gpg.bc/BUILD index 4fe1e478c..9b9ae5fef 100644 --- a/org.eclipse.jgit.gpg.bc/BUILD +++ b/org.eclipse.jgit.gpg.bc/BUILD @@ -15,6 +15,7 @@ java_library( "//lib:bcpg", "//lib:bcpkix", "//lib:bcprov", + "//lib:bcutil", "//lib:slf4j-api", "//org.eclipse.jgit:jgit", ], diff --git a/org.eclipse.jgit.gpg.bc/pom.xml b/org.eclipse.jgit.gpg.bc/pom.xml index 129fa0c07..da64bd096 100644 --- a/org.eclipse.jgit.gpg.bc/pom.xml +++ b/org.eclipse.jgit.gpg.bc/pom.xml @@ -49,6 +49,11 @@ bcprov-jdk15on + + org.bouncycastle + bcutil-jdk15on + + org.bouncycastle bcpkix-jdk15on diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target index bbcb96234..871fcafb8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd index 635ff49f1..5e3e70449 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd @@ -1,7 +1,7 @@ target "jgit-4.10" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/2018-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target index a96716489..609d9713e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd index b33916d59..2b8e32b7f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd @@ -1,7 +1,7 @@ target "jgit-4.11" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/2019-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target index 4e8fbe1d1..d6b2ce23c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd index 29e070d05..cbd57a4ba 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd @@ -1,7 +1,7 @@ target "jgit-4.12" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/2019-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target index 6325b5972..76d80bd3b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd index 18b3d5cfc..6aabfa064 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd @@ -1,7 +1,7 @@ target "jgit-4.13" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/2019-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target index 4cc1f21ae..920e79b74 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd index 2140d943c..99af1a49d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd @@ -1,7 +1,7 @@ target "jgit-4.14" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/2019-12/201912181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target index cca13da1c..2f4a5cfb8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd index 97588dba5..145b1ca2d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd @@ -1,7 +1,7 @@ target "jgit-4.15" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/2020-03/202003181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target index c36d2ef85..152dcf012 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd index 6f5cc8aa7..7f05bf7a3 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd @@ -1,7 +1,7 @@ target "jgit-4.16" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/2020-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target index b91ed7c71..ce22df4b0 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd index 911418195..ea754ba1c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd @@ -1,7 +1,7 @@ target "jgit-4.17" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/2020-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target index d93bdf70b..a8e0d259e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd index 4e6c59a01..1f7695adf 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd @@ -1,7 +1,7 @@ target "jgit-4.18" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/2020-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target index 0769e5357..a59481e92 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd index c0fa592a0..8f0d6e65c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd @@ -1,7 +1,7 @@ target "jgit-4.19-staging" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/staging/2021-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target index 11b7151db..aafe5558f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd index aba2a259a..9677a971d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd @@ -1,7 +1,7 @@ target "jgit-4.20" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/2021-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target index e23f4142c..a2242512b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd index f35d6b8f4..fae0f5158 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd @@ -1,7 +1,7 @@ target "jgit-4.21" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/staging/2021-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index 098773f53..128e9710a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd index 4f10e7ded..a31ed2cb0 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd @@ -1,7 +1,7 @@ target "jgit-4.6" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/neon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index 79f21315e..dc22aae21 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd index 0970da67c..a4029edc2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd @@ -1,7 +1,7 @@ target "jgit-4.7" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/oxygen/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target index b98319a07..dc6832dc7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd index 8d602b39f..a08097635 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd @@ -1,7 +1,7 @@ target "jgit-4.8" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/photon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target index 640ced321..17764575f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target @@ -1,7 +1,7 @@ - + @@ -45,8 +45,8 @@ - - + + @@ -61,12 +61,14 @@ - - - - - - + + + + + + + + @@ -87,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd index 2ec27c6f7..c791f6bd4 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd @@ -1,7 +1,7 @@ target "jgit-4.9" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/I20210711110031.tpd" +include "orbit/staging.tpd" location "https://download.eclipse.org/releases/2018-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210711110031.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging.tpd similarity index 82% rename from org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210711110031.tpd rename to org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging.tpd index c0413400d..60536def8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/I20210711110031.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging.tpd @@ -1,7 +1,7 @@ -target "I20210711110031" with source configurePhase +target "staging" with source configurePhase // see https://download.eclipse.org/tools/orbit/downloads/ -location "https://download.eclipse.org/tools/orbit/downloads/drops/I20210711110031/repository" { +location "https://download.eclipse.org/tools/orbit/downloads/drops/I20210713220109/repository" { com.google.gson [2.8.7.v20210624-1215,2.8.7.v20210624-1215] com.google.gson.source [2.8.7.v20210624-1215,2.8.7.v20210624-1215] com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902] @@ -22,8 +22,8 @@ location "https://download.eclipse.org/tools/orbit/downloads/drops/I202107111100 org.apache.ant.source [1.10.10.v20210426-1926,1.10.10.v20210426-1926] org.apache.commons.codec [1.14.0.v20200818-1422,1.14.0.v20200818-1422] org.apache.commons.codec.source [1.14.0.v20200818-1422,1.14.0.v20200818-1422] - org.apache.commons.compress [1.19.0.v20200106-2343,1.19.0.v20200106-2343] - org.apache.commons.compress.source [1.19.0.v20200106-2343,1.19.0.v20200106-2343] + org.apache.commons.compress [1.20.0.v20210713-1928,1.20.0.v20210713-1928] + org.apache.commons.compress.source [1.20.0.v20210713-1928,1.20.0.v20210713-1928] org.apache.commons.logging [1.2.0.v20180409-1502,1.2.0.v20180409-1502] org.apache.commons.logging.source [1.2.0.v20180409-1502,1.2.0.v20180409-1502] org.apache.httpcomponents.httpclient [4.5.13.v20210128-2225,4.5.13.v20210128-2225] @@ -38,12 +38,14 @@ location "https://download.eclipse.org/tools/orbit/downloads/drops/I202107111100 org.apache.sshd.sftp.source [2.7.0.v20210623-0618,2.7.0.v20210623-0618] org.assertj [3.20.2.v20210706-1104,3.20.2.v20210706-1104] org.assertj.source [3.20.2.v20210706-1104,3.20.2.v20210706-1104] - org.bouncycastle.bcpg [1.65.0.v20200527-1955,1.65.0.v20200527-1955] - org.bouncycastle.bcpg.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955] - org.bouncycastle.bcpkix [1.65.0.v20200527-1955,1.65.0.v20200527-1955] - org.bouncycastle.bcpkix.source [1.65.0.v20200527-1955,1.65.0.v20200527-1955] - org.bouncycastle.bcprov [1.65.1.v20200529-1514,1.65.1.v20200529-1514] - org.bouncycastle.bcprov.source [1.65.1.v20200529-1514,1.65.1.v20200529-1514] + org.bouncycastle.bcpg [1.69.0.v20210713-1924,1.69.0.v20210713-1924] + org.bouncycastle.bcpg.source [1.69.0.v20210713-1924,1.69.0.v20210713-1924] + org.bouncycastle.bcpkix [1.69.0.v20210713-1924,1.69.0.v20210713-1924] + org.bouncycastle.bcpkix.source [1.69.0.v20210713-1924,1.69.0.v20210713-1924] + org.bouncycastle.bcprov [1.69.0.v20210713-1924,1.69.0.v20210713-1924] + org.bouncycastle.bcprov.source [1.69.0.v20210713-1924,1.69.0.v20210713-1924] + org.bouncycastle.bcutil [1.69.0.v20210713-1924,1.69.0.v20210713-1924] + org.bouncycastle.bcutil.source [1.69.0.v20210713-1924,1.69.0.v20210713-1924] org.hamcrest [2.2.0.v20210711-0821,2.2.0.v20210711-0821] org.hamcrest.source [2.2.0.v20210711-0821,2.2.0.v20210711-0821] org.hamcrest.core [1.3.0.v20180420-1519,1.3.0.v20180420-1519] diff --git a/pom.xml b/pom.xml index 345b58497..7ee6fe772 100644 --- a/pom.xml +++ b/pom.xml @@ -159,7 +159,7 @@ 4.13 1C 2.33 - 1.19 + 1.20 4.3.1 3.1.0 9.4.43.v20210629 @@ -171,7 +171,7 @@ 3.3.0 1.7.0 2.8.7 - 1.65 + 1.69 4.2.3 3.1.2 3.1.1 @@ -786,7 +786,13 @@ org.bouncycastle bcprov-jdk15on - 1.65.01 + ${bouncycastle-version} + + + + org.bouncycastle + bcutil-jdk15on + ${bouncycastle-version} From 8089c8b39c3d9287294cdcdcb92bfcd2fdaa204f Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Thu, 15 Jul 2021 00:00:43 +0200 Subject: [PATCH 17/38] bazel: don't expose jsch and jzlib to org.eclipse.jgit These libraries are no longer used by org.eclipse.jgit since the code depending on them was moved to org.eclipse.jgit.ssh.jsch. Change-Id: Ic1c66e8ca06d904abf44d84154bbe9a770aa94d5 --- lib/BUILD | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/BUILD b/lib/BUILD index d6cdccb22..1901be8ec 100644 --- a/lib/BUILD +++ b/lib/BUILD @@ -148,7 +148,6 @@ java_library( java_library( name = "jsch", visibility = [ - "//org.eclipse.jgit:__pkg__", "//org.eclipse.jgit.junit.ssh:__pkg__", "//org.eclipse.jgit.ssh.jsch:__pkg__", "//org.eclipse.jgit.ssh.jsch.test:__pkg__", @@ -198,7 +197,6 @@ java_library( java_library( name = "jzlib", visibility = [ - "//org.eclipse.jgit:__pkg__", "//org.eclipse.jgit.ssh.jsch:__pkg__", "//org.eclipse.jgit.test:__pkg__", ], From ca969ecc61fc9ae9edb703b5bdaa59b8a5bf733c Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 19 Jul 2021 12:32:26 +0200 Subject: [PATCH 18/38] Relax version range for hamcrest and assertj We currently cannot use hamcrest 2.2 and assertj 3.20.2 (which requires hamcrest 2.2) in egit tests since other Eclipse dependencies (e.g. swtbot) require hamcrest 1.1. Hence relax version range for these components in jgit so that jgit tests also work when using the egit target platform. Change-Id: I521e2ec4491bd8d790609b8a66a8f14511a865a1 --- org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.http.test/META-INF/MANIFEST.MF | 4 ++-- org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF | 2 +- org.eclipse.jgit.test/META-INF/MANIFEST.MF | 6 +++--- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF index 63f0305ff..d42d34988 100644 --- a/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF @@ -13,5 +13,5 @@ Import-Package: org.apache.tools.ant, org.eclipse.jgit.junit;version="[5.13.0,5.14.0)", org.eclipse.jgit.lib;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", - org.hamcrest.core;version="[2.2.0,3.0.0)", + org.hamcrest.core;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)" diff --git a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF index e5ac4fc16..d45079616 100644 --- a/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.gpg.bc.test/META-INF/MANIFEST.MF @@ -15,7 +15,7 @@ Import-Package: org.bouncycastle.jce.provider;version="[1.65.0,2.0.0)", org.eclipse.jgit.gpg.bc.internal;version="[5.13.0,5.14.0)", org.eclipse.jgit.gpg.bc.internal.keys;version="[5.13.0,5.14.0)", org.eclipse.jgit.util.sha1;version="[5.13.0,5.14.0)", - org.hamcrest;version="[2.2.0,3.0.0)", + org.hamcrest;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", org.junit.runners;version="[4.13,5.0.0)" diff --git a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF index c012c9040..210b28f22 100644 --- a/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.http.test/META-INF/MANIFEST.MF @@ -48,8 +48,8 @@ Import-Package: javax.servlet;version="[2.5.0,3.2.0)", org.eclipse.jgit.transport.http.apache;version="[5.13.0,5.14.0)", org.eclipse.jgit.transport.resolver;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", - org.hamcrest;version="[2.2.0,3.0.0)", - org.hamcrest.core;version="[2.2.0,3.0.0)", + org.hamcrest;version="[1.1.0,3.0.0)", + org.hamcrest.core;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.rules;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF index 3b208aafe..b10bf8c26 100644 --- a/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF @@ -46,7 +46,7 @@ Import-Package: javax.servlet;version="[3.1.0,4.0.0)", org.eclipse.jgit.treewalk;version="[5.13.0,5.14.0)", org.eclipse.jgit.treewalk.filter;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", - org.hamcrest.core;version="[2.2.0,3.0.0)", + org.hamcrest.core;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.rules;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", diff --git a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF index 5a7bbad06..cd13fe522 100644 --- a/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF @@ -19,7 +19,7 @@ Import-Package: org.eclipse.jgit.api;version="[5.13.0,5.14.0)", org.eclipse.jgit.treewalk;version="[5.13.0,5.14.0)", org.eclipse.jgit.treewalk.filter;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", - org.hamcrest.core;version="[2.2.0,3.0.0)", + org.hamcrest.core;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)", org.junit.runners;version="[4.13,5.0.0)" diff --git a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF index d5256c40c..215115e71 100644 --- a/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF @@ -30,7 +30,7 @@ Import-Package: org.apache.sshd.client.config.hosts;version="[2.7.0,2.8.0)", org.eclipse.jgit.transport;version="[5.13.0,5.14.0)", org.eclipse.jgit.transport.sshd;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", - org.hamcrest;version="[2.2.0,3.0.0)", + org.hamcrest;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)" diff --git a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF index 945ebb6a4..df6d24fb7 100644 --- a/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.ssh.jsch.test/META-INF/MANIFEST.MF @@ -14,7 +14,7 @@ Import-Package: com.jcraft.jsch;version="[0.1.54,0.2.0)", org.eclipse.jgit.lib;version="[5.13.0,5.14.0)", org.eclipse.jgit.transport;version="[5.13.0,5.14.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", - org.hamcrest;version="[2.2.0,3.0.0)", + org.hamcrest;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", org.junit.runner;version="[4.13,5.0.0)" diff --git a/org.eclipse.jgit.test/META-INF/MANIFEST.MF b/org.eclipse.jgit.test/META-INF/MANIFEST.MF index 8b50e010c..f8da0f906 100644 --- a/org.eclipse.jgit.test/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.test/META-INF/MANIFEST.MF @@ -15,7 +15,7 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", org.apache.commons.compress.compressors.bzip2;version="[1.15.0,2.0)", org.apache.commons.compress.compressors.gzip;version="[1.15.0,2.0)", org.apache.commons.compress.compressors.xz;version="[1.15.0,2.0)", - org.assertj.core.api;version="[3.20.0,4.0.0)", + org.assertj.core.api;version="[3.14.0,4.0.0)", org.eclipse.jgit.annotations;version="[5.13.0,5.14.0)", org.eclipse.jgit.api;version="[5.13.0,5.14.0)", org.eclipse.jgit.api.errors;version="[5.13.0,5.14.0)", @@ -69,8 +69,8 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)", org.eclipse.jgit.util;version="[5.13.0,5.14.0)", org.eclipse.jgit.util.io;version="[5.13.0,5.14.0)", org.eclipse.jgit.util.sha1;version="[5.13.0,5.14.0)", - org.hamcrest;version="[2.2.0,3.0.0)", - org.hamcrest.collection;version="[2.2.0,3.0.0)", + org.hamcrest;version="[1.1.0,3.0.0)", + org.hamcrest.collection;version="[1.1.0,3.0.0)", org.junit;version="[4.13,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)", org.junit.function;version="[4.13.0,5.0.0)", From e2798413f9a2a8e7a701d1f7b5e5fac7399ed696 Mon Sep 17 00:00:00 2001 From: Julian Ruppel Date: Mon, 26 Apr 2021 10:24:05 +0200 Subject: [PATCH 19/38] Support commit.template config property Adds functionality to read the git commit.template property. The template content is read either via a default encoding or, if present, via encoding specified by i18n.commitEncoding property. Bug: 446355 Change-Id: I0c45db98e324ddff26a7e0262835f259d6528a86 Signed-off-by: Julian Ruppel --- .../tst/org/eclipse/jgit/lib/ConfigTest.java | 103 ++++++++++++++ .../eclipse/jgit/internal/JGitText.properties | 1 + .../org/eclipse/jgit/internal/JGitText.java | 1 + .../org/eclipse/jgit/lib/CommitConfig.java | 126 ++++++++++++++++++ .../org/eclipse/jgit/lib/ConfigConstants.java | 14 ++ 5 files changed, 245 insertions(+) create mode 100644 org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java index 327b554b4..fe3c1db50 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java @@ -34,6 +34,7 @@ import static org.junit.Assert.fail; import java.io.File; +import java.io.FileNotFoundException; import java.io.IOException; import java.nio.file.Files; import java.text.MessageFormat; @@ -50,6 +51,7 @@ import org.eclipse.jgit.api.MergeCommand.FastForwardMode; import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.internal.JGitText; +import org.eclipse.jgit.junit.JGitTestUtil; import org.eclipse.jgit.junit.MockSystemReader; import org.eclipse.jgit.merge.MergeConfig; import org.eclipse.jgit.storage.file.FileBasedConfig; @@ -1463,6 +1465,107 @@ public void testWhitespaceContinuation() throws ConfigInvalidException { assertEquals("tr ue", parseEscapedValue("tr \\\r\n ue")); } + @Test + public void testCommitTemplateEmptyConfig() + throws ConfigInvalidException, IOException { + // no values defined nowhere + Config config = new Config(null); + assertNull(config.get(CommitConfig.KEY).getCommitTemplatePath()); + assertNull(config.get(CommitConfig.KEY).getCommitTemplateContent()); + } + + @Test + public void testCommitTemplateConfig() + throws ConfigInvalidException, IOException { + + File tempFile = tmp.newFile("testCommitTemplate-"); + String templateContent = "content of the template"; + JGitTestUtil.write(tempFile, templateContent); + String expectedTemplatePath = tempFile.getPath(); + + Config config = parse( + "[commit]\n\ttemplate = " + expectedTemplatePath + "\n"); + + String templatePath = config.get(CommitConfig.KEY) + .getCommitTemplatePath(); + String commitEncoding = config.get(CommitConfig.KEY) + .getCommitEncoding(); + assertEquals(expectedTemplatePath, templatePath); + assertEquals(templateContent, + config.get(CommitConfig.KEY).getCommitTemplateContent()); + assertNull("no commitEncoding has been set so it must be null", + commitEncoding); + } + + @Test + public void testCommitTemplateEncoding() + throws ConfigInvalidException, IOException { + Config config = new Config(null); + File tempFile = tmp.newFile("testCommitTemplate-"); + String templateContent = "content of the template"; + JGitTestUtil.write(tempFile, templateContent); + String expectedTemplatePath = tempFile.getPath(); + config = parse("[i18n]\n\tcommitEncoding = utf-8\n" + + "[commit]\n\ttemplate = " + expectedTemplatePath + "\n"); + assertEquals(templateContent, + config.get(CommitConfig.KEY).getCommitTemplateContent()); + String commitEncoding = config.get(CommitConfig.KEY) + .getCommitEncoding(); + assertEquals("commitEncoding has been set to utf-8 it must be utf-8", + "utf-8", commitEncoding); + } + + @Test + public void testCommitTemplatePathInHomeDirecory() + throws ConfigInvalidException, IOException { + Config config = new Config(null); + File tempFile = tmp.newFile("testCommitTemplate-"); + String templateContent = "content of the template"; + JGitTestUtil.write(tempFile, templateContent); + // proper evaluation of the ~/ directory + String homeDir = System.getProperty("user.home"); + File tempFileInHomeDirectory = File.createTempFile("fileInHomeFolder", + ".tmp", new File(homeDir)); + tempFileInHomeDirectory.deleteOnExit(); + JGitTestUtil.write(tempFileInHomeDirectory, templateContent); + String expectedTemplatePath = tempFileInHomeDirectory.getPath() + .replace(homeDir, "~"); + config = parse("[commit]\n\ttemplate = " + expectedTemplatePath + "\n"); + String templatePath = config.get(CommitConfig.KEY) + .getCommitTemplatePath(); + assertEquals(expectedTemplatePath, templatePath); + assertEquals(templateContent, + config.get(CommitConfig.KEY).getCommitTemplateContent()); + } + + @Test(expected = ConfigInvalidException.class) + public void testCommitTemplateWithInvalidEncoding() + throws ConfigInvalidException, IOException { + Config config = new Config(null); + File tempFile = tmp.newFile("testCommitTemplate-"); + String templateContent = "content of the template"; + JGitTestUtil.write(tempFile, templateContent); + config = parse("[i18n]\n\tcommitEncoding = invalidEcoding\n" + + "[commit]\n\ttemplate = " + tempFile.getPath() + "\n"); + config.get(CommitConfig.KEY).getCommitTemplateContent(); + } + + @Test(expected = FileNotFoundException.class) + public void testCommitTemplateWithInvalidPath() + throws ConfigInvalidException, IOException { + Config config = new Config(null); + File tempFile = tmp.newFile("testCommitTemplate-"); + String templateContent = "content of the template"; + JGitTestUtil.write(tempFile, templateContent); + // commit message encoding + String expectedTemplatePath = "nonExistingTemplate"; + config = parse("[commit]\n\ttemplate = " + expectedTemplatePath + "\n"); + String templatePath = config.get(CommitConfig.KEY) + .getCommitTemplatePath(); + assertEquals(expectedTemplatePath, templatePath); + config.get(CommitConfig.KEY).getCommitTemplateContent(); + } + private static void assertValueRoundTrip(String value) throws ConfigInvalidException { assertValueRoundTrip(value, value); diff --git a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties index 33e7452d9..3acceab09 100644 --- a/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties +++ b/org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties @@ -365,6 +365,7 @@ invalidBooleanValue=Invalid boolean value: {0}.{1}={2} invalidChannel=Invalid channel {0} invalidCommitParentNumber=Invalid commit parent number invalidDepth=Invalid depth: {0} +invalidEncoding=Invalid encoding from git config i18n.commitEncoding: {0} invalidEncryption=Invalid encryption invalidExpandWildcard=ExpandFromSource on a refspec that can have mismatched wildcards does not make sense. invalidFilter=Invalid filter: {0} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java index 8622e0a1a..76340dabb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java @@ -393,6 +393,7 @@ public static JGitText get() { /***/ public String invalidChannel; /***/ public String invalidCommitParentNumber; /***/ public String invalidDepth; + /***/ public String invalidEncoding; /***/ public String invalidEncryption; /***/ public String invalidExpandWildcard; /***/ public String invalidFilter; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java new file mode 100644 index 000000000..e4e7cd6e0 --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitConfig.java @@ -0,0 +1,126 @@ +/* + * Copyright (c) 2020 Julian Ruppel + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +package org.eclipse.jgit.lib; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.nio.charset.Charset; +import java.nio.charset.IllegalCharsetNameException; +import java.nio.charset.StandardCharsets; +import java.nio.charset.UnsupportedCharsetException; +import java.text.MessageFormat; +import org.eclipse.jgit.annotations.Nullable; +import org.eclipse.jgit.errors.ConfigInvalidException; +import org.eclipse.jgit.internal.JGitText; +import org.eclipse.jgit.lib.Config.SectionParser; +import org.eclipse.jgit.util.FS; +import org.eclipse.jgit.util.IO; +import org.eclipse.jgit.util.RawParseUtils; + +/** + * The standard "commit" configuration parameters. + * + * @since 5.13 + */ +public class CommitConfig { + /** + * Key for {@link Config#get(SectionParser)}. + */ + public static final Config.SectionParser KEY = CommitConfig::new; + + private final static Charset DEFAULT_COMMIT_MESSAGE_ENCODING = StandardCharsets.UTF_8; + + private String i18nCommitEncoding; + + private String commitTemplatePath; + + private CommitConfig(Config rc) { + commitTemplatePath = rc.getString(ConfigConstants.CONFIG_COMMIT_SECTION, + null, ConfigConstants.CONFIG_KEY_COMMIT_TEMPLATE); + i18nCommitEncoding = rc.getString(ConfigConstants.CONFIG_SECTION_I18N, + null, ConfigConstants.CONFIG_KEY_COMMIT_ENCODING); + } + + /** + * Get the path to the commit template as defined in the git + * {@code commit.template} property. + * + * @return the path to commit template or {@code null} if not present. + */ + @Nullable + public String getCommitTemplatePath() { + return commitTemplatePath; + } + + /** + * Get the encoding of the commit as defined in the git + * {@code i18n.commitEncoding} property. + * + * @return the encoding or {@code null} if not present. + */ + @Nullable + public String getCommitEncoding() { + return i18nCommitEncoding; + } + + /** + * Get the content to the commit template as defined in + * {@code commit.template}. If no {@code i18n.commitEncoding} is specified, + * UTF-8 fallback is used. + * + * @return content of the commit template or {@code null} if not present. + * @throws IOException + * if the template file can not be read + * @throws FileNotFoundException + * if the template file does not exists + * @throws ConfigInvalidException + * if a {@code commitEncoding} is specified and is invalid + */ + @Nullable + public String getCommitTemplateContent() + throws FileNotFoundException, IOException, ConfigInvalidException { + + if (commitTemplatePath == null) { + return null; + } + + File commitTemplateFile; + if (commitTemplatePath.startsWith("~/")) { //$NON-NLS-1$ + commitTemplateFile = FS.DETECTED.resolve(FS.DETECTED.userHome(), + commitTemplatePath.substring(2)); + } else { + commitTemplateFile = FS.DETECTED.resolve(null, commitTemplatePath); + } + + Charset commitMessageEncoding = getEncoding(); + return RawParseUtils.decode(commitMessageEncoding, + IO.readFully(commitTemplateFile)); + + } + + private Charset getEncoding() throws ConfigInvalidException { + Charset commitMessageEncoding = DEFAULT_COMMIT_MESSAGE_ENCODING; + + if (i18nCommitEncoding == null) { + return null; + } + + try { + commitMessageEncoding = Charset.forName(i18nCommitEncoding); + } catch (IllegalCharsetNameException | UnsupportedCharsetException e) { + throw new ConfigInvalidException(MessageFormat.format( + JGitText.get().invalidEncoding, i18nCommitEncoding), e); + } + + return commitMessageEncoding; + } +} \ No newline at end of file diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java index b6f4798dc..24eebc6a1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java @@ -124,6 +124,13 @@ public final class ConfigConstants { */ public static final String CONFIG_COMMIT_SECTION = "commit"; + /** + * The "template" key + * + * @since 5.13 + */ + public static final String CONFIG_KEY_COMMIT_TEMPLATE = "template"; + /** * The "tag" section * @@ -517,6 +524,13 @@ public final class ConfigConstants { */ public static final String CONFIG_SECTION_I18N = "i18n"; + /** + * The "commitEncoding" key + * + * @since 5.13 + */ + public static final String CONFIG_KEY_COMMIT_ENCODING = "commitEncoding"; + /** * The "logOutputEncoding" key * From cbb9188cdab672d5cc6f8632a3c64b837a29ebdd Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Wed, 21 Jul 2021 19:53:47 +0200 Subject: [PATCH 20/38] [sshd] Minor code clean-up Since upstream changed the method profile to throw Exception it's not necessary anymore to re-throw as IOException. Change-Id: I31afab4f6e1a2f0feef79e6abced20d0ca1c493b --- .../transport/sshd/JGitClientSession.java | 52 +++++++------------ 1 file changed, 19 insertions(+), 33 deletions(-) diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java index 2133a29cc..f7b37d781 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java @@ -16,7 +16,6 @@ import java.io.StreamCorruptedException; import java.net.SocketAddress; import java.nio.charset.StandardCharsets; -import java.security.GeneralSecurityException; import java.security.PublicKey; import java.util.ArrayList; import java.util.Collection; @@ -46,10 +45,10 @@ import org.apache.sshd.common.kex.KexProposalOption; import org.apache.sshd.common.kex.KeyExchangeFactory; import org.apache.sshd.common.kex.extension.KexExtensionHandler; +import org.apache.sshd.common.kex.extension.KexExtensionHandler.AvailabilityPhase; import org.apache.sshd.common.kex.extension.KexExtensions; import org.apache.sshd.common.keyprovider.KeyPairProvider; import org.apache.sshd.common.signature.BuiltinSignatures; -import org.apache.sshd.common.kex.extension.KexExtensionHandler.AvailabilityPhase; import org.apache.sshd.common.util.Readable; import org.apache.sshd.common.util.buffer.Buffer; import org.eclipse.jgit.errors.InvalidPatternException; @@ -152,23 +151,16 @@ protected IoWriteFuture sendIdentification(String ident, List extraLines) throws Exception { StatefulProxyConnector proxy = proxyHandler; if (proxy != null) { - try { - // We must not block here; the framework starts reading messages - // from the peer only once the initial sendKexInit() following - // this call to sendIdentification() has returned! - proxy.runWhenDone(() -> { - JGitClientSession.super.sendIdentification(ident, - extraLines); - return null; - }); - // Called only from the ClientSessionImpl constructor, where the - // return value is ignored. + // We must not block here; the framework starts reading messages + // from the peer only once the initial sendKexInit() following + // this call to sendIdentification() has returned! + proxy.runWhenDone(() -> { + JGitClientSession.super.sendIdentification(ident, extraLines); return null; - } catch (IOException e) { - throw e; - } catch (Exception other) { - throw new IOException(other.getLocalizedMessage(), other); - } + }); + // Called only from the ClientSessionImpl constructor, where the + // return value is ignored. + return null; } return super.sendIdentification(ident, extraLines); } @@ -177,22 +169,16 @@ protected IoWriteFuture sendIdentification(String ident, protected byte[] sendKexInit() throws Exception { StatefulProxyConnector proxy = proxyHandler; if (proxy != null) { - try { - // We must not block here; the framework starts reading messages - // from the peer only once the initial sendKexInit() has - // returned! - proxy.runWhenDone(() -> { - JGitClientSession.super.sendKexInit(); - return null; - }); - // This is called only from the ClientSessionImpl - // constructor, where the return value is ignored. + // We must not block here; the framework starts reading messages + // from the peer only once the initial sendKexInit() has + // returned! + proxy.runWhenDone(() -> { + JGitClientSession.super.sendKexInit(); return null; - } catch (IOException | GeneralSecurityException e) { - throw e; - } catch (Exception other) { - throw new IOException(other.getLocalizedMessage(), other); - } + }); + // This is called only from the ClientSessionImpl + // constructor, where the return value is ignored. + return null; } return super.sendKexInit(); } From 2d73c702d3e9128b7dc03a01fe2cf18f119d3ffe Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Sun, 25 Jul 2021 15:44:35 +0200 Subject: [PATCH 21/38] [test] Create keystore with the keytool of the running JDK Call keytool with the absolute path of "java.home". Otherwise a keytool for a different, maybe even newer Java version might be picked up, and then the keystore may not be readable by the JVM used to run the tests. Change-Id: Iea77024947a34267f008847d81312fe0abadc615 Signed-off-by: Thomas Wolf --- .../src/org/eclipse/jgit/junit/http/AppServer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java index f9f8c856b..0f052987e 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java @@ -181,9 +181,12 @@ private SslContextFactory createTestSslContextFactory(String hostName) { tmpDir.deleteOnExit(); makePrivate(tmpDir); File keyStore = new File(tmpDir, "keystore.jks"); + File keytool = new File( + new File(new File(System.getProperty("java.home")), "bin"), + "keytool"); Runtime.getRuntime().exec( new String[] { - "keytool", // + keytool.getAbsolutePath(), // "-keystore", keyStore.getAbsolutePath(), // "-storepass", keyPassword, "-alias", hostName, // From f1e67911edce630830c7941074a016d184253dab Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Mon, 26 Jul 2021 13:28:40 +0200 Subject: [PATCH 22/38] [gpg] Update to Bouncy Castle 1.69 Bump lower bound in MANIFEST.MF and adapt code. Change-Id: I3a3c7948e5fc29f5517fe84209fcea81834e8e5b --- org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF | 42 +++++++++---------- .../bc/internal/BouncyCastleGpgSigner.java | 2 +- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF index 2d306aa1e..c766fe15c 100644 --- a/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF +++ b/org.eclipse.jgit.gpg.bc/META-INF/MANIFEST.MF @@ -8,27 +8,27 @@ Bundle-Vendor: %Bundle-Vendor Bundle-Localization: plugin Bundle-Version: 5.13.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Import-Package: org.bouncycastle.asn1;version="[1.65.0,2.0.0)", - org.bouncycastle.asn1.cryptlib;version="[1.65.0,2.0.0)", - org.bouncycastle.asn1.x9;version="[1.65.0,2.0.0)", - org.bouncycastle.bcpg;version="[1.65.0,2.0.0)", - org.bouncycastle.bcpg.sig;version="[1.65.0,2.0.0)", - org.bouncycastle.crypto.ec;version="[1.65.0,2.0.0)", - org.bouncycastle.gpg;version="[1.65.0,2.0.0)", - org.bouncycastle.gpg.keybox;version="[1.65.0,2.0.0)", - org.bouncycastle.gpg.keybox.jcajce;version="[1.65.0,2.0.0)", - org.bouncycastle.jcajce.interfaces;version="[1.65.0,2.0.0)", - org.bouncycastle.jcajce.util;version="[1.65.0,2.0.0)", - org.bouncycastle.jce.provider;version="[1.65.0,2.0.0)", - org.bouncycastle.math.ec;version="[1.65.0,2.0.0)", - org.bouncycastle.math.field;version="[1.65.0,2.0.0)", - org.bouncycastle.openpgp;version="[1.65.0,2.0.0)", - org.bouncycastle.openpgp.jcajce;version="[1.65.0,2.0.0)", - org.bouncycastle.openpgp.operator;version="[1.65.0,2.0.0)", - org.bouncycastle.openpgp.operator.jcajce;version="[1.65.0,2.0.0)", - org.bouncycastle.util;version="[1.65.0,2.0.0)", - org.bouncycastle.util.encoders;version="[1.65.0,2.0.0)", - org.bouncycastle.util.io;version="[1.65.0,2.0.0)", +Import-Package: org.bouncycastle.asn1;version="[1.69.0,2.0.0)", + org.bouncycastle.asn1.cryptlib;version="[1.69.0,2.0.0)", + org.bouncycastle.asn1.x9;version="[1.69.0,2.0.0)", + org.bouncycastle.bcpg;version="[1.69.0,2.0.0)", + org.bouncycastle.bcpg.sig;version="[1.69.0,2.0.0)", + org.bouncycastle.crypto.ec;version="[1.69.0,2.0.0)", + org.bouncycastle.gpg;version="[1.69.0,2.0.0)", + org.bouncycastle.gpg.keybox;version="[1.69.0,2.0.0)", + org.bouncycastle.gpg.keybox.jcajce;version="[1.69.0,2.0.0)", + org.bouncycastle.jcajce.interfaces;version="[1.69.0,2.0.0)", + org.bouncycastle.jcajce.util;version="[1.69.0,2.0.0)", + org.bouncycastle.jce.provider;version="[1.69.0,2.0.0)", + org.bouncycastle.math.ec;version="[1.69.0,2.0.0)", + org.bouncycastle.math.field;version="[1.69.0,2.0.0)", + org.bouncycastle.openpgp;version="[1.69.0,2.0.0)", + org.bouncycastle.openpgp.jcajce;version="[1.69.0,2.0.0)", + org.bouncycastle.openpgp.operator;version="[1.69.0,2.0.0)", + org.bouncycastle.openpgp.operator.jcajce;version="[1.69.0,2.0.0)", + org.bouncycastle.util;version="[1.69.0,2.0.0)", + org.bouncycastle.util.encoders;version="[1.69.0,2.0.0)", + org.bouncycastle.util.io;version="[1.69.0,2.0.0)", org.eclipse.jgit.annotations;version="[5.13.0,5.14.0)", org.eclipse.jgit.api.errors;version="[5.13.0,5.14.0)", org.slf4j;version="[1.7.0,2.0.0)" diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java index 211bd7bd2..763b7f752 100644 --- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgSigner.java @@ -195,7 +195,7 @@ public void signObject(@NonNull ObjectBuilder object, } } if (userId != null) { - subpackets.setSignerUserID(false, userId); + subpackets.addSignerUserID(false, userId); } signatureGenerator .setHashedSubpackets(subpackets.generate()); From 6cb39d145acbd535da00993cf8c200b16653ba71 Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Sun, 25 Jul 2021 15:44:35 +0200 Subject: [PATCH 23/38] [test] Create keystore with the keytool of the running JDK Call keytool with the absolute path of "java.home". Otherwise a keytool for a different, maybe even newer Java version might be picked up, and then the keystore may not be readable by the JVM used to run the tests. (cherry picked from commit 2d73c702d3e9128b7dc03a01fe2cf18f119d3ffe) Change-Id: Iea77024947a34267f008847d81312fe0abadc615 Signed-off-by: Thomas Wolf --- .../src/org/eclipse/jgit/junit/http/AppServer.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java index 9aef086b7..ba0138b81 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java @@ -214,9 +214,12 @@ private SslContextFactory createTestSslContextFactory(String hostName) { tmpDir.deleteOnExit(); makePrivate(tmpDir); File keyStore = new File(tmpDir, "keystore.jks"); + File keytool = new File( + new File(new File(System.getProperty("java.home")), "bin"), + "keytool"); Runtime.getRuntime().exec( new String[] { - "keytool", // + keytool.getAbsolutePath(), // "-keystore", keyStore.getAbsolutePath(), // "-storepass", keyPassword, "-alias", hostName, // From 3cd7eb1b23dcf3d0477e8cd22a57f1b799a5ba5f Mon Sep 17 00:00:00 2001 From: Alina Djamankulova Date: Fri, 30 Jul 2021 13:36:15 -0700 Subject: [PATCH 24/38] DFS block cache: Refactor to enable parallel index loading With this change bitmap index creation is not blocked on index and reverse index full initialization in DfsPackFile. Now bitmap index and index could be read from storage in parallel in separate threads. Update PackBitmapIndexV1 constructor to get packIndex and reverseIndex suppliers instead of actual objects. Inner class IdxPositionBitmap was added to initialize pack objects after bitmap index is fully read from storage. Update DfsPackFile and PackBitmapIndex accordingly. Signed-off-by: Alina Djamankulova Change-Id: Iea59ab58501b2acbbf9263412982ec9c6898a7ee --- .../internal/storage/dfs/DfsPackFile.java | 48 ++++++---- .../storage/file/PackBitmapIndex.java | 47 +++++++++- .../storage/file/PackBitmapIndexV1.java | 93 ++++++++++++++----- 3 files changed, 146 insertions(+), 42 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java index 96ca690c1..81b8d6993 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java @@ -58,12 +58,8 @@ public final class DfsPackFile extends BlockBasedFile { private static final int REC_SIZE = Constants.OBJECT_ID_LENGTH + 8; private static final long REF_POSITION = 0; - /** - * Lock for initialization of {@link #index} and {@link #corruptObjects}. - *

- * This lock ensures only one thread can perform the initialization work. - */ - private final Object initLock = new Object(); + /** Lock for initialization of {@link #index} and {@link #reverseIndex}. */ + private final Object indexLock = new Object(); /** Index mapping {@link ObjectId} to position within the pack stream. */ private volatile PackIndex index; @@ -71,9 +67,15 @@ public final class DfsPackFile extends BlockBasedFile { /** Reverse version of {@link #index} mapping position to {@link ObjectId}. */ private volatile PackReverseIndex reverseIndex; + /** Lock for initialization of {@link #bitmapIndex}. */ + private final Object bitmapIndexLock = new Object(); + /** Index of compressed bitmap mapping entire object graph. */ private volatile PackBitmapIndex bitmapIndex; + /** Lock for {@link #corruptObjects}. */ + private final Object corruptObjectsLock = new Object(); + /** * Objects we have tried to read, and discovered to be corrupt. *

@@ -155,7 +157,7 @@ private PackIndex idx(DfsReader ctx) throws IOException { Repository.getGlobalListenerList() .dispatch(new BeforeDfsPackIndexLoadedEvent(this)); - synchronized (initLock) { + synchronized (indexLock) { if (index != null) { return index; } @@ -183,7 +185,17 @@ final boolean isGarbage() { return desc.getPackSource() == UNREACHABLE_GARBAGE; } - PackBitmapIndex getBitmapIndex(DfsReader ctx) throws IOException { + /** + * Get the BitmapIndex for this PackFile. + * + * @param ctx + * reader context to support reading from the backing store if + * the index is not already loaded in memory. + * @return the BitmapIndex. + * @throws java.io.IOException + * the bitmap index is not available, or is corrupt. + */ + public PackBitmapIndex getBitmapIndex(DfsReader ctx) throws IOException { if (invalid || isGarbage() || !desc.hasFileExt(BITMAP_INDEX)) { return null; } @@ -192,18 +204,16 @@ PackBitmapIndex getBitmapIndex(DfsReader ctx) throws IOException { return bitmapIndex; } - synchronized (initLock) { + synchronized (bitmapIndexLock) { if (bitmapIndex != null) { return bitmapIndex; } - PackIndex idx = idx(ctx); - PackReverseIndex revidx = getReverseIdx(ctx); DfsStreamKey bitmapKey = desc.getStreamKey(BITMAP_INDEX); DfsBlockCache.Ref idxref = cache.getOrLoadRef( bitmapKey, REF_POSITION, - () -> loadBitmapIndex(ctx, bitmapKey, idx, revidx)); + () -> loadBitmapIndex(ctx, bitmapKey)); PackBitmapIndex bmidx = idxref.get(); if (bitmapIndex == null && bmidx != null) { bitmapIndex = bmidx; @@ -217,7 +227,7 @@ PackReverseIndex getReverseIdx(DfsReader ctx) throws IOException { return reverseIndex; } - synchronized (initLock) { + synchronized (indexLock) { if (reverseIndex != null) { return reverseIndex; } @@ -981,7 +991,7 @@ boolean isCorrupt(long offset) { private void setCorrupt(long offset) { LongList list = corruptObjects; if (list == null) { - synchronized (initLock) { + synchronized (corruptObjectsLock) { list = corruptObjects; if (list == null) { list = new LongList(); @@ -1041,11 +1051,8 @@ private DfsBlockCache.Ref loadReverseIdx( revidx); } - private DfsBlockCache.Ref loadBitmapIndex( - DfsReader ctx, - DfsStreamKey bitmapKey, - PackIndex idx, - PackReverseIndex revidx) throws IOException { + private DfsBlockCache.Ref loadBitmapIndex(DfsReader ctx, + DfsStreamKey bitmapKey) throws IOException { ctx.stats.readBitmap++; long start = System.nanoTime(); try (ReadableChannel rc = ctx.db.openFile(desc, BITMAP_INDEX)) { @@ -1061,7 +1068,8 @@ private DfsBlockCache.Ref loadBitmapIndex( bs = wantSize; } in = new BufferedInputStream(in, bs); - bmidx = PackBitmapIndex.read(in, idx, revidx); + bmidx = PackBitmapIndex.read(in, () -> idx(ctx), + () -> getReverseIdx(ctx)); } finally { size = rc.position(); ctx.stats.readIdxBytes += size; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java index beb51dc2e..b7439f9c5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java @@ -97,7 +97,37 @@ public static PackBitmapIndex open( public static PackBitmapIndex read( InputStream fd, PackIndex packIndex, PackReverseIndex reverseIndex) throws IOException { - return new PackBitmapIndexV1(fd, packIndex, reverseIndex); + return new PackBitmapIndexV1(fd, () -> packIndex, () -> reverseIndex); + } + + /** + * Read an existing pack bitmap index file from a buffered stream. + *

+ * The format of the file will be automatically detected and a proper access + * implementation for that format will be constructed and returned to the + * caller. The file may or may not be held open by the returned instance. + * + * @param fd + * stream to read the bitmap index file from. The stream must be + * buffered as some small IOs are performed against the stream. + * The caller is responsible for closing the stream. + * @param packIndexSupplier + * the supplier for pack index for the corresponding pack file. + * @param reverseIndexSupplier + * the supplier for pack reverse index for the corresponding pack + * file. + * @return a copy of the index in-memory. + * @throws java.io.IOException + * the stream cannot be read. + * @throws CorruptObjectException + * the stream does not contain a valid pack bitmap index. + */ + public static PackBitmapIndex read(InputStream fd, + SupplierWithIOException packIndexSupplier, + SupplierWithIOException reverseIndexSupplier) + throws IOException { + return new PackBitmapIndexV1(fd, packIndexSupplier, + reverseIndexSupplier); } /** Footer checksum applied on the bottom of the pack file. */ @@ -161,4 +191,19 @@ public abstract EWAHCompressedBitmap ofObjectType( * @return the number of bitmaps in this bitmap index. */ public abstract int getBitmapCount(); + + /** + * Supplier that propagates IOException. + * + * @param + * the return type which is expected from {@link #get()} + */ + @FunctionalInterface + public interface SupplierWithIOException { + /** + * @return result + * @throws IOException + */ + T get() throws IOException; + } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java index b7d241f3f..c7864f4e7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java @@ -14,8 +14,11 @@ import java.io.IOException; import java.io.InputStream; import java.text.MessageFormat; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; +import org.eclipse.jgit.annotations.Nullable; import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.Constants; @@ -46,11 +49,13 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex { private final ObjectIdOwnerMap bitmaps; - PackBitmapIndexV1(final InputStream fd, PackIndex packIndex, - PackReverseIndex reverseIndex) throws IOException { + PackBitmapIndexV1(final InputStream fd, + SupplierWithIOException packIndexSupplier, + SupplierWithIOException reverseIndexSupplier) + throws IOException { + // An entry is object id, xor offset, flag byte, and a length encoded + // bitmap. The object id is an int32 of the nth position sorted by name. super(new ObjectIdOwnerMap()); - this.packIndex = packIndex; - this.reverseIndex = reverseIndex; this.bitmaps = getBitmaps(); final byte[] scratch = new byte[32]; @@ -97,10 +102,10 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex { this.blobs = readBitmap(dataInput); this.tags = readBitmap(dataInput); - // An entry is object id, xor offset, flag byte, and a length encoded - // bitmap. The object id is an int32 of the nth position sorted by name. + // Read full bitmap from storage first. + List idxPositionBitmapList = new ArrayList<>(); // The xor offset is a single byte offset back in the list of entries. - StoredBitmap[] recentBitmaps = new StoredBitmap[MAX_XOR_OFFSET]; + IdxPositionBitmap[] recentBitmaps = new IdxPositionBitmap[MAX_XOR_OFFSET]; for (int i = 0; i < (int) numEntries; i++) { IO.readFully(fd, scratch, 0, 6); int nthObjectId = NB.decodeInt32(scratch, 0); @@ -108,38 +113,58 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex { int flags = scratch[5]; EWAHCompressedBitmap bitmap = readBitmap(dataInput); - if (nthObjectId < 0) + if (nthObjectId < 0) { throw new IOException(MessageFormat.format( JGitText.get().invalidId, String.valueOf(nthObjectId))); - if (xorOffset < 0) + } + if (xorOffset < 0) { throw new IOException(MessageFormat.format( JGitText.get().invalidId, String.valueOf(xorOffset))); - if (xorOffset > MAX_XOR_OFFSET) + } + if (xorOffset > MAX_XOR_OFFSET) { throw new IOException(MessageFormat.format( JGitText.get().expectedLessThanGot, String.valueOf(MAX_XOR_OFFSET), String.valueOf(xorOffset))); - if (xorOffset > i) + } + if (xorOffset > i) { throw new IOException(MessageFormat.format( JGitText.get().expectedLessThanGot, String.valueOf(i), String.valueOf(xorOffset))); - - ObjectId objectId = packIndex.getObjectId(nthObjectId); - StoredBitmap xorBitmap = null; + } + IdxPositionBitmap xorIdxPositionBitmap = null; if (xorOffset > 0) { int index = (i - xorOffset); - xorBitmap = recentBitmaps[index % recentBitmaps.length]; - if (xorBitmap == null) + xorIdxPositionBitmap = recentBitmaps[index + % recentBitmaps.length]; + if (xorIdxPositionBitmap == null) { throw new IOException(MessageFormat.format( JGitText.get().invalidId, String.valueOf(xorOffset))); + } } - - StoredBitmap sb = new StoredBitmap( - objectId, bitmap, xorBitmap, flags); - bitmaps.add(sb); - recentBitmaps[i % recentBitmaps.length] = sb; + IdxPositionBitmap idxPositionBitmap = new IdxPositionBitmap( + nthObjectId, xorIdxPositionBitmap, bitmap, flags); + idxPositionBitmapList.add(idxPositionBitmap); + recentBitmaps[i % recentBitmaps.length] = idxPositionBitmap; } + + this.packIndex = packIndexSupplier.get(); + for (int i = 0; i < idxPositionBitmapList.size(); ++i) { + IdxPositionBitmap idxPositionBitmap = idxPositionBitmapList.get(i); + ObjectId objectId = packIndex + .getObjectId(idxPositionBitmap.nthObjectId); + StoredBitmap sb = new StoredBitmap(objectId, + idxPositionBitmap.bitmap, + idxPositionBitmap.getXorStoredBitmap(), + idxPositionBitmap.flags); + // Save the StoredBitmap for a possible future XorStoredBitmap + // reference. + idxPositionBitmap.sb = sb; + bitmaps.add(sb); + } + + this.reverseIndex = reverseIndexSupplier.get(); } /** {@inheritDoc} */ @@ -214,4 +239,30 @@ private static EWAHCompressedBitmap readBitmap(DataInput dataInput) bitmap.deserialize(dataInput); return bitmap; } + + /** + * Temporary holder of object position in pack index and other metadata for + * {@code StoredBitmap}. + */ + private static final class IdxPositionBitmap { + int nthObjectId; + IdxPositionBitmap xorIdxPositionBitmap; + EWAHCompressedBitmap bitmap; + int flags; + StoredBitmap sb; + + IdxPositionBitmap(int nthObjectId, @Nullable + IdxPositionBitmap xorIdxPositionBitmap, EWAHCompressedBitmap bitmap, + int flags) { + this.nthObjectId = nthObjectId; + this.xorIdxPositionBitmap = xorIdxPositionBitmap; + this.bitmap = bitmap; + this.flags = flags; + } + + StoredBitmap getXorStoredBitmap() { + return xorIdxPositionBitmap == null ? null + : xorIdxPositionBitmap.sb; + } + } } From 35eeab41b3eb3fcf6185dd3714c1c5205c5e15c3 Mon Sep 17 00:00:00 2001 From: kylezhao Date: Thu, 12 Aug 2021 19:37:58 +0800 Subject: [PATCH 25/38] RevWalk: getMergedInto's result is wrong on the second call Make sure the future user can reset all UNINTERESTING commmits after this operation. Signed-off-by: kylezhao Change-Id: I7549b9ff67bd31acd5dfc92331cb9a30b47b8278 --- .../revwalk/RevWalkUtilsReachableTest.java | 22 +++++++++++++++++++ .../src/org/eclipse/jgit/revwalk/RevWalk.java | 5 ++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkUtilsReachableTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkUtilsReachableTest.java index d9ed0c1c6..200cb6a4f 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkUtilsReachableTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkUtilsReachableTest.java @@ -76,6 +76,28 @@ public void withCommitLoadedByDifferentRevWalk() throws Exception { } } + @Test + public void findBranchesReachableManyTimes() throws Exception { + /* + * a b + * | | + * c d + */ + RevCommit a = commit(); + RevCommit b = commit(); + RevCommit c = commit(a); + RevCommit d = commit(b); + Ref branchA = branch("a", a); + Ref branchB = branch("b", b); + Ref branchC = branch("c", c); + Ref branchD = branch("d", d); + + assertContains(a, asList(branchA, branchC)); + assertContains(b, asList(branchB, branchD)); + assertContains(c, asList(branchC)); + assertContains(d, asList(branchD)); + } + private Ref branch(String name, RevCommit dst) throws Exception { return Git.wrap(db).branchCreate().setName(name) .setStartPoint(dst.name()).call(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java index 5d5ba12ba..d5b3643af 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java @@ -527,10 +527,12 @@ public boolean isMergedIntoAll(RevCommit commit, Collection refs) private List getMergedInto(RevCommit needle, Collection haystacks, Enum returnStrategy, ProgressMonitor monitor) throws IOException { List result = new ArrayList<>(); + List uninteresting = new ArrayList<>(); RevFilter oldRF = filter; TreeFilter oldTF = treeFilter; try { finishDelayedFreeFlags(); + reset(~freeFlags & APP_FLAGS); filter = RevFilter.ALL; treeFilter = TreeFilter.ALL; for (Ref r: haystacks) { @@ -559,13 +561,14 @@ private List getMergedInto(RevCommit needle, Collection haystacks, } if(!commitFound){ markUninteresting(c); + uninteresting.add(c); if (returnStrategy == GetMergedIntoStrategy.RETURN_ON_FIRST_NOT_FOUND) { return result; } } } } finally { - reset(~freeFlags & APP_FLAGS); + roots.addAll(uninteresting); filter = oldRF; treeFilter = oldTF; } From 5fb71fb54e5d1bc2f5164c7f1ffdfacfa6a69b62 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Fri, 13 Aug 2021 09:36:26 +0200 Subject: [PATCH 26/38] Ensure FS#searchPath only selects executable files On Posix non executable files on the path should be ignored, on Windows File#canExecute always returns true. While we are here also add missing braces. Bug: 575385 Change-Id: I80cd5057bdf9632a17f103db6f1356e975b6e150 --- org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java index 0946f645f..4a4034794 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java @@ -1267,7 +1267,8 @@ private File defaultUserHomeImpl() { /** * Searches the given path to see if it contains one of the given files. - * Returns the first it finds. Returns null if not found or if path is null. + * Returns the first it finds which is executable. Returns null if not found + * or if path is null. * * @param path * List of paths to search separated by File.pathSeparator @@ -1277,14 +1278,15 @@ private File defaultUserHomeImpl() { * @since 3.0 */ protected static File searchPath(String path, String... lookFor) { - if (path == null) + if (path == null) { return null; + } for (String p : path.split(File.pathSeparator)) { for (String command : lookFor) { final File file = new File(p, command); try { - if (file.isFile()) { + if (file.isFile() && file.canExecute()) { return file.getAbsoluteFile(); } } catch (SecurityException e) { From aad1bde5220fa3a645c77ab2ba9c81c756c6ae84 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Fri, 13 Aug 2021 09:47:34 +0200 Subject: [PATCH 27/38] FS: cleanup use of final modifier See the contributor guide [1]. [1] https://wiki.eclipse.org/EGit/Contributor_Guide#Use_of_the_.22final.22_modifier Change-Id: I4673442310a3a53d838407f7eb11964144bb04d0 --- .../src/org/eclipse/jgit/util/FS.java | 33 +++++++++---------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java index 4a4034794..31a05933c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java @@ -524,7 +524,7 @@ private static void write(Path p, String body) throws IOException { } private static String read(Path p) throws IOException { - final byte[] body = IO.readFully(p.toFile()); + byte[] body = IO.readFully(p.toFile()); return new String(body, 0, body.length, UTF_8); } @@ -766,7 +766,7 @@ private static void saveToConfig(FileStore s, } private static String getConfigKey(FileStore s) { - final String storeKey; + String storeKey; if (SystemReader.getInstance().isWindows()) { Object attribute = null; try { @@ -1164,7 +1164,7 @@ public void delete(File f) throws IOException { * platform does not require path name translation. */ public File resolve(File dir, String name) { - final File abspn = new File(name); + File abspn = new File(name); if (abspn.isAbsolute()) return abspn; return new File(dir, name); @@ -1257,7 +1257,7 @@ protected File userHomeImpl() { } private File defaultUserHomeImpl() { - final String home = AccessController.doPrivileged( + String home = AccessController.doPrivileged( (PrivilegedAction) () -> System.getProperty("user.home") //$NON-NLS-1$ ); if (home == null || home.length() == 0) @@ -1284,7 +1284,7 @@ protected static File searchPath(String path, String... lookFor) { for (String p : path.split(File.pathSeparator)) { for (String command : lookFor) { - final File file = new File(p, command); + File file = new File(p, command); try { if (file.isFile() && file.canExecute()) { return file.getAbsoluteFile(); @@ -1341,7 +1341,7 @@ protected static String readPipe(File dir, String[] command, protected static String readPipe(File dir, String[] command, String encoding, Map env) throws CommandFailedException { - final boolean debug = LOG.isDebugEnabled(); + boolean debug = LOG.isDebugEnabled(); try { if (debug) { LOG.debug("readpipe " + Arrays.asList(command) + "," //$NON-NLS-1$ //$NON-NLS-2$ @@ -1808,11 +1808,11 @@ public String relativize(String base, String other) { * @since 5.0 */ public Entry[] list(File directory, FileModeStrategy fileModeStrategy) { - final File[] all = directory.listFiles(); + File[] all = directory.listFiles(); if (all == null) { return NO_ENTRIES; } - final Entry[] result = new Entry[all.length]; + Entry[] result = new Entry[all.length]; for (int i = 0; i < result.length; i++) { result[i] = new FileEntry(all[i], this, fileModeStrategy); } @@ -1842,10 +1842,9 @@ public Entry[] list(File directory, FileModeStrategy fileModeStrategy) { * @since 4.0 */ public ProcessResult runHookIfPresent(Repository repository, - final String hookName, - String[] args) throws JGitInternalException { - return runHookIfPresent(repository, hookName, args, System.out, System.err, - null); + String hookName, String[] args) throws JGitInternalException { + return runHookIfPresent(repository, hookName, args, System.out, + System.err, null); } /** @@ -1877,9 +1876,9 @@ public ProcessResult runHookIfPresent(Repository repository, * @since 5.11 */ public ProcessResult runHookIfPresent(Repository repository, - final String hookName, - String[] args, OutputStream outRedirect, OutputStream errRedirect, - String stdinArgs) throws JGitInternalException { + String hookName, String[] args, OutputStream outRedirect, + OutputStream errRedirect, String stdinArgs) + throws JGitInternalException { return new ProcessResult(Status.NOT_SUPPORTED); } @@ -1913,7 +1912,7 @@ public ProcessResult runHookIfPresent(Repository repository, * @since 5.11 */ protected ProcessResult internalRunHookIfPresent(Repository repository, - final String hookName, String[] args, OutputStream outRedirect, + String hookName, String[] args, OutputStream outRedirect, OutputStream errRedirect, String stdinArgs) throws JGitInternalException { File hookFile = findHook(repository, hookName); @@ -2109,7 +2108,7 @@ public int runProcess(ProcessBuilder processBuilder, OutputStream outRedirect, OutputStream errRedirect, InputStream inRedirect) throws IOException, InterruptedException { - final ExecutorService executor = Executors.newFixedThreadPool(2); + ExecutorService executor = Executors.newFixedThreadPool(2); Process process = null; // We'll record the first I/O exception that occurs, but keep on trying // to dispose of our open streams and file handles From ca7a30f231201cdc5acc567f3ef08d1dd4369b44 Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Tue, 10 Aug 2021 23:26:42 +0200 Subject: [PATCH 28/38] [gpg] Better GPG home directory determination GPG can use customized directories instead of the standard ~/.gnupg or %APPDATA%\gnupg directories: * Environment variable GNUPGHOME can define the location. * On Windows, a registry key may define the location (but this is deprecated). * Portable installations may use a directory defined via a file "gpgconf.ctl". * GPG programs may take a --homedir command-line argument, which overrides anything. Implement handling of environment variable GNUPGHOME. The other ways of GPG to get its home directory are outside the reach of JGit. Provide a system property "jgit.gpg.home" that the user can set in such cases. Do tilde replacement for the system property and for GNUPGHOME. Note that on VMS, the default directory would be ~/gnupg (without dot). This is not accounted for, but a user on VMS could now use either the system property or GNUPGHOME to direct JGit to the right directory. Bug: 575327 Change-Id: Id5ea04a85d58dba0c0df7a705777630d36042467 Signed-off-by: Thomas Wolf --- .../jgit/gpg/bc/internal/BCText.properties | 2 + .../eclipse/jgit/gpg/bc/internal/BCText.java | 2 + .../internal/BouncyCastleGpgKeyLocator.java | 57 ++++++++++++++----- 3 files changed, 46 insertions(+), 15 deletions(-) diff --git a/org.eclipse.jgit.gpg.bc/resources/org/eclipse/jgit/gpg/bc/internal/BCText.properties b/org.eclipse.jgit.gpg.bc/resources/org/eclipse/jgit/gpg/bc/internal/BCText.properties index e4b1baba1..ab83298c1 100644 --- a/org.eclipse.jgit.gpg.bc/resources/org/eclipse/jgit/gpg/bc/internal/BCText.properties +++ b/org.eclipse.jgit.gpg.bc/resources/org/eclipse/jgit/gpg/bc/internal/BCText.properties @@ -13,6 +13,8 @@ gpgNoSuchAlgorithm=Cannot decrypt encrypted secret key: encryption algorithm {0} gpgNotASigningKey=Secret key ({0}) is not suitable for signing gpgKeyInfo=GPG Key (fingerprint {0}) gpgSigningCancelled=Signing was cancelled +logWarnGnuPGHome=Cannot access GPG home directory given by environment variable GNUPGHOME={} +logWarnGpgHomeProperty=Cannot access GPG home directory given by Java system property jgit.gpg.home={} nonSignatureError=Signature does not decode into a signature object secretKeyTooShort=Secret key file corrupt; only {0} bytes read sexprHexNotClosed=Hex number in s-expression not closed diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BCText.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BCText.java index aedf8a5be..68ee2fd5d 100644 --- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BCText.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BCText.java @@ -42,6 +42,8 @@ public static BCText get() { /***/ public String gpgNotASigningKey; /***/ public String gpgKeyInfo; /***/ public String gpgSigningCancelled; + /***/ public String logWarnGnuPGHome; + /***/ public String logWarnGpgHomeProperty; /***/ public String nonSignatureError; /***/ public String secretKeyTooShort; /***/ public String sexprHexNotClosed; diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java index cf4d3d234..8cd03bd36 100644 --- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java @@ -29,6 +29,8 @@ import java.text.MessageFormat; import java.util.Iterator; import java.util.Locale; +import java.util.function.Consumer; +import java.util.function.Function; import org.bouncycastle.gpg.keybox.BlobType; import org.bouncycastle.gpg.keybox.KeyBlob; @@ -98,29 +100,54 @@ private static class NoOpenPgpKeyException extends Exception { private static Path findGpgDirectory() { SystemReader system = SystemReader.getInstance(); + Function resolveTilde = s -> { + if (s.startsWith("~/") || s.startsWith("~" + File.separatorChar)) { //$NON-NLS-1$ //$NON-NLS-2$ + return new File(FS.DETECTED.userHome(), s.substring(2)) + .getAbsoluteFile().toPath(); + } + return Paths.get(s); + }; + Path path = checkDirectory(system.getProperty("jgit.gpg.home"), //$NON-NLS-1$ + resolveTilde, + s -> log.warn(BCText.get().logWarnGpgHomeProperty, s)); + if (path != null) { + return path; + } + path = checkDirectory(system.getenv("GNUPGHOME"), resolveTilde, //$NON-NLS-1$ + s -> log.warn(BCText.get().logWarnGnuPGHome, s)); + if (path != null) { + return path; + } if (system.isWindows()) { // On Windows prefer %APPDATA%\gnupg if it exists, even if Cygwin is // used. - String appData = system.getenv("APPDATA"); //$NON-NLS-1$ - if (appData != null && !appData.isEmpty()) { - try { - Path directory = Paths.get(appData).resolve("gnupg"); //$NON-NLS-1$ - if (Files.isDirectory(directory)) { - return directory; - } - } catch (SecurityException | InvalidPathException e) { - // Ignore and return the default location below. - } + path = checkDirectory(system.getenv("APPDATA"), //$NON-NLS-1$ + s -> Paths.get(s).resolve("gnupg"), null); //$NON-NLS-1$ + if (path != null) { + return path; } } // All systems, including Cygwin and even Windows if // %APPDATA%\gnupg doesn't exist: ~/.gnupg - File home = FS.DETECTED.userHome(); - if (home == null) { - // Oops. What now? - home = new File(".").getAbsoluteFile(); //$NON-NLS-1$ + return resolveTilde.apply("~/.gnupg"); //$NON-NLS-1$ + } + + private static Path checkDirectory(String dir, + Function toPath, Consumer warn) { + if (!StringUtils.isEmptyOrNull(dir)) { + try { + Path directory = toPath.apply(dir); + if (Files.isDirectory(directory)) { + return directory; + } + } catch (SecurityException | InvalidPathException e) { + // Ignore, warn, and try other known directories + } + if (warn != null) { + warn.accept(dir); + } } - return home.toPath().resolve(".gnupg"); //$NON-NLS-1$ + return null; } /** From cf9baedb5da3474b2ea56d30cf25daa81aa8f8d2 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 23 Aug 2021 10:01:14 +0200 Subject: [PATCH 29/38] Update Orbit to S20210817231813 and org.apache.ant to 1.10.11.v20210720-1445 Change-Id: Ic9c2f42628e47fffc99a07d591bc465b4e24b86e --- DEPENDENCIES | 76 +++++++++---------- .../org.eclipse.jgit.target/jgit-4.10.target | 8 +- .../org.eclipse.jgit.target/jgit-4.11.target | 8 +- .../org.eclipse.jgit.target/jgit-4.12.target | 8 +- .../org.eclipse.jgit.target/jgit-4.13.target | 8 +- .../org.eclipse.jgit.target/jgit-4.14.target | 8 +- .../org.eclipse.jgit.target/jgit-4.15.target | 8 +- .../org.eclipse.jgit.target/jgit-4.16.target | 8 +- .../org.eclipse.jgit.target/jgit-4.17.target | 8 +- .../org.eclipse.jgit.target/jgit-4.18.target | 8 +- .../org.eclipse.jgit.target/jgit-4.19.target | 8 +- .../org.eclipse.jgit.target/jgit-4.20.target | 8 +- .../org.eclipse.jgit.target/jgit-4.21.target | 8 +- .../org.eclipse.jgit.target/jgit-4.6.target | 8 +- .../org.eclipse.jgit.target/jgit-4.7.target | 8 +- .../org.eclipse.jgit.target/jgit-4.8.target | 8 +- .../org.eclipse.jgit.target/jgit-4.9.target | 8 +- .../org.eclipse.jgit.target/orbit/staging.tpd | 6 +- 18 files changed, 105 insertions(+), 105 deletions(-) diff --git a/DEPENDENCIES b/DEPENDENCIES index 268495abc..ebbe4805a 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -1,61 +1,61 @@ maven/mavencentral/args4j/args4j/2.33, MIT, approved, CQ11068 maven/mavencentral/com.google.code.gson/gson/2.8.7, Apache-2.0, approved, CQ23496 -maven/mavencentral/com.googlecode.javaewah/JavaEWAH/1.1.12, Apache-2.0, approved, CQ23497 +maven/mavencentral/com.googlecode.javaewah/JavaEWAH/1.1.12, Apache-2.0, approved, CQ11658 maven/mavencentral/com.jcraft/jsch/0.1.55, BSD-3-Clause, approved, CQ19435 maven/mavencentral/com.jcraft/jzlib/1.1.1, BSD-2-Clause, approved, CQ6218 -maven/mavencentral/commons-codec/commons-codec/1.11, Apache-2.0, approved, CQ15971 +maven/mavencentral/commons-codec/commons-codec/1.11, Apache-2.0 AND BSD-3-Clause, approved, CQ15971 maven/mavencentral/commons-logging/commons-logging/1.2, Apache-2.0, approved, CQ10162 -maven/mavencentral/javax.servlet/javax.servlet-api/3.1.0, Apache-2.0 AND (CDDL-1.1 OR GPL-2.0 WITH Classpath-exception-2.0), approved, emo_ip_team +maven/mavencentral/javax.servlet/javax.servlet-api/3.1.0, Apache-2.0 AND (CDDL-1.1 OR GPL-2.0 WITH Classpath-exception-2.0), approved, CQ7248 maven/mavencentral/junit/junit/4.13, , approved, CQ22796 maven/mavencentral/log4j/log4j/1.2.15, Apache-2.0, approved, CQ7837 maven/mavencentral/net.bytebuddy/byte-buddy-agent/1.9.0, Apache-2.0, approved, clearlydefined maven/mavencentral/net.bytebuddy/byte-buddy/1.9.0, Apache-2.0, approved, clearlydefined -maven/mavencentral/net.i2p.crypto/eddsa/0.3.0, CC0, approved, CQ17804 -maven/mavencentral/net.sf.jopt-simple/jopt-simple/4.6, MIT, approved, CQ14441 +maven/mavencentral/net.i2p.crypto/eddsa/0.3.0, CC0-1.0, approved, CQ22537 +maven/mavencentral/net.sf.jopt-simple/jopt-simple/4.6, MIT, approved, clearlydefined maven/mavencentral/org.apache.ant/ant-launcher/1.10.10, Apache-2.0 AND W3C AND LicenseRef-Public-Domain, approved, CQ15560 maven/mavencentral/org.apache.ant/ant/1.10.10, Apache-2.0 AND W3C AND LicenseRef-Public-Domain, approved, CQ15560 maven/mavencentral/org.apache.commons/commons-compress/1.20, Apache-2.0 AND BSD-3-Clause AND LicenseRef-Public-Domain, approved, CQ21771 -maven/mavencentral/org.apache.commons/commons-math3/3.2, Apache-2.0, approved, CQ14559 -maven/mavencentral/org.apache.httpcomponents/httpclient/4.5.13, Apache-2.0, approved, CQ22761 +maven/mavencentral/org.apache.commons/commons-math3/3.2, Apache-2.0, approved, clearlydefined +maven/mavencentral/org.apache.httpcomponents/httpclient/4.5.13, Apache-2.0 AND LicenseRef-Public-Domain, approved, CQ23527 maven/mavencentral/org.apache.httpcomponents/httpcore/4.4.14, Apache-2.0, approved, CQ23528 maven/mavencentral/org.apache.sshd/sshd-common/2.7.0, Apache-2.0 and ISC, approved, CQ23469 maven/mavencentral/org.apache.sshd/sshd-core/2.7.0, Apache-2.0, approved, CQ23469 maven/mavencentral/org.apache.sshd/sshd-osgi/2.7.0, Apache-2.0 and ISC, approved, CQ23469 maven/mavencentral/org.apache.sshd/sshd-sftp/2.7.0, Apache-2.0, approved, CQ23470 -maven/mavencentral/org.assertj/assertj-core/3.20.2, Apache-2.0, approved, CQ23501 +maven/mavencentral/org.assertj/assertj-core/3.20.2, Apache-2.0, approved, clearlydefined maven/mavencentral/org.bouncycastle/bcpg-jdk15on/1.69, MIT and Apache-2.0, approved, CQ23472 maven/mavencentral/org.bouncycastle/bcpkix-jdk15on/1.69, MIT, approved, CQ23473 maven/mavencentral/org.bouncycastle/bcprov-jdk15on/1.69, MIT, approved, CQ23471 maven/mavencentral/org.bouncycastle/bcutil-jdk15on/1.69, MIT, approved, CQ23474 -maven/mavencentral/org.eclipse.jetty/jetty-http/9.4.43.v20210629, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-io/9.4.43.v20210629, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-security/9.4.43.v20210629, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-server/9.4.43.v20210629, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-servlet/9.4.43.v20210629, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-util-ajax/9.4.43.v20210629, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jetty/jetty-util/9.4.43.v20210629, EPL-2.0, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.archive/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.gpg.bc/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.apache/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.server/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit.http/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit.ssh/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.server.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.server/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.pgm.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.pgm/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.apache.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.apache/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.jsch/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.test/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ui/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse -maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit/5.13.0-SNAPSHOT, BSD-3-Clause, approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-http/9.4.43.v20210629, , approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-io/9.4.43.v20210629, , approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-security/9.4.43.v20210629, , approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-server/9.4.43.v20210629, , approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-servlet/9.4.43.v20210629, , approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-util-ajax/9.4.43.v20210629, , approved, eclipse +maven/mavencentral/org.eclipse.jetty/jetty-util/9.4.43.v20210629, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant.test/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ant/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.archive/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.gpg.bc/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.apache/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.server/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.http.test/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit.http/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit.ssh/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.junit/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.server.test/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.server/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs.test/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.lfs/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.pgm.test/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.pgm/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.apache.test/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.apache/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ssh.jsch/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.test/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit.ui/5.13.0-SNAPSHOT, , approved, eclipse +maven/mavencentral/org.eclipse.jgit/org.eclipse.jgit/5.13.0-SNAPSHOT, , approved, eclipse maven/mavencentral/org.hamcrest/hamcrest-core/1.3, BSD-2-Clause, approved, CQ7063 maven/mavencentral/org.hamcrest/hamcrest/2.2, BSD-2-Clause, approved, clearlydefined maven/mavencentral/org.mockito/mockito-core/2.23.0, MIT, approved, CQ17976 @@ -64,6 +64,6 @@ maven/mavencentral/org.openjdk.jmh/jmh-core/1.32, GPL-2.0, approved, CQ23499 maven/mavencentral/org.openjdk.jmh/jmh-generator-annprocess/1.32, GPL-2.0, approved, CQ23500 maven/mavencentral/org.osgi/org.osgi.core/4.3.1, Apache-2.0, approved, CQ10111 maven/mavencentral/org.slf4j/jcl-over-slf4j/1.7.30, Apache-2.0, approved, CQ12843 -maven/mavencentral/org.slf4j/slf4j-api/1.7.30, MIT, approved, CQ23467 +maven/mavencentral/org.slf4j/slf4j-api/1.7.30, MIT, approved, CQ13368 maven/mavencentral/org.slf4j/slf4j-log4j12/1.7.30, MIT, approved, CQ7665 maven/mavencentral/org.tukaani/xz/1.9, LicenseRef-Public-Domain, approved, CQ23498 diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target index 871fcafb8..26e654908 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target index 609d9713e..5460fc9fd 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target index d6b2ce23c..a4fb72b46 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target index 76d80bd3b..fd6677c26 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target index 920e79b74..282cca8d4 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target index 2f4a5cfb8..2cf02fd20 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target index 152dcf012..26ec33f52 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target index ce22df4b0..9b929149b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target index a8e0d259e..f69a0212f 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target index a59481e92..cdf464290 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target index aafe5558f..7229c7ae0 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target index a2242512b..f5471ac87 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index 128e9710a..764c58238 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index dc22aae21..acdfb04c8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target index dc6832dc7..b5d71eb5a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target index 17764575f..481700483 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target @@ -1,7 +1,7 @@ - + @@ -41,8 +41,8 @@ - - + + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging.tpd index 60536def8..64fcacf3c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging.tpd @@ -1,7 +1,7 @@ target "staging" with source configurePhase // see https://download.eclipse.org/tools/orbit/downloads/ -location "https://download.eclipse.org/tools/orbit/downloads/drops/I20210713220109/repository" { +location "https://download.eclipse.org/tools/orbit/downloads/drops/S20210817231813/repository" { com.google.gson [2.8.7.v20210624-1215,2.8.7.v20210624-1215] com.google.gson.source [2.8.7.v20210624-1215,2.8.7.v20210624-1215] com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902] @@ -18,8 +18,8 @@ location "https://download.eclipse.org/tools/orbit/downloads/drops/I202107132201 net.bytebuddy.byte-buddy.source [1.9.0.v20181107-1410,1.9.0.v20181107-1410] net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323] net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323] - org.apache.ant [1.10.10.v20210426-1926,1.10.10.v20210426-1926] - org.apache.ant.source [1.10.10.v20210426-1926,1.10.10.v20210426-1926] + org.apache.ant [1.10.11.v20210720-1445,1.10.11.v20210720-1445] + org.apache.ant.source [1.10.11.v20210720-1445,1.10.11.v20210720-1445] org.apache.commons.codec [1.14.0.v20200818-1422,1.14.0.v20200818-1422] org.apache.commons.codec.source [1.14.0.v20200818-1422,1.14.0.v20200818-1422] org.apache.commons.compress [1.20.0.v20210713-1928,1.20.0.v20210713-1928] From 8173c167852d6dc411739f8fe365adcf8ce46c97 Mon Sep 17 00:00:00 2001 From: Alina Djamankulova Date: Tue, 17 Aug 2021 09:56:06 -0700 Subject: [PATCH 30/38] DFS block cache: add additional stats to DfsReaderIoStats New stats are populated in DfsPackFile to provide details about loading pack, bitmap and reverse indexes. Signed-off-by: Alina Djamankulova Change-Id: Ib6e8384ecc31821261e5099d0768c0b1227e8364 --- .../internal/storage/dfs/DfsPackFile.java | 37 +++++-- .../storage/dfs/DfsReaderIoStats.java | 96 +++++++++++++++++-- 2 files changed, 121 insertions(+), 12 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java index 81b8d6993..b9e40cd9f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java @@ -25,6 +25,7 @@ import java.nio.channels.Channels; import java.text.MessageFormat; import java.util.Set; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.zip.CRC32; import java.util.zip.DataFormatException; import java.util.zip.Inflater; @@ -164,10 +165,17 @@ private PackIndex idx(DfsReader ctx) throws IOException { try { DfsStreamKey idxKey = desc.getStreamKey(INDEX); + AtomicBoolean cacheHit = new AtomicBoolean(true); DfsBlockCache.Ref idxref = cache.getOrLoadRef( idxKey, REF_POSITION, - () -> loadPackIndex(ctx, idxKey)); + () -> { + cacheHit.set(false); + return loadPackIndex(ctx, idxKey); + }); + if (cacheHit.get()) { + ctx.stats.idxCacheHit++; + } PackIndex idx = idxref.get(); if (index == null && idx != null) { index = idx; @@ -210,10 +218,17 @@ public PackBitmapIndex getBitmapIndex(DfsReader ctx) throws IOException { } DfsStreamKey bitmapKey = desc.getStreamKey(BITMAP_INDEX); + AtomicBoolean cacheHit = new AtomicBoolean(true); DfsBlockCache.Ref idxref = cache.getOrLoadRef( bitmapKey, REF_POSITION, - () -> loadBitmapIndex(ctx, bitmapKey)); + () -> { + cacheHit.set(false); + return loadBitmapIndex(ctx, bitmapKey); + }); + if (cacheHit.get()) { + ctx.stats.bitmapCacheHit++; + } PackBitmapIndex bmidx = idxref.get(); if (bitmapIndex == null && bmidx != null) { bitmapIndex = bmidx; @@ -235,10 +250,17 @@ PackReverseIndex getReverseIdx(DfsReader ctx) throws IOException { PackIndex idx = idx(ctx); DfsStreamKey revKey = new DfsStreamKey.ForReverseIndex( desc.getStreamKey(INDEX)); + AtomicBoolean cacheHit = new AtomicBoolean(true); DfsBlockCache.Ref revref = cache.getOrLoadRef( revKey, REF_POSITION, - () -> loadReverseIdx(revKey, idx)); + () -> { + cacheHit.set(false); + return loadReverseIdx(ctx, revKey, idx); + }); + if (cacheHit.get()) { + ctx.stats.ridxCacheHit++; + } PackReverseIndex revidx = revref.get(); if (reverseIndex == null && revidx != null) { reverseIndex = revidx; @@ -1041,9 +1063,12 @@ private DfsBlockCache.Ref loadPackIndex( } private DfsBlockCache.Ref loadReverseIdx( - DfsStreamKey revKey, PackIndex idx) { + DfsReader ctx, DfsStreamKey revKey, PackIndex idx) { + ctx.stats.readReverseIdx++; + long start = System.nanoTime(); PackReverseIndex revidx = new PackReverseIndex(idx); reverseIndex = revidx; + ctx.stats.readReverseIdxMicros += elapsedMicros(start); return new DfsBlockCache.Ref<>( revKey, REF_POSITION, @@ -1072,8 +1097,8 @@ private DfsBlockCache.Ref loadBitmapIndex(DfsReader ctx, () -> getReverseIdx(ctx)); } finally { size = rc.position(); - ctx.stats.readIdxBytes += size; - ctx.stats.readIdxMicros += elapsedMicros(start); + ctx.stats.readBitmapIdxBytes += size; + ctx.stats.readBitmapIdxMicros += elapsedMicros(start); } bitmapIndex = bmidx; return new DfsBlockCache.Ref<>( diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java index b7a71969b..5c4742501 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReaderIoStats.java @@ -19,18 +19,39 @@ public static class Accumulator { /** Number of times the reader explicitly called scanPacks. */ long scanPacks; + /** Total number of cache hits for pack indexes. */ + long idxCacheHit; + + /** Total number of cache hits for reverse indexes. */ + long ridxCacheHit; + + /** Total number of cache hits for bitmap indexes. */ + long bitmapCacheHit; + /** Total number of complete pack indexes read into memory. */ long readIdx; /** Total number of complete bitmap indexes read into memory. */ long readBitmap; - /** Total number of bytes read from indexes. */ + /** Total number of reverse indexes added into memory. */ + long readReverseIdx; + + /** Total number of bytes read from pack indexes. */ long readIdxBytes; - /** Total microseconds spent reading pack or bitmap indexes. */ + /** Total microseconds spent reading pack indexes. */ long readIdxMicros; + /** Total microseconds spent creating reverse indexes. */ + long readReverseIdxMicros; + + /** Total number of bytes read from bitmap indexes. */ + long readBitmapIdxBytes; + + /** Total microseconds spent reading bitmap indexes. */ + long readBitmapIdxMicros; + /** Total number of block cache hits. */ long blockCacheHit; @@ -74,6 +95,33 @@ public long getScanPacks() { return stats.scanPacks; } + /** + * Get total number of pack index cache hits. + * + * @return total number of pack index cache hits. + */ + public long getPackIndexCacheHits() { + return stats.idxCacheHit; + } + + /** + * Get total number of reverse index cache hits. + * + * @return total number of reverse index cache hits. + */ + public long getReverseIndexCacheHits() { + return stats.ridxCacheHit; + } + + /** + * Get total number of bitmap index cache hits. + * + * @return total number of bitmap index cache hits. + */ + public long getBitmapIndexCacheHits() { + return stats.bitmapCacheHit; + } + /** * Get total number of complete pack indexes read into memory. * @@ -83,6 +131,15 @@ public long getReadPackIndexCount() { return stats.readIdx; } + /** + * Get total number of times the reverse index was computed. + * + * @return total number of reverse index was computed. + */ + public long getReadReverseIndexCount() { + return stats.readReverseIdx; + } + /** * Get total number of complete bitmap indexes read into memory. * @@ -93,23 +150,50 @@ public long getReadBitmapIndexCount() { } /** - * Get total number of bytes read from indexes. + * Get total number of bytes read from pack indexes. * - * @return total number of bytes read from indexes. + * @return total number of bytes read from pack indexes. */ public long getReadIndexBytes() { return stats.readIdxBytes; } /** - * Get total microseconds spent reading pack or bitmap indexes. + * Get total microseconds spent reading pack indexes. * - * @return total microseconds spent reading pack or bitmap indexes. + * @return total microseconds spent reading pack indexes. */ public long getReadIndexMicros() { return stats.readIdxMicros; } + /** + * Get total microseconds spent creating reverse indexes. + * + * @return total microseconds spent creating reverse indexes. + */ + public long getReadReverseIndexMicros() { + return stats.readReverseIdxMicros; + } + + /** + * Get total number of bytes read from bitmap indexes. + * + * @return total number of bytes read from bitmap indexes. + */ + public long getReadBitmapIndexBytes() { + return stats.readBitmapIdxBytes; + } + + /** + * Get total microseconds spent reading bitmap indexes. + * + * @return total microseconds spent reading bitmap indexes. + */ + public long getReadBitmapIndexMicros() { + return stats.readBitmapIdxMicros; + } + /** * Get total number of block cache hits. * From 1ca106f07a9e9fe81b2d852fbfaeb611ca8d8eb9 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Tue, 24 Aug 2021 10:25:29 +0200 Subject: [PATCH 31/38] Update ant to 1.10.11 also in pom.xml This was missed when the target platform was updated to use ant 1.10.11 in cf9baedb5d. Change-Id: I0d503fa4b27df73a7dad68f1b729346596d78332 --- org.eclipse.jgit.ant/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit.ant/pom.xml b/org.eclipse.jgit.ant/pom.xml index 710ad3063..718669c06 100644 --- a/org.eclipse.jgit.ant/pom.xml +++ b/org.eclipse.jgit.ant/pom.xml @@ -38,7 +38,7 @@ org.apache.ant ant - 1.10.10 + 1.10.11 From 8911bd08270750574c85b4ad6f5554fb100d6f80 Mon Sep 17 00:00:00 2001 From: Marco Miller Date: Mon, 12 Jul 2021 08:53:36 -0400 Subject: [PATCH 32/38] Update spotbugs-maven-plugin to 4.3.0 Change-Id: Iafb680923cbc6c81067773159a9a0e2fcdc60169 Signed-off-by: Marco Miller --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7ee6fe772..2b94e07d1 100644 --- a/pom.xml +++ b/pom.xml @@ -172,7 +172,7 @@ 1.7.0 2.8.7 1.69 - 4.2.3 + 4.3.0 3.1.2 3.1.1 3.0.0-M5 From c697f02e1287fb1a9d215615a89233eff35fd9a4 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Thu, 26 Aug 2021 20:42:26 +0200 Subject: [PATCH 33/38] Update orbit to R20210825222808 for 2021-09 Change-Id: I5a98f2134d19c3495d7d39cccfd7cf6f07640bd5 --- .../org.eclipse.jgit.target/jgit-4.10.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.10.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.11.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.11.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.12.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.12.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.13.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.13.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.14.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.14.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.15.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.15.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.16.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.16.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.17.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.17.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.18.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.18.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.19.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.19.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.20.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.20.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.21.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.21.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.6.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.6.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.7.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.7.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.8.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.8.tpd | 2 +- .../org.eclipse.jgit.target/jgit-4.9.target | 4 ++-- .../org.eclipse.jgit.target/jgit-4.9.tpd | 2 +- .../orbit/{staging.tpd => R20210825222808-2021-09.tpd} | 4 ++-- 33 files changed, 50 insertions(+), 50 deletions(-) rename org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/{staging.tpd => R20210825222808-2021-09.tpd} (98%) diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target index 26e654908..f48b93924 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd index 5e3e70449..9eaf6871b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd @@ -1,7 +1,7 @@ target "jgit-4.10" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/2018-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target index 5460fc9fd..55454ccca 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd index 2b8e32b7f..d47128818 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd @@ -1,7 +1,7 @@ target "jgit-4.11" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/2019-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target index a4fb72b46..bf2623bc1 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd index cbd57a4ba..9fbe57822 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd @@ -1,7 +1,7 @@ target "jgit-4.12" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/2019-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target index fd6677c26..2aef11fa9 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd index 6aabfa064..e081cbbe5 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd @@ -1,7 +1,7 @@ target "jgit-4.13" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/2019-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target index 282cca8d4..6db7e9da2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd index 99af1a49d..5816f23bc 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14.tpd @@ -1,7 +1,7 @@ target "jgit-4.14" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/2019-12/201912181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target index 2cf02fd20..fa0bfadca 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd index 145b1ca2d..b7f032a4e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.15.tpd @@ -1,7 +1,7 @@ target "jgit-4.15" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/2020-03/202003181000/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target index 26ec33f52..86418cfc7 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd index 7f05bf7a3..c05f65f6b 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.16.tpd @@ -1,7 +1,7 @@ target "jgit-4.16" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/2020-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target index 9b929149b..1258ce715 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd index ea754ba1c..bab33ba2e 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.17.tpd @@ -1,7 +1,7 @@ target "jgit-4.17" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/2020-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target index f69a0212f..75dbb54b2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd index 1f7695adf..095ea81aa 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.18.tpd @@ -1,7 +1,7 @@ target "jgit-4.18" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/2020-12/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target index cdf464290..93d4a3a60 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd index 8f0d6e65c..52e457076 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.19.tpd @@ -1,7 +1,7 @@ target "jgit-4.19-staging" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/staging/2021-03/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target index 7229c7ae0..ee4f2a0e2 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd index 9677a971d..d2cf94f2d 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.20.tpd @@ -1,7 +1,7 @@ target "jgit-4.20" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/2021-06/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target index f5471ac87..e27f6c770 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd index fae0f5158..9d324692c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.21.tpd @@ -1,7 +1,7 @@ target "jgit-4.21" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/staging/2021-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target index 764c58238..b81609270 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd index a31ed2cb0..6e706bbdc 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd @@ -1,7 +1,7 @@ target "jgit-4.6" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/neon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target index acdfb04c8..4e3a4bce8 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd index a4029edc2..d67522175 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd @@ -1,7 +1,7 @@ target "jgit-4.7" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/oxygen/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target index b5d71eb5a..3d4683b48 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd index a08097635..d5f8b385a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd @@ -1,7 +1,7 @@ target "jgit-4.8" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/photon/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target index 481700483..de289b68c 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target @@ -1,7 +1,7 @@ - + @@ -89,7 +89,7 @@ - + diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd index c791f6bd4..b6a4d6abb 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd @@ -1,7 +1,7 @@ target "jgit-4.9" with source configurePhase include "projects/jetty-9.4.x.tpd" -include "orbit/staging.tpd" +include "orbit/R20210825222808-2021-09.tpd" location "https://download.eclipse.org/releases/2018-09/" { org.eclipse.osgi lazy diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210825222808-2021-09.tpd similarity index 98% rename from org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging.tpd rename to org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210825222808-2021-09.tpd index 64fcacf3c..059a5844a 100644 --- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging.tpd +++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/R20210825222808-2021-09.tpd @@ -1,7 +1,7 @@ -target "staging" with source configurePhase +target "R20210825222808-2021-09" with source configurePhase // see https://download.eclipse.org/tools/orbit/downloads/ -location "https://download.eclipse.org/tools/orbit/downloads/drops/S20210817231813/repository" { +location "https://download.eclipse.org/tools/orbit/downloads/drops/R20210825222808/repository" { com.google.gson [2.8.7.v20210624-1215,2.8.7.v20210624-1215] com.google.gson.source [2.8.7.v20210624-1215,2.8.7.v20210624-1215] com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902] From 6817b7e3b4ea55f896aeb07126cffea81abf901f Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Thu, 12 Aug 2021 09:28:04 +0200 Subject: [PATCH 34/38] Ignore IllegalStateException if JVM is already shutting down Trying to register/unregister a shutdown hook when the JVM is already in shutdown throws an IllegalStateException. Ignore this exception since we can't do anything about it. Bug: 575367 Change-Id: Ic967c16c7f566c84778795315ab369e76668b364 --- .../src/org/eclipse/jgit/pgm/TextBuiltin.java | 8 ++++++-- .../src/org/eclipse/jgit/api/CloneCommand.java | 12 ++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java index f70e72d43..600200d71 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java @@ -219,8 +219,12 @@ public final void execute(String[] args) throws Exception { case APACHE: { SshdSessionFactory factory = new SshdSessionFactory( new JGitKeyCache(), new DefaultProxyDataFactory()); - Runtime.getRuntime() - .addShutdownHook(new Thread(factory::close)); + try { + Runtime.getRuntime() + .addShutdownHook(new Thread(factory::close)); + } catch (IllegalStateException e) { + // ignore - the VM is already shutting down + } SshSessionFactory.setInstance(factory); break; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java index cf7bc1f26..3aa711455 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java @@ -173,7 +173,11 @@ public Git call() throws GitAPIException, InvalidRemoteException, Repository repository = init(); FetchResult fetchResult = null; Thread cleanupHook = new Thread(() -> cleanup()); - Runtime.getRuntime().addShutdownHook(cleanupHook); + try { + Runtime.getRuntime().addShutdownHook(cleanupHook); + } catch (IllegalStateException e) { + // ignore - the VM is already shutting down + } try { fetchResult = fetch(repository, u); } catch (IOException ioe) { @@ -197,7 +201,11 @@ public Git call() throws GitAPIException, InvalidRemoteException, cleanup(); throw e; } finally { - Runtime.getRuntime().removeShutdownHook(cleanupHook); + try { + Runtime.getRuntime().removeShutdownHook(cleanupHook); + } catch (IllegalStateException e) { + // ignore - the VM is already shutting down + } } if (!noCheckout) { try { From 5b8e387c6736ea4d3b70f4bd71173c3aa0048df6 Mon Sep 17 00:00:00 2001 From: Bruno Albuquerque Date: Fri, 16 Jul 2021 11:44:46 -0700 Subject: [PATCH 35/38] transport: add object-info capability Sometimes it is useful to obtain metadata associated with an object without the need to first download it locally. This is specially useful when using partial clones. This change implements the object-info capability that allows clients to query the remote server for object metadata (currently only size). This is a backport of the same capability that was recently added to the Git project a2ba162cda (object-info: support for retrieving object info, 2021-04-20). Signed-off-by: Bruno Albuquerque Change-Id: I4dc9828e1c247f08b0976b8810be92d124366165 --- .../jgit/transport/UploadPackTest.java | 47 +++++++++++++ .../jgit/transport/GitProtocolConstants.java | 7 ++ .../jgit/transport/ObjectInfoRequest.java | 69 +++++++++++++++++++ .../jgit/transport/ProtocolV2Hook.java | 12 ++++ .../jgit/transport/ProtocolV2HookChain.java | 8 +++ .../jgit/transport/ProtocolV2Parser.java | 35 ++++++++++ .../jgit/transport/TransferConfig.java | 11 +++ .../eclipse/jgit/transport/UploadPack.java | 31 +++++++++ 8 files changed, 220 insertions(+) create mode 100644 org.eclipse.jgit/src/org/eclipse/jgit/transport/ObjectInfoRequest.java diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java index b0b5f68ef..f4bbb4c9f 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java @@ -460,6 +460,8 @@ private static class TestV2Hook implements ProtocolV2Hook { private FetchV2Request fetchRequest; + private ObjectInfoRequest objectInfoRequest; + @Override public void onCapabilities(CapabilitiesV2Request req) { capabilitiesRequest = req; @@ -474,6 +476,11 @@ public void onLsRefs(LsRefsV2Request req) { public void onFetch(FetchV2Request req) { fetchRequest = req; } + + @Override + public void onObjectInfo(ObjectInfoRequest req) { + objectInfoRequest = req; + } } @Test @@ -2641,4 +2648,44 @@ public RefDatabase getRefDatabase() { return refdb; } } + + @Test + public void testObjectInfo() throws Exception { + server.getConfig().setBoolean("uploadpack", null, "advertiseobjectinfo", + true); + + RevBlob blob1 = remote.blob("foobar"); + RevBlob blob2 = remote.blob("fooba"); + RevTree tree = remote.tree(remote.file("1", blob1), + remote.file("2", blob2)); + RevCommit commit = remote.commit(tree); + remote.update("master", commit); + + TestV2Hook hook = new TestV2Hook(); + ByteArrayInputStream recvStream = uploadPackV2((UploadPack up) -> { + up.setProtocolV2Hook(hook); + }, "command=object-info\n", "size", + "oid " + ObjectId.toString(blob1.getId()), + "oid " + ObjectId.toString(blob2.getId()), PacketLineIn.end()); + PacketLineIn pckIn = new PacketLineIn(recvStream); + + assertThat(hook.objectInfoRequest, notNullValue()); + assertThat(pckIn.readString(), is("size")); + assertThat(pckIn.readString(), + is(ObjectId.toString(blob1.getId()) + " 6")); + assertThat(pckIn.readString(), + is(ObjectId.toString(blob2.getId()) + " 5")); + assertTrue(PacketLineIn.isEnd(pckIn.readString())); + } + + @Test + public void testObjectInfo_invalidOid() throws Exception { + server.getConfig().setBoolean("uploadpack", null, "advertiseobjectinfo", + true); + + assertThrows(UploadPackInternalServerErrorException.class, + () -> uploadPackV2("command=object-info\n", "size", + "oid invalid", + PacketLineIn.end())); + } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/GitProtocolConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/GitProtocolConstants.java index c5e52bef9..aaa9308ac 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/GitProtocolConstants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/GitProtocolConstants.java @@ -254,6 +254,13 @@ public final class GitProtocolConstants { */ public static final String COMMAND_FETCH = "fetch"; //$NON-NLS-1$ + /** + * The server supports the object-info capability. + * + * @since 5.13 + */ + public static final String COMMAND_OBJECT_INFO = "object-info"; //$NON-NLS-1$ + /** * HTTP header to set by clients to request a specific git protocol version * in the HTTP transport. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ObjectInfoRequest.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ObjectInfoRequest.java new file mode 100644 index 000000000..86a271667 --- /dev/null +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ObjectInfoRequest.java @@ -0,0 +1,69 @@ +/* + * Copyright (C) 2021, Google LLC. and others + * + * This program and the accompanying materials are made available under the + * terms of the Eclipse Distribution License v. 1.0 which is available at + * https://www.eclipse.org/org/documents/edl-v10.php. + * + * SPDX-License-Identifier: BSD-3-Clause + */ +package org.eclipse.jgit.transport; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.jgit.lib.ObjectId; + +/** + * object-info request. + * + *

+ * This is the parsed request for an object-info call, used as input to + * {@link ProtocolV2Hook}. + * + * @see object-info + * documentation + * + * @since 5.13 + */ +public final class ObjectInfoRequest { + private final List objectIDs; + + private ObjectInfoRequest(List objectIDs) { + this.objectIDs = objectIDs; + } + + /** @return object IDs that the client requested. */ + public List getObjectIDs() { + return this.objectIDs; + } + + /** @return A builder of {@link ObjectInfoRequest}. */ + public static Builder builder() { + return new Builder(); + } + + /** A builder for {@link ObjectInfoRequest}. */ + public static final class Builder { + private List objectIDs = Collections.emptyList(); + + private Builder() { + } + + /** + * @param value + * @return the Builder + */ + public Builder setObjectIDs(List value) { + objectIDs = value; + return this; + } + + /** @return ObjectInfoRequest */ + public ObjectInfoRequest build() { + return new ObjectInfoRequest( + Collections.unmodifiableList(objectIDs)); + } + } +} diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Hook.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Hook.java index bfa749066..d7626df3f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Hook.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Hook.java @@ -55,4 +55,16 @@ default void onFetch(FetchV2Request req) throws ServiceMayNotContinueException { // Do nothing by default } + + /** + * @param req + * the object-info request + * @throws ServiceMayNotContinueException + * abort; the message will be sent to the user + * @since 5.13 + */ + default void onObjectInfo(ObjectInfoRequest req) + throws ServiceMayNotContinueException { + // Do nothing by default + } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2HookChain.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2HookChain.java index 4cf8db6f5..7b3a4cea0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2HookChain.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2HookChain.java @@ -71,6 +71,14 @@ public void onFetch(FetchV2Request req) } } + @Override + public void onObjectInfo(ObjectInfoRequest req) + throws ServiceMayNotContinueException { + for (ProtocolV2Hook hook : hooks) { + hook.onObjectInfo(req); + } + } + private ProtocolV2HookChain(List hooks) { this.hooks = Collections.unmodifiableList(hooks); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java index 92f0133f5..6cec4b9a3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Parser.java @@ -28,6 +28,7 @@ import java.util.List; import java.util.function.Consumer; +import org.eclipse.jgit.errors.InvalidObjectIdException; import org.eclipse.jgit.errors.PackProtocolException; import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.lib.ObjectId; @@ -248,4 +249,38 @@ LsRefsV2Request parseLsRefsRequest(PacketLineIn pckIn) return builder.setRefPrefixes(prefixes).build(); } + ObjectInfoRequest parseObjectInfoRequest(PacketLineIn pckIn) + throws PackProtocolException, IOException { + ObjectInfoRequest.Builder builder = ObjectInfoRequest.builder(); + List objectIDs = new ArrayList<>(); + + String line = pckIn.readString(); + + if (PacketLineIn.isEnd(line)) { + return builder.build(); + } + + if (!line.equals("size")) { //$NON-NLS-1$ + throw new PackProtocolException(MessageFormat + .format(JGitText.get().unexpectedPacketLine, line)); + } + + for (String line2 : pckIn.readStrings()) { + if (!line2.startsWith("oid ")) { //$NON-NLS-1$ + throw new PackProtocolException(MessageFormat + .format(JGitText.get().unexpectedPacketLine, line2)); + } + + String oidStr = line2.substring("oid ".length()); //$NON-NLS-1$ + + try { + objectIDs.add(ObjectId.fromString(oidStr)); + } catch (InvalidObjectIdException e) { + throw new PackProtocolException(MessageFormat + .format(JGitText.get().invalidObject, oidStr), e); + } + } + + return builder.setObjectIDs(objectIDs).build(); + } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java index da97f1e58..02be43488 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java @@ -123,6 +123,7 @@ static ProtocolVersion parse(@Nullable String name) { private final boolean advertiseSidebandAll; private final boolean advertiseWaitForDone; + private final boolean advertiseObjectInfo; final @Nullable ProtocolVersion protocolVersion; final String[] hideRefs; @@ -211,6 +212,8 @@ public TransferConfig(Config rc) { "advertisesidebandall", false); advertiseWaitForDone = rc.getBoolean("uploadpack", "advertisewaitfordone", false); + advertiseObjectInfo = rc.getBoolean("uploadpack", + "advertiseobjectinfo", false); } /** @@ -317,6 +320,14 @@ public boolean isAdvertiseWaitForDone() { return advertiseWaitForDone; } + /** + * @return true to advertise object-info to all clients + * @since 5.13 + */ + public boolean isAdvertiseObjectInfo() { + return advertiseObjectInfo; + } + /** * Get {@link org.eclipse.jgit.transport.RefFilter} respecting configured * hidden refs. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java index 37a1c1e58..07b348d0e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java @@ -17,6 +17,7 @@ import static org.eclipse.jgit.transport.GitProtocolConstants.CAPABILITY_SERVER_OPTION; import static org.eclipse.jgit.transport.GitProtocolConstants.COMMAND_FETCH; import static org.eclipse.jgit.transport.GitProtocolConstants.COMMAND_LS_REFS; +import static org.eclipse.jgit.transport.GitProtocolConstants.COMMAND_OBJECT_INFO; import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_AGENT; import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_ALLOW_REACHABLE_SHA1_IN_WANT; import static org.eclipse.jgit.transport.GitProtocolConstants.OPTION_ALLOW_TIP_SHA1_IN_WANT; @@ -1269,6 +1270,32 @@ private void fetchV2(PacketLineOut pckOut) throws IOException { } } + private void objectInfo(PacketLineOut pckOut) throws IOException { + ProtocolV2Parser parser = new ProtocolV2Parser(transferConfig); + ObjectInfoRequest req = parser.parseObjectInfoRequest(pckIn); + + protocolV2Hook.onObjectInfo(req); + + ObjectReader or = getRepository().newObjectReader(); + + // Size is the only attribute currently supported. + pckOut.writeString("size"); //$NON-NLS-1$ + + for (ObjectId oid : req.getObjectIDs()) { + long size; + try { + size = or.getObjectSize(oid, ObjectReader.OBJ_ANY); + } catch (MissingObjectException e) { + throw new PackProtocolException(MessageFormat + .format(JGitText.get().missingObject, oid.name()), e); + } + + pckOut.writeString(oid.getName() + " " + size); //$NON-NLS-1$ + } + + pckOut.end(); + } + /* * Returns true if this is the last command and we should tear down the * connection. @@ -1295,6 +1322,10 @@ private boolean serveOneCommandV2(PacketLineOut pckOut) throws IOException { fetchV2(pckOut); return false; } + if (command.equals("command=" + COMMAND_OBJECT_INFO)) { //$NON-NLS-1$ + objectInfo(pckOut); + return false; + } throw new PackProtocolException(MessageFormat .format(JGitText.get().unknownTransportCommand, command)); } From 525127ebb446eec5d200e3f5d5c4f2f4e0cb01c3 Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Wed, 1 Sep 2021 14:50:48 +0200 Subject: [PATCH 36/38] Silence API error for new interface method ProtocolV2Hook#onObjectInfo Change-Id: Ie4d09db2b89f26bc6ceb4e84f10c7e66b0ff684f --- org.eclipse.jgit/.settings/.api_filters | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/org.eclipse.jgit/.settings/.api_filters b/org.eclipse.jgit/.settings/.api_filters index 14c505de0..83a83817f 100644 --- a/org.eclipse.jgit/.settings/.api_filters +++ b/org.eclipse.jgit/.settings/.api_filters @@ -8,6 +8,14 @@ + + + + + + + + From 84707715108a65a366ef35f2ae04aabecd0b35f6 Mon Sep 17 00:00:00 2001 From: Antonio Barone Date: Wed, 1 Sep 2021 12:04:07 +0200 Subject: [PATCH 37/38] GitServlet: allow to override default error handlers GitServlet delegates repository access over HTTP to the GitFilter servlet. GitServlet, in turn, can be extended by jgit consumers to provide custom logic when handling such operations. This is the case, for example, with Gerrit Code Review, which provides custom behavior with a GitOverHttpServlet [1]. Among possible customizations, the ability of specifying a custom error handler for UploadPack and ReceivePack was already introduced in GitFilter by Idd3b87d6b and I9c708aa5a2, respectively. However the `setUploadPackErrorHandler` and `setReceivePackErrorHandler` methods were never added to the GitServlet. Expose the `setUploadPackErrorHandler` and `setReceivePackErrorHandler` methods to the GitServlet, so that consumers of the jgit library might specify custom error handlers. [1] https://gerrit.googlesource.com/gerrit/+/refs/heads/stable-3.2/java/com/google/gerrit/httpd/GitOverHttpServlet.java#95 Change-Id: I712d485ff68b662b48c71ef75650c5a155950d23 --- .../eclipse/jgit/http/server/GitServlet.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java index 6c5280e50..8e49b37b3 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java @@ -112,6 +112,17 @@ public void setUploadPackFactory(UploadPackFactory f) { gitFilter.setUploadPackFactory(f); } + /** + * Set a custom error handler for git-upload-pack. + * + * @param h + * A custom error handler for git-upload-pack. + * @since 5.9.1 + */ + public void setUploadPackErrorHandler(UploadPackErrorHandler h) { + gitFilter.setUploadPackErrorHandler(h); + } + /** * Add upload-pack filter * @@ -136,6 +147,17 @@ public void setReceivePackFactory(ReceivePackFactory f) { gitFilter.setReceivePackFactory(f); } + /** + * Set a custom error handler for git-receive-pack. + * + * @param h + * A custom error handler for git-receive-pack. + * @since 5.9.1 + */ + public void setReceivePackErrorHandler(ReceivePackErrorHandler h) { + gitFilter.setReceivePackErrorHandler(h); + } + /** * Add receive-pack filter * From a3a8de310847963bd8fadba33de17abd974ae710 Mon Sep 17 00:00:00 2001 From: Minh Thai Date: Fri, 3 Sep 2021 13:48:57 -0700 Subject: [PATCH 38/38] Revert "DFS block cache: Refactor to enable parallel index loading" This reverts commit 3cd7eb1b23dcf3d0477e8cd22a57f1b799a5ba5f. Change-Id: I71ce68ce19503f0f9ad83069dc53eba6ab2c489b Signed-off-by: Minh Thai --- .../internal/storage/dfs/DfsPackFile.java | 48 +++++----- .../storage/file/PackBitmapIndex.java | 47 +--------- .../storage/file/PackBitmapIndexV1.java | 89 ++++--------------- 3 files changed, 40 insertions(+), 144 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java index b9e40cd9f..9be3df3b1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackFile.java @@ -59,8 +59,12 @@ public final class DfsPackFile extends BlockBasedFile { private static final int REC_SIZE = Constants.OBJECT_ID_LENGTH + 8; private static final long REF_POSITION = 0; - /** Lock for initialization of {@link #index} and {@link #reverseIndex}. */ - private final Object indexLock = new Object(); + /** + * Lock for initialization of {@link #index} and {@link #corruptObjects}. + *

+ * This lock ensures only one thread can perform the initialization work. + */ + private final Object initLock = new Object(); /** Index mapping {@link ObjectId} to position within the pack stream. */ private volatile PackIndex index; @@ -68,15 +72,9 @@ public final class DfsPackFile extends BlockBasedFile { /** Reverse version of {@link #index} mapping position to {@link ObjectId}. */ private volatile PackReverseIndex reverseIndex; - /** Lock for initialization of {@link #bitmapIndex}. */ - private final Object bitmapIndexLock = new Object(); - /** Index of compressed bitmap mapping entire object graph. */ private volatile PackBitmapIndex bitmapIndex; - /** Lock for {@link #corruptObjects}. */ - private final Object corruptObjectsLock = new Object(); - /** * Objects we have tried to read, and discovered to be corrupt. *

@@ -158,7 +156,7 @@ private PackIndex idx(DfsReader ctx) throws IOException { Repository.getGlobalListenerList() .dispatch(new BeforeDfsPackIndexLoadedEvent(this)); - synchronized (indexLock) { + synchronized (initLock) { if (index != null) { return index; } @@ -193,17 +191,7 @@ final boolean isGarbage() { return desc.getPackSource() == UNREACHABLE_GARBAGE; } - /** - * Get the BitmapIndex for this PackFile. - * - * @param ctx - * reader context to support reading from the backing store if - * the index is not already loaded in memory. - * @return the BitmapIndex. - * @throws java.io.IOException - * the bitmap index is not available, or is corrupt. - */ - public PackBitmapIndex getBitmapIndex(DfsReader ctx) throws IOException { + PackBitmapIndex getBitmapIndex(DfsReader ctx) throws IOException { if (invalid || isGarbage() || !desc.hasFileExt(BITMAP_INDEX)) { return null; } @@ -212,11 +200,13 @@ public PackBitmapIndex getBitmapIndex(DfsReader ctx) throws IOException { return bitmapIndex; } - synchronized (bitmapIndexLock) { + synchronized (initLock) { if (bitmapIndex != null) { return bitmapIndex; } + PackIndex idx = idx(ctx); + PackReverseIndex revidx = getReverseIdx(ctx); DfsStreamKey bitmapKey = desc.getStreamKey(BITMAP_INDEX); AtomicBoolean cacheHit = new AtomicBoolean(true); DfsBlockCache.Ref idxref = cache.getOrLoadRef( @@ -224,7 +214,7 @@ public PackBitmapIndex getBitmapIndex(DfsReader ctx) throws IOException { REF_POSITION, () -> { cacheHit.set(false); - return loadBitmapIndex(ctx, bitmapKey); + return loadBitmapIndex(ctx, bitmapKey, idx, revidx); }); if (cacheHit.get()) { ctx.stats.bitmapCacheHit++; @@ -242,7 +232,7 @@ PackReverseIndex getReverseIdx(DfsReader ctx) throws IOException { return reverseIndex; } - synchronized (indexLock) { + synchronized (initLock) { if (reverseIndex != null) { return reverseIndex; } @@ -1013,7 +1003,7 @@ boolean isCorrupt(long offset) { private void setCorrupt(long offset) { LongList list = corruptObjects; if (list == null) { - synchronized (corruptObjectsLock) { + synchronized (initLock) { list = corruptObjects; if (list == null) { list = new LongList(); @@ -1076,8 +1066,11 @@ private DfsBlockCache.Ref loadReverseIdx( revidx); } - private DfsBlockCache.Ref loadBitmapIndex(DfsReader ctx, - DfsStreamKey bitmapKey) throws IOException { + private DfsBlockCache.Ref loadBitmapIndex( + DfsReader ctx, + DfsStreamKey bitmapKey, + PackIndex idx, + PackReverseIndex revidx) throws IOException { ctx.stats.readBitmap++; long start = System.nanoTime(); try (ReadableChannel rc = ctx.db.openFile(desc, BITMAP_INDEX)) { @@ -1093,8 +1086,7 @@ private DfsBlockCache.Ref loadBitmapIndex(DfsReader ctx, bs = wantSize; } in = new BufferedInputStream(in, bs); - bmidx = PackBitmapIndex.read(in, () -> idx(ctx), - () -> getReverseIdx(ctx)); + bmidx = PackBitmapIndex.read(in, idx, revidx); } finally { size = rc.position(); ctx.stats.readBitmapIdxBytes += size; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java index b7439f9c5..beb51dc2e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java @@ -97,37 +97,7 @@ public static PackBitmapIndex open( public static PackBitmapIndex read( InputStream fd, PackIndex packIndex, PackReverseIndex reverseIndex) throws IOException { - return new PackBitmapIndexV1(fd, () -> packIndex, () -> reverseIndex); - } - - /** - * Read an existing pack bitmap index file from a buffered stream. - *

- * The format of the file will be automatically detected and a proper access - * implementation for that format will be constructed and returned to the - * caller. The file may or may not be held open by the returned instance. - * - * @param fd - * stream to read the bitmap index file from. The stream must be - * buffered as some small IOs are performed against the stream. - * The caller is responsible for closing the stream. - * @param packIndexSupplier - * the supplier for pack index for the corresponding pack file. - * @param reverseIndexSupplier - * the supplier for pack reverse index for the corresponding pack - * file. - * @return a copy of the index in-memory. - * @throws java.io.IOException - * the stream cannot be read. - * @throws CorruptObjectException - * the stream does not contain a valid pack bitmap index. - */ - public static PackBitmapIndex read(InputStream fd, - SupplierWithIOException packIndexSupplier, - SupplierWithIOException reverseIndexSupplier) - throws IOException { - return new PackBitmapIndexV1(fd, packIndexSupplier, - reverseIndexSupplier); + return new PackBitmapIndexV1(fd, packIndex, reverseIndex); } /** Footer checksum applied on the bottom of the pack file. */ @@ -191,19 +161,4 @@ public abstract EWAHCompressedBitmap ofObjectType( * @return the number of bitmaps in this bitmap index. */ public abstract int getBitmapCount(); - - /** - * Supplier that propagates IOException. - * - * @param - * the return type which is expected from {@link #get()} - */ - @FunctionalInterface - public interface SupplierWithIOException { - /** - * @return result - * @throws IOException - */ - T get() throws IOException; - } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java index c7864f4e7..b7d241f3f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java @@ -14,11 +14,8 @@ import java.io.IOException; import java.io.InputStream; import java.text.MessageFormat; -import java.util.ArrayList; import java.util.Arrays; -import java.util.List; -import org.eclipse.jgit.annotations.Nullable; import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.lib.AnyObjectId; import org.eclipse.jgit.lib.Constants; @@ -49,13 +46,11 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex { private final ObjectIdOwnerMap bitmaps; - PackBitmapIndexV1(final InputStream fd, - SupplierWithIOException packIndexSupplier, - SupplierWithIOException reverseIndexSupplier) - throws IOException { - // An entry is object id, xor offset, flag byte, and a length encoded - // bitmap. The object id is an int32 of the nth position sorted by name. + PackBitmapIndexV1(final InputStream fd, PackIndex packIndex, + PackReverseIndex reverseIndex) throws IOException { super(new ObjectIdOwnerMap()); + this.packIndex = packIndex; + this.reverseIndex = reverseIndex; this.bitmaps = getBitmaps(); final byte[] scratch = new byte[32]; @@ -102,10 +97,10 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex { this.blobs = readBitmap(dataInput); this.tags = readBitmap(dataInput); - // Read full bitmap from storage first. - List idxPositionBitmapList = new ArrayList<>(); + // An entry is object id, xor offset, flag byte, and a length encoded + // bitmap. The object id is an int32 of the nth position sorted by name. // The xor offset is a single byte offset back in the list of entries. - IdxPositionBitmap[] recentBitmaps = new IdxPositionBitmap[MAX_XOR_OFFSET]; + StoredBitmap[] recentBitmaps = new StoredBitmap[MAX_XOR_OFFSET]; for (int i = 0; i < (int) numEntries; i++) { IO.readFully(fd, scratch, 0, 6); int nthObjectId = NB.decodeInt32(scratch, 0); @@ -113,58 +108,38 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex { int flags = scratch[5]; EWAHCompressedBitmap bitmap = readBitmap(dataInput); - if (nthObjectId < 0) { + if (nthObjectId < 0) throw new IOException(MessageFormat.format( JGitText.get().invalidId, String.valueOf(nthObjectId))); - } - if (xorOffset < 0) { + if (xorOffset < 0) throw new IOException(MessageFormat.format( JGitText.get().invalidId, String.valueOf(xorOffset))); - } - if (xorOffset > MAX_XOR_OFFSET) { + if (xorOffset > MAX_XOR_OFFSET) throw new IOException(MessageFormat.format( JGitText.get().expectedLessThanGot, String.valueOf(MAX_XOR_OFFSET), String.valueOf(xorOffset))); - } - if (xorOffset > i) { + if (xorOffset > i) throw new IOException(MessageFormat.format( JGitText.get().expectedLessThanGot, String.valueOf(i), String.valueOf(xorOffset))); - } - IdxPositionBitmap xorIdxPositionBitmap = null; + + ObjectId objectId = packIndex.getObjectId(nthObjectId); + StoredBitmap xorBitmap = null; if (xorOffset > 0) { int index = (i - xorOffset); - xorIdxPositionBitmap = recentBitmaps[index - % recentBitmaps.length]; - if (xorIdxPositionBitmap == null) { + xorBitmap = recentBitmaps[index % recentBitmaps.length]; + if (xorBitmap == null) throw new IOException(MessageFormat.format( JGitText.get().invalidId, String.valueOf(xorOffset))); - } } - IdxPositionBitmap idxPositionBitmap = new IdxPositionBitmap( - nthObjectId, xorIdxPositionBitmap, bitmap, flags); - idxPositionBitmapList.add(idxPositionBitmap); - recentBitmaps[i % recentBitmaps.length] = idxPositionBitmap; - } - this.packIndex = packIndexSupplier.get(); - for (int i = 0; i < idxPositionBitmapList.size(); ++i) { - IdxPositionBitmap idxPositionBitmap = idxPositionBitmapList.get(i); - ObjectId objectId = packIndex - .getObjectId(idxPositionBitmap.nthObjectId); - StoredBitmap sb = new StoredBitmap(objectId, - idxPositionBitmap.bitmap, - idxPositionBitmap.getXorStoredBitmap(), - idxPositionBitmap.flags); - // Save the StoredBitmap for a possible future XorStoredBitmap - // reference. - idxPositionBitmap.sb = sb; + StoredBitmap sb = new StoredBitmap( + objectId, bitmap, xorBitmap, flags); bitmaps.add(sb); + recentBitmaps[i % recentBitmaps.length] = sb; } - - this.reverseIndex = reverseIndexSupplier.get(); } /** {@inheritDoc} */ @@ -239,30 +214,4 @@ private static EWAHCompressedBitmap readBitmap(DataInput dataInput) bitmap.deserialize(dataInput); return bitmap; } - - /** - * Temporary holder of object position in pack index and other metadata for - * {@code StoredBitmap}. - */ - private static final class IdxPositionBitmap { - int nthObjectId; - IdxPositionBitmap xorIdxPositionBitmap; - EWAHCompressedBitmap bitmap; - int flags; - StoredBitmap sb; - - IdxPositionBitmap(int nthObjectId, @Nullable - IdxPositionBitmap xorIdxPositionBitmap, EWAHCompressedBitmap bitmap, - int flags) { - this.nthObjectId = nthObjectId; - this.xorIdxPositionBitmap = xorIdxPositionBitmap; - this.bitmap = bitmap; - this.flags = flags; - } - - StoredBitmap getXorStoredBitmap() { - return xorIdxPositionBitmap == null ? null - : xorIdxPositionBitmap.sb; - } - } }