From patchwork Wed Mar 23 18:48:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: M X-Patchwork-Id: 38030 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 6699327BBE9; Wed, 23 Mar 2022 18:50:53 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B396D27BBEB for ; Wed, 23 Mar 2022 18:50:50 +0000 (GMT) Received: from localhost ([::1]:57156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX64H-00067x-VJ for patchwork@mira.cbaines.net; Wed, 23 Mar 2022 14:50:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43968) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX63X-0005Um-ED for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52124) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX63W-000377-RT for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nX63W-0001Fo-OE for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54539] [PATCH 1/6] gnu: audacity: Move into new module to break cycles. References: <5a87d6f772ff7424cb6fccea7c45276bef7797aa.camel@telenet.be> In-Reply-To: <5a87d6f772ff7424cb6fccea7c45276bef7797aa.camel@telenet.be> Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Mar 2022 18:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54539 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54539@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 54539-submit@debbugs.gnu.org id=B54539.16480613524695 (code B ref 54539); Wed, 23 Mar 2022 18:50:02 +0000 Received: (at 54539) by debbugs.gnu.org; 23 Mar 2022 18:49:12 +0000 Received: from localhost ([127.0.0.1]:46006 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62i-0001DY-8e for submit@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:12 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:33940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62Z-0001Ch-I3 for 54539@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:04 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id 9up12700i4UW6Th01up2o3; Wed, 23 Mar 2022 19:49:02 +0100 From: Maxime Devos Date: Wed, 23 Mar 2022 18:48:50 +0000 Message-Id: <20220323184855.25241-1-maximedevos@telenet.be> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1648061342; bh=j7AIw2Ij5pJjRkyWDfBZx1Jgk82zP3FRUmeYnSP81A8=; h=From:To:Cc:Subject:Date; b=ZJ7J393a3jONvxq97dOSCEPV4i6p0FMrHwfIh1/FMtIpbdYuYUuzxqrcBsbCYUIHk 1YAyuP4/Zx0r/l1sFYt+ZAAZmbed9HwUTfKZB2yZgjOdn5890CKgwewQgYlW7A32Wa 6C4mUhnlrpd1b/0tWH1cRBiytbmX2r9psnZ4sGNo9+WDBDHoKRXFoCg1EQ7T/1VHNT +u+2pXVAj5wq+uhv2kNEJ6hr8C2FdRY68wquoPrbsW9v05oxOghXnYsVBt8nFXz8PQ EH3rsXi70ukol9X4WK86iAdk1f2dpXZMdKi2C9rUwgjb2hWoiAwmbUm0lNbRrpGBXr s/LPqusjLON4A== 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Currently, there's a cycle between ncurses, linux, audio and music. By moving audacity to its own module, 'audio' does not have to import 'music' and 'linux' anymore. Looking at the output of "guix graph --type=module", there still appears to be cycles, so this commit will not sufficient by itself. * gnu/packages/audio.scm (audacity): Move to ... * gnu/packages/audacity.scm: This new module. Remove unneeded imports from the old module. Add a few comments to the old module to discourage re-importing the 'linux' and 'music' module in the future. * gnu/local.mk (GNU_SYSTEM_MODULES): Register new module. --- gnu/local.mk | 1 + gnu/packages/audio.scm | 140 ++--------------------------------------- 2 files changed, 5 insertions(+), 136 deletions(-) base-commit: 9a31942cabb5c73174aee96ecd873fcf89955a9d prerequisite-patch-id: f64e340873270246660f566eabe4af5e20ede85f diff --git a/gnu/local.mk b/gnu/local.mk index ad39e648f7..aab22d32d4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -112,6 +112,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/assembly.scm \ %D%/packages/astronomy.scm \ %D%/packages/attr.scm \ + %D%/packages/audacity.scm \ %D%/packages/audio.scm \ %D%/packages/augeas.scm \ %D%/packages/authentication.scm \ diff --git a/gnu/packages/audio.scm b/gnu/packages/audio.scm index 13e0f02837..d74f8de1ab 100644 --- a/gnu/packages/audio.scm +++ b/gnu/packages/audio.scm @@ -90,14 +90,16 @@ #:use-module (gnu packages libbsd) #:use-module (gnu packages libffi) #:use-module (gnu packages libusb) - #:use-module (gnu packages linux) #:use-module (gnu packages llvm) + ;; Don't import that module here, otherwise a cycle would result. + ;; #:use-module (gnu packages linux) #:use-module (gnu packages machine-learning) #:use-module (gnu packages man) #:use-module (gnu packages maths) #:use-module (gnu packages mp3) ;taglib #:use-module (gnu packages multiprecision) - #:use-module (gnu packages music) + ;; Don't import that module here, otherwise a cycle would result. + ;; #:use-module (gnu packages music) #:use-module (gnu packages ncurses) #:use-module (gnu packages networking) #:use-module (gnu packages onc-rpc) @@ -122,7 +124,6 @@ #:use-module (gnu packages vim) ;xxd #:use-module (gnu packages web) #:use-module (gnu packages webkit) - #:use-module (gnu packages wxwidgets) #:use-module (gnu packages xiph) #:use-module (gnu packages xml) #:use-module (gnu packages xorg) @@ -761,139 +762,6 @@ record, edit, mix and master audio and MIDI projects. It is targeted at audio engineers, musicians, soundtrack editors and composers.") (license license:gpl2+))) -(define-public audacity - (package - (name "audacity") - (version "3.1.3") - (source - (origin - ;; If built from the release tag, Audacity will describe itself - ;; as an "Alpha test version" and suggest to users that they use - ;; the "latest stable released version". - (method url-fetch) - (uri (string-append "https://github.com/audacity/audacity/releases/download/" - "Audacity-" version "/audacity-" version - "-source.tar.gz")) - (sha256 - (base32 - "189agx11361k9j958s6q5bngnnfx0rwaf0dwbjxy6fwvsb1wv3px")) - (patches (search-patches "audacity-ffmpeg-fallback.patch")) - (modules '((guix build utils))) - (snippet - ;; Remove bundled libraries. - '(begin - (for-each - (lambda (dir) - (delete-file-recursively (string-append "lib-src/" dir))) - '("libsoxr" "libvamp" "lv2" "soundtouch" "sqlite" "twolame" - ;; FIXME: these libraries have not been packaged yet: - ;; "libnyquist" - ;; "libscorealign" - ;; "portburn" - ;; "portsmf" - ;; "portmixer" - - ;; FIXME: we have this library, but it differs in that the Slide - ;; class does not have a member "getInverseStretchedTime". - ;; "sbsms" - )) - #t)))) - (build-system cmake-build-system) - (inputs - (list wxwidgets-3.1 - gtk+ - alsa-lib - jack-1 - expat - lame - linux-libre-headers - flac - ffmpeg - libid3tag - libjpeg-turbo - libmad - ;;("libsbsms" ,libsbsms) ;bundled version is modified - libsndfile - soundtouch - soxr ;replaces libsamplerate - sqlite - twolame - vamp - libvorbis - lv2 - lilv ;for lv2 - suil ;for lv2 - portaudio - portmidi)) - (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("gettext" ,gettext-minimal) ;for msgfmt - ("libtool" ,libtool) - ("pkg-config" ,pkg-config) - ("python" ,python) - ("which" ,which))) - (arguments - `(#:configure-flags - (list - "-Daudacity_conan_enabled=off" - "-Daudacity_lib_preference=system" - ;; TODO: enable this flag once we've packaged all dependencies - ;; "-Daudacity_obey_system_dependencies=on" - ;; disable crash reports, updates, ..., anything that phones home - "-Daudacity_has_networking=off") - #:imported-modules ((guix build glib-or-gtk-build-system) - ,@%cmake-build-system-modules) - #:modules - ((guix build utils) - (guix build cmake-build-system) - ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-cmake-rpath - (lambda* (#:key outputs #:allow-other-keys) - (substitute* "CMakeLists.txt" - (("\\$ORIGIN/\\.\\./\\$\\{_PKGLIB\\}") - (string-append (assoc-ref outputs "out") "/lib/audacity")) - (("CMAKE_BUILD_WITH_INSTALL_RPATH [A-Z]*") - "CMAKE_BUILD_WITH_INSTALL_RPATH TRUE") - (("CMAKE_INSTALL_RPATH_USE_LINK_PATH [A-Z]*") - "CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE")) - (substitute* "src/CMakeLists.txt" - (("-Wl,--disable-new-dtags") "-Wl,--enable-new-dtags")))) - (add-after 'unpack 'comment-out-revision-ident - (lambda _ - (substitute* "src/CMakeLists.txt" - (("file\\( TOUCH \".*RevisionIdent\\.h\" \\)" directive) - (string-append "# " directive))) - (substitute* "src/AboutDialog.cpp" - (("(.*RevisionIdent\\.h.*)" include-line) - (string-append "// " include-line))))) - (add-after 'unpack 'use-upstream-headers - (lambda* (#:key inputs #:allow-other-keys) - (substitute* '("libraries/lib-files/FileNames.cpp") - (("\"/usr/include/linux/magic.h\"") "")))) - (add-after 'wrap-program 'glib-or-gtk-wrap - (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))) - ;; The test suite is not "well exercised" according to the developers, - ;; and fails with various errors. See - ;; . - #:tests? #f)) - (native-search-paths - (list (search-path-specification - (variable "AUDACITY_MODULES_PATH") - (files '("lib/audacity/modules"))) - (search-path-specification - (variable "AUDACITY_PATH") - (files '("share/audacity"))))) - (home-page "https://www.audacityteam.org/") - (synopsis "Software for recording and editing sounds") - (description - "Audacity is a multi-track audio editor designed for recording, playing -and editing digital audio. It features digital effects and spectrum analysis -tools.") - (license license:gpl2+))) - (define-public audiofile (package (name "audiofile") From patchwork Wed Mar 23 18:48:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: M X-Patchwork-Id: 38026 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 8208727BBEB; Wed, 23 Mar 2022 18:50:42 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 6243127BBEA for ; Wed, 23 Mar 2022 18:50:41 +0000 (GMT) Received: from localhost ([::1]:56274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX648-0005Vr-En for patchwork@mira.cbaines.net; Wed, 23 Mar 2022 14:50:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX63X-0005Ul-Dy for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52123) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX63W-00031q-5c for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nX63W-0001Ff-2q for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54539] [PATCH 2/6] gnu: xsensors: Move to (gnu packages xorg) to break cycles. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Mar 2022 18:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54539 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54539@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 54539-submit@debbugs.gnu.org id=B54539.16480613524687 (code B ref 54539); Wed, 23 Mar 2022 18:50:02 +0000 Received: (at 54539) by debbugs.gnu.org; 23 Mar 2022 18:49:12 +0000 Received: from localhost ([127.0.0.1]:46004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62c-0001DK-Gi for submit@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:12 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:33950) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62Z-0001Ci-Hs for 54539@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:04 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id 9up12700i4UW6Th01up2o7; Wed, 23 Mar 2022 19:49:02 +0100 From: Maxime Devos Date: Wed, 23 Mar 2022 18:48:51 +0000 Message-Id: <20220323184855.25241-2-maximedevos@telenet.be> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220323184855.25241-1-maximedevos@telenet.be> References: <20220323184855.25241-1-maximedevos@telenet.be> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1648061342; bh=4f4R0oYMus6qnBnpKBPLIZPl+aNwzxDiZ0MW4WFy9rA=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FCzxaXiY4snMR/yhyM9Ol60ClNzT8veF3k8d/ifliEXuXYRO3gxygzPtymo694x5G 2wKJMaT5pryQnINrgoGlgazBvGWJeH7lr+nqW0yyaoi2z6s6d/4cBNl6JGm6HbiQDZ MrYYNqoadFtofmjyIJMWUp171EFLrGBHxz6kpuk/ym1gkiK4F2BnlqR2OBoBcJnaY6 BJY8E6EMAxIA5dhAdBCwKiy8ZQQNTBCYlD+jq0cLxYoXih4cUpYkZPr1NN2TmR4IQU fckhyAW+V6rqzTXhDegnrkiBzXZ75JzB8A7VNEW8fgX1xIDLTxO6M5BIfcgt9ebKzU GixlSgj/19Sbg== 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This partially breaks a cycle between (gnu packages linux) and (gnu packages gtk). It is not sufficient though, see next patch. * gnu/packages/linux.scm (xensors): Move to ... * gnu/packages/xorg.scm: ... this module. --- gnu/packages/linux.scm | 38 -------------------------------------- gnu/packages/xorg.scm | 41 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 8d9dc01839..dc4f91d48f 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -4502,44 +4502,6 @@ SMBus access.") #~(list (string-append "prefix=" #$output) (string-append "CC=" #$(cc-for-target)))))))) -(define-public xsensors - (package - (name "xsensors") - (version "0.70") - (source (origin - (method url-fetch) - (uri (string-append - "http://www.linuxhardware.org/xsensors/xsensors-" - version ".tar.gz")) - (sha256 - (base32 - "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh")))) - (build-system gnu-build-system) - (inputs `(("lm-sensors" ,lm-sensors "lib") - ("gtk" ,gtk+-2))) - (native-inputs (list pkg-config)) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'configure 'enable-deprecated - (lambda _ - (substitute* "src/Makefile.in" - (("-DGDK_DISABLE_DEPRECATED") "") - (("-DGTK_DISABLE_DEPRECATED") "")) - #t)) - (add-before 'configure 'remove-Werror - (lambda _ - (substitute* '("configure" "src/Makefile.in") - (("-Werror") "")) - #t))))) - (home-page "http://www.linuxhardware.org/xsensors/") - (synopsis "Hardware health information viewer") - (description - "Xsensors reads data from the libsensors library regarding hardware -health such as temperature, voltage and fan speed and displays the information -in a digital read-out.") - (license license:gpl2+))) - (define-public perf (package (name "perf") diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 14cd3bc789..7e905842be 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -10,6 +10,7 @@ ;;; Copyright © 2016 Nikita ;;; Copyright © 2016 Alex Kost ;;; Copyright © 2016 David Craven +;;; Copyright © 2017 Dave Love ;;; Copyright © 2016, 2017 John Darrington ;;; Copyright © 2017, 2018, 2019, 2020, 2021 Marius Bakke ;;; Copyright © 2017, 2018, 2019 Rutger Helling @@ -6131,6 +6132,46 @@ on a button to dismiss it or can select one of several buttons to answer a question. Xmessage can also exit after a specified time.") (license license:x11))) +;; Don't put this in (gnu packages linux) because that would create a +;; cycle between (gnu packages linux) and (gnu packages gtk). +(define-public xsensors + (package + (name "xsensors") + (version "0.70") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.linuxhardware.org/xsensors/xsensors-" + version ".tar.gz")) + (sha256 + (base32 + "1siplsfgvcxamyqf44h71jx6jdfmvhfm7mh0y1q8ps4zs6pj2zwh")))) + (build-system gnu-build-system) + (inputs `(("lm-sensors" ,lm-sensors "lib") + ("gtk" ,gtk+-2))) + (native-inputs (list pkg-config)) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'configure 'enable-deprecated + (lambda _ + (substitute* "src/Makefile.in" + (("-DGDK_DISABLE_DEPRECATED") "") + (("-DGTK_DISABLE_DEPRECATED") "")) + #t)) + (add-before 'configure 'remove-Werror + (lambda _ + (substitute* '("configure" "src/Makefile.in") + (("-Werror") "")) + #t))))) + (home-page "http://www.linuxhardware.org/xsensors/") + (synopsis "Hardware health information viewer") + (description + "Xsensors reads data from the libsensors library regarding hardware +health such as temperature, voltage and fan speed and displays the information +in a digital read-out.") + (license license:gpl2+))) + (define-public xterm (package (name "xterm") From patchwork Wed Mar 23 18:48:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: M X-Patchwork-Id: 38029 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1283E27BBE9; Wed, 23 Mar 2022 18:50:44 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 00D8227BBEC for ; Wed, 23 Mar 2022 18:50:42 +0000 (GMT) Received: from localhost ([::1]:56280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX649-0005W8-3T for patchwork@mira.cbaines.net; Wed, 23 Mar 2022 14:50:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43980) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX63Z-0005V7-CI for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52128) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX63Y-0003ED-Qo for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nX63Y-0001GJ-P5 for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54539] [PATCH 3/6] gnu: tlp: Move tlp and friends to new module to break cycles. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Mar 2022 18:50:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54539 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54539@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 54539-submit@debbugs.gnu.org id=B54539.16480613624732 (code B ref 54539); Wed, 23 Mar 2022 18:50:04 +0000 Received: (at 54539) by debbugs.gnu.org; 23 Mar 2022 18:49:22 +0000 Received: from localhost ([127.0.0.1]:46014 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62n-0001EB-3E for submit@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:22 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:33972) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62Z-0001Cj-Jy for 54539@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:08 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id 9up12700i4UW6Th01up2o9; Wed, 23 Mar 2022 19:49:02 +0100 From: Maxime Devos Date: Wed, 23 Mar 2022 18:48:52 +0000 Message-Id: <20220323184855.25241-3-maximedevos@telenet.be> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220323184855.25241-1-maximedevos@telenet.be> References: <20220323184855.25241-1-maximedevos@telenet.be> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1648061342; bh=+k2smBwbQdMTo7r9Yjnd0YVnA19ENKGaQNZlaeMoxiw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=URYGGc39csoQfNQ8izL6n5dLw5uHot5S2xLsbEshQ8OhTtm+FsLAZFF4QEKK8lBP9 YwqkyNGX5gjRdIInWnql/y7sOxWN8+Iunl12G2eS9iuRu800YE7oTNnlG/mwSr5tsd gBJOVZiH0TiSWxWY5r7lfivsd+xAPfnDl40LTko1+3NuLQhsgAoET7NtwY9josEDAl YQ0mwk80wrtMB8l63Rbzu0p1hPMnZ02VyPLjbNSgBq386z4iZFE0x/q/35eN+Nn/Ez js/6xSWK3IGtKV0fgkg5TIGG4xAk85HwLjPHTayV6yxzkws/lTEcN5yh2PBxKLTH9a WlH7qB4OTRkTQ== 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This partially breaks a cycle between (gnu packages linux) and (gnu packages gtk). It is not sufficient though, see next patch. * gnu/packages/linux.scm (tlp,tlpui): Move to ... * gnu/packages/tlp.scm: ... this new module. * gnu/local.mk (GNU_SYSTEM_MODULES): Register new module. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 192 +--------------------------------- gnu/packages/tlp.scm | 228 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 231 insertions(+), 190 deletions(-) create mode 100644 gnu/packages/tlp.scm diff --git a/gnu/local.mk b/gnu/local.mk index aab22d32d4..ad24234ae5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -582,6 +582,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/textutils.scm \ %D%/packages/text-editors.scm \ %D%/packages/time.scm \ + %D%/packages/tlp.scm \ %D%/packages/tls.scm \ %D%/packages/tmux.scm \ %D%/packages/toolkits.scm \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index dc4f91d48f..6ce640ddf2 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -113,8 +113,8 @@ #:use-module (gnu packages golang) #:use-module (gnu packages gperf) #:use-module (gnu packages gstreamer) - #:use-module (gnu packages gtk) - #:use-module (gnu packages haskell-apps) + ;; Don't import that module here, otherwise a cycle would result. + ;; #:use-module (gnu packages gtk) #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages libunwind) #:use-module (gnu packages libusb) @@ -6897,194 +6897,6 @@ The appropriate permissions must be set on the backlight or LED control interface in sysfs, which can be accomplished with the included udev rules.") (license license:expat))) -(define-public tlp - (package - (name "tlp") - (version "1.5.0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/linrunner/TLP") - (commit version))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0cssclk2brhwvn9dm7h5snm2svwy0c8cfr4z2cgkdkac2pfaaxw4")))) - (native-inputs - (list shellcheck)) - (inputs - `(("bash" ,bash) - ("dbus" ,dbus) - ("ethtool" ,ethtool) - ("eudev" ,eudev) - ("grep" ,grep) - ("hdparm" ,hdparm) - ("inetutils" ,inetutils) - ("iw" ,iw) - ("kmod" ,kmod) - ("pciutils" ,pciutils) - ("perl" ,perl) - ("rfkill" ,rfkill) - ("sed" ,sed) - ("usbutils" ,usbutils) - ("util-linux" ,util-linux) - ("wireless-tools" ,wireless-tools) - ,@(if (let ((system (or (%current-target-system) - (%current-system)))) - (or (string-prefix? "i686-" system) - (string-prefix? "x86_64-" system))) - `(("x86-energy-perf-policy" ,x86-energy-perf-policy)) - '()))) - (build-system gnu-build-system) - (arguments - ;; XXX: The full test suite is run with "checkall" but it requires - ;; "checkbashisms" and "perlcritic", not yet packaged in Guix. - `(#:test-target "shellcheck" - #:modules ((guix build gnu-build-system) - (guix build utils) - (srfi srfi-1)) - #:phases - (modify-phases %standard-phases - (delete 'configure) ; no configure script - (add-before 'build 'setenv - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (setenv "TLP_WITH_SYSTEMD" "0") - (setenv "TLP_NO_INIT" "1") - (setenv "TLP_NO_PMUTILS" "1") - (setenv "TLP_SBIN" (string-append out "/bin")) - (setenv "TLP_BATD" (string-append out "/share/tlp/bat.d")) - (setenv "TLP_BIN" (string-append out "/bin")) - (setenv "TLP_TLIB" (string-append out "/share/tlp")) - (setenv "TLP_FLIB" (string-append out "/share/tlp/func.d")) - (setenv "TLP_ULIB" (string-append out "/lib/udev")) - (setenv "TLP_CONFDEF" - (string-append out "/share/tlp/defaults.conf")) - (setenv "TLP_CONFDIR" (string-append out "/etc/tlp.d")) - (setenv "TLP_CONFREN" - (string-append out "/share/tlp/rename.conf")) - (setenv "TLP_ELOD" - (string-append out "/lib/elogind/system-sleep")) - (setenv "TLP_SHCPL" - (string-append out "/share/bash-completion/completions")) - (setenv "TLP_MAN" (string-append out "/share/man")) - (setenv "TLP_META" (string-append out "/share/metainfo"))))) - (add-before 'install 'fix-installation - (lambda _ - ;; Stop the Makefile from trying to create system directories. - (substitute* "Makefile" - (("\\[ -f \\$\\(_CONFUSR\\) \\]") "#") - (("install -d -m 755 \\$\\(_VAR\\)") "#")))) - (replace 'install - (lambda _ (invoke "make" "install-tlp" "install-man-tlp"))) - (add-after 'install 'wrap - (lambda* (#:key inputs outputs #:allow-other-keys) - (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) - (bin-files (find-files bin ".*"))) - (define (bin-directory input-name) - (let ((p (assoc-ref inputs input-name))) - (and p (string-append p "/bin")))) - (define (sbin-directory input-name) - (string-append (assoc-ref inputs input-name) "/sbin")) - (for-each (lambda (program) - (wrap-program program - `("PATH" ":" prefix - ,(append - (filter-map bin-directory - '("bash" - "coreutils" - "dbus" - "eudev" - "grep" - "inetutils" - "kmod" - "perl" - "sed" - "usbutils" - "util-linux" - "x86-energy-perf-policy")) - (filter-map sbin-directory - '("ethtool" - "hdparm" - "iw" - "pciutils" - "rfkill" - "wireless-tools")))))) - bin-files))))))) - (home-page "https://linrunner.de/en/tlp/tlp.html") - (synopsis "Power management tool for Linux") - (description "TLP is a power management tool for Linux. It comes with -a default configuration already optimized for battery life. Nevertheless, -TLP is customizable to fulfil system requirements. TLP settings are applied -every time the power supply source is changed.") - ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the - ;; rest is GPLv2+. - (license (list license:gpl2+ license:gpl3+)))) - -(define-public tlpui - (package - (name "tlpui") - (version "1.5.0") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/d4nj1/TLPUI") - (commit (string-append "tlpui-" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0ca18hazxksx516nkh28f6rd0l1039nkn7mszqfy68c461061q1h")))) - (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-setup.py - ;; Install data_files to $out/share instead of /usr/share. - (lambda _ - (substitute* "setup.py" - (("/usr/") "")))) - (add-after 'unpack 'use-tlp-input - ;; Hard-code tlp-stat filename to avoid propagating "tlp". - (lambda* (#:key inputs #:allow-other-keys) - (let ((tlp-stat (search-input-file inputs "/bin/tlp-stat"))) - (with-directory-excursion "tlpui" - (substitute* '("file.py" "settingshelper.py" "statui.py") - (("which\\(\"tlp-stat\"\\)") - (string-append "'" tlp-stat "'")) - (("\"tlp-stat\"") - (string-append "'" tlp-stat "'"))))))) - (add-before 'check 'fix-home-directory - (lambda _ - ;; Tests fail with "Permission denied: - ;; '/homeless-shelter'". - (setenv "HOME" "/tmp"))) - ;; `sanity-check' phase errors out with the following - ;; messages: "Unable to init server: Could not connect: - ;; Connection refused" and "Error: cannot read user - ;; configuration from /etc/tlp.conf or /etc/default/tlp". - (delete 'sanity-check) - (replace 'check - (lambda _ - (invoke "python" "-m" "discover"))) - (add-after 'install 'wrap-gi-python - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (gi-typelib-path (getenv "GI_TYPELIB_PATH"))) - (wrap-program (string-append out "/bin/tlpui") - `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))))) - (native-inputs - (list `(,glib "bin") gobject-introspection python-discover)) - (inputs - (list gtk+ python-pygobject tlp)) - (home-page "https://github.com/d4nj1/TLPUI") - (synopsis "User interface for TLP written in Python") - (description - "The Python scripts in this project generate a GTK-UI to change -TLP configuration files easily. It aims to protect users from setting -bad configuration and to deliver a basic overview of all the valid -configuration values.") - (license license:gpl2+))) - (define-public lshw (package (name "lshw") diff --git a/gnu/packages/tlp.scm b/gnu/packages/tlp.scm new file mode 100644 index 0000000000..dfe7d3616b --- /dev/null +++ b/gnu/packages/tlp.scm @@ -0,0 +1,228 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2021 Brice Waegeneire +;;; Copyright © 2018-2022 Nicolas Goaziou +;;; Copyright © 2019 Stefan Stefanović +;;; Copyright © 2019 Ludovic Courtès +;;; Copyright © 2017 Tobias Geerinckx-Rice +;;; Copyright © 2017 Mathieu Othacehe +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages tlp) + #:use-module (guix packages) + #:use-module (guix build-system gnu) + #:use-module (guix build-system python) + #:use-module (guix git-download) + #:use-module (gnu packages admin) ;inetutils + #:use-module (gnu packages base) ;grep + #:use-module (gnu packages bash) + #:use-module (gnu packages check) ;python-discover + #:use-module (gnu packages glib) ;dbus + #:use-module (gnu packages haskell-apps) ;shellcheck + #:use-module (gnu packages gtk) + #:use-module (gnu packages linux) ;eudev + #:use-module (gnu packages networking) ;ethtool + #:use-module (gnu packages pciutils) + #:use-module (gnu packages perl) ;ethtool + #:use-module ((guix licenses) #:prefix license:)) + +(define-public tlp + (package + (name "tlp") + (version "1.5.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/linrunner/TLP") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0cssclk2brhwvn9dm7h5snm2svwy0c8cfr4z2cgkdkac2pfaaxw4")))) + (native-inputs + (list shellcheck)) + (inputs + `(("bash" ,bash) + ("dbus" ,dbus) + ("ethtool" ,ethtool) + ("eudev" ,eudev) + ("grep" ,grep) + ("hdparm" ,hdparm) + ("inetutils" ,inetutils) + ("iw" ,iw) + ("kmod" ,kmod) + ("pciutils" ,pciutils) + ("perl" ,perl) + ("rfkill" ,rfkill) + ("sed" ,sed) + ("usbutils" ,usbutils) + ("util-linux" ,util-linux) + ("wireless-tools" ,wireless-tools) + ,@(if (let ((system (or (%current-target-system) + (%current-system)))) + (or (string-prefix? "i686-" system) + (string-prefix? "x86_64-" system))) + `(("x86-energy-perf-policy" ,x86-energy-perf-policy)) + '()))) + (build-system gnu-build-system) + (arguments + ;; XXX: The full test suite is run with "checkall" but it requires + ;; "checkbashisms" and "perlcritic", not yet packaged in Guix. + `(#:test-target "shellcheck" + #:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1)) + #:phases + (modify-phases %standard-phases + (delete 'configure) ; no configure script + (add-before 'build 'setenv + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "TLP_WITH_SYSTEMD" "0") + (setenv "TLP_NO_INIT" "1") + (setenv "TLP_NO_PMUTILS" "1") + (setenv "TLP_SBIN" (string-append out "/bin")) + (setenv "TLP_BATD" (string-append out "/share/tlp/bat.d")) + (setenv "TLP_BIN" (string-append out "/bin")) + (setenv "TLP_TLIB" (string-append out "/share/tlp")) + (setenv "TLP_FLIB" (string-append out "/share/tlp/func.d")) + (setenv "TLP_ULIB" (string-append out "/lib/udev")) + (setenv "TLP_CONFDEF" + (string-append out "/share/tlp/defaults.conf")) + (setenv "TLP_CONFDIR" (string-append out "/etc/tlp.d")) + (setenv "TLP_CONFREN" + (string-append out "/share/tlp/rename.conf")) + (setenv "TLP_ELOD" + (string-append out "/lib/elogind/system-sleep")) + (setenv "TLP_SHCPL" + (string-append out "/share/bash-completion/completions")) + (setenv "TLP_MAN" (string-append out "/share/man")) + (setenv "TLP_META" (string-append out "/share/metainfo"))))) + (add-before 'install 'fix-installation + (lambda _ + ;; Stop the Makefile from trying to create system directories. + (substitute* "Makefile" + (("\\[ -f \\$\\(_CONFUSR\\) \\]") "#") + (("install -d -m 755 \\$\\(_VAR\\)") "#")))) + (replace 'install + (lambda _ (invoke "make" "install-tlp" "install-man-tlp"))) + (add-after 'install 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) + (bin-files (find-files bin ".*"))) + (define (bin-directory input-name) + (let ((p (assoc-ref inputs input-name))) + (and p (string-append p "/bin")))) + (define (sbin-directory input-name) + (string-append (assoc-ref inputs input-name) "/sbin")) + (for-each (lambda (program) + (wrap-program program + `("PATH" ":" prefix + ,(append + (filter-map bin-directory + '("bash" + "coreutils" + "dbus" + "eudev" + "grep" + "inetutils" + "kmod" + "perl" + "sed" + "usbutils" + "util-linux" + "x86-energy-perf-policy")) + (filter-map sbin-directory + '("ethtool" + "hdparm" + "iw" + "pciutils" + "rfkill" + "wireless-tools")))))) + bin-files))))))) + (home-page "https://linrunner.de/en/tlp/tlp.html") + (synopsis "Power management tool for Linux") + (description "TLP is a power management tool for Linux. It comes with +a default configuration already optimized for battery life. Nevertheless, +TLP is customizable to fulfil system requirements. TLP settings are applied +every time the power supply source is changed.") + ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the + ;; rest is GPLv2+. + (license (list license:gpl2+ license:gpl3+)))) + +(define-public tlpui + (package + (name "tlpui") + (version "1.5.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/d4nj1/TLPUI") + (commit (string-append "tlpui-" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0ca18hazxksx516nkh28f6rd0l1039nkn7mszqfy68c461061q1h")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-setup.py + ;; Install data_files to $out/share instead of /usr/share. + (lambda _ + (substitute* "setup.py" + (("/usr/") "")))) + (add-after 'unpack 'use-tlp-input + ;; Hard-code tlp-stat filename to avoid propagating "tlp". + (lambda* (#:key inputs #:allow-other-keys) + (let ((tlp-stat (search-input-file inputs "/bin/tlp-stat"))) + (with-directory-excursion "tlpui" + (substitute* '("file.py" "settingshelper.py" "statui.py") + (("which\\(\"tlp-stat\"\\)") + (string-append "'" tlp-stat "'")) + (("\"tlp-stat\"") + (string-append "'" tlp-stat "'"))))))) + (add-before 'check 'fix-home-directory + (lambda _ + ;; Tests fail with "Permission denied: + ;; '/homeless-shelter'". + (setenv "HOME" "/tmp"))) + ;; `sanity-check' phase errors out with the following + ;; messages: "Unable to init server: Could not connect: + ;; Connection refused" and "Error: cannot read user + ;; configuration from /etc/tlp.conf or /etc/default/tlp". + (delete 'sanity-check) + (replace 'check + (lambda _ + (invoke "python" "-m" "discover"))) + (add-after 'install 'wrap-gi-python + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (gi-typelib-path (getenv "GI_TYPELIB_PATH"))) + (wrap-program (string-append out "/bin/tlpui") + `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))))))))) + (native-inputs + (list `(,glib "bin") gobject-introspection python-discover)) + (inputs + (list gtk+ python-pygobject tlp)) + (home-page "https://github.com/d4nj1/TLPUI") + (synopsis "User interface for TLP written in Python") + (description + "The Python scripts in this project generate a GTK-UI to change +TLP configuration files easily. It aims to protect users from setting +bad configuration and to deliver a basic overview of all the valid +configuration values.") + (license license:gpl2+))) From patchwork Wed Mar 23 18:48:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: M X-Patchwork-Id: 38031 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 66D8027BBEA; Wed, 23 Mar 2022 18:51:09 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D386C27BBE9 for ; Wed, 23 Mar 2022 18:51:08 +0000 (GMT) Received: from localhost ([::1]:57630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX64a-0006R6-1X for patchwork@mira.cbaines.net; Wed, 23 Mar 2022 14:51:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43978) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX63Z-0005V6-Bx for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52125) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX63X-0003Dv-FP for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nX63X-0001Fw-Cw for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54539] [PATCH 4/6] gnu: go-netlink: Move to (gnu packages networking) to break cycles. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Mar 2022 18:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54539 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54539@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 54539-submit@debbugs.gnu.org id=B54539.16480613534702 (code B ref 54539); Wed, 23 Mar 2022 18:50:03 +0000 Received: (at 54539) by debbugs.gnu.org; 23 Mar 2022 18:49:13 +0000 Received: from localhost ([127.0.0.1]:46008 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62i-0001Dg-Q2 for submit@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:13 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:33982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62Z-0001Ck-Ja for 54539@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:05 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id 9up12700i4UW6Th01up2oK; Wed, 23 Mar 2022 19:49:02 +0100 From: Maxime Devos Date: Wed, 23 Mar 2022 18:48:53 +0000 Message-Id: <20220323184855.25241-4-maximedevos@telenet.be> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220323184855.25241-1-maximedevos@telenet.be> References: <20220323184855.25241-1-maximedevos@telenet.be> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1648061342; bh=r68AuVIPLdqOwyIpAkR7zIOnNLB0Y0HfiXxBPvpnuY4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=Mx2y8MvZT84hWvsHX3gnLjcePMrocv8nZrBqR0+va4vvdE4fg2sRsxvCHUQNWPdoh 5/jMwcNh2wLpyOTGJMBkTI/aXQmwaTCsftsQONDFP5+OmuLOtKlC0gNo1X7tgA6yLz 4sQDCXsIPE7XIUNLeEMs8F3IhWLr8Lko93Ht0+SL8I7bwi+1om01IpWbOwpj7kbfZH cELFnn8YmiNPVfOgVu9oubiC85D3EvVJjwAtCkoLDqphFmRgMbBxxgJFUcChq8LNnS XRaCg8AnxD1RTiGn6QQt6C6w4JVVNjDSschSUhzKNouv8PjwGwIHwo+xsov6g+9mUX PGLKPENgJZU1A== 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This (partially?) breaks a cycle between (gnu packages linux) and (gnu packages networking). * gnu/packages/linux.scm (go-netlink): Move to ... * gnu/packages/networking.scm: ... this module. --- gnu/packages/linux.scm | 30 ++---------------------------- gnu/packages/networking.scm | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 28 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 6ce640ddf2..5a0c5650e4 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -125,7 +125,8 @@ #:use-module (gnu packages multiprecision) #:use-module (gnu packages ncurses) #:use-module (gnu packages netpbm) - #:use-module (gnu packages networking) + ;; Don't import that module here, otherwise a cycle would result. + ;; #:use-module (gnu packages networking) #:use-module (gnu packages ninja) #:use-module (gnu packages nss) #:use-module (gnu packages perl) @@ -159,7 +160,6 @@ #:use-module (guix build-system cmake) #:use-module (guix build-system copy) #:use-module (guix build-system gnu) - #:use-module (guix build-system go) #:use-module (guix build-system meson) #:use-module (guix build-system python) #:use-module (guix build-system trivial) @@ -7620,32 +7620,6 @@ nfnetlink_queue, nfnetlink_conntrack) and their respective users and/or management tools in userspace.") (license license:gpl2))) -(define-public go-netlink - (package - (name "go-netlink") - (version "1.0.0") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/vishvananda/netlink") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0hpzghf1a4cwawzhkiwdzin80h6hd09fskl77d5ppgc084yvj8x0")))) - (build-system go-build-system) - (arguments - `(#:import-path "github.com/vishvananda/netlink")) - (native-inputs - (list go-golang-org-x-sys go-netns)) - (home-page "https://github.com/vishvananda/netlink") - (synopsis "Simple netlink library for Go") - (description "The netlink package provides a simple netlink library for -Go. Netlink is the interface a user-space program in Linux uses to -communicate with the kernel. It can be used to add and remove interfaces, set -IP addresses and routes, and configure IPsec.") - (license license:asl2.0))) - (define-public libinih (package (name "libinih") diff --git a/gnu/packages/networking.scm b/gnu/packages/networking.scm index b45f2f79f2..e8720e0faf 100644 --- a/gnu/packages/networking.scm +++ b/gnu/packages/networking.scm @@ -1663,6 +1663,34 @@ manage, and delete Internet resources from Gandi.net such as domain names, virtual machines, and certificates.") (license license:gpl3+))) +;; Don't put this in (gnu packages linux) even though it is Linux-specific, +;; because that would create cycles. +(define-public go-netlink + (package + (name "go-netlink") + (version "1.0.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/vishvananda/netlink") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0hpzghf1a4cwawzhkiwdzin80h6hd09fskl77d5ppgc084yvj8x0")))) + (build-system go-build-system) + (arguments + `(#:import-path "github.com/vishvananda/netlink")) + (native-inputs + (list go-golang-org-x-sys go-netns)) + (home-page "https://github.com/vishvananda/netlink") + (synopsis "Simple netlink library for Go") + (description "The netlink package provides a simple netlink library for +Go. Netlink is the interface a user-space program in Linux uses to +communicate with the kernel. It can be used to add and remove interfaces, set +IP addresses and routes, and configure IPsec.") + (license license:asl2.0))) + (define-public go-netns (let ((commit "13995c7128ccc8e51e9a6bd2b551020a27180abd") (revision "1")) From patchwork Wed Mar 23 18:48:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: M X-Patchwork-Id: 38028 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 7200727BBEA; Wed, 23 Mar 2022 18:50:43 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E58E327BBE9 for ; Wed, 23 Mar 2022 18:50:42 +0000 (GMT) Received: from localhost ([::1]:56358 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX64A-0005a2-2F for patchwork@mira.cbaines.net; Wed, 23 Mar 2022 14:50:42 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43976) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX63Z-0005V5-AW for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52126) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX63X-0003EA-Uv for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nX63X-0001G4-SI for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54539] [PATCH 5/6] gnu: earlyoom: Avoid importing Goland and Haskelland to break cycles. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Mar 2022 18:50:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54539 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54539@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 54539-submit@debbugs.gnu.org id=B54539.16480613534710 (code B ref 54539); Wed, 23 Mar 2022 18:50:03 +0000 Received: (at 54539) by debbugs.gnu.org; 23 Mar 2022 18:49:13 +0000 Received: from localhost ([127.0.0.1]:46010 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62j-0001Dn-7z for submit@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:13 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:33988) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62Z-0001Cl-OT for 54539@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:05 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id 9up12700i4UW6Th01up2oM; Wed, 23 Mar 2022 19:49:03 +0100 From: Maxime Devos Date: Wed, 23 Mar 2022 18:48:54 +0000 Message-Id: <20220323184855.25241-5-maximedevos@telenet.be> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220323184855.25241-1-maximedevos@telenet.be> References: <20220323184855.25241-1-maximedevos@telenet.be> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1648061343; bh=nFb6CvzUz3RXDGjRAiW/qxxObFrfdZz5S4mjDITBWbw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ntvIyHggthW2KnUEbxGGn3AaSxvl55RRAMQEV4NR5ZHhtpQhG/zYKbwdTtz4jqvIB yS8MV5rlBUKsWJmSUYmP8imtHXL1U9pBgdczDsd8yiXbNPYLmoFRacK/qBYvZEZGcj n+XeCH1lLApwfRZlCU11XYkdVznPpDHAKz6TxA2g5FCwt68WNGtGB0RWe9ekhBXZQK K6yG3VQgL53MSMNb2xSVqYiVFrZpRgQprj87wABftsX5lgZCOMt3LH3JEjztHpLN4u ztQ/4CPt0QUK2sQKtH+rwWEUQuubkOhgEaUqIr/uy1Bx/E/fWwDt24ADevP+jV4vUX HFxxcjyGSseKg== 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This (partially?) breaks a cycle between (gnu packages linux), (gnu packages haskell-xyz) and (gnu packages golang). It seems a bit cheaty to me but it works. * gnu/packages/linux.scm (earlyoom): Use 'module-ref' and friends to access 'go' and 'pandoc'. Remove now unneeded imports. --- gnu/packages/linux.scm | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 5a0c5650e4..c47204dc76 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -52,7 +52,7 @@ ;;; Copyright © 2020 pukkamustard ;;; Copyright © 2021 B. Wilson ;;; Copyright © 2021 Ivan Gankevich -;;; Copyright © 2021 Maxime Devos +;;; Copyright © 2021,2022 Maxime Devos ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Sarah Morgensen ;;; Copyright © 2021 Felix Gruber @@ -110,12 +110,13 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages glib) #:use-module (gnu packages gnupg) - #:use-module (gnu packages golang) + ;; Don't import these modules here, otherwise a cycle would result. + ;; #:use-module (gnu packages golang) #:use-module (gnu packages gperf) #:use-module (gnu packages gstreamer) - ;; Don't import that module here, otherwise a cycle would result. + ;; Don't import these modules here, otherwise a cycle would result. ;; #:use-module (gnu packages gtk) - #:use-module (gnu packages haskell-xyz) + ;; #:use-module (gnu packages haskell-xyz) #:use-module (gnu packages libunwind) #:use-module (gnu packages libusb) #:use-module (gnu packages llvm) @@ -3771,12 +3772,17 @@ from the module-init-tools project.") (append ;; To generate the manpage. (if (or (target-x86-64?) (target-x86-32?)) - (list pandoc) + ;; Avoid adding Haskelland to the module closure + ;; when all we need is util-linux. + (list (module-ref (resolve-interface '(gnu packages haskell-xyz)) + 'pandoc)) '()) (list ;; For the test suite. cppcheck - go))) + ;; Avoid adding 'golang' and its dependencies Rubyland and + ;; Nodeland to the module closure when all we need is util-linux. + (module-ref (resolve-interface '(gnu packages golang)) 'go)))) (home-page "https://github.com/rfjakob/earlyoom") (synopsis "Simple out of memory (OOM) daemon for the Linux kernel") (description "Early OOM is a minimalist out of memory (OOM) daemon that From patchwork Wed Mar 23 18:48:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: M X-Patchwork-Id: 38027 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id BC62527BBEA; Wed, 23 Mar 2022 18:50:42 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id D154227BBE9 for ; Wed, 23 Mar 2022 18:50:41 +0000 (GMT) Received: from localhost ([::1]:56296 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nX648-0005Wb-WC for patchwork@mira.cbaines.net; Wed, 23 Mar 2022 14:50:41 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nX63Z-0005V4-AT for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52127) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nX63Y-0003EC-Co for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nX63Y-0001GB-BB for guix-patches@gnu.org; Wed, 23 Mar 2022 14:50:04 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#54539] [PATCH 6/6] gnu: linux: Avoid importing (gnu packages check) to break cycles. Resent-From: Maxime Devos Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 23 Mar 2022 18:50:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54539 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54539@debbugs.gnu.org Cc: Maxime Devos Received: via spool by 54539-submit@debbugs.gnu.org id=B54539.16480613544716 (code B ref 54539); Wed, 23 Mar 2022 18:50:04 +0000 Received: (at 54539) by debbugs.gnu.org; 23 Mar 2022 18:49:14 +0000 Received: from localhost ([127.0.0.1]:46012 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62j-0001Dv-LN for submit@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:14 -0400 Received: from baptiste.telenet-ops.be ([195.130.132.51]:33998) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nX62Z-0001Cm-Sl for 54539@debbugs.gnu.org; Wed, 23 Mar 2022 14:49:05 -0400 Received: from localhost.localdomain ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by baptiste.telenet-ops.be with bizsmtp id 9up12700i4UW6Th01up3oP; Wed, 23 Mar 2022 19:49:03 +0100 From: Maxime Devos Date: Wed, 23 Mar 2022 18:48:55 +0000 Message-Id: <20220323184855.25241-6-maximedevos@telenet.be> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220323184855.25241-1-maximedevos@telenet.be> References: <20220323184855.25241-1-maximedevos@telenet.be> MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1648061343; bh=BTuP7W7CivJKtyGhDtNZyfv9SEmp1sqFHFJFh+iEacE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ezcefkVO4F3qZsrnbVyqGBd4/51FqRc+6hqVGHLMOsPGvBz4dO1/IkSLLBX4mhfL+ QtcjoWQTZhEg479uxBpkxerNdCgR/cx4d99OASkn0V22Jwslh4lQMDsgLMuBNKpWQ1 4+Py5o0bUhMo8JijEroN06anSFk4qo87eXuuqr9HGl3UelQMFk8zlyRcKBxokIXRZ3 dtUSWiLRA7Mfh+5JK2p3tGp8XBqDK3vVOB56q80nR/XW5kc2HGe/LIquWcODyEp10N 5jXUNw9z9x+RjUBo3YlNES2syEUgalI6m1qQliTri7jMtO5EWe2kRvi9PI/BnmzUDJ cWZVZ8fsrTHmw== 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches This (partially?) breaks a cycle between (gnu packages linux) and (gnu packages check). There's more work to be done though, see future patches -- stay tuned! * gnu/packages/linux.scm (python-pamela,earlyoom,multipath-tools,mtd-utils,procenv): Don't import (gnu packages check), instead access that module via 'module-ref' + 'resolve-interface'. --- gnu/packages/linux.scm | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index c47204dc76..8176533d68 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -92,7 +92,9 @@ #:use-module (gnu packages bison) #:use-module (gnu packages boost) #:use-module (gnu packages calendar) - #:use-module (gnu packages check) + ;; Don't import these modules here, otherwise a cycle would result. + ;; If needed, use 'module-ref' + 'resolve-interface'. + ;; #:use-module (gnu packages check) #:use-module (gnu packages cpio) #:use-module (gnu packages crypto) #:use-module (gnu packages cryptsetup) @@ -1681,7 +1683,10 @@ at login. Local and dynamic reconfiguration are its key features.") (inputs (list linux-pam)) (native-inputs - (list python-pytest)) + ;; Avoid adding Pythonland and GNOMEland to the module closure when + ;; all we need is util-linux. + (list (module-ref (resolve-interface '(gnu packages check)) + 'python-pytest))) (home-page "https://github.com/minrk/pamela") (synopsis "PAM interface using ctypes") (description "This package provides a PAM interface using @code{ctypes}.") @@ -3779,7 +3784,10 @@ from the module-init-tools project.") '()) (list ;; For the test suite. - cppcheck + ;; Avoid adding Pythonland and GNOMEland to the module closure when + ;; all we need is util-linux. + (module-ref (resolve-interface '(gnu packages check)) + 'cppcheck) ;; Avoid adding 'golang' and its dependencies Rubyland and ;; Nodeland to the module closure when all we need is util-linux. (module-ref (resolve-interface '(gnu packages golang)) 'go)))) @@ -5183,7 +5191,10 @@ arrays when needed.") (native-inputs (list perl pkg-config valgrind ;; For tests. - cmocka)) + ;; Avoid adding Pythonland and GNOMEland to the module closure when + ;; all we need is util-linux. + (module-ref (resolve-interface '(gnu packages check)) + 'cmocka))) (inputs `(("json-c" ,json-c) ("libaio" ,libaio) @@ -6594,7 +6605,11 @@ exceeded.") #~(list) #~(list "--enable-unit-tests")))) (native-inputs - (list cmocka pkg-config)) + (list ;; Avoid adding Pythonland and GNOMEland to the module closure when + ;; all we need is util-linux. + (module-ref (resolve-interface '(gnu packages check)) + 'cmocka) + pkg-config)) (inputs `(("acl" ,acl) ; extended attributes (xattr) ("libuuid" ,util-linux "lib") @@ -7243,7 +7258,11 @@ the MTP device as a file system.") (native-inputs (list pkg-config ;; For tests. - check groff)) + ;; Avoid adding Pythonland and GNOMEland to the module closure when + ;; all we need is util-linux. + (module-ref (resolve-interface '(gnu packages check)) + 'check) + groff)) (inputs (list expat libcap libselinux)) (synopsis "Utility to show process environment")