usbguard: update to 1.1.2.

This commit is contained in:
RunningDroid 2022-10-12 02:08:04 -04:00 committed by Duncan Overbruck
parent a8aaab3f95
commit dd748dbf23
2 changed files with 5 additions and 76 deletions

View File

@ -1,18 +1,5 @@
--- a/src/CLI/usbguard.cpp 2019-06-13 11:51:53.787863657 +0000
+++ b/src/CLI/usbguard.cpp 2019-08-23 01:52:34.233056882 +0000
@@ -26,10 +26,8 @@
#include <map>
#include <iostream>
-#ifndef _GNU_SOURCE
- #define _GNU_SOURCE
-#endif
-#include <cstring> /* GNU version of basename(3) */
+#include <cstring>
+#include <libgen.h>
#include "usbguard.hpp"
#include "usbguard-get-parameter.hpp"
@@ -99,7 +97,7 @@
static int usbguard_cli(int argc, char* argv[])
@ -22,63 +9,3 @@
if (argc == 1) {
showTopLevelHelp();
--- a/src/CLI/usbguard-rule-parser.cpp 2019-06-13 11:51:53.783863704 +0000
+++ b/src/CLI/usbguard-rule-parser.cpp 2019-08-23 01:52:34.234056870 +0000
@@ -24,10 +24,8 @@
#include "RuleParser.hpp"
#include <iostream>
-#ifndef _GNU_SOURCE
- #define _GNU_SOURCE
-#endif
#include <cstring>
+#include <libgen.h>
#include <fstream>
#include <getopt.h>
@@ -43,8 +41,10 @@
static void showHelp(std::ostream& stream, const char* usbguard_arg0)
{
- stream << " Usage: " << ::basename(usbguard_arg0) << " [OPTIONS] <rule_spec>" << std::endl;
- stream << " Usage: " << ::basename(usbguard_arg0) << " [OPTIONS] -f <file>" << std::endl;
+ char *usbguard_arg0_copy = strdup(usbguard_arg0);
+ stream << " Usage: " << ::basename(usbguard_arg0_copy) << " [OPTIONS] <rule_spec>" << std::endl;
+ stream << " Usage: " << ::basename(usbguard_arg0_copy) << " [OPTIONS] -f <file>" << std::endl;
+ free(usbguard_arg0_copy);
stream << std::endl;
stream << " Options:" << std::endl;
stream << " -f, --file Interpret the argument as a path to a file that should be parsed." << std::endl;
--- a/src/DBus/gdbus-server.cpp 2019-06-28 08:45:27.616687137 +0000
+++ b/src/DBus/gdbus-server.cpp 2019-08-23 01:52:34.274056367 +0000
@@ -23,6 +23,7 @@
#include <stdlib.h>
#include <iostream>
#include <getopt.h>
+#include <libgen.h>
#include "DBusBridge.hpp"
static usbguard::DBusBridge* dbus_bridge = nullptr;
@@ -208,7 +209,9 @@
static void showHelp(std::ostream& stream)
{
- stream << " Usage: " << ::basename(usbguard_arg0) << " [OPTIONS]" << std::endl;
+ char *usbguard_arg0_copy = strdup(usbguard_arg0);
+ stream << " Usage: " << ::basename(usbguard_arg0_copy) << " [OPTIONS]" << std::endl;
+ free(usbguard_arg0_copy);
stream << std::endl;
stream << " Options:" << std::endl;
stream << " -s, --system Listen on the system bus." << std::endl;
--- a/src/Library/public/usbguard/Exception.hpp 2019-06-28 08:45:27.620687089 +0000
+++ b/src/Library/public/usbguard/Exception.hpp 2019-08-23 01:52:34.323055751 +0000
@@ -116,7 +116,8 @@
static std::string reasonFromErrno(const int errno_value)
{
char buffer[1024];
- return std::string(strerror_r(errno_value, buffer, sizeof buffer));
+ strerror_r(errno_value, buffer, sizeof buffer);
+ return std::string(buffer);
}
};

View File

@ -1,7 +1,7 @@
# Template file for 'usbguard'
pkgname=usbguard
version=1.0.0
revision=8
version=1.1.2
revision=1
build_style=gnu-configure
configure_args="--with-crypto-library=sodium --with-bundled-catch --with-bundled-pegtl"
conf_files="/etc/usbguard/*"
@ -14,11 +14,13 @@ short_desc="Tool for whitelisting and blacklisting USB devices"
maintainer="Philoponus Bindle <philoponus-bindle@protonmail.com>"
license="GPL-2.0-or-later"
homepage="https://usbguard.github.io"
changelog="https://raw.githubusercontent.com/USBGuard/usbguard/main/CHANGELOG.md"
distfiles="https://github.com/USBGuard/usbguard/releases/download/usbguard-$version/usbguard-$version.tar.gz"
checksum=5617986cd5dd1a2d311041648a1977d836cf4e33a4121d7f82599f21496abc42
checksum=dcf5c90f3f93030e04df1baeb8d388b678c40dd48b135ea12a7be7dee8944934
post_install() {
vsv usbguard
vcompletion scripts/usbguard-zsh-completion zsh
}
usbguard-devel_package() {