From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id mFtUOkUacGf9dAAAqHPOHw:P1 (envelope-from ) for ; Sat, 28 Dec 2024 15:33:26 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id mFtUOkUacGf9dAAAqHPOHw (envelope-from ) for ; Sat, 28 Dec 2024 16:33:26 +0100 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=lHAHR2lS; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=h+2n7Nhy; 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=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735400005; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=bfCSkjmnJoYLR44qO8PR4lmW+aukWsEgPIgxya+3CaE=; b=N+5AByz2hqy6LPNXl5AdM++z305Vmba6k14mepIJdtzo4Mqk4ct17cTPiOZDpUbn+8WU1i 3IwKeEp1iMDxcKX0KWyIM2pZUYoMXY/4Z7C+823WsJFc+B4TMWlfttB3IG4v1doF6FKQ9v Y6SNRf5F9u7YmrZIdQExUIGRHFnKXU7vyip25F+2hFbJzSZehSg60WJMgiZxp+0CHVWCKP u7hsZCrQi5FN0u35thvPznlvLMDTI1c7m5Bcq+GQKX/HfGW8mImq3sC4LigAO+7xRYafAA YJJtNs5ryYiYuNiCAxO25/9Vp+j6XXi8KF1BjM0exo97ZL7h5M3YIldsgb9V3A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=lHAHR2lS; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=h+2n7Nhy; 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=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735400005; a=rsa-sha256; cv=none; b=AQyr6zOsdI2ChZIr25LBmmgGJyDk9CQ7SMHGRstcI4/bbkbR5fy0X6ndedu09Um3bD5dcm 9u++ePmYWPDVz1hZNk8Kz/vb8NbaIZRHyz2lmBif/y/NXnBw0ue+AHS3B4V16thgciUrtU pajiZUDl0b/o2a6gxCrgTOVNiYzRKUpyT9ry/KN1cLsM26YbP7WqF6CnaEZpa/fI0sGs6L GYwkJFnm/2eaX3jTw/cLxpuIgWIs3ZMeVQItG0vtvxLkrXIu6QhDT6n+rLV4+gW6PKGKAu DGedZtlhcTTIYqEB6MownfJaBrq8q8Lv0+aUy25QosPhHeELvwhWUMGOxuV59g== 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 E29989CAEA for ; Sat, 28 Dec 2024 16:33:24 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRYoK-000235-64; Sat, 28 Dec 2024 10:33:04 -0500 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 1tRYoI-00022n-Uj for guix-patches@gnu.org; Sat, 28 Dec 2024 10:33:02 -0500 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRYoI-0000fP-Lg for guix-patches@gnu.org; Sat, 28 Dec 2024 10:33:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=bfCSkjmnJoYLR44qO8PR4lmW+aukWsEgPIgxya+3CaE=; b=lHAHR2lSBzckwyDrMLxRNYPJrVfNvYAipDlpUyW8eyikV5Ei4n2sIM5uEr+AC/sFzMaJzJe6frF0ftXO73MK+A9aU0hdbVVMIptGETJ9E5sw7o2WtN5b18qMLrbrRv8MWRM3veGF/4UYVgtfm+uN4DtN25VJlN3eetN/NwaHcbZYfB5nCOscq3haOhg/hnUcXZX01x1ljHG4ISwQ2QAYpkRMdzhfknukCX6BOkb7rNWFC7yCCY0DXl2MHacMnTiBluo1rkhM8QEGIUo8X7zBeS+TgpdVne+xjjNoCj0zWEKWamzo1e9TrEj8Rq8v3i0FkzvtB3PWWABwcnmpZ3kOdA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tRYoI-0002xc-G8 for guix-patches@gnu.org; Sat, 28 Dec 2024 10:33:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75159] [PATCH v1 3/5] gnu: Add corectrl. Resent-From: Ashvith Shetty Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 28 Dec 2024 15:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 75159 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75159@debbugs.gnu.org Cc: Ashvith Shetty Received: via spool by 75159-submit@debbugs.gnu.org id=B75159.173539996411326 (code B ref 75159); Sat, 28 Dec 2024 15:33:02 +0000 Received: (at 75159) by debbugs.gnu.org; 28 Dec 2024 15:32:44 +0000 Received: from localhost ([127.0.0.1]:52328 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRYo0-0002wa-7P for submit@debbugs.gnu.org; Sat, 28 Dec 2024 10:32:44 -0500 Received: from mail-pl1-f179.google.com ([209.85.214.179]:56632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRYnx-0002wJ-TR for 75159@debbugs.gnu.org; Sat, 28 Dec 2024 10:32:42 -0500 Received: by mail-pl1-f179.google.com with SMTP id d9443c01a7336-2166360285dso101212875ad.1 for <75159@debbugs.gnu.org>; Sat, 28 Dec 2024 07:32:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735399896; x=1736004696; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bfCSkjmnJoYLR44qO8PR4lmW+aukWsEgPIgxya+3CaE=; b=h+2n7Nhy+gRv3yvSxnUdtL44IC7tByPCHD3i+7Q2PxbROaeiJAB/fiOLDiGrYmLhdD Cqardd3YwQJNuxpdzqBD7Sga/bjTDqYE5Q9pN5hho6IpkxYS5B25QcR1Hw0OihUvvnxQ +ZvcfWR5Y+qUo1e7ATMvEsIaW2BO78zYpfsBA9T6sn+3NbaDaO6OoiWKrx6YvJY3xVuW wZ6eEaz9zX+NtOCvu4WBHnNHT48f8iIS9earq8LEw/h26AB+MJm9tA7ot5dTxVVAGXoO JubitQ1YUzZE/DjZJhWJI1REnAMcK7DdeDAJyoVRUX76M/WkpyD0TiQLlznzU+gUvFDA c+kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735399896; x=1736004696; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bfCSkjmnJoYLR44qO8PR4lmW+aukWsEgPIgxya+3CaE=; b=Lj9j1S/tjbG5j5YG2wchxL5yDgEZ3G+Ss+/5zF48rv20vNIQBrsgsLNwx0wa9rpkRw s23EQy6MazAdT3G0olrFjrvoi0QBAcOpB1nKe703/QlgL0bmFNeVSoXkVjlRIrbFJv88 Qt4VEZFjI/IqvJA7y8j1nWh7AssVA0m19S6tSdD28svK/qbnn6ibTUZQ3o/v6lnrayOo lf1eA17DrfDOOq/eDu2oj6Pmdq55SmkU9j9jcsDVQA+ZXGy1xSwf6zijWujsJnEdBvmx zIoFvbqGaKzLhKXKJRTI8qeD3EKhFPR5DwVwQ3ZlVR5atYG1iQf6KLcI7/odTWzoaCwk 3z3Q== X-Gm-Message-State: AOJu0YzJXqAZxaufITEoIaKZ8t6WBSmIRBGrNjlD1IF5An6m5npkp1my +Dy83LRz8I9ArDUVPQt5Ga+k+n69d+SB6ZFg3d1meje/O920Fy+mOj2Q/fG1 X-Gm-Gg: ASbGncvEXFg1SN+jpgISJw/pZkjcx980jH7oTouxpmBYC4xzttopyKp80WOJU4WNDFv 2Lctc4A+t7kNAZMuy+uwk7iss4WrgHGdArh73vVCa9Eu4MfTz6Tmgb+X6e/RqgQ8GEwD+8V2AuZ mEzi3g3dCAWXua/Ux3SFp05zAVCNS60hOJ/rpjN+4kAwOxgPrGfKLLicGbQ5jFyivq9r66/M8bf flQR/JLLHCGrsQb0NpjkbsmZADSMvR0M9A4gsXagxtE7HylvGHtUXyndMc0DBNT5DlqIZtfF3aZ KOeRCdaRZQ== X-Google-Smtp-Source: AGHT+IGEcudERvnRjF4mb9H23a+imBVrlAAZuyycAS+EoIMDvvJjm2hz4/R+nhrwv2al9fVM2cg8OQ== X-Received: by 2002:a17:90b:538b:b0:2ee:5bc9:75b5 with SMTP id 98e67ed59e1d1-2f452dfccf6mr44387775a91.4.1735399895956; Sat, 28 Dec 2024 07:31:35 -0800 (PST) Received: from localhost.localdomain ([2401:4900:8813:846d:3ba6:3078:1833:5938]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-219dc9629acsm151509825ad.46.2024.12.28.07.31.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2024 07:31:35 -0800 (PST) From: Ashvith Shetty X-Google-Original-From: Ashvith Shetty Date: Sat, 28 Dec 2024 21:00:05 +0530 Message-ID: <20241228153020.20233-4-ashvith@noreply.codeberg.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241228153020.20233-1-ashvith@noreply.codeberg.org> References: <20241228153020.20233-1-ashvith@noreply.codeberg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.36 X-Spam-Score: -2.36 X-Migadu-Queue-Id: E29989CAEA X-Migadu-Scanner: mx10.migadu.com X-TUID: NB9IODVLtBAj * gnu/packages/pciutils.scm (corectrl): New variable. * gnu/packages/patches/corectrl-polkit-install-dir.patch: New file. Change-Id: I726c6cbfb6530abd8284f36e10a1e1f7a0fc4661 --- .../patches/corectrl-polkit-install-dir.patch | 21 +++++ gnu/packages/pciutils.scm | 83 ++++++++++++++++++- 2 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/corectrl-polkit-install-dir.patch diff --git a/gnu/packages/patches/corectrl-polkit-install-dir.patch b/gnu/packages/patches/corectrl-polkit-install-dir.patch new file mode 100644 index 0000000000..586e096cf4 --- /dev/null +++ b/gnu/packages/patches/corectrl-polkit-install-dir.patch @@ -0,0 +1,21 @@ +diff --git a/src/helper/CMakeLists.txt b/src/helper/CMakeLists.txt +index c262086..523ea97 100644 +--- a/src/helper/CMakeLists.txt ++++ b/src/helper/CMakeLists.txt +@@ -26,15 +26,7 @@ message("D-Bus files will be installed into ${DBUS_DATADIR_PREFIX_DIR}/dbus-1") + + # Find polkit + pkg_check_modules(POLKIT REQUIRED polkit-gobject-1) +-execute_process( +- COMMAND pkg-config --variable=policydir polkit-gobject-1 +- RESULT_VARIABLE POLKIT_POLICY_INSTALL_DIR_RESULT +- OUTPUT_VARIABLE POLKIT_POLICY_INSTALL_DIR +- OUTPUT_STRIP_TRAILING_WHITESPACE +-) +-if(NOT POLKIT_POLICY_INSTALL_DIR_RESULT EQUAL "0") +- message(FATAL_ERROR "Failed to retrieve Polkit `policydir` variable using pkg-config") +-endif() ++option(POLKIT_POLICY_INSTALL_DIR "Polkit policy directory") + + list(APPEND HELPER_COMPILE_DEFINITIONS + SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm index 08f1634113..1ae568a8eb 100644 --- a/gnu/packages/pciutils.scm +++ b/gnu/packages/pciutils.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2020, 2023, 2024 Janneke Nieuwenhuizen ;;; Copyright © 2022 Brendan Tildesley ;;; Copyright © 2022 Marius Bakke +;;; Copyright © 2024 Ashvith Shetty ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,11 +31,23 @@ (define-module (gnu packages pciutils) #:use-module (guix utils) #:use-module (guix git-download) #:use-module (guix build-system gnu) + #:use-module (guix build-system qt) #:use-module (gnu packages) + #:use-module (gnu packages base) + #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages crypto) + #:use-module (gnu packages gcc) + #:use-module (gnu packages gl) + #:use-module (gnu packages logging) + #:use-module (gnu packages maths) + #:use-module (gnu packages polkit) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages glib) #:use-module (gnu packages linux) - #:use-module (gnu packages base)) + #:use-module (gnu packages qt) + #:use-module (gnu packages vulkan) + #:use-module (gnu packages xml)) (define-public hwdata (package @@ -173,3 +186,71 @@ (define-public pciutils of operating systems. This includes the @command{lspci} and @command{setpci} commands.") (license license:gpl2+))) + +;; corectrl also requires the helper service. +;; See corectrl-helper-service-type. +;; +;; Please read the setup instructions from: +;; https://gitlab.com/corectrl/corectrl/-/wikis/Installation +;; and +;; https://gitlab.com/corectrl/corectrl/-/wikis/Setup +;; +;; corectrl also requires CONFIG_NETLINK_DIAG to be set to +;; either 'y' or 'm' - 'm' is the default in Guix. In that case, +;; the kernel module has to be loaded. +;; +;; To allow rootless corectrl, add user to the "corectrl" group. + +(define-public corectrl + (package + (name "corectrl") + (version "1.4.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/corectrl/corectrl") + (commit (string-append "v" version)))) + (sha256 + (base32 "0qpc04xxzv4jbqqlraqriipix4ph7bm1hfiry807jjp668i9n25d")) + (file-name (git-file-name name version)) + (patches (search-patches "corectrl-polkit-install-dir.patch")))) + (build-system qt-build-system) + (arguments + (list + #:qtbase qtbase-5 + #:tests? #t + #:configure-flags #~(list "-DINSTALL_DBUS_FILES_IN_PREFIX=true" + (string-append "-DPOLKIT_POLICY_INSTALL_DIR=" + #$output + "/share/polkit-1/actions") + (string-append "-DWITH_PCI_IDS_PATH=" + (search-input-file + %build-inputs + "/share/hwdata/pci.ids"))))) + (native-inputs (list pkg-config gcc-13)) + (propagated-inputs (list mesa-utils vulkan-tools util-linux)) + (inputs (list dbus + botan + catch2-3 + hwdata + polkit + procps + pugixml + qtcharts-5 + qtdeclarative-5 + qtquickcontrols2-5 + qtsvg-5 + qttools-5 + quazip + spdlog + trompeloeil + units + zlib)) + (home-page "https://gitlab.com/corectrl/corectrl") + (synopsis "Profile based system control utility") + (description + "CoreCtrl is a Free and Open Source GNU/Linux application that allows +you to control with ease your computer hardware using application profiles. +It aims to be flexible, comfortable and accessible to regular users.") + (license (list license:gpl3)))) -- 2.46.0