diff options
-rw-r--r-- | recipes-sota/ostree-initrd/files/init.sh | 2 | ||||
-rw-r--r-- | recipes-sota/ostree/ostree_git.bb | 73 |
2 files changed, 24 insertions, 51 deletions
diff --git a/recipes-sota/ostree-initrd/files/init.sh b/recipes-sota/ostree-initrd/files/init.sh index 0b0693d..d7e0429 100644 --- a/recipes-sota/ostree-initrd/files/init.sh +++ b/recipes-sota/ostree-initrd/files/init.sh | |||
@@ -67,7 +67,7 @@ ostree-prepare-root /sysroot | |||
67 | 67 | ||
68 | # move mounted devices to new root | 68 | # move mounted devices to new root |
69 | cd /sysroot | 69 | cd /sysroot |
70 | for x in dev proc; do | 70 | for x in dev proc run; do |
71 | log_info "Moving /$x to new rootfs" | 71 | log_info "Moving /$x to new rootfs" |
72 | mount -o move "/$x" "$x" | 72 | mount -o move "/$x" "$x" |
73 | done | 73 | done |
diff --git a/recipes-sota/ostree/ostree_git.bb b/recipes-sota/ostree/ostree_git.bb index a5cdc9a..6386910 100644 --- a/recipes-sota/ostree/ostree_git.bb +++ b/recipes-sota/ostree/ostree_git.bb | |||
@@ -1,8 +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-brokensep pkgconfig systemd bash-completion gobject-introspection | 6 | inherit autotools pkgconfig systemd bash-completion gobject-introspection |
6 | 7 | ||
7 | INHERIT_remove_class-native = "systemd" | 8 | INHERIT_remove_class-native = "systemd" |
8 | 9 | ||
@@ -16,67 +17,47 @@ S = "${WORKDIR}/git" | |||
16 | 17 | ||
17 | BBCLASSEXTEND = "native" | 18 | BBCLASSEXTEND = "native" |
18 | 19 | ||
19 | DEPENDS += "attr libarchive glib-2.0 pkgconfig gpgme libgsystem fuse libsoup-2.4 e2fsprogs gtk-doc-native curl xz" | 20 | DEPENDS += "attr bison-native libarchive libcap glib-2.0 gpgme fuse e2fsprogs curl xz" |
20 | DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" | 21 | DEPENDS_append = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', ' systemd', '', d)}" |
21 | DEPENDS_remove_class-native = "systemd-native" | 22 | DEPENDS_remove_class-native = "systemd-native" |
22 | |||
23 | RDEPENDS_${PN} = "python util-linux-libuuid util-linux-libblkid util-linux-libmount libcap bash" | ||
24 | RDEPENDS_${PN}_remove_class-native = "python-native" | ||
25 | RDEPENDS_${PN}-dracut = "bash" | 23 | RDEPENDS_${PN}-dracut = "bash" |
26 | 24 | ||
27 | EXTRA_OECONF = "--with-libarchive --disable-gtk-doc --disable-gtk-doc-html --disable-gtk-doc-pdf --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl" | 25 | CFLAGS_append = " -Wno-error=missing-prototypes" |
26 | EXTRA_OECONF = "--disable-gtk-doc --disable-man --with-smack --with-builtin-grub2-mkconfig --with-curl --without-soup" | ||
28 | EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" | 27 | EXTRA_OECONF_append_class-native = " --enable-wrpseudo-compat" |
29 | 28 | ||
29 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
30 | PACKAGECONFIG_class-native = "" | ||
31 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut" | ||
32 | |||
30 | # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the | 33 | # Path to ${prefix}/lib/ostree/ostree-grub-generator is hardcoded on the |
31 | # do_configure stage so we do depend on it | 34 | # do_configure stage so we do depend on it |
32 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" | 35 | SYSROOT_DIR = "${STAGING_DIR_TARGET}" |
33 | SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" | 36 | SYSROOT_DIR_class-native = "${STAGING_DIR_NATIVE}" |
34 | do_configure[vardeps] += "SYSROOT_DIR" | 37 | do_configure[vardeps] += "SYSROOT_DIR" |
35 | 38 | ||
36 | SYSTEMD_REQUIRED = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}" | 39 | SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service ostree-finalize-staged.service" |
37 | SYSTEMD_REQUIRED_class-native = "" | ||
38 | |||
39 | SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service" | ||
40 | SYSTEMD_SERVICE_${PN}_class-native = "" | ||
41 | |||
42 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
43 | PACKAGECONFIG_class-native = "" | ||
44 | PACKAGECONFIG[systemd] = "--with-systemdsystemunitdir=${systemd_unitdir}/system/ --with-dracut" | ||
45 | |||
46 | FILES_${PN} += "${libdir}/ostree/ ${libdir}/ostbuild" | ||
47 | 40 | ||
41 | export BUILD_SYS | ||
42 | export HOST_SYS | ||
48 | export STAGING_INCDIR | 43 | export STAGING_INCDIR |
49 | export STAGING_LIBDIR | 44 | export STAGING_LIBDIR |
50 | 45 | ||
51 | do_configure() { | 46 | do_configure_prepend() { |
52 | unset docdir | 47 | unset docdir |
53 | NOCONFIGURE=1 ./autogen.sh | 48 | NOCONFIGURE=1 "${S}/autogen.sh" |
54 | oe_runconf | ||
55 | } | ||
56 | |||
57 | do_compile_prepend() { | ||
58 | export BUILD_SYS="${BUILD_SYS}" | ||
59 | export HOST_SYS="${HOST_SYS}" | ||
60 | } | ||
61 | |||
62 | SYSTEMD_SERVICE_${PN} = "ostree-prepare-root.service ostree-remount.service ostree-finalize-staged.service" | ||
63 | |||
64 | export SYSTEMD_REQUIRED | ||
65 | |||
66 | do_install_append() { | ||
67 | if [ -n ${SYSTEMD_REQUIRED} ]; then | ||
68 | install -p -D ${S}/src/boot/ostree-prepare-root.service ${D}${systemd_unitdir}/system/ostree-prepare-root.service | ||
69 | install -p -D ${S}/src/boot/ostree-remount.service ${D}${systemd_unitdir}/system/ostree-remount.service | ||
70 | fi | ||
71 | } | 49 | } |
72 | 50 | ||
73 | do_install_append_class-native() { | 51 | do_install_append_class-native() { |
74 | create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" | 52 | create_wrapper ${D}${bindir}/ostree OSTREE_GRUB2_EXEC="${STAGING_LIBDIR_NATIVE}/ostree/ostree-grub-generator" |
75 | } | 53 | } |
76 | 54 | ||
55 | PACKAGES += " \ | ||
56 | ${PN}-switchroot \ | ||
57 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'ostree-dracut', '', d)} \ | ||
58 | " | ||
77 | 59 | ||
78 | FILES_${PN} += " \ | 60 | FILES_${PN} = "${bindir} \ |
79 | {bindir} \ | ||
80 | ${sysconfdir}/ostree \ | 61 | ${sysconfdir}/ostree \ |
81 | ${datadir}/ostree \ | 62 | ${datadir}/ostree \ |
82 | ${libdir}/*.so.* \ | 63 | ${libdir}/*.so.* \ |
@@ -86,14 +67,6 @@ FILES_${PN} += " \ | |||
86 | ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/tmpfiles.d', '', d)} \ | 67 | ${@bb.utils.contains('DISTRO_FEATURES','systemd','${libdir}/tmpfiles.d', '', d)} \ |
87 | ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system-generators', '', d)} \ | 68 | ${@bb.utils.contains('DISTRO_FEATURES','systemd','${systemd_unitdir}/system-generators', '', d)} \ |
88 | " | 69 | " |
89 | |||
90 | PACKAGES =+ " \ | ||
91 | ${PN}-switchroot \ | ||
92 | ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'ostree-dracut', '', d)} \ | ||
93 | " | ||
94 | |||
95 | FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root" | ||
96 | RDEPENDS_${PN}-switchroot = "" | ||
97 | DEPENDS_remove_class-native = "systemd-native" | ||
98 | FILES_${PN}-dev += " ${datadir}/gir-1.0" | 70 | FILES_${PN}-dev += " ${datadir}/gir-1.0" |
99 | FILES_${PN}-dracut = "${sysconfdir}/dracut.conf.d ${libdir}/dracut" | 71 | FILES_${PN}-dracut = "${sysconfdir}/dracut.conf.d ${libdir}/dracut" |
72 | FILES_${PN}-switchroot = "${libdir}/ostree/ostree-prepare-root" | ||