Source: plm
Version: 2.9.2-1
Severity: serious
Tags: ftbfs patch

Dear Maintainer,

I have just uploaded jgit/6.7.0 to unstable, in order to fix a security issue.
However, plm fails to build against it because some -- previously -- deprecated
methods have been removed.

The enclosed patch will allow you to build plm again.

Best,

-- 
Pierre
diff -Nru plm-2.9.2/debian/control plm-2.9.2/debian/control
--- plm-2.9.2/debian/control    2020-10-11 21:54:58.000000000 +0200
+++ plm-2.9.2/debian/control    2024-05-03 16:00:26.000000000 +0200
@@ -4,7 +4,7 @@
 Maintainer: Martin Quinson <mquin...@debian.org>
 Build-Depends: debhelper-compat (= 12), javahelper (>= 0.32), ant, quilt
 Build-Depends-Indep: default-jdk, scala, libmiglayout-java, 
librsyntaxtextarea-java,
-  junit4, libgettext-commons-java, libjson-simple-java, libhttpclient-java, 
libhttpmime-java, libjgit-java,
+  junit4, libgettext-commons-java, libjson-simple-java, libhttpclient-java, 
libhttpmime-java, libjgit-java (>= 6.7.0),
   jython, libgettext-ant-tasks-java, imagemagick,
   libmockito-java
 Standards-Version: 4.5.0
diff -Nru plm-2.9.2/debian/patches/jgit_6.7.0.patch 
plm-2.9.2/debian/patches/jgit_6.7.0.patch
--- plm-2.9.2/debian/patches/jgit_6.7.0.patch   1970-01-01 01:00:00.000000000 
+0100
+++ plm-2.9.2/debian/patches/jgit_6.7.0.patch   2024-05-03 16:00:26.000000000 
+0200
@@ -0,0 +1,26 @@
+Description: replacing methods removed in jgit 6.7.0
+ The method getRef in Repository had been deprecated in previous versions, and
+ is now removed.
+Author: Pierre Gruet <p...@debian.org>
+Forwarded: no
+Last-Update: 2024-05-03
+
+--- a/src/plm/core/model/tracking/GitUtils.java
++++ b/src/plm/core/model/tracking/GitUtils.java
+@@ -126,7 +126,7 @@
+       
+       public void mergeRemoteIntoLocalBranch(String userBranchHash) throws 
Exception {
+               try {
+-                      MergeResult res = 
git.merge().setCommit(true).setFastForward(MergeCommand.FastForwardMode.FF).setStrategy(MergeStrategy.RECURSIVE).include(git.getRepository().getRef("refs/remotes/origin/"+userBranchHash)).call();
++                      MergeResult res = 
git.merge().setCommit(true).setFastForward(MergeCommand.FastForwardMode.FF).setStrategy(MergeStrategy.RECURSIVE).include(git.getRepository().findRef("refs/remotes/origin/"+userBranchHash)).call();
+                       
+                       if(res.getMergeStatus() == 
MergeResult.MergeStatus.FAST_FORWARD) {
+                               System.out.println(Game.i18n.tr("last session 
data successfully retrieved"));
+@@ -376,6 +376,6 @@
+       }
+       
+       public Ref getRepoRef(String branch) throws IOException {
+-              return git.getRepository().getRef(branch);
++              return git.getRepository().findRef(branch);
+       }
+ }
diff -Nru plm-2.9.2/debian/patches/series plm-2.9.2/debian/patches/series
--- plm-2.9.2/debian/patches/series     2020-10-11 21:54:58.000000000 +0200
+++ plm-2.9.2/debian/patches/series     2024-05-03 15:59:24.000000000 +0200
@@ -4,3 +4,4 @@
 jython-fixes
 json-simple-3.patch
 
+jgit_6.7.0.patch

Reply via email to