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 \ |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 27 | file://run-ptest \ |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 28 | " |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 29 | SRCREV = "43706202f7de2ce0c829a46caab350ae1656f6ad" |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 30 | |
| 31 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+)" |
| 32 | |
| 33 | S = "${WORKDIR}/git" |
| 34 | |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 35 | inherit autotools bash-completion gobject-introspection gtk-doc manpages pkgconfig ptest-gnome systemd |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 36 | |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 37 | # Package configuration - match ostree defaults, but without rofiles-fuse |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 38 | # otherwise we introduce a dependendency on meta-filesystems |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 39 | # |
| 40 | # If running with ptest, both soup (for trivial-httpd) and xattr are required |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 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)} \ |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 51 | builtin-grub2-mkconfig \ |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 52 | soup \ |
| 53 | " |
| 54 | |
| 55 | PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 56 | PACKAGECONFIG[builtin-grub2-mkconfig] = "--with-builtin-grub2-mkconfig, --without-builtin-grub2-mkconfig" |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 57 | PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl" |
| 58 | PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 59 | PACKAGECONFIG[gjs] = "ac_cv_path_GJS=${bindir}/gjs" |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 60 | PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls" |
| 61 | PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive" |
| 62 | PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux" |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 63 | PACKAGECONFIG[manpages] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native" |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 64 | PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio" |
| 65 | PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2" |
| 66 | PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl" |
| 67 | PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse" |
| 68 | PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux" |
| 69 | PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack" |
| 70 | PACKAGECONFIG[soup] = "--with-soup, --without-soup --disable-glibtest, libsoup-2.4" |
| 71 | PACKAGECONFIG[static] = "" |
| 72 | PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_unitdir}/system, --without-libsystemd, systemd" |
| 73 | PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline" |
| 74 | |
| 75 | EXTRA_OECONF = " \ |
| 76 | ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \ |
| 77 | " |
| 78 | |
| 79 | # Makefile-libostree.am overrides this to avoid a build problem with clang, |
| 80 | # but that fix breaks cross compilation and we don't need it |
| 81 | EXTRA_OEMAKE = " \ |
| 82 | INTROSPECTION_SCANNER_ENV= \ |
| 83 | " |
| 84 | |
| 85 | EXTRA_OECONF_class-native = " \ |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 86 | --enable-wrpseudo-compat \ |
| 87 | --disable-otmpfile \ |
| 88 | " |
| 89 | |
| 90 | # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the |
| 91 | # do_configure stage so we do depend on it |
| 92 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" |
| 93 | SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" |
| 94 | do_configure[vardeps] += "SYSROOT_DIR" |
| 95 | |
| 96 | do_configure_prepend() { |
| 97 | # this reflects what autogen.sh does, but the OE wrappers for autoreconf |
| 98 | # allow it to work without the other gyrations which exist there |
| 99 | cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc |
| 100 | cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc |
| 101 | } |
| 102 | |
| 103 | do_install_append_class-native() { |
| 104 | create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" |
| 105 | } |
| 106 | |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 107 | PACKAGE_BEFORE_PN = " \ |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 108 | ${PN}-dracut \ |
| 109 | ${PN}-grub \ |
| 110 | ${PN}-mkinitcpio \ |
| 111 | ${PN}-switchroot \ |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 112 | ${PN}-trivial-httpd \ |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 113 | " |
| 114 | |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 115 | FILES_${PN} += " \ |
| 116 | ${nonarch_libdir}/${BPN} \ |
| 117 | ${nonarch_libdir}/tmpfiles.d \ |
| 118 | ${systemd_unitdir}/system \ |
| 119 | ${systemd_unitdir}/system-generators \ |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 120 | " |
| 121 | FILES_${PN}-dracut = " \ |
| 122 | ${sysconfdir}/dracut.conf.d \ |
| 123 | ${libdir}/dracut \ |
| 124 | " |
| 125 | FILES_${PN}-grub = " \ |
| 126 | ${sysconfdir}/grub.d \ |
| 127 | ${libexecdir}/libostree/grub2-15_ostree \ |
| 128 | " |
| 129 | FILES_${PN}-mkinitcpio = " \ |
| 130 | ${sysconfdir}/ostree-mkinitcpio.conf \ |
| 131 | ${libdir}/initcpio \ |
| 132 | " |
| 133 | FILES_${PN}-switchroot = " \ |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 134 | ${nonarch_libdir}/${BPN}/ostree-prepare-root \ |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 135 | ${systemd_unitdir}/system/ostree-prepare-root.service \ |
| 136 | " |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 137 | FILES_${PN}-trivial-httpd = " \ |
| 138 | ${libexecdir}/libostree/ostree-trivial-httpd \ |
| 139 | " |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 140 | |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 141 | RDEPENDS_${PN} = " \ |
| 142 | ${@bb.utils.contains('PACKAGECONFIG', 'trivial-httpd-cmdline', '${PN}-trivial-httpd', '', d)} \ |
| 143 | " |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 144 | RDEPENDS_${PN}-dracut = "bash" |
| 145 | RDEPENDS_${PN}-mkinitcpio = "bash" |
| 146 | RDEPENDS_${PN}_class-target = " \ |
| 147 | gnupg \ |
| 148 | ${PN}-switchroot \ |
| 149 | " |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 150 | RDEPENDS_${PN}-ptest += " \ |
| 151 | attr \ |
| 152 | bash \ |
| 153 | coreutils \ |
| 154 | cpio \ |
| 155 | diffutils \ |
| 156 | findutils \ |
| 157 | grep \ |
| 158 | python3-core \ |
| 159 | python3-multiprocessing \ |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 160 | tar \ |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 161 | ${PN}-trivial-httpd \ |
Brad Bishop | e42b3e3 | 2020-01-15 22:08:42 -0500 | [diff] [blame] | 162 | ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-python', 'python3-pyyaml', '', d)} \ |
| 163 | ${@bb.utils.contains('PACKAGECONFIG', 'gjs', 'gjs', '', d)} \ |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 164 | " |
| 165 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils glibc-localedata-en-us" |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 166 | |
| 167 | RRECOMMENDS_${PN} += "kernel-module-overlay" |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame] | 168 | RRECOMMENDS_${PN}-ptest += "strace" |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 169 | |
| 170 | SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path" |
| 171 | SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service" |
| 172 | |
| 173 | BBCLASSEXTEND = "native" |