ci: install JGit dependency

We have some tests in t5310 that use JGit to verify that bitmaps can be read both by Git and by JGit. We do not execute these tests in our CI jobs though because we don't make JGit available there. Consequently, the tests basically bitrot because almost nobody is ever going to have JGit in their path. Install JGit to plug this test gap. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Patrick Steinhardt committed Apr 12, 2024 at 06:44 UTC 04ba2c7eb38fbb0f1a440971953557b9eb3b789b
1 file changed +14 -1
ci/install-dependencies.sh
+14 -1
@@ -9,6 +9,7 @@ begin_group "Install dependencies"
9
10 P4WHENCE=https://cdist2.perforce.com/perforce/r21.2
11 LFSWHENCE=https://github.com/github/git-lfs/releases/download/v$LINUX_GIT_LFS_VERSION
12 +JGITWHENCE=https://repo.eclipse.org/content/groups/releases//org/eclipse/jgit/org.eclipse.jgit.pgm/6.8.0.202311291450-r/org.eclipse.jgit.pgm-6.8.0.202311291450-r.sh
13
14 # Make sudo a no-op and execute the command directly when running as root.
15 # While using sudo would be fine on most platforms when we are root already,
@@ -39,7 +40,7 @@ ubuntu-*)
40 sudo apt-get -q update
41 sudo apt-get -q -y install \
42 language-pack-is libsvn-perl apache2 cvs cvsps git gnupg subversion \
42 - make libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo \
43 + make libssl-dev libcurl4-openssl-dev libexpat-dev wget sudo default-jre \
44 tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl \
45 libemail-valid-perl libio-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \
46 ${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE
@@ -53,6 +54,9 @@ ubuntu-*)
54 tar -xzf "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz" \
55 -C "$CUSTOM_PATH" --strip-components=1 "git-lfs-$LINUX_GIT_LFS_VERSION/git-lfs"
56 rm "git-lfs-linux-amd64-$LINUX_GIT_LFS_VERSION.tar.gz"
57 +
58 + wget --quiet "$JGITWHENCE" --output-document="$CUSTOM_PATH/jgit"
59 + chmod a+x "$CUSTOM_PATH/jgit"
60 ;;
61 ubuntu32-*)
62 sudo linux32 --32bit i386 sh -c '
@@ -113,6 +117,7 @@ then
117 else
118 echo >&2 "WARNING: perforce wasn't installed, see above for clues why"
119 fi
120 +
121 if type git-lfs >/dev/null 2>&1
122 then
123 echo "$(tput setaf 6)Git-LFS Version$(tput sgr0)"
@@ -121,4 +126,12 @@ else
126 echo >&2 "WARNING: git-lfs wasn't installed, see above for clues why"
127 fi
128
129 +if type jgit >/dev/null 2>&1
130 +then
131 + echo "$(tput setaf 6)JGit Version$(tput sgr0)"
132 + jgit version
133 +else
134 + echo >&2 "WARNING: JGit wasn't installed, see above for clues why"
135 +fi
136 +
137 end_group "Install dependencies"