Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | # |
| 2 | # Creates a root filesystem out of rpm packages |
| 3 | # |
| 4 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 5 | ROOTFS_PKGMANAGE = "rpm dnf" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | |
Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame] | 7 | # dnf is using our custom sysconfig module, and so will fail without these |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 8 | export STAGING_INCDIR |
| 9 | export STAGING_LIBDIR |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 10 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 11 | # Add 100Meg of extra space for dnf |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 12 | IMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("PACKAGE_INSTALL", "dnf", " + 102400", "", d)}" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 13 | |
| 14 | # Dnf is python based, so be sure python3-native is available to us. |
| 15 | EXTRANATIVEPATH += "python3-native" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 16 | |
| 17 | # opkg is needed for update-alternatives |
| 18 | RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \ |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 19 | dnf-native:do_populate_sysroot \ |
| 20 | createrepo-c-native:do_populate_sysroot \ |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | opkg-native:do_populate_sysroot" |
| 22 | |
| 23 | do_rootfs[depends] += "${RPMROOTFSDEPENDS}" |
| 24 | do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}" |
| 25 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 26 | do_rootfs[recrdeptask] += "do_package_write_rpm do_package_qa" |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 27 | do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 28 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 29 | python () { |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 30 | if d.getVar('BUILD_IMAGES_FROM_FEEDS'): |
| 31 | flags = d.getVarFlag('do_rootfs', 'recrdeptask') |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 32 | flags = flags.replace("do_package_write_rpm", "") |
| 33 | flags = flags.replace("do_deploy", "") |
| 34 | flags = flags.replace("do_populate_sysroot", "") |
| 35 | d.setVarFlag('do_rootfs', 'recrdeptask', flags) |
| 36 | d.setVar('RPM_PREPROCESS_COMMANDS', '') |
| 37 | d.setVar('RPM_POSTPROCESS_COMMANDS', '') |
| 38 | |
| 39 | } |