All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] rootfs-post: remove traling blanks from tasks
@ 2020-07-08 11:09 Konrad Weihmann
  2020-07-09  5:30 ` [OE-core] " Jens Rehsack
  0 siblings, 1 reply; 5+ messages in thread
From: Konrad Weihmann @ 2020-07-08 11:09 UTC (permalink / raw)
  To: openembedded-core; +Cc: Konrad Weihmann

remove the traling blanks before the ;-delimiter, so one could use
"_remove" to avoid running tasks like 'rootfs_update_timestamp',
which are currently hardcoded and not bound to any
configurable feature flag

Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
---
 meta/classes/rootfs-postcommands.bbclass | 6 +++---
 meta/classes/rootfsdebugfiles.bbclass    | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
index c43b9a9823..984730ebe8 100644
--- a/meta/classes/rootfs-postcommands.bbclass
+++ b/meta/classes/rootfs-postcommands.bbclass
@@ -1,6 +1,6 @@
 
 # Zap the root password if debug-tweaks feature is 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)}'
@@ -12,7 +12,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'deb
 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 the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled
 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
 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}${IMAGE_NAME_SUFFIX}.manifest"
diff --git a/meta/classes/rootfsdebugfiles.bbclass b/meta/classes/rootfsdebugfiles.bbclass
index e2ba4e3647..85c7ec7434 100644
--- a/meta/classes/rootfsdebugfiles.bbclass
+++ b/meta/classes/rootfsdebugfiles.bbclass
@@ -28,7 +28,7 @@
 ROOTFS_DEBUG_FILES ?= ""
 ROOTFS_DEBUG_FILES[doc] = "Lists additional files or directories to be installed with 'cp -a' in the format 'source1 target1;source2 target2;...'"
 
-ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files ;"
+ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files;"
 rootfs_debug_files () {
    #!/bin/sh -e
    echo "${ROOTFS_DEBUG_FILES}" | sed -e 's/;/\n/g' | while read source target mode; do
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH 1/2] rootfs-post: remove traling blanks from tasks
  2020-07-08 11:09 [PATCH 1/2] rootfs-post: remove traling blanks from tasks Konrad Weihmann
@ 2020-07-09  5:30 ` Jens Rehsack
  2020-07-09  5:37   ` Jacob Kroon
  2020-07-09  7:21   ` Konrad Weihmann
  0 siblings, 2 replies; 5+ messages in thread
From: Jens Rehsack @ 2020-07-09  5:30 UTC (permalink / raw)
  To: Konrad Weihmann; +Cc: openembedded-core

[-- Attachment #1: Type: text/plain, Size: 3663 bytes --]



> Am 08.07.2020 um 13:09 schrieb Konrad Weihmann <kweihmann@outlook.com>:
> 
> remove the traling blanks before the ;-delimiter, so one could use
               ^
               here & subject: do you mean "trailing"?

> "_remove" to avoid running tasks like 'rootfs_update_timestamp',
> which are currently hardcoded and not bound to any
> configurable feature flag
> 
> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
> ---
> meta/classes/rootfs-postcommands.bbclass | 6 +++---
> meta/classes/rootfsdebugfiles.bbclass    | 2 +-
> 2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
> index c43b9a9823..984730ebe8 100644
> --- a/meta/classes/rootfs-postcommands.bbclass
> +++ b/meta/classes/rootfs-postcommands.bbclass
> @@ -1,6 +1,6 @@
> 
> # Zap the root password if debug-tweaks feature is 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)}'
> @@ -12,7 +12,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'deb
> 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; "

How about
+ROOTFS_POSTPROCESS_COMMAND += " rootfs_update_timestamp;"

Reading a list is much easier when words are separated by whitespaces.

> # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled
> 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
> 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}${IMAGE_NAME_SUFFIX}.manifest"
> diff --git a/meta/classes/rootfsdebugfiles.bbclass b/meta/classes/rootfsdebugfiles.bbclass
> index e2ba4e3647..85c7ec7434 100644
> --- a/meta/classes/rootfsdebugfiles.bbclass
> +++ b/meta/classes/rootfsdebugfiles.bbclass
> @@ -28,7 +28,7 @@
> ROOTFS_DEBUG_FILES ?= ""
> ROOTFS_DEBUG_FILES[doc] = "Lists additional files or directories to be installed with 'cp -a' in the format 'source1 target1;source2 target2;...'"
> 
> -ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files ;"
> +ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files;"
> rootfs_debug_files () {
>    #!/bin/sh -e
>    echo "${ROOTFS_DEBUG_FILES}" | sed -e 's/;/\n/g' | while read source target mode; do
> --
> 2.20.1
> 
> 

--
Jens Rehsack - rehsack@gmail.com


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH 1/2] rootfs-post: remove traling blanks from tasks
  2020-07-09  5:30 ` [OE-core] " Jens Rehsack
@ 2020-07-09  5:37   ` Jacob Kroon
  2020-07-09  7:14     ` Jens Rehsack
  2020-07-09  7:21   ` Konrad Weihmann
  1 sibling, 1 reply; 5+ messages in thread
From: Jacob Kroon @ 2020-07-09  5:37 UTC (permalink / raw)
  To: Jens Rehsack, Konrad Weihmann; +Cc: openembedded-core

On 7/9/20 7:30 AM, Jens Rehsack wrote:
> 
> 
>> Am 08.07.2020 um 13:09 schrieb Konrad Weihmann <kweihmann@outlook.com>:
>>
>> remove the traling blanks before the ;-delimiter, so one could use
>                 ^
>                 here & subject: do you mean "trailing"?
> 
>> "_remove" to avoid running tasks like 'rootfs_update_timestamp',
>> which are currently hardcoded and not bound to any
>> configurable feature flag
>>
>> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
>> ---
>> meta/classes/rootfs-postcommands.bbclass | 6 +++---
>> meta/classes/rootfsdebugfiles.bbclass    | 2 +-
>> 2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
>> index c43b9a9823..984730ebe8 100644
>> --- a/meta/classes/rootfs-postcommands.bbclass
>> +++ b/meta/classes/rootfs-postcommands.bbclass
>> @@ -1,6 +1,6 @@
>>
>> # Zap the root password if debug-tweaks feature is 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)}'
>> @@ -12,7 +12,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'deb
>> 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; "
> 
> How about
> +ROOTFS_POSTPROCESS_COMMAND += " rootfs_update_timestamp;"
> 
> Reading a list is much easier when words are separated by whitespaces.
> 

The += and =+ operators already insert a space between the concatenations.

https://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html#appending-and-prepending

Jacob

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH 1/2] rootfs-post: remove traling blanks from tasks
  2020-07-09  5:37   ` Jacob Kroon
@ 2020-07-09  7:14     ` Jens Rehsack
  0 siblings, 0 replies; 5+ messages in thread
From: Jens Rehsack @ 2020-07-09  7:14 UTC (permalink / raw)
  To: Jacob Kroon, Konrad Weihmann
  Cc: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: text/plain, Size: 2767 bytes --]



> Am 09.07.2020 um 07:37 schrieb Jacob Kroon <jacob.kroon@gmail.com>:
> 
> On 7/9/20 7:30 AM, Jens Rehsack wrote:
>>> Am 08.07.2020 um 13:09 schrieb Konrad Weihmann <kweihmann@outlook.com>:
>>> 
>>> remove the traling blanks before the ;-delimiter, so one could use
>>                ^
>>                here & subject: do you mean "trailing"?
>>> "_remove" to avoid running tasks like 'rootfs_update_timestamp',
>>> which are currently hardcoded and not bound to any
>>> configurable feature flag
>>> 
>>> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
>>> ---
>>> meta/classes/rootfs-postcommands.bbclass | 6 +++---
>>> meta/classes/rootfsdebugfiles.bbclass    | 2 +-
>>> 2 files changed, 4 insertions(+), 4 deletions(-)
>>> 
>>> diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
>>> index c43b9a9823..984730ebe8 100644
>>> --- a/meta/classes/rootfs-postcommands.bbclass
>>> +++ b/meta/classes/rootfs-postcommands.bbclass
>>> @@ -1,6 +1,6 @@
>>> 
>>> # Zap the root password if debug-tweaks feature is 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)}'
>>> @@ -12,7 +12,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'deb
>>> 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; "
>> How about
>> +ROOTFS_POSTPROCESS_COMMAND += " rootfs_update_timestamp;"
>> Reading a list is much easier when words are separated by whitespaces.
> 
> The += and =+ operators already insert a space between the concatenations.
> 
> https://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html#appending-and-prepending
> 
> Jacob

I always become confused since often I have to use _append etc. (to avoid hitting ?=) - thanks for pointing that out.

Cheers
--
Jens Rehsack - rehsack@gmail.com


[-- Attachment #2: Message signed with OpenPGP --]
[-- Type: application/pgp-signature, Size: 849 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [OE-core] [PATCH 1/2] rootfs-post: remove traling blanks from tasks
  2020-07-09  5:30 ` [OE-core] " Jens Rehsack
  2020-07-09  5:37   ` Jacob Kroon
@ 2020-07-09  7:21   ` Konrad Weihmann
  1 sibling, 0 replies; 5+ messages in thread
From: Konrad Weihmann @ 2020-07-09  7:21 UTC (permalink / raw)
  To: Jens Rehsack; +Cc: openembedded-core

Thanks - missed that -> sent a v2

On 09.07.20 07:30, Jens Rehsack wrote:
> 
> 
>> Am 08.07.2020 um 13:09 schrieb Konrad Weihmann <kweihmann@outlook.com>:
>>
>> remove the traling blanks before the ;-delimiter, so one could use
>                 ^
>                 here & subject: do you mean "trailing"?
> 
>> "_remove" to avoid running tasks like 'rootfs_update_timestamp',
>> which are currently hardcoded and not bound to any
>> configurable feature flag
>>
>> Signed-off-by: Konrad Weihmann <kweihmann@outlook.com>
>> ---
>> meta/classes/rootfs-postcommands.bbclass | 6 +++---
>> meta/classes/rootfsdebugfiles.bbclass    | 2 +-
>> 2 files changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass
>> index c43b9a9823..984730ebe8 100644
>> --- a/meta/classes/rootfs-postcommands.bbclass
>> +++ b/meta/classes/rootfs-postcommands.bbclass
>> @@ -1,6 +1,6 @@
>>
>> # Zap the root password if debug-tweaks feature is 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)}'
>> @@ -12,7 +12,7 @@ ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains_any("IMAGE_FEATURES", [ 'deb
>> 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; "
> 
> How about
> +ROOTFS_POSTPROCESS_COMMAND += " rootfs_update_timestamp;"
> 
> Reading a list is much easier when words are separated by whitespaces.
> 
>> # Tweak the mount options for rootfs in /etc/fstab if read-only-rootfs is enabled
>> 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
>> 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}${IMAGE_NAME_SUFFIX}.manifest"
>> diff --git a/meta/classes/rootfsdebugfiles.bbclass b/meta/classes/rootfsdebugfiles.bbclass
>> index e2ba4e3647..85c7ec7434 100644
>> --- a/meta/classes/rootfsdebugfiles.bbclass
>> +++ b/meta/classes/rootfsdebugfiles.bbclass
>> @@ -28,7 +28,7 @@
>> ROOTFS_DEBUG_FILES ?= ""
>> ROOTFS_DEBUG_FILES[doc] = "Lists additional files or directories to be installed with 'cp -a' in the format 'source1 target1;source2 target2;...'"
>>
>> -ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files ;"
>> +ROOTFS_POSTPROCESS_COMMAND += "rootfs_debug_files;"
>> rootfs_debug_files () {
>>     #!/bin/sh -e
>>     echo "${ROOTFS_DEBUG_FILES}" | sed -e 's/;/\n/g' | while read source target mode; do
>> --
>> 2.20.1
>>
>> 
> 
> --
> Jens Rehsack - rehsack@gmail.com
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-07-09  7:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08 11:09 [PATCH 1/2] rootfs-post: remove traling blanks from tasks Konrad Weihmann
2020-07-09  5:30 ` [OE-core] " Jens Rehsack
2020-07-09  5:37   ` Jacob Kroon
2020-07-09  7:14     ` Jens Rehsack
2020-07-09  7:21   ` Konrad Weihmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.