Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame^] | 1 | SUMMARY = "Versioned Operating System Repository." |
| 2 | DESCRIPTION = "libostree is both a shared library and suite of command line \ |
| 3 | tools that combines a \"git-like\" model for committing and downloading \ |
| 4 | bootable filesystem trees, along with a layer for deploying them and managing \ |
| 5 | the bootloader configuration." |
| 6 | HOMEPAGE = "https://ostree.readthedocs.io" |
| 7 | LICENSE = "LGPLv2.1" |
| 8 | |
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" |
| 10 | |
| 11 | DEPENDS = " \ |
| 12 | glib-2.0 \ |
| 13 | gpgme \ |
| 14 | e2fsprogs \ |
| 15 | libcap \ |
| 16 | zlib \ |
| 17 | xz \ |
| 18 | bison-native \ |
| 19 | " |
| 20 | |
| 21 | # The Yocto mirror has an old export of ostree: |
| 22 | # http://downloads.yoctoproject.org/mirror/sources/git2_github.com.ostreedev.ostree.tar.gz |
| 23 | PREMIRRORS = "" |
| 24 | |
| 25 | SRC_URI = " \ |
| 26 | gitsm://github.com/ostreedev/ostree \ |
| 27 | file://0001-macros-Add-TEMP_FAILURE_RETRY-for-musl.patch \ |
| 28 | file://0001-Always-enable-trivial-httpd-for-tests.patch \ |
| 29 | file://0002-Gate-ostree-trivial-httpd-on-BUILDOPT_TRIVIAL_HTTPD.patch \ |
| 30 | " |
| 31 | SRCREV = "5c1697da78ebf6250a7130b8b9e6cbfbeaa34296" |
| 32 | |
| 33 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+)" |
| 34 | |
| 35 | S = "${WORKDIR}/git" |
| 36 | |
| 37 | inherit autotools bash-completion gobject-introspection gtk-doc pkgconfig systemd |
| 38 | |
| 39 | # package configuration - match ostree defaults, but without rofiles-fuse |
| 40 | # otherwise we introduce a dependendency on meta-filesystems |
| 41 | PACKAGECONFIG ??= " \ |
| 42 | ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ |
| 43 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd libmount', '', d)} \ |
| 44 | soup \ |
| 45 | " |
| 46 | |
| 47 | # We include soup because ostree can't (currently) be built without |
| 48 | # soup or curl - https://github.com/ostreedev/ostree/issues/1897 |
| 49 | PACKAGECONFIG_class-native ??= " \ |
| 50 | ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ |
| 51 | soup \ |
| 52 | " |
| 53 | |
| 54 | PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi" |
| 55 | PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl" |
| 56 | PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut" |
| 57 | PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls" |
| 58 | PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive" |
| 59 | PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux" |
| 60 | PACKAGECONFIG[man] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native" |
| 61 | PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio" |
| 62 | PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2" |
| 63 | PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl" |
| 64 | PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse" |
| 65 | PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux" |
| 66 | PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack" |
| 67 | PACKAGECONFIG[soup] = "--with-soup, --without-soup --disable-glibtest, libsoup-2.4" |
| 68 | PACKAGECONFIG[static] = "" |
| 69 | PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_unitdir}/system, --without-libsystemd, systemd" |
| 70 | PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline" |
| 71 | |
| 72 | EXTRA_OECONF = " \ |
| 73 | ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \ |
| 74 | " |
| 75 | |
| 76 | # Makefile-libostree.am overrides this to avoid a build problem with clang, |
| 77 | # but that fix breaks cross compilation and we don't need it |
| 78 | EXTRA_OEMAKE = " \ |
| 79 | INTROSPECTION_SCANNER_ENV= \ |
| 80 | " |
| 81 | |
| 82 | EXTRA_OECONF_class-native = " \ |
| 83 | --with-builtin-grub2-mkconfig \ |
| 84 | --enable-wrpseudo-compat \ |
| 85 | --disable-otmpfile \ |
| 86 | " |
| 87 | |
| 88 | # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the |
| 89 | # do_configure stage so we do depend on it |
| 90 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" |
| 91 | SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" |
| 92 | do_configure[vardeps] += "SYSROOT_DIR" |
| 93 | |
| 94 | do_configure_prepend() { |
| 95 | # this reflects what autogen.sh does, but the OE wrappers for autoreconf |
| 96 | # allow it to work without the other gyrations which exist there |
| 97 | cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc |
| 98 | cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc |
| 99 | } |
| 100 | |
| 101 | do_install_append_class-native() { |
| 102 | create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" |
| 103 | } |
| 104 | |
| 105 | PACKAGES += " \ |
| 106 | ${PN}-dracut \ |
| 107 | ${PN}-grub \ |
| 108 | ${PN}-mkinitcpio \ |
| 109 | ${PN}-switchroot \ |
| 110 | " |
| 111 | |
| 112 | FILES_${PN} = " \ |
| 113 | ${bindir}/ostree \ |
| 114 | ${bindir}/rofiles-fuse \ |
| 115 | ${datadir}/${BPN} \ |
| 116 | ${datadir}/gir-1.0 \ |
| 117 | ${libdir}/${BPN}/ostree-remount \ |
| 118 | ${libdir}/girepository-1.0 \ |
| 119 | ${libdir}/lib*${SOLIBS} \ |
| 120 | ${libdir}/tmpfiles.d/ostree-tmpfiles.conf \ |
| 121 | ${libexecdir}/libostree/ostree-trivial-httpd \ |
| 122 | ${sysconfdir}/ostree/remotes.d \ |
| 123 | ${systemd_unitdir}/system-generators/ostree-system-generator \ |
| 124 | ${systemd_unitdir}/system/ostree-finalize-staged.path \ |
| 125 | ${systemd_unitdir}/system/ostree-finalize-staged.service \ |
| 126 | ${systemd_unitdir}/system/ostree-remount.service \ |
| 127 | " |
| 128 | FILES_${PN}-dracut = " \ |
| 129 | ${sysconfdir}/dracut.conf.d \ |
| 130 | ${libdir}/dracut \ |
| 131 | " |
| 132 | FILES_${PN}-grub = " \ |
| 133 | ${sysconfdir}/grub.d \ |
| 134 | ${libexecdir}/libostree/grub2-15_ostree \ |
| 135 | " |
| 136 | FILES_${PN}-mkinitcpio = " \ |
| 137 | ${sysconfdir}/ostree-mkinitcpio.conf \ |
| 138 | ${libdir}/initcpio \ |
| 139 | " |
| 140 | FILES_${PN}-switchroot = " \ |
| 141 | ${libdir}/ostree/ostree-prepare-root \ |
| 142 | ${systemd_unitdir}/system/ostree-prepare-root.service \ |
| 143 | " |
| 144 | |
| 145 | RDEPENDS_${PN}-dracut = "bash" |
| 146 | RDEPENDS_${PN}-mkinitcpio = "bash" |
| 147 | RDEPENDS_${PN}_class-target = " \ |
| 148 | gnupg \ |
| 149 | ${PN}-switchroot \ |
| 150 | " |
| 151 | |
| 152 | RRECOMMENDS_${PN} += "kernel-module-overlay" |
| 153 | |
| 154 | SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path" |
| 155 | SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service" |
| 156 | |
| 157 | BBCLASSEXTEND = "native" |