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