From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id aOb1H9LXB2cPYAEAqHPOHw:P1 (envelope-from ) for ; Thu, 10 Oct 2024 13:34:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id aOb1H9LXB2cPYAEAqHPOHw (envelope-from ) for ; Thu, 10 Oct 2024 15:34:10 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=HHGIKEvW; dkim=fail ("headers rsa verify failed") header.d=elenq.tech header.s=soverin1 header.b=Qh2VDPYA; 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"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1728567250; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=m12MHbcRlx3oDg9rdotM2/9gyT32pbXTIuOdj73WJnA=; b=Z5jZCeDOBjFW4AmX1RVPvQS4dp8uKka390fsqL6b4JS/NgaNVLUNuX6cIL6f9QN7BATqhE zTKrY8iqBorUVkx2q7Vs01O4doVv8pHX8S5lwWRkIv3LNW+qOANfZm1VTvAn0uJDRb1S7L GM/+2FRBNGOkdvaMo4H8IgzilZNmAGytEcbsaXf08pEI0PU/7h+VT2/NV0U9nCSt9Q8hnM VL4F4YBnxvHvYz6LO5HTRC+FK4p8Je0813IaQ8yb5UrXB3nY0PeGmt0lnF6h1UVVaEU7uy 8Od/ehZoA8ziIjSqT2NkKSD9qeUKD69XWKxMqgbTKRgV+8RgPWnLDBnp+Nk4wA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1728567250; a=rsa-sha256; cv=none; b=Dn5l+8umHrQpuHdWMZv/hMmhQYEEiAyaLnLbSme1m1GEETACsJjDSopyKHw7Np5/oHbOEO MBZZ6bVaKzbYhRlR/MNP4DvnCXEnmfgoi+xuMHYnbTezzvgoySrdqR1L7DujJMAa9hhNOH LJ8rjDey3CFy1UP+VK94ROVtODzbQiAhB8ad+5Syn92FVvUMzaoeUvP1GHkrz64g2y7cNO nmeK/7An33kI+0npBJg8KZkN8gUZL7oH2bbD6GIpSeLWCIXx3oVcOLS/jWjauhQXjrZUkg jQe5QWrUQ0KlhDGsZ6s0OCozmZ7NOiiJ9eVBvoBQCB7wxK0kUQ1oEd3/xui5GA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=HHGIKEvW; dkim=fail ("headers rsa verify failed") header.d=elenq.tech header.s=soverin1 header.b=Qh2VDPYA; 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"; dmarc=none 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 9E9A354078 for ; Thu, 10 Oct 2024 15:34:09 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1syt1F-0007LT-Lz; Thu, 10 Oct 2024 09:15:53 -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 1syt1D-0007LK-LV for guix-patches@gnu.org; Thu, 10 Oct 2024 09:15:51 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1syt1D-0008JM-9j for guix-patches@gnu.org; Thu, 10 Oct 2024 09:15:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=m12MHbcRlx3oDg9rdotM2/9gyT32pbXTIuOdj73WJnA=; b=HHGIKEvWDIgfglgp8E+6NssCvjTE8q3jGFpczToCwUJwp7XiLMF0W2nKR62tppwXKziDMLAQTLKuIrWamFQ+W/IiEC3NQWBO5vI71N/Q8HU1edZenQczBynC/ExqEBFO7yzIMMtM/BVmaqsMQuVxb6UtOZhmlXtJSxzRcWAmqWbIJfWVcIck/TlYciXh+QYqFR3eeMxUb7WWYF5p7ORNRBFmD4E16C2WcsSPis8qIeJMtY/O810+62cHgbcZ+luvh4lFjBWLB0Sc3PBE3AzT27Xkx/jdvMpfAdUw20GNR27G8flcvI4gc3gS6bVU9fzGC4T7Rv4N5cDMjHM9CyKdSg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1syt1O-000103-Ib for guix-patches@gnu.org; Thu, 10 Oct 2024 09:16:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73733] [PATCH] gnu: lsof: fix build in Linux 6.9 Resent-From: Ekaitz Zarraga Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 10 Oct 2024 13:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73733 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73733@debbugs.gnu.org Cc: Ekaitz Zarraga X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17285661283786 (code B ref -1); Thu, 10 Oct 2024 13:16:02 +0000 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) 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 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-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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -3.73 X-Spam-Score: -3.73 X-Migadu-Queue-Id: 9E9A354078 X-Migadu-Scanner: mx13.migadu.com X-TUID: LsRcFkGDwIFu 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