It appears that git_remote_connect has added a new parameter called "proxy" of 
type git_proxy_options in the second to last position.

Unfortunately the documentation seems to be very thin on the ground. In 
particular it says nothing about whether this new parameter can simply be set 
to NULL or if it needs some other kind of handling. So I went digging in the 
libgit2 source.

git_remote_connect seems to do some kind of version check on the proxy options if 
they are not null which suggests that they can be NULL. it then passes them off to 
t->connect.

Afaict for the standard transports t->connect will point to git_smart__connect 
which passes the proxy options to git_proxy_options_dup and fails if 
git_proxy_options_dup fails.

And it appears that git_proxy_options_dup succeeds if the source is NULL 
filling in a default set of proxy options.

So it looks like it is safe to set the "proxy" parameter to NULL.

ccing the libgit2 maintainers so they can check my analysis and preferablly get 
some statements on this added to the documentation.

I have tested that setting the new parameter to NULL makes the package build. I 
have not tested it beyond that. I have uploaded the change to raspbian.

No immediate intent to NMU in Debian but if I get positive feedback on the 
patch I may do so later.

diff -Nru fritzing-0.9.3b+dfsg/debian/changelog 
fritzing-0.9.3b+dfsg/debian/changelog
--- fritzing-0.9.3b+dfsg/debian/changelog       2017-01-23 16:27:29.000000000 
+0000
+++ fritzing-0.9.3b+dfsg/debian/changelog       2017-09-21 02:21:45.000000000 
+0000
@@ -1,3 +1,10 @@
+fritzing (0.9.3b+dfsg-4+rpi1) buster-staging; urgency=medium
+
+  * Set new "proxy" parameter in git_remote_connect to NULL (Closes: 872847)
+  * Bump libgit2 build-dependency to >= 0.25 due to above patch.
+
+ -- Peter Michael Green <plugw...@raspbian.org>  Thu, 21 Sep 2017 02:21:45 
+0000
+
 fritzing (0.9.3b+dfsg-4) unstable; urgency=medium
 
   * created a shell script to launch fritzing with a special pwd.
diff -Nru fritzing-0.9.3b+dfsg/debian/control 
fritzing-0.9.3b+dfsg/debian/control
--- fritzing-0.9.3b+dfsg/debian/control 2016-11-01 12:05:59.000000000 +0000
+++ fritzing-0.9.3b+dfsg/debian/control 2017-09-21 02:21:45.000000000 +0000
@@ -11,7 +11,7 @@
                libqt5svg5-dev,
                zlib1g-dev,
                libboost-dev,
-               libgit2-dev (>= 0.24.1),
+               libgit2-dev (>= 0.25),
                sqlite3
 Standards-Version: 3.9.8
 Vcs-Browser: https://bazaar.launchpad.net/~ehbello/fritzing/debian/changes
diff -Nru fritzing-0.9.3b+dfsg/debian/patches/add-proxy-parameter.diff 
fritzing-0.9.3b+dfsg/debian/patches/add-proxy-parameter.diff
--- fritzing-0.9.3b+dfsg/debian/patches/add-proxy-parameter.diff        
1970-01-01 00:00:00.000000000 +0000
+++ fritzing-0.9.3b+dfsg/debian/patches/add-proxy-parameter.diff        
2017-09-21 02:21:45.000000000 +0000
@@ -0,0 +1,14 @@
+Description:  Set new "proxy" parameter in git_remote_connect to NULL
+Author: Peter Michael Green <plugw...@raspbian.org>
+
+--- fritzing-0.9.3b+dfsg.orig/src/version/partschecker.cpp
++++ fritzing-0.9.3b+dfsg/src/version/partschecker.cpp
+@@ -123,7 +123,7 @@ bool PartsChecker::newPartsAvailable(con
+      */
+     git_strarray customheaders;
+     customheaders.count = 0;
+-    error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, 
&customheaders);
++    error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks,NULL, 
&customheaders);
+     if (error) {
+         partsCheckerResult.partsCheckerError = PARTS_CHECKER_ERROR_REMOTE;
+         partsCheckerResult.errorMessage = QObject::tr("Unable to access 
network site for '%1'. %2").arg(repoPath).arg(sBoilerPlate1);
diff -Nru fritzing-0.9.3b+dfsg/debian/patches/series 
fritzing-0.9.3b+dfsg/debian/patches/series
--- fritzing-0.9.3b+dfsg/debian/patches/series  2017-01-23 16:27:29.000000000 
+0000
+++ fritzing-0.9.3b+dfsg/debian/patches/series  2017-09-21 02:21:45.000000000 
+0000
@@ -4,3 +4,4 @@
 git-remote-connect.patch
 no-isystem-for-gcc6.patch
 fritzing.desktop.patch
+add-proxy-parameter.diff

Reply via email to