diff options
Diffstat (limited to 'meta-oe/recipes-extended/ostree/ostree_2020.8.bb')
-rw-r--r-- | meta-oe/recipes-extended/ostree/ostree_2020.8.bb | 189 |
1 files changed, 189 insertions, 0 deletions
diff --git a/meta-oe/recipes-extended/ostree/ostree_2020.8.bb b/meta-oe/recipes-extended/ostree/ostree_2020.8.bb new file mode 100644 index 000000000..4f0f719fb --- /dev/null +++ b/meta-oe/recipes-extended/ostree/ostree_2020.8.bb | |||
@@ -0,0 +1,189 @@ | |||
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 | 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 | ||
22 | PREMIRRORS = "" | ||
23 | |||
24 | SRC_URI = " \ | ||
25 | gitsm://github.com/ostreedev/ostree \ | ||
26 | file://run-ptest \ | ||
27 | " | ||
28 | SRCREV = "3e289b19345e30d2da193cd208e109f7d7aaa2a1" | ||
29 | |||
30 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+)" | ||
31 | |||
32 | S = "${WORKDIR}/git" | ||
33 | |||
34 | inherit 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 | ||
38 | PACKAGECONFIG ??= " \ | ||
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 | ||
48 | PACKAGECONFIG_class-native ??= " \ | ||
49 | ${@bb.utils.filter('DISTRO_FEATURES', 'selinux smack', d)} \ | ||
50 | builtin-grub2-mkconfig \ | ||
51 | gpgme \ | ||
52 | soup \ | ||
53 | " | ||
54 | |||
55 | PACKAGECONFIG[avahi] = "--with-avahi, --without-avahi, avahi" | ||
56 | PACKAGECONFIG[builtin-grub2-mkconfig] = "--with-builtin-grub2-mkconfig, --without-builtin-grub2-mkconfig" | ||
57 | PACKAGECONFIG[curl] = "--with-curl, --without-curl, curl" | ||
58 | PACKAGECONFIG[dracut] = "--with-dracut, --without-dracut" | ||
59 | PACKAGECONFIG[glib] = "--with-crypto=glib" | ||
60 | PACKAGECONFIG[gjs] = "ac_cv_path_GJS=${bindir}/gjs" | ||
61 | PACKAGECONFIG[gnutls] = "--with-crypto=gnutls, , gnutls" | ||
62 | PACKAGECONFIG[gpgme] = "--with-gpgme, --without-gpgme, gpgme" | ||
63 | PACKAGECONFIG[libarchive] = "--with-libarchive, --without-libarchive, libarchive" | ||
64 | PACKAGECONFIG[libmount] = "--with-libmount, --without-libmount, util-linux" | ||
65 | PACKAGECONFIG[manpages] = "--enable-man, --disable-man, libxslt-native docbook-xsl-stylesheets-native" | ||
66 | PACKAGECONFIG[mkinitcpio] = "--with-mkinitcpio, --without-mkinitcpio" | ||
67 | PACKAGECONFIG[no-http2] = "--disable-http2, --enable-http2" | ||
68 | PACKAGECONFIG[openssl] = "--with-crypto=openssl, , openssl" | ||
69 | PACKAGECONFIG[rofiles-fuse] = "--enable-rofiles-fuse, --disable-rofiles-fuse, fuse" | ||
70 | PACKAGECONFIG[selinux] = "--with-selinux, --without-selinux, libselinux" | ||
71 | PACKAGECONFIG[smack] = "--with-smack, --without-smack, smack" | ||
72 | PACKAGECONFIG[soup] = "--with-soup, --without-soup --disable-glibtest, libsoup-2.4" | ||
73 | PACKAGECONFIG[static] = "" | ||
74 | PACKAGECONFIG[systemd] = "--with-libsystemd --with-systemdsystemunitdir=${systemd_unitdir}/system, --without-libsystemd, systemd" | ||
75 | PACKAGECONFIG[trivial-httpd-cmdline] = "--enable-trivial-httpd-cmdline, --disable-trivial-httpd-cmdline" | ||
76 | |||
77 | EXTRA_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 | ||
83 | EXTRA_OEMAKE = " \ | ||
84 | INTROSPECTION_SCANNER_ENV= \ | ||
85 | " | ||
86 | |||
87 | EXTRA_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 | ||
94 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" | ||
95 | SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" | ||
96 | do_configure[vardeps] += "SYSROOT_DIR" | ||
97 | |||
98 | do_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 | |||
105 | do_install_append_class-native() { | ||
106 | create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" | ||
107 | } | ||
108 | |||
109 | PACKAGE_BEFORE_PN = " \ | ||
110 | ${PN}-dracut \ | ||
111 | ${PN}-grub \ | ||
112 | ${PN}-mkinitcpio \ | ||
113 | ${PN}-switchroot \ | ||
114 | ${PN}-trivial-httpd \ | ||
115 | " | ||
116 | |||
117 | FILES_${PN} += " \ | ||
118 | ${nonarch_libdir}/${BPN} \ | ||
119 | ${nonarch_libdir}/tmpfiles.d \ | ||
120 | ${systemd_unitdir}/system \ | ||
121 | ${systemd_unitdir}/system-generators \ | ||
122 | " | ||
123 | FILES_${PN}-dracut = " \ | ||
124 | ${sysconfdir}/dracut.conf.d \ | ||
125 | ${libdir}/dracut \ | ||
126 | " | ||
127 | FILES_${PN}-grub = " \ | ||
128 | ${sysconfdir}/grub.d \ | ||
129 | ${libexecdir}/libostree/grub2-15_ostree \ | ||
130 | " | ||
131 | FILES_${PN}-mkinitcpio = " \ | ||
132 | ${sysconfdir}/ostree-mkinitcpio.conf \ | ||
133 | ${libdir}/initcpio \ | ||
134 | " | ||
135 | FILES_${PN}-switchroot = " \ | ||
136 | ${nonarch_libdir}/${BPN}/ostree-prepare-root \ | ||
137 | ${systemd_unitdir}/system/ostree-prepare-root.service \ | ||
138 | " | ||
139 | FILES_${PN}-trivial-httpd = " \ | ||
140 | ${libexecdir}/libostree/ostree-trivial-httpd \ | ||
141 | " | ||
142 | |||
143 | RDEPENDS_${PN} = " \ | ||
144 | ${@bb.utils.contains('PACKAGECONFIG', 'trivial-httpd-cmdline', '${PN}-trivial-httpd', '', d)} \ | ||
145 | " | ||
146 | RDEPENDS_${PN}-dracut = "bash" | ||
147 | RDEPENDS_${PN}-mkinitcpio = "bash" | ||
148 | RDEPENDS_${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 | # | ||
164 | RDEPENDS_${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 | " | ||
182 | RDEPENDS_${PN}-ptest_append_libc-glibc = " glibc-utils glibc-localedata-en-us" | ||
183 | |||
184 | RRECOMMENDS_${PN} += "kernel-module-overlay" | ||
185 | |||
186 | SYSTEMD_SERVICE_${PN} = "ostree-remount.service ostree-finalize-staged.path" | ||
187 | SYSTEMD_SERVICE_${PN}-switchroot = "ostree-prepare-root.service" | ||
188 | |||
189 | BBCLASSEXTEND = "native" | ||