Skip to contentSkip to conversation

recipes-utils: Add recipe for udevil

PATCH In review Krzysztof Kozlowski 3 participants 7 messages Jul 9, 2017 – Jul 13, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 recipes-utils: Add recipe for udevil

udevil is a command line Linux program which mounts and unmounts removable devices without a password.

---
 .../0001-udevil-0.4.3-fix-compile-with-gcc6.patch  | 12 ++++++++++
 .../recipes-utils/udevil/udevil_0.4.4.bb           | 28 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch
 create mode 100644 meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb
meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch new file +12 -0
new file mode 100644
index 000000000000..355e93a37b3b
@@ -0,0 +1,12 @@
+Fix compilation with GCC6
+
+--- a/src/device-info.c	2013-12-09 14:59:27.000000000 +0100
++++ b/src/device-info.c	2017-03-13 07:06:25.506666680 +0100
+@@ -3,6 +3,7 @@
+  * contains code excerpts from udisks v1.0.4
+ ************************************************************************** */
+ 
++#include <sys/stat.h>
+ #include "device-info.h"
+ 
+ static char *
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +28 -0
new file mode 100644
index 000000000000..4ad4a09ed717
@@ -0,0 +1,28 @@
+SUMMARY = "A command line Linux program which mounts and unmounts removable devices"
+HOMEPAGE = "http://ignorantguru.github.io/udevil/"
+
+DEPENDS = "glib-2.0 \
+           glib-2.0-native \
+           intltool-native \
+           udev \
+"
+RDEPENDS_${PN} = "glib-2.0 \
+                  udev \
+"
+
+LICENSE = "GPL-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools pkgconfig systemd
+
+SRC_URI = "https://github.com/IgnorantGuru/udevil/raw/pkg/${PV}/udevil-${PV}.tar.xz \
+           file://0001-udevil-0.4.3-fix-compile-with-gcc6.patch \
+"
+
+SRC_URI[md5sum] = "dc1c489b603a0500a04dc7e1805ac1d9"
+SRC_URI[sha256sum] = "ce8c51fd4d589cda7be56e75b42188deeb258c66fc911a9b3a70a3945c157739"
+
+SYSTEMD_SERVICE_${PN} = "[email protected]"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+FILES_${PN} += " ${libdir}/systemd/system/[email protected]"
Signature · 1 line
2.11.0
#1 lore raw

Please use 4 spaces for indentation and the service file doesn't exist causing build to fail as in:
http://errors.yoctoproject.org/Errors/Details/147258/

Quoted 82 lines · Krzysztof Kozlowski

udevil is a command line Linux program which mounts and unmounts removable devices without a password.

---
 .../0001-udevil-0.4.3-fix-compile-with-gcc6.patch  | 12 ++++++++++
 .../recipes-utils/udevil/udevil_0.4.4.bb           | 28
++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 meta-filesystems/recipes-utils/udevil/files/0001-
udevil-0.4.3-fix-compile-with-gcc6.patch
 create mode 100644 meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb
(quoted diff) +0 -0

udevil-0.4.3-fix-compile-with-gcc6.patch b/meta-filesystems/recipes- utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch new file mode 100644
index 000000000000..355e93a37b3b

meta-filesystems/recipes-utils/udevil/files/0001- new file +0 -0

udevil-0.4.3-fix-compile-with-gcc6.patch

meta-filesystems/recipes-utils/udevil/files/0001- new file +7 -0
@@ -0,0 +1,12 @@
+Fix compilation with GCC6
+
+--- a/src/device-info.c        2013-12-09 14:59:27.000000000 +0100
++++ b/src/device-info.c        2017-03-13 07:06:25.506666680 +0100
+@@ -3,6 +3,7 @@
+  * contains code excerpts from udisks v1.0.4
+ **************************************************************************

*/

meta-filesystems/recipes-utils/udevil/files/0001- new file +5 -0
+
++#include <sys/stat.h>
+ #include "device-info.h"
+
+ static char *
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +1 -0
new file mode 100644
index 000000000000..4ad4a09ed717
@@ -0,0 +1,28 @@
+SUMMARY = "A command line Linux program which mounts and unmounts

removable devices"

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +17 -0
+HOMEPAGE = "http://ignorantguru.github.io/udevil/"
+
+DEPENDS = "glib-2.0 \
+           glib-2.0-native \
+           intltool-native \
+           udev \
+"
+RDEPENDS_${PN} = "glib-2.0 \
+                  udev \
+"
+
+LICENSE = "GPL-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools pkgconfig systemd
+
+SRC_URI = "https://github.com/IgnorantGuru/udevil/raw/pkg/${

PV}/udevil-${PV}.tar.xz \

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +5 -0
+           file://0001-udevil-0.4.3-fix-compile-with-gcc6.patch \
+"
+
+SRC_URI[md5sum] = "dc1c489b603a0500a04dc7e1805ac1d9"
+SRC_URI[sha256sum] = "ce8c51fd4d589cda7be56e75b42188

deeb258c66fc911a9b3a70a3945c157739"

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +5 -1
+
+SYSTEMD_SERVICE_${PN} = "[email protected]"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+FILES_${PN} += " ${libdir}/systemd/system/[email protected]"
--

2.11.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#2 lore raw
Quoted 1 line · Martin Jansa

Please use 4 spaces for indentation

Sure, I'll fix it.

Quoted 3 lines

and the service file doesn't exist
causing build to fail as in:
http://errors.yoctoproject.org/Errors/Details/147258/

Weird... It builds fine on core-image-minimal and sato. Also, after building sato I can see it under /usr/lib/systemd/system/[email protected]

Best regards,
Krzysztof

Quoted 85 lines · Krzysztof Kozlowski
Quoted 83 lines

udevil is a command line Linux program which mounts and unmounts removable devices without a password.

---
 .../0001-udevil-0.4.3-fix-compile-with-gcc6.patch  | 12 ++++++++++
 .../recipes-utils/udevil/udevil_0.4.4.bb           | 28
++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 meta-filesystems/recipes-utils/udevil/files/0001-
udevil-0.4.3-fix-compile-with-gcc6.patch
 create mode 100644 meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb
(quoted diff) +0 -0

udevil-0.4.3-fix-compile-with-gcc6.patch b/meta-filesystems/recipes- utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch new file mode 100644
index 000000000000..355e93a37b3b

meta-filesystems/recipes-utils/udevil/files/0001- new file +0 -0

udevil-0.4.3-fix-compile-with-gcc6.patch

meta-filesystems/recipes-utils/udevil/files/0001- new file +7 -0
@@ -0,0 +1,12 @@
+Fix compilation with GCC6
+
+--- a/src/device-info.c        2013-12-09 14:59:27.000000000 +0100
++++ b/src/device-info.c        2017-03-13 07:06:25.506666680 +0100
+@@ -3,6 +3,7 @@
+  * contains code excerpts from udisks v1.0.4
+ **************************************************************************

*/

meta-filesystems/recipes-utils/udevil/files/0001- new file +5 -0
+
++#include <sys/stat.h>
+ #include "device-info.h"
+
+ static char *
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +1 -0
new file mode 100644
index 000000000000..4ad4a09ed717
@@ -0,0 +1,28 @@
+SUMMARY = "A command line Linux program which mounts and unmounts

removable devices"

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +17 -0
+HOMEPAGE = "http://ignorantguru.github.io/udevil/"
+
+DEPENDS = "glib-2.0 \
+           glib-2.0-native \
+           intltool-native \
+           udev \
+"
+RDEPENDS_${PN} = "glib-2.0 \
+                  udev \
+"
+
+LICENSE = "GPL-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools pkgconfig systemd
+
+SRC_URI = "https://github.com/IgnorantGuru/udevil/raw/pkg/${

PV}/udevil-${PV}.tar.xz \

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +5 -0
+           file://0001-udevil-0.4.3-fix-compile-with-gcc6.patch \
+"
+
+SRC_URI[md5sum] = "dc1c489b603a0500a04dc7e1805ac1d9"
+SRC_URI[sha256sum] = "ce8c51fd4d589cda7be56e75b42188

deeb258c66fc911a9b3a70a3945c157739"

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +5 -1
+
+SYSTEMD_SERVICE_${PN} = "[email protected]"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+FILES_${PN} += " ${libdir}/systemd/system/[email protected]"
--

2.11.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#3 lore raw
In reply to Krzysztof Kozlowski
Quoted 35 lines · Krzysztof Kozlowski

udevil is a command line Linux program which mounts and unmounts removable devices without a password.

---
 .../0001-udevil-0.4.3-fix-compile-with-gcc6.patch  | 12 ++++++++++
 .../recipes-utils/udevil/udevil_0.4.4.bb           | 28 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch
 create mode 100644 meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb
meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch new file +12 -0
new file mode 100644
index 000000000000..355e93a37b3b
@@ -0,0 +1,12 @@
+Fix compilation with GCC6
+
+--- a/src/device-info.c        2013-12-09 14:59:27.000000000 +0100
++++ b/src/device-info.c        2017-03-13 07:06:25.506666680 +0100
+@@ -3,6 +3,7 @@
+  * contains code excerpts from udisks v1.0.4
+ ************************************************************************** */
+
++#include <sys/stat.h>
+ #include "device-info.h"
+
+ static char *
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +0 -0
new file mode 100644
index 000000000000..4ad4a09ed717

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb line 10

Quoted 10 lines
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +10 -0
@@ -0,0 +1,28 @@
+SUMMARY = "A command line Linux program which mounts and unmounts removable devices"
+HOMEPAGE = "http://ignorantguru.github.io/udevil/"
+
+DEPENDS = "glib-2.0 \
+           glib-2.0-native \
+           intltool-native \
+           udev \
+"
+RDEPENDS_${PN} = "glib-2.0 \
+                  udev \

Runtime dependencies on libraries are detected automatically so explicitly setting RDEPENDS like this shouldn't be required.

Quoted 8 lines
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +8 -0
+"
+
+LICENSE = "GPL-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools pkgconfig systemd
+
+SRC_URI = "https://github.com/IgnorantGuru/udevil/raw/pkg/${PV}/udevil-${PV}.tar.xz \

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb line 28

Quoted 10 lines
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +10 -0
+           file://0001-udevil-0.4.3-fix-compile-with-gcc6.patch \
+"
+
+SRC_URI[md5sum] = "dc1c489b603a0500a04dc7e1805ac1d9"
+SRC_URI[sha256sum] = "ce8c51fd4d589cda7be56e75b42188deeb258c66fc911a9b3a70a3945c157739"
+
+SYSTEMD_SERVICE_${PN} = "[email protected]"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+FILES_${PN} += " ${libdir}/systemd/system/[email protected]"

Setting SYSTEMD_SERVICE_${PN} should be enough to ensure that the service file gets packaged correctly, so explicitly adding it to FILES_${PN} like this shouldn't be required.

Quoted 8 lines

--
2.11.0

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#4 lore raw
Quoted 41 lines · Andre McCurdy
Quoted 40 lines · Krzysztof Kozlowski

udevil is a command line Linux program which mounts and unmounts removable devices without a password.

---
 .../0001-udevil-0.4.3-fix-compile-with-gcc6.patch  | 12 ++++++++++
 .../recipes-utils/udevil/udevil_0.4.4.bb           | 28 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch
 create mode 100644 meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb
meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch new file +12 -0
new file mode 100644
index 000000000000..355e93a37b3b
@@ -0,0 +1,12 @@
+Fix compilation with GCC6
+
+--- a/src/device-info.c        2013-12-09 14:59:27.000000000 +0100
++++ b/src/device-info.c        2017-03-13 07:06:25.506666680 +0100
+@@ -3,6 +3,7 @@
+  * contains code excerpts from udisks v1.0.4
+ ************************************************************************** */
+
++#include <sys/stat.h>
+ #include "device-info.h"
+
+ static char *
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +5 -0
new file mode 100644
index 000000000000..4ad4a09ed717
@@ -0,0 +1,28 @@
+SUMMARY = "A command line Linux program which mounts and unmounts removable devices"
+HOMEPAGE = "http://ignorantguru.github.io/udevil/"
+
+DEPENDS = "glib-2.0 \
+           glib-2.0-native \
Quoted 8 lines

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb line 10

Quoted 5 lines
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +5 -0
+           intltool-native \
+           udev \
+"
+RDEPENDS_${PN} = "glib-2.0 \
+                  udev \

Runtime dependencies on libraries are detected automatically so explicitly setting RDEPENDS like this shouldn't be required.

I'll remove glib then.

Quoted 15 lines
Quoted 15 lines
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +14 -0
+"
+
+LICENSE = "GPL-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools pkgconfig systemd
+
+SRC_URI = "https://github.com/IgnorantGuru/udevil/raw/pkg/${PV}/udevil-${PV}.tar.xz \
+           file://0001-udevil-0.4.3-fix-compile-with-gcc6.patch \
+"
+
+SRC_URI[md5sum] = "dc1c489b603a0500a04dc7e1805ac1d9"
+SRC_URI[sha256sum] = "ce8c51fd4d589cda7be56e75b42188deeb258c66fc911a9b3a70a3945c157739"
+
Quoted 8 lines

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb line 28

Quoted 4 lines
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +4 -0
+SYSTEMD_SERVICE_${PN} = "[email protected]"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+FILES_${PN} += " ${libdir}/systemd/system/[email protected]"

Setting SYSTEMD_SERVICE_${PN} should be enough to ensure that the service file gets packaged correctly, so explicitly adding it to FILES_${PN} like this shouldn't be required.

Without it, bitbake complains:
WARNING: udevil-0.4.4-r0 do_package: QA Issue: udevil: Files/directories were installed but not shipped in any package:
/usr/lib
/usr/lib/systemd
/usr/lib/systemd/system
/usr/lib/systemd/system/[email protected]

I wonder if this is related to differences in systemd in my build setting which are leading to error:
http://errors.yoctoproject.org/Errors/Details/147258/

I tried DISTRO=poky and DISTRO=nodistro and I cannot reproduce error above (with FILES both are working fine).

Other build settings are:

BB_VERSION        = "1.34.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "ubuntu-17.04"
TARGET_SYS        = "i586-oe-linux"
MACHINE           = "qemux86"
DISTRO            = "nodistro"
DISTRO_VERSION    = "nodistro.0"
TUNE_FEATURES     = "m32 i586"

Best regards,
Krzysztof

#5 lore raw
Quoted 84 lines · Krzysztof Kozlowski
Quoted 41 lines · Andre McCurdy
Quoted 40 lines · Krzysztof Kozlowski

udevil is a command line Linux program which mounts and unmounts removable devices without a password.

---
 .../0001-udevil-0.4.3-fix-compile-with-gcc6.patch  | 12 ++++++++++
 .../recipes-utils/udevil/udevil_0.4.4.bb           | 28 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch
 create mode 100644 meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb
meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch new file +12 -0
new file mode 100644
index 000000000000..355e93a37b3b
@@ -0,0 +1,12 @@
+Fix compilation with GCC6
+
+--- a/src/device-info.c        2013-12-09 14:59:27.000000000 +0100
++++ b/src/device-info.c        2017-03-13 07:06:25.506666680 +0100
+@@ -3,6 +3,7 @@
+  * contains code excerpts from udisks v1.0.4
+ ************************************************************************** */
+
++#include <sys/stat.h>
+ #include "device-info.h"
+
+ static char *
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +5 -0
new file mode 100644
index 000000000000..4ad4a09ed717
@@ -0,0 +1,28 @@
+SUMMARY = "A command line Linux program which mounts and unmounts removable devices"
+HOMEPAGE = "http://ignorantguru.github.io/udevil/"
+
+DEPENDS = "glib-2.0 \
+           glib-2.0-native \
Quoted 8 lines

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb line 10

Quoted 5 lines
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +5 -0
+           intltool-native \
+           udev \
+"
+RDEPENDS_${PN} = "glib-2.0 \
+                  udev \

Runtime dependencies on libraries are detected automatically so explicitly setting RDEPENDS like this shouldn't be required.

I'll remove glib then.

Quoted 15 lines
Quoted 15 lines
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +14 -0
+"
+
+LICENSE = "GPL-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools pkgconfig systemd
+
+SRC_URI = "https://github.com/IgnorantGuru/udevil/raw/pkg/${PV}/udevil-${PV}.tar.xz \
+           file://0001-udevil-0.4.3-fix-compile-with-gcc6.patch \
+"
+
+SRC_URI[md5sum] = "dc1c489b603a0500a04dc7e1805ac1d9"
+SRC_URI[sha256sum] = "ce8c51fd4d589cda7be56e75b42188deeb258c66fc911a9b3a70a3945c157739"
+
Quoted 8 lines

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb line 28

Quoted 4 lines
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +4 -0
+SYSTEMD_SERVICE_${PN} = "[email protected]"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+FILES_${PN} += " ${libdir}/systemd/system/[email protected]"

Setting SYSTEMD_SERVICE_${PN} should be enough to ensure that the service file gets packaged correctly, so explicitly adding it to FILES_${PN} like this shouldn't be required.

Without it, bitbake complains:
WARNING: udevil-0.4.4-r0 do_package: QA Issue: udevil: Files/directories were installed but not shipped in any package:
/usr/lib
/usr/lib/systemd
/usr/lib/systemd/system
/usr/lib/systemd/system/[email protected]

Quoted 3 lines

I wonder if this is related to differences in systemd in my build setting which are leading to error:
http://errors.yoctoproject.org/Errors/Details/147258/

It looks like udevil installs the service file in a hardcoded path under ${libdir} rather than respecting ${systemd_unitdir} as defined by the distro:

https://github.com/IgnorantGuru/udevil/blob/master/etc/Makefile.am
https://github.com/IgnorantGuru/udevil/tree/master/etc/systemd

so some patching or sed fix-ups and moving files in do_install() is going to be required to cover cases where the two don't align.

Quoted 2 lines

I tried DISTRO=poky and DISTRO=nodistro and I cannot reproduce error above (with FILES both are working fine).

If you look in meta/classes/systemd.bbclass -> systemd_check_services() you should see the paths which are searched to find the service files defined via SYSTEMD_SERVICE_${PN}. From there you should be able to determine why your build appears to find the service file somewhere in these search paths and doesn't hit the fatal error.

Quoted 13 lines

Other build settings are:

BB_VERSION        = "1.34.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "ubuntu-17.04"
TARGET_SYS        = "i586-oe-linux"
MACHINE           = "qemux86"
DISTRO            = "nodistro"
DISTRO_VERSION    = "nodistro.0"
TUNE_FEATURES     = "m32 i586"

Best regards,
Krzysztof

#6 lore raw
Quoted 102 lines · Andre McCurdy
Quoted 84 lines · Krzysztof Kozlowski
Quoted 41 lines · Andre McCurdy
Quoted 40 lines · Krzysztof Kozlowski

udevil is a command line Linux program which mounts and unmounts removable devices without a password.

---
 .../0001-udevil-0.4.3-fix-compile-with-gcc6.patch  | 12 ++++++++++
 .../recipes-utils/udevil/udevil_0.4.4.bb           | 28 ++++++++++++++++++++++
 2 files changed, 40 insertions(+)
 create mode 100644 meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch
 create mode 100644 meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb
meta-filesystems/recipes-utils/udevil/files/0001-udevil-0.4.3-fix-compile-with-gcc6.patch new file +12 -0
new file mode 100644
index 000000000000..355e93a37b3b
@@ -0,0 +1,12 @@
+Fix compilation with GCC6
+
+--- a/src/device-info.c        2013-12-09 14:59:27.000000000 +0100
++++ b/src/device-info.c        2017-03-13 07:06:25.506666680 +0100
+@@ -3,6 +3,7 @@
+  * contains code excerpts from udisks v1.0.4
+ ************************************************************************** */
+
++#include <sys/stat.h>
+ #include "device-info.h"
+
+ static char *
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +5 -0
new file mode 100644
index 000000000000..4ad4a09ed717
@@ -0,0 +1,28 @@
+SUMMARY = "A command line Linux program which mounts and unmounts removable devices"
+HOMEPAGE = "http://ignorantguru.github.io/udevil/"
+
+DEPENDS = "glib-2.0 \
+           glib-2.0-native \
Quoted 8 lines

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb line 10

Quoted 5 lines
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +5 -0
+           intltool-native \
+           udev \
+"
+RDEPENDS_${PN} = "glib-2.0 \
+                  udev \

Runtime dependencies on libraries are detected automatically so explicitly setting RDEPENDS like this shouldn't be required.

I'll remove glib then.

Quoted 15 lines
Quoted 15 lines
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +14 -0
+"
+
+LICENSE = "GPL-3.0"
+LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
+
+inherit autotools pkgconfig systemd
+
+SRC_URI = "https://github.com/IgnorantGuru/udevil/raw/pkg/${PV}/udevil-${PV}.tar.xz \
+           file://0001-udevil-0.4.3-fix-compile-with-gcc6.patch \
+"
+
+SRC_URI[md5sum] = "dc1c489b603a0500a04dc7e1805ac1d9"
+SRC_URI[sha256sum] = "ce8c51fd4d589cda7be56e75b42188deeb258c66fc911a9b3a70a3945c157739"
+
Quoted 8 lines

meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb line 28

Quoted 4 lines
meta-filesystems/recipes-utils/udevil/udevil_0.4.4.bb new file +4 -0
+SYSTEMD_SERVICE_${PN} = "[email protected]"
+SYSTEMD_AUTO_ENABLE = "disable"
+
+FILES_${PN} += " ${libdir}/systemd/system/[email protected]"

Setting SYSTEMD_SERVICE_${PN} should be enough to ensure that the service file gets packaged correctly, so explicitly adding it to FILES_${PN} like this shouldn't be required.

Without it, bitbake complains:
WARNING: udevil-0.4.4-r0 do_package: QA Issue: udevil: Files/directories were installed but not shipped in any package:
/usr/lib
/usr/lib/systemd
/usr/lib/systemd/system
/usr/lib/systemd/system/[email protected]

Quoted 3 lines

I wonder if this is related to differences in systemd in my build setting which are leading to error:
http://errors.yoctoproject.org/Errors/Details/147258/

It looks like udevil installs the service file in a hardcoded path under ${libdir} rather than respecting ${systemd_unitdir} as defined by the distro:

https://github.com/IgnorantGuru/udevil/blob/master/etc/Makefile.am
https://github.com/IgnorantGuru/udevil/tree/master/etc/systemd

so some patching or sed fix-ups and moving files in do_install() is going to be required to cover cases where the two don't align.

Quoted 2 lines

I tried DISTRO=poky and DISTRO=nodistro and I cannot reproduce error above (with FILES both are working fine).

Quoted 6 lines

If you look in meta/classes/systemd.bbclass -> systemd_check_services() you should see the paths which are searched to find the service files defined via SYSTEMD_SERVICE_${PN}. From there you should be able to determine why your build appears to find the service file somewhere in these search paths and doesn't hit the fatal error.

Thanks for hints! I found out that entire systemd_populate_packages() was ignored because of missing systemd feature. Now I have the same error as reported.

Best regards,
Krzysztof