From 9d4aa221c1ba359e8ebf8c5259478cb80192e11a Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Thu, 24 Jan 2019 18:58:39 +0200 Subject: 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 Signed-off-by: Leon Anavi --- recipes-sota/ostree-initrd/files/init.sh | 2 +- recipes-sota/ostree/ostree_git.bb | 73 ++++++++++---------------------- 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 # move mounted devices to new root cd /sysroot -for x in dev proc; do +for x in dev proc run; do log_info "Moving /$x to new rootfs" mount -o move "/$x" "$x" done 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 @@ SUMMARY = "Tool for managing bootable, immutable, versioned filesystem trees" -LICENSE = "GPLv2+" +HOMEPAGE = "https://ostree.readthedocs.io/en/latest/" +LICENSE = "LGPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" -inherit autotools-brokensep pkgconfig systemd bash-completion gobject-introspection +inherit autotools pkgconfig systemd bash-completion gobject-introspection INHERIT_remove_class-native = "systemd" @@ -16,67 +17,47 @@ S = "${WORKDIR}/git" BBCLASSEXTEND = "native" -DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse libsoup-2.4 e2fsprogs gtk-doc-native curl xz" +DEPENDS += "attr bison-native libarchive libcap glib-2.0 gpgme fuse e2fsprogs curl xz" DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" DEPENDS_remove_class-native = "systemd-native" - -RDEPENDS_${PN} = "python util-linux-libuuid util-linux-libblkid util-linux-libmount libcap bash" -RDEPENDS_${PN}_remove_class-native = "python-native" RDEPENDS_${PN}-dracut = "bash" -EXTRA_OECONF = "--with-libarchive --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl" +CFLAGS_append = " -Wno-error=missing-prototypes" +EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup" EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" +PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" +PACKAGECONFIG_class-native = "" +PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut" + # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the # do_configure stage so we do depend on it SYSROOT_DIR = "${STAGING_DIR_TARGET}" SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" do_configure[vardeps] += "SYSROOT_DIR" -SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" -SYSTEMD_REQUIRED_class-native = "" - -SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service" -SYSTEMD_SERVICE_${PN}_class-native = "" - -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" -PACKAGECONFIG_class-native = "" -PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut" - -FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" +SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service ostree-finalize-staged.service" +export BUILD_SYS +export HOST_SYS export STAGING_INCDIR export STAGING_LIBDIR -do_configure() { - unset docdir - NOCONFIGURE=1 ./autogen.sh - oe_runconf -} - -do_compile_prepend() { - export BUILD_SYS="${BUILD_SYS}" - export HOST_SYS="${HOST_SYS}" -} - -SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service ostree-finalize-staged.service" - -export SYSTEMD_REQUIRED - -do_install_append() { - if [ -n ${SYSTEMD_REQUIRED} ]; then - install -p -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service - install -p -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service - fi +do_configure_prepend() { + unset docdir + NOCONFIGURE=1 "${S}/autogen.sh" } do_install_append_class-native() { - create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" + create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" } +PACKAGES += " \ + ${PN}-switchroot \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'ostree-dracut', '', d)} \ +" -FILES_${PN} += " \ - {bindir} \ +FILES_${PN} = "${bindir} \ ${sysconfdir}/ostree \ ${datadir}/ostree \ ${libdir}/*.so.* \ @@ -86,14 +67,6 @@ FILES_${PN} += " \ ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/tmpfiles.d', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system-generators', '', d)} \ " - -PACKAGES =+ " \ - ${PN}-switchroot \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'ostree-dracut', '', d)} \ -" - -FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root" -RDEPENDS_${PN}-switchroot = "" -DEPENDS_remove_class-native = "systemd-native" FILES_${PN}-dev += " ${datadir}/gir-1.0" FILES_${PN}-dracut = "${sysconfdir}/dracut.conf.d ${libdir}/dracut" +FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root" -- cgit v1.2.3-54-g00ecf