From fadf647d3ec0d3b948841defa5574b60ba223310 Mon Sep 17 00:00:00 2001 From: Jose Quaresma Date: Fri, 27 Oct 2023 10:13:50 +0100 Subject: ostree: Upgrade 2023.5 -> 2023.6 dab8051f Release 2023.6 bd91fda6 Merge pull request #3010 from cgwalters/more-composefs-fixes 3648c5ae build-sys: Really fix composefs check db3b286d Merge pull request #3009 from cgwalters/c9s-ci bcd4d026 Merge pull request #3007 from cgwalters/optin-new-bootloader-naming 33ef4ae6 build-sys: Look for both linux/mount.h and sys/mount.h bd8339bd ci: Add c9s build cbe36c3a Merge pull request #3008 from ostreedev/maybe_ostree 29423a89 prepare-root: If composefs is configured as "maybe" don't fail 02d41907 deploy: Add bootloader-naming-2 opt-init fb06d59e Merge pull request #3003 from cgwalters/prepare-root-oscore-and-units 20b8cb17 Move prepare-root karg helpers into otcore, add unit tests 44519492 Merge pull request #2997 from cgwalters/test-cleanups-1 37f247da Merge pull request #2999 from cgwalters/add-oscore-units aa8ad204 Merge pull request #3001 from cgwalters/misc-c99-style-4 75a43deb cmd/grub2-generate: Port to C99 style 767ca134 cmd/init: Port to C99 style e3ef72ea Merge pull request #3000 from cgwalters/test-inst-update 6eeb8b56 Merge pull request #2995 from ostreedev/dependabot/submodules/composefs-1aed878 e751dd9a Merge pull request #2998 from cgwalters/disable-composefs-too-old facb9a1a tests/inst: Update to latest ostree-ext 7c82340d Merge pull request #2975 from ostreedev/androidboot-single-slot-mode e3f0c4d4 tests: Add otcore unit tests 90e54619 build-sys: Disable composefs on too-old Linux headers 6e9e50d8 prepare-root: Changes made to find_proc_cmdline_key 650a0537 prepare-root: On a non-A/B androidboot system, boot system slot a 16b97d8a Merge pull request #2996 from cgwalters/misc-c99-style-3 578c87e7 tests/destructive: Port more to xshell 8f302f2a cli/set-origin: Port to C99 style 69d7d837 build(deps): bump composefs from `a6e827d` to `1aed878` ee1e585e Merge pull request #2993 from cgwalters/misc-c99-style-2 22b47781 checkout: Port to C99 style f7786e75 Merge pull request #2990 from cgwalters/init-is-stateroot 27266f90 lzma: Port to C99 style 722fc2d0 Merge pull request #2991 from cgwalters/misc-c99-style 9f39f78e remote-add: Port to c99 style 9036c96a admin: Port to c99 style f4e56b91 admin-deploy: Add `--stateroot` as alias for `--os` 9d5ccfef Add `ostree admin stateroot-init` as alias for `os-init` 9ac938c4 Merge pull request #2989 from cgwalters/lock-timeout-longer f4b42049 Merge pull request #2973 from ostreedev/dependabot/submodules/composefs-a6e827d e88ec69e repo: Bump lock timeout to 5 minutes 55121cc4 Merge pull request #2988 from cgwalters/prepare-root-binding-key d648eea6 Merge pull request #2987 from cgwalters/prefix-stage-deploy 94cb37cb prepare-root: Minor clarifications 25a458b9 deploy: Add some error prefixing 8712a467 Merge pull request #2985 from cgwalters/cleanup-proc-cmdline 083bad8c Merge pull request #2984 from alexlarsson/prepare-root-no-raw-key 28aed49d switchroot,generator: Only read /proc/cmdline once 0a79b3b1 prepare-root: Only support base64 formated public key files c94388f3 Merge pull request #2980 from cgwalters/prepare-root-minor 871d32a5 prepare-root: Use ptrarray, not linked list 678bfcd9 prepare-root: Check for empty string, not strlen > 0 bea5d897 prepare-root: Use declare-and-initialize 3620d3c7 Merge pull request #2979 from cgwalters/enabled-discussions d324f684 Merge pull request #2974 from alexlarsson/composefs-config-file f1c1f819 README.md: Drop dead mailing list, link to GH discussions 81fa2141 Read composefs configuration from initrd instead of commandline 2cc6b531 Merge pull request #2966 from cgwalters/ostree-admin-edit b108e24c build(deps): bump composefs from `1704f82` to `a6e827d` c57c0056 Merge pull request #2958 from cgwalters/deploy-loosen-etc-usretc 7f70614a Merge pull request #2969 from cgwalters/fix-sync-pthreads a31f7798 Merge pull request #2967 from cgwalters/drop-trivial-httpd-entrypoint 402e0428 deploy: Fix mutex locking for global sync timeout 60b46556 More fully drop `trivial-httpd` entrypoint 3cd3251a Add `admin set-default` 09160c1a Merge pull request #2962 from cgwalters/os-init-remount ac42e29d os-init: Create a mount namespace 113e575e Merge pull request #2963 from cgwalters/more-gfileinfo-fix 15cb0b47 composefs: Only call `_get_symlink_target()` on symlinks f44909f8 Merge pull request #2960 from ostreedev/dependabot/submodules/libglnx-c02eb59 a16a14a6 build(deps): bump libglnx from `07e3e49` to `c02eb59` fd968d59 Merge pull request #2957 from cgwalters/transaction-test-suppress-global-sync 0406fd39 deploy: Support an empty `/etc` and populated `/usr/etc` 6470429b tests/destructive: Turn off global sync() a2663e80 Merge pull request #2956 from cgwalters/finalize-more-verbose 3d881fee deploy: Be way more verbose about what we're doing 1aed5d7c Merge pull request #2954 from cgwalters/harden-gvariant-get-data 5b372596 checksum-utils: Add an assertion that `buf != NULL` 0392b546 core, switchroot: Harden a bit against `g_variant_get_data() == NULL` d7d66121 Merge pull request #2953 from samcday/patch-1 66e42553 Merge pull request #2930 from cgwalters/prepare-root-config3 b5397887 docs: update boot loader spec link af52a88d Merge pull request #2952 from cgwalters/silence-variant-lookup 13e7ae90 tree-wide: Consistently `(void)g_variant_lookup()` 34656260 prepare-root: Don't parse target root when composefs enabled 83d37d6d prepare-root: Default sysroot.readonly=true if composefs 22b8e4f9 prepare-root: Introduce `ostree/prepare-root.conf` 250c40a6 Merge pull request #2948 from cgwalters/composefs-more-cleanups 3f594b04 Merge pull request #2951 from cgwalters/errprefix-sysroot 5e2eedee Merge pull request #2949 from cgwalters/kargs-cleanup cf525ee6 repo: Clarify when we fail to parse a remote 70d790ab sysroot: Add a bit more error prefixing 82da0e16 Merge pull request #2950 from cgwalters/generator-cleanup d7fe9e54 kernel-args: Move private functions out of public header 303e7eb2 src/generator: Move all logic into libostree-1.so ec1109c7 generator: Stop creating `/run/ostree-booted` 64afbcde composefs: Use lowerdir in /run 4c0e5b1e Merge pull request #2942 from ostreedev/android-bootloader-parsing a035c2e2 Merge pull request #2946 from cgwalters/add-inode-fix-feature 8ce7bbe1 Add an always-on `inode64` feature c89baaed bootloader: fold all Android Bootloader specific logic into prepare-root 55936165 Merge pull request #2943 from cgwalters/mount-cleanup 253e7758 Merge pull request #2944 from cgwalters/prepare-root-more-cleanup e61226a8 prepare-root: Drop more dead code 41cda3bd prepare-root: Drop code mounting `/proc` b258375f Merge pull request #2938 from cgwalters/dedup-ostree-parsing b548ff74 Merge pull request #2939 from cgwalters/ed25519-cleanups 6966979c generator: Deduplicate ostree= karg parsing fc303da6 sign-ed25519: Don't set sk unless we've validated it 3a18a557 sign-ed25519: Add some comments for data structure fb40e559 sign-ed25519: More verbose errors for invalid length 1a2fac37 tests: Remove dead references to "SEED" 1c0fd7d4 Merge pull request #2937 from ericcurtin/ostree2androidboot.slot_suffix 355cd727 Remove steal_pointer and steal_pointer_impl as we link in glib now a6f0a571 android-boot: Remove dependency on ostree= karg, use androidboot.slot_suffix= 27a9fe30 Merge pull request #2936 from cgwalters/sign-from-file 7bbe13ca Merge pull request #2931 from cgwalters/prepare-root-man de81a7e7 Merge pull request #2929 from cgwalters/prepare-root-drop-pivot 8302a8ad Merge pull request #2927 from cgwalters/sysroot-errprefix-bootlinks 845d68d1 Merge pull request #2935 from cgwalters/prepare-root-config4 82d93491 commit: Add `--sign-from-file` d4ca834b prepare-root: Refactor composefs config handling 18d6f597 Merge pull request #2934 from cgwalters/enable-composefs-default 592351d1 build-sys: Enable composefs at *build time* by default 3d29f89c Merge pull request #2928 from cgwalters/prepare-root-config c1ac6bc3 Merge pull request #2932 from cgwalters/aboot-fix-nullderef c078e8be mount: Fix gcc -fanalyzer warning for parsing androidboot.slot_suffix c4f1d18a Merge pull request #2920 from ostreedev/dependabot/submodules/composefs-1704f82 1e4cb30c man: Add ostree-prepare-root 0eda15ce Use /run/ostree-booted metadata for sysroot-ro state passing 79806a68 prepare-root: Drop dead `pivot_root` code b8d66964 remount: Use new metadata in `/run/ostree-booted` for composefs 77acad24 remount: Don't overwrite /run/ostree-booted 93699cc5 prepare-root: Add metadata for composefs to `/run/ostree-booted` bafb5512 prepare-root: Use constant for ed25519 signature 6cdc5ce5 Merge pull request #2926 from cgwalters/otcore-cfs-constants 6769d66d sysroot: Add some error prefixing for bootversion 18cc4472 prepare-root: Drop unused verity flag querying 2b738a99 prepare-root: Use otutil and g_print 1b7b4fbd Add an internal constant for the composefs image name c0c2c9bd Merge pull request #2924 from cgwalters/drop-syntax-check 65912106 build: Drop `make syntax-check` 57fe33f0 Merge pull request #2921 from alexlarsson/composefs-sign-v2 c29f4193 ostree-prepare-root: Validate ed25519 signatures when requested b8ff2109 Factor out a libotcore 265cf7d7 build-sys: Add libsodium to OT_DEP_CRYPTO a6d9c714 Merge pull request #2922 from alexlarsson/openssl-ed25519 744967a6 libotutil: Link to crypto libs 474c2b10 CI: Enable --with-crypto=openssl on debian testing to test openssl signatures 7b85adfb sign-ed25519: Implement sign and verify using openssl 501575c1 sign-ed25519: Drop some uses of libsodium 5b727751 Merge pull request #2923 from alexlarsson/fix-composefs-test 62e4f376 tests: Fix composefs test eb011120 show: Add --print-hex 6056ec13 Merge pull request #2913 from cgwalters/tmpfile-not-on-revokefs 8a4a0c16 build(deps): bump composefs from `ac729b5` to `1704f82` 43fb2787 Merge pull request #2918 from ostreedev/dependabot/submodules/composefs-ac729b5 25120bd7 Merge pull request #2912 from cgwalters/itest-transactionality-debug 61720180 Merge pull request #1633 from cgwalters/pkglibexec-tests ba9c9ded fetcher: Always open tmpfiles in repo (except on FUSE) 9104c54f Merge pull request #2905 from cgwalters/prepare-root-static-split 01be14e6 build(deps): bump composefs from `412cb5e` to `ac729b5` 0c36e814 Drop "ostree trivial-httpd" CLI, move to tests directory 8ad8a79c Merge pull request #2916 from cgwalters/release b2cfee72 Merge pull request #2914 from cgwalters/doc-usergroups 5aadb6ec configure: post-release version bump 875915f6 prepare-root: Link to glib d6799ecc Separate prepare-root static path 786e64ce docs: Update user and group section 8bba482b tests: Enable mtime test 0b519c25 tests: Drop unused alias 54c73155 tests/transactionality: Port a bit to xshell Signed-off-by: Jose Quaresma Signed-off-by: Khem Raj --- meta-oe/recipes-extended/ostree/ostree_2023.5.bb | 222 ----------------------- meta-oe/recipes-extended/ostree/ostree_2023.6.bb | 222 +++++++++++++++++++++++ 2 files changed, 222 insertions(+), 222 deletions(-) delete mode 100644 meta-oe/recipes-extended/ostree/ostree_2023.5.bb create mode 100644 meta-oe/recipes-extended/ostree/ostree_2023.6.bb diff --git a/meta-oe/recipes-extended/ostree/ostree_2023.5.bb b/meta-oe/recipes-extended/ostree/ostree_2023.5.bb deleted file mode 100644 index bc465dd624..0000000000 --- a/meta-oe/recipes-extended/ostree/ostree_2023.5.bb +++ /dev/null @@ -1,222 +0,0 @@ -SUMMARY = "Versioned Operating System Repository." -DESCRIPTION = "libostree is both a shared library and suite of command line \ -tools that combines a \"git-like\" model for committing and downloading \ -bootable filesystem trees, along with a layer for deploying them and managing \ -the bootloader configuration." -HOMEPAGE = "https://ostree.readthedocs.io" -LICENSE = "LGPL-2.1-only" - -LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" - -DEPENDS = " \ - glib-2.0-native \ - glib-2.0 \ - e2fsprogs \ - libcap \ - zlib \ - xz \ - bison-native \ -" - -GITHUB_BASE_URI = "https://github.com/ostreedev/ostree/releases" -SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libostree-${PV}.tar.xz \ - file://run-ptest \ - " -SRC_URI[sha256sum] = "bc593afb31fe1ac3d50419f917fafe321a0a3561d7bb2ba498a83740fe3adb14" - -S = "${WORKDIR}/libostree-${PV}" - -inherit autotools bash-completion gobject-introspection github-releases gtk-doc manpages pkgconfig ptest-gnome systemd - -COMPATIBLE_HOST:riscv32 = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'null', 'riscv32', d)}" - -UNKNOWN_CONFIGURE_OPT_IGNORE = "--disable-introspection --enable-introspection" - -# Workaround compile failure: -# |../git/src/libotutil/zbase32.c:37:1: error: function returns an aggregate [-Werror=aggregate-return] -# so remove -Og and use -O2 as workaround -DEBUG_OPTIMIZATION:remove = "-Og" -DEBUG_OPTIMIZATION:append = " -O2" -BUILD_OPTIMIZATION:remove = "-Og" -BUILD_OPTIMIZATION:append = " -O2" - -# Package configuration - match ostree defaults, but without rofiles-fuse -# otherwise we introduce a dependendency on meta-filesystems and swap -# soup for curl to avoid bringing in deprecated libsoup2 (though -# to run ptest requires that you have soup2 or soup3). -PACKAGECONFIG ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd libmount', '', d)} \ - glib \ - gpgme \ - curl \ -" - -# We include curl because ostree can't (currently) be built without -# soup or curl - https://github.com/ostreedev/ostree/issues/1897 -PACKAGECONFIG:class-native ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ - builtin-grub2-mkconfig \ - gpgme \ - curl \ -" - -PACKAGECONFIG:class-nativesdk ??= " \ - ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ - builtin-grub2-mkconfig \ - gpgme \ - curl \ -" - -PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi" -PACKAGECONFIG[builtin-grub2-mkconfig] = "--with-builtin-grub2-mkconfig, --without-builtin-grub2-mkconfig" -PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl" -PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut" -PACKAGECONFIG[ed25519-libsodium] = "--with-ed25519-libsodium, --without-ed25519-libsodium, libsodium" -PACKAGECONFIG[gjs] = "ac_cv_path_GJS=${bindir}/gjs" -PACKAGECONFIG[glib] = "--with-crypto=glib, , , , , gnutls openssl" -PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls, , , glib openssl" -PACKAGECONFIG[gpgme] = "--with-gpgme, --without-gpgme, gpgme" -PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive" -PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux" -PACKAGECONFIG[manpages] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native" -PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio" -PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2" -PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl, , , glib gnutls" -PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse3" -PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux, bubblewrap" -PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack" -PACKAGECONFIG[soup2] = "--with-soup, --without-soup, libsoup-2.4, , , soup3" -PACKAGECONFIG[soup3] = "--with-soup3, --without-soup3, libsoup, , , soup2" -PACKAGECONFIG[static] = "" -PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-libsystemd, systemd" -PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline" - -EXTRA_OECONF = " \ - ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \ -" - -# Makefile-libostree.am overrides this to avoid a build problem with clang, -# but that fix breaks cross compilation and we don't need it -EXTRA_OEMAKE = " \ - INTROSPECTION_SCANNER_ENV= \ -" - -EXTRA_OECONF:class-native = " \ - --enable-wrpseudo-compat \ - --disable-otmpfile \ -" - -EXTRA_OECONF:class-nativesdk = " \ - --enable-wrpseudo-compat \ - --disable-otmpfile \ -" - -# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the -# do_configure stage so we do depend on it -SYSROOT_DIR = "${STAGING_DIR_TARGET}" -SYSROOT_DIR:class-native = "${STAGING_DIR_NATIVE}" -do_configure[vardeps] += "SYSROOT_DIR" - -do_configure:prepend() { - # this reflects what autogen.sh does, but the OE wrappers for autoreconf - # allow it to work without the other gyrations which exist there - cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc - cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc -} - -do_install:append:class-native() { - create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" -} - -do_install:append:class-nativesdk() { - create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="\$OECORE_NATIVE_SYSROOT/usr/lib/ostree/ostree-grub-generator" -} - -PACKAGE_BEFORE_PN = " \ - ${PN}-dracut \ - ${PN}-grub \ - ${PN}-mkinitcpio \ - ${PN}-switchroot \ - ${PN}-trivial-httpd \ -" - -FILES:${PN} += " \ - ${nonarch_libdir}/${BPN} \ - ${nonarch_libdir}/tmpfiles.d \ - ${systemd_system_unitdir} \ - ${systemd_unitdir}/system-generators \ -" -FILES:${PN}-dracut = " \ - ${sysconfdir}/dracut.conf.d \ - ${libdir}/dracut \ -" -FILES:${PN}-grub = " \ - ${sysconfdir}/grub.d \ - ${libexecdir}/libostree/grub2-15_ostree \ -" -FILES:${PN}-mkinitcpio = " \ - ${sysconfdir}/ostree-mkinitcpio.conf \ - ${libdir}/initcpio \ -" -FILES:${PN}-switchroot = " \ - ${nonarch_libdir}/${BPN}/ostree-prepare-root \ - ${systemd_system_unitdir}/ostree-prepare-root.service \ -" -FILES:${PN}-trivial-httpd = " \ - ${libexecdir}/libostree/ostree-trivial-httpd \ -" - -RDEPENDS:${PN} = " \ - ${@bb.utils.contains('PACKAGECONFIG', 'trivial-httpd-cmdline', '${PN}-trivial-httpd', '', d)} \ -" -RDEPENDS:${PN}-dracut = "bash" -RDEPENDS:${PN}-mkinitcpio = "bash" -RDEPENDS:${PN}:class-target = " \ - ${@bb.utils.contains('PACKAGECONFIG', 'gpgme', 'gnupg', '', d)} \ - ${PN}-switchroot \ -" - -# -# Note that to get ptest to pass you also need: -# -# xattr in DISTRO_FEATURES (default) -# static ostree-prepare-root -# ostree-trivial-httpd (requires soup - note soup and curl can coexist) -# overlayfs in your kernel -# busybox built statically -# C.UTF-8 locale available (default) -# Sufficient disk space/RAM (e.g. core-image-sato-sdk) -# -# Something like this in your local.conf: -# -# PACKAGECONFIG:append:pn-ostree = " static soup3" -# KERNEL_EXTRA_FEATURES:append = " features/overlayfs/overlayfs.scc" -# TARGET_CFLAGS:append:pn-busybox = " -static" -# -RDEPENDS:${PN}-ptest += " \ - attr \ - bash \ - coreutils \ - cpio \ - diffutils \ - findutils \ - grep \ - python3-core \ - python3-multiprocessing \ - strace \ - tar \ - util-linux \ - xz \ - ${PN}-trivial-httpd \ - python3-pyyaml \ - ${@bb.utils.contains('PACKAGECONFIG', 'gjs', 'gjs', '', d)} \ -" -RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-localedata-en-us" - -RRECOMMENDS:${PN}:append:class-target = " kernel-module-overlay" - -SYSTEMD_SERVICE:${PN} = "ostree-remount.service ostree-finalize-staged.path" -SYSTEMD_SERVICE:${PN}-switchroot = "ostree-prepare-root.service" - -BBCLASSEXTEND = "native nativesdk" diff --git a/meta-oe/recipes-extended/ostree/ostree_2023.6.bb b/meta-oe/recipes-extended/ostree/ostree_2023.6.bb new file mode 100644 index 0000000000..f567e6afe3 --- /dev/null +++ b/meta-oe/recipes-extended/ostree/ostree_2023.6.bb @@ -0,0 +1,222 @@ +SUMMARY = "Versioned Operating System Repository." +DESCRIPTION = "libostree is both a shared library and suite of command line \ +tools that combines a \"git-like\" model for committing and downloading \ +bootable filesystem trees, along with a layer for deploying them and managing \ +the bootloader configuration." +HOMEPAGE = "https://ostree.readthedocs.io" +LICENSE = "LGPL-2.1-only" + +LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" + +DEPENDS = " \ + glib-2.0-native \ + glib-2.0 \ + e2fsprogs \ + libcap \ + zlib \ + xz \ + bison-native \ +" + +GITHUB_BASE_URI = "https://github.com/ostreedev/ostree/releases" +SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/libostree-${PV}.tar.xz \ + file://run-ptest \ + " +SRC_URI[sha256sum] = "b43c4a373799681989bae12b3a1b94f453068dece6540b8e05a23b834c1037e2" + +S = "${WORKDIR}/libostree-${PV}" + +inherit autotools bash-completion gobject-introspection github-releases gtk-doc manpages pkgconfig ptest-gnome systemd + +COMPATIBLE_HOST:riscv32 = "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'null', 'riscv32', d)}" + +UNKNOWN_CONFIGURE_OPT_IGNORE = "--disable-introspection --enable-introspection" + +# Workaround compile failure: +# |../git/src/libotutil/zbase32.c:37:1: error: function returns an aggregate [-Werror=aggregate-return] +# so remove -Og and use -O2 as workaround +DEBUG_OPTIMIZATION:remove = "-Og" +DEBUG_OPTIMIZATION:append = " -O2" +BUILD_OPTIMIZATION:remove = "-Og" +BUILD_OPTIMIZATION:append = " -O2" + +# Package configuration - match ostree defaults, but without rofiles-fuse +# otherwise we introduce a dependendency on meta-filesystems and swap +# soup for curl to avoid bringing in deprecated libsoup2 (though +# to run ptest requires that you have soup2 or soup3). +PACKAGECONFIG ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd libmount', '', d)} \ + glib \ + gpgme \ + curl \ +" + +# We include curl because ostree can't (currently) be built without +# soup or curl - https://github.com/ostreedev/ostree/issues/1897 +PACKAGECONFIG:class-native ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ + builtin-grub2-mkconfig \ + gpgme \ + curl \ +" + +PACKAGECONFIG:class-nativesdk ??= " \ + ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ + builtin-grub2-mkconfig \ + gpgme \ + curl \ +" + +PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi" +PACKAGECONFIG[builtin-grub2-mkconfig] = "--with-builtin-grub2-mkconfig, --without-builtin-grub2-mkconfig" +PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl" +PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut" +PACKAGECONFIG[ed25519-libsodium] = "--with-ed25519-libsodium, --without-ed25519-libsodium, libsodium" +PACKAGECONFIG[gjs] = "ac_cv_path_GJS=${bindir}/gjs" +PACKAGECONFIG[glib] = "--with-crypto=glib, , , , , gnutls openssl" +PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls, , , glib openssl" +PACKAGECONFIG[gpgme] = "--with-gpgme, --without-gpgme, gpgme" +PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive" +PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux" +PACKAGECONFIG[manpages] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native" +PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio" +PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2" +PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl, , , glib gnutls" +PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse3" +PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux, bubblewrap" +PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack" +PACKAGECONFIG[soup2] = "--with-soup, --without-soup, libsoup-2.4, , , soup3" +PACKAGECONFIG[soup3] = "--with-soup3, --without-soup3, libsoup, , , soup2" +PACKAGECONFIG[static] = "" +PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_system_unitdir}, --without-libsystemd, systemd" +PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline" + +EXTRA_OECONF = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \ +" + +# Makefile-libostree.am overrides this to avoid a build problem with clang, +# but that fix breaks cross compilation and we don't need it +EXTRA_OEMAKE = " \ + INTROSPECTION_SCANNER_ENV= \ +" + +EXTRA_OECONF:class-native = " \ + --enable-wrpseudo-compat \ + --disable-otmpfile \ +" + +EXTRA_OECONF:class-nativesdk = " \ + --enable-wrpseudo-compat \ + --disable-otmpfile \ +" + +# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the +# do_configure stage so we do depend on it +SYSROOT_DIR = "${STAGING_DIR_TARGET}" +SYSROOT_DIR:class-native = "${STAGING_DIR_NATIVE}" +do_configure[vardeps] += "SYSROOT_DIR" + +do_configure:prepend() { + # this reflects what autogen.sh does, but the OE wrappers for autoreconf + # allow it to work without the other gyrations which exist there + cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc + cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc +} + +do_install:append:class-native() { + create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" +} + +do_install:append:class-nativesdk() { + create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="\$OECORE_NATIVE_SYSROOT/usr/lib/ostree/ostree-grub-generator" +} + +PACKAGE_BEFORE_PN = " \ + ${PN}-dracut \ + ${PN}-grub \ + ${PN}-mkinitcpio \ + ${PN}-switchroot \ + ${PN}-trivial-httpd \ +" + +FILES:${PN} += " \ + ${nonarch_libdir}/${BPN} \ + ${nonarch_libdir}/tmpfiles.d \ + ${systemd_system_unitdir} \ + ${systemd_unitdir}/system-generators \ +" +FILES:${PN}-dracut = " \ + ${sysconfdir}/dracut.conf.d \ + ${libdir}/dracut \ +" +FILES:${PN}-grub = " \ + ${sysconfdir}/grub.d \ + ${libexecdir}/libostree/grub2-15_ostree \ +" +FILES:${PN}-mkinitcpio = " \ + ${sysconfdir}/ostree-mkinitcpio.conf \ + ${libdir}/initcpio \ +" +FILES:${PN}-switchroot = " \ + ${nonarch_libdir}/${BPN}/ostree-prepare-root \ + ${systemd_system_unitdir}/ostree-prepare-root.service \ +" +FILES:${PN}-trivial-httpd = " \ + ${libexecdir}/libostree/ostree-trivial-httpd \ +" + +RDEPENDS:${PN} = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'trivial-httpd-cmdline', '${PN}-trivial-httpd', '', d)} \ +" +RDEPENDS:${PN}-dracut = "bash" +RDEPENDS:${PN}-mkinitcpio = "bash" +RDEPENDS:${PN}:class-target = " \ + ${@bb.utils.contains('PACKAGECONFIG', 'gpgme', 'gnupg', '', d)} \ + ${PN}-switchroot \ +" + +# +# Note that to get ptest to pass you also need: +# +# xattr in DISTRO_FEATURES (default) +# static ostree-prepare-root +# ostree-trivial-httpd (requires soup - note soup and curl can coexist) +# overlayfs in your kernel +# busybox built statically +# C.UTF-8 locale available (default) +# Sufficient disk space/RAM (e.g. core-image-sato-sdk) +# +# Something like this in your local.conf: +# +# PACKAGECONFIG:append:pn-ostree = " static soup3" +# KERNEL_EXTRA_FEATURES:append = " features/overlayfs/overlayfs.scc" +# TARGET_CFLAGS:append:pn-busybox = " -static" +# +RDEPENDS:${PN}-ptest += " \ + attr \ + bash \ + coreutils \ + cpio \ + diffutils \ + findutils \ + grep \ + python3-core \ + python3-multiprocessing \ + strace \ + tar \ + util-linux \ + xz \ + ${PN}-trivial-httpd \ + python3-pyyaml \ + ${@bb.utils.contains('PACKAGECONFIG', 'gjs', 'gjs', '', d)} \ +" +RDEPENDS:${PN}-ptest:append:libc-glibc = " glibc-utils glibc-localedata-en-us" + +RRECOMMENDS:${PN}:append:class-target = " kernel-module-overlay" + +SYSTEMD_SERVICE:${PN} = "ostree-remount.service ostree-finalize-staged.path" +SYSTEMD_SERVICE:${PN}-switchroot = "ostree-prepare-root.service" + +BBCLASSEXTEND = "native nativesdk" -- cgit v1.2.3-54-g00ecf