diff options
4 files changed, 307 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/ostree/ostree/0001-Always-enable-trivial-httpd-for-tests.patch b/meta-oe/recipes-extended/ostree/ostree/0001-Always-enable-trivial-httpd-for-tests.patch new file mode 100644 index 0000000000..c9e1306afd --- /dev/null +++ b/meta-oe/recipes-extended/ostree/ostree/0001-Always-enable-trivial-httpd-for-tests.patch | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | From 44e0647230b22cd136ae2fb252ce90eed4751970 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alex Kiernan <alex.kiernan@gmail.com> | ||
| 3 | Date: Wed, 4 Sep 2019 17:29:15 +0100 | ||
| 4 | Subject: [PATCH 1/2] Always enable trivial-httpd for tests | ||
| 5 | |||
| 6 | When running tests we always need ostree-trivial-httpd, so enable it | ||
| 7 | unconditionally | ||
| 8 | |||
| 9 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
| 10 | Upstream-Status: Submitted [https://github.com/ostreedev/ostree/pull/1912] | ||
| 11 | --- | ||
| 12 | Makefile.am | 1 + | ||
| 13 | ci/build.sh | 5 +++++ | ||
| 14 | ci/travis-build.sh | 1 + | ||
| 15 | 3 files changed, 7 insertions(+) | ||
| 16 | |||
| 17 | diff --git a/Makefile.am b/Makefile.am | ||
| 18 | index cd04a055045a..673dbf88de55 100644 | ||
| 19 | --- a/Makefile.am | ||
| 20 | +++ b/Makefile.am | ||
| 21 | @@ -39,6 +39,7 @@ AM_DISTCHECK_CONFIGURE_FLAGS += \ | ||
| 22 | --enable-gtk-doc \ | ||
| 23 | --enable-man \ | ||
| 24 | --disable-maintainer-mode \ | ||
| 25 | + --enable-trivial-httpd-cmdline \ | ||
| 26 | $(NULL) | ||
| 27 | |||
| 28 | GITIGNOREFILES = aclocal.m4 build-aux/ buildutil/*.m4 config.h.in gtk-doc.make | ||
| 29 | diff --git a/ci/build.sh b/ci/build.sh | ||
| 30 | index 0901507498f2..806af050b780 100755 | ||
| 31 | --- a/ci/build.sh | ||
| 32 | +++ b/ci/build.sh | ||
| 33 | @@ -22,6 +22,11 @@ case "${CONFIGOPTS:-}" in | ||
| 34 | fi | ||
| 35 | ;; | ||
| 36 | esac | ||
| 37 | +# unless libsoup is disabled, enable trivial-httpd for the tests | ||
| 38 | +case "${CONFIGOPTS:-}" in | ||
| 39 | + *--without-soup*) ;; | ||
| 40 | + *) CONFIGOPTS="${CONFIGOPTS:-} --enable-trivial-httpd-cmdline" ;; | ||
| 41 | +esac | ||
| 42 | |||
| 43 | # always fail on warnings; https://github.com/ostreedev/ostree/pull/971 | ||
| 44 | # NB: this disables the default set of flags from configure.ac | ||
| 45 | diff --git a/ci/travis-build.sh b/ci/travis-build.sh | ||
| 46 | index 3fd969bdced6..7c85313a2d32 100755 | ||
| 47 | --- a/ci/travis-build.sh | ||
| 48 | +++ b/ci/travis-build.sh | ||
| 49 | @@ -85,6 +85,7 @@ make="make -j${ci_parallel} V=1 VERBOSE=1" | ||
| 50 | |||
| 51 | ../configure \ | ||
| 52 | --enable-always-build-tests \ | ||
| 53 | + --enable-trivial-httpd-cmdline \ | ||
| 54 | ${ci_configopts} | ||
| 55 | "$@" | ||
| 56 | |||
| 57 | -- | ||
| 58 | 2.17.1 | ||
| 59 | |||
diff --git a/meta-oe/recipes-extended/ostree/ostree/0001-macros-Add-TEMP_FAILURE_RETRY-for-musl.patch b/meta-oe/recipes-extended/ostree/ostree/0001-macros-Add-TEMP_FAILURE_RETRY-for-musl.patch new file mode 100644 index 0000000000..d8c044cb92 --- /dev/null +++ b/meta-oe/recipes-extended/ostree/ostree/0001-macros-Add-TEMP_FAILURE_RETRY-for-musl.patch | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | From 5a4f2ddb0a6c656b425a3caa41f5af766ed5f44b Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alex Kiernan <alex.kiernan@gmail.com> | ||
| 3 | Date: Mon, 9 Sep 2019 14:19:18 +0100 | ||
| 4 | Subject: [PATCH] macros: Add TEMP_FAILURE_RETRY for musl | ||
| 5 | |||
| 6 | TEMP_FAILURE_RETRY is glibc specific, add a definition for musl. | ||
| 7 | |||
| 8 | See https://github.com/ostreedev/ostree/issues/731 | ||
| 9 | |||
| 10 | Signed-off-by: Leon Woestenberg <leon@sidebranch.com> | ||
| 11 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
| 12 | Upstream-Status: Accepted [https://gitlab.gnome.org/GNOME/libglnx/commit/15c06468804014fc49f6f340132930703f919b19] | ||
| 13 | --- | ||
| 14 | glnx-macros.h | 10 ++++++++++ | ||
| 15 | 1 file changed, 10 insertions(+) | ||
| 16 | |||
| 17 | diff --git a/libglnx.glnx-macros.h b/libglnx/glnx-macros.h | ||
| 18 | index 6d8aca93f8a3..700fc75ceed0 100644 | ||
| 19 | --- a/libglnx.glnx-macros.h | ||
| 20 | +++ b/libglnx/glnx-macros.h | ||
| 21 | @@ -31,6 +31,16 @@ G_BEGIN_DECLS | ||
| 22 | /* All of these are for C only. */ | ||
| 23 | #ifndef __GI_SCANNER__ | ||
| 24 | |||
| 25 | +/* fixes builds against musl, taken from glibc unistd.h */ | ||
| 26 | +#ifndef TEMP_FAILURE_RETRY | ||
| 27 | +#define TEMP_FAILURE_RETRY(expression) \ | ||
| 28 | + (__extension__ \ | ||
| 29 | + ({ long int __result; \ | ||
| 30 | + do __result = (long int) (expression); \ | ||
| 31 | + while (__result == -1L && errno == EINTR); \ | ||
| 32 | + __result; })) | ||
| 33 | +#endif | ||
| 34 | + | ||
| 35 | /* Taken from https://github.com/systemd/systemd/src/basic/string-util.h | ||
| 36 | * at revision v228-666-gcf6c8c4 | ||
| 37 | */ | ||
| 38 | -- | ||
| 39 | 2.17.1 | ||
| 40 | |||
diff --git a/meta-oe/recipes-extended/ostree/ostree/0002-Gate-ostree-trivial-httpd-on-BUILDOPT_TRIVIAL_HTTPD.patch b/meta-oe/recipes-extended/ostree/ostree/0002-Gate-ostree-trivial-httpd-on-BUILDOPT_TRIVIAL_HTTPD.patch new file mode 100644 index 0000000000..362b2f36ab --- /dev/null +++ b/meta-oe/recipes-extended/ostree/ostree/0002-Gate-ostree-trivial-httpd-on-BUILDOPT_TRIVIAL_HTTPD.patch | |||
| @@ -0,0 +1,51 @@ | |||
| 1 | From 2629328b39ae117876f4854409c2231220a30b9c Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Alex Kiernan <alex.kiernan@gmail.com> | ||
| 3 | Date: Thu, 5 Sep 2019 13:22:15 +0100 | ||
| 4 | Subject: [PATCH 2/2] Gate ostree-trivial-httpd on BUILDOPT_TRIVIAL_HTTPD | ||
| 5 | |||
| 6 | When building without --enable-trivial-httpd-cmdline, don't build or install | ||
| 7 | the ostree-trivial-httpd binary. | ||
| 8 | |||
| 9 | Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> | ||
| 10 | Upstream-Status: Submitted [https://github.com/ostreedev/ostree/pull/1912] | ||
| 11 | --- | ||
| 12 | Makefile-ostree.am | 3 ++- | ||
| 13 | configure.ac | 3 +++ | ||
| 14 | 2 files changed, 5 insertions(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/Makefile-ostree.am b/Makefile-ostree.am | ||
| 17 | index 76f39cad4b74..7b53cb148960 100644 | ||
| 18 | --- a/Makefile-ostree.am | ||
| 19 | +++ b/Makefile-ostree.am | ||
| 20 | @@ -143,12 +143,13 @@ ostree_SOURCES += src/ostree/ot-builtin-pull.c | ||
| 21 | endif | ||
| 22 | |||
| 23 | if USE_LIBSOUP | ||
| 24 | -# Eventually once we stop things from using this, we should support disabling this | ||
| 25 | +if BUILDOPT_TRIVIAL_HTTPD | ||
| 26 | ostree_SOURCES += src/ostree/ot-builtin-trivial-httpd.c | ||
| 27 | pkglibexec_PROGRAMS += ostree-trivial-httpd | ||
| 28 | ostree_trivial_httpd_SOURCES = src/ostree/ostree-trivial-httpd.c | ||
| 29 | ostree_trivial_httpd_CFLAGS = $(ostree_bin_shared_cflags) $(OT_INTERNAL_SOUP_CFLAGS) | ||
| 30 | ostree_trivial_httpd_LDADD = $(ostree_bin_shared_ldadd) $(OT_INTERNAL_SOUP_LIBS) | ||
| 31 | +endif | ||
| 32 | |||
| 33 | if !USE_CURL | ||
| 34 | # This is necessary for the cookie jar bits | ||
| 35 | diff --git a/configure.ac b/configure.ac | ||
| 36 | index 069bab01752e..ffc67980d507 100644 | ||
| 37 | --- a/configure.ac | ||
| 38 | +++ b/configure.ac | ||
| 39 | @@ -192,6 +192,9 @@ AC_ARG_ENABLE(trivial-httpd-cmdline, | ||
| 40 | [Continue to support "ostree trivial-httpd" [default=no]])],, | ||
| 41 | enable_trivial_httpd_cmdline=no) | ||
| 42 | AM_CONDITIONAL(BUILDOPT_TRIVIAL_HTTPD, test x$enable_trivial_httpd_cmdline = xyes) | ||
| 43 | +AS_IF([test x$with_soup = xno && test x$enable_trivial_httpd_cmdline = xyes], [ | ||
| 44 | + AC_MSG_ERROR([trivial-httpd enabled, but libsoup is not; libsoup is needed for trivial-httpd]) | ||
| 45 | +]) | ||
| 46 | AM_COND_IF(BUILDOPT_TRIVIAL_HTTPD, | ||
| 47 | [AC_DEFINE([BUILDOPT_ENABLE_TRIVIAL_HTTPD_CMDLINE], 1, [Define if we are enabling ostree trivial-httpd entrypoint])] | ||
| 48 | ) | ||
| 49 | -- | ||
| 50 | 2.17.1 | ||
| 51 | |||
diff --git a/meta-oe/recipes-extended/ostree/ostree_2019.3.bb b/meta-oe/recipes-extended/ostree/ostree_2019.3.bb new file mode 100644 index 0000000000..1fe7dcf212 --- /dev/null +++ b/meta-oe/recipes-extended/ostree/ostree_2019.3.bb | |||
| @@ -0,0 +1,157 @@ | |||
| 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 | |||
| 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" | ||
| 10 | |||
| 11 | DEPENDS = " \ | ||
| 12 | glib-2.0 \ | ||
| 13 | gpgme \ | ||
| 14 | e2fsprogs \ | ||
| 15 | libcap \ | ||
| 16 | zlib \ | ||
| 17 | xz \ | ||
| 18 | bison-native \ | ||
| 19 | " | ||
| 20 | |||
| 21 | # The Yocto mirror has an old export of ostree: | ||
| 22 | # http://downloads.yoctoproject.org/mirror/sources/git2_github.com.ostreedev.ostree.tar.gz | ||
| 23 | PREMIRRORS = "" | ||
| 24 | |||
| 25 | SRC_URI = " \ | ||
| 26 | gitsm://github.com/ostreedev/ostree \ | ||
| 27 | file://0001-macros-Add-TEMP_FAILURE_RETRY-for-musl.patch \ | ||
| 28 | file://0001-Always-enable-trivial-httpd-for-tests.patch \ | ||
| 29 | file://0002-Gate-ostree-trivial-httpd-on-BUILDOPT_TRIVIAL_HTTPD.patch \ | ||
| 30 | " | ||
| 31 | SRCREV = "5c1697da78ebf6250a7130b8b9e6cbfbeaa34296" | ||
| 32 | |||
| 33 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+)" | ||
| 34 | |||
| 35 | S = "${WORKDIR}/git" | ||
| 36 | |||
| 37 | inherit autotools bash-completion gobject-introspection gtk-doc pkgconfig systemd | ||
| 38 | |||
| 39 | # package configuration - match ostree defaults, but without rofiles-fuse | ||
| 40 | # otherwise we introduce a dependendency on meta-filesystems | ||
| 41 | PACKAGECONFIG ??= " \ | ||
| 42 | ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ | ||
| 43 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd libmount', '', d)} \ | ||
| 44 | soup \ | ||
| 45 | " | ||
| 46 | |||
| 47 | # We include soup because ostree can't (currently) be built without | ||
| 48 | # soup or curl - https://github.com/ostreedev/ostree/issues/1897 | ||
| 49 | PACKAGECONFIG_class-native ??= " \ | ||
| 50 | ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ | ||
| 51 | soup \ | ||
| 52 | " | ||
| 53 | |||
| 54 | PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi" | ||
| 55 | PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl" | ||
| 56 | PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut" | ||
| 57 | PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls" | ||
| 58 | PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive" | ||
| 59 | PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux" | ||
| 60 | PACKAGECONFIG[man] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native" | ||
| 61 | PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio" | ||
| 62 | PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2" | ||
| 63 | PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl" | ||
| 64 | PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse" | ||
| 65 | PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux" | ||
| 66 | PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack" | ||
| 67 | PACKAGECONFIG[soup] = "--with-soup, --without-soup --disable-glibtest, libsoup-2.4" | ||
| 68 | PACKAGECONFIG[static] = "" | ||
| 69 | PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_unitdir}/system, --without-libsystemd, systemd" | ||
| 70 | PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline" | ||
| 71 | |||
| 72 | EXTRA_OECONF = " \ | ||
| 73 | ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \ | ||
| 74 | " | ||
| 75 | |||
| 76 | # Makefile-libostree.am overrides this to avoid a build problem with clang, | ||
| 77 | # but that fix breaks cross compilation and we don't need it | ||
| 78 | EXTRA_OEMAKE = " \ | ||
| 79 | INTROSPECTION_SCANNER_ENV= \ | ||
| 80 | " | ||
| 81 | |||
| 82 | EXTRA_OECONF_class-native = " \ | ||
| 83 | --with-builtin-grub2-mkconfig \ | ||
| 84 | --enable-wrpseudo-compat \ | ||
| 85 | --disable-otmpfile \ | ||
| 86 | " | ||
| 87 | |||
| 88 | # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the | ||
| 89 | # do_configure stage so we do depend on it | ||
| 90 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" | ||
| 91 | SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" | ||
| 92 | do_configure[vardeps] += "SYSROOT_DIR" | ||
| 93 | |||
| 94 | do_configure_prepend() { | ||
| 95 | # this reflects what autogen.sh does, but the OE wrappers for autoreconf | ||
| 96 | # allow it to work without the other gyrations which exist there | ||
| 97 | cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc | ||
| 98 | cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc | ||
| 99 | } | ||
| 100 | |||
| 101 | do_install_append_class-native() { | ||
| 102 | create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" | ||
| 103 | } | ||
| 104 | |||
| 105 | PACKAGES += " \ | ||
| 106 | ${PN}-dracut \ | ||
| 107 | ${PN}-grub \ | ||
| 108 | ${PN}-mkinitcpio \ | ||
| 109 | ${PN}-switchroot \ | ||
| 110 | " | ||
| 111 | |||
| 112 | FILES_${PN} = " \ | ||
| 113 | ${bindir}/ostree \ | ||
| 114 | ${bindir}/rofiles-fuse \ | ||
| 115 | ${datadir}/${BPN} \ | ||
| 116 | ${datadir}/gir-1.0 \ | ||
| 117 | ${libdir}/${BPN}/ostree-remount \ | ||
| 118 | ${libdir}/girepository-1.0 \ | ||
| 119 | ${libdir}/lib*${SOLIBS} \ | ||
| 120 | ${libdir}/tmpfiles.d/ostree-tmpfiles.conf \ | ||
| 121 | ${libexecdir}/libostree/ostree-trivial-httpd \ | ||
| 122 | ${sysconfdir}/ostree/remotes.d \ | ||
| 123 | ${systemd_unitdir}/system-generators/ostree-system-generator \ | ||
| 124 | ${systemd_unitdir}/system/ostree-finalize-staged.path \ | ||
| 125 | ${systemd_unitdir}/system/ostree-finalize-staged.service \ | ||
| 126 | ${systemd_unitdir}/system/ostree-remount.service \ | ||
| 127 | " | ||
| 128 | FILES_${PN}-dracut = " \ | ||
| 129 | ${sysconfdir}/dracut.conf.d \ | ||
| 130 | ${libdir}/dracut \ | ||
| 131 | " | ||
| 132 | FILES_${PN}-grub = " \ | ||
| 133 | ${sysconfdir}/grub.d \ | ||
| 134 | ${libexecdir}/libostree/grub2-15_ostree \ | ||
| 135 | " | ||
| 136 | FILES_${PN}-mkinitcpio = " \ | ||
| 137 | ${sysconfdir}/ostree-mkinitcpio.conf \ | ||
| 138 | ${libdir}/initcpio \ | ||
| 139 | " | ||
| 140 | FILES_${PN}-switchroot = " \ | ||
| 141 | ${libdir}/ostree/ostree-prepare-root \ | ||
| 142 | ${systemd_unitdir}/system/ostree-prepare-root.service \ | ||
| 143 | " | ||
| 144 | |||
| 145 | RDEPENDS_${PN}-dracut = "bash" | ||
| 146 | RDEPENDS_${PN}-mkinitcpio = "bash" | ||
| 147 | RDEPENDS_${PN}_class-target = " \ | ||
| 148 | gnupg \ | ||
| 149 | ${PN}-switchroot \ | ||
| 150 | " | ||
| 151 | |||
| 152 | RRECOMMENDS_${PN} += "kernel-module-overlay" | ||
| 153 | |||
| 154 | SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path" | ||
| 155 | SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service" | ||
| 156 | |||
| 157 | BBCLASSEXTEND = "native" | ||
