Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (01452d614c837a296d31034e21c8bd3f5875788d)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Pavel Vinogradov <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (01452d614c837a296d31034e21c8bd3f5875788d)
  • Date: Mon, 28 Aug 2023 03:33:56 +0000

GIT changes to master grimoire by Pavel Vinogradov <public AT sourcemage.org>:

ChangeLog | 2
utils/usbguard/BUILD | 3 +
utils/usbguard/DEPENDS | 45
++++++++++++++++++++++
utils/usbguard/DETAILS | 28 +++++++++++++
utils/usbguard/HISTORY | 4 +
utils/usbguard/PREPARE | 2
utils/usbguard/PRE_BUILD | 8 +++
utils/usbguard/init.d/usbguard-daemon | 7 +++
utils/usbguard/patches/0001-include-cstdint.patch | 12 +++++
9 files changed, 111 insertions(+)

New commits:
commit 01452d614c837a296d31034e21c8bd3f5875788d
Author: Pavel Vinogradov <public AT sourcemage.org>
Commit: Pavel Vinogradov <public AT sourcemage.org>

utils/usbguard: new spell, a software framework for
implementing USB device authorization
policies

diff --git a/ChangeLog b/ChangeLog
index 1f7a94f..bf3ae17 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
* FUNCTIONS: more improvements in apply_patch_dir, now checks for
*.diff
and/or *.patch specifically before applying them
* libs/libqb: new spell, a library for logging, tracing, ipc, and poll
+ * utils/usbguard: new spell, a software framework for implementing
USB device
+ authorization policies

2023-08-26 Pavel Vinogradov <public AT sorcemage.org>
* FUNCTIONS: simplified apply_patch_dir, removed apply_patch_dir_find
diff --git a/utils/usbguard/BUILD b/utils/usbguard/BUILD
new file mode 100755
index 0000000..0dfd60b
--- /dev/null
+++ b/utils/usbguard/BUILD
@@ -0,0 +1,3 @@
+OPTS="--with-bundled-catch --with-bundled-pegtl ${OPTS}" &&
+
+default_build
diff --git a/utils/usbguard/DEPENDS b/utils/usbguard/DEPENDS
new file mode 100755
index 0000000..b2bd32e
--- /dev/null
+++ b/utils/usbguard/DEPENDS
@@ -0,0 +1,45 @@
+. "${GRIMOIRE}/depends_one_of.function" &&
+
+if [[ "${USBGUARD_BRANCH}" == "scm" ]]; then
+ depends autoconf &&
+ depends automake &&
+ depends git
+fi &&
+
+depends DEVICE-MANAGER &&
+depends libqb &&
+depends protobuf &&
+
+depends_one_of USBGUARD_HASHING \
+ libgcrypt "--with-crypto-library=gcrypt" \
+ libsodium "--with-crypto-library=libsodium" \
+ openssl "--with-crypto-library=openssl" \
+ "hashing library" &&
+
+optional_depends asciidoc \
+ "" \
+ "" \
+ "for documentation" &&
+
+optional_depends dbus \
+ "--with-dbus" \
+ "--without-dbus --without-polkit" \
+ "for DBus bridge service" &&
+if is_depends_enabled "${SPELL}" "dbus"; then
+ depends polkit
+fi &&
+
+optional_depends libseccomp \
+ "--enable-seccomp" \
+ "--disable-seccomp" \
+ "for system calls list support" &&
+
+optional_depends libcap-ng \
+ "--enable-libcapng" \
+ "--disable-libcapng" \
+ "for dropping privileges support" &&
+
+optional_depends systemd \
+ "--enable-systemd" \
+ "--disable-systemd" \
+ "for systemd unit"
\ No newline at end of file
diff --git a/utils/usbguard/DETAILS b/utils/usbguard/DETAILS
new file mode 100755
index 0000000..54b0961
--- /dev/null
+++ b/utils/usbguard/DETAILS
@@ -0,0 +1,28 @@
+. "$GRIMOIRE/FUNCTIONS"
+ SPELL="usbguard"
+if [[ "${USBGUARD_BRANCH}" == "scm" ]]; then
+ VERSION="$(get_scm_version)"
+ SOURCE="${SPELL}-scm.tar.xz"
+SOURCE_DIRECTORY="${bUILD_DIRECTORY}/${SPELL}-scm"
+ SOURCE_URL[0]="git_http://github.com/USBGuard/${SPELL}:${SPELL}-scm:main";
+ SOURCE_IGNORE="volatile"
+ FORCE_DOWNLOAD="on"
+else
+ VERSION="1.1.2"
+
SOURCE_HASH="sha256:dcf5c90f3f93030e04df1baeb8d388b678c40dd48b135ea12a7be7dee8944934:UPSTREAM_HASH"
+ SOURCE="${SPELL}-${VERSION}.tar.gz"
+SOURCE_DIRECTORY="${BUILD_DIRECTORY}/${SPELL}-${VERSION}"
+
SOURCE_URL[0]="https://github.com/USBGuard/${SPELL}/releases/download/${SPELL}-${VERSION}/${SOURCE}";
+# Watch: https://github.com/USBGuard/usbguard/tags tag/usbguard-([0-9.]+)
+fi
+ WEB_SITE="https://usbguard.github.io/";
+ ENTERED="20230827"
+ LICENSE[0]="GPL"
+ KEYWORDS="usb authorization"
+ SHORT="software framework for implementing USB device
authorization policies"
+cat << EOF
+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 allowlisting tool.
+EOF
diff --git a/utils/usbguard/HISTORY b/utils/usbguard/HISTORY
new file mode 100644
index 0000000..0697b6a
--- /dev/null
+++ b/utils/usbguard/HISTORY
@@ -0,0 +1,4 @@
+2023-08-27 Pavel Vinogradov <public AT sorcemage.org>
+ * BUILD, DEPENDS, DETAILS, PRE_BUILD, PREPARE, init.d/usbguard-daemon,
+ patches/0001-include-cstdint.patch: created the spell, version 1.1.2
+
diff --git a/utils/usbguard/PREPARE b/utils/usbguard/PREPARE
new file mode 100755
index 0000000..e38d86f
--- /dev/null
+++ b/utils/usbguard/PREPARE
@@ -0,0 +1,2 @@
+. "${GRIMOIRE}/FUNCTIONS" &&
+prepare_select_branch stable scm
diff --git a/utils/usbguard/PRE_BUILD b/utils/usbguard/PRE_BUILD
new file mode 100755
index 0000000..f29fe2f
--- /dev/null
+++ b/utils/usbguard/PRE_BUILD
@@ -0,0 +1,8 @@
+default_pre_build &&
+cd "${SOURCE_DIRECTORY}" &&
+
+if [[ "${USBGUARD_BRANCH}" == "scm" ]]; then
+ ./autogen.sh
+else
+ apply_patch_dir patches
+fi
diff --git a/utils/usbguard/init.d/usbguard-daemon
b/utils/usbguard/init.d/usbguard-daemon
new file mode 100755
index 0000000..35836dc
--- /dev/null
+++ b/utils/usbguard/init.d/usbguard-daemon
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PROGRAM=/usr/sbin/usbguard-daemon
+RUNLEVEL=3
+NEEDS="udevd"
+
+. /etc/init.d/smgl_init
diff --git a/utils/usbguard/patches/0001-include-cstdint.patch
b/utils/usbguard/patches/0001-include-cstdint.patch
new file mode 100644
index 0000000..75c6449
--- /dev/null
+++ b/utils/usbguard/patches/0001-include-cstdint.patch
@@ -0,0 +1,12 @@
+diff --git a/src/Library/Base64.hpp.orig b/src/Library/Base64.hpp
+index 0947f21..aa76311 100644
+--- a/src/Library/Base64.hpp.orig
++++ b/src/Library/Base64.hpp
+@@ -24,6 +24,7 @@
+
+ #include <string>
+ #include <cstddef>
++#include <cstdint>
+
+ namespace usbguard
+ {



  • [SM-Commit] GIT changes to master grimoire by Pavel Vinogradov (01452d614c837a296d31034e21c8bd3f5875788d), Pavel Vinogradov, 08/27/2023

Archive powered by MHonArc 2.6.24.

Top of Page