diff mbox series

[bug#49578,v3,1/2] gnu: Add bolt.

Message ID IpWOs4rfABoT7fYcMUB85zS3FRn8ZwpMv_PQzYRjT6aj14ZdfbW8KLgQB9oOJFHKni5PmV5CSNs4h9qbDCpG3DgqGF2btkjbIRCabQV24Zo=@protonmail.com
State New
Headers show
Series [bug#49578,v3,1/2] gnu: Add bolt. | expand

Commit Message

phodina Sept. 18, 2021, 11:20 a.m. UTC
* gnu/packages/linux.scm: (bolt): New variable.

--
2.32.0

Comments

Sarah Morgensen Sept. 23, 2021, 1:11 a.m. UTC | #1
Hello Petr,

Thanks for the updated patch :)

I don't have any experiences with services, so I can't comment on the
second patch in this series, and I don't have a Thunderbolt controller
or devices, so I can't test the actual program, but other than the
commit message/synopsis/description this package LGTM.

phodina <phodina@protonmail.com> writes:

> * gnu/packages/linux.scm: (bolt): New variable.
                          ^ no ":"

> +    (synopsis "Userspace system daemon for Thunderbolt")

Consider this instead (taken from their repository tagline, more
understandable to more users):

       (synopsis "Thunderbolt 3 device manager")

> +    (description "Userspace daemon @code{boltd} exposes devices via D-Bus to clients.
> +It stores database of previously authorized devices and depending
> +on the policy set for the individual devices, automatically authorize newly
> +connected devices without user interaction.  It also adapts its behaivour when
> +iommu support is detected.
> +Command line utility 'boltctl' can be used to manage thundebolt devices.
> +It can list devices, monitor changes and initiate authorization of device.")

Consider this instead:

    (description "This package provides @command{boltd}, a userspace daemon
for Thunderbolt devices, and @command{boltctl}, a command-line utility for
managing those devices.

The daemon @command{boltd} exposes devices via D-Bus to clients.  It also
stores a database of previously authorized devices and will, depending on the
policy set for the individual devices, automatically authorize newly connected
devices without user interaction.

The command-line utility @command{boltctl} manages Thunderbolt devices via
@command{boltd}.  It can list devices, monitor changes, and initiate
authorization of devices.")


> +    (home-page "https://gitlab.freedesktop.org/bolt/bolt")
> +    (license license:gpl2+)))
> +
>  (define-public jitterentropy-rngd
>    (package
>      (name "jitterentropy-rngd")
> --
> 2.32.0

With those changes, or similar:

* Package review checklist (WIP)
Lack of a check is not proof of noncompliance.

1. [X] Package builds (guix build package)
     [X] x86_64  [ ] aarch64  [ ] armhf     [ ] powerpc64le
     [ ] i686    [ ] i586     [ ] mips64le
2. [X] Build is reproducible (guix build --rounds=n package)
3. [X] Tests enabled (if available) or disabled with in-source comment
4. [X] No extraneous dependencies (guix size package)
5. [X] No unnecessary pre-built binaries/blobs
6. [X] Dependencies unvendored when available in Guix
7. [X] Cross-compile friendly (cc-for-target, patches with inputs)
8. [X] License matches source
9. [X] No problematic lints (guix lint package)
10. [X] Formatting follows guidelines
    - [X] Lines wrap at 80 characters
    - [X] Indentation passes etc/indent-code.el
    - [X] Two spaces used between sentences

For new packages:
1. [X] Source url is robust
   * mirror:// used with url-fetch when possible
   * No auto-generated archives from source repo (prefer cloning)
2. [X] Synopsis is short, descriptive, and meaningful to a wide audience
3. [X] Description is objective, takes 5-10 lines, uses full sentences,
   and provides the information users need to decide whether the
   software fits their needs.

There are lints for CVEs, but they are for the Bolt CMS, not this
project.

--
Sarah
phodina Nov. 5, 2021, 8:39 a.m. UTC | #2
Hi,

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐

On Thursday, September 23rd, 2021 at 3:11 AM, Sarah Morgensen <iskarian@mgsn.dev> wrote:

> Hello Petr,
>
> Thanks for the updated patch :)
>
> I don't have any experiences with services, so I can't comment on the
>
> second patch in this series, and I don't have a Thunderbolt controller
>
> or devices, so I can't test the actual program, but other than the
>
> commit message/synopsis/description this package LGTM.

Thanks Sarah for the review and tips on packaging.
>
> phodina phodina@protonmail.com writes:
>
> > -   gnu/packages/linux.scm: (bolt): New variable.
>
>                           ^ no ":"
>
>
> > -   (synopsis "Userspace system daemon for Thunderbolt")
>
> Consider this instead (taken from their repository tagline, more
>
> understandable to more users):
>
> (synopsis "Thunderbolt 3 device manager")
>
> > -   (description "Userspace daemon @code{boltd} exposes devices via D-Bus to clients.
> >
> >     +It stores database of previously authorized devices and depending
> >
> >     +on the policy set for the individual devices, automatically authorize newly
> >
> >     +connected devices without user interaction. It also adapts its behaivour when
> >
> >     +iommu support is detected.
> >
> >     +Command line utility 'boltctl' can be used to manage thundebolt devices.
> >
> >     +It can list devices, monitor changes and initiate authorization of device.")
>
> Consider this instead:
>
> (description "This package provides @command{boltd}, a userspace daemon
>
> for Thunderbolt devices, and @command{boltctl}, a command-line utility for
>
> managing those devices.
>
> The daemon @command{boltd} exposes devices via D-Bus to clients. It also
>
> stores a database of previously authorized devices and will, depending on the
>
> policy set for the individual devices, automatically authorize newly connected
>
> devices without user interaction.
>
> The command-line utility @command{boltctl} manages Thunderbolt devices via
>
> @command{boltd}. It can list devices, monitor changes, and initiate
>
> authorization of devices.")
>
> > -   (home-page "https://gitlab.freedesktop.org/bolt/bolt")
> > -   (license license:gpl2+)))
> >
> > (define-public jitterentropy-rngd
> >
> > (package
> >
> > (name "jitterentropy-rngd")
> > ------------------------------------------------------------------------
> >
> > 2.32.0
>
> With those changes, or similar:
>
> -   Package review checklist (WIP)
>
>     Lack of a check is not proof of noncompliance.
>
> 1.  [X] Package builds (guix build package)
>
>     [X] x86_64 [ ] aarch64 [ ] armhf [ ] powerpc64le
>
>     [ ] i686 [ ] i586 [ ] mips64le
> 2.  [X] Build is reproducible (guix build --rounds=n package)
> 3.  [X] Tests enabled (if available) or disabled with in-source comment
> 4.  [X] No extraneous dependencies (guix size package)
> 5.  [X] No unnecessary pre-built binaries/blobs
> 6.  [X] Dependencies unvendored when available in Guix
> 7.  [X] Cross-compile friendly (cc-for-target, patches with inputs)
> 8.  [X] License matches source
> 9.  [X] No problematic lints (guix lint package)
> 10.  [X] Formatting follows guidelines
>     -   [X] Lines wrap at 80 characters
>     -   [X] Indentation passes etc/indent-code.el
>     -   [X] Two spaces used between sentences
>
>         For new packages:
> 11.  [X] Source url is robust
>     -   mirror:// used with url-fetch when possible
>     -   No auto-generated archives from source repo (prefer cloning)
> 12.  [X] Synopsis is short, descriptive, and meaningful to a wide audience
> 13.  [X] Description is objective, takes 5-10 lines, uses full sentences,
>
>     and provides the information users need to decide whether the
>
>     software fits their needs.
>
>     There are lints for CVEs, but they are for the Bolt CMS, not this
>
>     project.
>
>     --
>
>     Sarah

Is there somebody who has Thunderbolt on their machine and could test this patch?

Petr
diff mbox series

Patch

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 46c9f817a8..3ec896bba6 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -121,6 +121,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)
@@ -2655,6 +2656,56 @@  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=/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'")))
+             (substitute* "meson.build"
+               ((".*scripts/meson-install.sh.*") ""))))
+         (add-before 'install 'no-polkit-magic
+           (lambda* (#:key outputs #:allow-other-keys)
+             ;; Meson ‘magically’ invokes pkexec, which fails (not setuid).
+             (setenv "PKEXEC_UID" "something"))))))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("glib:bin" ,glib "bin")
+       ("asciidoc" ,asciidoc)
+       ("umockdev" ,umockdev)))
+    (inputs
+     `(("eudev" ,eudev)
+       ("dbus" ,dbus)
+       ("polkit" ,polkit)))
+    (synopsis "Userspace system daemon for Thunderbolt")
+    (description "Userspace daemon @code{boltd} exposes devices via D-Bus to clients.
+It stores database of previously authorized devices and depending
+on the policy set for the individual devices, automatically authorize newly
+connected devices without user interaction.  It also adapts its behaivour when
+iommu support is detected.
+Command line utility 'boltctl' can be used to manage thundebolt devices.
+It 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")