From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id sJjFFFLXb2chNwAA62LTzQ:P1 (envelope-from ) for ; Sat, 28 Dec 2024 10:47:46 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id sJjFFFLXb2chNwAA62LTzQ (envelope-from ) for ; Sat, 28 Dec 2024 11:47:46 +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="dt4F/q14"; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=T5fKVwuN; 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=1735382866; 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=sqUN5uqMyFMEUjYJ4C7RLDTV94w92K2uAQaG8NvH6qchigd7UwTa7KiE1SkBOekkSWBaYE Jm3+3u+aYBmpyH2CNLL66it9RQ65ANVkvIVa+fIt+UbWVPKD7FG7ChXf+yIiZV+AweVtVc ziM9aeyrUvuRGguXI0hhTb+ydW0eOOAzwToOcc2xF1d4NXTz/tdpoWgcbS/Tl4teoS0d6a LRAvl6+fX1r2qwFIh5e+wkGdqelBRWFOTn4cNeV0UzYGD+XN/60WApAkoxnRfoWptNLWvX zD8c5YofwpEJFDCHil//j/nLptjvNiYiVpJtSTX7VXvkSjb7Ov5W2Wip+EUMxg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b="dt4F/q14"; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=T5fKVwuN; 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=1735382866; a=rsa-sha256; cv=none; b=EpcQWuOenc782X8hNk5YhjuKr6RpNnUJNDXm7pZAezhy7/2o604RmprT/CE5r3Olox0ysU fq1AyX7kpBfUxWckZMaf7vEQ6P1x23941xj7ux9wmRy0GlYXrGzkdfDf//wG+LHo1F0uWf Pld1FSQ5SE5gtYfwk0xAUy9r4nzCDsci0g8i1xhe05dGnkUt1dZTUr37mgNR3q2taCDoR3 ZH0WBhknMJb3D1kUQmLmqOMouxve02EhtASgzdLiz3HnKClQBsstxyATM5cd1iDoq3kmP4 bCcjsXsQB5hq0wr8zMEDq4GpmLb4/mZVcrBsxWBN+p/Nok4gqEe/ZYOJdN1X1A== 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 2388E277A7 for ; Sat, 28 Dec 2024 11:47:46 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRUM1-0000tD-0S; Sat, 28 Dec 2024 05:47:33 -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 1tRULW-0000lE-Vn for guix-patches@gnu.org; Sat, 28 Dec 2024 05:47:08 -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 1tRULW-00006b-CV for guix-patches@gnu.org; Sat, 28 Dec 2024 05:47: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=dt4F/q14GFtTLAM+ViDEogC9bQWIFCSQR9/Vy3Oo2cQw4XdCR4ePtDo1SS6AL9It1FUe00kI1/mIsODb8W0SJeHOw5dsJLXVRuK2lW0pTToa9gnM3BLFuNvN0ElH3nyA0o/90V9UTkpZWeHARmT48buTa1SxFznGwNFPDfn/pP+wQY45oVcdq/YBNwSfNasVvXqU0OO6NwPwXvEIuxMksNC5zLQIvNxjiHspd+/Ec4KCB2dZBKI2agyjW+19LCKXlw9MDFjPjfr8Nrkce+kkyvi4fqRfWo/sBi3jHOqWjbpVohNz+znEHFedTYvuEKGzUz4iROWArT1/G2gUI44HnQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tRULW-0005QI-3o for guix-patches@gnu.org; Sat, 28 Dec 2024 05:47:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75159] [PATCH v0 3/4] gnu: Add corectrl. Resent-From: Ashvith Shetty Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 28 Dec 2024 10:47: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.173538278820770 (code B ref 75159); Sat, 28 Dec 2024 10:47:02 +0000 Received: (at 75159) by debbugs.gnu.org; 28 Dec 2024 10:46:28 +0000 Received: from localhost ([127.0.0.1]:48877 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRUKx-0005Ot-EE for submit@debbugs.gnu.org; Sat, 28 Dec 2024 05:46:27 -0500 Received: from mail-pj1-f48.google.com ([209.85.216.48]:60786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tRUKu-0005Ol-MW for 75159@debbugs.gnu.org; Sat, 28 Dec 2024 05:46:25 -0500 Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-2ef748105deso7683878a91.1 for <75159@debbugs.gnu.org>; Sat, 28 Dec 2024 02:46:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735382724; x=1735987524; 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=T5fKVwuNxGkTQ5rpwIObbQ7/uKvScXpWrQeovnlzHc6z8wTUT6YZhNLJfo4nJv7Ttu Xy+zavkvkoLY3Dxf6ms+lJ8seWqSboKi2kZK39DRpMm0Ubfd9LTKY+xpn+ykjV/kFHsM sfwjTjNbh5RrqDgLD0HWPrzmhh6Q7NKAHvjiHLkb3TylBpnKfCGN4Lrh9sRWmRXDUeXV eujBNW07S1DpHytspaGDpcFeZAQG9cplcZqpmS5yky/9sDOaTwzrcyRA0y5h5XZuqL5f 5JHJv09SAIUCkjqvuRv4qb9ES4rCyXki40CsQapc48Q4g6iTMoRuZ/UTC1ouW4yUOGQM SQJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735382724; x=1735987524; 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=r5L0yk+8jr/HUpY8zvf0xk9CqB9VbLaaL0/J8m8tdRNn0z8wdwBQ3x5+gd2lsfuwIc uK74Z3LgKaDJNKY+mL4yEnQlB8prQOnydHCSPo+w3AxJECAQind0OIf5GqfaUj+ostHD utBmUq0KdyqM1q0fHlVDW/vtw4d746Oscgo4OmMdoaK13DzedbKzHXf3lYcYnMeYwHIQ qIWq8RPst4LmHrWh6I5MdEFDOWKo4QVKYl9izYJ6y7B9U6z80mIjqRld5+Ec8qsHogxm WC0kfYfFSK5d80HL2GgMkjiSLGXS2SLPIpGliuvVPx8yGfVIYqZz8nWZePq4R1puVTa2 zp3A== X-Gm-Message-State: AOJu0YyN98U8n35PS4WrAyrJpWGM9V5biE1R6CSiR0gCiVgJTxL/EjBw 24ZMsIEvw2w+8VTx1TGIBJp9bH7V9Uw/ggMomXw81NdIJjtf7ozIOgJlbNGH X-Gm-Gg: ASbGncstqlElKs6Qu0OfDodj0j65Bs/MiLy17HGDHLVFDJxrnP/4QlYElF52EEGslCn l0YrI+nfzkiC8Sj35vYfZL4inuhFqxXenn9XWAxAcE2DQ5/aTu/RH2AN6v4doXgXftk4AuNzawf 5FmQrmItYuMJ0pZoi3olW5aU03bb952XOacueR/fERBvWQEiqiEG9KjkTGjkMsZ1s1fwKp5deLd 0Fr+KC+aoEq6OTKiQNkvF9QYZ4TpCh3rS4C9dzuPn6SiGCZLQm+DaxGudZLr1ZAqnl+ejcBS2vv jyAwDD+Fqg== X-Google-Smtp-Source: AGHT+IE4gl9Hee1lz/Uxk+p/JCAKA1XJ1iEj7IfKVzmIkzsxWG/LWUdzcAsw2cfXngceOw4wicymVw== X-Received: by 2002:a17:90b:2dc2:b0:2ee:acb4:fecd with SMTP id 98e67ed59e1d1-2f452e044damr43996398a91.9.1735382723620; Sat, 28 Dec 2024 02:45:23 -0800 (PST) Received: from localhost.localdomain ([2401:4900:8813:846d:3ba6:3078:1833:5938]) by smtp.googlemail.com with ESMTPSA id d9443c01a7336-21a267dc09bsm18645425ad.169.2024.12.28.02.45.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2024 02:45:23 -0800 (PST) From: Ashvith Shetty X-Google-Original-From: Ashvith Shetty Date: Sat, 28 Dec 2024 16:14:05 +0530 Message-ID: <20241228104424.4001-3-ashvith@noreply.codeberg.org> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20241228104424.4001-1-ashvith@noreply.codeberg.org> References: <20241228104424.4001-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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -0.86 X-Spam-Score: -0.86 X-Migadu-Queue-Id: 2388E277A7 X-TUID: 4Y3cZmVvZNvH * 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