diff options
Diffstat (limited to 'meta/classes/rootfs-postcommands.bbclass')
-rw-r--r-- | meta/classes/rootfs-postcommands.bbclass | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index c43b9a9823..943534c57a 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass | |||
@@ -1,6 +1,6 @@ | |||
1 | 1 | ||
2 | # Zap the root password if debug-tweaks feature is not enabled | 2 | # Zap the root password if debug-tweaks feature is not enabled |
3 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password ; ",d)}' | 3 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'empty-root-password' ], "", "zap_empty_root_password; ",d)}' |
4 | 4 | ||
5 | # Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks or allow-empty-password is enabled | 5 | # Allow dropbear/openssh to accept logins from accounts with an empty password string if debug-tweaks or allow-empty-password is enabled |
6 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}' | 6 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'allow-empty-password' ], "ssh_allow_empty_password; ", "",d)}' |
@@ -12,7 +12,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'deb | |||
12 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}' | 12 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'debug-tweaks', 'post-install-logging' ], "postinst_enable_logging; ", "",d)}' |
13 | 13 | ||
14 | # Create /etc/timestamp during image construction to give a reasonably sane default time setting | 14 | # Create /etc/timestamp during image construction to give a reasonably sane default time setting |
15 | ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp ; " | 15 | ROOTFS_POSTPROCESS_COMMAND += "rootfs_update_timestamp; " |
16 | 16 | ||
17 | # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled | 17 | # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled |
18 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}' | 18 | ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", "read_only_rootfs_hook; ", "",d)}' |
@@ -26,7 +26,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("IMAGE_FEATURES", "read-only | |||
26 | APPEND_append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " ro", "", d)}' | 26 | APPEND_append = '${@bb.utils.contains("IMAGE_FEATURES", "read-only-rootfs", " ro", "", d)}' |
27 | 27 | ||
28 | # Generates test data file with data store variables expanded in json format | 28 | # Generates test data file with data store variables expanded in json format |
29 | ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data ; " | 29 | ROOTFS_POSTPROCESS_COMMAND += "write_image_test_data; " |
30 | 30 | ||
31 | # Write manifest | 31 | # Write manifest |
32 | IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest" | 32 | IMAGE_MANIFEST = "${IMGDEPLOYDIR}/${IMAGE_NAME}${IMAGE_NAME_SUFFIX}.manifest" |
@@ -267,9 +267,10 @@ python write_image_manifest () { | |||
267 | 267 | ||
268 | if os.path.exists(manifest_name) and link_name: | 268 | if os.path.exists(manifest_name) and link_name: |
269 | manifest_link = deploy_dir + "/" + link_name + ".manifest" | 269 | manifest_link = deploy_dir + "/" + link_name + ".manifest" |
270 | if os.path.lexists(manifest_link): | 270 | if manifest_link != manifest_name: |
271 | os.remove(manifest_link) | 271 | if os.path.lexists(manifest_link): |
272 | os.symlink(os.path.basename(manifest_name), manifest_link) | 272 | os.remove(manifest_link) |
273 | os.symlink(os.path.basename(manifest_name), manifest_link) | ||
273 | } | 274 | } |
274 | 275 | ||
275 | # Can be used to create /etc/timestamp during image construction to give a reasonably | 276 | # Can be used to create /etc/timestamp during image construction to give a reasonably |
@@ -304,7 +305,7 @@ rootfs_trim_schemas () { | |||
304 | } | 305 | } |
305 | 306 | ||
306 | rootfs_check_host_user_contaminated () { | 307 | rootfs_check_host_user_contaminated () { |
307 | contaminated="${WORKDIR}/host-user-contaminated.txt" | 308 | contaminated="${S}/host-user-contaminated.txt" |
308 | HOST_USER_UID="$(PSEUDO_UNLOAD=1 id -u)" | 309 | HOST_USER_UID="$(PSEUDO_UNLOAD=1 id -u)" |
309 | HOST_USER_GID="$(PSEUDO_UNLOAD=1 id -g)" | 310 | HOST_USER_GID="$(PSEUDO_UNLOAD=1 id -g)" |
310 | 311 | ||
@@ -339,9 +340,10 @@ python write_image_test_data() { | |||
339 | 340 | ||
340 | if os.path.exists(testdata_name) and link_name: | 341 | if os.path.exists(testdata_name) and link_name: |
341 | testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name) | 342 | testdata_link = os.path.join(deploy_dir, "%s.testdata.json" % link_name) |
342 | if os.path.lexists(testdata_link): | 343 | if testdata_link != testdata_name: |
343 | os.remove(testdata_link) | 344 | if os.path.lexists(testdata_link): |
344 | os.symlink(os.path.basename(testdata_name), testdata_link) | 345 | os.remove(testdata_link) |
346 | os.symlink(os.path.basename(testdata_name), testdata_link) | ||
345 | } | 347 | } |
346 | write_image_test_data[vardepsexclude] += "TOPDIR" | 348 | write_image_test_data[vardepsexclude] += "TOPDIR" |
347 | 349 | ||