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

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

Open
gcotelli opened this issue May 20, 2024 · 4 comments

Comments

@gcotelli
Copy link
Member

gcotelli commented May 20, 2024

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:

  • OS: Manjaro Linux
  • Pharo Version
    • Pharo-12.0.0+SNAPSHOT.build.1510.sha.7efef560919a459de9e2fad384ee4614fdcb1691 (64 Bit)
    • PharoVM 10.2.0-f4c5e2aa5 built on May 9 2024 09:04:25

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
Copy link
Member Author

gcotelli commented May 20, 2024

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
Copy link
Member Author

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
Copy link
Member

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

@guillep
Copy link
Member

guillep commented May 27, 2024

This should be available in next P13's build.

For a backport, I described the procedure to follow here (pharo-vcs/libgit2-pharo-bindings#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 )
GitHub
Iceberg is the main toolset for handling VCS in Pharo. - pharo-vcs/iceberg

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

No branches or pull requests

3 participants