summaryrefslogtreecommitdiffstats
path: root/recipes-sota
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo@opensourcefoundries.com>2018-05-04 23:03:21 -0300
committerPatrick Vacek <patrickvacek@gmail.com>2018-10-10 12:24:38 +0200
commit16dbe39af34a74576929bcf5ebebe66a10bfbc7a (patch)
tree0edc415ea55c8bbbe9aa9ada5dc0dd7d73e91aa9 /recipes-sota
parenta27a7fd041f99c9c4bd3d0a136fd4852ce76591a (diff)
downloadmeta-updater-16dbe39af34a74576929bcf5ebebe66a10bfbc7a.tar.gz
ostree: improve systemd dependency checks
No need to define SYSTEMD_REQUIRED and no need to manually install the service files, as that is already handled by ostree and the systemd bbclass. Signed-off-by: Ricardo Salveti <ricardo@opensourcefoundries.com>
Diffstat (limited to 'recipes-sota')
-rw-r--r--recipes-sota/ostree/ostree_git.bb22
1 files changed, 5 insertions, 17 deletions
diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb
index 58f30a7..dc31efe 100644
--- a/recipes-sota/ostree/ostree_git.bb
+++ b/recipes-sota/ostree/ostree_git.bb
@@ -17,26 +17,24 @@ S = "${WORKDIR}/git"
17BBCLASSEXTEND = "native" 17BBCLASSEXTEND = "native"
18 18
19DEPENDS += "attr libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz" 19DEPENDS += "attr libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz"
20DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" 20DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
21RDEPENDS_${PN} = "bash" 21RDEPENDS_${PN} = "bash"
22 22
23CFLAGS_append = " -Wno-error=missing-prototypes" 23CFLAGS_append = " -Wno-error=missing-prototypes"
24EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup" 24EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup"
25EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" 25EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat"
26 26
27PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
28PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut"
29
27# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the 30# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the
28# do_configure stage so we do depend on it 31# do_configure stage so we do depend on it
29SYSROOT_DIR = "${STAGING_DIR_TARGET}" 32SYSROOT_DIR = "${STAGING_DIR_TARGET}"
30SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" 33SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}"
31do_configure[vardeps] += "SYSROOT_DIR" 34do_configure[vardeps] += "SYSROOT_DIR"
32 35
33SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}"
34
35SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service" 36SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service"
36 37
37PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
38PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut"
39
40FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" 38FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild"
41 39
42export BUILD_SYS 40export BUILD_SYS
@@ -49,23 +47,13 @@ do_configure_prepend() {
49 NOCONFIGURE=1 "${S}/autogen.sh" 47 NOCONFIGURE=1 "${S}/autogen.sh"
50} 48}
51 49
52export SYSTEMD_REQUIRED
53
54do_install_append() {
55 if [ -n ${SYSTEMD_REQUIRED} ]; then
56 install -m 0644 -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service
57 install -m 0644 -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service
58 fi
59}
60
61do_install_append_class-native() { 50do_install_append_class-native() {
62 create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" 51 create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator"
63} 52}
64 53
65 54
66FILES_${PN} += " \ 55FILES_${PN} += " \
67 ${@'${systemd_unitdir}/system/' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \ 56 ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/dracut', '', d)} \
68 ${@'${libdir}/dracut/modules.d/98ostree/module-setup.sh' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \
69 ${datadir}/gir-1.0 \ 57 ${datadir}/gir-1.0 \
70 ${datadir}/gir-1.0/OSTree-1.0.gir \ 58 ${datadir}/gir-1.0/OSTree-1.0.gir \
71 ${libdir}/girepository-1.0 \ 59 ${libdir}/girepository-1.0 \