Skip to content

Commit

Permalink
Merge pull request #201 from rstudio/libgit2
Browse files Browse the repository at this point in the history
Install newer libgit2 on RHEL 8 for git2r
  • Loading branch information
glin authored Jan 9, 2025
2 parents e2f41c3 + 1b946f9 commit 665bc93
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions rules/libgit2.json
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,22 @@
]
},
{
"packages": ["libgit2_1.7-devel"],
"pre_install": [
{ "command": "dnf install -y dnf-plugins-core" },
{ "command": "dnf config-manager --set-enabled powertools" }
{
"command": "dnf install -y epel-release"
}
],
"packages": ["libgit2-devel"],
"constraints": [
{
"os": "linux",
"distribution": "centos",
"versions": ["8"]
},
{
"os": "linux",
"distribution": "rockylinux",
"versions": ["8"]
}
]
},
Expand All @@ -112,12 +118,12 @@
]
},
{
"packages": ["libgit2_1.7-devel"],
"pre_install": [
{
"command": "subscription-manager repos --enable codeready-builder-for-rhel-8-$(arch)-rpms"
"command": "dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm"
}
],
"packages": ["libgit2-devel"],
"constraints": [
{
"os": "linux",
Expand Down

3 comments on commit 665bc93

@pat-s
Copy link
Contributor

@pat-s pat-s commented on 665bc93 Jan 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glin

This change results in a conflict with crb:

i Executing `sh -c dnf install -y [https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm`](https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm%60)
Updating Subscription Management repositories.
Last metadata expiration check: 0:00:11 ago on Sat Jan 11 12:08:48 2025.
epel-release-latest-8.noarch.rpm                 40 kB/s |  24 kB     00:00
Package epel-release-8-21.el8.noarch is already installed.
Dependencies resolved.
Nothing to do.
Complete!
i Executing `sh -c dnf install -y libgit2_1.7-devel`
Updating Subscription Management repositories.
Last metadata expiration check: 0:00:19 ago on Sat Jan 11 12:08:48 2025.
Error: 
 Problem: problem with installed package libgit2-devel-0.26.8-2.el8.aarch64
  - package libgit2_1.7-devel-1.7.2-1.el8.aarch64 from epel conflicts with libgit2-devel < 1.7.2-1.el8 provided by libgit2-devel-0.26.8-2.el8.aarch64 from @System
  - package libgit2_1.7-devel-1.7.2-1.el8.aarch64 from epel conflicts with libgit2-devel < 1.7.2-1.el8 provided by libgit2-devel-0.26.8-2.el8.aarch64 from codeready-builder-for-rhel-8-aarch64-rpms
  - package libgit2_1.7-devel-1.7.2-1.el8.aarch64 from epel conflicts with libgit2-devel < 1.7.2-1.el8 provided by libgit2-devel-0.26.6-3.el8.aarch64 from codeready-builder-for-rhel-8-aarch64-rpms
  - package libgit2_1.7-devel-1.7.2-1.el8.aarch64 from epel conflicts with libgit2-devel < 1.7.2-1.el8 provided by libgit2-devel-0.26.8-1.el8.aarch64 from codeready-builder-for-rhel-8-aarch64-rpms
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

Is this change really needed? This will conflict on any OS which has libgit2-devel installed. Besides, libgit2_1.7-devel is a version specific name, possibly requiring additional maintenance in the future.

Yes, libgit2 from CRB is old but AFAICS still functional?

@gaborcsardi
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@glin
Copy link
Contributor Author

@glin glin commented on 665bc93 Jan 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, sorry, I don't think there was any package that could use that old libgit2 from CRB anyway though. Other than git2r, gert also depends on libgit2 >= 1.0.

For conflicts in general, installing the non-devel packages shouldn't conflict, so you could install libgit2_1.7 from EPEL to keep both libgit2 versions. For a more automatic solution, we're likely going to get #151 in soon, so there'd be a possibility to get only the non-devel packages which would have less conflicts.

Please sign in to comment.