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