From patchwork Tue Nov 29 15:32:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: florhizome X-Patchwork-Id: 44959 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 182FC27BBEC; Tue, 29 Nov 2022 15:33:22 +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,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=ham 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 F30B227BBEB for ; Tue, 29 Nov 2022 15:33:20 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p02bZ-0000AX-1j; Tue, 29 Nov 2022 10:33:05 -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 1p02bX-00009O-Cd for guix-patches@gnu.org; Tue, 29 Nov 2022 10:33:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p02bW-0001yc-Ht for guix-patches@gnu.org; Tue, 29 Nov 2022 10:33:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p02bW-0003jw-BB for guix-patches@gnu.org; Tue, 29 Nov 2022 10:33:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#59683] [PATCH] gnu: Add bolt Resent-From: florhizome@posteo.net Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 29 Nov 2022 15:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 59683 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 59683@debbugs.gnu.org Cc: florhizome X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.166973594714342 (code B ref -1); Tue, 29 Nov 2022 15:33:02 +0000 Received: (at submit) by debbugs.gnu.org; 29 Nov 2022 15:32:27 +0000 Received: from localhost ([127.0.0.1]:54776 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p02aw-0003jF-S5 for submit@debbugs.gnu.org; Tue, 29 Nov 2022 10:32:27 -0500 Received: from lists.gnu.org ([209.51.188.17]:38652) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p02au-0003j4-Mm for submit@debbugs.gnu.org; Tue, 29 Nov 2022 10:32:25 -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 1p02at-0008PS-4b for guix-patches@gnu.org; Tue, 29 Nov 2022 10:32:24 -0500 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p02ao-0001u7-4a for guix-patches@gnu.org; Tue, 29 Nov 2022 10:32:20 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id E13D2240101 for ; Tue, 29 Nov 2022 16:32:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1669735923; bh=0EyJbZYgPudYJa97F8sREZrUDcY3QhzfYwXKSVmzxEs=; h=From:To:Cc:Subject:Date:From; b=dzA457h5j9gX9Nonf5rN9kiNk8pxN+t82GHPUPlRf4vBkynT+5xVpqDR3xyI3kT2u j5KYi5JKExDrdh1A7aiogF7uN71zlmmJH7EtI6+YbDzBAsp4gtz576ANYBucT/KhNC nyxsoHx/rbLQ58pqKFU9miUM7OWKXcDhujigzLvf6nUYVZqVcthrlr6pJrxLj7/7IK 7CaW1gYM4p7NQS5qbC2zytFJY6bCJy2mzXXHOtiBbkmU33XKaBiDB8qPYrPsjbEwUc xWhNwZpprcm7vC/tFr7crsffgdpWg9rBZUY5UHM/acq41+6UAUKGNGycNi3Aw3VRLR KZQ0B+vySpxcg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NM5tC1rYNz9rxG; Tue, 29 Nov 2022 16:32:03 +0100 (CET) From: florhizome@posteo.net Date: Tue, 29 Nov 2022 15:32:00 +0000 Message-Id: <5255d8ae4c2abdb44b8f1f1cbf55c344e9486c13.1669735188.git.florhizome@posteo.net> MIME-Version: 1.0 Received-SPF: pass client-ip=185.67.36.66; envelope-from=florhizome@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: florhizome Adds the bolt package with a system daemon (boltd) working over dbus and a cli tool (boltctl) to enable controlling the permissions on thunderbolt ports. the patch is from the nix package. * gnu/packages/patches/bolt-skip-mkdir.patch: new file * gnu/packages/local.mk: Add patch for bolt * gnu/packages/freedesktop.scm (bolt): new variable --- gnu/local.mk | 1 + gnu/packages/freedesktop.scm | 45 ++++++++++++++++++++++ gnu/packages/patches/bolt-skip-mkdir.patch | 12 ++++++ 3 files changed, 58 insertions(+) create mode 100644 gnu/packages/patches/bolt-skip-mkdir.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7278c50e4f..937c2f0c28 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -942,6 +942,7 @@ dist_patch_DATA = \ %D%/packages/patches/binutils-CVE-2021-45078.patch \ %D%/packages/patches/bloomberg-bde-cmake-module-path.patch \ %D%/packages/patches/bloomberg-bde-tools-fix-install-path.patch \ + %D%/packages/patches/bolt-skip-mkdir.patch \ %D%/packages/patches/bpftrace-disable-bfd-disasm.patch \ %D%/packages/patches/breezy-fix-gio.patch \ %D%/packages/patches/byobu-writable-status.patch \ diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index bd47dfc45b..57f7c4b60f 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -123,6 +123,7 @@ (define-module (gnu packages freedesktop) #:use-module (gnu packages serialization) #:use-module (gnu packages sqlite) #:use-module (gnu packages valgrind) + #:use-module (gnu packages version-control) #:use-module (gnu packages video) #:use-module (gnu packages w3m) #:use-module (gnu packages web) @@ -886,6 +887,50 @@ (define-public basu This library provides just sd-bus (and the busctl utility).") (license license:lgpl2.1+))) + +(define-public bolt + (package + (name "bolt") + (version "0.9.4") + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://gitlab.freedesktop.org/bolt/bolt") + (commit version))) + (sha256 + (base32 "0w66shv7ra8yrhr0byifahbq25wi8qfsm3rifz0j31l7cmnys3js")) + (patches + (search-patches "bolt-skip-mkdir.patch")))) + (build-system meson-build-system) + (arguments + (list #:configure-flags #~(list "-Dsystemd=false") + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'set-useful-envvars + (lambda _ + (setenv "PKEXEC_UID" "-1") + (setenv "PKG_CONFIG_UDEV_UDEVDIR" + (string-append #$output "/lib/udev"))))))) + (native-inputs + (list asciidoc + dbus ;for tests + git-minimal + (list glib "bin") + gobject-introspection + pkg-config + python + umockdev)) + (inputs + (list eudev glib polkit)) + (home-page "https://gitlab.freedesktop.org/bolt/bolt") + (synopsis "Manage security levels for Thunderbolt™ on GNU/Linux®") + (description "This package includes the boltd daemon and the boltctl + commandline interface to manage security levels of thunderbolt and usb4 + devices.") + (license license:expat))) + (define-public localed ;; XXX: This package is extracted from systemd but we retain so little of it ;; that it would make more sense to maintain a fork of the bits we need. diff --git a/gnu/packages/patches/bolt-skip-mkdir.patch b/gnu/packages/patches/bolt-skip-mkdir.patch new file mode 100644 index 0000000000..0853bcea91 --- /dev/null +++ b/gnu/packages/patches/bolt-skip-mkdir.patch @@ -0,0 +1,12 @@ +diff --git a/scripts/meson-install.sh b/scripts/meson-install.sh +index 859ae81..05a1c58 100644 +--- a/scripts/meson-install.sh ++++ b/scripts/meson-install.sh +@@ -7,5 +7,5 @@ fi + + BOLT_DBDIR=$1 + +-echo "Creating database dir: ${BOLT_DBDIR}" +-mkdir -p "${DESTDIR}/${BOLT_DBDIR}" ++# echo "Creating database dir: ${BOLT_DBDIR}" ++# mkdir -p "${DESTDIR}/${BOLT_DBDIR}"