Bug 252098 - devel/libgit2: is too old for some USES=cargo ports
Summary: devel/libgit2: is too old for some USES=cargo ports
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Matthias Fechner
URL:
Keywords:
Depends on: 254546 254548 254720
Blocks:
  Show dependency treegraph
 
Reported: 2020-12-24 06:07 UTC by Jan Beich
Modified: 2021-04-06 13:26 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (mfechner)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2020-12-24 06:07:46 UTC
A number of ports Rust-based ports expect libgit2 1.1.0 due to LIBGIT2_SYS_USE_PKG_CONFIG=1. For example, I had to add an extra patch in ports r559049.

Can you update to https://github.com/libgit2/libgit2/releases/tag/v1.1.0 ?

$ rg -lt make libgit2-sys.\*1.1.0
devel/cargo-c/Makefile
devel/gitui/Makefile
security/cargo-audit/Makefile
shells/starship/Makefile
sysutils/onefetch/Makefile
textproc/bat/Makefile
Comment 1 Matthias Fechner freebsd_committer freebsd_triage 2020-12-24 07:38:17 UTC
Even after the upgrade of gitlab to 13.7 libgit2 1.1.0 does not work with gitlab.
Here the branch I tested:
https://gitlab.fechner.net/mfechner/Gitlab/-/tree/libgit110

The failing log is here:
https://pkg.fechner.net/data/122amd64-gitlab/2020-12-24_08h23m17s/logs/errors/gitaly-13.7.0.log

The full build here:
https://pkg.fechner.net/build.html?mastername=122amd64-gitlab&build=2020-12-24_08h23m17s

Maybe we can ask upstream to upgrade gitaly to use a newer version of `github.com/libgit2/git2go/v30` which works with libgit2 1.1.0 version.
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2021-02-14 19:08:50 UTC
There's an issue open upstream about this:
https://gitlab.com/gitlab-org/gitaly/-/issues/3330
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2021-03-23 07:17:13 UTC
Can't we just apply https://github.com/libgit2/git2go/commit/1fabe95fb7275df980ff6ab03fb85eac91c5849d to the bundled git2go in gitaly and it would be fine? libgit2 1.1.0 should be ABI compatible with libgit2 1.0.1.
Comment 4 Matthias Fechner freebsd_committer freebsd_triage 2021-03-23 10:43:15 UTC
I currently work on the gitlab-ce 13.10 upgrade which has already upgraded to libgit 1.1:
https://gitlab.fechner.net/mfechner/Gitlab/-/tree/13.10

But this is an upgrade that will need a higher amount of time which I currently do not have (gitlab did some bery heavy refactoring which will required much work).
I will continue to work on the gitlab upgrade as good as time allows it but it will for sure take some days maybe 1-3 weeks to complete it.

If anyone want to help me, I can push my current work to the branch, then you can see the problems there.
Comment 5 Matthias Fechner freebsd_committer freebsd_triage 2021-03-25 13:47:08 UTC
The upgrade of gitlab-ce 13.10 is done.
After I got required approvals I will update libgit together with gitlab.
Comment 6 commit-hook freebsd_committer freebsd_triage 2021-04-06 07:53:03 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=e7d94d42f82e4e7dd3da20b59d0174d7e0c33a71

commit e7d94d42f82e4e7dd3da20b59d0174d7e0c33a71
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2021-04-06 07:12:14 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2021-04-06 07:51:01 +0000

    Update libgit2 to 1.1.0.
    This update is also required for www/gitlab-ce 13.10 upgrade.

    Changelog:
    https://github.com/libgit2/libgit2/releases/tag/v1.1.0

    PR:             252098

 cad/horizon-eda/Makefile                  | 2 +-
 deskutils/basket/Makefile                 | 2 +-
 devel/cargo-c/Makefile                    | 2 +-
 devel/cargo-generate/Makefile             | 2 +-
 devel/gbump/Makefile                      | 2 +-
 devel/geany-plugin-git-changebar/Makefile | 1 +
 devel/geany-plugin-workbench/Makefile     | 1 +
 devel/git-absorb/Makefile                 | 2 +-
 devel/git-delta/Makefile                  | 2 +-
 devel/gitaly/Makefile                     | 2 +-
 devel/gitg/Makefile                       | 2 +-
 devel/gitui/Makefile                      | 2 +-
 devel/gnome-builder/Makefile              | 1 +
 devel/grv/Makefile                        | 2 +-
 devel/interactive_rebase_tool/Makefile    | 2 +-
 devel/kf5-ktexteditor/Makefile            | 1 +
 devel/libegit2/Makefile                   | 2 +-
 devel/libgit2-glib/Makefile               | 2 +-
 devel/libgit2/Makefile                    | 4 ++--
 devel/libgit2/distinfo                    | 6 +++---
 devel/py-pygit2/Makefile                  | 5 +++--
 devel/py-pygit2/distinfo                  | 6 +++---
 devel/rubygem-rugged/Makefile             | 5 +++--
 devel/rubygem-rugged/distinfo             | 6 +++---
 devel/sentry-cli/Makefile                 | 2 +-
 editors/elementary-code/Makefile          | 2 +-
 editors/gedit-plugins/Makefile            | 2 +-
 editors/jucipp/Makefile                   | 1 +
 editors/kate/Makefile                     | 1 +
 misc/broot/Makefile                       | 2 +-
 security/cargo-audit/Makefile             | 2 +-
 shells/starship/Makefile                  | 1 +
 sysutils/exa/Makefile                     | 2 +-
 sysutils/onefetch/Makefile                | 2 +-
 textproc/bat/Makefile                     | 2 +-
 www/stagit/Makefile                       | 1 +
 36 files changed, 47 insertions(+), 37 deletions(-)
Comment 7 Jan Beich freebsd_committer freebsd_triage 2021-04-06 08:12:17 UTC
(In reply to commit-hook from comment #6)

Fails to build at least on 11.4 i386 and 14.0 amd64:

=======================<phase: patch          >============================
===>  Patching for libgit2-1.1.0
sed: /wrkdirs/usr/ports/devel/libgit2/work/libgit2-1.1.0/cmake/Modules/SelectHTTPSBackend.cmake: No such file or directory
*** Error code 1

> -# $FreeBSD$
> +# $FreeBSD: head/devel/libgit2/Makefile 539732 2020-06-20 11:49:08Z tobik $

Cruft?
Comment 8 Matthias Fechner freebsd_committer freebsd_triage 2021-04-06 08:41:33 UTC
I will check later the keywords, this is maybe due to merge of commits older than 14 days.

libgit2 build fine here with 12.2. Other versions I have not tested:
https://pkg.fechner.net/build.html?mastername=122amd64-default&build=2021-04-06_10h31m51s

https://pkg.fechner.net/data/122amd64-default/2021-04-06_10h31m51s/logs/libgit2-1.1.0.log
Comment 9 Jan Beich freebsd_committer freebsd_triage 2021-04-06 09:13:54 UTC
(In reply to Matthias Fechner from comment #8)
> libgit2 build fine here with 12.2

That build log has

  #### /usr/local/etc/poudriere.d/make.conf ####
  DEFAULT_VERSIONS=mysql=10.5m ssl=openssl pgsql=12 samba=411

By default ports/ use OpenSSL from base rather than security/openssl. As /usr/libdata/pkgconfig/openssl.pc is still missing patching is required to fix "pkg-config libgit2 --cflags".
Comment 10 commit-hook freebsd_committer freebsd_triage 2021-04-06 13:24:01 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d2b6fcea360725134934932b339045bbdc0bc2ae

commit d2b6fcea360725134934932b339045bbdc0bc2ae
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2021-04-06 13:23:02 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2021-04-06 13:23:51 +0000

    Fixed build problem if base SSL is used.
    PR:             252098

 devel/libgit2/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 11 Matthias Fechner freebsd_committer freebsd_triage 2021-04-06 13:26:06 UTC
I think the problem should be fixed now.