From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2HgTN0ZNoWEpQQEAgWs5BA (envelope-from ) for ; Fri, 26 Nov 2021 22:10:30 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id SPGJMkZNoWGvWwAAbx9fmQ (envelope-from ) for ; Fri, 26 Nov 2021 21:10:30 +0000 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 57D328242 for ; Fri, 26 Nov 2021 22:10:30 +0100 (CET) Received: from localhost ([::1]:60130 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mqiUH-0005yJ-EV for larch@yhetil.org; Fri, 26 Nov 2021 16:10:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mqiTq-0005y1-62 for guix-patches@gnu.org; Fri, 26 Nov 2021 16:10:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:49068) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mqiTp-0004Ia-Si for guix-patches@gnu.org; Fri, 26 Nov 2021 16:10:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mqiTp-0003hr-MA for guix-patches@gnu.org; Fri, 26 Nov 2021 16:10:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51985] lint: Adjust patch file length check. Resent-From: Vagrant Cascadian Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 26 Nov 2021 21:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51985 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 51985@debbugs.gnu.org, philip@philipmcgrath.com Received: via spool by 51985-submit@debbugs.gnu.org id=B51985.163796095014186 (code B ref 51985); Fri, 26 Nov 2021 21:10:01 +0000 Received: (at 51985) by debbugs.gnu.org; 26 Nov 2021 21:09:10 +0000 Received: from localhost ([127.0.0.1]:60614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqiSz-0003gj-IZ for submit@debbugs.gnu.org; Fri, 26 Nov 2021 16:09:09 -0500 Received: from cascadia.aikidev.net ([173.255.214.101]:32854) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mqiSx-0003gW-N1 for 51985@debbugs.gnu.org; Fri, 26 Nov 2021 16:09:08 -0500 Received: from localhost (unknown [IPv6:2600:3c01:e000:21:21:21:0:100e]) (Authenticated sender: vagrant@cascadia.debian.net) by cascadia.aikidev.net (Postfix) with ESMTPSA id 88DE61A982; Fri, 26 Nov 2021 13:09:01 -0800 (PST) From: Vagrant Cascadian In-Reply-To: <8735nke61x.fsf@gnu.org> References: <875ysnsvnt.fsf@yucca> <877dd0ph9g.fsf@gnu.org> <8735nl5jri.fsf@ponder> <8735nke61x.fsf@gnu.org> Date: Fri, 26 Nov 2021 13:08:51 -0800 Message-ID: <87ee72fwv0.fsf@ponder> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1637961030; 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: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; bh=r07cl7+OPbbeFcF8/zeoAuAprSs+f0LMEWGQmeHvCmw=; b=jMw0LsNcInpjSs7+6I1G2k2nPcQtF9b8DiiVN6kYjNqm5rRLXfXs4eRX+NAQG5+bthxiQV ec7hT3AVVDy3t38poBwI3JHtBdkUotLyfjR1UcWMy7DN6T22FUjs8TmuCGrGe9R0xxxgh3 DxfCTxsuWgH9zB9JdPXtfcsbuL3EJfG684EiHQyZPci5DvnyV0rhsETQxTQkgTaNlXjPfJ cxh7nlZiJm86U6uScHWemPsePXb4GiIJ4ZJuhE3vTJAvq8NrW3C0FrU3aagzWtyKoxF58r H4Z1SvbwbEZgqw+yW+QUiv5t56PIgnL5E9RYvbhwQ1CmYePFa8jfFGFC3Kyu2g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1637961030; a=rsa-sha256; cv=none; b=H8JWSOQkDB8w3K7fq04gsfQF7xrajMiF+pYjAjyGEVUw+pDdLGi+q1qfZy+7V5jGcVSVBq Hgk4OHofyRmkMzIc2zruk6jWTCjF6FR60808I62ldtLHHDm48UDpstvuDilu5rJiURD2ED tAwYmNkN9iL1ePDW0Mb9ZmhNANqXPeZomO1yUJynn7R2pWjHCUUoA07s8cBK3zkX80BgUQ QNiQFxldMQTRGe+gpIoltEzOjuvUhWwEyUwRcLdWBl8Q5tv8NHOU0O7bdL9JgP/6Wl1bEI kKqHHYpY8xOxkI1wlIDpD3y9tJ5eBkVUW/C6ff19zXSDB3rcHTMBhYMuDJNOOQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.50 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 57D328242 X-Spam-Score: -4.50 X-Migadu-Scanner: scn0.migadu.com X-TUID: jAUqw34vn+8c --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2021-11-25, Ludovic Court=C3=A8s wrote: > Vagrant Cascadian skribis: > >> With: >> >> commit bdf5c16ac052af2ca9d5c3acc4acbc08fd9fdbea >> Author: Ludovic Court=C3=A8s >> Date: Tue Nov 23 09:06:49 2021 +0100 >> >> maint: "make dist" builds tarballs in 'ustar' format. >> >> It seems like this actually needs even further updates, as that should >> allow for a much longer file length in general (although a little >> difficult to figure out the exact file length allowed). >> >> And then the corresponding test suite will need changes as well... > > I think independently of the switch to ustar, it=E2=80=99s a good idea fo= r =E2=80=98guix > lint=E2=80=99 to warn about long patch file names, but to warn a bit less > frequently than today. > > In that spirit, your patch is still relevant and worth applying IMO. Sure, although while I'm mucking around... I went ahead and did some real-world testing of file lengths usable by ustar. Using ustar adds a significant buffer, though less than one might think in the case of guix-VERSION/gnu/packages/patches/*.patch (~151 characters vs. ~99). I'm guessing this is plenty buffer though, most existing patches were only a theoretical problem... almost to the point that maybe even removing the check entirely might be fine. Updated patch integrating this and the stronger warning suggested by Philip McGrath. I haven't yet actually *tested* this updated patch yet, but the previous iteration tested just fine. :) live well, vagrant --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-lint-Adjust-patch-file-length-check.patch Content-Transfer-Encoding: quoted-printable From=20c0738574a3571977855d655c157ab0ea0f9be6ef Mon Sep 17 00:00:00 2001 From: Vagrant Cascadian Date: Fri, 26 Nov 2021 12:13:45 -0800 Subject: [PATCH] lint: Adjust patch file length check. With the switch to "ustar" format in commit bdf5c16ac052af2ca9d5c3acc4acbc08fd9fdbea, the maximum file length has increased. * guix/lint.scm (check-patch-file-names): Adjust margin used to check for patch file lengths. Increase allowable patch file length appropriate to n= ew tar format. Extend warning to explain that long files may break 'make dis= t'. * tests/lint.scm: Update tests accordingly. =2D-- guix/lint.scm | 9 ++++++--- tests/lint.scm | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/guix/lint.scm b/guix/lint.scm index ac2e7b3841..4a5573e86e 100644 =2D-- a/guix/lint.scm +++ b/guix/lint.scm @@ -957,8 +957,11 @@ patch could not be found." =20 ;; Check whether we're reaching tar's maximum file name length. (let ((prefix (string-length (%distro-directory))) =2D (margin (string-length "guix-2.0.0rc3-10000-1234567890/")) =2D (max 99)) + ;; Margin approximating the largest path that "make dist" might + ;; create, with a release candidate version, 123456 commits, and + ;; git commit hash abcde0. + (margin (string-length "guix-92.0.0rc3-123456-abcde0/")) + (max 151)) (filter-map (match-lambda ((? string? patch) (if (> (+ margin (if (string-prefix? (%distro-direct= ory) @@ -968,7 +971,7 @@ patch could not be found." max) (make-warning package =2D (G_ "~a: file name is too long") + (G_ "~a: file name is too long which may break = 'make dist'") (list (basename patch)) #:field 'patch-file-names) #f)) diff --git a/tests/lint.scm b/tests/lint.scm index 9a91dd5426..8fa0172cf7 100644 =2D-- a/tests/lint.scm +++ b/tests/lint.scm @@ -506,17 +506,17 @@ (file-name "x.patch"))))))))) (check-patch-file-names pkg))) =20 =2D(test-equal "patches: file name too long" +(test-equal "patches: file name too long which may break 'make dist'" (string-append "x-" =2D (make-string 100 #\a) =2D ".patch: file name is too long") + (make-string 152 #\a) + ".patch: file name is too long which may break 'make dist= '") (single-lint-warning-message (let ((pkg (dummy-package "x" (source (dummy-origin (patches (list (string-append "x-" =2D (make-string 100 #\a) + (make-string 152 #\a) ".patch")))))))) (check-patch-file-names pkg)))) =20 =2D-=20 2.30.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRlgHNhO/zFx+LkXUXcUY/If5cWqgUCYaFM6AAKCRDcUY/If5cW qrj8AQD02tkebDhmrwJhDJUUy/Ya8U3RnzVIobf7lumScSirtgEAiZCehNi6fGBv IT1c4uugIN52Oh2OqM+EsPJRbAxZOgM= =3hkQ -----END PGP SIGNATURE----- --==-=-=--