Compare commits

..

1 commit

Author SHA1 Message Date
alakatos
b46802291b Rebase to 1.1.3
selinux package policy update
  Resolves: rhbz#2271330
2024-07-09 13:10:51 +02:00
6 changed files with 28 additions and 90 deletions

1
.gitignore vendored
View file

@ -24,4 +24,3 @@
/usbguard-1.1.2.tar.gz
/usbguard-1.1.3.tar.gz
/usbguard-selinux-0.0.5.tar.gz
/usbguard-1.1.4.tar.gz

View file

@ -1,14 +0,0 @@
diff --git a/usbguard.fc b/usbguard.fc
index d8cfa45..3904962 100644
--- a/usbguard.fc
+++ b/usbguard.fc
@@ -18,7 +18,9 @@
/etc/usbguard/rules\.conf -- gen_context(system_u:object_r:usbguard_rules_t,s0)
/etc/usbguard(/.*)? gen_context(system_u:object_r:usbguard_conf_t,s0)
/usr/lib/systemd/system/usbguard.* -- gen_context(system_u:object_r:usbguard_unit_file_t,s0)
+/usr/bin/usbguard-daemon -- gen_context(system_u:object_r:usbguard_exec_t,s0)
/usr/sbin/usbguard-daemon -- gen_context(system_u:object_r:usbguard_exec_t,s0)
+/usr/bin/usbguard-dbus -- gen_context(system_u:object_r:usbguard_exec_t,s0)
/usr/sbin/usbguard-dbus -- gen_context(system_u:object_r:usbguard_exec_t,s0)
/var/log/usbguard(/.*)? gen_context(system_u:object_r:usbguard_log_t,s0)
/run/usbguard.* -- gen_context(system_u:object_r:usbguard_var_run_t,s0)

View file

@ -1,14 +0,0 @@
diff --git a/usbguard.te b/usbguard.te
index 52d0090..f8e55bc 100644
--- a/usbguard.te
+++ b/usbguard.te
@@ -133,3 +133,9 @@ ifdef(`systemd_userdbd_stream_connect',`
systemd_userdbd_stream_connect(usbguard_t)
')
')
+
+ifdef(`systemd_homed_stream_connect',`
+ optional_policy(`
+ systemd_homed_stream_connect(usbguard_t)
+ ')
+')

View file

@ -1,2 +1,2 @@
SHA512 (usbguard-1.1.4.tar.gz) = d4f588ff97cb9529d9f8c7664998fbfc55fc6e5ddeaad8da3a7e4703e5de0c1b74871763d46ef558458258bbda71bbb47ebc9b4daf67bd9a3d1da015ea48fe61
SHA512 (usbguard-1.1.3.tar.gz) = 530bfea12ec8497c30d530c73f868207aad8b0e0e917cb7c7506f6148681a6a4ff12de5cddcfea458eb2b91ce8bb8b0e68d42e2590a4dc6b15f43c18f8256cf1
SHA512 (usbguard-selinux-0.0.5.tar.gz) = 72b12e6a44dddfd863909f82e288170f935c4e941cb65678cd544fd0fa33ecce0a794c4b620dea9f496a45f2035d3b3b6dde662319db200eaff38e26999c4496

View file

@ -0,0 +1,17 @@
diff -up ./configure.ac.fix ./configure.ac
--- ./configure.ac.fix 2022-03-03 15:05:03.357194713 +0100
+++ ./configure.ac 2022-03-03 15:06:02.849787794 +0100
@@ -394,11 +394,11 @@ if test "x$with_bundled_catch" = xyes; t
catch_summary="bundled; $catch_CFLAGS $catch_LIBS"
else
SAVE_CPPFLAGS=$CPPFLAGS
- CPPFLAGS="-std=c++17 $CPPFLAGS -I/usr/include/catch2"
+ CPPFLAGS="-std=c++17 $CPPFLAGS -I/usr/include/catch"
AC_LANG_PUSH([C++])
AC_CHECK_HEADER([catch.hpp], [], [AC_MSG_FAILURE(catch.hpp not found or not usable. Re-run with --with-bundled-catch to use the bundled library.)])
AC_LANG_POP
- catch_CFLAGS="-I/usr/include/catch2"
+ catch_CFLAGS="-I/usr/include/catch"
catch_LIBS=""
CPPFLAGS=$SAVE_CPPFLAGS
catch_summary="system-wide; $catch_CFLAGS $catch_LIBS"

View file

@ -3,8 +3,8 @@
%define semodule_version 0.0.5
Name: usbguard
Version: 1.1.4
Release: 6%{?dist}
Version: 1.1.3
Release: 1%{?dist}
Summary: A tool for implementing USB device usage policy
License: GPL-2.0-or-later
## Not installed
@ -28,10 +28,11 @@ BuildRequires: make
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: libqb-devel
BuildRequires: openssl-devel
BuildRequires: libgcrypt-devel
BuildRequires: libstdc++-devel
BuildRequires: protobuf-devel protobuf-compiler
BuildRequires: PEGTL-static
BuildRequires: catch1-devel
BuildRequires: autoconf automake libtool
BuildRequires: bash-completion
BuildRequires: asciidoc
@ -39,8 +40,7 @@ BuildRequires: audit-libs-devel
# For `pkg-config systemd` only
BuildRequires: systemd
Patch0: selinux-bin-sbin.patch
Patch1: selinux-homed.patch
Patch1: usbguard-revert-catch.patch
%description
The USBGuard software framework helps to protect your computer against rogue USB
@ -102,10 +102,7 @@ daemon.
# selinux
%setup -q -D -T -a 1
pushd %{name}-selinux-%{semodule_version}
%patch -P 0 -p1
%patch -P 1 -p1
popd
%patch -P 1 -p1 -b .catch
# Remove bundled library sources before build
rm -rf src/ThirdParty/{Catch,PEGTL}
@ -120,8 +117,7 @@ autoreconf -i -v --no-recursive ./
--enable-systemd \
--with-dbus \
--with-polkit \
--with-crypto-library=openssl \
--disable-catch
--with-crypto-library=gcrypt
make %{?_smp_mflags}
@ -130,6 +126,9 @@ pushd %{name}-selinux-%{semodule_version}
make
popd
%check
make check
# selinux
%pre selinux
%selinux_relabel_pre -s %{selinuxtype}
@ -181,7 +180,6 @@ find %{buildroot} \( -name '*.la' -o -name '*.a' \) -exec rm -f {} ';'
%{_datadir}/man/man5/usbguard-rules.conf.5.gz
%{_datadir}/man/man1/usbguard.1.gz
%{_datadir}/bash-completion/completions/usbguard
%attr(640,root,root) %{_tmpfilesdir}/usbguard.conf
%files devel
%{_includedir}/*
@ -227,56 +225,8 @@ fi
%changelog
* Fri Jul 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.4-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
* Wed Jun 24 2026 Benjamin A. Beasley <code@musicinmybrain.net> - 1.1.4-5
- Rebuilt for abseil-cpp 20260526.0
* Mon Jun 22 2026 Yaakov Selkowitz <yselkowi@redhat.com> - 1.1.4-4
- Rebuilt for openssl 4.0
* Wed Jun 10 2026 Yaakov Selkowitz <yselkowi@redhat.com> - 1.1.4-3
- Use openssl for crypto
* Fri May 29 2026 Miroslav Suchy <msuchy@redhat.com> - 1.1.4-2
- rebuild for https://fedoraproject.org/wiki/Changes/Protobuf_5.x/6.x
* Wed Apr 15 2026 Attila Lakatos <alakatos@redhat.com> - 1.1.4-1
- Rebase to 1.1.4
- Drop patches merged upstream: tmpfiles-v1, tmpfiles-v2,
uninstall-ignore-error, ipc-privileges, protobuf-3.0,
catch2-support, disable-catch
- Add SELinux policy fix for systemd-homed stream connect
Resolves: rhbz#2380396
Resolves: rhbz#2376283
* Sat Jan 17 2026 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Thu Apr 24 2025 Attila Lakatos <alakatos@redhat.com> - 1.1.3-5
- Fix usbguard-tmpfiles.conf
- Remove catch1 dependency
- Adapt for protobuf api changes
- Fix regression in specifying IPC privileges using UID
- selinux subpackage update: unified bin and sbin
Resolves: rhbz#2297169
* Thu Feb 06 2025 Attila Lakatos <alakatos@redhat.com> - 1.1.3-4
- Install usbguard-tmpfles.conf
* Sun Jan 19 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sat Jul 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Fri Jun 07 2024 Attila Lakatos <alakatos@redhat.com> - 1.1.3-1
- Rebase to 1.1.3
Resolves: rhbz#2290724
- selinux package policy update
Resolves: rhbz#2271330