blob: 1fe7dcf212cff66531307cb90dd33afda3edaab5 [file] [log] [blame]
Brad Bishop0a921262019-09-24 07:40:45 -04001SUMMARY = "Versioned Operating System Repository."
2DESCRIPTION = "libostree is both a shared library and suite of command line \
3tools that combines a \"git-like\" model for committing and downloading \
4bootable filesystem trees, along with a layer for deploying them and managing \
5the bootloader configuration."
6HOMEPAGE = "https://ostree.readthedocs.io"
7LICENSE = "LGPLv2.1"
8
9LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
10
11DEPENDS = " \
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
23PREMIRRORS = ""
24
25SRC_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"
31SRCREV = "5c1697da78ebf6250a7130b8b9e6cbfbeaa34296"
32
33UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+)"
34
35S = "${WORKDIR}/git"
36
37inherit 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
41PACKAGECONFIG ??= " \
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
49PACKAGECONFIG_class-native ??= " \
50 ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \
51 soup \
52"
53
54PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi"
55PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl"
56PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut"
57PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls"
58PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive"
59PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux"
60PACKAGECONFIG[man] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native"
61PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio"
62PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2"
63PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl"
64PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse"
65PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
66PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack"
67PACKAGECONFIG[soup] = "--with-soup, --without-soup --disable-glibtest, libsoup-2.4"
68PACKAGECONFIG[static] = ""
69PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_unitdir}/system, --without-libsystemd, systemd"
70PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline"
71
72EXTRA_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
78EXTRA_OEMAKE = " \
79 INTROSPECTION_SCANNER_ENV= \
80"
81
82EXTRA_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
90SYSROOT_DIR = "${STAGING_DIR_TARGET}"
91SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}"
92do_configure[vardeps] += "SYSROOT_DIR"
93
94do_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
101do_install_append_class-native() {
102 create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator"
103}
104
105PACKAGES += " \
106 ${PN}-dracut \
107 ${PN}-grub \
108 ${PN}-mkinitcpio \
109 ${PN}-switchroot \
110"
111
112FILES_${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"
128FILES_${PN}-dracut = " \
129 ${sysconfdir}/dracut.conf.d \
130 ${libdir}/dracut \
131"
132FILES_${PN}-grub = " \
133 ${sysconfdir}/grub.d \
134 ${libexecdir}/libostree/grub2-15_ostree \
135"
136FILES_${PN}-mkinitcpio = " \
137 ${sysconfdir}/ostree-mkinitcpio.conf \
138 ${libdir}/initcpio \
139"
140FILES_${PN}-switchroot = " \
141 ${libdir}/ostree/ostree-prepare-root \
142 ${systemd_unitdir}/system/ostree-prepare-root.service \
143"
144
145RDEPENDS_${PN}-dracut = "bash"
146RDEPENDS_${PN}-mkinitcpio = "bash"
147RDEPENDS_${PN}_class-target = " \
148 gnupg \
149 ${PN}-switchroot \
150"
151
152RRECOMMENDS_${PN} += "kernel-module-overlay"
153
154SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path"
155SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service"
156
157BBCLASSEXTEND = "native"