Message ID | M1akxhPbhdsagfKtQNdUvQ_gr7_am4nX--PrR6Q_xlyvSCkuUoDtFRURxw8xHioONjC36RuHVt-wy18yvV-EeegHIEOUos87NROWijau444=@protonmail.com |
---|---|
State | New |
Headers | show |
Series | [bug#49578] Add bolt | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
cbaines/comparison | success | View comparision |
cbaines/git branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
Hello, Thanks for the patch. It's always good to see new contributors around here! I have a few suggestions for your patch. phodina <phodina@protonmail.com> writes: > --- > index 4b57bc1f24..d07ee33a7e 100644 > --- a/gnu/packages/linux.scm > +++ b/gnu/packages/linux.scm > @@ -123,6 +123,7 @@ > #:use-module (gnu packages pulseaudio) > #:use-module (gnu packages python) > #:use-module (gnu packages python-xyz) > + #:use-module (gnu packages polkit) > #:use-module (gnu packages readline) > #:use-module (gnu packages rrdtool) > #:use-module (gnu packages samba) > @@ -2479,6 +2480,52 @@ 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))) > + (sha256 > + (base32 > + "1phgp8fs0dlj74kbkqlvfniwc32daz47b3pvsxlfxqzyrp77xrfm")))) > + (build-system meson-build-system) > + (arguments > + `(#:configure-flags (list (string-append "--localstatedir=" (assoc-ref %outputs "out") "/var")) Are you sure this shouldn't be "--localstatedir=/var"? As it is, it refers to the read-only directory /gnu/store/...-bolt-0.9.1/var. > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'fix-udev-rules-directory > + (lambda* (#:key outputs #:allow-other-keys) > + (let ((out (assoc-ref outputs "out"))) > + (mkdir-p (string-append out "/lib/udev/rules.d")) ^ I think this is not necessary... > + (substitute* "meson.build" > + (("udev.get_pkgconfig_variable..udevdir..") > + (string-append "'" out "/lib'")))#t))) ...with this change: ^ /lib/udev > + (add-before 'install 'no-polkit-magic > + (lambda* (#:key outputs #:allow-other-keys) > + ;; Meson ‘magically’ invokes pkexec, which fails (not setuid). > + (setenv "PKEXEC_UID" "something") > + #t))))) ^ Phases no longer need to end with #t, so you can omit this. > + (native-inputs `(("pkg-config" ,pkg-config) ("dbus" ,dbus) ("asciidoc" ,asciidoc) ("umockdev" ,umockdev))) Please wrap lines at 80 characters, and in the special case of package inputs like here, each input should get its own line, like: (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™ > +on GNU/Linux®.") > + (description "Thunderbolt™ is the brand name of a hardware interface developed by > +Intel® that allows the connection of external peripherals to a > +computer. > +Devices connected via Thunderbolt can be DMA masters and thus read > +system memory without interference of the operating system (or even > +the CPU). Version 3 of the interface introduced 5 different security > +levels, in order to mitigate the aforementioned security risk that > +connected devices pose to the system. The security level is set by the > +system firmware.") > + (home-page "https://gitlab.freedesktop.org/bolt/bolt") > + (license license:gpl2+))) > + > (define-public jitterentropy-rngd > (package > (name "jitterentropy-rngd") > -- > 2.31.1 -- Sarah
I have a late 2013 Macbook Pro with two Thunderbolt 2 ports. They work if the TB device is inserted on boot, but after you disconnect a device, it no longer functions when you reconnect it. It show that the kernel recognizes the device in `dmesg` and that the PCIe port is registered in `lspci -k` But the device is not found in `nmcli dev status`. The device I'm testing is an Apple Ethernet adapter. I am still in the learning phase where I'm trying to reconfigure my machine, but I have the guix repo cloned and I'm planning on contributing patches to packages on other channels. I will hopefully be in the position where I can test this soon.
I am ready to test this. I finally reconfigured my system last night, but I have some questions about patching guix and testing. The guix I would reconfigure in order to test this would be ‘master’ with the patch applied. I think I should be alright applying the patch (I am noob). If it doesn’t apply right, I can figure it out, but then I’ll need to update the patch right? Is git capable of doing this? Or should I use a tool like ediff/patchwork? I have the guix checked out with Google repo via https://github.com/ectorepo/guix. This pulls down the latest copy of everything on savannah under the guix project. 2022年1月22日(土) 午前1:55 David Conner <aionfork@gmail.com>: > I have a late 2013 Macbook Pro with two Thunderbolt 2 ports. > > They work if the TB device is inserted on boot, but after you disconnect a > device, it no longer functions when you reconnect it. It show that the > kernel recognizes the device in `dmesg` and that the PCIe port is > registered in `lspci -k` But the device is not found in `nmcli dev status`. > The device I'm testing is an Apple Ethernet adapter. > > I am still in the learning phase where I'm trying to reconfigure my > machine, but I have the guix repo cloned and I'm planning on contributing > patches to packages on other channels. I will hopefully be in the position > where I can test this soon. >
--- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -123,6 +123,7 @@ #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages python-xyz) + #:use-module (gnu packages polkit) #:use-module (gnu packages readline) #:use-module (gnu packages rrdtool) #:use-module (gnu packages samba) @@ -2479,6 +2480,52 @@ 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))) + (sha256 + (base32 + "1phgp8fs0dlj74kbkqlvfniwc32daz47b3pvsxlfxqzyrp77xrfm")))) + (build-system meson-build-system) + (arguments + `(#:configure-flags (list (string-append "--localstatedir=" (assoc-ref %outputs "out") "/var")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-udev-rules-directory + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (mkdir-p (string-append out "/lib/udev/rules.d")) + (substitute* "meson.build" + (("udev.get_pkgconfig_variable..udevdir..") + (string-append "'" out "/lib'")))#t))) + (add-before 'install 'no-polkit-magic + (lambda* (#:key outputs #:allow-other-keys) + ;; Meson ‘magically’ invokes pkexec, which fails (not setuid). + (setenv "PKEXEC_UID" "something") + #t))))) + (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™ +on GNU/Linux®.") + (description "Thunderbolt™ is the brand name of a hardware interface developed by +Intel® that allows the connection of external peripherals to a +computer. +Devices connected via Thunderbolt can be DMA masters and thus read +system memory without interference of the operating system (or even +the CPU). Version 3 of the interface introduced 5 different security +levels, in order to mitigate the aforementioned security risk that +connected devices pose to the system. The security level is set by the +system firmware.") + (home-page "https://gitlab.freedesktop.org/bolt/bolt") + (license license:gpl2+))) + (define-public jitterentropy-rngd (package (name "jitterentropy-rngd")