summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-extended/ostree/ostree_2020.2.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-extended/ostree/ostree_2020.2.bb')
-rw-r--r--meta-oe/recipes-extended/ostree/ostree_2020.2.bb189
1 files changed, 189 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/ostree/ostree_2020.2.bb b/meta-oe/recipes-extended/ostree/ostree_2020.2.bb
new file mode 100644
index 000000000..78f4cf588
--- /dev/null
+++ b/meta-oe/recipes-extended/ostree/ostree_2020.2.bb
@@ -0,0 +1,189 @@
1SUMMARY = "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 e2fsprogs \
14 libcap \
15 zlib \
16 xz \
17 bison-native \
18"
19
20# The Yocto mirror has an old export of ostree:
21# http://downloads.yoctoproject.org/mirror/sources/git2_github.com.ostreedev.ostree.tar.gz
22PREMIRRORS = ""
23
24SRC_URI = " \
25 gitsm://github.com/ostreedev/ostree \
26 file://run-ptest \
27"
28SRCREV = "c6085ebd5e27da35f43165eb614190665468f13a"
29
30UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+)"
31
32S = "${WORKDIR}/git"
33
34inherit autotools bash-completion gobject-introspection gtk-doc manpages pkgconfig ptest-gnome systemd
35
36# Package configuration - match ostree defaults, but without rofiles-fuse
37# otherwise we introduce a dependendency on meta-filesystems
38PACKAGECONFIG ??= " \
39 ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \
40 ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd libmount', '', d)} \
41 glib \
42 gpgme \
43 soup \
44"
45
46# We include soup because ostree can't (currently) be built without
47# soup or curl - https://github.com/ostreedev/ostree/issues/1897
48PACKAGECONFIG_class-native ??= " \
49 ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \
50 builtin-grub2-mkconfig \
51 gpgme \
52 soup \
53"
54
55PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi"
56PACKAGECONFIG[builtin-grub2-mkconfig] = "--with-builtin-grub2-mkconfig, --without-builtin-grub2-mkconfig"
57PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl"
58PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut"
59PACKAGECONFIG[glib] = "--with-crypto=glib"
60PACKAGECONFIG[gjs] = "ac_cv_path_GJS=${bindir}/gjs"
61PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls"
62PACKAGECONFIG[gpgme] = "--with-gpgme, --without-gpgme, gpgme"
63PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive"
64PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux"
65PACKAGECONFIG[manpages] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native"
66PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio"
67PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2"
68PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl"
69PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse"
70PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux"
71PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack"
72PACKAGECONFIG[soup] = "--with-soup, --without-soup --disable-glibtest, libsoup-2.4"
73PACKAGECONFIG[static] = ""
74PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_unitdir}/system, --without-libsystemd, systemd"
75PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline"
76
77EXTRA_OECONF = " \
78 ${@bb.utils.contains('PACKAGECONFIG', 'static', '--with-static-compiler=\'${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}\'', '', d)} \
79"
80
81# Makefile-libostree.am overrides this to avoid a build problem with clang,
82# but that fix breaks cross compilation and we don't need it
83EXTRA_OEMAKE = " \
84 INTROSPECTION_SCANNER_ENV= \
85"
86
87EXTRA_OECONF_class-native = " \
88 --enable-wrpseudo-compat \
89 --disable-otmpfile \
90"
91
92# Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the
93# do_configure stage so we do depend on it
94SYSROOT_DIR = "${STAGING_DIR_TARGET}"
95SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}"
96do_configure[vardeps] += "SYSROOT_DIR"
97
98do_configure_prepend() {
99 # this reflects what autogen.sh does, but the OE wrappers for autoreconf
100 # allow it to work without the other gyrations which exist there
101 cp ${S}/libglnx/Makefile-libglnx.am ${S}/libglnx/Makefile-libglnx.am.inc
102 cp ${S}/bsdiff/Makefile-bsdiff.am ${S}/bsdiff/Makefile-bsdiff.am.inc
103}
104
105do_install_append_class-native() {
106 create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator"
107}
108
109PACKAGE_BEFORE_PN = " \
110 ${PN}-dracut \
111 ${PN}-grub \
112 ${PN}-mkinitcpio \
113 ${PN}-switchroot \
114 ${PN}-trivial-httpd \
115"
116
117FILES_${PN} += " \
118 ${nonarch_libdir}/${BPN} \
119 ${nonarch_libdir}/tmpfiles.d \
120 ${systemd_unitdir}/system \
121 ${systemd_unitdir}/system-generators \
122"
123FILES_${PN}-dracut = " \
124 ${sysconfdir}/dracut.conf.d \
125 ${libdir}/dracut \
126"
127FILES_${PN}-grub = " \
128 ${sysconfdir}/grub.d \
129 ${libexecdir}/libostree/grub2-15_ostree \
130"
131FILES_${PN}-mkinitcpio = " \
132 ${sysconfdir}/ostree-mkinitcpio.conf \
133 ${libdir}/initcpio \
134"
135FILES_${PN}-switchroot = " \
136 ${nonarch_libdir}/${BPN}/ostree-prepare-root \
137 ${systemd_unitdir}/system/ostree-prepare-root.service \
138"
139FILES_${PN}-trivial-httpd = " \
140 ${libexecdir}/libostree/ostree-trivial-httpd \
141"
142
143RDEPENDS_${PN} = " \
144 ${@bb.utils.contains('PACKAGECONFIG', 'trivial-httpd-cmdline', '${PN}-trivial-httpd', '', d)} \
145"
146RDEPENDS_${PN}-dracut = "bash"
147RDEPENDS_${PN}-mkinitcpio = "bash"
148RDEPENDS_${PN}_class-target = " \
149 ${@bb.utils.contains('PACKAGECONFIG', 'gpgme', 'gnupg', '', d)} \
150 ${PN}-switchroot \
151"
152
153#
154# Note that to get ptest to pass you also need:
155#
156# xattr in DISTRO_FEATURES
157# static ostree-prepare-root (PACKAGECONFIG_append_pn-ostree = " static")
158# meta-python in your layers
159# overlayfs in your kernel (KERNEL_EXTRA_FEATURES += "features/overlayfs/overlayfs.scc")
160# busybox built statically
161# /var/tmp as a real filesystem (not a tmpfs)
162# Sufficient disk space (IMAGE_ROOTFS_SIZE = "524288") and RAM (QB_MEM = "-m 1024")
163#
164RDEPENDS_${PN}-ptest += " \
165 attr \
166 bash \
167 coreutils \
168 cpio \
169 diffutils \
170 findutils \
171 grep \
172 python3-core \
173 python3-multiprocessing \
174 strace \
175 tar \
176 util-linux \
177 xz \
178 ${PN}-trivial-httpd \
179 ${@bb.utils.contains('BBFILE_COLLECTIONS', 'meta-python', 'python3-pyyaml', '', d)} \
180 ${@bb.utils.contains('PACKAGECONFIG', 'gjs', 'gjs', '', d)} \
181"
182RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils glibc-localedata-en-us"
183
184RRECOMMENDS_${PN} += "kernel-module-overlay"
185
186SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path"
187SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service"
188
189BBCLASSEXTEND = "native"