[oe] [meta-oe][PATCH 2/2] usbguard: Initial recipe

Ayoub Zaki ayoub.zaki at embexus.com
Sun Jul 21 18:43:37 UTC 2019


Hi,

On 21.07.19 20:27, Khem Raj wrote:
>
> On 7/21/19 11:06 AM, Ayoub Zaki wrote:
>> Introduce the USBGuard software framework that helps to protect 
>> against rogue USB devices (a.k.a. BadUSB)
>> by implementing basic whitelisting and blacklisting capabilities 
>> based on device attributes.
>>
>> Signed-off-by: Ayoub Zaki <ayoub.zaki at embexus.com>
>> ---
>>   .../usbguard/usbguard_0.7.4.bb                | 37 +++++++++++++++++++
>>   1 file changed, 37 insertions(+)
>>   create mode 100644 meta-oe/recipes-security/usbguard/usbguard_0.7.4.bb
>>
>> diff --git a/meta-oe/recipes-security/usbguard/usbguard_0.7.4.bb 
>> b/meta-oe/recipes-security/usbguard/usbguard_0.7.4.bb
>> new file mode 100644
>> index 000000000..a77694cc3
>> --- /dev/null
>> +++ b/meta-oe/recipes-security/usbguard/usbguard_0.7.4.bb
>> @@ -0,0 +1,37 @@
>> +DESCRIPTION="USBGuard framework helps to protect against BadUSB."
>> +HOMEPAGE="https://github.com/dkopecek/usbguard"
>> +LICENSE="GPLv2"
>> +LIC_FILES_CHKSUM = 
>> "file://LICENSE;md5=8264535c0c4e9c6c335635c4026a8022"
>> +
>> +SRC_URI="https://github.com/USBGuard/usbguard/archive/${PN}-${PV}.tar.gz" 
>>
>
> Its better to use BP instead of PN-PV do it will work with multilib as 
> well


Okay.

>
>> +SRC_URI[md5sum] = "ddaa9ae884200c861ad946f34dfd5ab9"
>> +SRC_URI[sha256sum] = 
>> "d37886508583565aae0df6a110b11524c59b39e0deb25ee49fc34274e4784f55"
>> +
>> +inherit autotools pkgconfig systemd bash-completion
>> +
>> +S= "${WORKDIR}/${PN}-${PN}-${PV}"
>
> this should also be ${BPN}-${BP}


I'll fix that and resend a v2.


Thanks!


>
>> +
>> +DEPENDS = "protobuf-native libxml2-native libxslt-native 
>> xmlto-native glib-2.0-native \
>> +    dbus dbus-glib libqb libseccomp libcap-ng libgcrypt libsodium 
>> protobuf pegtl"
>> +
>> +EXTRA_OECONF += "--with-bundled-catch"
>> +
>> +PACKAGECONFIG ??= "libsodium \
>> +    ${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)} \
>> +    ${@bb.utils.filter('DISTRO_FEATURES', 'polkit', d)}"
>> +
>> +PACKAGECONFIG[systemd]   = "--enable-systemd,--disable-systemd"
>> +PACKAGECONFIG[libsodium] = "--with-crypto-library=sodium"
>> +PACKAGECONFIG[libgcrypt] = "--with-crypto-library=gcrypt"
>> +PACKAGECONFIG[polkit]    = "--with-polkit,--without-polkit"
>> +PACKAGECONFIG[dbus]      = "--with-dbus,--without-dbus"
>> +
>> +SYSTEMD_SERVICE_${PN} = "${PN}.service"
>> +SYSTEMD_PACKAGES += "${PN}"
>> +
>> +
>> +do_install_append(){
>> +
>> +    sed -i 
>> 's|/var/log/usbguard/usbguard-audit.log|/var/log/usbguard-audit.log|g' \
>> + ${D}${sysconfdir}/usbguard/usbguard-daemon.conf
>> +}

Mit freundlichen Grüßen / Kind regards

-- 
Ayoub Zaki
Embedded Systems Consultant

Vaihinger Straße 2/1
D-71634 Ludwigsburg

Mobile   : +4917662901545
Email    : ayoub.zaki at embexus.com
Homepage : https://embexus.com
VAT No.  : DE313902634



More information about the Openembedded-devel mailing list