summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeon Anavi <leon.anavi@konsulko.com>2019-01-24 18:58:39 +0200
committerLeon Anavi <leon.anavi@konsulko.com>2019-01-25 18:28:02 +0200
commit9d4aa221c1ba359e8ebf8c5259478cb80192e11a (patch)
treeaec84267ba1742d0b56efe70ce52a603528f8abc
parent4e8023df199961db8e692ada3c9797124c2755b2 (diff)
downloadmeta-updater-9d4aa221c1ba359e8ebf8c5259478cb80192e11a.tar.gz
ostree: cleanup and update init.sh
Cleanup of the Yocto/OE recipe for OSTree based on the work from the branches for newer Yocto releases. Use the same version of init.sh as in branch rocko. Suggested-by: Patrick Vacek <patrickvacek@gmail.com> Signed-off-by: Leon Anavi <leon.anavi@konsulko.com>
-rw-r--r--recipes-sota/ostree-initrd/files/init.sh2
-rw-r--r--recipes-sota/ostree/ostree_git.bb73
2 files changed, 24 insertions, 51 deletions
diff --git a/recipes-sota/ostree-initrd/files/init.sh b/recipes-sota/ostree-initrd/files/init.sh
index 0b0693d..d7e0429 100644
--- a/recipes-sota/ostree-initrd/files/init.sh
+++ b/recipes-sota/ostree-initrd/files/init.sh
@@ -67,7 +67,7 @@ ostree-prepare-root /sysroot
67 67
68# move mounted devices to new root 68# move mounted devices to new root
69cd /sysroot 69cd /sysroot
70for x in dev proc; do 70for x in dev proc run; do
71 log_info "Moving /$x to new rootfs" 71 log_info "Moving /$x to new rootfs"
72 mount -o move "/$x" "$x" 72 mount -o move "/$x" "$x"
73done 73done
diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb
index a5cdc9a..6386910 100644
--- a/recipes-sota/ostree/ostree_git.bb
+++ b/recipes-sota/ostree/ostree_git.bb
@@ -1,8 +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-brokensep pkgconfig systemd bash-completion gobject-introspection 6inherit autotools pkgconfig systemd bash-completion gobject-introspection
6 7
7INHERIT_remove_class-native = "systemd" 8INHERIT_remove_class-native = "systemd"
8 9
@@ -16,67 +17,47 @@ S = "${WORKDIR}/git"
16 17
17BBCLASSEXTEND = "native" 18BBCLASSEXTEND = "native"
18 19
19DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse libsoup-2.4 e2fsprogs gtk-doc-native curl xz" 20DEPENDS += "attr bison-native libarchive libcap glib-2.0 gpgme fuse e2fsprogs curl xz"
20DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" 21DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}"
21DEPENDS_remove_class-native = "systemd-native" 22DEPENDS_remove_class-native = "systemd-native"
22
23RDEPENDS_${PN} = "python util-linux-libuuid util-linux-libblkid util-linux-libmount libcap bash"
24RDEPENDS_${PN}_remove_class-native = "python-native"
25RDEPENDS_${PN}-dracut = "bash" 23RDEPENDS_${PN}-dracut = "bash"
26 24
27EXTRA_OECONF = "--with-libarchive --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl" 25CFLAGS_append = " -Wno-error=missing-prototypes"
26EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup"
28EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" 27EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat"
29 28
29PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
30PACKAGECONFIG_class-native = ""
31PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut"
32
30# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the 33# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the
31# do_configure stage so we do depend on it 34# do_configure stage so we do depend on it
32SYSROOT_DIR = "${STAGING_DIR_TARGET}" 35SYSROOT_DIR = "${STAGING_DIR_TARGET}"
33SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" 36SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}"
34do_configure[vardeps] += "SYSROOT_DIR" 37do_configure[vardeps] += "SYSROOT_DIR"
35 38
36SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" 39SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service ostree-finalize-staged.service"
37SYSTEMD_REQUIRED_class-native = ""
38
39SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service"
40SYSTEMD_SERVICE_${PN}_class-native = ""
41
42PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}"
43PACKAGECONFIG_class-native = ""
44PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut"
45
46FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild"
47 40
41export BUILD_SYS
42export HOST_SYS
48export STAGING_INCDIR 43export STAGING_INCDIR
49export STAGING_LIBDIR 44export STAGING_LIBDIR
50 45
51do_configure() { 46do_configure_prepend() {
52 unset docdir 47 unset docdir
53 NOCONFIGURE=1 ./autogen.sh 48 NOCONFIGURE=1 "${S}/autogen.sh"
54 oe_runconf
55}
56
57do_compile_prepend() {
58 export BUILD_SYS="${BUILD_SYS}"
59 export HOST_SYS="${HOST_SYS}"
60}
61
62SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service ostree-finalize-staged.service"
63
64export SYSTEMD_REQUIRED
65
66do_install_append() {
67 if [ -n ${SYSTEMD_REQUIRED} ]; then
68 install -p -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service
69 install -p -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service
70 fi
71} 49}
72 50
73do_install_append_class-native() { 51do_install_append_class-native() {
74 create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" 52 create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator"
75} 53}
76 54
55PACKAGES += " \
56 ${PN}-switchroot \
57 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'ostree-dracut', '', d)} \
58"
77 59
78FILES_${PN} += " \ 60FILES_${PN} = "${bindir} \
79 {bindir} \
80 ${sysconfdir}/ostree \ 61 ${sysconfdir}/ostree \
81 ${datadir}/ostree \ 62 ${datadir}/ostree \
82 ${libdir}/*.so.* \ 63 ${libdir}/*.so.* \
@@ -86,14 +67,6 @@ FILES_${PN} += " \
86 ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/tmpfiles.d', '', d)} \ 67 ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/tmpfiles.d', '', d)} \
87 ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system-generators', '', d)} \ 68 ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system-generators', '', d)} \
88" 69"
89
90PACKAGES =+ " \
91 ${PN}-switchroot \
92 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'ostree-dracut', '', d)} \
93"
94
95FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root"
96RDEPENDS_${PN}-switchroot = ""
97DEPENDS_remove_class-native = "systemd-native"
98FILES_${PN}-dev += " ${datadir}/gir-1.0" 70FILES_${PN}-dev += " ${datadir}/gir-1.0"
99FILES_${PN}-dracut = "${sysconfdir}/dracut.conf.d ${libdir}/dracut" 71FILES_${PN}-dracut = "${sysconfdir}/dracut.conf.d ${libdir}/dracut"
72FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root"