From unknown Tue Aug 12 03:20:44 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#73733 <73733@debbugs.gnu.org> To: bug#73733 <73733@debbugs.gnu.org> Subject: Status: [PATCH] gnu: lsof: fix build in Linux 6.9 Reply-To: bug#73733 <73733@debbugs.gnu.org> Date: Tue, 12 Aug 2025 10:20:44 +0000 retitle 73733 [PATCH] gnu: lsof: fix build in Linux 6.9 reassign 73733 guix-patches submitter 73733 Ekaitz Zarraga severity 73733 normal tag 73733 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 10 09:15:27 2024 Received: (at submit) by debbugs.gnu.org; 10 Oct 2024 13:15:28 +0000 Received: from localhost ([127.0.0.1]:59027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syt0p-0000yx-9j for submit@debbugs.gnu.org; Thu, 10 Oct 2024 09:15:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:37212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syt0m-0000ym-Cp for submit@debbugs.gnu.org; Thu, 10 Oct 2024 09:15:26 -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 1syt0a-0007J9-1I for guix-patches@gnu.org; Thu, 10 Oct 2024 09:15:12 -0400 Received: from dane.soverin.net ([2a10:de80:1:4092:b9e9:2295:0:1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1syt0X-00083u-6a for guix-patches@gnu.org; Thu, 10 Oct 2024 09:15:11 -0400 Received: from smtp.soverin.net (unknown [10.10.4.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dane.soverin.net (Postfix) with ESMTPS id 4XPVbg4Xs2zyQv; Thu, 10 Oct 2024 13:14:55 +0000 (UTC) Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.100]) by soverin.net (Postfix) with ESMTPSA id 4XPVbf0fmNzKH; Thu, 10 Oct 2024 13:14:54 +0000 (UTC) Authentication-Results: smtp.soverin.net; dkim=pass (2048-bit key; unprotected) header.d=elenq.tech header.i=@elenq.tech header.a=rsa-sha256 header.s=soverin1 header.b=Qh2VDPYA; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=soverin1; t=1728566094; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=m12MHbcRlx3oDg9rdotM2/9gyT32pbXTIuOdj73WJnA=; b=Qh2VDPYADQeZKy5wjthPDxVh+lHH1nyFsxHe6uDEPNKfjCEvydLnfafQhWKGvpttpwxq1s wdkQ7vgttddopwxsi8JNjJPsJ24LAI3OfuMLnJKosWGAanC76Sxtq6uPB3mgHrODT/htSJ 4/uJOM4maQ7l6+t39bIlbCbEM0fF6xTjnmX9Qg7yeD4Rc/AqalCZGs+9stEFtqXliIZ5xM J4JCv7GJ5zK6imjChO1IC6SQUyYl93qTHKp8+I9khYpwdAoXwvpusMH4cVS0cKMl790jnx n8QlGwo1zfhmxgwHi2EQFriuNoP56j9Cp36+LMY2cM7I7Y2WgCCeGEKecAaY3g== From: Ekaitz Zarraga To: guix-patches@gnu.org Subject: [PATCH] gnu: lsof: fix build in Linux 6.9 Date: Thu, 10 Oct 2024 15:14:30 +0200 Message-ID: <0e032dbca5f08b3e0ea45748a4290336306e639e.1728566057.git.ekaitz@elenq.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spampanel-Class: ham Received-SPF: pass client-ip=2a10:de80:1:4092:b9e9:2295:0:1; envelope-from=ekaitz@elenq.tech; helo=dane.soverin.net 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Ekaitz Zarraga 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: -2.3 (--) This commit adds the patch that fixes: The issue was triggering the following error in the `test` phase that resulted in a build failure in Linux 6.9 or higher: FAIL: lib/dialects/linux/tests/case-20-pidfd-pid.bash * gnu/packages/lsof.scm(patches): Add `lsof-compat-linux-6.9.patch`. * gnu/packages/patches/lsof-compat-linux-6.9.patch: New file. Change-Id: I98b895ecaf1b952bfd33ea7ae3af70b1c39a0a94 --- gnu/packages/lsof.scm | 4 +- .../patches/lsof-compat-linux-6.9.patch | 58 +++++++++++++++++++ 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/lsof-compat-linux-6.9.patch diff --git a/gnu/packages/lsof.scm b/gnu/packages/lsof.scm index 7d849c80b5..d76ef585c3 100644 --- a/gnu/packages/lsof.scm +++ b/gnu/packages/lsof.scm @@ -46,7 +46,9 @@ (define-public lsof (file-name (git-file-name name version)) (sha256 (base32 - "1v32407al4j0hhcph95lv4xvr9h012lii29iyq41iwj39zwfavax")))) + "1v32407al4j0hhcph95lv4xvr9h012lii29iyq41iwj39zwfavax")) + ;; FIXES: https://github.com/lsof-org/lsof/issues/317 + (patches (search-patches "lsof-compat-linux-6.9.patch")))) (build-system gnu-build-system) (native-inputs (list automake autoconf diff --git a/gnu/packages/patches/lsof-compat-linux-6.9.patch b/gnu/packages/patches/lsof-compat-linux-6.9.patch new file mode 100644 index 0000000000..419cae927a --- /dev/null +++ b/gnu/packages/patches/lsof-compat-linux-6.9.patch @@ -0,0 +1,58 @@ +From c1678e3f6e4b4d984cb3078b7bf0c9e24bedb8ca Mon Sep 17 00:00:00 2001 +From: Jiajie Chen +Date: Fri, 17 May 2024 15:22:35 +0800 +Subject: [PATCH] [linux] Maintain original output for pidfd in linux 6.9 + +--- + 00DIST | 3 +++ + lib/dialects/linux/dproc.c | 13 +++++++++++++ + 2 files changed, 16 insertions(+) + +diff --git a/00DIST b/00DIST +index d5a0349..9a29611 100644 +--- a/00DIST ++++ b/00DIST +@@ -5605,6 +5605,9 @@ Supplement Regenerated the 4.04 distribution to correct a non- + + [linux] Do not embed kernel version in CFLAGS (#314) + ++ [linux] Linux 6.9 changed the pidfs appearence in procfs. Try ++ to maintain original output in lsof (#317) ++ + + Vic Abell + July 14, 2018 +diff --git a/lib/dialects/linux/dproc.c b/lib/dialects/linux/dproc.c +index cb6bb64..3a7a120 100644 +--- a/lib/dialects/linux/dproc.c ++++ b/lib/dialects/linux/dproc.c +@@ -1273,6 +1273,10 @@ static int process_id(struct lsof_context *ctx, /* context */ + #endif /* defined(HASEPTOPTS) */ + if (rest && rest[0] == '[' && rest[1] == 'p') + fdinfo_mask |= FDINFO_PID; ++ else if (Lf->ntype == N_REGLR && rest && *rest && strcmp(pbuf, "pidfd") == 0) { ++ // https://github.com/lsof-org/lsof/issues/317 ++ fdinfo_mask |= FDINFO_PID; ++ } + + if ((av = get_fdinfo(ctx, pathi, fdinfo_mask, &fi)) & + FDINFO_POS) { +@@ -1338,6 +1342,15 @@ static int process_id(struct lsof_context *ctx, /* context */ + Lf->sf |= SELPTYINFO; + } + #endif /* defined(HASEPTOPTS) && defined(HASPTYEPT) */ ++ else if (Lf->ntype == N_REGLR && rest && *rest && Lf->nm && ++ strcmp(Lf->nm, "pidfd") == 0) { ++ // https://github.com/lsof-org/lsof/issues/317 ++ // pidfd since Linux 6.9 becomes a regular file: ++ // /proc/PID/fd/FD -> pidfd:[INODE] ++ (void)snpf(rest, sizeof(pbuf) - (rest - pbuf), ++ "[pidfd:%d]", fi.pid); ++ enter_nm(ctx, rest); ++ } + + if (Lf->sf) + link_lfile(ctx); +-- +2.45.2 + base-commit: f5aff5b3972b9a3342b1ce807f7ed68289cce74d -- 2.46.0 From debbugs-submit-bounces@debbugs.gnu.org Thu Oct 10 10:52:17 2024 Received: (at 73733-done) by debbugs.gnu.org; 10 Oct 2024 14:52:17 +0000 Received: from localhost ([127.0.0.1]:60195 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syuWX-0006Py-1x for submit@debbugs.gnu.org; Thu, 10 Oct 2024 10:52:17 -0400 Received: from mail-wm1-f46.google.com ([209.85.128.46]:56554) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1syuWU-0006Pp-4q for 73733-done@debbugs.gnu.org; Thu, 10 Oct 2024 10:52:15 -0400 Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-43117917eb9so6997035e9.0 for <73733-done@debbugs.gnu.org>; Thu, 10 Oct 2024 07:52:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1728571862; x=1729176662; darn=debbugs.gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=jdXtStGMw7lk64z86QX/H2Z6C5kqGZuvLp6MGn2CdrQ=; b=CHK5OATWu/d87IJW8kJcOnwhmj3UEdMC83drWox5zwOnieAyjzx3svAUeotm1fFF6o fCzmm3cEOJZnI/Jh52nnQH0BNMMDc5tEb1/jNfpEtcc7HS3Wrp9DPzLRXYA7WVhiyyjZ 4U1+amg0VL02AcXhStLd9uaAtmUfntjakoEqFdAvZphZzJsJtJyF8+/1xKWmbg8hqQ5+ HK4LQUCQboTtrvhxErlHwMtYS1CLtg0+Celtgwka1WATjqv4FUJMNz6ZjdmJ/DjndMxN Iy2mkR7oEtqpHv+GXqR8ho1qCiBwQlK6EifMFrMKXAgE1vAM/d7celooHUxnYp+VvQz6 y5uA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728571862; x=1729176662; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jdXtStGMw7lk64z86QX/H2Z6C5kqGZuvLp6MGn2CdrQ=; b=b4WufjsZB/b/u9KaBI+/Cslay9pG6gj+6OOxU0PCXjHx5QbXibjAr+hw8Wt0ofBM0T 1IEzrDIq54IfaouWxHiSLfPi/m7TcW8J/lkIAnHj1fNsBT3M/pxpoWab5R2FPVnVVq30 ViTfDYcEYfPqIvxGLs0be8e2zqs4U+gsUouSxNnUgpczzFDG80hWfTucjMzfm+W0ZSA4 MSfxAIgV5ZQUX6kuipEEaqRqXPIaqUkagPgHgBPUtCLASvQwVzpkgVsPCET/80LSGalZ s+9pfTRTKX3mR/72dvOyGFl9n8IS3KvyaqcFrmNPRvdeCGunyVjFrD9ysoFVq/poBkq1 9+1g== X-Gm-Message-State: AOJu0Yy69U2NctfISQQWGHxr2653xK2PfbVRyo4im8e5fWp+9R8EC4Id NSmEHSrQJa5ezZBaNczooy8IAhes5Y8iTpgvoLsF8d4/rSplUVQS X-Google-Smtp-Source: AGHT+IH0sAMBln9mQ0G8f2IpZO/DdltGsHn2jZAwyh3NosqdMG6glduCVl/A/5XvjdX0GoL9zN9dzg== X-Received: by 2002:a05:600c:1f0d:b0:42c:e0da:f15c with SMTP id 5b1f17b1804b1-430ccf511eemr51321395e9.20.1728571861417; Thu, 10 Oct 2024 07:51:01 -0700 (PDT) Received: from localhost ([141.226.162.35]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-430d70b4291sm50820935e9.35.2024.10.10.07.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 10 Oct 2024 07:51:00 -0700 (PDT) Date: Thu, 10 Oct 2024 17:50:59 +0300 From: Efraim Flashner To: Ekaitz Zarraga Subject: Re: [bug#73733] [PATCH] gnu: lsof: fix build in Linux 6.9 Message-ID: Mail-Followup-To: Efraim Flashner , Ekaitz Zarraga , 73733-done@debbugs.gnu.org References: <0e032dbca5f08b3e0ea45748a4290336306e639e.1728566057.git.ekaitz@elenq.tech> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fq7F/7N5wpJ9lh5n" Content-Disposition: inline In-Reply-To: <0e032dbca5f08b3e0ea45748a4290336306e639e.1728566057.git.ekaitz@elenq.tech> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 73733-done Cc: 73733-done@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: -0.7 (/) --fq7F/7N5wpJ9lh5n Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Thanks for the patch. I added a line to gnu/local.mk. --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --fq7F/7N5wpJ9lh5n Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmcH6dMACgkQQarn3Mo9 g1HLyBAAr2JUsFmJi084t0zksZmTnq/XvrZBY4zlsB7sgQJnYPp4ac7Q1sLWin+S W33dnahEnM+RTm0HZEl9M0In+GJqebqDHBObxnWAqdrLGQSNNLj2F79XRsFc94/k rltmoradEzoVfwU6w06TB+GI6w4jvcjenbmrDktu8H+WTzxVIIx9N7R9oJViPh5w Xv38kE9QTRtk8K+6uvO8jwlJyR2/qittjbWPaIQLRkZgrjr5uO00yoqt0OnC+dMo 3lsDjKVcQhd9hnvQha12auakxWusHc3aQIfmAiqH4FWUmwv0WUzdGSquRxiu0bdp tmypiEidLfLoL30t27vFdSdqHv5C9Buj4Ue8W0PQ8It2ND+Zabpj3PbWPVHQsYUf io0NuQt1EyWTzYeP47uvoElwMZS53STHY31eZu8QfizWlsdSXgsu24aRqaFGbSpk esIbkuhe1gp88VJwLCeGJ9tMoE05jwSOHb4dA2KWGv+KcRmTbJr6M+rGOdLIiLng VpnsLC7wNCj9/+Sun+DcrCqvcfIfda+UGPX8YwPwwO1Rp7G15bgS8NaABTpKpZHm 5zihEviBJ8zfCXrE5oJF+Bf/kFwbBA2mHy63fT03nwUCMwVm5Sf10NEx4bz/LcNf PsBQdT2B2NnosfkTETZjs4m7mj6Gx/A5eL7giw/oPjzzNCdzA1Q= =N03D -----END PGP SIGNATURE----- --fq7F/7N5wpJ9lh5n-- From unknown Tue Aug 12 03:20:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 08 Nov 2024 12:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator