ostree_2020.8.bb 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  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. LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
  9. DEPENDS = " \
  10. glib-2.0 \
  11. e2fsprogs \
  12. libcap \
  13. zlib \
  14. xz \
  15. bison-native \
  16. "
  17. # The Yocto mirror has an old export of ostree:
  18. # http://downloads.yoctoproject.org/mirror/sources/git2_github.com.ostreedev.ostree.tar.gz
  19. PREMIRRORS = ""
  20. SRC_URI = " \
  21. gitsm://github.com/ostreedev/ostree \
  22. file://run-ptest \
  23. "
  24. SRCREV = "3e289b19345e30d2da193cd208e109f7d7aaa2a1"
  25. UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+)"
  26. S = "${WORKDIR}/git"
  27. inherit autotools bash-completion gobject-introspection gtk-doc manpages pkgconfig ptest-gnome systemd
  28. # Package configuration - match ostree defaults, but without rofiles-fuse
  29. # otherwise we introduce a dependendency on meta-filesystems
  30. PACKAGECONFIG ??= " \
  31. ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \
  32. ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd libmount', '', d)} \
  33. glib \
  34. gpgme \
  35. soup \
  36. "
  37. # We include soup because ostree can't (currently) be built without
  38. # soup or curl - https://github.com/ostreedev/ostree/issues/1897
  39. PACKAGECONFIG_class-native ??= " \
  40. ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \
  41. builtin-grub2-mkconfig \
  42. gpgme \
  43. soup \
  44. "
  45. PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi"
  46. PACKAGECONFIG[builtin-grub2-mkconfig] = "--with-builtin-grub2-mkconfig, --without-builtin-grub2-mkconfig"
  47. PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl"
  48. PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut"
  49. PACKAGECONFIG[glib] = "--with-crypto=glib"
  50. PACKAGECONFIG[gjs] = "ac_cv_path_GJS=${bindir}/gjs"
  51. PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls"
  52. PACKAGECONFIG[gpgme] = "--with-gpgme, --without-gpgme, gpgme"
  53. PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive"
  54. PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux"
  55. PACKAGECONFIG[manpages] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native"
  56. PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio"
  57. PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2"
  58. PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl"
  59. PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse"
  60. PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
  61. PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack"
  62. PACKAGECONFIG[soup] = "--with-soup, --without-soup --disable-glibtest, libsoup-2.4"
  63. PACKAGECONFIG[static] = ""
  64. PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_unitdir}/system, --without-libsystemd, systemd"
  65. PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline"
  66. EXTRA_OECONF = " \
  67. ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \
  68. "
  69. # Makefile-libostree.am overrides this to avoid a build problem with clang,
  70. # but that fix breaks cross compilation and we don't need it
  71. EXTRA_OEMAKE = " \
  72. INTROSPECTION_SCANNER_ENV= \
  73. "
  74. EXTRA_OECONF_class-native = " \
  75. --enable-wrpseudo-compat \
  76. --disable-otmpfile \
  77. "
  78. # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the
  79. # do_configure stage so we do depend on it
  80. SYSROOT_DIR = "${STAGING_DIR_TARGET}"
  81. SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}"
  82. do_configure[vardeps] += "SYSROOT_DIR"
  83. do_configure_prepend() {
  84. # this reflects what autogen.sh does, but the OE wrappers for autoreconf
  85. # allow it to work without the other gyrations which exist there
  86. cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc
  87. cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc
  88. }
  89. do_install_append_class-native() {
  90. create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator"
  91. }
  92. PACKAGE_BEFORE_PN = " \
  93. ${PN}-dracut \
  94. ${PN}-grub \
  95. ${PN}-mkinitcpio \
  96. ${PN}-switchroot \
  97. ${PN}-trivial-httpd \
  98. "
  99. FILES_${PN} += " \
  100. ${nonarch_libdir}/${BPN} \
  101. ${nonarch_libdir}/tmpfiles.d \
  102. ${systemd_unitdir}/system \
  103. ${systemd_unitdir}/system-generators \
  104. "
  105. FILES_${PN}-dracut = " \
  106. ${sysconfdir}/dracut.conf.d \
  107. ${libdir}/dracut \
  108. "
  109. FILES_${PN}-grub = " \
  110. ${sysconfdir}/grub.d \
  111. ${libexecdir}/libostree/grub2-15_ostree \
  112. "
  113. FILES_${PN}-mkinitcpio = " \
  114. ${sysconfdir}/ostree-mkinitcpio.conf \
  115. ${libdir}/initcpio \
  116. "
  117. FILES_${PN}-switchroot = " \
  118. ${nonarch_libdir}/${BPN}/ostree-prepare-root \
  119. ${systemd_unitdir}/system/ostree-prepare-root.service \
  120. "
  121. FILES_${PN}-trivial-httpd = " \
  122. ${libexecdir}/libostree/ostree-trivial-httpd \
  123. "
  124. RDEPENDS_${PN} = " \
  125. ${@bb.utils.contains('PACKAGECONFIG', 'trivial-httpd-cmdline', '${PN}-trivial-httpd', '', d)} \
  126. "
  127. RDEPENDS_${PN}-dracut = "bash"
  128. RDEPENDS_${PN}-mkinitcpio = "bash"
  129. RDEPENDS_${PN}_class-target = " \
  130. ${@bb.utils.contains('PACKAGECONFIG', 'gpgme', 'gnupg', '', d)} \
  131. ${PN}-switchroot \
  132. "
  133. #
  134. # Note that to get ptest to pass you also need:
  135. #
  136. # xattr in DISTRO_FEATURES
  137. # static ostree-prepare-root (PACKAGECONFIG_append_pn-ostree = " static")
  138. # meta-python in your layers
  139. # overlayfs in your kernel (KERNEL_EXTRA_FEATURES += "features/overlayfs/overlayfs.scc")
  140. # busybox built statically
  141. # /var/tmp as a real filesystem (not a tmpfs)
  142. # Sufficient disk space (IMAGE_ROOTFS_SIZE = "524288") and RAM (QB_MEM = "-m 1024")
  143. #
  144. RDEPENDS_${PN}-ptest += " \
  145. attr \
  146. bash \
  147. coreutils \
  148. cpio \
  149. diffutils \
  150. findutils \
  151. grep \
  152. python3-core \
  153. python3-multiprocessing \
  154. strace \
  155. tar \
  156. util-linux \
  157. xz \
  158. ${PN}-trivial-httpd \
  159. ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-python', 'python3-pyyaml', '', d)} \
  160. ${@bb.utils.contains('PACKAGECONFIG', 'gjs', 'gjs', '', d)} \
  161. "
  162. RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils glibc-localedata-en-us"
  163. RRECOMMENDS_${PN} += "kernel-module-overlay"
  164. SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path"
  165. SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service"
  166. BBCLASSEXTEND = "native"