summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlbonn <lbonn@users.noreply.github.com>2018-06-14 16:20:39 +0200
committerGitHub <noreply@github.com>2018-06-14 16:20:39 +0200
commitbe03a3892ada47d7af797170f8c1fe98441fa43d (patch)
tree66ffa9fd34afc624dfbcb595b9cfa131158c2c0f
parent642559cd005076bc4f53fd066b8ce4a62be72864 (diff)
parentb7da9e5e9ef87c9679d0f81098657d1e4e6a0c01 (diff)
downloadmeta-updater-be03a3892ada47d7af797170f8c1fe98441fa43d.tar.gz
Merge pull request #336 from rsalveti/ostree
Ostree recipe cleanups
-rw-r--r--recipes-sota/ostree/ostree_git.bb87
1 files changed, 32 insertions, 55 deletions
diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb
index afb767f..6fa6ad4 100644
--- a/recipes-sota/ostree/ostree_git.bb
+++ b/recipes-sota/ostree/ostree_git.bb
@@ -1,10 +1,9 @@
1SUMMARY = "Tool for managing bootable, immutable, versioned filesystem trees" 1SUMMARY = "Tool for managing bootable, immutable, versioned filesystem trees"
2LICENSE = "GPLv2+" 2HOMEPAGE = "https://ostree.readthedocs.io/en/latest/"
3LICENSE = "LGPLv2+"
3LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" 4LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
4 5
5inherit autotools pkgconfig systemd gobject-introspection 6inherit autotools pkgconfig systemd bash-completion gobject-introspection
6
7INHERIT_remove_class-native = "systemd"
8 7
9SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master" 8SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master"
10 9
@@ -17,76 +16,54 @@ S = "${WORKDIR}/git"
17 16
18BBCLASSEXTEND = "native" 17BBCLASSEXTEND = "native"
19 18
20DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse e2fsprogs gtk-doc-native curl xz" 19DEPENDS += "attr libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz"
21DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" 20DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
22DEPENDS_remove_class-native = "systemd-native" 21RDEPENDS_${PN}-dracut = "bash"
23
24RDEPENDS_${PN} = "util-linux-libuuid util-linux-libblkid util-linux-libmount libcap bash"
25 22
26EXTRA_OECONF = "CFLAGS='-Wno-error=missing-prototypes' --with-libarchive --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup" 23CFLAGS_append = " -Wno-error=missing-prototypes"
24EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup"
27EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" 25EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat"
28 26
27PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
28PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut"
29
29# 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
30# do_configure stage so we do depend on it 31# do_configure stage so we do depend on it
31SYSROOT_DIR = "${STAGING_DIR_TARGET}" 32SYSROOT_DIR = "${STAGING_DIR_TARGET}"
32SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" 33SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}"
33do_configure[vardeps] += "SYSROOT_DIR" 34do_configure[vardeps] += "SYSROOT_DIR"
34 35
35SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}"
36SYSTEMD_REQUIRED_class-native = ""
37
38SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service" 36SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service"
39SYSTEMD_SERVICE_${PN}_class-native = ""
40
41PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
42PACKAGECONFIG_class-native = ""
43PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut"
44
45FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild"
46 37
38export BUILD_SYS
39export HOST_SYS
47export STAGING_INCDIR 40export STAGING_INCDIR
48export STAGING_LIBDIR 41export STAGING_LIBDIR
49 42
50do_configure() { 43do_configure_prepend() {
51 unset docdir 44 unset docdir
52 NOCONFIGURE=1 "${S}/autogen.sh" 45 NOCONFIGURE=1 "${S}/autogen.sh"
53 oe_runconf
54}
55
56do_compile_prepend() {
57 export BUILD_SYS="${BUILD_SYS}"
58 export HOST_SYS="${HOST_SYS}"
59}
60
61export SYSTEMD_REQUIRED
62
63do_install_append() {
64 if [ -n ${SYSTEMD_REQUIRED} ]; then
65 install -m 0644 -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service
66 install -m 0644 -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service
67 fi
68} 46}
69 47
70do_install_append_class-native() { 48do_install_append_class-native() {
71 create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" 49 create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator"
72} 50}
73 51
74 52PACKAGES += " \
75FILES_${PN} += " \ 53 ${PN}-switchroot \
76 ${@'${systemd_unitdir}/system/' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \ 54 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'ostree-dracut', '', d)} \
77 ${@'${libdir}/dracut/modules.d/98ostree/module-setup.sh' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \
78 ${datadir}/gir-1.0 \
79 ${datadir}/gir-1.0/OSTree-1.0.gir \
80 ${libdir}/girepository-1.0 \
81 ${libdir}/girepository-1.0/OSTree-1.0.typelib \
82 ${libdir}/tmpfiles.d/ostree-tmpfiles.conf \
83 ${datadir}/bash-completion/completions/ostree \
84 ${systemd_unitdir}/system-generators/ostree-system-generator \
85" 55"
86 56
87PACKAGES =+ "${PN}-switchroot" 57FILES_${PN} = "${bindir} \
88 58 ${sysconfdir}/ostree \
59 ${datadir}/ostree \
60 ${libdir}/*.so.* \
61 ${libdir}/ostree/ostree-grub-generator \
62 ${libdir}/ostree/ostree-remount \
63 ${libdir}/girepository-1.0/* \
64 ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/tmpfiles.d', '', d)} \
65 ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system-generators', '', d)} \
66"
67FILES_${PN}-dev += " ${datadir}/gir-1.0"
68FILES_${PN}-dracut = "${sysconfdir}/dracut.conf.d ${libdir}/dracut"
89FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root" 69FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root"
90RDEPENDS_${PN}-switchroot = ""
91DEPENDS_remove_class-native = "systemd-native"
92