Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ansible playbooks to use up-to-date version of git #2889

Open
sej-jackson opened this issue Jan 19, 2023 · 4 comments
Open

Update ansible playbooks to use up-to-date version of git #2889

sej-jackson opened this issue Jan 19, 2023 · 4 comments

Comments

@sej-jackson
Copy link
Contributor

The Git project has now released new versions of git to fix recent security vulnerabilities, and since the playbooks are installing git built from source of version 2.15.0 (from October 2017), changing them to use the fixed version (2.39.1) would help with ensuring that the systems we configure with them are fixed also.

https://github.blog/2023-01-17-git-security-vulnerabilities-announced-2/

Searching the playbooks for "git" hits on 97 files most of which are likely to be unrelated to the installation of git itself, but will still need checking. However, searching on "git --version" found these 5, all of which will definitely need updating:

% find . -type f -exec grep -li "git --version" {} \;
./AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/Solaris.yml
./AdoptOpenJDK_Unix_Playbook/roles/Common/tasks/SLES.yml
./AdoptOpenJDK_Unix_Playbook/roles/GIT_Source/tasks/main.yml
./vagrant.yml
./AdoptOpenJDK_ITW_Playbook/roles/GIT_Source/tasks/main.yml
% 

I checked the Dockerfiles also, but they don't include any hard-coded git versions.

@aswinkr77
Copy link
Contributor

Compiled and installed git 2.41.0 successfully on the docker centos6 image pulled from adoptopenjdk/centos6_build_image. Needs the libcurl-devel package for compiling git from source.

@aswinkr77
Copy link
Contributor

Looks like compiling git version >2.26 requires the libcurl-devel package on all distros(name of the package maybe different on different distros).

@sxa
Copy link
Member

sxa commented Sep 26, 2023

Yeah on the .deb platforms (Debian, Ubuntu etc.) it's a slightly less consistent package name that has a version number in it so it will potentially require further investigation to get it right everywhere.

@aswinkr77
Copy link
Contributor

@sxa The dependency package is already available in the Common role for CentOS, Rhel, Ubuntu and SLES.

Actually, I tested the latest git version on the Adopitum centos6 build image pulled from the docker image which hasn't been updated for over 9 months(related issue #3211) and was missing the libcurl-devel package but in reality, the package is available in the Unix Playbook.

Note: I tested the latest version 2.41 in CentOS, Rhel, Ubuntu, SLES 15 and SLES 12.5 with the dependency package installed.

For CentOS:
libcurl-devel

Test_Tool_Packages:
- gcc
- gcc-c++
- unzip
- zlib-devel
- perl-devel
- libcurl-devel
- openssl-devel

For Rhel:
libcurl-devel

- zlib-devel
- perl-devel
- expat-devel
- libcurl-devel
- mercurial

For Ubuntu:
libcurl4-openssl-dev

- libcapstone-dev
- libcups2-dev
- libcurl4-openssl-dev
- libdwarf-dev # OpenJ9

For SLES 15:
libcurl-devel

Additional_Build_Tools_SLES15:
- alsa-devel
- cups-devel
- fontconfig-devel
- java-1_8_0-openjdk
- libcurl-devel

For SLES 12.5:
libcurl-devel

Additional_Build_Tools_SLES12_SP5:
- libcurl-devel ## Required To Install Git From Source

For Fedora:
libcurl-devel

- gmp-devel
- gnutls
- gnutls-utils
- libcurl-devel
- libffi-devel

For openSUSE:
libcurl-devel

- glibc
- glibc-devel
- gnutls
- libcurl-devel
- libdw1

For Debian:
libcurl4-openssl-dev

- libasound2-dev
- libcapstone-dev
- libcups2-dev
- libcurl4-openssl-dev
- libdwarf-dev # OpenJ9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Todo
Development

No branches or pull requests

3 participants