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 \ |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame^] | 28 | file://run-ptest \ |
| 29 | file://0001-tests-core-Fallback-to-en_US.UTF-8-locale.patch \ |
| 30 | file://0001-tests-Handle-EPIPE-failures-when-head-terminates.patch \ |
| 31 | file://0002-tests-core-Assume-C.UTF-8-if-locale-isn-t-found.patch \ |
| 32 | file://0003-tests-Avoid-musl-failure-with-cp-a.patch \ |
| 33 | file://0001-build-create-tests-directory-for-split-builds.patch \ |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 34 | " |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame^] | 35 | SRCREV = "980ca07b03b3aa7e0012729dd6c84b0878775d93" |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 36 | |
| 37 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+)" |
| 38 | |
| 39 | S = "${WORKDIR}/git" |
| 40 | |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame^] | 41 | inherit autotools bash-completion gobject-introspection gtk-doc pkgconfig ptest-gnome systemd |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 42 | |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame^] | 43 | # Package configuration - match ostree defaults, but without rofiles-fuse |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 44 | # otherwise we introduce a dependendency on meta-filesystems |
| 45 | PACKAGECONFIG ??= " \ |
| 46 | ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ |
| 47 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd libmount', '', d)} \ |
| 48 | soup \ |
| 49 | " |
| 50 | |
| 51 | # We include soup because ostree can't (currently) be built without |
| 52 | # soup or curl - https://github.com/ostreedev/ostree/issues/1897 |
| 53 | PACKAGECONFIG_class-native ??= " \ |
| 54 | ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ |
| 55 | soup \ |
| 56 | " |
| 57 | |
| 58 | PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi" |
| 59 | PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl" |
| 60 | PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut" |
| 61 | PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls" |
| 62 | PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive" |
| 63 | PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux" |
| 64 | PACKAGECONFIG[man] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native" |
| 65 | PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio" |
| 66 | PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2" |
| 67 | PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl" |
| 68 | PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse" |
| 69 | PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux" |
| 70 | PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack" |
| 71 | PACKAGECONFIG[soup] = "--with-soup, --without-soup --disable-glibtest, libsoup-2.4" |
| 72 | PACKAGECONFIG[static] = "" |
| 73 | PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_unitdir}/system, --without-libsystemd, systemd" |
| 74 | PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline" |
| 75 | |
| 76 | EXTRA_OECONF = " \ |
| 77 | ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \ |
| 78 | " |
| 79 | |
| 80 | # Makefile-libostree.am overrides this to avoid a build problem with clang, |
| 81 | # but that fix breaks cross compilation and we don't need it |
| 82 | EXTRA_OEMAKE = " \ |
| 83 | INTROSPECTION_SCANNER_ENV= \ |
| 84 | " |
| 85 | |
| 86 | EXTRA_OECONF_class-native = " \ |
| 87 | --with-builtin-grub2-mkconfig \ |
| 88 | --enable-wrpseudo-compat \ |
| 89 | --disable-otmpfile \ |
| 90 | " |
| 91 | |
| 92 | # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the |
| 93 | # do_configure stage so we do depend on it |
| 94 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" |
| 95 | SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" |
| 96 | do_configure[vardeps] += "SYSROOT_DIR" |
| 97 | |
| 98 | do_configure_prepend() { |
| 99 | # this reflects what autogen.sh does, but the OE wrappers for autoreconf |
| 100 | # allow it to work without the other gyrations which exist there |
| 101 | cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc |
| 102 | cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc |
| 103 | } |
| 104 | |
| 105 | do_install_append_class-native() { |
| 106 | create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" |
| 107 | } |
| 108 | |
| 109 | PACKAGES += " \ |
| 110 | ${PN}-dracut \ |
| 111 | ${PN}-grub \ |
| 112 | ${PN}-mkinitcpio \ |
| 113 | ${PN}-switchroot \ |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame^] | 114 | ${PN}-trivial-httpd \ |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 115 | " |
| 116 | |
| 117 | FILES_${PN} = " \ |
| 118 | ${bindir}/ostree \ |
| 119 | ${bindir}/rofiles-fuse \ |
| 120 | ${datadir}/${BPN} \ |
| 121 | ${datadir}/gir-1.0 \ |
| 122 | ${libdir}/${BPN}/ostree-remount \ |
| 123 | ${libdir}/girepository-1.0 \ |
| 124 | ${libdir}/lib*${SOLIBS} \ |
| 125 | ${libdir}/tmpfiles.d/ostree-tmpfiles.conf \ |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 126 | ${sysconfdir}/ostree/remotes.d \ |
| 127 | ${systemd_unitdir}/system-generators/ostree-system-generator \ |
| 128 | ${systemd_unitdir}/system/ostree-finalize-staged.path \ |
| 129 | ${systemd_unitdir}/system/ostree-finalize-staged.service \ |
| 130 | ${systemd_unitdir}/system/ostree-remount.service \ |
| 131 | " |
| 132 | FILES_${PN}-dracut = " \ |
| 133 | ${sysconfdir}/dracut.conf.d \ |
| 134 | ${libdir}/dracut \ |
| 135 | " |
| 136 | FILES_${PN}-grub = " \ |
| 137 | ${sysconfdir}/grub.d \ |
| 138 | ${libexecdir}/libostree/grub2-15_ostree \ |
| 139 | " |
| 140 | FILES_${PN}-mkinitcpio = " \ |
| 141 | ${sysconfdir}/ostree-mkinitcpio.conf \ |
| 142 | ${libdir}/initcpio \ |
| 143 | " |
| 144 | FILES_${PN}-switchroot = " \ |
| 145 | ${libdir}/ostree/ostree-prepare-root \ |
| 146 | ${systemd_unitdir}/system/ostree-prepare-root.service \ |
| 147 | " |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame^] | 148 | FILES_${PN}-trivial-httpd = " \ |
| 149 | ${libexecdir}/libostree/ostree-trivial-httpd \ |
| 150 | " |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 151 | |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame^] | 152 | RDEPENDS_${PN} = " \ |
| 153 | ${@bb.utils.contains('PACKAGECONFIG', 'trivial-httpd-cmdline', '${PN}-trivial-httpd', '', d)} \ |
| 154 | " |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 155 | RDEPENDS_${PN}-dracut = "bash" |
| 156 | RDEPENDS_${PN}-mkinitcpio = "bash" |
| 157 | RDEPENDS_${PN}_class-target = " \ |
| 158 | gnupg \ |
| 159 | ${PN}-switchroot \ |
| 160 | " |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame^] | 161 | RDEPENDS_${PN}-ptest += " \ |
| 162 | attr \ |
| 163 | bash \ |
| 164 | coreutils \ |
| 165 | cpio \ |
| 166 | diffutils \ |
| 167 | findutils \ |
| 168 | grep \ |
| 169 | python3-core \ |
| 170 | python3-multiprocessing \ |
| 171 | python3-pyyaml \ |
| 172 | ${PN}-trivial-httpd \ |
| 173 | " |
| 174 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils glibc-localedata-en-us" |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 175 | |
| 176 | RRECOMMENDS_${PN} += "kernel-module-overlay" |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame^] | 177 | RRECOMMENDS_${PN}-ptest += "strace" |
Brad Bishop | 0a92126 | 2019-09-24 07:40:45 -0400 | [diff] [blame] | 178 | |
| 179 | SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path" |
| 180 | SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service" |
| 181 | |
| 182 | BBCLASSEXTEND = "native" |
Brad Bishop | 2f97392 | 2019-11-11 07:58:48 -0500 | [diff] [blame^] | 183 | |
| 184 | python __anonymous() { |
| 185 | if not bb.data.inherits_class('native', d) and bb.utils.contains('PTEST_ENABLED', '1', 'True', 'False', d): |
| 186 | if not bb.utils.contains_any('BBFILE_COLLECTIONS', 'meta-python', 'True', 'False', d): |
| 187 | raise bb.parse.SkipRecipe('ptest requires meta-python to be present.') |
| 188 | elif not bb.utils.contains_any('PACKAGECONFIG', 'soup curl', 'True', 'False', d): |
| 189 | raise bb.parse.SkipRecipe('ptest requires soup enabled in PACKAGECONFIG.') |
| 190 | elif not oe.utils.any_distro_features(d, "xattr"): |
| 191 | raise bb.parse.SkipRecipe('ptest requires xattr enabled in DISTRO_FEATURES.') |
| 192 | } |