From: florhizome@posteo.net
To: 59683@debbugs.gnu.org
Cc: florhizome <florhizome@posteo.net>
Subject: [bug#59683] [PATCH] gnu: Add bolt
Date: Tue, 29 Nov 2022 15:32:00 +0000 [thread overview]
Message-ID: <5255d8ae4c2abdb44b8f1f1cbf55c344e9486c13.1669735188.git.florhizome@posteo.net> (raw)
From: florhizome <florhizome@posteo.net>
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}"
--
2.38.1
next reply other threads:[~2022-11-29 15:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-29 15:32 florhizome [this message]
2022-12-13 12:52 ` [bug#59683] Bolt package phodina via Guix-patches via
2022-12-14 11:24 ` [bug#59683] [PATCH] gnu: Add bolt Ludovic Courtès
2022-12-20 17:04 ` Florian
2022-12-20 20:51 ` phodina via Guix-patches via
2022-12-25 16:22 ` Ludovic Courtès
2022-12-25 17:33 ` phodina via Guix-patches via
2023-01-16 13:36 ` bug#59683: " Maxim Cournoyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5255d8ae4c2abdb44b8f1f1cbf55c344e9486c13.1669735188.git.florhizome@posteo.net \
--to=florhizome@posteo.net \
--cc=59683@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).