diff options
author | Ricardo Salveti <ricardo@opensourcefoundries.com> | 2018-05-04 23:03:21 -0300 |
---|---|---|
committer | Ricardo Salveti <ricardo@opensourcefoundries.com> | 2018-06-12 17:06:10 -0300 |
commit | ca9c09e6550c31ec757d8d105195bc73810abc90 (patch) | |
tree | 2c1a267f4aa5cd710ce8b0349378dbd55626519a /recipes-sota/ostree | |
parent | 776453012bce95eb3d8b5a8aea1f1c368bc8900a (diff) | |
download | meta-updater-ca9c09e6550c31ec757d8d105195bc73810abc90.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/ostree')
-rw-r--r-- | recipes-sota/ostree/ostree_git.bb | 22 |
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" | |||
17 | BBCLASSEXTEND = "native" | 17 | BBCLASSEXTEND = "native" |
18 | 18 | ||
19 | DEPENDS += "attr libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz" | 19 | DEPENDS += "attr libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz" |
20 | DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" | 20 | DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
21 | RDEPENDS_${PN} = "bash" | 21 | RDEPENDS_${PN} = "bash" |
22 | 22 | ||
23 | CFLAGS_append = " -Wno-error=missing-prototypes" | 23 | CFLAGS_append = " -Wno-error=missing-prototypes" |
24 | EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup" | 24 | EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup" |
25 | EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" | 25 | EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" |
26 | 26 | ||
27 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | ||
28 | PACKAGECONFIG[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 |
29 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" | 32 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" |
30 | SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" | 33 | SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" |
31 | do_configure[vardeps] += "SYSROOT_DIR" | 34 | do_configure[vardeps] += "SYSROOT_DIR" |
32 | 35 | ||
33 | SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" | ||
34 | |||
35 | SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service" | 36 | SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service" |
36 | 37 | ||
37 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
38 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut" | ||
39 | |||
40 | FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" | 38 | FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" |
41 | 39 | ||
42 | export BUILD_SYS | 40 | export 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 | ||
52 | export SYSTEMD_REQUIRED | ||
53 | |||
54 | do_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 | |||
61 | do_install_append_class-native() { | 50 | do_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 | ||
66 | FILES_${PN} += " \ | 55 | FILES_${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 \ |