mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 00:39:46 +00:00
classes: Drop ';' delimiter from ROOTFS/IMAGE*COMMAND variables
Originally these were shell functions but they have long since been processed by bb.build.exec_func(). Since we no longer need shell syntax, we can drop the ';' delimiters and just use a space separated string. This cleans up the variable and quietly removes any stray ';' that do happen to still make it in. (From OE-Core rev: c3365dfd9ddd7fbe70b62e0f11166e57a8ca6f73) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
@@ -5,25 +5,25 @@
|
||||
#
|
||||
|
||||
# Zap the root password if debug-tweaks and empty-root-password features are not enabled
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password; ",d)}'
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ",d)}'
|
||||
|
||||
# Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks or allow-empty-password is enabled
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}'
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password ", "",d)}'
|
||||
|
||||
# Allow dropbear/openssh to accept root logins if debug-tweaks or allow-root-login is enabled
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], "ssh_allow_root_login; ", "",d)}'
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-root-login' ], "ssh_allow_root_login ", "",d)}'
|
||||
|
||||
# Autologin the root user on the serial console, if empty-root-password and serial-autologin-root are active
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", [ 'empty-root-password', 'serial-autologin-root' ], "serial_autologin_root; ", "",d)}'
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", [ 'empty-root-password', 'serial-autologin-root' ], "serial_autologin_root ", "",d)}'
|
||||
|
||||
# Enable postinst logging if debug-tweaks or post-install-logging is enabled
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}'
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging ", "",d)}'
|
||||
|
||||
# Create /etc/timestamp during image construction to give a reasonably sane default time setting
|
||||
ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp; "
|
||||
ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp "
|
||||
|
||||
# Tweak files in /etc if read-only-rootfs is enabled
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}'
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook ", "",d)}'
|
||||
|
||||
# We also need to do the same for the kernel boot parameters,
|
||||
# otherwise kernel or initramfs end up mounting the rootfs read/write
|
||||
@@ -34,20 +34,20 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only
|
||||
APPEND:append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " ro", "", d)}'
|
||||
|
||||
# Generates test data file with data store variables expanded in json format
|
||||
ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data; "
|
||||
ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data "
|
||||
|
||||
# Write manifest
|
||||
IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}.manifest"
|
||||
ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; "
|
||||
ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest"
|
||||
# Set default postinst log file
|
||||
POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log"
|
||||
# Set default target for systemd images
|
||||
SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains_any("IMAGE_FEATURES", [ "x11-base", "weston" ], "graphical.target", "multi-user.target", d)}'
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; systemd_sysusers_check;", "", d)}'
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target systemd_sysusers_check", "", d)}'
|
||||
|
||||
ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile;'
|
||||
ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile'
|
||||
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs_qa_check; overlayfs_postprocess;", "", d)}'
|
||||
ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "overlayfs", "overlayfs_qa_check overlayfs_postprocess", "", d)}'
|
||||
|
||||
inherit image-artifact-names
|
||||
|
||||
@@ -63,10 +63,10 @@ inherit image-artifact-names
|
||||
# systemd_sysusers_create and set_user_group. Using :append is not
|
||||
# enough for that, set_user_group is added that way and would end
|
||||
# up running after us.
|
||||
SORT_PASSWD_POSTPROCESS_COMMAND ??= " tidy_shadowutils_files; "
|
||||
SORT_PASSWD_POSTPROCESS_COMMAND ??= "tidy_shadowutils_files"
|
||||
python () {
|
||||
d.appendVar('ROOTFS_POSTPROCESS_COMMAND', '${SORT_PASSWD_POSTPROCESS_COMMAND}')
|
||||
d.appendVar('ROOTFS_POSTPROCESS_COMMAND', 'rootfs_reproducible;')
|
||||
d.appendVar('ROOTFS_POSTPROCESS_COMMAND', ' ${SORT_PASSWD_POSTPROCESS_COMMAND}')
|
||||
d.appendVar('ROOTFS_POSTPROCESS_COMMAND', ' rootfs_reproducible')
|
||||
}
|
||||
|
||||
# Resolve the ID as described in the sysusers.d(5) manual: ID can be a numeric
|
||||
|
||||
Reference in New Issue
Block a user