From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id kH63B3pX+WB4OwAAgWs5BA (envelope-from ) for ; Thu, 22 Jul 2021 13:33:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id uMKLA3pX+WBTXgAA1q6Kng (envelope-from ) for ; Thu, 22 Jul 2021 11:33:14 +0000 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 DA5DE11DC8 for ; Thu, 22 Jul 2021 13:33:13 +0200 (CEST) Received: from localhost ([::1]:47532 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m6Wwy-0006pr-S8 for larch@yhetil.org; Thu, 22 Jul 2021 07:33:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36736) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m6Wwo-0006kw-6z for guix-patches@gnu.org; Thu, 22 Jul 2021 07:33:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:56168) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m6Wwn-0000c0-VT for guix-patches@gnu.org; Thu, 22 Jul 2021 07:33:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m6Wwn-00085O-T0 for guix-patches@gnu.org; Thu, 22 Jul 2021 07:33:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49578] [PATCH] Add bolt Resent-From: phodina Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 22 Jul 2021 11:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49578 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Sarah Morgensen Cc: 49578@debbugs.gnu.org Received: via spool by 49578-submit@debbugs.gnu.org id=B49578.162695355430787 (code B ref 49578); Thu, 22 Jul 2021 11:33:01 +0000 Received: (at 49578) by debbugs.gnu.org; 22 Jul 2021 11:32:34 +0000 Received: from localhost ([127.0.0.1]:39481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6WwL-00080F-Gr for submit@debbugs.gnu.org; Thu, 22 Jul 2021 07:32:33 -0400 Received: from mail-4322.protonmail.ch ([185.70.43.22]:27275) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m6WwI-0007tL-8s for 49578@debbugs.gnu.org; Thu, 22 Jul 2021 07:32:31 -0400 Date: Thu, 22 Jul 2021 11:32:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1626953543; bh=79lS7ih1IP9M+bwy3uQEfq1yntflwCSPX/2dPHD3n9U=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=VR1UcVovEZfjfl6XG5asyN0xSS5RXzcR64YmfRDVGHQFufKQ/7tZitfZrCPZwkxYh CAtyt9vNVdLB0R1A1Edpt4CFYNTlqTRsSdx64UtmzzHRKbgZ6NhzTWPY/v2B1W19P+ 2cy0VQ7g2SKs9l2FnVRdkNfBVvvKhVpox29TxYOc= Message-ID: <1aJRSz6qFjmFhYY0CBesLTTG0pCFP3k4W0lONoiRV7XP6fDy07As2nMW1DicJXJws8O3IXC-qZLar49bOBNy1FD_I3kNTHUqNRUcNMMtXRo=@protonmail.com> In-Reply-To: <86o8avrua2.fsf@mgsn.dev> References: <86o8avrua2.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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" Reply-to: phodina X-ACL-Warn: , phodina via Guix-patches From: phodina via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; none X-Migadu-Queue-Id: DA5DE11DC8 X-Spam-Score: -4.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: 0oXDtQRXd91f Hi Sarah, Thanks for the suggestions. Fixes: - polkit in alphabethical order - line wraping - /var dir location - removed #t in phases - simplified udev rules install - more useful synopsis --- index 41902e7785..6050871264 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -119,6 +119,7 @@ #:use-module (gnu packages perl) #:use-module (gnu packages pciutils) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages polkit) #:use-module (gnu packages popt) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) @@ -2479,6 +2480,59 @@ IPv6 packet filter. Both commands are targeted at system administrators.") (license license:gpl2+))) +(define-public bolt + (package + (name "bolt") + (version "0.9.1") + (source (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.freedesktop.org/bolt/bolt") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1phgp8fs0dlj74kbkqlvfniwc32daz47b3pvsxlfxqzyrp77xrfm")))) + (build-system meson-build-system) + (arguments + `(#:configure-flags (list "--localstatedir=3D/var") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'replace-directories + (lambda* (#:key outputs #:allow-other-keys) + (substitute* "meson.build" + (("udev.get_pkgconfig_variable..udevdir..") + (string-append "'" (assoc-ref %outputs "out") "/lib/udev'"= ))) +=09 (substitute* "meson.build" + ((".*scripts/meson-install.sh.*") "")) +=09 )) + (add-before 'install 'no-polkit-magic + (lambda* (#:key outputs #:allow-other-keys) + ;; Meson =E2=80=98magically=E2=80=99 invokes pkexec, which fa= ils (not setuid). + (setenv "PKEXEC_UID" "something") + ))))) + (native-inputs + `(("pkg-config" ,pkg-config) + ("dbus" ,dbus) + ("asciidoc" ,asciidoc) + ("umockdev" ,umockdev))) + (inputs + `(("glib:bin" ,glib "bin") + ("eudev" ,eudev) + ("polkit" ,polkit))) + (synopsis "Userspace system daemon to enable security levels +for Thunderbolt=E2=84=A2 on GNU/Linux=C2=AE.") + (description "Userspace daemon 'boltd' exposes devices via D-Bus to cl= ients. +It stores database of previously authorized devices and depending +on the policy set for the individual devices, auomatically authorize newly +connected devices without user interaction. It also adapts its behaivour w= hen +iommu support is detected. +Command line utility 'boltctl' can be used to manage thundebolt devices. I= t can +list devices, monitor changes and initiate authorization of device.") + (home-page "https://gitlab.freedesktop.org/bolt/bolt") + (license license:gpl2+))) + (define-public jitterentropy-rngd (package (name "jitterentropy-rngd") -- 2.31.1