From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 14 12:47:49 2023 Received: (at submit) by debbugs.gnu.org; 14 Sep 2023 16:47:49 +0000 Received: from localhost ([127.0.0.1]:40987 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgpVM-0000Em-OA for submit@debbugs.gnu.org; Thu, 14 Sep 2023 12:47:49 -0400 Received: from lists.gnu.org ([2001:470:142::17]:38942) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qgpVL-0000Du-KG for submit@debbugs.gnu.org; Thu, 14 Sep 2023 12:47:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qgpV6-0002KP-0j for bug-guix@gnu.org; Thu, 14 Sep 2023 12:47:34 -0400 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qgpV4-0003DF-90 for bug-guix@gnu.org; Thu, 14 Sep 2023 12:47:31 -0400 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-404724ec0dcso2101875e9.1 for ; Thu, 14 Sep 2023 09:47:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694710048; x=1695314848; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=tFK28Hxl8lXkN4TqNm3gMvimG/Yz4WPx+X/3hEZLbOA=; b=ls+zlBbnJ3nxYk233hSFp3pCBC2zse9eDxTxivxCI4I8uduGRl0tTJIJY5CggErvWy a6tgRx7/IMi4kenDSY3qJpCZeK0kbYlnRR7mo8pz4wp+rHx1ThP1QFPli+9Kh1QycfQx d+zxDaNBodTkOEe0uHzYv8tjeU3rkpeqdJKvVoIdHTDUQ9MvgHCPDlmyZgGQlRTKiIdY l7zkEferka28Wtdq0eVghaxL+MDnW39c4FIm2tWlVMcaSk/VuhBgueTiyqgYvXdY4Ig6 9doiEbqjitgCE6K20xtpCYpykfJPBIGvMS20Eis8/ESbdYJfMO2R8FPIlRnvVnc1DtC+ qiiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694710048; x=1695314848; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=tFK28Hxl8lXkN4TqNm3gMvimG/Yz4WPx+X/3hEZLbOA=; b=WvHFy7pd/Gvy1VLkh30LWhFKGAWOeOvuShZR/4K4B9OzXFX8prfuwsoi7cJdzutPJP MfIkQ1M36WpQa6G7J6970T+gBBsNNUjQ8pup+CKdriITlBqOCXDBvxNgRCHkhqh7dgT/ iSSFXNP4OJmAGDbOJ5pcTQhS3GdsPsV7qtjXcyV3wCwaW42eIiP54vpNTGpVTBjFMf8m GV+8goCNB/9x/LH1Fa/zynzQPvvfVAjgpHrs3leRbC4uEvUsPzx4v9RaT/pom7vsxRpD ytOEaW+Sj/O4ntjRxFFrWBx8OcaknOmtUtqAoYi1WexU2nSAzHR+3ruZ8e8Tlu5c7ajv texw== X-Gm-Message-State: AOJu0Yz3CZBCEZ6fxoAi7J0oK3Asma50rLvSIeibgNFoq5Q2JCZRCpJo BLu21MQi5GtlMLSKz0O2KGQve81urUI= X-Google-Smtp-Source: AGHT+IHoTPgiQI2wCaSi6fmb7jGfsaUtPdPmvN8pPVJwcY1QFOnEw5HqokMZoPp3aIsYRRPwf/4kSQ== X-Received: by 2002:a05:600c:792:b0:401:db82:3eda with SMTP id z18-20020a05600c079200b00401db823edamr5078240wmo.1.1694710047594; Thu, 14 Sep 2023 09:47:27 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id n4-20020a1c7204000000b00402f713c56esm2425275wmc.2.2023.09.14.09.47.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 09:47:27 -0700 (PDT) From: Simon Tournier To: bug-guix@gnu.org Subject: incorrect =?utf-8?B?4oCcZ3VpeCBoYXNo4oCd?= for FastQC Date: Thu, 14 Sep 2023 18:46:05 +0200 Message-ID: <87v8ccd7oy.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hi, Currently Guix stores in its source the hash 00y9drm0bkpxw8xfl8ysss18jmnhj8blgqgr6fpa58rkpfcbg8qk and this has not changed since February (Guix revision b6a4fbb488f1f539ae45ed7924c9af8905fa0d8b). Well, because the origin contains a snippet, =E2=80=9Cguix build -S=E2=80= =9D does not return the result of the fixed derivation. Instead, it is one or the other: --8<---------------cut here---------------start------------->8--- $ guix gc -R $(guix build -S fastqc -d) | grep checkout.drv /gnu/store/8gxx74w8pa0fx74lx1ka654rhyyr51cs-fastqc-0.11.9-checkout.drv /gnu/store/7rdcyl7iq00xfdwh6azgmc3i7mr2769b-fastqc-0.11.9-checkout.drv --8<---------------cut here---------------end--------------->8--- Let pick the correct one and I get: --8<---------------cut here---------------start------------->8--- $ guix hash -rx $(guix build /gnu/store/8gxx74w8pa0fx74lx1ka654rhyyr51cs-fa= stqc-0.11.9-checkout.drv) 0jyk90kg6s62w3dn6qjx9nrawjs12qx172lii0yxbvsfylhnx479 --8<---------------cut here---------------end--------------->8--- Oh, it is not the expected result! Instead, I have to omit the option =E2=80=99-x=E2=80=99: --8<---------------cut here---------------start------------->8--- $ guix hash -r $(guix build /gnu/store/8gxx74w8pa0fx74lx1ka654rhyyr51cs-fas= tqc-0.11.9-checkout.drv) 00y9drm0bkpxw8xfl8ysss18jmnhj8blgqgr6fpa58rkpfcbg8qk --8<---------------cut here---------------end--------------->8--- Hum, I am missing something=E2=80=A6 Let clone from upstream. --8<---------------cut here---------------start------------->8--- $ git clone https://github.com/s-andrews/FastQC $ git -C FastQC checkout v0.11.9 $ guix hash -rx FastQC 0jyk90kg6s62w3dn6qjx9nrawjs12qx172lii0yxbvsfylhnx479 --8<---------------cut here---------------end--------------->8--- Ah=E2=80=A6 incorrect but consistent with previously. The question is why = is this following, --8<---------------cut here---------------start------------->8--- $ mv FastQC/.git bye-bye $ guix hash -r FastQC 00y9drm0bkpxw8xfl8ysss18jmnhj8blgqgr6fpa58rkpfcbg8qk --8<---------------cut here---------------end--------------->8--- is correct? And obviously without .git we get the same hash just as above, --8<---------------cut here---------------start------------->8--- $ guix hash -rx FastQC 0jyk90kg6s62w3dn6qjx9nrawjs12qx172lii0yxbvsfylhnx479 --8<---------------cut here---------------end--------------->8--- Any idea? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 26 09:00:58 2023 Received: (at 65979) by debbugs.gnu.org; 26 Sep 2023 13:00:58 +0000 Received: from localhost ([127.0.0.1]:47593 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ql7gQ-0003u2-37 for submit@debbugs.gnu.org; Tue, 26 Sep 2023 09:00:58 -0400 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]:40993) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ql7gM-0003tl-Ki for 65979@debbugs.gnu.org; Tue, 26 Sep 2023 09:00:56 -0400 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-405e48d8e72so4893905e9.0 for <65979@debbugs.gnu.org>; Tue, 26 Sep 2023 06:00:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695733235; x=1696338035; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NGcq2wl0CEQTUvmrljXyxYYWph6B2s32n47apr4bjB4=; b=Q6LXrIlXAQAdH1YwgzTcikiLLM3iZ5WRMtAFyY4z2KzlUxnxzm1PgV+a6P4O66G1dz sVtgBWSgRfVQI2pC6V3XCEIAYlt7zSgL/QbgXkbM+5f03Ja7lm5jaUjvOip/Jbjy5HIn vhZMiWy4qRSxpdAMoQeU0sXNnWkRm7E86zGStEawGm55M0KS+WnDwX+MLCi5tYJKpvSn xivtN7TFRiecQry/GvEofNRTsperUML7xs28mcLDABI1bUL/vvhGjOuS9aSo1qy/4whR izcBAvdXqdpjLoh3ebR/9ZLKxcRX0+Rof+RberukEKysLCgdCdYGVokn6yEr4JifDxzK 6Lkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695733235; x=1696338035; h=content-transfer-encoding:mime-version:user-agent:message-id :in-reply-to:date:references:subject:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NGcq2wl0CEQTUvmrljXyxYYWph6B2s32n47apr4bjB4=; b=xOYp5Z911QwnDIJzM3wcpq9T5ZbHCTVqiHCIMmsmFrRjJyqqDOyW96bV+zyJI278Oh m8CV2WNbNGL4G8L+k+l7/8tfD4KwcSP5KhbjKiX+IiOYjIrPPWDLUcET1dx5XIusCq5y jlIv0RoUxWHh+VilvugzHCKN08FhQ2P1OOWBbqV13s0fFfExcdDpTxkq5FExS7tYzGNg 2S96y0syv0M4I9Lqck0D0o5M8j0e+Afbe7IoNaHT8vjOJtLOBSgoBsdLh2i/K/vx1HM0 ExwbwJ9cT9dSgzGXUFbSxHdVF2sYJLR6TYiBMisPmJ2s096c/y6haxmlpkppq3/cJO7v q+Jw== X-Gm-Message-State: AOJu0Yxd9JYAAJCRvumMorinHiPtcFeOo2inhrEruXPbyC1lR5G79jc6 H0ogA+NE+SEUZonA0GMo3duy0X/+jFo= X-Google-Smtp-Source: AGHT+IEChKlJisXl0thkpi3bPs11nL/rMnmxGbdiux6O4TsA8/ZJ+CxB3s4yKnfhaSWLLmi3478mkQ== X-Received: by 2002:a05:600c:4d1f:b0:404:74bf:fb3e with SMTP id u31-20020a05600c4d1f00b0040474bffb3emr8706272wmp.2.1695733229184; Tue, 26 Sep 2023 06:00:29 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id r9-20020a5d4989000000b0031c5ce91ad6sm14609828wrq.97.2023.09.26.06.00.27 for <65979@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Sep 2023 06:00:28 -0700 (PDT) From: Simon Tournier To: 65979@debbugs.gnu.org Subject: Re: bug#65979: incorrect =?utf-8?B?4oCcZ3VpeCBoYXNo4oCd?= for FastQC References: <87v8ccd7oy.fsf@gmail.com> Date: Tue, 26 Sep 2023 15:00:25 +0200 In-Reply-To: <87v8ccd7oy.fsf@gmail.com> (Simon Tournier's message of "Thu, 14 Sep 2023 18:46:05 +0200") Message-ID: <87fs313x92.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65979 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Thu, 14 Sep 2023 at 18:46, Simon Tournier wro= te: > $ guix hash -rx $(guix build /gnu/store/8gxx74w8pa0fx74lx1ka654rhyyr51cs-= fastqc-0.11.9-checkout.drv) > 0jyk90kg6s62w3dn6qjx9nrawjs12qx172lii0yxbvsfylhnx479 > > Oh, it is not the expected result! Instead, I have to omit the option > =E2=80=99-x=E2=80=99: > > $ guix hash -r $(guix build /gnu/store/8gxx74w8pa0fx74lx1ka654rhyyr51cs-f= astqc-0.11.9-checkout.drv) > 00y9drm0bkpxw8xfl8ysss18jmnhj8blgqgr6fpa58rkpfcbg8qk [...] > $ git clone https://github.com/s-andrews/FastQC > $ git -C FastQC checkout v0.11.9 > $ guix hash -rx FastQC > 0jyk90kg6s62w3dn6qjx9nrawjs12qx172lii0yxbvsfylhnx479 [...] > $ mv FastQC/.git bye-bye > $ guix hash -r FastQC > 00y9drm0bkpxw8xfl8ysss18jmnhj8blgqgr6fpa58rkpfcbg8qk [...] > Any idea? The issue is from .svn folders. --8<---------------cut here---------------start------------->8--- $ find $(guix build /gnu/store/8gxx74w8pa0fx74lx1ka654rhyyr51cs-fastqc-0.11= .9-checkout.drv) \ -type d -name ".svn" -print /gnu/store/5dyvjgylwiixhp8z9a08rnddh53h4cdx-fastqc-0.11.9-checkout/Help/1 I= ntroduction/.svn /gnu/store/5dyvjgylwiixhp8z9a08rnddh53h4cdx-fastqc-0.11.9-checkout/Help/3 A= nalysis Modules/.svn /gnu/store/5dyvjgylwiixhp8z9a08rnddh53h4cdx-fastqc-0.11.9-checkout/Help/2 B= asic Operations/.svn --8<---------------cut here---------------end--------------->8--- The option =E2=80=99-x=E2=80=99 excludes them; see vcs-file? from (guix has= h) module, and let confirm: $ git clone https://github.com/s-andrews/FastQC $ git -C FastQC checkout v0.11.9 $ guix hash -rx FastQC 0jyk90kg6s62w3dn6qjx9nrawjs12qx172lii0yxbvsfylhnx479 $ find FastQC -type d -name ".svn" -exec rm -r "{}" \; $ mv FastQC/.git bye-bye $ guix hash -r FastQC 0jyk90kg6s62w3dn6qjx9nrawjs12qx172lii0yxbvsfylhnx479 Therefore, we have a discrepancy between =E2=80=9Cguix hash=E2=80=9D comman= d-line and checksum verification from =E2=80=99source=E2=80=99 field. The package definition reads: (source (origin (method git-fetch) (uri (git-reference (url "https://github.com/s-andrews/FastQC") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "00y9drm0bkpxw8xfl8ysss18jmnhj8blgqgr6fpa58rkpfcbg8qk")) when this hash contains .svn subfolders that are excluded by =E2=80=99-x=E2= =80=99 command-line option. What do we fix? The procedure vcs-file? or fixed-output computation? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 26 09:30:18 2023 Received: (at 65979) by debbugs.gnu.org; 26 Sep 2023 13:30:18 +0000 Received: from localhost ([127.0.0.1]:47607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ql88o-0004bV-A0 for submit@debbugs.gnu.org; Tue, 26 Sep 2023 09:30:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47782) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ql88l-0004bD-RP for 65979@debbugs.gnu.org; Tue, 26 Sep 2023 09:30:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ql88T-00034F-9m; Tue, 26 Sep 2023 09:29:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=tJ31ATEluLtxj2kT07K+TSGRbxDPgHurZDi734utu9Y=; b=hxZUJB76XM+5Sy4brQ6B jtKzfJXiG0TZ1NGbj8xQIZPJrnIeI6oh75uFxZDWoEwjms22Q4HcHCUJT+E3Sl4hDgj8VgQRQl/cE nmJYt6Cw0Rsc6eEIno0z5EVVKqJXzhNh3zbRLU2BNcRlz9FLaf9B4aQ2Jmdf1osNERRwuUTQngzYH C+ToSjzsTxu1NDDA8hzPWKNTYvthEIajzizLpL9XTtWoqliIuNxqdVkUQIAOnztNDdhqRTshkJIlL C/9WVOkiQN+Ig23OJp0Nn7uSqaxXZ3G2zBcKTfIA8XstVQRYBKoiBpQ87XLau3VjdmrKB11HcO2qe rWUkxQZnp10oJg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon Tournier Subject: Re: bug#65979: incorrect =?utf-8?B?4oCcZ3VpeCBoYXNo4oCd?= for FastQC References: <87v8ccd7oy.fsf@gmail.com> Date: Tue, 26 Sep 2023 15:29:53 +0200 In-Reply-To: <87v8ccd7oy.fsf@gmail.com> (Simon Tournier's message of "Thu, 14 Sep 2023 18:46:05 +0200") Message-ID: <87wmwd2hbi.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65979 Cc: 65979@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi! Simon Tournier skribis: > Let pick the correct one and I get: > > $ guix hash -rx $(guix build /gnu/store/8gxx74w8pa0fx74lx1ka654rhyyr51cs-= fastqc-0.11.9-checkout.drv) > 0jyk90kg6s62w3dn6qjx9nrawjs12qx172lii0yxbvsfylhnx479 > > > Oh, it is not the expected result! Instead, I have to omit the option > =E2=80=99-x=E2=80=99: > > $ guix hash -r $(guix build /gnu/store/8gxx74w8pa0fx74lx1ka654rhyyr51cs-f= astqc-0.11.9-checkout.drv) > 00y9drm0bkpxw8xfl8ysss18jmnhj8blgqgr6fpa58rkpfcbg8qk This is because: --8<---------------cut here---------------start------------->8--- $ find $( guix build /gnu/store/8gxx74w8pa0fx74lx1ka654rhyyr51cs-fastqc-0.1= 1.9-checkout.drv) -name .svn /gnu/store/5dyvjgylwiixhp8z9a08rnddh53h4cdx-fastqc-0.11.9-checkout/Help/3 A= nalysis Modules/.svn /gnu/store/5dyvjgylwiixhp8z9a08rnddh53h4cdx-fastqc-0.11.9-checkout/Help/1 I= ntroduction/.svn /gnu/store/5dyvjgylwiixhp8z9a08rnddh53h4cdx-fastqc-0.11.9-checkout/Help/2 B= asic Operations/.svn --8<---------------cut here---------------end--------------->8--- Not a bug, IMO (=E2=80=98vcs-file?=E2=80=99 shouldn=E2=80=99t try to be sma= rt in this case.) Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 26 09:35:09 2023 Received: (at 65979) by debbugs.gnu.org; 26 Sep 2023 13:35:09 +0000 Received: from localhost ([127.0.0.1]:47618 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ql8DV-0004hm-Dk for submit@debbugs.gnu.org; Tue, 26 Sep 2023 09:35:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ql8DT-0004hY-Id for 65979@debbugs.gnu.org; Tue, 26 Sep 2023 09:35:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ql8DB-0004AS-6P; Tue, 26 Sep 2023 09:34:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=puPkpq3IyiYw4ii5CkjUabmfcCsPZEcGSWwMWRD7ro8=; b=lLbSuU4RZvcuR7jKTZXC T0WwVq3q+GT+KhJCCs1+yC6aY9WlXsbmaYYHz8p3gMfnVu/lE12MxhmUx4FWHPA3vavpERZxXKTPq vlynttLPZB3+VVI6tr8G2ZWCTi+hfGOSNV+CcdE4tbmoPJYkHChVK5VaifFgsvZ3wLGlybwyUkA7s TJWkxUbb1HqzDuX8Ad/Yfco+ZxlPC+WIVe5M+Sm6uFAv3xQrEeAIKEfAo00KMKXXoi/owTpKd6cxD iAArZXAoink8eb/pLmE8xbRG6yGcJlvNmFKTK1GxHqt5v2A583w3zoenkPz2YsgTzCc4EB9fd9glf EVJHyr4lb0RP8g==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon Tournier Subject: Re: bug#65979: incorrect =?utf-8?B?4oCcZ3VpeCBoYXNo4oCd?= for FastQC References: <87v8ccd7oy.fsf@gmail.com> <87fs313x92.fsf@gmail.com> Date: Tue, 26 Sep 2023 15:34:47 +0200 In-Reply-To: <87fs313x92.fsf@gmail.com> (Simon Tournier's message of "Tue, 26 Sep 2023 15:00:25 +0200") Message-ID: <87pm252h3c.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65979 Cc: 65979@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) (Oops, now I see you had already found the reason.) Simon Tournier skribis: > What do we fix? The procedure vcs-file? or fixed-output computation? There are two things are: 1. =E2=80=98vcs-file?=E2=80=99, used by =E2=80=98guix hash -rx=E2=80=99; 2. =E2=80=98git-fetch=E2=80=99, which does (delete-file-recursively ".git= "). Clearly #2 is correct (it=E2=80=99s perfectly fine to have a =E2=80=98.svn= =E2=80=99 directory in a Git repo), whereas #1 is an approximation that, in corner cases like this one, gives the wrong answer. My take is that it=E2=80=99s OK to keep =E2=80=98vcs-file?=E2=80=99 as is: = the best we could do would be to add complicated heuristics in the hope corner cases like this one would be better dealt with, but it wouldn=E2=80=99t be bullet-proof anyway. WDYT? Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 26 12:23:32 2023 Received: (at 65979) by debbugs.gnu.org; 26 Sep 2023 16:23:32 +0000 Received: from localhost ([127.0.0.1]:49622 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlAqR-0001Id-P9 for submit@debbugs.gnu.org; Tue, 26 Sep 2023 12:23:32 -0400 Received: from mail-qv1-xf34.google.com ([2607:f8b0:4864:20::f34]:41048) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qlAqQ-0001IR-4m for 65979@debbugs.gnu.org; Tue, 26 Sep 2023 12:23:31 -0400 Received: by mail-qv1-xf34.google.com with SMTP id 6a1803df08f44-637aaaf27f1so13798736d6.0 for <65979@debbugs.gnu.org>; Tue, 26 Sep 2023 09:23:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695745391; x=1696350191; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=/qQ9dtEriDduT2x6CjoX0ssZapISE/DvhJlU62QesKo=; b=NpEZlV0tHqbqz1+t34o9eEsTmAnVbINaBKZXGKGBc/LTPXd6wKgBH6YvUSABqL/rSp VeFPDIMmskE8XpKCvKo2lGbUNqGGvOV95AKcelUo4xNMUmUrgBdzlS4HlMLQMZsRc7Hn 0WcpSiclfpHPC9kz+gQbWxOozSbLhOlCw99W1QbyqG/zqFKuPfyj+J1+o00T3M3qEvIC zzjd/06MnQY8O+iiUqjuyDm6VJ2heooJIX+kbin4e8Y4bxyhiSK5tymnF9TlMKQ8IRm8 TDi1s7+DXA0IZp0/oiiL+S3SKCqDS+NfQ1mgsrm+6TcrrSGYI4IdgCU62PBTPe7qmllM id2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695745391; x=1696350191; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/qQ9dtEriDduT2x6CjoX0ssZapISE/DvhJlU62QesKo=; b=xAbVii6bXnUdzpLDDXnG4e5ungl0pQZhCS9UVRmzSAP8pC+HmEFkdU4QAjmyi+JFsR wwuZ2/kIN250fpJwJZSwIITeLdr+gHm5URocXhQUdav1oCRvs4zOGOFXSa/UW55I5CKQ B2TuIdjs/T+t78zHdfcW1w7HehYAKGanVZngYoLyO0M1Pv1enUZLq+KMbKcg4sPe3CLB /FD6sYPydI9CgyWJuIrXanKQPChCVSf07kZ3Lka0vGXBPqLMvt8n1tdzaxXMIpAeYA6f 9bRBiwZCmtbuepojxF/pzDCecr4Fx1g+JjlO105OPXTPgFsSctV+6WXCgM88LstbDqBh f3+w== X-Gm-Message-State: AOJu0YzlEHNo7DKYuTO8KCM0VQtpKT15qkugibCenLL/PNhgJq0vXjcG 2BE/+IqLQdyT2MJn0A+9/r/RGPhn9QiFjYoy/kU= X-Google-Smtp-Source: AGHT+IHm8iBIYTVnZF4c01rTL+AGxSyfGkQd3y28kXfocyumtokKlBy8AC0DCzZe6fTpxLQLt80S/uaglXA38Y8kKHQ= X-Received: by 2002:a05:6214:9c3:b0:65a:fc68:be20 with SMTP id dp3-20020a05621409c300b0065afc68be20mr8663250qvb.3.1695745391449; Tue, 26 Sep 2023 09:23:11 -0700 (PDT) MIME-Version: 1.0 References: <87v8ccd7oy.fsf@gmail.com> <87fs313x92.fsf@gmail.com> <87pm252h3c.fsf@gnu.org> In-Reply-To: <87pm252h3c.fsf@gnu.org> From: Simon Tournier Date: Tue, 26 Sep 2023 18:23:00 +0200 Message-ID: Subject: =?UTF-8?B?UmU6IGJ1ZyM2NTk3OTogaW5jb3JyZWN0IOKAnGd1aXggaGFzaOKAnSBmb3IgRmFzdFFD?= To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65979 Cc: 65979@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Tue, 26 Sept 2023 at 15:34, Ludovic Court=C3=A8s wrote: > There are two things are: > > 1. =E2=80=98vcs-file?=E2=80=99, used by =E2=80=98guix hash -rx=E2=80=99= ; > > 2. =E2=80=98git-fetch=E2=80=99, which does (delete-file-recursively ".g= it"). Yes. > Clearly #2 is correct (it=E2=80=99s perfectly fine to have a =E2=80=98.sv= n=E2=80=99 directory in > a Git repo), whereas #1 is an approximation that, in corner cases like > this one, gives the wrong answer. These corner cases matter for some SWH loader implementing Nar hashes in Python. Since they load sources.json (conversion of hash checksum from package recipe), read the Nar hash and compare it with the one they internal compute, then they need to implement in Python the correct behavior. See https://gitlab.softwareheritage.org/swh/devel/swh-loader-git/-/issues/4= 751#note_149180 and all the thread for context. > My take is that it=E2=80=99s OK to keep =E2=80=98vcs-file?=E2=80=99 as is= : the best we could do > would be to add complicated heuristics in the hope corner cases like > this one would be better dealt with, but it wouldn=E2=80=99t be bullet-pr= oof > anyway. Well, the question is what other VCS as 'svn-fetch', etc. are doing? Maybe, we can just have a special case for Git repository. Somehow, since the problem needs to be solved for SWH, the same solution applies for vcs-file? and "guix hash", no? Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 01 11:07:26 2023 Received: (at 65979) by debbugs.gnu.org; 1 Oct 2023 15:07:26 +0000 Received: from localhost ([127.0.0.1]:35128 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmy2Y-0003Ip-DH for submit@debbugs.gnu.org; Sun, 01 Oct 2023 11:07:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34914) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmy2W-0003I0-9R for 65979@debbugs.gnu.org; Sun, 01 Oct 2023 11:07:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qmy2A-0007GV-VS; Sun, 01 Oct 2023 11:07:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=5BmlIUsr2sAflZARO6LclptVBO9DB/8K7r/LYSv7QPA=; b=Wwfrv+oZhmtAU42Y3+V5 SCxHcn8nVmK/+b7zHuR38yG4kXWh47G3rZlKbwpIazrvhdKNg15hpyg8JDlXEPrBG2wD6exab+j0M 2BBHnZqDLX4bCpKaGq5wNWELmmvLXCcG5TW8RUlWkSeXKRcUlSgnJmMycia2mszFC70LRiQg/BF9/ Mvdx3Vl7OhQIWntMZTI7uOv6WVv6PmH2FTd1tViWQHPIaagjTsKOadpYOSAyb46Jvwmx0X7pppedZ Msd1hEHOmFgATlqqBh4F602NLwzxSjzHS1t2VPlZygU2/LlYRAg9ZPVUgbam6BvX4zy9+pAxJoQM7 VLXpjzn6INT2Rw==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Simon Tournier Subject: Re: bug#65979: incorrect =?utf-8?B?4oCcZ3VpeCBoYXNo4oCd?= for FastQC References: <87v8ccd7oy.fsf@gmail.com> <87fs313x92.fsf@gmail.com> <87pm252h3c.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: =?utf-8?Q?D=C3=A9cadi?= 10 =?utf-8?Q?Vend=C3=A9miair?= =?utf-8?Q?e?= an 232 de la =?utf-8?Q?R=C3=A9volution=2C?= jour de la Cuve X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Sun, 01 Oct 2023 17:07:01 +0200 In-Reply-To: (Simon Tournier's message of "Tue, 26 Sep 2023 18:23:00 +0200") Message-ID: <87pm1ys7oq.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65979 Cc: 65979@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Simon Tournier skribis: [...] >> Clearly #2 is correct (it=E2=80=99s perfectly fine to have a =E2=80=98.s= vn=E2=80=99 directory in >> a Git repo), whereas #1 is an approximation that, in corner cases like >> this one, gives the wrong answer. > > These corner cases matter for some SWH loader implementing Nar hashes > in Python. Since they load sources.json (conversion of hash checksum > from package recipe), read the Nar hash and compare it with the one > they internal compute, then they need to implement in Python the > correct behavior. I agree, SWH needs something more robust than =E2=80=98vcs-file?=E2=80=99. >> My take is that it=E2=80=99s OK to keep =E2=80=98vcs-file?=E2=80=99 as i= s: the best we could do >> would be to add complicated heuristics in the hope corner cases like >> this one would be better dealt with, but it wouldn=E2=80=99t be bullet-p= roof >> anyway. > > Well, the question is what other VCS as 'svn-fetch', etc. are doing? Remove the relevant metadata directory/directories. > Maybe, we can just have a special case for Git repository. > > Somehow, since the problem needs to be solved for SWH, the same > solution applies for vcs-file? and "guix hash", no? Yes, =E2=80=98guix hash=E2=80=99 uses =E2=80=98vcs-file?=E2=80=99. Now, SWH does not use =E2=80=98guix hash=E2=80=99 (I suppose) so they=E2=80= =99ll have to address that on their side (in Python code I guess). Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Sun Oct 01 11:25:23 2023 Received: (at 65979) by debbugs.gnu.org; 1 Oct 2023 15:25:23 +0000 Received: from localhost ([127.0.0.1]:35153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmyJv-0003vW-AR for submit@debbugs.gnu.org; Sun, 01 Oct 2023 11:25:23 -0400 Received: from mail-ot1-x329.google.com ([2607:f8b0:4864:20::329]:40271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qmyJt-0003vC-Cx for 65979@debbugs.gnu.org; Sun, 01 Oct 2023 11:25:21 -0400 Received: by mail-ot1-x329.google.com with SMTP id 46e09a7af769-6bc9353be9bso2040202a34.1 for <65979@debbugs.gnu.org>; Sun, 01 Oct 2023 08:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696173898; x=1696778698; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0emxUY2Mx81P1MPqpcjfpshWWND5A+nqa7ArOwsT3kA=; b=MMMk6ZbrTOhU5H8kWK0WPcFp0MLN1L4vo/SoFzeES1YqbyNmImlXp35c6/5FCqWM96 /qbYVlFCxqJh7s6LUhnX9Yz0tRPQ8ncQWqrIaQKUZ5j0VyX6oB1HOkgPRf7D8gz1VoEo pNQGBbbA5mEP1GrypGJxhz/vz8rf8bLJaWlQzy4dgkxSPjUxS5p7L29a4o7c/6JqYrlw Dj4T8lKt/KTv+JjY46Q4WvOW4GIw4L9Q5AwHRNyZ/KaV1zWfIOhH3YdrLQoEHZCQBrP5 EDSxczhL8cRC3/MqvmsBuP4iIji4VmrdtD7vjUY+LCsj3Fh9xKB9smC/ubeqaT9s40ro 7ARg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696173898; x=1696778698; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0emxUY2Mx81P1MPqpcjfpshWWND5A+nqa7ArOwsT3kA=; b=sNYnO/dbAKjxtppofKPOr5lNV+5T9FpfPIpFB8Z2OqEGyHFKyw7ctQs9e5POfPtCOb IdGvos2SWwukrZyhVtvuUpYVXcR+ZmHFbz6wQTXbU6etlT1y39FxQzWiwiZpWlvVnKvT vcfzriGeQuWkIqkKXdanTircfyEKWIc2UncY7USiXxrUMmI07enghzAj5jXOLprrIC+C seeruDU6k3KKAkdtH3sqXGFGEhqPx0ZTjhLx/lH4CwAr20XcqEhQfQ908hdHgtyhnaTY 5bP7ztkN0qWK2CBSMCW++7FDeaK8rZy/hw+gcF4gCGSeHc7VNWOPLCIQ0n8JAqnnOQ7f DBfA== X-Gm-Message-State: AOJu0Yx66d7f2KXMQStnIPd970eg6k5sIHK2aS+TvXNFNElcQgzGzIOk 1W3V+RUw/gXmpkfbyIFkS7LOmwi1PUUOpfndQ4I= X-Google-Smtp-Source: AGHT+IHmgWNF5XqaZGjbjKs+WukRbY22f3eQE5yu3MkFADD1WlFSqDDKUqzHSX4AQKuESQY1Vb6hN6j243IdFNl9DxA= X-Received: by 2002:a05:6870:8197:b0:1d6:4c63:7ba9 with SMTP id k23-20020a056870819700b001d64c637ba9mr11124318oae.3.1696173898541; Sun, 01 Oct 2023 08:24:58 -0700 (PDT) MIME-Version: 1.0 References: <87v8ccd7oy.fsf@gmail.com> <87fs313x92.fsf@gmail.com> <87pm252h3c.fsf@gnu.org> <87pm1ys7oq.fsf@gnu.org> In-Reply-To: <87pm1ys7oq.fsf@gnu.org> From: Simon Tournier Date: Sun, 1 Oct 2023 17:24:47 +0200 Message-ID: Subject: =?UTF-8?B?UmU6IGJ1ZyM2NTk3OTogaW5jb3JyZWN0IOKAnGd1aXggaGFzaOKAnSBmb3IgRmFzdFFD?= To: =?UTF-8?Q?Ludovic_Court=C3=A8s?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65979 Cc: 65979@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Sun, 1 Oct 2023 at 17:07, Ludovic Court=C3=A8s wrote: > >> My take is that it=E2=80=99s OK to keep =E2=80=98vcs-file?=E2=80=99 as= is: the best we could do > >> would be to add complicated heuristics in the hope corner cases like > >> this one would be better dealt with, but it wouldn=E2=80=99t be bullet= -proof > >> anyway. > > > > Well, the question is what other VCS as 'svn-fetch', etc. are doing? > > Remove the relevant metadata directory/directories. What does it mean "relevant"? :-) Where do I have to look to implement the exact same behaviour of what do the fetch methods? > Now, SWH does not use =E2=80=98guix hash=E2=80=99 (I suppose) so they=E2= =80=99ll have to address > that on their side (in Python code I guess). Yes for sure. It does not change the fact that "guix hash" has a bug. Cheers, simon From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 17 13:57:08 2023 Received: (at 65979) by debbugs.gnu.org; 17 Oct 2023 17:57:08 +0000 Received: from localhost ([127.0.0.1]:60993 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsoJY-0003mL-0i for submit@debbugs.gnu.org; Tue, 17 Oct 2023 13:57:08 -0400 Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:41380) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qsoJV-0003lq-Cd for 65979@debbugs.gnu.org; Tue, 17 Oct 2023 13:57:06 -0400 Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-32da02fca9aso1055775f8f.1 for <65979@debbugs.gnu.org>; Tue, 17 Oct 2023 10:56:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1697565394; x=1698170194; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=syAVNQTi/enekLVKGRMJ2FKc0iAepgiVrbvXijCGxBk=; b=MAfE/Ant0sU2mVv59uFXfmW1hqyTY8IjWrdmxuIy82IRsx2UbyjgJSDegEEpKiykTn v1A73Pj/2KTz1pHin7WhQleU32aLKDufeiJ7Xs1QIfDcTRjaFjH3McG63Ug8DM8K2GPm dTfpIJEYsJ2juvuFNDMX/EEsWMzqwP6lri/hHK8OVMNkzcVJkDtamCFKrrbvOeY4rpHk 7m1N8+Qr4dHXe06HeDOjLsgy3QixGb0pTfqSgy93vfOPMFuVuNZwMpyvF01MFWzzjGea EG3vL316Yh51M7jx5Eg4/gHr305KZOUJlA8OeBnAR3uDubLTYeAX93kVv/KqdcnaGOnR Fb+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697565394; x=1698170194; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=syAVNQTi/enekLVKGRMJ2FKc0iAepgiVrbvXijCGxBk=; b=gbWfW39ndq0V9Gaa0M38pYdXpQefkqNxY56rXILmtRBZijhUOyI1dkaD/WXWlgCsn9 7hW7205CRwpdVb2uKffs9JZoQF7C3XT9rxTmOx4irh/ih2PSZ+eKAD/HWiP5uKSV5Jmx KI91632WtwvMYfMZJIWRvBbeaY12tmIba/wkBzBBtSUAn2g+uUFG0MOD+gDllFWBD46w o+D6/mDu/sZ2r/nflPXtY8pI0e/GwwmOvLlzZ58CEzVKVZSA3olDbuYjVx2+GBP+2Rxu x5cOhDRx5mwPrlsiSwiwyI+y+Ei5iOS88nL0JnuQewRD18LkfJoA3DwYI3ncbgb0J5Eu gaug== X-Gm-Message-State: AOJu0Yx4HVvdJknAeuTfeLZig/NC6lLOBJGHhoGLHduWURk/39EwrrQZ mmGHA+kjv2rXehXSmHFPZbd7i6eu0zU= X-Google-Smtp-Source: AGHT+IH/470UJLUhh12W+/MuhkyB4cI7bBd16BlKLtsrPAT3EBAwY32v5PvJlJAUNIh5U4fzb8FvhQ== X-Received: by 2002:adf:fc07:0:b0:32d:c242:71ac with SMTP id i7-20020adffc07000000b0032dc24271acmr2551355wrr.1.1697565393822; Tue, 17 Oct 2023 10:56:33 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id v14-20020a5d4a4e000000b0032196c508e3sm267341wrs.53.2023.10.17.10.56.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 10:56:33 -0700 (PDT) From: Simon Tournier To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#65979: incorrect =?utf-8?B?4oCcZ3VpeCBoYXNo4oCd?= for FastQC In-Reply-To: <87pm252h3c.fsf@gnu.org> References: <87v8ccd7oy.fsf@gmail.com> <87fs313x92.fsf@gmail.com> <87pm252h3c.fsf@gnu.org> Date: Tue, 17 Oct 2023 19:56:28 +0200 Message-ID: <87r0ltp1yr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 65979 Cc: 65979@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, On Tue, 26 Sep 2023 at 15:34, Ludovic Court=C3=A8s wrote: > My take is that it=E2=80=99s OK to keep =E2=80=98vcs-file?=E2=80=99 as is= : the best we could do > would be to add complicated heuristics in the hope corner cases like > this one would be better dealt with, but it wouldn=E2=80=99t be bullet-pr= oof > anyway. Hum, I am probably pig-headed here. :-) I propose the change below. Well, it does not appear to me a complicated heuristics but I am biased. The idea is to detect at the repository root what is the kind of VCS, just by checking if .git (or .hg or .svn or etc.) exists or not. Then, only exclude this kind=E2=80=A6 = and not the whole list. And I think this way is almost bullet-proof, no? Or could you provide some contrived examples? WDYT? Obviously, this fixes the issue: --8<---------------cut here---------------start------------->8--- $ guix hash -rx /tmp/FastQC 0jyk90kg6s62w3dn6qjx9nrawjs12qx172lii0yxbvsfylhnx479 $ ./pre-inst-env guix hash -rx /tmp/FastQC 00y9drm0bkpxw8xfl8ysss18jmnhj8blgqgr6fpa58rkpfcbg8qk $ grep -A 15 'define-public fastqc' gnu/packages/bioinformatics.scm | grep = -C 1 base32 (sha256 (base32 "00y9drm0bkpxw8xfl8ysss18jmnhj8blgqgr6fpa58rkpfcbg8qk")) --8<---------------cut here---------------end--------------->8--- And I do not observe a regression using a couple of tests. Cheers, simon --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-scripts-hash-Handle-repository-several-VCS-folders.patch Content-Transfer-Encoding: quoted-printable Content-Description: p.patch >From 1bf6555e6a89248f079437b842dbaff9c107de9a Mon Sep 17 00:00:00 2001 Message-Id: <1bf6555e6a89248f079437b842dbaff9c107de9a.1697562942.git.zimon.= toutoune@gmail.com> From: Simon Tournier Date: Tue, 17 Oct 2023 18:53:04 +0200 Subject: [PATCH] scripts: hash: Handle repository several VCS folders. Fixes . Reported by Simon Tournier * guix/hash.scm (vcs-file?): Add optional argument for passing VCS kind of = the file/repository. (file-hash*): Adjust accordingly. * guix/scripts/hash.scm (guix-hash)[file-hash]: Detect VCS kind of the file/repository and passes it. --- guix/hash.scm | 18 ++++++++++++------ guix/scripts/hash.scm | 18 +++++++++++++----- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/guix/hash.scm b/guix/hash.scm index 3cb68e5c44..8fff51e8f1 100644 --- a/guix/hash.scm +++ b/guix/hash.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2021 Sarah Morgensen ;;; Copyright =C2=A9 2022 Maxime Devos +;;; Copyright =C2=A9 2023 Simon Tournier ;;; ;;; This file is part of GNU Guix. ;;; @@ -25,21 +26,26 @@ (define-module (guix hash) #:export (vcs-file? file-hash*)) =20 -(define (vcs-file? file stat) - "Returns true if FILE is a version control system file." +(define* (vcs-file? file stat + #:optional + (vcses (list ".bzr" ".git" ".hg" ".svn" "CVS"))) + "Returns true if FILE matches a version control system from the list VCS= ES." (case (stat:type stat) ((directory) - (member (basename file) '(".bzr" ".git" ".hg" ".svn" "CVS"))) + (member (basename file) vcses)) ((regular) - ;; Git sub-modules have a '.git' file that is a regular text file. - (string=3D? (basename file) ".git")) + (if (member ".git" vcses) + ;; Git sub-modules have a '.git' file that is a regular text file. + (string=3D? (basename file) ".git") + #f)) (else #f))) =20 (define* (file-hash* file #:key (algorithm (hash-algorithm sha256)) (recursive? 'auto) - (select? (negate vcs-file?))) + (select? (negate (lambda (file stat) + (vcs-file? file stat))))) "Compute the hash of FILE with ALGORITHM. =20 Symbolic links are only dereferenced if RECURSIVE? is false. diff --git a/guix/scripts/hash.scm b/guix/scripts/hash.scm index 7197d3965c..ed96e6a7e1 100644 --- a/guix/scripts/hash.scm +++ b/guix/scripts/hash.scm @@ -3,7 +3,7 @@ ;;; Copyright =C2=A9 2013 Nikita Karetnikov ;;; Copyright =C2=A9 2016 Jan Nieuwenhuizen ;;; Copyright =C2=A9 2018 Tim Gesthuizen -;;; Copyright =C2=A9 2021 Simon Tournier +;;; Copyright =C2=A9 2021, 2023 Simon Tournier ;;; Copyright =C2=A9 2021 Sarah Morgensen ;;; ;;; This file is part of GNU Guix. @@ -181,9 +181,6 @@ (define-command (guix-hash . args) (_ #f)) (reverse opts))) (fmt (assq-ref opts 'format)) - (select? (if (assq-ref opts 'exclude-vcs?) - (negate vcs-file?) - (const #t))) (algorithm (assoc-ref opts 'hash-algorithm)) (serializer (assoc-ref opts 'serializer))) =20 @@ -193,7 +190,18 @@ (define-command (guix-hash . args) (catch 'system-error (lambda _ (with-error-handling - (serializer file algorithm select?))) + (let* ((vcses (fold (lambda (vcs result) + (if (file-exists? (string-append file "/= " vcs)) + (cons vcs result) + result)) + '() + (list ".bzr" ".git" ".hg" ".svn" "CVS"))) + (select? (if (assq-ref opts 'exclude-vcs?) + (negate (lambda (file stat) + (vcs-file? file stat + vcses))) + (const #t)))) + (serializer file algorithm select?)))) (lambda args (leave (G_ "~a ~a~%") file base-commit: dcc5c34504c94732c135a85fb4db40ca9796270e --=20 2.38.1 --=-=-=--