diff options
Diffstat (limited to 'meta/classes-recipe/rootfs_rpm.bbclass')
| -rw-r--r-- | meta/classes-recipe/rootfs_rpm.bbclass | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/classes-recipe/rootfs_rpm.bbclass b/meta/classes-recipe/rootfs_rpm.bbclass new file mode 100644 index 0000000000..6eccd5a959 --- /dev/null +++ b/meta/classes-recipe/rootfs_rpm.bbclass | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | # | ||
| 2 | # Copyright OpenEmbedded Contributors | ||
| 3 | # | ||
| 4 | # SPDX-License-Identifier: MIT | ||
| 5 | # | ||
| 6 | |||
| 7 | # | ||
| 8 | # Creates a root filesystem out of rpm packages | ||
| 9 | # | ||
| 10 | |||
| 11 | ROOTFS_PKGMANAGE = "rpm dnf" | ||
| 12 | |||
| 13 | # dnf is using our custom sysconfig module, and so will fail without these | ||
| 14 | export STAGING_INCDIR | ||
| 15 | export STAGING_LIBDIR | ||
| 16 | |||
| 17 | # Add 100Meg of extra space for dnf | ||
| 18 | IMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("PACKAGE_INSTALL", "dnf", " + 102400", "", d)}" | ||
| 19 | |||
| 20 | # Dnf is python based, so be sure python3-native is available to us. | ||
| 21 | EXTRANATIVEPATH += "python3-native" | ||
| 22 | |||
| 23 | # opkg is needed for update-alternatives | ||
| 24 | RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \ | ||
| 25 | dnf-native:do_populate_sysroot \ | ||
| 26 | createrepo-c-native:do_populate_sysroot \ | ||
| 27 | opkg-native:do_populate_sysroot" | ||
| 28 | |||
| 29 | do_rootfs[depends] += "${RPMROOTFSDEPENDS}" | ||
| 30 | do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}" | ||
| 31 | |||
| 32 | do_rootfs[recrdeptask] += "do_package_write_rpm do_package_qa" | ||
| 33 | do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS" | ||
| 34 | |||
| 35 | python () { | ||
| 36 | if d.getVar('BUILD_IMAGES_FROM_FEEDS'): | ||
| 37 | flags = d.getVarFlag('do_rootfs', 'recrdeptask') | ||
| 38 | flags = flags.replace("do_package_write_rpm", "") | ||
| 39 | flags = flags.replace("do_deploy", "") | ||
| 40 | flags = flags.replace("do_populate_sysroot", "") | ||
| 41 | d.setVarFlag('do_rootfs', 'recrdeptask', flags) | ||
| 42 | d.setVar('RPM_PREPROCESS_COMMANDS', '') | ||
| 43 | d.setVar('RPM_POSTPROCESS_COMMANDS', '') | ||
| 44 | |||
| 45 | } | ||
