From 3e6e1f4ba454d537ee24c53fc778c267d1a9c28b4c1f0997766590f7171c0ff0 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Fri, 6 Oct 2023 11:02:17 +0000 Subject: [PATCH 1/2] OBS-URL: https://build.opensuse.org/package/show/Java:packages/eclipse-jgit?expand=0&rev=45 --- jgit.changes | 7 +++++++ jgit.spec | 19 +++++++++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/jgit.changes b/jgit.changes index 8b34927..b2a0e97 100644 --- a/jgit.changes +++ b/jgit.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Oct 6 11:00:40 UTC 2023 - Fridrich Strba + +- Craft the jgit script from the real Main class of the jar file + instead of using some superfluous jar launcher. + Fixes bsc#1209646 + ------------------------------------------------------------------- Wed May 31 19:51:51 UTC 2023 - Fridrich Strba diff --git a/jgit.spec b/jgit.spec index ff0cb7f..33f4377 100644 --- a/jgit.spec +++ b/jgit.spec @@ -69,8 +69,20 @@ BuildRequires: mvn(org.osgi:osgi.core) BuildRequires: mvn(org.slf4j:slf4j-api) BuildRequires: mvn(org.slf4j:slf4j-simple) BuildRequires: mvn(org.tukaani:xz) -# This is only optional dependency of commons-compress, -# But the jgit script needs that jar on classpath +# All the jars that need to be on the classpath for the script to work +Requires: apache-commons-codec +Requires: apache-commons-compress +Requires: apache-commons-logging +Requires: apache-sshd +Requires: args4j +Requires: ed25519-java +Requires: httpcomponents-client +Requires: httpcomponents-core +Requires: javaewah +Requires: javapackages-tools +Requires: jsch +Requires: jzlib +Requires: slf4j Requires: xz-java Obsoletes: %{name}-bootstrap BuildArch: noarch @@ -150,8 +162,7 @@ done %fdupes -s %{buildroot}%{_javadocdir} # Binary -install -dm 755 %{buildroot}%{_bindir} -install -m 755 org.eclipse.jgit.pgm/jgit.sh %{buildroot}%{_bindir}/jgit +%jpackage_script org.eclipse.jgit.pgm.Main "" "" javaewah:jzlib:jsch:jgit/org.eclipse.jgit:slf4j/api:slf4j/simple:args4j:commons-compress:httpcomponents/httpcore:httpcomponents/httpclient:commons-logging:commons-codec:eddsa:apache-sshd/sshd-osgi:apache-sshd/sshd-sftp %{name} # Ant task configuration install -dm 755 %{buildroot}%{_sysconfdir}/ant.d From 31a18ee0d44dc90cbd7009d8f0a16e9b83c293510f5ff25eaa4240a5c8cbc397 Mon Sep 17 00:00:00 2001 From: Fridrich Strba Date: Fri, 6 Oct 2023 11:08:56 +0000 Subject: [PATCH 2/2] OBS-URL: https://build.opensuse.org/package/show/Java:packages/eclipse-jgit?expand=0&rev=46 --- ...ct-classpath-is-set-for-the-jgit-com.patch | 26 ------------------- eclipse-jgit.changes | 7 +++++ eclipse-jgit.spec | 2 -- jgit.changes | 7 +++++ jgit.spec | 2 -- 5 files changed, 14 insertions(+), 30 deletions(-) delete mode 100644 0001-Ensure-the-correct-classpath-is-set-for-the-jgit-com.patch 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 deleted file mode 100644 index 99a5b4e..0000000 --- a/0001-Ensure-the-correct-classpath-is-set-for-the-jgit-com.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 55bae4b1398715c987537b0957c08c8616ea8b61 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 - line tool - ---- - org.eclipse.jgit.pgm/jgit.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/org.eclipse.jgit.pgm/jgit.sh b/org.eclipse.jgit.pgm/jgit.sh -index a369220..2dd26aa 100644 ---- a/org.eclipse.jgit.pgm/jgit.sh -+++ b/org.eclipse.jgit.pgm/jgit.sh -@@ -60,7 +60,7 @@ esac - this_script=`which "$0" 2>/dev/null` - [ $? -gt 0 -a -f "$0" ] && this_script="$0" - cp=$this_script -- -+export JGIT_CLASSPATH="$(build-classpath jgit slf4j/api slf4j/simple args4j jzlib jsch commons-compress xz-java javaewah httpcomponents/httpcore httpcomponents/httpclient commons-logging commons-codec eddsa apache-sshd/sshd-osgi apache-sshd/sshd-sftp)" - platform="`uname`" - if [ -n "$JGIT_CLASSPATH" ] - then --- -2.28.0 - diff --git a/eclipse-jgit.changes b/eclipse-jgit.changes index 82567df..e507a99 100644 --- a/eclipse-jgit.changes +++ b/eclipse-jgit.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Oct 6 11:04:41 UTC 2023 - Fridrich Strba + +- Removed patch: + * 0001-Ensure-the-correct-classpath-is-set-for-the-jgit-com.patch + + no need to patch the jgit.sh launcher that we do not use + ------------------------------------------------------------------- Wed May 31 19:51:51 UTC 2023 - Fridrich Strba diff --git a/eclipse-jgit.spec b/eclipse-jgit.spec index 1f3c543..f2671ba 100644 --- a/eclipse-jgit.spec +++ b/eclipse-jgit.spec @@ -27,7 +27,6 @@ Group: Development/Libraries/Java URL: https://www.eclipse.org/egit/ 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 # Switch to feature requirements for third-party bundles, also makes the following changes: # javaewah -> com.googlecode.javaewah.JavaEWAH # org.slf4j.api -> slf4j.api @@ -91,7 +90,6 @@ A pure Java implementation of the Git version control system. %prep %setup -q -n jgit-%{gittag} -%patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 diff --git a/jgit.changes b/jgit.changes index b2a0e97..57ab59b 100644 --- a/jgit.changes +++ b/jgit.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Fri Oct 6 11:04:41 UTC 2023 - Fridrich Strba + +- Removed patch: + * 0001-Ensure-the-correct-classpath-is-set-for-the-jgit-com.patch + + no need to patch the jgit.sh launcher that we do not use + ------------------------------------------------------------------- Fri Oct 6 11:00:40 UTC 2023 - Fridrich Strba diff --git a/jgit.spec b/jgit.spec index 33f4377..194c4fd 100644 --- a/jgit.spec +++ b/jgit.spec @@ -27,7 +27,6 @@ URL: https://www.eclipse.org/egit/ # Use github mirror for now, see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=522144 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 # Switch to feature requirements for third-party bundles, also makes the following changes: # javaewah -> com.googlecode.javaewah.JavaEWAH # org.slf4j.api -> slf4j.api @@ -100,7 +99,6 @@ Group: Documentation/HTML %prep %setup -q -n jgit-%{gittag} -%patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1