diff --git a/0001-Ensure-the-correct-classpath-is-set-for-the-jgit-com.patch b/0001-Ensure-the-correct-classpath-is-set-for-the-jgit-com.patch index 5b98a88f0ef2becc3da16534a0cb578567757f1e..bc3ea640e01987390b59de13a65fe9dd17d57544 100644 --- a/0001-Ensure-the-correct-classpath-is-set-for-the-jgit-com.patch +++ b/0001-Ensure-the-correct-classpath-is-set-for-the-jgit-com.patch @@ -1,4 +1,4 @@ -From 5f1d7c576160b1682a5787018c1aa82b8cb0e747 Mon Sep 17 00:00:00 2001 +From d5b6a00810c9282d664b8c3e34fe212ae57f0806 Mon Sep 17 00:00:00 2001 From: Mat Booth Date: Fri, 7 Dec 2018 10:04:44 +0000 Subject: [PATCH 1/2] Ensure the correct classpath is set for the jgit command @@ -9,7 +9,7 @@ Subject: [PATCH 1/2] Ensure the correct classpath is set for the jgit command 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit.pgm/jgit.sh b/org.eclipse.jgit.pgm/jgit.sh -index e263782..4086e37 100644 +index a369220..2dd26aa 100644 --- a/org.eclipse.jgit.pgm/jgit.sh +++ b/org.eclipse.jgit.pgm/jgit.sh @@ -60,7 +60,7 @@ esac @@ -22,5 +22,5 @@ index e263782..4086e37 100644 if [ -n "$JGIT_CLASSPATH" ] then -- -2.20.1 +2.26.2 diff --git a/0002-Ensure-all-packages-are-exported.patch b/0002-Ensure-all-packages-are-exported.patch deleted file mode 100644 index 7fd14162bc6ed5db153d3a55c59557a75724a7f4..0000000000000000000000000000000000000000 --- a/0002-Ensure-all-packages-are-exported.patch +++ /dev/null @@ -1,45 +0,0 @@ -From 77a7644525c260098740a6670bf389b3957b746a Mon Sep 17 00:00:00 2001 -From: Matthias Sohn -Date: Sun, 16 Jun 2019 02:30:10 +0200 -Subject: [PATCH 2/2] Ensure all packages are exported - -This wasn't the case for the bundles -- org.eclipse.jgit.ant -- org.eclipse.jgit.archive - -Change-Id: Ibefcc82174fe23a9c1afb765099957414ac3556b -Signed-off-by: Matthias Sohn --- - org.eclipse.jgit.ant/META-INF/MANIFEST.MF | 4 ++-- - org.eclipse.jgit.archive/META-INF/MANIFEST.MF | 3 ++- - 2 files changed, 4 insertions(+), 3 deletions(-) ---- - org.eclipse.jgit.ant/META-INF/MANIFEST.MF | 4 ++-- - org.eclipse.jgit.archive/META-INF/MANIFEST.MF | 3 ++- - 2 files changed, 4 insertions(+), 3 deletions(-) - -diff --git a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF -index bb61635..7b24bf6 100644 ---- a/org.eclipse.jgit.ant/META-INF/MANIFEST.MF -+++ b/org.eclipse.jgit.ant/META-INF/MANIFEST.MF -@@ -9,5 +9,5 @@ Import-Package: org.apache.tools.ant, - org.eclipse.jgit.storage.file;version="[5.4.0,5.5.0)" - Bundle-Localization: plugin - Bundle-Vendor: %Provider-Name --Export-Package: org.eclipse.jgit.ant.tasks;version="5.4.0"; -- uses:="org.apache.tools.ant.types,org.apache.tools.ant" -+Export-Package: org.eclipse.jgit.ant, -+ org.eclipse.jgit.ant.tasks;version="5.4.0";uses:="org.apache.tools.ant.types,org.apache.tools.ant" -diff --git a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF -index 1fa5e8c..0eabf1f 100644 ---- a/org.eclipse.jgit.archive/META-INF/MANIFEST.MF -+++ b/org.eclipse.jgit.archive/META-INF/MANIFEST.MF -@@ -25,4 +25,5 @@ Export-Package: org.eclipse.jgit.archive;version="5.4.0"; - uses:="org.eclipse.jgit.lib, - org.eclipse.jgit.api, - org.apache.commons.compress.archivers, -- org.osgi.framework" -+ org.osgi.framework", -+ org.eclipse.jgit.archive.internal;x-internal:=true --- -2.20.1 - diff --git a/0003-Remove-dependency-on-javax.xml.bind-package.patch b/0003-Remove-dependency-on-javax.xml.bind-package.patch deleted file mode 100644 index f9672cc3110d6ed7bb5db09047aecf00c3bacb90..0000000000000000000000000000000000000000 --- a/0003-Remove-dependency-on-javax.xml.bind-package.patch +++ /dev/null @@ -1,86 +0,0 @@ -From 0d1cc8f8d3adb99f75fce180d857077ada3a19ee Mon Sep 17 00:00:00 2001 -From: David Ostrovsky -Date: Mon, 17 Jun 2019 23:28:52 +0200 -Subject: [PATCH 3/3] Remove dependency on javax.xml.bind package - -Replace javax.xml.bind.DatatypeConverter, that is not available any -more in Java 11 and later with Hex utility from non optional Bouncy -Castle library. - -Bug: 540790 -Change-Id: I9903c00ecc1a434e9795b8ba9267f02628fdc0e9 -Signed-off-by: David Ostrovsky ---- - BUILD | 7 ------- - org.eclipse.jgit/BUILD | 4 ---- - .../src/org/eclipse/jgit/transport/WalkEncryption.java | 7 +++---- - 3 files changed, 3 insertions(+), 15 deletions(-) - -diff --git a/BUILD b/BUILD -index 5fea669..be6dd76 100644 ---- a/BUILD -+++ b/BUILD -@@ -1,12 +1,5 @@ - package(default_visibility = ["//visibility:public"]) - --config_setting( -- name = "jdk9", -- values = { -- "java_toolchain": "@bazel_tools//tools/jdk:toolchain_jdk9", -- }, --) -- - genrule( - name = "all", - testonly = 1, -diff --git a/org.eclipse.jgit/BUILD b/org.eclipse.jgit/BUILD -index b67bfac..814ecec 100644 ---- a/org.eclipse.jgit/BUILD -+++ b/org.eclipse.jgit/BUILD -@@ -14,10 +14,6 @@ RESOURCES = glob(["resources/**"]) - java_library( - name = "jgit", - srcs = SRCS, -- javacopts = select({ -- "//:jdk9": ["--add-modules=java.xml.bind"], -- "//conditions:default": [], -- }), - resource_strip_prefix = "org.eclipse.jgit/resources", - resources = RESOURCES, - deps = [ -diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java -index b4248ee..7a973af 100644 ---- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java -+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java -@@ -66,8 +66,8 @@ - import javax.crypto.spec.PBEKeySpec; - import javax.crypto.spec.PBEParameterSpec; - import javax.crypto.spec.SecretKeySpec; --import javax.xml.bind.DatatypeConverter; - -+import org.bouncycastle.util.encoders.Hex; - import org.eclipse.jgit.internal.JGitText; - import org.eclipse.jgit.util.Base64; - -@@ -301,7 +301,7 @@ InputStream decrypt(InputStream in) throws IOException { - String DEFAULT_KEY_ALGO = JetS3tV2.ALGORITHM; - String DEFAULT_KEY_SIZE = Integer.toString(JetS3tV2.KEY_SIZE); - String DEFAULT_KEY_ITER = Integer.toString(JetS3tV2.ITERATIONS); -- String DEFAULT_KEY_SALT = DatatypeConverter.printHexBinary(JetS3tV2.SALT); -+ String DEFAULT_KEY_SALT = Hex.toHexString(JetS3tV2.SALT); - - String EMPTY = ""; //$NON-NLS-1$ - -@@ -377,8 +377,7 @@ static GeneralSecurityException securityError(String message) { - - final byte[] salt; - try { -- salt = DatatypeConverter -- .parseHexBinary(keySalt.replaceAll(REGEX_WS, EMPTY)); -+ salt = Hex.decode(keySalt.replaceAll(REGEX_WS, EMPTY)); - } catch (Exception e) { - throw securityError(X_KEY_SALT + EMPTY + keySalt); - } --- -2.20.1 - diff --git a/jgit-5.4.0.201906121030-r.tar.xz b/jgit-5.4.0.201906121030-r.tar.xz deleted file mode 100644 index 7aadcb5e932eae790f1c976727c3ae520d265e05..0000000000000000000000000000000000000000 Binary files a/jgit-5.4.0.201906121030-r.tar.xz and /dev/null differ diff --git a/jgit.spec b/jgit.spec index e2c7a286025be8226c232ba8e4f59d9feb5a46a9..335d4ef484f2f6ab27b7b9f1b480fb3d37eb389b 100644 --- a/jgit.spec +++ b/jgit.spec @@ -1,84 +1,123 @@ -%global gittag 5.4.0.201906121030-r -%bcond_with tests -Name: jgit -Version: 5.4.0 -Release: 1 -Summary: A pure java implementation of git -License: BSD -URL: https://www.eclipse.org/jgit/ -Source0: https://git.eclipse.org/c/jgit/jgit.git/snapshot/jgit-%{gittag}.tar.xz -Patch0: 0001-Ensure-the-correct-classpath-is-set-for-the-jgit-com.patch -Patch1: 0002-Ensure-all-packages-are-exported.patch -Patch2: 0003-Remove-dependency-on-javax.xml.bind-package.patch -BuildArch: noarch -BuildRequires: maven-local mvn(args4j:args4j) mvn(com.google.code.gson:gson) -BuildRequires: mvn(com.googlecode.javaewah:JavaEWAH) mvn(com.jcraft:jsch) -BuildRequires: mvn(com.jcraft:jzlib) mvn(javax.servlet:javax.servlet-api) mvn(junit:junit) -BuildRequires: mvn(net.i2p.crypto:eddsa) mvn(org.apache.ant:ant) -BuildRequires: mvn(org.apache.commons:commons-compress) -BuildRequires: mvn(org.apache.httpcomponents:httpclient) -BuildRequires: mvn(org.apache.httpcomponents:httpcore) -BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) -BuildRequires: mvn(org.apache.sshd:sshd-osgi) >= 2.2.0 mvn(org.apache.sshd:sshd-sftp) >= 2.2.0 -BuildRequires: mvn(org.bouncycastle:bcpg-jdk15on) >= 1.61 -BuildRequires: mvn(org.bouncycastle:bcpkix-jdk15on) >= 1.61 -BuildRequires: mvn(org.bouncycastle:bcprov-jdk15on) >= 1.61 -BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) -BuildRequires: mvn(org.eclipse.jetty:jetty-servlet) mvn(org.osgi:osgi.core) -BuildRequires: mvn(org.slf4j:slf4j-api) mvn(org.slf4j:slf4j-simple) mvn(org.tukaani:xz) -%if %{with tests} -BuildRequires: git mvn(org.hamcrest:hamcrest-library) mvn(org.mockito:mockito-core) -%endif -Requires: bouncycastle >= 1.61 apache-sshd >= 1:2.2.0 +%global gittag 5.11.0.202103091610-r + +Name: jgit +Version: 5.11.0 +Release: 1%{?dist} +Summary: A pure java implementation of git + +# We don't ship the EPL-licensed Eclipse features in this package +License: BSD +URL: https://www.eclipse.org/jgit/ +Source0: https://git.eclipse.org/c/jgit/jgit.git/snapshot/jgit-%{gittag}.tar.xz + +# Set the correct classpath for the command line tools +Patch0: 0001-Ensure-the-correct-classpath-is-set-for-the-jgit-com.patch + +BuildArch: noarch + +BuildRequires: maven-local +BuildRequires: mvn(args4j:args4j) +BuildRequires: mvn(com.google.code.gson:gson) +BuildRequires: mvn(com.googlecode.javaewah:JavaEWAH) +BuildRequires: mvn(com.jcraft:jsch) +BuildRequires: mvn(com.jcraft:jzlib) +BuildRequires: mvn(javax.servlet:javax.servlet-api) +BuildRequires: mvn(net.i2p.crypto:eddsa) +BuildRequires: mvn(org.apache.ant:ant) +BuildRequires: mvn(org.apache.commons:commons-compress) +BuildRequires: mvn(org.apache.httpcomponents:httpclient) +BuildRequires: mvn(org.apache.httpcomponents:httpcore) +BuildRequires: mvn(org.apache.maven.plugins:maven-antrun-plugin) +BuildRequires: mvn(org.apache.sshd:sshd-osgi) >= 2.6.0 +BuildRequires: mvn(org.apache.sshd:sshd-sftp) >= 2.6.0 +BuildRequires: mvn(org.bouncycastle:bcpg-jdk15on) >= 1.65 +BuildRequires: mvn(org.bouncycastle:bcpkix-jdk15on) >= 1.65 +BuildRequires: mvn(org.bouncycastle:bcprov-jdk15on) >= 1.65 +BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) +BuildRequires: mvn(org.eclipse.jetty:jetty-servlet) +BuildRequires: mvn(org.osgi:osgi.core) +BuildRequires: mvn(org.slf4j:slf4j-api) +BuildRequires: mvn(org.slf4j:slf4j-simple) +BuildRequires: mvn(org.tukaani:xz) + +# Runtime requirements +Requires: bouncycastle >= 1.65 +Requires: apache-sshd >= 1:2.6.0 +Requires: jzlib + %description A pure Java implementation of the Git version control system and command line interface. %package javadoc -Summary: API documentation for %{name} +Summary: API documentation for %{name} + %description javadoc %{summary}. %prep %setup -n jgit-%{gittag} -q %patch0 -p1 -%patch1 -p1 -%patch2 -p1 + +# Disable multithreaded build rm .mvn/maven.config -%pom_xpath_remove "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:executions/pom:execution[pom:id='compile-with-errorprone']" pom.xml -%pom_xpath_remove "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:executions/pom:execution[pom:id='default-compile']/pom:configuration" pom.xml -%pom_xpath_remove "pom:plugin[pom:artifactId='maven-compiler-plugin']/pom:dependencies" pom.xml -%pom_change_dep -r org.osgi:org.osgi.core org.osgi:osgi.core:provided + +# Disable "errorprone" compiler that is not available in distro +%pom_xpath_remove "pom:configuration/pom:annotationProcessorPaths" +%pom_xpath_remove "pom:configuration/pom:compilerArgs" + +# Use newer Felix dep +%pom_change_dep -r org.osgi:org.osgi.core org.osgi:osgi.core:\${osgi-core-version}:provided + +# Remove unnecessary plugins for RPM builds %pom_disable_module org.eclipse.jgit.coverage +%pom_disable_module org.eclipse.jgit.benchmarks %pom_remove_plugin :jacoco-maven-plugin %pom_remove_plugin :maven-javadoc-plugin %pom_remove_plugin -r :maven-source-plugin %pom_remove_plugin :maven-enforcer-plugin %pom_remove_plugin -r :japicmp-maven-plugin + +# Avoid failures due to lack of jacoco sed -i -e 's/@{argLine}//' $(find -name pom.xml) + +# Don't attach shell script artifact %pom_remove_plugin org.codehaus.mojo:build-helper-maven-plugin org.eclipse.jgit.pgm + +# Don't have spring-boot %pom_remove_plugin :spring-boot-maven-plugin org.eclipse.jgit.pgm %pom_xpath_remove "pom:plugins/pom:plugin/pom:executions/pom:execution[pom:id='create_jgit']" org.eclipse.jgit.pgm sed -i -e 's/org\.springframework\.boot\.loader\.JarLauncher/org.eclipse.jgit.pgm.Main/' \ org.eclipse.jgit.pgm/jgit.sh + +# Relax servlet restriction +sed -i -e '/javax\.servlet/s/4\.0\.0/5.0.0/' org.eclipse.jgit.lfs.server/META-INF/MANIFEST.MF org.eclipse.jgit.pgm/META-INF/MANIFEST.MF +sed -i -e '/javax\.servlet/s/3\.2\.0/5.0.0/' org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF org.eclipse.jgit.http.server/META-INF/MANIFEST.MF + +# Remove unnecessary dep on org.apache.log4j %pom_remove_dep log4j:log4j . org.eclipse.jgit.pgm %pom_change_dep org.slf4j:slf4j-log4j12 org.slf4j:slf4j-simple . org.eclipse.jgit.pgm -%if %{without tests} + +# No need to build test modules if we aren't running tests sed -i -e '/\.test<\/module>/d' pom.xml -%endif -%mvn_package ":*.test" __noinstall + +# Or junit util bundles used by tests +%pom_disable_module org.eclipse.jgit.junit +%pom_disable_module org.eclipse.jgit.junit.ssh +%pom_disable_module org.eclipse.jgit.junit.http %build -%if %{without tests} -%mvn_build -f -- -Pjavac -%else -%mvn_build -- -Pjavac -Dmaven.test.failure.ignore=true -%endif +# Don't run tests due to missing dependencies +%mvn_build -f -- -Pjavac -Dsource=1.8 %install %mvn_install + +# Install CLI invoker script install -dm 755 %{buildroot}%{_bindir} install -m 755 org.eclipse.jgit.pgm/jgit.sh %{buildroot}%{_bindir}/jgit + +# Ant task configuration install -dm 755 %{buildroot}%{_sysconfdir}/ant.d cat > %{buildroot}%{_sysconfdir}/ant.d/jgit < - 5.4.0-1 -- Package init +* Wed Mar 10 2021 Mat Booth - 5.11.0-1 +- Update to latest upstream release + +* Tue Jan 26 2021 Fedora Release Engineering - 5.10.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Jan 12 2021 Alexander Kurtakov 5.10.0-1 +- Update to latest upstream release + +* Mon Nov 16 2020 Mat Booth - 5.9.0-2 +- Don't ship junit util bundles used only by tests + +* Fri Oct 30 2020 Jeff Johnston - 5.9.0-1 +- Update to latest upstream release + +* Fri Aug 21 2020 Mat Booth - 5.8.1-1 +- Update to latest upstream release + +* Fri Aug 21 2020 Mat Booth - 5.8.0-5 +- Rebuild against new servlet API + +* Tue Jul 28 2020 Fedora Release Engineering - 5.8.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Fri Jul 10 2020 Jiri Vanek - 5.8.0-3 +- Rebuilt for JDK-11, see https://fedoraproject.org/wiki/Changes/Java11 + +* Thu Jun 25 2020 Roland Grunberg - 5.8.0-2 +- Set maven-javadoc-plugin source to 1.8 for Java 11 build. + +* Mon Jun 22 2020 Mat Booth - 5.8.0-1 +- Update to latest upstream release + +* Fri May 15 2020 Mat Booth - 5.7.0-3 +- Fix erroneous dep on osgi.core with provided scope + +* Sun Mar 22 2020 Mat Booth - 5.7.0-2 +- Relax dep on junit + +* Sun Mar 22 2020 Mat Booth - 5.7.0-1 +- Update to latest upstream release + +* Wed Jan 29 2020 Fedora Release Engineering - 5.6.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Dec 19 2019 Mat Booth - 5.6.0-1 +- Update to latest upstream release + +* Tue Sep 17 2019 Mat Booth - 5.5.0-1 +- Update to latest upstream release + +* Thu Jul 25 2019 Mat Booth - 5.4.0-6 +- Make dep on OSGi 'provided' in scope + +* Thu Jul 25 2019 Mat Booth - 5.4.0-5 +- Ignore test failures again due to 'Mount point not found' errors + +* Thu Jul 25 2019 Mat Booth - 5.4.0-4 +- Better summary to avoid rpmlint warnings and add better comments +- Conditionalise BR on git with other test dependencies +- Drop explicit dep on jzlib, jgit no longer considers it optional +- Simplify javadoc package specification +- Use of maven-source-plugin is unnecessary for RPM builds +- Don't ignore test failures +- Truncate changelog + +* Wed Jul 24 2019 Mat Booth - 5.4.0-3 +- Package jgit libs and command line tooling separately from the Eclipse plug-in diff --git a/jgit.yaml b/jgit.yaml deleted file mode 100644 index 00bbaf050db91e87f0ad529e5c29027a1bf150ae..0000000000000000000000000000000000000000 --- a/jgit.yaml +++ /dev/null @@ -1,4 +0,0 @@ -version_control: NA -src_repo: NA -tag_prefix: NA -seperator: NA