* [bug#40608] [PATCH 0/3] gnu: Add usbguard.
@ 2020-04-13 19:49 Brice Waegeneire
2020-04-13 19:49 ` [bug#40609] [PATCH 1/3] gnu: umockdev: Fix test Brice Waegeneire
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-04-13 19:49 UTC (permalink / raw)
To: 40608
This patch series add the usbguard package.
Brice Waegeneire (3):
gnu: umockdev: Fix test.
gnu: Add libqb.
gnu: Add usbguard.
gnu/packages/check.scm | 9 ++-
gnu/packages/hardware.scm | 119 ++++++++++++++++++++++++++++++++++++++
2 files changed, 123 insertions(+), 5 deletions(-)
--
2.26.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [bug#40609] [PATCH 1/3] gnu: umockdev: Fix test.
2020-04-13 19:49 [bug#40608] [PATCH 0/3] gnu: Add usbguard Brice Waegeneire
@ 2020-04-13 19:49 ` Brice Waegeneire
2020-04-13 19:49 ` [bug#40607] [PATCH 2/3] gnu: Add libqb Brice Waegeneire
2020-04-13 19:50 ` [bug#40610] [PATCH 3/3] gnu: Add usbguard Brice Waegeneire
2 siblings, 0 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-04-13 19:49 UTC (permalink / raw)
To: 40609
* gnu/packages/check.scm (umockdev)[inputs]: Remove
'gobject-introspection'.
[arguments]: Replace phase 'skip-broken-test' by 'fix-test'.
---
gnu/packages/check.scm | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 2cfaddbc5f..ca0a00e004 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -31,6 +31,7 @@
;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2427,11 +2428,10 @@ provides a simple way to achieve this.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'skip-broken-test
+ (add-after 'unpack 'fix-test
(lambda _
(substitute* "tests/test-umockdev.c"
- (("/\\* sys/ in other dir")
- (string-append "return; // ")))
+ (("/run") "/tmp"))
#t)))))
(native-inputs
`(("vala" ,vala)
@@ -2444,8 +2444,7 @@ provides a simple way to achieve this.")
(inputs
`(("glib" ,glib)
("eudev" ,eudev)
- ("libgudev" ,libgudev)
- ("gobject-introspection" ,gobject-introspection)))
+ ("libgudev" ,libgudev)))
(home-page "https://github.com/martinpitt/umockdev/")
(synopsis "Mock hardware devices for creating unit tests")
(description "umockdev mocks hardware devices for creating integration
--
2.26.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#40607] [PATCH 2/3] gnu: Add libqb.
2020-04-13 19:49 [bug#40608] [PATCH 0/3] gnu: Add usbguard Brice Waegeneire
2020-04-13 19:49 ` [bug#40609] [PATCH 1/3] gnu: umockdev: Fix test Brice Waegeneire
@ 2020-04-13 19:49 ` Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 0/3] gnu: Add usbguard Brice Waegeneire
2020-04-23 13:55 ` [bug#40607] [PATCH v3 0/3] Add usbguard package Brice Waegeneire
2020-04-13 19:50 ` [bug#40610] [PATCH 3/3] gnu: Add usbguard Brice Waegeneire
2 siblings, 2 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-04-13 19:49 UTC (permalink / raw)
To: 40607
* gnu/packages/hardware.scm (libqb): New variable.
---
gnu/packages/hardware.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 4c9c45bc48..8a7c7b3c62 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -25,6 +26,7 @@
#:use-module (gnu packages ncurses)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (guix build-system gnu)
#:use-module (guix download)
@@ -276,3 +278,31 @@ supported by the Linux kernel.")
;; Source file headers still say GPL2+, but the authorial intent
;; (from COPYING and the F9 'about' screen) is clearly GPL3+.
(license license:gpl3+)))
+
+(define-public libqb
+ (package
+ (name "libqb")
+ ;; NOTE: We are using a Release Candidate version (for 2.0) here because
+ ;; of the linker issues with the previous release.
+ (version "1.9.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/ClusterLabs/libqb/releases/download/v"
+ version "/libqb-" version ".tar.xz"))
+ (sha256
+ (base32
+ "008vvw504kh40br5v2xkqavnp9vpmjvf768faqzv1d00fd53ingn"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("xmllint" ,libxml2)))
+ (home-page "https://clusterlabs.github.io/libqb/")
+ (synopsis "Library providing high performance logging, tracing, ipc, and poll")
+ (description "Libqb is a library with the primary purpose of providing
+high-performance, reusable features for client-server architecture, such as
+logging, tracing, inter-process communication (IPC), and polling. Libqb is
+not intended to be an all-encompassing library, but instead provide focused
+APIs that are highly tuned for maximum performance for client-server
+applications.")
+ (license license:lgpl2.1)))
--
2.26.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#40610] [PATCH 3/3] gnu: Add usbguard.
2020-04-13 19:49 [bug#40608] [PATCH 0/3] gnu: Add usbguard Brice Waegeneire
2020-04-13 19:49 ` [bug#40609] [PATCH 1/3] gnu: umockdev: Fix test Brice Waegeneire
2020-04-13 19:49 ` [bug#40607] [PATCH 2/3] gnu: Add libqb Brice Waegeneire
@ 2020-04-13 19:50 ` Brice Waegeneire
2 siblings, 0 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-04-13 19:50 UTC (permalink / raw)
To: 40610
* gnu/packages/hardware.scm (usbguard): New variable.
---
gnu/packages/hardware.scm | 89 +++++++++++++++++++++++++++++++++++++++
1 file changed, 89 insertions(+)
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 8a7c7b3c62..e5f9da1feb 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -18,13 +18,22 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages hardware)
+ #:use-module (gnu packages admin)
+ #:use-module (gnu packages autotools)
+ #:use-module (gnu packages bash)
+ #:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages crypto)
+ #:use-module (gnu packages documentation)
#:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages openldap)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages polkit)
+ #:use-module (gnu packages protobuf)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -306,3 +315,83 @@ not intended to be an all-encompassing library, but instead provide focused
APIs that are highly tuned for maximum performance for client-server
applications.")
(license license:lgpl2.1)))
+
+(define-public usbguard
+ (package
+ (name "usbguard")
+ (version "0.7.6")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/USBGuard/usbguard/releases/download/usbguard-"
+ version "/usbguard-" version ".tar.gz"))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0gzhs8s4aka86mkcjib36z54si939ki4bmk46p6v8kln1fixad3j"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'patch-makefile
+ (lambda _
+ ;; Do not create log directory.
+ (substitute* "Makefile" ((".*/log/usbguard.*") ""))
+ ;; Disable LDAP tests: they use 'sudo'.
+ (substitute* "src/Tests/Makefile.am"
+ (("WITH_LDAP") "FALSE"))
+ #t))
+ (add-after 'install 'delete-static-library
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; It can't be direclty disabled since it's needed for the tests.
+ (delete-file (string-append (assoc-ref outputs "out")
+ "/lib/libusbguard.a"))
+ #t))
+ (add-after 'install 'install-zsh-completion
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (site-functions
+ (string-append out "/share/zsh/site-functions")))
+ (mkdir-p site-functions)
+ (copy-file "scripts/usbguard-zsh-completion"
+ (string-append site-functions "/_usbguard"))
+ #t))))
+ #:make-flags
+ (list (string-append "BASH_COMPLETION_DIR="
+ (assoc-ref %outputs "out")
+ "/etc/bash_completion.d"))
+ #:configure-flags
+ (list
+ "--localstatedir=/var"
+ "--with-bundled-pegtl"
+ "--enable-systemd=no"
+ "--with-ldap"
+ "--with-dbus"
+ "--with-polkit")))
+ (inputs
+ `(("audit" ,audit)
+ ("catch" ,catch-framework)
+ ("dbus-glib" ,dbus-glib)
+ ("ldap" ,openldap)
+ ("libcap-ng" ,libcap-ng)
+ ("libseccomp" ,libseccomp)
+ ("libsodium" ,libsodium)
+ ("polkit" ,polkit)
+ ("protobuf" ,protobuf)
+ ("libqb" ,libqb)))
+ (native-inputs
+ `(("asciidoc" ,asciidoc)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("bash-completion" ,bash-completion)
+ ("gdbus-codegen" ,glib "bin")
+ ("umockdev" ,umockdev)
+ ("xmllint" ,libxml2)
+ ("xsltproc" ,libxslt)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://usbguard.github.io")
+ (synopsis "Helps to protect your computer against rogue USB devices (a.k.a. BadUSB)")
+ (description "USBGuard is a software framework for implementing USB device
+authorization policies (what kind of USB devices are authorized) as well as
+method of use policies (how a USB device may interact with the system).
+Simply put, it is a USB device whitelisting tool.")
+ (license license:gpl2)))
--
2.26.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#40607] [PATCH v2 0/3] gnu: Add usbguard
2020-04-13 19:49 ` [bug#40607] [PATCH 2/3] gnu: Add libqb Brice Waegeneire
@ 2020-04-17 12:34 ` Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 1/3] gnu: umockdev: Fix test Brice Waegeneire
` (2 more replies)
2020-04-23 13:55 ` [bug#40607] [PATCH v3 0/3] Add usbguard package Brice Waegeneire
1 sibling, 3 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-04-17 12:34 UTC (permalink / raw)
To: 40607
Rebased on master.
Brice Waegeneire (3):
gnu: umockdev: Fix test.
gnu: Add libqb.
gnu: Add usbguard.
gnu/packages/check.scm | 9 ++-
gnu/packages/hardware.scm | 115 ++++++++++++++++++++++++++++++++++++++
2 files changed, 119 insertions(+), 5 deletions(-)
--
2.26.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [bug#40607] [PATCH v2 1/3] gnu: umockdev: Fix test.
2020-04-17 12:34 ` [bug#40607] [PATCH v2 0/3] gnu: Add usbguard Brice Waegeneire
@ 2020-04-17 12:34 ` Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 2/3] gnu: Add libqb Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 3/3] gnu: Add usbguard Brice Waegeneire
2 siblings, 0 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-04-17 12:34 UTC (permalink / raw)
To: 40607
* gnu/packages/check.scm (umockdev)[inputs]: Remove
'gobject-introspection'.
[arguments]: Replace phase 'skip-broken-test' by 'fix-test'.
---
gnu/packages/check.scm | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 1cd40d9b13..8c22d33c73 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -31,6 +31,7 @@
;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2427,11 +2428,10 @@ provides a simple way to achieve this.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'skip-broken-test
+ (add-after 'unpack 'fix-test
(lambda _
(substitute* "tests/test-umockdev.c"
- (("/\\* sys/ in other dir")
- (string-append "return; // ")))
+ (("/run") "/tmp"))
#t)))))
(native-inputs
`(("vala" ,vala)
@@ -2444,8 +2444,7 @@ provides a simple way to achieve this.")
(inputs
`(("glib" ,glib)
("eudev" ,eudev)
- ("libgudev" ,libgudev)
- ("gobject-introspection" ,gobject-introspection)))
+ ("libgudev" ,libgudev)))
(home-page "https://github.com/martinpitt/umockdev/")
(synopsis "Mock hardware devices for creating unit tests")
(description "umockdev mocks hardware devices for creating integration
--
2.26.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#40607] [PATCH v2 2/3] gnu: Add libqb.
2020-04-17 12:34 ` [bug#40607] [PATCH v2 0/3] gnu: Add usbguard Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 1/3] gnu: umockdev: Fix test Brice Waegeneire
@ 2020-04-17 12:34 ` Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 3/3] gnu: Add usbguard Brice Waegeneire
2 siblings, 0 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-04-17 12:34 UTC (permalink / raw)
To: 40607
* gnu/packages/hardware.scm (libqb): New variable.
---
gnu/packages/hardware.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 7ee657a75a..7c59984599 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +28,7 @@
#:use-module (gnu packages ncurses)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (guix build-system gnu)
#:use-module (guix download)
@@ -307,3 +309,31 @@ supported by the Linux kernel.")
"Rkdeveloptool can read from and write to RockChip devices over USB, such
as the Pinebook Pro.")
(license license:gpl2+))))
+
+(define-public libqb
+ (package
+ (name "libqb")
+ ;; NOTE: We are using a Release Candidate version (for 2.0) here because
+ ;; of the linker issues with the previous release.
+ (version "1.9.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/ClusterLabs/libqb/releases/download/v"
+ version "/libqb-" version ".tar.xz"))
+ (sha256
+ (base32
+ "008vvw504kh40br5v2xkqavnp9vpmjvf768faqzv1d00fd53ingn"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("xmllint" ,libxml2)))
+ (home-page "https://clusterlabs.github.io/libqb/")
+ (synopsis "Library providing high performance logging, tracing, ipc, and poll")
+ (description "Libqb is a library with the primary purpose of providing
+high-performance, reusable features for client-server architecture, such as
+logging, tracing, inter-process communication (IPC), and polling. Libqb is
+not intended to be an all-encompassing library, but instead provide focused
+APIs that are highly tuned for maximum performance for client-server
+applications.")
+ (license license:lgpl2.1)))
--
2.26.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#40607] [PATCH v2 3/3] gnu: Add usbguard.
2020-04-17 12:34 ` [bug#40607] [PATCH v2 0/3] gnu: Add usbguard Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 1/3] gnu: umockdev: Fix test Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 2/3] gnu: Add libqb Brice Waegeneire
@ 2020-04-17 12:34 ` Brice Waegeneire
2 siblings, 0 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-04-17 12:34 UTC (permalink / raw)
To: 40607
* gnu/packages/hardware.scm (usbguard): New variable.
---
gnu/packages/hardware.scm | 85 +++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 7c59984599..11317e77fd 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -21,12 +21,17 @@
(define-module (gnu packages hardware)
#:use-module (gnu packages autotools)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages crypto)
+ #:use-module (gnu packages documentation)
#:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages openldap)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages polkit)
+ #:use-module (gnu packages protobuf)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -337,3 +342,83 @@ not intended to be an all-encompassing library, but instead provide focused
APIs that are highly tuned for maximum performance for client-server
applications.")
(license license:lgpl2.1)))
+
+(define-public usbguard
+ (package
+ (name "usbguard")
+ (version "0.7.6")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/USBGuard/usbguard/releases/download/usbguard-"
+ version "/usbguard-" version ".tar.gz"))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0gzhs8s4aka86mkcjib36z54si939ki4bmk46p6v8kln1fixad3j"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'patch-makefile
+ (lambda _
+ ;; Do not create log directory.
+ (substitute* "Makefile" ((".*/log/usbguard.*") ""))
+ ;; Disable LDAP tests: they use 'sudo'.
+ (substitute* "src/Tests/Makefile.am"
+ (("WITH_LDAP") "FALSE"))
+ #t))
+ (add-after 'install 'delete-static-library
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; It can't be direclty disabled since it's needed for the tests.
+ (delete-file (string-append (assoc-ref outputs "out")
+ "/lib/libusbguard.a"))
+ #t))
+ (add-after 'install 'install-zsh-completion
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (site-functions
+ (string-append out "/share/zsh/site-functions")))
+ (mkdir-p site-functions)
+ (copy-file "scripts/usbguard-zsh-completion"
+ (string-append site-functions "/_usbguard"))
+ #t))))
+ #:make-flags
+ (list (string-append "BASH_COMPLETION_DIR="
+ (assoc-ref %outputs "out")
+ "/etc/bash_completion.d"))
+ #:configure-flags
+ (list
+ "--localstatedir=/var"
+ "--with-bundled-pegtl"
+ "--enable-systemd=no"
+ "--with-ldap"
+ "--with-dbus"
+ "--with-polkit")))
+ (inputs
+ `(("audit" ,audit)
+ ("catch" ,catch-framework)
+ ("dbus-glib" ,dbus-glib)
+ ("ldap" ,openldap)
+ ("libcap-ng" ,libcap-ng)
+ ("libseccomp" ,libseccomp)
+ ("libsodium" ,libsodium)
+ ("polkit" ,polkit)
+ ("protobuf" ,protobuf)
+ ("libqb" ,libqb)))
+ (native-inputs
+ `(("asciidoc" ,asciidoc)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("bash-completion" ,bash-completion)
+ ("gdbus-codegen" ,glib "bin")
+ ("umockdev" ,umockdev)
+ ("xmllint" ,libxml2)
+ ("xsltproc" ,libxslt)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://usbguard.github.io")
+ (synopsis "Helps to protect your computer against rogue USB devices (a.k.a. BadUSB)")
+ (description "USBGuard is a software framework for implementing USB device
+authorization policies (what kind of USB devices are authorized) as well as
+method of use policies (how a USB device may interact with the system).
+Simply put, it is a USB device whitelisting tool.")
+ (license license:gpl2)))
--
2.26.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#40607] [PATCH v3 0/3] Add usbguard package
2020-04-13 19:49 ` [bug#40607] [PATCH 2/3] gnu: Add libqb Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 0/3] gnu: Add usbguard Brice Waegeneire
@ 2020-04-23 13:55 ` Brice Waegeneire
2020-04-23 13:55 ` [bug#40607] [PATCH v3 1/3] gnu: umockdev: Fix test Brice Waegeneire
` (3 more replies)
1 sibling, 4 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-04-23 13:55 UTC (permalink / raw)
To: 40607
Add missing modules for usbguard.
Brice Waegeneire (3):
gnu: umockdev: Fix test.
gnu: Add libqb.
gnu: Add usbguard.
gnu/packages/check.scm | 9 ++-
gnu/packages/hardware.scm | 118 ++++++++++++++++++++++++++++++++++++++
2 files changed, 122 insertions(+), 5 deletions(-)
--
2.26.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [bug#40607] [PATCH v3 1/3] gnu: umockdev: Fix test.
2020-04-23 13:55 ` [bug#40607] [PATCH v3 0/3] Add usbguard package Brice Waegeneire
@ 2020-04-23 13:55 ` Brice Waegeneire
2020-04-23 13:55 ` [bug#40607] [PATCH v3 2/3] gnu: Add libqb Brice Waegeneire
` (2 subsequent siblings)
3 siblings, 0 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-04-23 13:55 UTC (permalink / raw)
To: 40607
* gnu/packages/check.scm (umockdev)[inputs]: Remove
'gobject-introspection'.
[arguments]: Replace phase 'skip-broken-test' by 'fix-test'.
---
gnu/packages/check.scm | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 1cd40d9b13..8c22d33c73 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -31,6 +31,7 @@
;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
;;; Copyright © 2019 Chris Marusich <cmmarusich@gmail.com>
;;; Copyright © 2020 Lars-Dominik Braun <ldb@leibniz-psychology.org>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -2427,11 +2428,10 @@ provides a simple way to achieve this.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'unpack 'skip-broken-test
+ (add-after 'unpack 'fix-test
(lambda _
(substitute* "tests/test-umockdev.c"
- (("/\\* sys/ in other dir")
- (string-append "return; // ")))
+ (("/run") "/tmp"))
#t)))))
(native-inputs
`(("vala" ,vala)
@@ -2444,8 +2444,7 @@ provides a simple way to achieve this.")
(inputs
`(("glib" ,glib)
("eudev" ,eudev)
- ("libgudev" ,libgudev)
- ("gobject-introspection" ,gobject-introspection)))
+ ("libgudev" ,libgudev)))
(home-page "https://github.com/martinpitt/umockdev/")
(synopsis "Mock hardware devices for creating unit tests")
(description "umockdev mocks hardware devices for creating integration
--
2.26.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#40607] [PATCH v3 2/3] gnu: Add libqb.
2020-04-23 13:55 ` [bug#40607] [PATCH v3 0/3] Add usbguard package Brice Waegeneire
2020-04-23 13:55 ` [bug#40607] [PATCH v3 1/3] gnu: umockdev: Fix test Brice Waegeneire
@ 2020-04-23 13:55 ` Brice Waegeneire
2020-04-23 13:55 ` [bug#40607] [PATCH v3 3/3] gnu: Add usbguard Brice Waegeneire
2020-04-30 23:20 ` bug#40607: [PATCH v3 0/3] Add usbguard package Ludovic Courtès
3 siblings, 0 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-04-23 13:55 UTC (permalink / raw)
To: 40607
* gnu/packages/hardware.scm (libqb): New variable.
---
gnu/packages/hardware.scm | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 7ee657a75a..7c59984599 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2020 Brice Waegeneire <brice@waegenei.re>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -27,6 +28,7 @@
#:use-module (gnu packages ncurses)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
#:use-module (guix build-system gnu)
#:use-module (guix download)
@@ -307,3 +309,31 @@ supported by the Linux kernel.")
"Rkdeveloptool can read from and write to RockChip devices over USB, such
as the Pinebook Pro.")
(license license:gpl2+))))
+
+(define-public libqb
+ (package
+ (name "libqb")
+ ;; NOTE: We are using a Release Candidate version (for 2.0) here because
+ ;; of the linker issues with the previous release.
+ (version "1.9.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/ClusterLabs/libqb/releases/download/v"
+ version "/libqb-" version ".tar.xz"))
+ (sha256
+ (base32
+ "008vvw504kh40br5v2xkqavnp9vpmjvf768faqzv1d00fd53ingn"))))
+ (build-system gnu-build-system)
+ (native-inputs
+ `(("pkg-config" ,pkg-config)
+ ("xmllint" ,libxml2)))
+ (home-page "https://clusterlabs.github.io/libqb/")
+ (synopsis "Library providing high performance logging, tracing, ipc, and poll")
+ (description "Libqb is a library with the primary purpose of providing
+high-performance, reusable features for client-server architecture, such as
+logging, tracing, inter-process communication (IPC), and polling. Libqb is
+not intended to be an all-encompassing library, but instead provide focused
+APIs that are highly tuned for maximum performance for client-server
+applications.")
+ (license license:lgpl2.1)))
--
2.26.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [bug#40607] [PATCH v3 3/3] gnu: Add usbguard.
2020-04-23 13:55 ` [bug#40607] [PATCH v3 0/3] Add usbguard package Brice Waegeneire
2020-04-23 13:55 ` [bug#40607] [PATCH v3 1/3] gnu: umockdev: Fix test Brice Waegeneire
2020-04-23 13:55 ` [bug#40607] [PATCH v3 2/3] gnu: Add libqb Brice Waegeneire
@ 2020-04-23 13:55 ` Brice Waegeneire
2020-04-30 23:20 ` bug#40607: [PATCH v3 0/3] Add usbguard package Ludovic Courtès
3 siblings, 0 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-04-23 13:55 UTC (permalink / raw)
To: 40607
* gnu/packages/hardware.scm (usbguard): New variable.
---
gnu/packages/hardware.scm | 88 +++++++++++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+)
diff --git a/gnu/packages/hardware.scm b/gnu/packages/hardware.scm
index 7c59984599..189c73ee3c 100644
--- a/gnu/packages/hardware.scm
+++ b/gnu/packages/hardware.scm
@@ -19,14 +19,22 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages hardware)
+ #:use-module (gnu packages admin)
#:use-module (gnu packages autotools)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages check)
+ #:use-module (gnu packages crypto)
+ #:use-module (gnu packages documentation)
#:use-module (gnu packages gcc)
#:use-module (gnu packages glib)
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages openldap)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages polkit)
+ #:use-module (gnu packages protobuf)
#:use-module (gnu packages xdisorg)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
@@ -337,3 +345,83 @@ not intended to be an all-encompassing library, but instead provide focused
APIs that are highly tuned for maximum performance for client-server
applications.")
(license license:lgpl2.1)))
+
+(define-public usbguard
+ (package
+ (name "usbguard")
+ (version "0.7.6")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/USBGuard/usbguard/releases/download/usbguard-"
+ version "/usbguard-" version ".tar.gz"))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0gzhs8s4aka86mkcjib36z54si939ki4bmk46p6v8kln1fixad3j"))))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'patch-makefile
+ (lambda _
+ ;; Do not create log directory.
+ (substitute* "Makefile" ((".*/log/usbguard.*") ""))
+ ;; Disable LDAP tests: they use 'sudo'.
+ (substitute* "src/Tests/Makefile.am"
+ (("WITH_LDAP") "FALSE"))
+ #t))
+ (add-after 'install 'delete-static-library
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; It can't be direclty disabled since it's needed for the tests.
+ (delete-file (string-append (assoc-ref outputs "out")
+ "/lib/libusbguard.a"))
+ #t))
+ (add-after 'install 'install-zsh-completion
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (site-functions
+ (string-append out "/share/zsh/site-functions")))
+ (mkdir-p site-functions)
+ (copy-file "scripts/usbguard-zsh-completion"
+ (string-append site-functions "/_usbguard"))
+ #t))))
+ #:make-flags
+ (list (string-append "BASH_COMPLETION_DIR="
+ (assoc-ref %outputs "out")
+ "/etc/bash_completion.d"))
+ #:configure-flags
+ (list
+ "--localstatedir=/var"
+ "--with-bundled-pegtl"
+ "--enable-systemd=no"
+ "--with-ldap"
+ "--with-dbus"
+ "--with-polkit")))
+ (inputs
+ `(("audit" ,audit)
+ ("catch" ,catch-framework)
+ ("dbus-glib" ,dbus-glib)
+ ("ldap" ,openldap)
+ ("libcap-ng" ,libcap-ng)
+ ("libseccomp" ,libseccomp)
+ ("libsodium" ,libsodium)
+ ("polkit" ,polkit)
+ ("protobuf" ,protobuf)
+ ("libqb" ,libqb)))
+ (native-inputs
+ `(("asciidoc" ,asciidoc)
+ ("autoconf" ,autoconf)
+ ("automake" ,automake)
+ ("bash-completion" ,bash-completion)
+ ("gdbus-codegen" ,glib "bin")
+ ("umockdev" ,umockdev)
+ ("xmllint" ,libxml2)
+ ("xsltproc" ,libxslt)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://usbguard.github.io")
+ (synopsis "Helps to protect your computer against rogue USB devices (a.k.a. BadUSB)")
+ (description "USBGuard is a software framework for implementing USB device
+authorization policies (what kind of USB devices are authorized) as well as
+method of use policies (how a USB device may interact with the system).
+Simply put, it is a USB device whitelisting tool.")
+ (license license:gpl2)))
--
2.26.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* bug#40607: [PATCH v3 0/3] Add usbguard package
2020-04-23 13:55 ` [bug#40607] [PATCH v3 0/3] Add usbguard package Brice Waegeneire
` (2 preceding siblings ...)
2020-04-23 13:55 ` [bug#40607] [PATCH v3 3/3] gnu: Add usbguard Brice Waegeneire
@ 2020-04-30 23:20 ` Ludovic Courtès
2020-05-01 13:10 ` [bug#40607] " Brice Waegeneire
3 siblings, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2020-04-30 23:20 UTC (permalink / raw)
To: Brice Waegeneire; +Cc: 40607-done
Hi,
Brice Waegeneire <brice@waegenei.re> skribis:
> gnu: umockdev: Fix test.
> gnu: Add libqb.
> gnu: Add usbguard.
Applied, thanks!
For usbguard, there are apparently harmless warnings like:
--8<---------------cut here---------------start------------->8---
make[4]: Entering directory '/tmp/guix-build-usbguard-0.7.6.drv-0/usbguard-0.7.6/src/Tests'
CXX main.o
CXX Unit/test_Rule.o
cc1plus: warning: /usr/include/catch: No such file or directory [-Wmissing-include-dirs]
--8<---------------cut here---------------end--------------->8---
Looks like they pass -I/usr/include/catch? Anyway, doesn’t matter much.
Ludo’.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [bug#40607] [PATCH v3 0/3] Add usbguard package
2020-04-30 23:20 ` bug#40607: [PATCH v3 0/3] Add usbguard package Ludovic Courtès
@ 2020-05-01 13:10 ` Brice Waegeneire
0 siblings, 0 replies; 14+ messages in thread
From: Brice Waegeneire @ 2020-05-01 13:10 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 40607-done
Hello Ludo',
On 2020-04-30 23:20, Ludovic Courtès wrote:
> For usbguard, there are apparently harmless warnings like:
>
> --8<---------------cut here---------------start------------->8---
> make[4]: Entering directory
> '/tmp/guix-build-usbguard-0.7.6.drv-0/usbguard-0.7.6/src/Tests'
> CXX main.o
> CXX Unit/test_Rule.o
> cc1plus: warning: /usr/include/catch: No such file or directory
> [-Wmissing-include-dirs]
> --8<---------------cut here---------------end--------------->8---
>
> Looks like they pass -I/usr/include/catch? Anyway, doesn’t matter
> much.
I've fixed that in https://issues.guix.info/issue/40996
Cheers,
- Brice
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2020-05-01 13:12 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-13 19:49 [bug#40608] [PATCH 0/3] gnu: Add usbguard Brice Waegeneire
2020-04-13 19:49 ` [bug#40609] [PATCH 1/3] gnu: umockdev: Fix test Brice Waegeneire
2020-04-13 19:49 ` [bug#40607] [PATCH 2/3] gnu: Add libqb Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 0/3] gnu: Add usbguard Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 1/3] gnu: umockdev: Fix test Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 2/3] gnu: Add libqb Brice Waegeneire
2020-04-17 12:34 ` [bug#40607] [PATCH v2 3/3] gnu: Add usbguard Brice Waegeneire
2020-04-23 13:55 ` [bug#40607] [PATCH v3 0/3] Add usbguard package Brice Waegeneire
2020-04-23 13:55 ` [bug#40607] [PATCH v3 1/3] gnu: umockdev: Fix test Brice Waegeneire
2020-04-23 13:55 ` [bug#40607] [PATCH v3 2/3] gnu: Add libqb Brice Waegeneire
2020-04-23 13:55 ` [bug#40607] [PATCH v3 3/3] gnu: Add usbguard Brice Waegeneire
2020-04-30 23:20 ` bug#40607: [PATCH v3 0/3] Add usbguard package Ludovic Courtès
2020-05-01 13:10 ` [bug#40607] " Brice Waegeneire
2020-04-13 19:50 ` [bug#40610] [PATCH 3/3] gnu: Add usbguard Brice Waegeneire
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).