From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leo Famulari Subject: bug#33100: [libssh] fatal: dumb http transport does not support shallow capabilities Date: Mon, 22 Oct 2018 13:07:34 -0400 Message-ID: <20181022170734.GB6300@jasmine.lan> References: <87zhv94as1.fsf@gmail.com> <87in1w90iu.fsf@gnu.org> <87va5w3rtj.fsf@gmail.com> <875zxupapd.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="NKoe5XOeduwbEQHU" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gEdgU-0002Tm-1d for bug-guix@gnu.org; Mon, 22 Oct 2018 13:08:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gEdgQ-0003OK-7j for bug-guix@gnu.org; Mon, 22 Oct 2018 13:08:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:60393) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gEdgP-0003Nu-Qs for bug-guix@gnu.org; Mon, 22 Oct 2018 13:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gEdgP-0004Iz-Kh for bug-guix@gnu.org; Mon, 22 Oct 2018 13:08:01 -0400 Sender: "Debbugs-submit" Resent-Message-ID: Content-Disposition: inline In-Reply-To: <875zxupapd.fsf@gnu.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 33100-done@debbugs.gnu.org, Maxim Cournoyer --NKoe5XOeduwbEQHU Content-Type: multipart/mixed; boundary="VrqPEDrXMn8OVzN4" Content-Disposition: inline --VrqPEDrXMn8OVzN4 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 22, 2018 at 11:55:26AM +0200, Ludovic Court=C3=A8s wrote: > Maxim Cournoyer skribis: > > It did end up working fine, although it took a large amout of time for > > doing what seems to be a checkout (4 min 46 s). I did some experiments > > and this is really the time it took to do a full clone of the libssh > > project. [...] > > It's a bit of a shame, given that the shallow clone takes about 2 > > seconds (!): Yeah, it's incredibly slow. The repo is not even 10 MB. At first, I too thought the HTTPS clone had stalled. Protocol duration ------------------------ https:// 217 sec git:// 10 sec git:// shallow 1.5 sec And of course, the shallow clone is 3.6 MB instead of 10 MB. > Switching to the git:// transport would seem like a reasonable > workaround=E2=80=94we=E2=80=99d lose encryption and authentication, but t= he latter is > covered by the content hash in the =E2=80=98origin=E2=80=99 anyway. >=20 > WDYT, Leo? Overall, I think the slowness doesn't matter too much, since we offer substitutes for the patched source code. However, here is a patch. Please feel free to apply it! I'll ask the libssh team to support "smart" HTTP Git. --VrqPEDrXMn8OVzN4 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="0001-gnu-libssh-Fetch-the-source-code-more-efficiently.patch" Content-Transfer-Encoding: quoted-printable =46rom 683713dd8f5d67e3f077d5d13c23e5556d8ad779 Mon Sep 17 00:00:00 2001 =46rom: Leo Famulari Date: Mon, 22 Oct 2018 13:00:55 -0400 Subject: [PATCH] gnu: libssh: Fetch the source code more efficiently. * gnu/packages/ssh.scm (libssh)[source]: Use the git:// protocol. --- gnu/packages/ssh.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/gnu/packages/ssh.scm b/gnu/packages/ssh.scm index e806fc80f..b93cb03a1 100644 --- a/gnu/packages/ssh.scm +++ b/gnu/packages/ssh.scm @@ -71,8 +71,14 @@ (source (origin (method git-fetch) (uri (git-reference - (url "https://git.libssh.org/projects/libssh.git") - (commit (string-append "libssh-" version)))) + ;; git.libssh.org does not support the fast "smart" H= TTP + ;; Git protocol. The "dumb" HTTP Git protocol is extr= emely + ;; slow, and does not support shallow clones, so we u= se the + ;; plain Git protocol despite its flaws. This offers = an + ;; incredible speedup and reduces the size of the the + ;; source by more than half. + (url "git://git.libssh.org/projects/libssh.git") + (commit (string-append "libssh-" version)))) (patches (search-patches "libssh-hostname-parser-bug.patch")) (sha256 (base32 --=20 2.19.1 --VrqPEDrXMn8OVzN4-- --NKoe5XOeduwbEQHU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEsFFZSPHn08G5gDigJkb6MLrKfwgFAlvOA9YACgkQJkb6MLrK fwj2nRAAyULtNR3TnVyjEzaCsgkSZOISogcmCR7po6YqjG0dRCTTmdzu/q4rfot0 10QKPLQOM8c7mFCeYCc2LJDaXEaeYnjiCrtwfd10/PyvHSyZeJBnDDo5xxaT42UQ T3AbC2acA2R/F41L4upH3tW0Xa0szFu7T8A1qZ+NjZjlJZ/hivO/rsVKiL03PCTi ICfPFijxkh//8OIAva4BYrqdcHurgKfwxuvFl/mt7ynR4NcppIL/YI9L5j9vq7mZ WeNJW+uCi59GTJU5CUWgvPqZ5QSwkgtKUBpSW4XoyBZzyQ7tNEUP0rMy2iF8y0AT 4ohqKMzR3/7anJ93HFfwcoQue+F9bMVGFP5Rk0/Bdmv2kxFxNE9mx2llDFbJAbQF gVJjesMoVUHnZWLp9dszWNfdK38wcu51E+9fU8DUsayYkfmSUbvgkv5OnxLc4ruE pNb/yXlEhYm21oJcl7Ju2W/yRZh26owS0n35yU/pAX6XyrsljLbuj0e0nal5/ZJV wh5O+swksHcRC4Pp4KKf43uKi2dHCuTnpY90sWWhAPUyb+tJb8I8FTCvIM4j/fuN vvEIoY3nqOM0amx7o7R1KCH83E3f1RaQFW8bgdaEONOfpJgnnQ36NdeR5vYtpye4 TlB96uIbw6SlFWcBdLNR+wokzAycGDwzmJy8mA1qCiSaBPTGRY4= =K/th -----END PGP SIGNATURE----- --NKoe5XOeduwbEQHU--