From e7f7a1dffd8d0b591c9e134df84fabcc205657f0 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Fri, 4 May 2018 22:41:20 -0300 Subject: ostree: cosmetics: fix indentation Signed-off-by: Ricardo Salveti --- recipes-sota/ostree/ostree_git.bb | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index afb767f..50afca5 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb @@ -48,27 +48,27 @@ export STAGING_INCDIR export STAGING_LIBDIR do_configure() { - unset docdir - NOCONFIGURE=1 "${S}/autogen.sh" - oe_runconf + unset docdir + NOCONFIGURE=1 "${S}/autogen.sh" + oe_runconf } do_compile_prepend() { - export BUILD_SYS="${BUILD_SYS}" - export HOST_SYS="${HOST_SYS}" + export BUILD_SYS="${BUILD_SYS}" + export HOST_SYS="${HOST_SYS}" } export SYSTEMD_REQUIRED do_install_append() { - if [ -n ${SYSTEMD_REQUIRED} ]; then - install -m 0644 -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service - install -m 0644 -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service - fi + if [ -n ${SYSTEMD_REQUIRED} ]; then + install -m 0644 -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service + install -m 0644 -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service + fi } 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" } @@ -89,4 +89,3 @@ PACKAGES =+ "${PN}-switchroot" FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root" RDEPENDS_${PN}-switchroot = "" DEPENDS_remove_class-native = "systemd-native" - -- cgit v1.2.3-54-g00ecf From 58953e7c6dac5b756085317d8c9ebd25dab15d53 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Fri, 4 May 2018 22:42:09 -0300 Subject: ostree: fix license and add homepage description Ostree is LGPLv2+ and not GPLv2+. Signed-off-by: Ricardo Salveti --- recipes-sota/ostree/ostree_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index 50afca5..112d05c 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb @@ -1,5 +1,6 @@ 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 pkgconfig systemd gobject-introspection -- cgit v1.2.3-54-g00ecf From 7201fc524d7be21b5cf77081d0b923a000ada15a Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Fri, 4 May 2018 22:45:25 -0300 Subject: ostree: use do_configure_prepend and avoid customizing do_compile Prefer prepend (autogen) and also avoid customizing do_compile as exporting BUILD_SYS and HOST_SYS is already enough. Signed-off-by: Ricardo Salveti --- recipes-sota/ostree/ostree_git.bb | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index 112d05c..240860a 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb @@ -45,18 +45,14 @@ PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" +export BUILD_SYS +export HOST_SYS export STAGING_INCDIR export STAGING_LIBDIR -do_configure() { +do_configure_prepend() { unset docdir NOCONFIGURE=1 "${S}/autogen.sh" - oe_runconf -} - -do_compile_prepend() { - export BUILD_SYS="${BUILD_SYS}" - export HOST_SYS="${HOST_SYS}" } export SYSTEMD_REQUIRED -- cgit v1.2.3-54-g00ecf From 9b709a079d30a005f7187517466c81f9119b10fd Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Fri, 4 May 2018 22:48:37 -0300 Subject: ostree: cleanup configure and build flags Set the standard CFLAGS variable instead of defining it via EXTRA_OECONF and also remove the configure flags that are automatically enabled based on the build depends. Signed-off-by: Ricardo Salveti --- recipes-sota/ostree/ostree_git.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index 240860a..b948131 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb @@ -24,7 +24,8 @@ DEPENDS_remove_class-native = "systemd-native" RDEPENDS_${PN} = "util-linux-libuuid util-linux-libblkid util-linux-libmount libcap bash" -EXTRA_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" +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" # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the -- cgit v1.2.3-54-g00ecf From 9f30ec0c0b818c5268964b845a380270d03d3346 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Fri, 4 May 2018 22:51:23 -0300 Subject: ostree: no need to disable systemd when building native Maintaining different build flags for target and native just makes it harder to maintain the recipe and it is not really needed as systemd-native is already available for systems building systemd. Signed-off-by: Ricardo Salveti --- recipes-sota/ostree/ostree_git.bb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index b948131..39d3c48 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb @@ -5,8 +5,6 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" inherit autotools pkgconfig systemd gobject-introspection -INHERIT_remove_class-native = "systemd" - SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master" SRCREV="854a823e05d6fe8b610c02c2a71eaeb2bf1e98a6" @@ -20,7 +18,6 @@ BBCLASSEXTEND = "native" DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse e2fsprogs gtk-doc-native curl xz" DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" -DEPENDS_remove_class-native = "systemd-native" RDEPENDS_${PN} = "util-linux-libuuid util-linux-libblkid util-linux-libmount libcap bash" @@ -35,13 +32,10 @@ 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" @@ -86,4 +80,3 @@ PACKAGES =+ "${PN}-switchroot" FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root" RDEPENDS_${PN}-switchroot = "" -DEPENDS_remove_class-native = "systemd-native" -- cgit v1.2.3-54-g00ecf From 776453012bce95eb3d8b5a8aea1f1c368bc8900a Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Fri, 4 May 2018 22:54:08 -0300 Subject: ostree: cleanup depends and rdepends Remove gtk-doc-native from DEPENDS and also remove util-linux-* packages from RDEPENDS as the dependencies for the required libraries are already populated by OE. Signed-off-by: Ricardo Salveti --- recipes-sota/ostree/ostree_git.bb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index 39d3c48..58f30a7 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb @@ -16,10 +16,9 @@ S = "${WORKDIR}/git" BBCLASSEXTEND = "native" -DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse e2fsprogs gtk-doc-native curl xz" +DEPENDS += "attr libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz" DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" - -RDEPENDS_${PN} = "util-linux-libuuid util-linux-libblkid util-linux-libmount libcap bash" +RDEPENDS_${PN} = "bash" CFLAGS_append = " -Wno-error=missing-prototypes" EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup" -- cgit v1.2.3-54-g00ecf From ca9c09e6550c31ec757d8d105195bc73810abc90 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Fri, 4 May 2018 23:03:21 -0300 Subject: 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 --- recipes-sota/ostree/ostree_git.bb | 22 +++++----------------- 1 file 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" BBCLASSEXTEND = "native" DEPENDS += "attr libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz" -DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" +DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" RDEPENDS_${PN} = "bash" 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.filter('DISTRO_FEATURES', 'systemd', d)}" +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_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service" -PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" -PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut" - FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" export BUILD_SYS @@ -49,23 +47,13 @@ do_configure_prepend() { NOCONFIGURE=1 "${S}/autogen.sh" } -export SYSTEMD_REQUIRED - -do_install_append() { - if [ -n ${SYSTEMD_REQUIRED} ]; then - install -m 0644 -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service - install -m 0644 -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service - fi -} - do_install_append_class-native() { create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" } FILES_${PN} += " \ - ${@'${systemd_unitdir}/system/' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \ - ${@'${libdir}/dracut/modules.d/98ostree/module-setup.sh' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \ + ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/dracut', '', d)} \ ${datadir}/gir-1.0 \ ${datadir}/gir-1.0/OSTree-1.0.gir \ ${libdir}/girepository-1.0 \ -- cgit v1.2.3-54-g00ecf From b7da9e5e9ef87c9679d0f81098657d1e4e6a0c01 Mon Sep 17 00:00:00 2001 From: Ricardo Salveti Date: Fri, 4 May 2018 23:04:42 -0300 Subject: ostree: improve package split logic and define extra packages Define extra packages to cover the bash-completion and dracut related files, as they are not necessarily required by ostree. Signed-off-by: Ricardo Salveti --- recipes-sota/ostree/ostree_git.bb | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index dc31efe..6fa6ad4 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb @@ -3,7 +3,7 @@ HOMEPAGE = "https://ostree.readthedocs.io/en/latest/" LICENSE = "LGPLv2+" LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" -inherit autotools pkgconfig systemd gobject-introspection +inherit autotools pkgconfig systemd bash-completion gobject-introspection SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master" @@ -18,7 +18,7 @@ BBCLASSEXTEND = "native" DEPENDS += "attr libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz" DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" -RDEPENDS_${PN} = "bash" +RDEPENDS_${PN}-dracut = "bash" CFLAGS_append = " -Wno-error=missing-prototypes" EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup" @@ -35,8 +35,6 @@ do_configure[vardeps] += "SYSROOT_DIR" SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service" -FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" - export BUILD_SYS export HOST_SYS export STAGING_INCDIR @@ -51,19 +49,21 @@ do_install_append_class-native() { create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" } - -FILES_${PN} += " \ - ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/dracut', '', d)} \ - ${datadir}/gir-1.0 \ - ${datadir}/gir-1.0/OSTree-1.0.gir \ - ${libdir}/girepository-1.0 \ - ${libdir}/girepository-1.0/OSTree-1.0.typelib \ - ${libdir}/tmpfiles.d/ostree-tmpfiles.conf \ - ${datadir}/bash-completion/completions/ostree \ - ${systemd_unitdir}/system-generators/ostree-system-generator \ +PACKAGES += " \ + ${PN}-switchroot \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'ostree-dracut', '', d)} \ " -PACKAGES =+ "${PN}-switchroot" - +FILES_${PN} = "${bindir} \ + ${sysconfdir}/ostree \ + ${datadir}/ostree \ + ${libdir}/*.so.* \ + ${libdir}/ostree/ostree-grub-generator \ + ${libdir}/ostree/ostree-remount \ + ${libdir}/girepository-1.0/* \ + ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/tmpfiles.d', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system-generators', '', d)} \ +" +FILES_${PN}-dev += " ${datadir}/gir-1.0" +FILES_${PN}-dracut = "${sysconfdir}/dracut.conf.d ${libdir}/dracut" FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root" -RDEPENDS_${PN}-switchroot = "" -- cgit v1.2.3-54-g00ecf