diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2021-08-01 22:03:23 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2021-08-01 22:03:23 +0100 |
commit | 590b9b7b03bf4651e099949e318755af7cfa81b8 (patch) | |
tree | 54c184b7d26c25f1922bfeaf19a1dd45a2e3b1eb /sys-apps/usbguard | |
parent | f4fc10428424904caf2035cffc442195cb088b2c (diff) |
gentoo resync : 01.08.2021
Diffstat (limited to 'sys-apps/usbguard')
-rw-r--r-- | sys-apps/usbguard/Manifest | 8 | ||||
-rw-r--r-- | sys-apps/usbguard/files/usbguard-1.0.0-bash-completion-configure.patch | 105 | ||||
-rw-r--r-- | sys-apps/usbguard/usbguard-0.7.6-r1.ebuild | 80 | ||||
-rw-r--r-- | sys-apps/usbguard/usbguard-0.7.8.ebuild | 91 | ||||
-rw-r--r-- | sys-apps/usbguard/usbguard-1.0.0-r2.ebuild (renamed from sys-apps/usbguard/usbguard-1.0.0-r1.ebuild) | 7 | ||||
-rw-r--r-- | sys-apps/usbguard/usbguard-1.0.0.ebuild | 97 |
6 files changed, 111 insertions, 277 deletions
diff --git a/sys-apps/usbguard/Manifest b/sys-apps/usbguard/Manifest index 1893d8047fa1..ce568d973739 100644 --- a/sys-apps/usbguard/Manifest +++ b/sys-apps/usbguard/Manifest @@ -1,11 +1,7 @@ AUX usbguard-0.7.6-usbguard-dbus.openrc 278 BLAKE2B 58f11c693e25436605af6ad41a1f618e30b20f336cda6a11db480fdda65022c28ce84d6aa9e804c1344221f3aa4ab8a262094106bb677414c2b24e7971f9acad SHA512 f66bee161324610755371fa04199fcd81887c1a55ab73cc1922be719d61e8315b7a869e1d8af6c3df2d6922b07027dced3605e63b130e8f094fcb606aea20b9e AUX usbguard-0.7.6-usbguard.openrc 309 BLAKE2B d5297058d0ee8ce0f9fc91f2158f4aef5f077e1087800449a0319038d677a2a70274305058cd104ba30529b3c9daf82ffbe16ca5cdf20a3b4817e66d499d08c5 SHA512 512a08f59caf9de22b0776473a1ea9a4322b05c6286c99dac3055e0c6d52c78542448c33e19708338080cfdcdfcfb0f9868e8c523155e978c0161c262081da09 +AUX usbguard-1.0.0-bash-completion-configure.patch 3598 BLAKE2B 7b8ed24d698c37a68adec76607b3eaf8f7315f2f151f1a9be814faa66572962e00802ee6a38b6f047e4feca86689e52959619086d3c7a2a37ef5a8dcb7ea5545 SHA512 cf523f671b1266cce94a951e06fdeb2d520b8fbcf67769dd597b34c74fa702af7ffc2774ae0088d512f8f43fb7b9c17b49d1b100f6e7175a6e717a243efb1e50 AUX usbguard-1.0.0-pthreads-link.patch 1013 BLAKE2B 78daa200908b47e3db9b779383958711add034c521a5cf95718b62ef89259007dafc7318df0a9722228ba36419593636383a7dea069947c99baeddc3449f046b SHA512 a5634f6ca80d46d37af803106d3c44313408f7fdaaa160ce713562210cbb28cb4d3f9180cda0855c73bf85410b0d77b0c1758803adc757888c7876db9fb761e7 -DIST usbguard-0.7.6.tar.gz 1189194 BLAKE2B 4fefd9ccf13b094f64942559f481144f08986dc71154b87c1623459d2429c07e2738a17877d3f6c275e83ce904067b1284c588c9a95023c7205cc5e21ca118f0 SHA512 0b0d42276e48baac2dc1f9031eec25e3f622a8d6178cb0400b97c7d32005bfa158b60fd286fdc66206a8684658fefaf6389ef93511e942f025e75671d7455628 -DIST usbguard-0.7.8.tar.gz 1220764 BLAKE2B 8127acc0ef5dd89cc540097a71f10d56f3cb0a166453e27161e444d37dbf51cc4861bc9c71dcca16e9fec7187b3dcabb2bf08af522b2aaa4693fa4f4913a9ae0 SHA512 315c25ed7eb61cc0920047836dcca035cb07aecb6dfece9e4f6dc2ad61aaf6fdbf86898e43493958f3d12a146eb4c8f88b90bb246da0df83bb2097ce5b853e88 DIST usbguard-1.0.0.tar.gz 1260374 BLAKE2B ea9b48f14a4091f4ce61b6c171947cf2412c47e9aa3edb816e933f7aad6247b32e89bee90675ca5a0136b460fef8f2d423c0c81ad49d52453d0d3803b881503a SHA512 068a9be8bd5ea05efcdad79e2c4beb5e8b646b4703fbe1f8bb262e37ae9a6284a6eeb811a6bd441250a38bce1e45b7f44ad15726aa5963da2e1b56e85f5e16fd -EBUILD usbguard-0.7.6-r1.ebuild 1910 BLAKE2B d708d26de6da007518ea857a9d8852d3444cb76ce688eebfeeb9f27a7bb182a2ab847db3259d1cc2593f8b5a87e1169c69ae33fb5114e18b117e357228d5d925 SHA512 8d47d66b6d022382610354e744d3ab18fb595391a4a9a7285809816763988e126cc9a50d3f1c6bb8293942de00fd52be3c453c8247a53749ec0fff3b1c3cffb0 -EBUILD usbguard-0.7.8.ebuild 2062 BLAKE2B cf1d12238d7b2b846119fc11454347cc92cb550aa404fbe8afb3364c29b49abb444f4cbf559eb3aeda68fe0f73ba59f134a7d4b8a947f81687e14a148c8bcd06 SHA512 e8efc8156d5b5d565843baff754b70a12dabe43aa65f2090249901fc088587821fa6b5fed7668933105319cf58a22576764b4cb43e688ce142ee9e34a604e916 -EBUILD usbguard-1.0.0-r1.ebuild 2320 BLAKE2B e96e88d83a14f93283f708e9b81f1ee221c97400189434093f77de6b3d99f498d29a343c5b825640e5f573daedb8d9a8f44447b3a819e671dfb65ff137a5bb22 SHA512 bf4ef727a7c5545262385d4e11a85074026d18f38f5cfe941da2999e104e20d936ee822992c5b38e5a752ced29d0c6adff43ae5b82055df8a6af363b7cd4344a -EBUILD usbguard-1.0.0.ebuild 2253 BLAKE2B 036fed4776dfc7d13e05f006be5a15e31522cd8eb22cc3e80d1f3fcba48aa3941d82a97354582b297b37d8b17b777952eb762ec7606201235517b5435cff5a2e SHA512 b88fe2ec0a531fb533bd85e85fb8a9e89be89e1ce2eb52c10e1f7ea284c5be0edf1520ab34f54cf8b37311ed68c4e2f0564e0b20d6703b1a0226876a877b1d6c +EBUILD usbguard-1.0.0-r2.ebuild 2375 BLAKE2B ae31b853b32157a6b5e654f2e3fc792f228fd190e96c3f67261751e6748b6908902ac1d22c315f17892082d164ff1e8c168bd167e7284361b33be7d367b63b15 SHA512 08fd0ac7e120c6cbc10decabdc42957a44fd3c00a0dac307dfa4d1e8d9e4da2950de1c6a47c793fcfa037894f00670baa8e084a3812ca1a4dec8e215e989899e MISC metadata.xml 344 BLAKE2B ccb8c1c611694dea10c4d0809ab46ccdc30efeadcd60904ffe6aa98420d489ea64bf8b1f0f46caea3d77ef448bd2b8d510f355aeee6ce98e5f3a3f76c6fbe141 SHA512 a661530757754d0640302d966aaa1156dfdda95430a3c0d80cf178ec4ffcfdcc13e9c19de7a22fd5269bc877d177d7a80fd15e9875247ea1f829601c2be19777 diff --git a/sys-apps/usbguard/files/usbguard-1.0.0-bash-completion-configure.patch b/sys-apps/usbguard/files/usbguard-1.0.0-bash-completion-configure.patch new file mode 100644 index 000000000000..c63a85f23a50 --- /dev/null +++ b/sys-apps/usbguard/files/usbguard-1.0.0-bash-completion-configure.patch @@ -0,0 +1,105 @@ +https://github.com/USBGuard/usbguard/pull/483 + +From b3bb39e0e5de61e1c713cb98ebca5e4c6529e2b9 Mon Sep 17 00:00:00 2001 +From: Sam James <sam@gentoo.org> +Date: Sun, 18 Jul 2021 03:42:21 +0100 +Subject: [PATCH] configure.ac: Use standard --with-bash-completion-dir option + +Rationale: +This makes it a lot easier to enable/disable installation +of bash completion files rather than it being based on +a certain package being installed (or not). It's useful +in Gentoo Linux for example where we may want to always +install Bash completion files to the right location, even +if the user isn't using it yet, to save rebuilds. + +This makes a few changes to the current Bash completion logic, mainly: +* Falls back gracefully to a standard directory if bash-completion + itself is not installed (in that case, we can't ask it via pkgconfig + where to place files). + +* So the behaviour is now: + * no argument / --with-bash-completion-dir=yes: + + Asks pkgconfig, but falls back to standard directory. + + * --with-bash-completion-dir=dir: + + Use the given directory with no detection. + + * --without-bash-completion-dir: + + No installation of Bash completion files. + +Signed-off-by: Sam James <sam@gentoo.org> +--- + Makefile.am | 2 +- + configure.ac | 32 ++++++++++++++------------------ + 2 files changed, 15 insertions(+), 19 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 34a2e96..910c3c5 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -438,7 +438,7 @@ usbguard_LDADD=\ + $(top_builddir)/libusbguard.la \ + ${PTHREAD_LIBS} + +-if BASH_COMPLETION_ENABLED ++if ENABLE_BASH_COMPLETION + bashcompletiondir = $(BASH_COMPLETION_DIR) + dist_bashcompletion_DATA = $(top_srcdir)/scripts/bash_completion/usbguard + endif +diff --git a/configure.ac b/configure.ac +index 73021b6..4207ae2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -663,11 +663,18 @@ AC_ARG_ENABLE([systemd], + *) AC_MSG_ERROR([bad value ${enableval} for --enable-systemd]) ;; + esac], [systemd=no]) + +- +-PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0], +- [bash_completion_dir="`$PKG_CONFIG --variable=completionsdir bash-completion`" +- bash_completion=yes], +- [bash_completion=no]) ++AC_ARG_WITH([bash-completion-dir], ++ AS_HELP_STRING([--with-bash-completion-dir[=PATH]], ++ [Enable bash auto-completion. Uses pkgconfig if no path given. @<:@default=yes@:>@]), ++ [], [with_bash_completion_dir=yes]) ++ ++if test "x$with_bash_completion_dir" = "xyes"; then ++ PKG_CHECK_MODULES([BASH_COMPLETION], [bash-completion >= 2.0], ++ [BASH_COMPLETION_DIR=$($PKG_CONFIG --variable=completionsdir bash-completion)], ++ [BASH_COMPLETION_DIR="$datadir/bash-completion/completions"]) ++else ++ BASH_COMPLETION_DIR="$with_bash_completion_dir" ++fi + + if test "x$debug" = xyes; then + CXXFLAGS="$CXXFLAGS $CXXFLAGS_DEBUG_ENABLED" +@@ -706,19 +713,8 @@ fi + + AC_SUBST([ANALYZE_CONFIGURE_ARGS], $ac_configure_args) + +-case "$bash_completion_dir" in +- /usr/share/*|/usr/local/share/*) +- bash_completion_dir=$(echo "$bash_completion_dir" | sed -r 's,^(/usr/share|/usr/local/share),${datadir},') +- ;; +- /usr/*|/usr/local/*) +- bash_completion_dir=$(echo "$bash_completion_dir" | sed -r 's,^(/usr|/usr/local),${prefix},') +- ;; +- /*) +- bash_completion_dir='${prefix}'"$bash_completion_dir" +- ;; +-esac +- +-AC_SUBST([BASH_COMPLETION_DIR], $bash_completion_dir) ++AC_SUBST([BASH_COMPLETION_DIR]) ++AM_CONDITIONAL([ENABLE_BASH_COMPLETION], [test "x$with_bash_completion_dir" != "xno"]) + + AM_CONDITIONAL([SYSTEMD_SUPPORT_ENABLED], [test "x$systemd" = xyes ]) + AM_CONDITIONAL([DBUS_ENABLED], [test "x$with_dbus" = xyes ]) +-- +2.32.0 + diff --git a/sys-apps/usbguard/usbguard-0.7.6-r1.ebuild b/sys-apps/usbguard/usbguard-0.7.6-r1.ebuild deleted file mode 100644 index 3f76442a7df2..000000000000 --- a/sys-apps/usbguard/usbguard-0.7.6-r1.ebuild +++ /dev/null @@ -1,80 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="Daemon protecting your computer against BadUSB" -HOMEPAGE="https://github.com/USBGuard/usbguard" -SRC_URI="https://github.com/USBGuard/usbguard/releases/download/${P}/${P}.tar.gz" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="bash-completion dbus ldap policykit systemd" - -REQUIRED_USE="policykit? ( dbus )" - -CDEPEND=" - <dev-libs/pegtl-3 - >=dev-libs/libsodium-0.4.5:= - >=dev-libs/protobuf-2.5.0:= - >=sys-cluster/libqb-0.16.0:= - sys-devel/gcc:*[cxx] - >=sys-libs/libcap-ng-0.7.0 - >=sys-libs/libseccomp-2.0.0 - >=sys-process/audit-2.7.7 - bash-completion? ( >=app-shells/bash-completion-2.0 ) - dbus? ( - >=dev-libs/dbus-glib-0.100 - dev-libs/glib:2 - sys-apps/dbus - policykit? ( sys-auth/polkit[introspection] ) - ) - ldap? ( net-nds/openldap ) - systemd? ( sys-apps/systemd ) - " -RDEPEND="${CDEPEND} - virtual/udev - " -DEPEND="${CDEPEND} - app-text/asciidoc - dev-cpp/catch:1 - dbus? ( - dev-libs/libxml2 - dev-libs/libxslt - dev-util/gdbus-codegen - ) - " - -src_configure() { - local myargs=( - $(use_with dbus) - $(use_with ldap) - $(use_with policykit polkit) - $(use_enable systemd) - ) - - econf "${myargs[@]}" -} - -src_install() { - default - - keepdir /var/lib/log/usbguard - - newinitd "${FILESDIR}"/${P}-usbguard.openrc usbguard - use dbus && newinitd "${FILESDIR}"/${P}-usbguard-dbus.openrc usbguard-dbus -} - -pkg_postinst() { - ewarn - ewarn 'BEFORE STARTING USBGUARD please be sure to create/generate' - ewarn ' a rules file at /etc/usbguard/rules.conf' - ewarn ' so that you do not' - ewarn ' GET LOCKED OUT' - ewarn " of this system (\"$(hostname)\")." - ewarn - ewarn 'This command may be of help:' - ewarn ' sudo sh -c "usbguard generate-policy > /etc/usbguard/rules.conf"' - ewarn -} diff --git a/sys-apps/usbguard/usbguard-0.7.8.ebuild b/sys-apps/usbguard/usbguard-0.7.8.ebuild deleted file mode 100644 index cc4ab8ff6f37..000000000000 --- a/sys-apps/usbguard/usbguard-0.7.8.ebuild +++ /dev/null @@ -1,91 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools - -DESCRIPTION="Daemon protecting your computer against BadUSB" -HOMEPAGE="https://github.com/USBGuard/usbguard" -SRC_URI="https://github.com/USBGuard/usbguard/releases/download/${P}/${P}.tar.gz" - -LICENSE="GPL-2+" -SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="bash-completion dbus ldap policykit static-libs systemd" - -REQUIRED_USE="policykit? ( dbus )" - -CDEPEND=" - <dev-libs/pegtl-3 - >=dev-libs/libsodium-0.4.5:= - >=dev-libs/protobuf-2.5.0:= - >=sys-cluster/libqb-0.16.0:= - sys-devel/gcc:*[cxx] - >=sys-libs/libcap-ng-0.7.0 - >=sys-libs/libseccomp-2.0.0 - >=sys-process/audit-2.7.7 - bash-completion? ( >=app-shells/bash-completion-2.0 ) - dbus? ( - dev-libs/glib:2 - sys-apps/dbus - policykit? ( sys-auth/polkit[introspection] ) - ) - ldap? ( net-nds/openldap ) - systemd? ( sys-apps/systemd ) - " -RDEPEND="${CDEPEND} - virtual/udev - " -DEPEND="${CDEPEND} - app-text/asciidoc - dev-cpp/catch:1 - dbus? ( - dev-libs/libxml2 - dev-libs/libxslt - dev-util/gdbus-codegen - ) - " - -PATCHES=( - "${FILESDIR}"/${PN}-1.0.0-pthreads-link.patch -) - -src_prepare() { - default - eautoreconf -} - -src_configure() { - local myargs=( - $(use_with dbus) - $(use_with ldap) - $(use_with policykit polkit) - $(use_enable static-libs static) - $(use_enable systemd) - ) - - econf "${myargs[@]}" -} - -src_install() { - default - - keepdir /var/lib/log/usbguard - - newinitd "${FILESDIR}"/${PN}-0.7.6-usbguard.openrc usbguard - use dbus && newinitd "${FILESDIR}"/${PN}-0.7.6-usbguard-dbus.openrc usbguard-dbus -} - -pkg_postinst() { - ewarn - ewarn 'BEFORE STARTING USBGUARD please be sure to create/generate' - ewarn ' a rules file at /etc/usbguard/rules.conf' - ewarn ' so that you do not' - ewarn ' GET LOCKED OUT' - ewarn " of this system (\"$(hostname)\")." - ewarn - ewarn 'This command may be of help:' - ewarn ' sudo sh -c "usbguard generate-policy > /etc/usbguard/rules.conf"' - ewarn -} diff --git a/sys-apps/usbguard/usbguard-1.0.0-r1.ebuild b/sys-apps/usbguard/usbguard-1.0.0-r2.ebuild index 45cb81c1a51a..cf0a6c5a14dd 100644 --- a/sys-apps/usbguard/usbguard-1.0.0-r1.ebuild +++ b/sys-apps/usbguard/usbguard-1.0.0-r2.ebuild @@ -3,7 +3,7 @@ EAPI=7 -inherit autotools +inherit autotools bash-completion-r1 DESCRIPTION="Daemon protecting your computer against BadUSB" HOMEPAGE="https://github.com/USBGuard/usbguard" @@ -12,7 +12,7 @@ SRC_URI="https://github.com/USBGuard/usbguard/releases/download/${P}/${P}.tar.gz LICENSE="GPL-2+" SLOT="0/1" # due to libusbguard.so.<1>.0.0 KEYWORDS="~amd64 ~x86" -IUSE="bash-completion dbus ldap policykit static-libs systemd test umockdev" +IUSE="dbus ldap policykit static-libs systemd test umockdev" REQUIRED_USE="policykit? ( dbus )" @@ -29,7 +29,6 @@ CDEPEND=" >=sys-libs/libcap-ng-0.7.0 >=sys-libs/libseccomp-2.0.0 >=sys-process/audit-2.7.7 - bash-completion? ( >=app-shells/bash-completion-2.0 ) dbus? ( dev-libs/glib:2 sys-apps/dbus @@ -56,6 +55,7 @@ RESTRICT="!test? ( test )" PATCHES=( "${FILESDIR}"/${PN}-1.0.0-pthreads-link.patch + "${FILESDIR}"/${PN}-1.0.0-bash-completion-configure.patch ) src_prepare() { @@ -65,6 +65,7 @@ src_prepare() { src_configure() { local myargs=( + --with-bash-completion-dir=$(get_bashcompdir) $(use_with dbus) $(use_with ldap) $(use_with policykit polkit) diff --git a/sys-apps/usbguard/usbguard-1.0.0.ebuild b/sys-apps/usbguard/usbguard-1.0.0.ebuild deleted file mode 100644 index f93887630a22..000000000000 --- a/sys-apps/usbguard/usbguard-1.0.0.ebuild +++ /dev/null @@ -1,97 +0,0 @@ -# Copyright 1999-2021 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools - -DESCRIPTION="Daemon protecting your computer against BadUSB" -HOMEPAGE="https://github.com/USBGuard/usbguard" -SRC_URI="https://github.com/USBGuard/usbguard/releases/download/${P}/${P}.tar.gz" - -LICENSE="GPL-2+" -SLOT="0/1" # due to libusbguard.so.<1>.0.0 -KEYWORDS="~amd64 ~x86" -IUSE="bash-completion dbus ldap policykit static-libs systemd test" - -REQUIRED_USE="policykit? ( dbus )" - -# https://github.com/USBGuard/usbguard/issues/449 -# https://bugs.gentoo.org/769692 -REQUIRED_USE+=" test? ( static-libs )" - -CDEPEND=" - <dev-libs/pegtl-3 - >=dev-libs/libsodium-0.4.5:= - >=dev-libs/protobuf-2.5.0:= - >=sys-cluster/libqb-0.16.0:= - sys-devel/gcc:*[cxx] - >=sys-libs/libcap-ng-0.7.0 - >=sys-libs/libseccomp-2.0.0 - >=sys-process/audit-2.7.7 - bash-completion? ( >=app-shells/bash-completion-2.0 ) - dbus? ( - dev-libs/glib:2 - sys-apps/dbus - policykit? ( sys-auth/polkit[introspection] ) - ) - ldap? ( net-nds/openldap ) - systemd? ( sys-apps/systemd ) - " -RDEPEND="${CDEPEND} - virtual/udev - " -DEPEND="${CDEPEND} - app-text/asciidoc - dev-cpp/catch:1 - dbus? ( - dev-libs/libxml2 - dev-libs/libxslt - dev-util/gdbus-codegen - ) - " - -RESTRICT="!test? ( test )" - -PATCHES=( - "${FILESDIR}"/${PN}-1.0.0-pthreads-link.patch -) - -src_prepare() { - default - eautoreconf -} - -src_configure() { - local myargs=( - $(use_with dbus) - $(use_with ldap) - $(use_with policykit polkit) - $(use_enable static-libs static) - $(use_enable systemd) - ) - - econf "${myargs[@]}" -} - -src_install() { - default - - keepdir /var/lib/log/usbguard - - newinitd "${FILESDIR}"/${PN}-0.7.6-usbguard.openrc usbguard - use dbus && newinitd "${FILESDIR}"/${PN}-0.7.6-usbguard-dbus.openrc usbguard-dbus -} - -pkg_postinst() { - ewarn - ewarn 'BEFORE STARTING USBGUARD please be sure to create/generate' - ewarn ' a rules file at /etc/usbguard/rules.conf' - ewarn ' so that you do not' - ewarn ' GET LOCKED OUT' - ewarn " of this system (\"$(hostname)\")." - ewarn - ewarn 'This command may be of help:' - ewarn ' sudo sh -c "usbguard generate-policy > /etc/usbguard/rules.conf"' - ewarn -} |