diff options
Diffstat (limited to 'meta-oe/recipes-extended/ostree/ostree_2023.2.bb')
| -rw-r--r-- | meta-oe/recipes-extended/ostree/ostree_2023.2.bb | 217 |
1 files changed, 217 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/ostree/ostree_2023.2.bb b/meta-oe/recipes-extended/ostree/ostree_2023.2.bb new file mode 100644 index 0000000000..2990122959 --- /dev/null +++ b/meta-oe/recipes-extended/ostree/ostree_2023.2.bb | |||
| @@ -0,0 +1,217 @@ | |||
| 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 = "LGPL-2.1-only" | ||
| 8 | |||
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" | ||
| 10 | |||
| 11 | DEPENDS = " \ | ||
| 12 | glib-2.0 \ | ||
| 13 | e2fsprogs \ | ||
| 14 | libcap \ | ||
| 15 | zlib \ | ||
| 16 | xz \ | ||
| 17 | bison-native \ | ||
| 18 | " | ||
| 19 | |||
| 20 | GITHUB_BASE_URI = "https://github.com/ostreedev/ostree/releases" | ||
| 21 | SRC_URI = " \ | ||
| 22 | ${GITHUB_BASE_URI}/download/v${PV}/libostree-${PV}.tar.xz \ | ||
| 23 | file://run-ptest \ | ||
| 24 | " | ||
| 25 | SRC_URI[sha256sum] = "ceb0788755a0bff5738d44543552fbf883cf71df481baa3ca7288da7a402bb85" | ||
| 26 | |||
| 27 | S = "${WORKDIR}/libostree-${PV}" | ||
| 28 | |||
| 29 | inherit autotools bash-completion gobject-introspection github-releases gtk-doc manpages pkgconfig ptest-gnome systemd | ||
| 30 | |||
| 31 | # Workaround compile failure: | ||
| 32 | # |../git/src/libotutil/zbase32.c:37:1: error: function returns an aggregate [-Werror=aggregate-return] | ||
| 33 | # so remove -Og and use -O2 as workaround | ||
| 34 | DEBUG_OPTIMIZATION:remove = "-Og" | ||
| 35 | DEBUG_OPTIMIZATION:append = " -O2" | ||
| 36 | BUILD_OPTIMIZATION:remove = "-Og" | ||
| 37 | BUILD_OPTIMIZATION:append = " -O2" | ||
| 38 | |||
| 39 | # Package configuration - match ostree defaults, but without rofiles-fuse | ||
| 40 | # otherwise we introduce a dependendency on meta-filesystems and swap | ||
| 41 | # soup for curl to avoid bringing in deprecated libsoup2 (though | ||
| 42 | # to run ptest requires that you have soup). | ||
| 43 | PACKAGECONFIG ??= " \ | ||
| 44 | ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ | ||
| 45 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd libmount', '', d)} \ | ||
| 46 | glib \ | ||
| 47 | gpgme \ | ||
| 48 | curl \ | ||
| 49 | " | ||
| 50 | |||
| 51 | # We include curl 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 | builtin-grub2-mkconfig \ | ||
| 56 | gpgme \ | ||
| 57 | curl \ | ||
| 58 | " | ||
| 59 | |||
| 60 | PACKAGECONFIG:class-nativesdk ??= " \ | ||
| 61 | ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ | ||
| 62 | builtin-grub2-mkconfig \ | ||
| 63 | gpgme \ | ||
| 64 | curl \ | ||
| 65 | " | ||
| 66 | |||
| 67 | PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi" | ||
| 68 | PACKAGECONFIG[builtin-grub2-mkconfig] = "--with-builtin-grub2-mkconfig, --without-builtin-grub2-mkconfig" | ||
| 69 | PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl" | ||
| 70 | PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut" | ||
| 71 | PACKAGECONFIG[ed25519-libsodium] = "--with-ed25519-libsodium, --without-ed25519-libsodium, libsodium" | ||
| 72 | PACKAGECONFIG[gjs] = "ac_cv_path_GJS=${bindir}/gjs" | ||
| 73 | PACKAGECONFIG[glib] = "--with-crypto=glib, , , , , gnutls openssl" | ||
| 74 | PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls, , , glib openssl" | ||
| 75 | PACKAGECONFIG[gpgme] = "--with-gpgme, --without-gpgme, gpgme" | ||
| 76 | PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive" | ||
| 77 | PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux" | ||
| 78 | PACKAGECONFIG[manpages] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native" | ||
| 79 | PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio" | ||
| 80 | PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2" | ||
| 81 | PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl, , , glib gnutls" | ||
| 82 | PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse3" | ||
| 83 | PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux, bubblewrap" | ||
| 84 | PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack" | ||
| 85 | PACKAGECONFIG[soup] = "--with-soup, --without-soup --disable-glibtest, libsoup-2.4" | ||
| 86 | PACKAGECONFIG[static] = "" | ||
| 87 | PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-libsystemd, systemd" | ||
| 88 | PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline" | ||
| 89 | |||
| 90 | EXTRA_OECONF = " \ | ||
| 91 | ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \ | ||
| 92 | " | ||
| 93 | |||
| 94 | # Makefile-libostree.am overrides this to avoid a build problem with clang, | ||
| 95 | # but that fix breaks cross compilation and we don't need it | ||
| 96 | EXTRA_OEMAKE = " \ | ||
| 97 | INTROSPECTION_SCANNER_ENV= \ | ||
| 98 | " | ||
| 99 | |||
| 100 | EXTRA_OECONF:class-native = " \ | ||
| 101 | --enable-wrpseudo-compat \ | ||
| 102 | --disable-otmpfile \ | ||
| 103 | " | ||
| 104 | |||
| 105 | EXTRA_OECONF:class-nativesdk = " \ | ||
| 106 | --enable-wrpseudo-compat \ | ||
| 107 | --disable-otmpfile \ | ||
| 108 | " | ||
| 109 | |||
| 110 | # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the | ||
| 111 | # do_configure stage so we do depend on it | ||
| 112 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" | ||
| 113 | SYSROOT_DIR:class-native = "${STAGING_DIR_NATIVE}" | ||
| 114 | do_configure[vardeps] += "SYSROOT_DIR" | ||
| 115 | |||
| 116 | do_configure:prepend() { | ||
| 117 | # this reflects what autogen.sh does, but the OE wrappers for autoreconf | ||
| 118 | # allow it to work without the other gyrations which exist there | ||
| 119 | cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc | ||
| 120 | cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc | ||
| 121 | } | ||
| 122 | |||
| 123 | do_install:append:class-native() { | ||
| 124 | create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" | ||
| 125 | } | ||
| 126 | |||
| 127 | do_install:append:class-nativesdk() { | ||
| 128 | create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="\$OECORE_NATIVE_SYSROOT/usr/lib/ostree/ostree-grub-generator" | ||
| 129 | } | ||
| 130 | |||
| 131 | PACKAGE_BEFORE_PN = " \ | ||
| 132 | ${PN}-dracut \ | ||
| 133 | ${PN}-grub \ | ||
| 134 | ${PN}-mkinitcpio \ | ||
| 135 | ${PN}-switchroot \ | ||
| 136 | ${PN}-trivial-httpd \ | ||
| 137 | " | ||
| 138 | |||
| 139 | FILES:${PN} += " \ | ||
| 140 | ${nonarch_libdir}/${BPN} \ | ||
| 141 | ${nonarch_libdir}/tmpfiles.d \ | ||
| 142 | ${systemd_system_unitdir} \ | ||
| 143 | ${systemd_unitdir}/system-generators \ | ||
| 144 | " | ||
| 145 | FILES:${PN}-dracut = " \ | ||
| 146 | ${sysconfdir}/dracut.conf.d \ | ||
| 147 | ${libdir}/dracut \ | ||
| 148 | " | ||
| 149 | FILES:${PN}-grub = " \ | ||
| 150 | ${sysconfdir}/grub.d \ | ||
| 151 | ${libexecdir}/libostree/grub2-15_ostree \ | ||
| 152 | " | ||
| 153 | FILES:${PN}-mkinitcpio = " \ | ||
| 154 | ${sysconfdir}/ostree-mkinitcpio.conf \ | ||
| 155 | ${libdir}/initcpio \ | ||
| 156 | " | ||
| 157 | FILES:${PN}-switchroot = " \ | ||
| 158 | ${nonarch_libdir}/${BPN}/ostree-prepare-root \ | ||
| 159 | ${systemd_system_unitdir}/ostree-prepare-root.service \ | ||
| 160 | " | ||
| 161 | FILES:${PN}-trivial-httpd = " \ | ||
| 162 | ${libexecdir}/libostree/ostree-trivial-httpd \ | ||
| 163 | " | ||
| 164 | |||
| 165 | RDEPENDS:${PN} = " \ | ||
| 166 | ${@bb.utils.contains('PACKAGECONFIG', 'trivial-httpd-cmdline', '${PN}-trivial-httpd', '', d)} \ | ||
| 167 | " | ||
| 168 | RDEPENDS:${PN}-dracut = "bash" | ||
| 169 | RDEPENDS:${PN}-mkinitcpio = "bash" | ||
| 170 | RDEPENDS:${PN}:class-target = " \ | ||
| 171 | ${@bb.utils.contains('PACKAGECONFIG', 'gpgme', 'gnupg', '', d)} \ | ||
| 172 | ${PN}-switchroot \ | ||
| 173 | " | ||
| 174 | |||
| 175 | # | ||
| 176 | # Note that to get ptest to pass you also need: | ||
| 177 | # | ||
| 178 | # xattr in DISTRO_FEATURES (default) | ||
| 179 | # static ostree-prepare-root | ||
| 180 | # ostree-trivial-httpd (requires soup - note soup and curl can coexist) | ||
| 181 | # overlayfs in your kernel | ||
| 182 | # busybox built statically | ||
| 183 | # C.UTF-8 locale available (default) | ||
| 184 | # Sufficient disk space/RAM (e.g. core-image-sato-sdk) | ||
| 185 | # | ||
| 186 | # Something like this in your local.conf: | ||
| 187 | # | ||
| 188 | # PACKAGECONFIG:append:pn-ostree = " static soup" | ||
| 189 | # KERNEL_EXTRA_FEATURES:append = " features/overlayfs/overlayfs.scc" | ||
| 190 | # TARGET_CFLAGS:append:pn-busybox = " -static" | ||
| 191 | # | ||
| 192 | RDEPENDS:${PN}-ptest += " \ | ||
| 193 | attr \ | ||
| 194 | bash \ | ||
| 195 | coreutils \ | ||
| 196 | cpio \ | ||
| 197 | diffutils \ | ||
| 198 | findutils \ | ||
| 199 | grep \ | ||
| 200 | python3-core \ | ||
| 201 | python3-multiprocessing \ | ||
| 202 | strace \ | ||
| 203 | tar \ | ||
| 204 | util-linux \ | ||
| 205 | xz \ | ||
| 206 | ${PN}-trivial-httpd \ | ||
| 207 | python3-pyyaml \ | ||
| 208 | ${@bb.utils.contains('PACKAGECONFIG', 'gjs', 'gjs', '', d)} \ | ||
| 209 | " | ||
| 210 | RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-localedata-en-us" | ||
| 211 | |||
| 212 | RRECOMMENDS:${PN}:append:class-target = " kernel-module-overlay" | ||
| 213 | |||
| 214 | SYSTEMD_SERVICE:${PN} = "ostree-remount.service ostree-finalize-staged.path" | ||
| 215 | SYSTEMD_SERVICE:${PN}-switchroot = "ostree-prepare-root.service" | ||
| 216 | |||
| 217 | BBCLASSEXTEND = "native nativesdk" | ||
