Bug#1010505: golang-gopkg-libgit2-git2go.v31 autopkgtest failure with libgit2 1.3

2022-05-17 Thread Steve Langasek
Package: golang-gopkg-libgit2-git2go.v31
Followup-For: Bug #1010505
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu kinetic ubuntu-patch
Control: tags -1 patch

This package builds (and tests) fine, except for this strict version check
in the test.

Testing for versions instead of features doesn't make for very good tests.
Here's a patch that relaxes the version check (but really, it should just be
dropped upstream, and if there are specific compatibilities they're
concerned about, those should be expressed as tests of the code).

Cheers,
-- 
Steve Langasek   Give me a lever long enough and a Free OS
Debian Developer   to set it on, and I can move the world.
Ubuntu Developer   https://www.debian.org/
slanga...@ubuntu.com vor...@debian.org
diff -Nru 
golang-gopkg-libgit2-git2go.v31-31.4.3/debian/patches/libgit-1.3-compat.patch 
golang-gopkg-libgit2-git2go.v31-31.4.3/debian/patches/libgit-1.3-compat.patch
--- 
golang-gopkg-libgit2-git2go.v31-31.4.3/debian/patches/libgit-1.3-compat.patch   
1969-12-31 16:00:00.0 -0800
+++ 
golang-gopkg-libgit2-git2go.v31-31.4.3/debian/patches/libgit-1.3-compat.patch   
2022-05-17 09:09:59.0 -0700
@@ -0,0 +1,21 @@
+Description: raise the upper bound for libgit compat
+ Generally best not to put upper version constraints in source code, we don't
+ know the future.
+Author: Steve Langasek 
+Bug-Debian: https://bugs.debian.org/1010505
+Last-Update: 2022-05-17
+Forwarded: no
+
+Index: golang-gopkg-libgit2-git2go.v31-31.4.3/git_system_dynamic.go
+===
+--- golang-gopkg-libgit2-git2go.v31-31.4.3.orig/git_system_dynamic.go
 golang-gopkg-libgit2-git2go.v31-31.4.3/git_system_dynamic.go
+@@ -7,7 +7,7 @@
+ #cgo CFLAGS: -DLIBGIT2_DYNAMIC
+ #include 
+ 
+-#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 1
++#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 1 || LIBGIT2_VER_MINOR > 3
+ # error "Invalid libgit2 version; this git2go supports libgit2 between v1.1.0 
and v1.1.0"
+ #endif
+ */
diff -Nru golang-gopkg-libgit2-git2go.v31-31.4.3/debian/patches/series 
golang-gopkg-libgit2-git2go.v31-31.4.3/debian/patches/series
--- golang-gopkg-libgit2-git2go.v31-31.4.3/debian/patches/series
2021-08-29 09:48:38.0 -0700
+++ golang-gopkg-libgit2-git2go.v31-31.4.3/debian/patches/series
2022-05-17 09:08:10.0 -0700
@@ -1 +1,2 @@
 Skip-remote-tests.patch
+libgit-1.3-compat.patch


Bug#1010505: golang-gopkg-libgit2-git2go.v31 autopkgtest failure with libgit2 1.3

2022-05-02 Thread Peter Michael Green

Package: golang-gopkg-libgit2-git2go.v31
Version: 31.4.3-4
Severity: serious

The autopkgtest for golang-gopkg-libgit2-git2go.v31 is failing with 
libgit2 1.3

and hence blocking the transition.

https://ci.debian.net/data/autopkgtest/testing/amd64/g/golang-gopkg-libgit2-git2go.v31/21329197/log.gz




github.com/libgit2/git2go/v31
# github.com/libgit2/git2go/v31
src/github.com/libgit2/git2go/v31/git_system_dynamic.go:11:3: error: #error "Invalid 
libgit2 version; this git2go supports libgit2 between v1.1.0 and v1.1.0"
11 | # error "Invalid libgit2 version; this git2go supports libgit2 between 
v1.1.0 and v1.1.0"
   |   ^