From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gDw1E5x57WJ86wAAbAwnHQ (envelope-from ) for ; Fri, 05 Aug 2022 22:12:12 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UN5LEpx57WIc2AAAG6o9tA (envelope-from ) for ; Fri, 05 Aug 2022 22:12:12 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F15963C16F for ; Fri, 5 Aug 2022 22:12:11 +0200 (CEST) Received: from localhost ([::1]:56216 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oK3g3-0004yn-6I for larch@yhetil.org; Fri, 05 Aug 2022 16:12:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40342) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oK3fu-0004yf-JN for bug-guix@gnu.org; Fri, 05 Aug 2022 16:12:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42647) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oK3fu-00070y-BD for bug-guix@gnu.org; Fri, 05 Aug 2022 16:12:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oK3fu-0000fl-4z for bug-guix@gnu.org; Fri, 05 Aug 2022 16:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#56398: (guix git) fails to check out repos with nested submodules Resent-From: =?UTF-8?Q?Andr=C3=A9?= Batista Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 Aug 2022 20:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56398 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 56398@debbugs.gnu.org Received: via spool by 56398-submit@debbugs.gnu.org id=B56398.16597302932550 (code B ref 56398); Fri, 05 Aug 2022 20:12:02 +0000 Received: (at 56398) by debbugs.gnu.org; 5 Aug 2022 20:11:33 +0000 Received: from localhost ([127.0.0.1]:60629 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oK3fQ-0000f4-Mp for submit@debbugs.gnu.org; Fri, 05 Aug 2022 16:11:33 -0400 Received: from mx1.riseup.net ([198.252.153.129]:43250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oK3fL-0000eo-72 for 56398@debbugs.gnu.org; Fri, 05 Aug 2022 16:11:31 -0400 Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 4LzxZ13PvmzDqq7; Fri, 5 Aug 2022 20:11:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1659730281; bh=/NpUKsMng68hPcjH+NUgYL4HWhjEr3Q8BDqSektQysg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=btMqGEvlBV5VX5TB+p3zfZfzy6ZqojlyNOSXioBme0xgZJu6QcVCw/fmUPRfDVpVr DTsVyAfeaiQzdxqBhJbBWdRAK9GgVnoiA5pdk8uNFxYMvfTX4giLyY084jz01Ui5Yh LxIQZCwwlkI7BfdUcFNUMJkVEX0bsEFHnGt+3mVE= X-Riseup-User-ID: C70D26318FB68A91AF912CA1BE6529FCFF2C184E76996D27A9FAF09CE8740F5D Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews2.riseup.net (Postfix) with ESMTPSA id 4LzxZ01YkCz1yWm; Fri, 5 Aug 2022 20:11:20 +0000 (UTC) Date: Fri, 5 Aug 2022 17:10:50 -0300 From: =?UTF-8?Q?Andr=C3=A9?= Batista Message-ID: References: <87sfnf4n7c.fsf@inria.fr> <87pmigxb5r.fsf@inria.fr> <87h72smd7r.fsf@inria.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87h72smd7r.fsf@inria.fr> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1659730332; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=m8x8D/jCdybjj0I4OZANtJh9cpUsCh2iv+yHaxdkOZo=; b=I1jpHrQ62EjFIt9Dk3I98neYTerGw21Jx7bjMslpwfv7CV3YN4BzOnWqIyp6eFPMJ0zFZc MIE38dhO8/zdnRHs3yoDzYxNma1KMHm5wNM3yi7p9AL7gepV8nS1pOX5hH4FBtbOUp9BWJ Y9+viCQ6M+7yEEno8mCrBYlsijkMZVjZteYhr5V0QCI8l7A29A9TdhkDXUqTJWbH1aMpgE zcz8sMSjGzq6c46EOB5N1oi8Q2uZ+gxwl5SY/jXZDOIQ0Pl4wBD/djkdF3i5HKcE/NbK7Q K6vYiUofdUEtV5ChGUAE/uU7dBmPeC8EDF5Zhk+2xrANPweej82Dy0DF1EvnDQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1659730332; a=rsa-sha256; cv=none; b=QlIMKp+ge7CMrOkYC1P2AkIJqdeW9thquGy+RhcroNQmNIpHMQ9P+YuviKoADHWY/vCAB9 qCkq1SijdLhBf7ATvpsYJp3CIBpkTrT3L7Or33a6wo/jYUwO21g5nceR5+pzV+f/gzK+CM zqnMVmuwMky23OvJkRRXFY5QNVrpL3DW/X4+RSUQcRxOHpey4+52Se46ObtU9veLlv+zNP tbGdU01kRTQGn5mdwN4O/KWh2YQeOEVw/25wZDAQBg0aA94+PZziHi9TtcHSp40xXHGEzE eUc3vC5wWMoaczeHxCiuJoObsfDwZhmCsoxCnMUrVWdGCsnzZBixp+PQLkNecg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riseup.net header.s=squak header.b=btMqGEvl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 8.00 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=riseup.net header.s=squak header.b=btMqGEvl; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: F15963C16F X-Spam-Score: 8.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: 2db4NuYactDC qui 04 ago 2022 às 13:59:20 (1659632360), ludovic.courtes@inria.fr enviou: > But you got a wrong hash I presume, because submodule weren’t actually > checked out, right? The submodule was not checked out, sure, but is it the wrong hash considering it's also not present on the remote repo? > The problem is that it papers over an actual libgit2 bug. Does it though? I'm trying to wrap my head over this, but I'm somewhat unsure that this isn't the intended - expected? - behaviour on this case: I've cloned gloo and issued 'git submodule status' and it returns nothing. I've also issued 'git submodule update --init --recursive' and it also does nothing. The documentation for git-submodule init[1] says "Initialize the submodules recorded in the index (which were _added and commited_ elsewhere)..." and it also says on 'add' subcommand "Add the given repo as a submodule at the given path to the changeset to be commited next to the current project..." The documentation for gitsubmodules[2] says that submodules can take the following forms: - a .git directory, a working directory, a gitlink and a .gitmodules; or - a working directory with an embedded .git directory (...) The description for libgit2's git_submodule_init (which would've been called if the error was GIT_ENOTFOUND and we were initializing it) only says "Copy submodule info into .git/config", which coincides with what 'git submodule init' does. There is also a git_submodule_add_setup routine which can be called to emulate what 'git submodule add' would've done. Finally, libgit2 provides a git_submodule_repo_init routine which would "set up the subrepository for a submodule in preparation for clone", instead of just copying the submodule info into .git/config as git_submodule_init does. So, I'm inclined to think that this is not a bug on libgit2, but a result of gloo having misconfigured its submodule and it's not surprising that 'git_submodule_update' is erroring out. If so, any program using this library should decide what to do with the returned error, right? > I think we should instead report it upstream. Do you feel like doing > it? I guess we’d need to give them the C version of the three-line > snippet I gave earlier. > > WDYT? "Feel like doing it" is a stretch, but I'll gladly do it so that at least we will know that they've considered this scenario and, if they agree with you, we and other users may have a proper fix. Let's see if I can conjure some C incantation. Cheers! [1] https://git-scm.com/docs/git-submodule [2] https://git-scm.com/docs/gitsubmodules