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 ms0.migadu.com with LMTPS id OFJ5OA0ET2KYTwEAgWs5BA (envelope-from ) for ; Thu, 07 Apr 2022 17:32:29 +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 mJRCMQ0ET2IrjAAAG6o9tA (envelope-from ) for ; Thu, 07 Apr 2022 17:32:29 +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 1D0363AFE1 for ; Thu, 7 Apr 2022 17:32:29 +0200 (CEST) Received: from localhost ([::1]:59090 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ncU7Y-0006mr-5x for larch@yhetil.org; Thu, 07 Apr 2022 11:32:28 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncU78-0006lI-78 for guix-patches@gnu.org; Thu, 07 Apr 2022 11:32:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:39258) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ncU77-0004dc-Tj for guix-patches@gnu.org; Thu, 07 Apr 2022 11:32:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ncU77-0008SG-Q7 for guix-patches@gnu.org; Thu, 07 Apr 2022 11:32:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54767] [PATCH] gnu: hwloc-1: Update to 1.11.13 and add upstream patch to fix a test Resent-From: Philippe SWARTVAGHER Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Apr 2022 15:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 54767 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54767@debbugs.gnu.org Cc: Philippe SWARTVAGHER X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.164934546332423 (code B ref -1); Thu, 07 Apr 2022 15:32:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Apr 2022 15:31:03 +0000 Received: from localhost ([127.0.0.1]:33155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncU68-0008QZ-9N for submit@debbugs.gnu.org; Thu, 07 Apr 2022 11:31:03 -0400 Received: from lists.gnu.org ([209.51.188.17]:45164) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ncU66-0008QR-H3 for submit@debbugs.gnu.org; Thu, 07 Apr 2022 11:30:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncU66-0005g1-B4 for guix-patches@gnu.org; Thu, 07 Apr 2022 11:30:58 -0400 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:24101) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ncU63-0004Vz-BR for guix-patches@gnu.org; Thu, 07 Apr 2022 11:30:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=EuVhTtKkZ/YY3GNOpAmmRn5Ir4Arq8udTeGkJlU8CR8=; b=XCP+NmK5Tsfhv4VJ2tj7+aIFCvYRH+aI+aKDmOUphaQuxeIagY4Qcw+P fk79J2dgc5s4vaF7rZ/0OFMh3q3WD/YXrjS9KLH3yOhk/a3xEGgHzhebs TGOViyp7k6G9WqlOhJC7zrjjX2vxytOn5QCCPT+1m9aRrAYhLPxPL4IBJ E=; X-IronPort-AV: E=Sophos;i="5.90,242,1643670000"; d="scan'208";a="10888764" Received: from unknown (HELO PHSW.bordeaux.inria.fr) ([193.50.110.193]) by mail3-relais-sop.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2022 17:30:51 +0200 From: Philippe SWARTVAGHER Date: Thu, 7 Apr 2022 17:30:02 +0200 Message-Id: <20220407153002.885065-1-philippe.swartvagher@inria.fr> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=192.134.164.104; envelope-from=philippe.swartvagher@inria.fr; helo=mail3-relais-sop.national.inria.fr X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" 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=1649345549; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=EuVhTtKkZ/YY3GNOpAmmRn5Ir4Arq8udTeGkJlU8CR8=; b=RIF+Q84QrIt5erKInaPctl0oQ/9qtOoAWbO+pM2uFULMRwg++AN1CLREn6+MbI/ok749L1 6rDKHtSkPzRtbuBVtldOJRKQH9vRlQPheG6Nt8nbE7VrwIPmqDxOeUhxZxB8rJv3N0pFKh ohsSXiKjSGjNXc9OdEcsno6WSR7/vX6iGYWyBa9S30Lw6zuTRgQuG0fIbDm8jFvuqDNqCa +IecyLptHTgKoqlQ9wrPVtPCq3e9ufMIdAF7B7FNy04COJydfx4fzO9j9OMTg5d/m7cp/s wYPg3XSIGGkVf6GN0n0EAnaynokHUI91Agb9QBQsYclRq0Q48LCr03duaVJ4Qw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1649345549; a=rsa-sha256; cv=none; b=Fd2CiGlOk1XyAJWBlHkf8IOoGT3eaARJlCiqdvjO1eATck4WXj8Pz9ToPPI9xm4H3EeVr2 iqwgO5++4XUrOZ+Y1ZpFLTNgssC3bZM/hKP5/eg+paRBDrhb7lQWaYnx0rVqcK8K54bQzd eHOJXJUEo7+cRbizbNn+rv6oCkB2O7ugLwUcAxMXAIAexrzQjQz4DFu1Qiho6MiSyqwN1a yq8anlrtWWNt5Yp4qGW8/FFO5D/ujbyCk7Uih+lMeLBJ5bGwSIa0CJg/eoRPlBJCRrzIuK cqI1PgcD1mzxf6OTXDimh/CrStBY6u9PmQCeXO3czW28Wytr6WQXb0in2jD4WQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=XCP+NmK5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=inria.fr (policy=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: 6.54 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=XCP+NmK5; dmarc=fail reason="SPF not aligned (relaxed)" header.from=inria.fr (policy=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: 1D0363AFE1 X-Spam-Score: 6.54 X-Migadu-Scanner: scn1.migadu.com X-TUID: UwQeGqJmxWIF gnu/packages/mpi.scm (hwloc-1): * Update to 1.11.13 * Add upstream patch not in the release to fix one test on BTRFS filesystems * Use the target of the redirection in the source URL, as advised by `guix lint` * Apply `guix style` --- gnu/packages/mpi.scm | 72 +++++++++---------- gnu/packages/patches/hwloc-1-test-btrfs.patch | 55 ++++++++++++++ 2 files changed, 87 insertions(+), 40 deletions(-) create mode 100644 gnu/packages/patches/hwloc-1-test-btrfs.patch diff --git a/gnu/packages/mpi.scm b/gnu/packages/mpi.scm index 94c32684fb..b0ec1b17ca 100644 --- a/gnu/packages/mpi.scm +++ b/gnu/packages/mpi.scm @@ -57,41 +57,37 @@ (define-public hwloc-1 ;; to migrate to 2.0. (package (name "hwloc") - (version "1.11.12") + (version "1.11.13") (source (origin (method url-fetch) - (uri (string-append "https://www.open-mpi.org/software/hwloc/v" - (version-major+minor version) - "/downloads/hwloc-" version ".tar.bz2")) + (uri (string-append + "https://download.open-mpi.org/release/hwloc/v" + (version-major+minor version) "/hwloc-" version ".tar.bz2")) (sha256 (base32 - "0za1b9lvrm3rhn0lrxja5f64r0aq1qs4m0pxn1ji2mbi8ndppyyx")))) - + "1j69p8a1pjpbpwn4w7l4dfxmaxxqikchjzqw1ncw05zmcmvlnjd4")) + (patches (search-patches "hwloc-1-test-btrfs.patch")))) (properties - ;; Tell the 'generic-html' updater to monitor this URL for updates. - `((release-monitoring-url - . "https://www-lb.open-mpi.org/software/hwloc/current"))) - + ;; Tell the 'generic-html' updater to monitor this URL for updates. + `((release-monitoring-url #{.}# + "https://www-lb.open-mpi.org/software/hwloc/current"))) (build-system gnu-build-system) - (outputs '("out" ;'lstopo' & co., depends on Cairo, libx11, etc. - "lib" ;small closure - "doc" ;400+ section 3 man pages + (outputs '("out" ;'lstopo' & co., depends on Cairo, libx11, etc. + "lib" ;small closure + "doc" ;400+ section 3 man pages "debug")) - (inputs - `(("libx11" ,libx11) - ("cairo" ,cairo) - ("ncurses" ,ncurses) - ("expat" ,expat) - ,@(if (not (string-prefix? "armhf" - (or (%current-target-system) - (%current-system)))) - `(("numactl" ,numactl)) - '()))) + (inputs `(("libx11" ,libx11) ("cairo" ,cairo) + ("ncurses" ,ncurses) + ("expat" ,expat) + ,@(if (not (string-prefix? "armhf" + (or (%current-target-system) + (%current-system)))) + `(("numactl" ,numactl)) + '()))) (propagated-inputs - ;; hwloc.pc lists it in 'Requires.private'. - (list libpciaccess)) - (native-inputs - (list pkg-config)) + ;; hwloc.pc lists it in 'Requires.private'. + (list libpciaccess)) + (native-inputs (list pkg-config)) (arguments `(#:configure-flags '("--localstatedir=/var") #:phases @@ -101,32 +97,28 @@ (define-public hwloc-1 ;; Arrange to skip 'tests/linux-libnuma', which fails on some ;; machines: . (substitute* "tests/linux-libnuma.c" - (("numa_available\\(\\)") - "-1")) - #t)) + (("numa_available\\(\\)") "-1")) #t)) (add-after 'install 'refine-libnuma ;; Give -L arguments for libraries to avoid propagation (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "lib")) - (numa (assoc-ref inputs "numactl"))) - (substitute* (map (lambda (f) (string-append out "/" f)) + (let ((out (assoc-ref outputs "lib")) (numa (assoc-ref inputs + "numactl"))) + (substitute* (map (lambda (f) + (string-append out "/" f)) '("lib/pkgconfig/hwloc.pc" "lib/libhwloc.la")) - (("-lnuma" lib) - (string-append "-L" numa "/lib " lib)))))) + (("-lnuma" lib) (string-append "-L" numa "/lib " lib)))))) (add-after 'install 'avoid-circular-references (lambda* (#:key outputs #:allow-other-keys) (let ((lib (assoc-ref outputs "lib"))) ;; Suppress the 'prefix=' and 'exec_prefix=' lines so that the ;; "lib" output doesn't refer to "out". (substitute* (string-append lib "/lib/pkgconfig/hwloc.pc") - (("^.*prefix=.*$") - "")) - #t))) + (("^.*prefix=.*$") "")) #t))) (add-after 'install 'move-man3-pages (lambda* (#:key outputs #:allow-other-keys) ;; Move section 3 man pages to the "doc" output. - (let ((out (assoc-ref outputs "out")) - (doc (assoc-ref outputs "doc"))) + (let ((out (assoc-ref outputs "out")) (doc (assoc-ref outputs + "doc"))) (copy-recursively (string-append out "/share/man/man3") (string-append doc "/share/man/man3")) (delete-file-recursively (string-append out "/share/man/man3")) diff --git a/gnu/packages/patches/hwloc-1-test-btrfs.patch b/gnu/packages/patches/hwloc-1-test-btrfs.patch new file mode 100644 index 0000000000..32f2919abc --- /dev/null +++ b/gnu/packages/patches/hwloc-1-test-btrfs.patch @@ -0,0 +1,55 @@ +From 093316a897a2eb4972a7a3a5888f40975d03f6bf Mon Sep 17 00:00:00 2001 +From: Brice Goglin +Date: Tue, 5 Apr 2022 17:39:50 +0200 +Subject: [PATCH] linux: (partial) fix the discovery of hugepages on btrfs + fsroot + +btrfs always returns 1 in directory stat.st_nlink. +It breaks make check in tests/linux/ because the hugepages discovery +uses st_nlink to allocate the memory page_types array. + +Always allocate at least 3 page_types slots +(enough for all known cases, 1 for normal, 2 for huge pages) + +(partially cherry-picked from commit 7f351cec9bfe54a031f35ad16c9cfb99784d76dc) + +We don't reallocate later if needed as in 2.x commit 7f351cec9bfe54a031f35ad16c9cfb99784d76dc +because v1.11 doesn't deserve a complete fix. Just commit the minimal change +so that tests/linux/2i386-2t-hugepagesizecount with HWLOC_PAGESIZE_DEBUG=4096 +doesn't crash in btrfs anymore (test-topology.sh fails during make check if /tmp is in btrfs). + +Thanks to Philippe Swartvagher for the report. + +Signed-off-by: Brice Goglin +--- + src/topology-linux.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/src/topology-linux.c b/src/topology-linux.c +index 58c275fea..269eca7f5 100644 +--- a/src/topology-linux.c ++++ b/src/topology-linux.c +@@ -1,6 +1,6 @@ + /* + * Copyright © 2009 CNRS +- * Copyright © 2009-2019 Inria. All rights reserved. ++ * Copyright © 2009-2022 Inria. All rights reserved. + * Copyright © 2009-2013, 2015 Université Bordeaux + * Copyright © 2009-2014 Cisco Systems, Inc. All rights reserved. + * Copyright © 2015 Intel, Inc. All rights reserved. +@@ -2329,7 +2329,14 @@ hwloc_get_procfs_meminfo_info(struct hwloc_topology *topology, + + err = hwloc_stat("/sys/kernel/mm/hugepages", &st, data->root_fd); + if (!err) { +- types = 1 + st.st_nlink-2; ++ types = 1 /* normal non-huge size */ + st.st_nlink - 2 /* ignore . and .. */; ++ if (types < 3) ++ /* some buggy filesystems (e.g. btrfs when reading from fsroot) ++ * return wrong st_nlink for directories (always 1 for btrfs). ++ * use 3 as a sane default (default page + 2 huge sizes). ++ * hwloc_parse_hugepages_info() will extend it if needed. ++ */ ++ types = 3; + has_sysfs_hugepages = 1; + } + base-commit: 7409f246e2b0be9a2b3b6ae246385f3f197e5fbb -- 2.30.2