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.000000000 -0800
+++ 
golang-gopkg-libgit2-git2go.v31-31.4.3/debian/patches/libgit-1.3-compat.patch   
    2022-05-17 09:09:59.000000000 -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 <steve.langa...@ubuntu.com>
+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 <git2.h>
+ 
+-#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.000000000 -0700
+++ golang-gopkg-libgit2-git2go.v31-31.4.3/debian/patches/series        
2022-05-17 09:08:10.000000000 -0700
@@ -1 +1,2 @@
 Skip-remote-tests.patch
+libgit-1.3-compat.patch

Reply via email to