summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2018-10-25 11:12:00 +0200
committerGitHub <noreply@github.com>2018-10-25 11:12:00 +0200
commita8ed681a86972b1dcd7fb61934a237163908af8a (patch)
treede6862b74e561bc1f2a58c383cb64f54699b8003
parentb256375cd2b31d3d63c8551c736b6e306729363b (diff)
parentb932f73853f485be13a90d5d5eb203bbed388b1d (diff)
downloadmeta-updater-a8ed681a86972b1dcd7fb61934a237163908af8a.tar.gz
Merge pull request #406 from advancedtelematic/refactor/backport-ostree-upgrade-rocko
Refactor/backport ostree upgrade rocko
-rw-r--r--recipes-sota/ostree/ostree_git.bb94
1 files changed, 35 insertions, 59 deletions
diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb
index afb767f..501d636 100644
--- a/recipes-sota/ostree/ostree_git.bb
+++ b/recipes-sota/ostree/ostree_git.bb
@@ -1,92 +1,68 @@
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
11SRCREV="854a823e05d6fe8b610c02c2a71eaeb2bf1e98a6" 10SRCREV="3e96ec9811b5cfc5481f8b6b06c8d34d9a35408e"
12 11
13PV = "v2017.13" 12PV = "v2018.7"
14PR = "2"
15 13
16S = "${WORKDIR}/git" 14S = "${WORKDIR}/git"
17 15
18BBCLASSEXTEND = "native" 16BBCLASSEXTEND = "native"
19 17
20DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse e2fsprogs gtk-doc-native curl xz" 18DEPENDS += "attr bison-native libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz"
21DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" 19DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
22DEPENDS_remove_class-native = "systemd-native" 20RDEPENDS_${PN}-dracut = "bash"
23
24RDEPENDS_${PN} = "util-linux-libuuid util-linux-libblkid util-linux-libmount libcap bash"
25 21
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" 22CFLAGS_append = " -Wno-error=missing-prototypes"
23EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup"
27EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" 24EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat"
28 25
26PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}"
27PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut"
28
29# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the 29# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the
30# do_configure stage so we do depend on it 30# do_configure stage so we do depend on it
31SYSROOT_DIR = "${STAGING_DIR_TARGET}" 31SYSROOT_DIR = "${STAGING_DIR_TARGET}"
32SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" 32SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}"
33do_configure[vardeps] += "SYSROOT_DIR" 33do_configure[vardeps] += "SYSROOT_DIR"
34 34
35SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" 35SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service ostree-finalize-staged.service"
36SYSTEMD_REQUIRED_class-native = ""
37
38SYSTEMD_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 36
37export BUILD_SYS
38export HOST_SYS
47export STAGING_INCDIR 39export STAGING_INCDIR
48export STAGING_LIBDIR 40export STAGING_LIBDIR
49 41
50do_configure() { 42do_configure_prepend() {
51 unset docdir 43 unset docdir
52 NOCONFIGURE=1 "${S}/autogen.sh" 44 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} 45}
69 46
70do_install_append_class-native() { 47do_install_append_class-native() {
71 create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" 48 create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator"
72} 49}
73 50
74 51PACKAGES += " \
75FILES_${PN} += " \ 52 ${PN}-switchroot \
76 ${@'${systemd_unitdir}/system/' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \ 53 ${@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" 54"
86 55
87PACKAGES =+ "${PN}-switchroot" 56FILES_${PN} = "${bindir} \
88 57 ${sysconfdir}/ostree \
58 ${datadir}/ostree \
59 ${libdir}/*.so.* \
60 ${libdir}/ostree/ostree-grub-generator \
61 ${libdir}/ostree/ostree-remount \
62 ${libdir}/girepository-1.0/* \
63 ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/tmpfiles.d', '', d)} \
64 ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system-generators', '', d)} \
65"
66FILES_${PN}-dev += " ${datadir}/gir-1.0"
67FILES_${PN}-dracut = "${sysconfdir}/dracut.conf.d ${libdir}/dracut"
89FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root" 68FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root"
90RDEPENDS_${PN}-switchroot = ""
91DEPENDS_remove_class-native = "systemd-native"
92