From 798818884c21a743f17e26eda22ceb433b69a3c1 Mon Sep 17 00:00:00 2001 From: Anton Gerasimov Date: Fri, 2 Sep 2016 17:55:48 +0200 Subject: Build OSTree natively, and its dependencies as well Bug-AGL: SPEC-245 Change-Id: Ia5631d786c3375ba3aa0bc6ac75ebaeb358e7b03 Signed-off-by: Anton Gerasimov --- .../recipes-sota/libgsystem/libgsystem_git.bb | 37 --------------------- meta-sota/recipes-sota/ostree/ostree_git.bb | 32 +++++++++++------- meta-sota/recipes-support/fuse/fuse_%.bbappend | 3 ++ .../glib-networking/glib-networking_%.bbappend | 1 + meta-sota/recipes-support/gpgme/gpgme_%.bbappend | 1 + .../recipes-support/libgsystem/libgsystem_git.bb | 38 ++++++++++++++++++++++ .../recipes-support/libsoup/libsoup-2.4_%.bbappend | 3 ++ .../util-linux/util-linux_%.bbappend | 10 ++++++ 8 files changed, 77 insertions(+), 48 deletions(-) delete mode 100644 meta-sota/recipes-sota/libgsystem/libgsystem_git.bb create mode 100644 meta-sota/recipes-support/fuse/fuse_%.bbappend create mode 100644 meta-sota/recipes-support/glib-networking/glib-networking_%.bbappend create mode 100644 meta-sota/recipes-support/gpgme/gpgme_%.bbappend create mode 100644 meta-sota/recipes-support/libgsystem/libgsystem_git.bb create mode 100644 meta-sota/recipes-support/libsoup/libsoup-2.4_%.bbappend create mode 100644 meta-sota/recipes-support/util-linux/util-linux_%.bbappend diff --git a/meta-sota/recipes-sota/libgsystem/libgsystem_git.bb b/meta-sota/recipes-sota/libgsystem/libgsystem_git.bb deleted file mode 100644 index fe1e552..0000000 --- a/meta-sota/recipes-sota/libgsystem/libgsystem_git.bb +++ /dev/null @@ -1,37 +0,0 @@ -SUMMARY = "GIO-based library, targeted primarily for use by operating system components" -LICENSE = "GPLv2+" -LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" - -SRC_URI = "gitsm://github.com/GNOME/libgsystem.git" -SRCREV="d606bec68ddfea78de4b03c3f3568afb71bdc1ce" - -S = "${WORKDIR}/git" - -DEPENDS += "attr glib-2.0 pkgconfig libcap" - -RDEPENDS_${PN} = "systemd liblzma" - -inherit autotools-brokensep - -BBCLASSEXTEND += "native" - -export STAGING_INCDIR -export STAGING_LIBDIR - -do_configure() { - NOCONFIGURE=true ./autogen.sh - oe_runconf -} - -do_compile_prepend() { - export BUILD_SYS="${BUILD_SYS}" - export HOST_SYS="${HOST_SYS}" -} - -FILES_${PN} += " \ - ${datadir} \ - ${datadir}/gir-1.0 \ - ${datadir}/gir-1.0/GSystem-1.0.gir \ - ${libdir}/girepository-1.0/ \ - ${libdir}/girepository-1.0/GSystem-1.0.typelib \ -" diff --git a/meta-sota/recipes-sota/ostree/ostree_git.bb b/meta-sota/recipes-sota/ostree/ostree_git.bb index 659ee83..0e53d25 100644 --- a/meta-sota/recipes-sota/ostree/ostree_git.bb +++ b/meta-sota/recipes-sota/ostree/ostree_git.bb @@ -4,24 +4,35 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" inherit autotools-brokensep pkgconfig systemd +INHERIT_remove_class-native = "systemd" + SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master" SRCREV="v2016.9" S = "${WORKDIR}/git" +BBCLASSEXTEND = "native" + DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse libsoup-2.4 e2fsprogs systemd" +DEPENDS_remove_class-native = "systemd-native" + +RDEPENDS_${PN} = "python util-linux-libuuid util-linux-libblkid util-linux-libmount libcap xz" +RDEPENDS_${PN}_remove_class-native = "python-native" -RDEPENDS_${PN} = "python util-linux-libuuid util-linux-libblkid util-linux-libmount libcap liblzma" +EXTRA_OECONF = "--with-libarchive --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --disable-man" + +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 ??= "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" +PACKAGECONFIG_class-native = "" PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/,,," -EXTRA_OECONF = "--with-libarchive --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --disable-man" - FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" -BBCLASSEXTEND = "native" - export STAGING_INCDIR export STAGING_LIBDIR @@ -35,19 +46,18 @@ do_compile_prepend() { export HOST_SYS="${HOST_SYS}" } +export SYSTEMD_REQUIRED + do_install_append() { - if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then + 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 } -SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service" FILES_${PN} += " \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '${systemd_unitdir}/system/', '', d)} \ + ${@'${systemd_unitdir}/system/' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \ ${datadir}/gir-1.0 \ ${datadir}/gir-1.0/OSTree-1.0.gir \ - ${libdir}/dracut/ \ - ${libdir}/girepository-1.0 \ - ${libdir}/girepository-1.0/OSTree-1.0.typelib \ " + diff --git a/meta-sota/recipes-support/fuse/fuse_%.bbappend b/meta-sota/recipes-support/fuse/fuse_%.bbappend new file mode 100644 index 0000000..4f23349 --- /dev/null +++ b/meta-sota/recipes-support/fuse/fuse_%.bbappend @@ -0,0 +1,3 @@ +BBCLASSEXTEND = "native" + +PACKAGES_append_class-native = "fuse-utils-dbg-native fuse-utils-native libulockmgr-native libulockmgr-dev-native libulockmgr-dbg-native" diff --git a/meta-sota/recipes-support/glib-networking/glib-networking_%.bbappend b/meta-sota/recipes-support/glib-networking/glib-networking_%.bbappend new file mode 100644 index 0000000..d3267ac --- /dev/null +++ b/meta-sota/recipes-support/glib-networking/glib-networking_%.bbappend @@ -0,0 +1 @@ +BBCLASSEXTEND = "native" diff --git a/meta-sota/recipes-support/gpgme/gpgme_%.bbappend b/meta-sota/recipes-support/gpgme/gpgme_%.bbappend new file mode 100644 index 0000000..d3267ac --- /dev/null +++ b/meta-sota/recipes-support/gpgme/gpgme_%.bbappend @@ -0,0 +1 @@ +BBCLASSEXTEND = "native" diff --git a/meta-sota/recipes-support/libgsystem/libgsystem_git.bb b/meta-sota/recipes-support/libgsystem/libgsystem_git.bb new file mode 100644 index 0000000..4b1eb49 --- /dev/null +++ b/meta-sota/recipes-support/libgsystem/libgsystem_git.bb @@ -0,0 +1,38 @@ +SUMMARY = "GIO-based library, targeted primarily for use by operating system components" +LICENSE = "GPLv2+" +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" + +SRC_URI = "gitsm://github.com/GNOME/libgsystem.git" +SRCREV="d606bec68ddfea78de4b03c3f3568afb71bdc1ce" + +S = "${WORKDIR}/git" + +inherit autotools-brokensep + +DEPENDS += "attr glib-2.0 pkgconfig libcap" +RDEPENDS_${PN} = "xz systemd" + +RDEPENDS_${PN}_remove_class-native = "systemd-native" + +BBCLASSEXTEND = "native" + +export STAGING_INCDIR +export STAGING_LIBDIR + +do_configure() { + NOCONFIGURE=true ./autogen.sh + oe_runconf +} + +do_compile_prepend() { + export BUILD_SYS="${BUILD_SYS}" + export HOST_SYS="${HOST_SYS}" +} + +FILES_${PN} += " \ + ${datadir} \ + ${datadir}/gir-1.0 \ + ${datadir}/gir-1.0/GSystem-1.0.gir \ + ${libdir}/girepository-1.0/ \ + ${libdir}/girepository-1.0/GSystem-1.0.typelib \ +" diff --git a/meta-sota/recipes-support/libsoup/libsoup-2.4_%.bbappend b/meta-sota/recipes-support/libsoup/libsoup-2.4_%.bbappend new file mode 100644 index 0000000..ed24273 --- /dev/null +++ b/meta-sota/recipes-support/libsoup/libsoup-2.4_%.bbappend @@ -0,0 +1,3 @@ +BBCLASSEXTEND = "native" + +DEPENDS_append_class-native = " glib-networking-native" diff --git a/meta-sota/recipes-support/util-linux/util-linux_%.bbappend b/meta-sota/recipes-support/util-linux/util-linux_%.bbappend new file mode 100644 index 0000000..bd3f686 --- /dev/null +++ b/meta-sota/recipes-support/util-linux/util-linux_%.bbappend @@ -0,0 +1,10 @@ +PACKAGES_append_class-native = "util-linux-agetty-native util-linux-fdisk-native util-linux-cfdisk-native util-linux-sfdisk-native \ + util-linux-swaponoff-native util-linux-losetup-native util-linux-umount-native \ + util-linux-mount-native util-linux-readprofile-native util-linux-uuidd-native \ + util-linux-uuidgen-native util-linux-lscpu-native util-linux-fsck-native util-linux-blkid \ + util-linux-mkfs-native util-linux-mcookie-native util-linux-reset-native \ + util-linux-mkfs.cramfs-native util-linux-fsck.cramfs-native util-linux-fstrim-native \ + util-linux-partx-native ${PN}-bash-completion-native util-linux-hwclock \ + util-linux-findfs-native util-linux-getopt-native util-linux-sulogin-native \ + ${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount-native', '', d)}" + -- cgit 1.2.3-korg