Bug#961374: usbguard: please provide the libusbguard public development files

2020-06-06 Thread Pino Toscano
Hi,

In data sabato 23 maggio 2020 21:05:13 CEST, Birger Schacht ha scritto:
> On 5/23/20 8:12 PM, Pino Toscano wrote:
> > Hi,
> > 
> > it would be nice to have a libusbguard-dev package providing the
> > development files for libusbguard0. Upstream already installs them,
> > so it is matter of shipping them in a new libusbguard-dev package.
> > This way 3rd party applications can be built using the shared
> > libusbguard library.
> 
> Upstream does not consider the API to be stable, thats why we're
> installing to a private location for now and therefore not shipping
> development files.

Hmm interesting, as on other distributions (Fedora, openSUSE, Gentoo
and Arch Linux, I checked) they are available.

> Also I'm not aware of any other projects besides
> upstream using the usbguard library. Are there any 3rd party
> applications? That might change things...

I revived the Qt applet [1] that upstream removed, since there is no
other GUI equivalent other than GNOME Shell (so not an option for
whoever does not use it).

An item in my TODO list is get rid of the library, which I already
started to do (i.e. the communication is done via usbguard-dbus instead
of the IPC). The other usages of the library are:
- logging (should be easy)
- parsing the rules, which is a non-trivial task (given their syntax)

[1] https://github.com/pinotree/usbguard-applet-qt/

So up to you: I can live with a locally built src:usbguard that
provides libusbguard-dev until I need it.

-- 
Pino Toscano

signature.asc
Description: This is a digitally signed message part.


Bug#961374: usbguard: please provide the libusbguard public development files

2020-05-23 Thread Birger Schacht
Hi,

On 5/23/20 8:12 PM, Pino Toscano wrote:
> Hi,
> 
> it would be nice to have a libusbguard-dev package providing the
> development files for libusbguard0. Upstream already installs them,
> so it is matter of shipping them in a new libusbguard-dev package.
> This way 3rd party applications can be built using the shared
> libusbguard library.

Upstream does not consider the API to be stable, thats why we're
installing to a private location for now and therefore not shipping
development files. Also I'm not aware of any other projects besides
upstream using the usbguard library. Are there any 3rd party
applications? That might change things...

cheers,
Birger



signature.asc
Description: OpenPGP digital signature


Bug#961374: usbguard: please provide the libusbguard public development files

2020-05-23 Thread Pino Toscano
Source: usbguard
Version: 0.7.6+ds-2
Severity: wishlist
Tags: patch

Hi,

it would be nice to have a libusbguard-dev package providing the
development files for libusbguard0. Upstream already installs them,
so it is matter of shipping them in a new libusbguard-dev package.
This way 3rd party applications can be built using the shared
libusbguard library.

Attached there are the following patches to do so:
- public-libusbguard.diff: do not move libusbguard to a private
  location, as exposing its devel stuff will make it public again;
  note that this patch requires removing the executable permissions
  from debian/libusbguard0.install (i.e. chmod -x), as this file is
  no more processed using dh-exec (not need for it)
- libusbguard-dev.diff: add a new libusbguard-dev package containing
  the development files

Thanks,
-- 
Pino
--- a/debian/libusbguard0.install
+++ b/debian/libusbguard0.install
@@ -1,2 +1,2 @@
-#! /usr/bin/dh-exec
-usr/lib/*/libusbguard.so.* usr/lib/${DEB_HOST_MULTIARCH}/usbguard/
+usr/lib/*/libusbguard.so.0
+usr/lib/*/libusbguard.so.0.*
--- a/debian/control
+++ b/debian/control
@@ -49,6 +49,17 @@ Description: USB device authorization po
  .
  This package contains the shared library
 
+Package: libusbguard-dev
+Section: libdevel
+Architecture: linux-any
+Depends: ${misc:Depends}, libusbguard0 (= ${binary:Version}), libqb-dev
+Description: USB device authorization policy framework - development files
+ The USBGuard software framework helps to protect your computer against rogue
+ USB devices (a.k.a. BadUSB) by implementing basic allow- and blocklisting
+ capabilities based on device attributes.
+ .
+ This package contains the development files for the shared library.
+
 Package: usbguard
 Architecture: linux-any
 Depends: ${misc:Depends}, ${shlibs:Depends}, dbus
--- /dev/null
+++ b/debian/libusbguard-dev.install
@@ -0,0 +1,4 @@
+usr/include/usbguard/
+usr/lib/*/libusbguard.a
+usr/lib/*/libusbguard.so
+usr/lib/*/pkgconfig/libusbguard.pc