From 8201037a9828a2c62ee4daf5abec203a47ab423f Mon Sep 17 00:00:00 2001 From: RunningDroid Date: Wed, 12 Oct 2022 02:08:04 -0400 Subject: [PATCH] usbguard: update to 1.1.2. --- srcpkgs/usbguard/patches/musl.patch | 73 ----------------------------- srcpkgs/usbguard/template | 7 +-- 2 files changed, 4 insertions(+), 76 deletions(-) diff --git a/srcpkgs/usbguard/patches/musl.patch b/srcpkgs/usbguard/patches/musl.patch index 6ce934444841..cc2190720595 100644 --- a/srcpkgs/usbguard/patches/musl.patch +++ b/srcpkgs/usbguard/patches/musl.patch @@ -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 - #include - --#ifndef _GNU_SOURCE -- #define _GNU_SOURCE --#endif --#include /* GNU version of basename(3) */ -+#include -+#include - - #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 --#ifndef _GNU_SOURCE -- #define _GNU_SOURCE --#endif - #include -+#include - #include - - #include -@@ -43,8 +41,10 @@ - - static void showHelp(std::ostream& stream, const char* usbguard_arg0) - { -- stream << " Usage: " << ::basename(usbguard_arg0) << " [OPTIONS] " << std::endl; -- stream << " Usage: " << ::basename(usbguard_arg0) << " [OPTIONS] -f " << std::endl; -+ char *usbguard_arg0_copy = strdup(usbguard_arg0); -+ stream << " Usage: " << ::basename(usbguard_arg0_copy) << " [OPTIONS] " << std::endl; -+ stream << " Usage: " << ::basename(usbguard_arg0_copy) << " [OPTIONS] -f " << 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 - #include - #include -+#include - #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); - } - }; - diff --git a/srcpkgs/usbguard/template b/srcpkgs/usbguard/template index f6671163b6c4..30f834c09cd8 100644 --- a/srcpkgs/usbguard/template +++ b/srcpkgs/usbguard/template @@ -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/*" @@ -15,10 +15,11 @@ maintainer="Philoponus Bindle " license="GPL-2.0-or-later" homepage="https://usbguard.github.io" 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() {