blob: bcf511b9025d6c31fd8d3a12a4aa5f47d3c0de7c [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 \
Brad Bishop2f973922019-11-11 07:58:48 -050027 file://run-ptest \
Brad Bishop0a921262019-09-24 07:40:45 -040028"
Brad Bishope42b3e32020-01-15 22:08:42 -050029SRCREV = "43706202f7de2ce0c829a46caab350ae1656f6ad"
Brad Bishop0a921262019-09-24 07:40:45 -040030
31UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+)"
32
33S = "${WORKDIR}/git"
34
Brad Bishope42b3e32020-01-15 22:08:42 -050035inherit autotools bash-completion gobject-introspection gtk-doc manpages pkgconfig ptest-gnome systemd
Brad Bishop0a921262019-09-24 07:40:45 -040036
Brad Bishop2f973922019-11-11 07:58:48 -050037# Package configuration - match ostree defaults, but without rofiles-fuse
Brad Bishop0a921262019-09-24 07:40:45 -040038# otherwise we introduce a dependendency on meta-filesystems
Brad Bishope42b3e32020-01-15 22:08:42 -050039#
40# If running with ptest, both soup (for trivial-httpd) and xattr are required
Brad Bishop0a921262019-09-24 07:40:45 -040041PACKAGECONFIG ??= " \
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)} \
Brad Bishope42b3e32020-01-15 22:08:42 -050051 builtin-grub2-mkconfig \
Brad Bishop0a921262019-09-24 07:40:45 -040052 soup \
53"
54
55PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi"
Brad Bishope42b3e32020-01-15 22:08:42 -050056PACKAGECONFIG[builtin-grub2-mkconfig] = "--with-builtin-grub2-mkconfig, --without-builtin-grub2-mkconfig"
Brad Bishop0a921262019-09-24 07:40:45 -040057PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl"
58PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut"
Brad Bishope42b3e32020-01-15 22:08:42 -050059PACKAGECONFIG[gjs] = "ac_cv_path_GJS=${bindir}/gjs"
Brad Bishop0a921262019-09-24 07:40:45 -040060PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls"
61PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive"
62PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux"
Brad Bishope42b3e32020-01-15 22:08:42 -050063PACKAGECONFIG[manpages] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native"
Brad Bishop0a921262019-09-24 07:40:45 -040064PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio"
65PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2"
66PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl"
67PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse"
68PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
69PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack"
70PACKAGECONFIG[soup] = "--with-soup, --without-soup --disable-glibtest, libsoup-2.4"
71PACKAGECONFIG[static] = ""
72PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_unitdir}/system, --without-libsystemd, systemd"
73PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline"
74
75EXTRA_OECONF = " \
76 ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \
77"
78
79# Makefile-libostree.am overrides this to avoid a build problem with clang,
80# but that fix breaks cross compilation and we don't need it
81EXTRA_OEMAKE = " \
82 INTROSPECTION_SCANNER_ENV= \
83"
84
85EXTRA_OECONF_class-native = " \
Brad Bishop0a921262019-09-24 07:40:45 -040086 --enable-wrpseudo-compat \
87 --disable-otmpfile \
88"
89
90# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the
91# do_configure stage so we do depend on it
92SYSROOT_DIR = "${STAGING_DIR_TARGET}"
93SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}"
94do_configure[vardeps] += "SYSROOT_DIR"
95
96do_configure_prepend() {
97 # this reflects what autogen.sh does, but the OE wrappers for autoreconf
98 # allow it to work without the other gyrations which exist there
99 cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc
100 cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc
101}
102
103do_install_append_class-native() {
104 create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator"
105}
106
Brad Bishope42b3e32020-01-15 22:08:42 -0500107PACKAGE_BEFORE_PN = " \
Brad Bishop0a921262019-09-24 07:40:45 -0400108 ${PN}-dracut \
109 ${PN}-grub \
110 ${PN}-mkinitcpio \
111 ${PN}-switchroot \
Brad Bishop2f973922019-11-11 07:58:48 -0500112 ${PN}-trivial-httpd \
Brad Bishop0a921262019-09-24 07:40:45 -0400113"
114
Brad Bishope42b3e32020-01-15 22:08:42 -0500115FILES_${PN} += " \
116 ${nonarch_libdir}/${BPN} \
117 ${nonarch_libdir}/tmpfiles.d \
118 ${systemd_unitdir}/system \
119 ${systemd_unitdir}/system-generators \
Brad Bishop0a921262019-09-24 07:40:45 -0400120"
121FILES_${PN}-dracut = " \
122 ${sysconfdir}/dracut.conf.d \
123 ${libdir}/dracut \
124"
125FILES_${PN}-grub = " \
126 ${sysconfdir}/grub.d \
127 ${libexecdir}/libostree/grub2-15_ostree \
128"
129FILES_${PN}-mkinitcpio = " \
130 ${sysconfdir}/ostree-mkinitcpio.conf \
131 ${libdir}/initcpio \
132"
133FILES_${PN}-switchroot = " \
Brad Bishope42b3e32020-01-15 22:08:42 -0500134 ${nonarch_libdir}/${BPN}/ostree-prepare-root \
Brad Bishop0a921262019-09-24 07:40:45 -0400135 ${systemd_unitdir}/system/ostree-prepare-root.service \
136"
Brad Bishop2f973922019-11-11 07:58:48 -0500137FILES_${PN}-trivial-httpd = " \
138 ${libexecdir}/libostree/ostree-trivial-httpd \
139"
Brad Bishop0a921262019-09-24 07:40:45 -0400140
Brad Bishop2f973922019-11-11 07:58:48 -0500141RDEPENDS_${PN} = " \
142 ${@bb.utils.contains('PACKAGECONFIG', 'trivial-httpd-cmdline', '${PN}-trivial-httpd', '', d)} \
143"
Brad Bishop0a921262019-09-24 07:40:45 -0400144RDEPENDS_${PN}-dracut = "bash"
145RDEPENDS_${PN}-mkinitcpio = "bash"
146RDEPENDS_${PN}_class-target = " \
147 gnupg \
148 ${PN}-switchroot \
149"
Brad Bishop2f973922019-11-11 07:58:48 -0500150RDEPENDS_${PN}-ptest += " \
151 attr \
152 bash \
153 coreutils \
154 cpio \
155 diffutils \
156 findutils \
157 grep \
158 python3-core \
159 python3-multiprocessing \
Brad Bishope42b3e32020-01-15 22:08:42 -0500160 tar \
Brad Bishop2f973922019-11-11 07:58:48 -0500161 ${PN}-trivial-httpd \
Brad Bishope42b3e32020-01-15 22:08:42 -0500162 ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-python', 'python3-pyyaml', '', d)} \
163 ${@bb.utils.contains('PACKAGECONFIG', 'gjs', 'gjs', '', d)} \
Brad Bishop2f973922019-11-11 07:58:48 -0500164"
165RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils glibc-localedata-en-us"
Brad Bishop0a921262019-09-24 07:40:45 -0400166
167RRECOMMENDS_${PN} += "kernel-module-overlay"
Brad Bishop2f973922019-11-11 07:58:48 -0500168RRECOMMENDS_${PN}-ptest += "strace"
Brad Bishop0a921262019-09-24 07:40:45 -0400169
170SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path"
171SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service"
172
173BBCLASSEXTEND = "native"