pharo-project / pharo

Pharo is a dynamic reflective pure object-oriented language supporting live programming inspired by Smalltalk.
http://pharo.org
Other
1.19k stars 351 forks source link

Some Linux distros are distributing a new version of the libgit2 library not listed in LGitLibrary>>#unix64LibraryName #16677

Open gcotelli opened 3 months ago

gcotelli commented 3 months ago

Bug description Manjaro Linux is distributing libgit2 v1.8 making Iceberg fail with an error of library not found.

This is the relevant release of the library

There are some breaking changes maybe affecting the libgit2 bindings:

Breaking changes

  • Changes to git_config_entry (ABI breaking change) The git_config_entry structure now contains information about the backend_type >and origin_path. The unused payload value has been removed.

  • git_push_options includes remote push options (ABI breaking change) The git_push_options structure now contains a value for remote push options.

To Reproduce Steps to reproduce the behavior:

  1. Open Iceberg in a Pharo 12 image where the underlying Linux OS has only libgit2 1.8 installed.
  2. You must see something like this: image

Expected behavior Updated support for libgit2 1.8

Version information:

Expected development cost Adding the library name to LGitLibrary>>#unix64LibraryName is trivial. Someone with more knowledge of libgit2 binding internals needs to evaluate if the breaking changes affect the behavior used by Pharo or not, and requires changes in the external object structs

gcotelli commented 3 months ago

I've tried the simple change of adding the library version to the known list of versions, and with this change, I'm able to commit changes. But if you try to push directly from Iceberg the image hangs. And in the console, I see double free or corruption (!prev). So, it looks like the changes in git_push_options break something.

gcotelli commented 3 months ago

I've attempted a fix in pharo-vcs/libgit2-pharo-bindings/pull/85 The changes are proposed for the Pharo12 branch, they will need review by someone with more knowledge in this area. As far as I was able to test the behavior seems correct and now I can push to remote repositories again.

MarcusDenker commented 3 months ago

PR was merged. I do not close yet as this might be backported?

guillep commented 3 months ago

This should be available in next P13's build.

For a backport, I described the procedure to follow here (https://github.com/pharo-vcs/libgit2-pharo-bindings/pull/85):

The following steps need to be followed to make it available in Pharo12

  1. [ ] We should make a new libgit release
  2. [ ] It should be integrated into Iceberg's Pharo12 branch (see https://github.com/pharo-vcs/iceberg/blob/c2049ea1b3aef1e256d16edae106e3860050bc25/BaselineOfIceberg/BaselineOfIceberg.class.st#L79)
  3. [ ] We should then make a new Iceberg release for Pharo 12 and integrate it into Pharo12 (see https://github.com/pharo-project/pharo/blob/7efef560919a459de9e2fad384ee4614fdcb1691/src/BaselineOfPharo/BaselineOfPharo.class.st#L63)
GitHub
iceberg/BaselineOfIceberg/BaselineOfIceberg.class.st at c2049ea1b3aef1e256d16edae106e3860050bc25 · pharo-vcs/iceberg
Iceberg is the main toolset for handling VCS in Pharo. - pharo-vcs/iceberg