diff options
-rw-r--r-- | classes/image_types_ostree.bbclass | 2 | ||||
-rw-r--r-- | recipes-sota/ostree/ostree_git.bb | 87 |
2 files changed, 33 insertions, 56 deletions
diff --git a/classes/image_types_ostree.bbclass b/classes/image_types_ostree.bbclass index bc44e33..30bfedf 100644 --- a/classes/image_types_ostree.bbclass +++ b/classes/image_types_ostree.bbclass | |||
@@ -165,7 +165,7 @@ IMAGE_CMD_ostreepush () { | |||
165 | # Print warnings if credetials are not set or if the file has not been found. | 165 | # Print warnings if credetials are not set or if the file has not been found. |
166 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then | 166 | if [ -n "${SOTA_PACKED_CREDENTIALS}" ]; then |
167 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then | 167 | if [ -e ${SOTA_PACKED_CREDENTIALS} ]; then |
168 | garage-push --repo=${OSTREE_REPO} \ | 168 | garage-push -vv --repo=${OSTREE_REPO} \ |
169 | --ref=${OSTREE_BRANCHNAME} \ | 169 | --ref=${OSTREE_BRANCHNAME} \ |
170 | --credentials=${SOTA_PACKED_CREDENTIALS} \ | 170 | --credentials=${SOTA_PACKED_CREDENTIALS} \ |
171 | --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt | 171 | --cacert=${STAGING_ETCDIR_NATIVE}/ssl/certs/ca-certificates.crt |
diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index afb767f..6fa6ad4 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb | |||
@@ -1,10 +1,9 @@ | |||
1 | SUMMARY = "Tool for managing bootable, immutable, versioned filesystem trees" | 1 | SUMMARY = "Tool for managing bootable, immutable, versioned filesystem trees" |
2 | LICENSE = "GPLv2+" | 2 | HOMEPAGE = "https://ostree.readthedocs.io/en/latest/" |
3 | LICENSE = "LGPLv2+" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2" |
4 | 5 | ||
5 | inherit autotools pkgconfig systemd gobject-introspection | 6 | inherit autotools pkgconfig systemd bash-completion gobject-introspection |
6 | |||
7 | INHERIT_remove_class-native = "systemd" | ||
8 | 7 | ||
9 | SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master" | 8 | SRC_URI = "gitsm://github.com/ostreedev/ostree.git;branch=master" |
10 | 9 | ||
@@ -17,76 +16,54 @@ S = "${WORKDIR}/git" | |||
17 | 16 | ||
18 | BBCLASSEXTEND = "native" | 17 | BBCLASSEXTEND = "native" |
19 | 18 | ||
20 | DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse e2fsprogs gtk-doc-native curl xz" | 19 | DEPENDS += "attr libarchive libcap glib-2.0 gpgme libgsystem fuse e2fsprogs curl xz" |
21 | DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" | 20 | DEPENDS += "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
22 | DEPENDS_remove_class-native = "systemd-native" | 21 | RDEPENDS_${PN}-dracut = "bash" |
23 | |||
24 | RDEPENDS_${PN} = "util-linux-libuuid util-linux-libblkid util-linux-libmount libcap bash" | ||
25 | 22 | ||
26 | EXTRA_OECONF = "CFLAGS='-Wno-error=missing-prototypes' --with-libarchive --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup" | 23 | CFLAGS_append = " -Wno-error=missing-prototypes" |
24 | EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup" | ||
27 | EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" | 25 | EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" |
28 | 26 | ||
27 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | ||
28 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut" | ||
29 | |||
29 | # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the | 30 | # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the |
30 | # do_configure stage so we do depend on it | 31 | # do_configure stage so we do depend on it |
31 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" | 32 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" |
32 | SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" | 33 | SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" |
33 | do_configure[vardeps] += "SYSROOT_DIR" | 34 | do_configure[vardeps] += "SYSROOT_DIR" |
34 | 35 | ||
35 | SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" | ||
36 | SYSTEMD_REQUIRED_class-native = "" | ||
37 | |||
38 | SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service" | 36 | SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service" |
39 | SYSTEMD_SERVICE_${PN}_class-native = "" | ||
40 | |||
41 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
42 | PACKAGECONFIG_class-native = "" | ||
43 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut" | ||
44 | |||
45 | FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" | ||
46 | 37 | ||
38 | export BUILD_SYS | ||
39 | export HOST_SYS | ||
47 | export STAGING_INCDIR | 40 | export STAGING_INCDIR |
48 | export STAGING_LIBDIR | 41 | export STAGING_LIBDIR |
49 | 42 | ||
50 | do_configure() { | 43 | do_configure_prepend() { |
51 | unset docdir | 44 | unset docdir |
52 | NOCONFIGURE=1 "${S}/autogen.sh" | 45 | NOCONFIGURE=1 "${S}/autogen.sh" |
53 | oe_runconf | ||
54 | } | ||
55 | |||
56 | do_compile_prepend() { | ||
57 | export BUILD_SYS="${BUILD_SYS}" | ||
58 | export HOST_SYS="${HOST_SYS}" | ||
59 | } | ||
60 | |||
61 | export SYSTEMD_REQUIRED | ||
62 | |||
63 | do_install_append() { | ||
64 | if [ -n ${SYSTEMD_REQUIRED} ]; then | ||
65 | install -m 0644 -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service | ||
66 | install -m 0644 -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service | ||
67 | fi | ||
68 | } | 46 | } |
69 | 47 | ||
70 | do_install_append_class-native() { | 48 | do_install_append_class-native() { |
71 | create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" | 49 | create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" |
72 | } | 50 | } |
73 | 51 | ||
74 | 52 | PACKAGES += " \ | |
75 | FILES_${PN} += " \ | 53 | ${PN}-switchroot \ |
76 | ${@'${systemd_unitdir}/system/' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \ | 54 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'ostree-dracut', '', d)} \ |
77 | ${@'${libdir}/dracut/modules.d/98ostree/module-setup.sh' if d.getVar('SYSTEMD_REQUIRED', True) else ''} \ | ||
78 | ${datadir}/gir-1.0 \ | ||
79 | ${datadir}/gir-1.0/OSTree-1.0.gir \ | ||
80 | ${libdir}/girepository-1.0 \ | ||
81 | ${libdir}/girepository-1.0/OSTree-1.0.typelib \ | ||
82 | ${libdir}/tmpfiles.d/ostree-tmpfiles.conf \ | ||
83 | ${datadir}/bash-completion/completions/ostree \ | ||
84 | ${systemd_unitdir}/system-generators/ostree-system-generator \ | ||
85 | " | 55 | " |
86 | 56 | ||
87 | PACKAGES =+ "${PN}-switchroot" | 57 | FILES_${PN} = "${bindir} \ |
88 | 58 | ${sysconfdir}/ostree \ | |
59 | ${datadir}/ostree \ | ||
60 | ${libdir}/*.so.* \ | ||
61 | ${libdir}/ostree/ostree-grub-generator \ | ||
62 | ${libdir}/ostree/ostree-remount \ | ||
63 | ${libdir}/girepository-1.0/* \ | ||
64 | ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/tmpfiles.d', '', d)} \ | ||
65 | ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system-generators', '', d)} \ | ||
66 | " | ||
67 | FILES_${PN}-dev += " ${datadir}/gir-1.0" | ||
68 | FILES_${PN}-dracut = "${sysconfdir}/dracut.conf.d ${libdir}/dracut" | ||
89 | FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root" | 69 | FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root" |
90 | RDEPENDS_${PN}-switchroot = "" | ||
91 | DEPENDS_remove_class-native = "systemd-native" | ||
92 | |||