diff --git a/.gitignore b/.gitignore index 4efb048..fafb250 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/usbguard-0.3p3.tar.gz -/usbguard-0.4.tar.gz +/usbguard-0.5.10.tar.gz diff --git a/sources b/sources index 5bed451..e2df33c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -cdbfb66e672c0f5833f11fec05e20d61 usbguard-0.4.tar.gz +091530849272754092cf9de2e432ec86 usbguard-0.5.10.tar.gz diff --git a/usbguard.service b/usbguard.service deleted file mode 100644 index 4a51113..0000000 --- a/usbguard.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=USBGuard daemon -Wants=systemd-udevd.service local-fs.target - -[Service] -Type=simple -ExecStart=/usr/sbin/usbguard-daemon -k -c /etc/usbguard/usbguard-daemon.conf -Restart=on-failure - -[Install] -WantedBy=base.target diff --git a/usbguard.spec b/usbguard.spec index a0eb456..c614957 100644 --- a/usbguard.spec +++ b/usbguard.spec @@ -1,8 +1,8 @@ %global _hardened_build 1 Name: usbguard -Version: 0.4 -Release: 5%{?dist} +Version: 0.5.10 +Release: 1%{?dist} Summary: A tool for implementing USB device usage policy Group: System Environment/Daemons License: GPLv2+ @@ -11,7 +11,6 @@ License: GPLv2+ URL: https://dkopecek.github.io/usbguard Source0: https://dkopecek.github.io/usbguard/dist/%{name}-%{version}.tar.gz Source1: usbguard-daemon.conf -Source2: usbguard.service Requires: systemd Requires(post): systemd @@ -26,6 +25,16 @@ BuildRequires: systemd systemd-devel BuildRequires: libstdc++-devel BuildRequires: json-static BuildRequires: spdlog-static +BuildRequires: qt5-qtbase-devel +BuildRequires: dbus-glib-devel +BuildRequires: dbus-devel +BuildRequires: glib2-devel +BuildRequires: polkit-devel +BuildRequires: libxslt +BuildRequires: libxml2 +BuildRequires: catch-devel +BuildRequires: autoconf automake libtool +BuildRequires: pandoc %description The USBGuard software framework helps to protect your computer against rogue USB @@ -52,34 +61,58 @@ Requires: %{name} = %{version}-%{release} The %{name}-tools package contains optional tools from the USBGuard software framework. +%package applet-qt +Summary: USBGuard Qt 5.x Applet +Group: Applications/System +Requires: %{name} = %{version}-%{release} +Obsoletes: usbguard-applet-qt <= 0.3 + +%description applet-qt +The %{name}-applet-qt package contains an optional Qt 5.x desktop applet +for interacting with the USBGuard daemon component. + +%package dbus +Summary: USBGuard D-Bus Service +Group: Applications/System +Requires: %{name} = %{version}-%{release} +Requires: dbus +Requires: polkit + +%description dbus +The %{name}-dbus package contains an optional component that provides +a D-Bus interface to the USBGuard daemon component. + %prep %setup -q # Remove bundled library sources before build -rm -rf src/ThirdParty/{json,spdlog} +rm -rf src/ThirdParty/{json,spdlog,Catch} %build +mkdir -p ./m4 +autoreconf -i -v --no-recursive ./ %configure \ --disable-silent-rules \ --disable-static \ --without-bundled-json \ - --without-bundled-spdlog + --without-bundled-spdlog \ + --without-bundled-catch \ + --enable-systemd \ + --with-gui-qt5 \ + --with-dbus \ + --with-polkit make %{?_smp_mflags} %check -make check +make check || (cat src/Tests/test-suite.log && exit 1) %install make install INSTALL='install -p' DESTDIR=%{buildroot} -# Install configuration +# Overwrite configuration with distribution defaults mkdir -p %{buildroot}%{_sysconfdir}/usbguard install -p -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/usbguard/usbguard-daemon.conf -# Install systemd unit -mkdir -p %{buildroot}%{_unitdir} -install -p -m 644 %{SOURCE2} %{buildroot}%{_unitdir}/usbguard.service - # Cleanup find %{buildroot} -name '*.la' -exec rm -f {} ';' @@ -119,7 +152,35 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';' %defattr(-,root,root,-) %{_bindir}/usbguard-rule-parser +%files applet-qt +%defattr(-,root,root,-) +%{_bindir}/usbguard-applet-qt +%{_mandir}/man1/usbguard-applet-qt.1.gz +%{_datadir}/applications/usbguard-applet-qt.desktop +%{_datadir}/icons/hicolor/scalable/apps/usbguard-icon.svg + +%files dbus +%defattr(-,root,root,-) +%{_sbindir}/usbguard-dbus +%{_datadir}/dbus-1/system-services/org.usbguard.service +%{_datadir}/dbus-1/system.d/org.usbguard.conf +%{_datadir}/polkit-1/actions/org.usbguard.policy +%{_unitdir}/usbguard-dbus.service + +%preun dbus +%systemd_preun usbguard-dbus.service + +%post dbus +%systemd_post usbguard-dbus.service + +%postun dbus +%systemd_postun_with_restart usbguard-dbus.service + + %changelog +* Sat Jul 09 2016 Daniel Kopecek 0.5.10-1 +- Update to release 0.5.10 + * Mon Mar 07 2016 Remi Collet - 0.4-5 - rebuild for new libsodium soname