Re: qemu-binfmt-conf.sh: enforce style consistency

2021-06-20 Thread Unai Martinez Corral
267.html > Please use your real name, not a nickname. > Sorry about that. It's 'Unai Martinez-Corral'. Shall I resend the patch? Cheers Unai

Re: [PATCH v10 0/10] qemu-binfmt-conf.sh

2020-04-22 Thread Unai Martinez Corral
t it. I'd be glad to hear any suggestion. Regards Unai El lun., 9 mar. 2020 a las 20:01, Unai Martinez-Corral () escribió: > Hi, > > This series reworks qemu-binfmt-conf.sh: > > * Argument from option '--systemd' is generalized to , and > it is > accepted f

Re: [PATCH v10 02/10] qemu-binfmt-conf.sh: enforce safe tests

2020-03-12 Thread Unai Martinez Corral
, Eric Blake () escribió: > On 3/10/20 3:28 AM, Laurent Vivier wrote: > > Le 09/03/2020 à 20:19, Unai Martinez-Corral a écrit : > >> All the tests are prefixed with 'x', in order to avoid risky comparisons > >> (i.e. a user deliberately trying to provoke a syntax er

Re: [PATCH v10 04/10] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT

2020-03-12 Thread Unai Martinez Corral
2020/03/10 9:20, Laurent Vivier: > If variable are set to 'yes', how do you force the value to no with the > command line? > I believe you cannot. Do you mean the explanation should be reworded? Or that the feature should be implemented? > Please, refresh my memory, why do we need these variabl

[PATCH v10 0/10] qemu-binfmt-conf.sh

2020-03-09 Thread Unai Martinez-Corral
v4 0/10] qemu-binfmt-conf.sh * [PATCH v3 0/10] qemu-binfmt-conf.sh * [PATCH v2] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg) * [PATCH] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg) * scripts/qemu-binfmt-conf.sh: allow clearing of entries

Re: [PATCH v10 01/10] qemu-binfmt-conf.sh: enforce style consistency

2020-03-09 Thread Unai Martinez Corral
2020/3/9 20:30, Eric Blake: > On 3/9/20 2:18 PM, Unai Martinez-Corral wrote: > > Spaces are removed before '; then', for consistency with other scripts > > in the project. > > > > Signed-off-by: Unai Martinez-Corral > > Reviewed-by: Laurent Vivier >

[PATCH v10 08/10] qemu-binfmt-conf.sh: generalize to positional [TARGETS]

2020-03-09 Thread Unai Martinez-Corral
supported formats are the same as for positional arguments, which have priority. If both the variable and the list of positional arguments are empty, defaults to qemu_target_list. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 80

[PATCH v10 10/10] qemu-binfmt-conf.sh: add --test

2020-03-09 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 55224a68e1..21c8f63916 100755 --- a/scripts

[PATCH v10 06/10] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options

2020-03-09 Thread Unai Martinez-Corral
This breaks backward compatibility. Options 'qemu-path' and 'qemu-suffix' have the 'qemu-' prefix, which is not present in other option names ('debian', 'systemd', 'persistent', 'credential'...). In order to keep consistency,

[PATCH v10 09/10] qemu-binfmt-conf.sh: add option --clear

2020-03-09 Thread Unai Martinez-Corral
stemd' configurations are not supported. The script will exit with error 'option clear not implemented for this mode yet'. Removal is done by printing '-1' as explained at: https://www.kernel.org/doc/Documentation/admin-guide/binfmt-misc.rst Signed-off-by: Unai Martinez

[PATCH v10 07/10] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX

2020-03-09 Thread Unai Martinez-Corral
Allow to set 'path' or 'suffix' through environment variables, consistently with 'persistent' and 'credential'. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 9 - 1 file changed, 4 insertions(

[PATCH v10 05/10] qemu-binfmt-conf.sh: use the same presentation format as for qemu-*

2020-03-09 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 63 +++-- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 0c28db5ca4..870815fb22

[PATCH v10 03/10] qemu-binfmt-conf.sh: make opts -p and -c boolean

2020-03-09 Thread Unai Martinez-Corral
th options boolean in getopt, so if any of them is provided the corresponding variable is set to true. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts

[PATCH v10 04/10] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT

2020-03-09 Thread Unai Martinez-Corral
Allow to set options '--persistent' and/or '--credential' through environment variables. If not defined, defaults are used ('no'). Anyway, command-line arguments have priority over environment variables. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vi

[PATCH v10 01/10] qemu-binfmt-conf.sh: enforce style consistency

2020-03-09 Thread Unai Martinez-Corral
Spaces are removed before '; then', for consistency with other scripts in the project. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) di

[PATCH v10 02/10] qemu-binfmt-conf.sh: enforce safe tests

2020-03-09 Thread Unai Martinez-Corral
All the tests are prefixed with 'x', in order to avoid risky comparisons (i.e. a user deliberately trying to provoke a syntax error). Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 10 +- 1 file changed, 5 insertions(+), 5

[PATCH v10 0/10] qemu-binfmt-conf.sh

2020-03-09 Thread Unai Martinez-Corral
v4 0/10] qemu-binfmt-conf.sh * [PATCH v3 0/10] qemu-binfmt-conf.sh * [PATCH v2] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg) * [PATCH] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg) * scripts/qemu-binfmt-conf.sh: allow clearing of entries

[PATCH v9 9/9] qemu-binfmt-conf.sh: add --test

2020-03-09 Thread Unai Martinez-Corral
Signed-off-by: umarcor Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 55224a68e1..21c8f63916 100755 --- a/scripts/qemu-binfmt-con

[PATCH v9 8/9] qemu-binfmt-conf.sh: add option --clear

2020-03-09 Thread Unai Martinez-Corral
This is a partial implementation. Allows to remove a single or a list of already registered binfmt interpreters. Valid values are those in qemu_target_list. If TARGETS is empty, all the existing 'qemu-*' interpreters are removed. This is partial because 'debian' and 'systemd' configurations are n

[PATCH v9 5/9] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options

2020-03-09 Thread Unai Martinez-Corral
This breaks backward compatibility. Options 'qemu-path' and 'qemu-suffix' have the 'qemu-' prefix, which is not present in other option names ('debian', 'systemd', 'persistent', 'credential'...). In order to keep consistency, the prefix is removed. Signed-off-by: umarcor Reviewed-by: Laurent Viv

[PATCH v9 6/9] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX

2020-03-09 Thread Unai Martinez-Corral
Allow to set 'path' or 'suffix' through environment variables, consistently with 'persistent' and 'credential'. Signed-off-by: umarcor Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/qemu-binfmt-con

[PATCH v9 7/9] qemu-binfmt-conf.sh: generalize to positional [TARGETS]

2020-03-09 Thread Unai Martinez-Corral
This breaks brackward compatibility. Option '--systemd CPU' allows to register binfmt interpreters for a single target architecture or for 'ALL' (of them). This patch generalizes the approach to support it in any mode (default, '--debian' or '--systemd'). To do so, option 'systemd' is changed to b

[PATCH v9 4/9] qemu-binfmt-conf.sh: use the same presentation format as for qemu-*

2020-03-09 Thread Unai Martinez-Corral
Signed-off-by: umarcor Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 63 +++-- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 0c28db5ca4..870815fb22 100755 --- a/scrip

[PATCH v9 3/9] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT

2020-03-09 Thread Unai Martinez-Corral
Allow to set options '--persistent' and/or '--credential' through environment variables. If not defined, defaults are used ('no'). Anyway, command-line arguments have priority over environment variables. Signed-off-by: umarcor Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 18 +++

[PATCH v9 2/9] qemu-binfmt-conf.sh: make opts -p and -c boolean

2020-03-09 Thread Unai Martinez-Corral
This patch breaks backward compatibility. Both '--persistent' and '--credential' default to 'no'. Hence, '-p no' or '-c no' are redundant. Overall, accepting an argument might be misleading because options are, indeed, boolean. This patch makes both options boolean in getopt, so if any of them is

[PATCH v9 1/9] qemu-binfmt-conf.sh: enforce safe style consistency

2020-03-09 Thread Unai Martinez-Corral
Spaces are removed before '; then', for consistency. All the tests are prefixed with 'x', in order to avoid risky comparisons (i.e. a user deliberately trying to provoke a syntax error). Signed-off-by: umarcor Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 34 +--

[PATCH v9 0/9] qemu-binfmt-conf.sh

2020-03-09 Thread Unai Martinez-Corral
H v3 0/10] qemu-binfmt-conf.sh * [PATCH v2] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg) * [PATCH] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg) * scripts/qemu-binfmt-conf.sh: allow clearing of entries Regards Unai Martinez-Corral

Re: [PATCH v8 1/9] qemu-binfmt-conf.sh: enforce safe style consistency

2020-03-09 Thread Unai Martinez Corral
2020/03/09 16:01, Eric Blake: > On 3/7/20 11:22 AM, Unai Martinez-Corral wrote: > > Spaces are added before '; then', for consistency. > > For consistency with what? This is not our prevailing style; as > evidenced by this pre-patch search: > > $ git grep &#

[PATCH v8 8/9] qemu-binfmt-conf.sh: add option --clear

2020-03-07 Thread Unai Martinez-Corral
stemd' configurations are not supported. The script will exit with error 'option clear not implemented for this mode yet'. Removal is done by printing '-1' as explained at: https://www.kernel.org/doc/Documentation/admin-guide/binfmt-misc.rst Signed-off-by: Unai Martinez

[PATCH v8 9/9] qemu-binfmt-conf.sh: add --test

2020-03-07 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 9685456747..4635871e6d 100755 --- a/scripts

[PATCH v8 7/9] qemu-binfmt-conf.sh: generalize to positional [TARGETS]

2020-03-07 Thread Unai Martinez-Corral
supported formats are the same as for positional arguments, which have priority. If both the variable and the list of positional arguments are empty, defaults to qemu_target_list. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 80

[PATCH v8 5/9] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options

2020-03-07 Thread Unai Martinez-Corral
This breaks backward compatibility. Options 'qemu-path' and 'qemu-suffix' have the 'qemu-' prefix, which is not present in other option names ('debian', 'systemd', 'persistent', 'credential'...). In order to keep consistency,

[PATCH v8 6/9] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX

2020-03-07 Thread Unai Martinez-Corral
Allow to set 'path' or 'suffix' through environment variables, consistently with 'persistent' and 'credential'. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 9 - 1 file changed, 4 insertions(

[PATCH v8 4/9] qemu-binfmt-conf.sh: use the same presentation format as for qemu-*

2020-03-07 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 63 +++-- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 347cddf698..251a78a2ce

[PATCH v8 3/9] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT

2020-03-07 Thread Unai Martinez-Corral
Allow to set options '--persistent' and/or '--credential' through environment variables. If not defined, defaults are used ('no'). Anyway, command-line arguments have priority over environment variables. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vi

[PATCH v8 2/9] qemu-binfmt-conf.sh: make opts -p and -c boolean

2020-03-07 Thread Unai Martinez-Corral
th options boolean in getopt, so if any of them is provided the corresponding variable is set to true. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts

[PATCH v8 1/9] qemu-binfmt-conf.sh: enforce safe style consistency

2020-03-07 Thread Unai Martinez-Corral
Spaces are added before '; then', for consistency. All the tests are prefixed with 'x', in order to avoid risky comparisons (i.e. a user deliberately trying to provoke a syntax error). Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu

[PATCH v8 4/9] qemu-binfmt-conf.sh: use the same presentation format as for qemu-*

2020-03-07 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 63 +++-- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 347cddf698..251a78a2ce

[PATCH v8 9/9] qemu-binfmt-conf.sh: add --test

2020-03-07 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 9685456747..4635871e6d 100755 --- a/scripts

[PATCH v8 8/9] qemu-binfmt-conf.sh: add option --clear

2020-03-07 Thread Unai Martinez-Corral
stemd' configurations are not supported. The script will exit with error 'option clear not implemented for this mode yet'. Removal is done by printing '-1' as explained at: https://www.kernel.org/doc/Documentation/admin-guide/binfmt-misc.rst Signed-off-by: Unai Martinez

[PATCH v8 7/9] qemu-binfmt-conf.sh: generalize to positional [TARGETS]

2020-03-07 Thread Unai Martinez-Corral
supported formats are the same as for positional arguments, which have priority. If both the variable and the list of positional arguments are empty, defaults to qemu_target_list. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 80

[PATCH v8 6/9] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX

2020-03-07 Thread Unai Martinez-Corral
Allow to set 'path' or 'suffix' through environment variables, consistently with 'persistent' and 'credential'. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 9 - 1 file changed, 4 insertions(

[PATCH 6/9] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX

2020-03-07 Thread Unai Martinez-Corral
Allow to set 'path' or 'suffix' through environment variables, consistently with 'persistent' and 'credential'. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 9 - 1 file changed, 4 insertions(

[PATCH v8 5/9] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options

2020-03-07 Thread Unai Martinez-Corral
This breaks backward compatibility. Options 'qemu-path' and 'qemu-suffix' have the 'qemu-' prefix, which is not present in other option names ('debian', 'systemd', 'persistent', 'credential'...). In order to keep consistency,

[PATCH v8 4/9] qemu-binfmt-conf.sh: use the same presentation format as for qemu-*

2020-03-07 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 63 +++-- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 347cddf698..251a78a2ce 100755 --- a/scripts/qemu-binfmt

[PATCH v8 3/9] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT

2020-03-07 Thread Unai Martinez-Corral
Allow to set options '--persistent' and/or '--credential' through environment variables. If not defined, defaults are used ('no'). Anyway, command-line arguments have priority over environment variables. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vi

[PATCH v8 1/9] qemu-binfmt-conf.sh: enforce safe style consistency

2020-03-07 Thread Unai Martinez-Corral
Spaces are added before '; then', for consistency. All the tests are prefixed with 'x', in order to avoid risky comparisons (i.e. a user deliberately trying to provoke a syntax error). Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu

Re: [Qemu-devel] [PATCH v7 2/9] qemu-binfmt-conf.sh: make opts -p and -c boolean

2019-03-12 Thread Unai Martinez Corral
2019/3/12 22:56, Eric Blake: > On 3/12/19 4:39 PM, Unai Martinez Corral wrote: > > 2019/3/12, Eric Blake: > >> > >> On 3/12/19 2:51 PM, Unai Martinez-Corral wrote: > >>> This patch breaks backward compatibility. > >> > >> Is it worth a

Re: [Qemu-devel] [PATCH v7 3/9] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT

2019-03-12 Thread Unai Martinez Corral
2019/3/12 22:13, Eric Blake: > On 3/12/19 2:51 PM, Unai Martinez-Corral wrote: > > @@ -186,9 +186,11 @@ Usage: qemu-binfmt-conf.sh [--qemu-path > > PATH][--debian][--systemd CPU] > >(default: $SYSTEMDDIR or $DEBIANDIR) > > Remember, this is in

Re: [Qemu-devel] [PATCH v7 2/9] qemu-binfmt-conf.sh: make opts -p and -c boolean

2019-03-12 Thread Unai Martinez Corral
2019/3/12, Eric Blake: > > On 3/12/19 2:51 PM, Unai Martinez-Corral wrote: > > This patch breaks backward compatibility. > > > > Is it worth a mention why we don't consider backwards-compatibility for > this script to be very important? 'persistent' is a

Re: [Qemu-devel] [PATCH v7 4/9] qemu-binfmt-conf.sh: use the same presentation format as for qemu-*

2019-03-12 Thread Unai Martinez Corral
2019/3/12 21:03, Laurent Vivier: > QEMU_PATH appears to be an Env-Variable whereas it is not. But we need > to define it because we want to display its default value. And it is > changed into an env-variable in PATCH 6/9... so I think it's acceptable > as is. Yes, you are correct. This is because

Re: [Qemu-devel] [PATCH v7 8/9] qemu-binfmt-conf.sh: add option --clear

2019-03-12 Thread Unai Martinez Corral
I could not see the indentation problems you mentioned before. Hope it is fixed in v7 anyway. El mar., 12 mar. 2019 a las 20:56, Laurent Vivier () escribió: > > On 12/03/2019 20:54, Unai Martinez-Corral wrote: > > This is a partial implementation. > > > > Allows to remo

[Qemu-devel] [PATCH v7 0/9] qemu-binfmt-conf.sh

2019-03-12 Thread Unai Martinez-Corral
p and -c boolean (no arg) * [PATCH] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg) * scripts/qemu-binfmt-conf.sh: allow clearing of entries Regards Unai Martinez-Corral (9): qemu-binfmt-conf.sh: enforce safe style consistency qemu-binfmt-conf.sh: make opts -p

[Qemu-devel] [PATCH v7 2/9] qemu-binfmt-conf.sh: make opts -p and -c boolean

2019-03-12 Thread Unai Martinez-Corral
th options boolean in getopt, so if any of them is provided the corresponding variable is set to true. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts

[Qemu-devel] [PATCH v7 3/9] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT

2019-03-12 Thread Unai Martinez-Corral
Allow to set options '--persistent' and/or '--credential' through environment variables. If not defined, defaults are used ('no'). Anyway, command-line arguments have priority over environment variables. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vi

[Qemu-devel] [PATCH v7 5/9] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options

2019-03-12 Thread Unai Martinez-Corral
This breaks backward compatibility. Options 'qemu-path' and 'qemu-suffix' have the 'qemu-' prefix, which is not present in other option names ('debian', 'systemd', 'persistent', 'credential'...). In order to keep consistency,

[Qemu-devel] [PATCH v7 8/9] qemu-binfmt-conf.sh: add option --clear

2019-03-12 Thread Unai Martinez-Corral
stemd' configurations are not supported. The script will exit with error 'option clear not implemented for this mode yet'. Removal is done by printing '-1' as explained at: https://www.kernel.org/doc/Documentation/admin-guide/binfmt-misc.rst Signed-off-by: Unai Mart

[Qemu-devel] [PATCH v7 6/9] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX

2019-03-12 Thread Unai Martinez-Corral
Allow to set 'path' or 'suffix' through environment variables, consistently with 'persistent' and 'credential'. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 9 - 1 file changed, 4 insertions(

[Qemu-devel] [PATCH v7 4/9] qemu-binfmt-conf.sh: use the same presentation format as for qemu-*

2019-03-12 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 63 +++-- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index ad9ae731a0..5ac1df680b 100755 --- a/scripts/qemu-binfmt

[Qemu-devel] [PATCH v7 1/9] qemu-binfmt-conf.sh: enforce safe style consistency

2019-03-12 Thread Unai Martinez-Corral
Spaces are added before '; then', for consistency. All the tests are prefixed with 'x', in order to avoid risky comparisons (i.e. a user deliberately trying to provoke a syntax error). Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu

[Qemu-devel] [PATCH v7 9/9] qemu-binfmt-conf.sh: add --test

2019-03-12 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 16c48e13a8..93fa8f30d3 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b

[Qemu-devel] [PATCH v7 7/9] qemu-binfmt-conf.sh: generalize to positional TARGETS

2019-03-12 Thread Unai Martinez-Corral
supported formats are the same as for positional arguments, which have priority. If both the variable and the list of positional arguments are empty, defaults to qemu_target_list. Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 80 + 1 f

[Qemu-devel] [PATCH v6 8/9] qemu-binfmt-conf.sh: add option --clear

2019-03-12 Thread Unai Martinez-Corral
stemd' configurations are not supported. The script will exit with error 'option clear not implemented for this mode yet'. Removal is done by printing '-1' as explained at: https://www.kernel.org/doc/Documentation/admin-guide/binfmt-misc.rst Signed-off-by: Unai Mart

[Qemu-devel] [PATCH v6 9/9] qemu-binfmt-conf.sh: add --test

2019-03-12 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index c672ec4886..7e7f6e31a6 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b

[Qemu-devel] [PATCH v6 7/9] qemu-binfmt-conf.sh: generalize to positional TARGETS

2019-03-12 Thread Unai Martinez-Corral
supported formats are the same as for positional arguments, which have priority. If both the variable and the list of positional arguments are empty, defaults to qemu_target_list. Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 80 + 1 f

[Qemu-devel] [PATCH v6 0/9] qemu-binfmt-conf.sh

2019-03-12 Thread Unai Martinez-Corral
0] qemu-binfmt-conf.sh * should have been [PATCH v5 0/9] qemu-binfmt-conf.sh * [PATCH v4 0/10] qemu-binfmt-conf.sh * [PATCH v3 0/10] qemu-binfmt-conf.sh * [PATCH v2] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg) * [PATCH] qemu-binfmt-conf.sh: add CPUS, add --reset

[Qemu-devel] [PATCH v6 2/9] qemu-binfmt-conf.sh: make opts -p and -c boolean

2019-03-12 Thread Unai Martinez-Corral
th options boolean in getopt, so if any of them is provided the corresponding variable is set to true. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts

[Qemu-devel] [PATCH v6 3/9] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT

2019-03-12 Thread Unai Martinez-Corral
Allow to set options '--persistent' and/or '--credential' through environment variables. If not defined, defaults are used ('no'). Anyway, command-line arguments have priority over environment variables. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vi

[Qemu-devel] [PATCH v6 4/9] qemu-binfmt-conf.sh: use the same presentation format as for qemu-*

2019-03-12 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 63 +++-- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index ad9ae731a0..5ac1df680b 100755 --- a/scripts/qemu-binfmt

[Qemu-devel] [PATCH v6 1/9] qemu-binfmt-conf.sh: enforce safe style consistency

2019-03-12 Thread Unai Martinez-Corral
Spaces are added before '; then', for consistency. All the tests are prefixed with 'x', in order to avoid risky comparisons (i.e. a user deliberately trying to provoke a syntax error). Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu

[Qemu-devel] [PATCH v6 5/9] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options

2019-03-12 Thread Unai Martinez-Corral
This breaks backward compatibility. Options 'qemu-path' and 'qemu-suffix' have the 'qemu-' prefix, which is not present in other option names ('debian', 'systemd', 'persistent', 'credential'...). In order to keep consistency,

[Qemu-devel] [PATCH v6 6/9] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX

2019-03-12 Thread Unai Martinez-Corral
Allow to set 'path' or 'suffix' through environment variables, consistently with 'persistent' and 'credential'. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 9 - 1 file changed, 4 insertions(

Re: [Qemu-devel] [PATCH v5 0/10] qemu-binfmt-conf.sh

2019-03-11 Thread Unai Martinez-Corral
Unfortunately the subject of the first message in the v5 of this series is wrong. I submitted '[PATCH v5 0/10] qemu-binfmt-conf.sh', but it should have been '[PATCH v5 0/9] qemu-binfmt-conf.sh'. All of the 9 patches have been properly submitted, but the patchset is not detected as complete. Do I

[Qemu-devel] [PATCH v5 9/9] qemu-binfmt-conf.sh: add --test

2019-03-11 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index 382bdaabfe..b750f60ef5 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b

[Qemu-devel] [PATCH v5 8/9] qemu-binfmt-conf.sh: add option --clear

2019-03-11 Thread Unai Martinez-Corral
stemd' configurations are not supported. The script will exit with error 'option clear not implemented for this mode yet'. Removal is done by printing '-1' as explained at: https://www.kernel.org/doc/Documentation/admin-guide/binfmt-misc.rst Signed-off-by: Unai Mart

[Qemu-devel] [PATCH v5 6/9] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX

2019-03-11 Thread Unai Martinez-Corral
Allow to set 'path' or 'suffix' through environment variables, consistently with 'persistent' and 'credential'. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 9 - 1 file changed, 4 insertions(

[Qemu-devel] [PATCH v5 7/9] qemu-binfmt-conf.sh: generalize to positional TARGETS

2019-03-11 Thread Unai Martinez-Corral
supported formats are the same as for positional arguments, which have priority. If both the variable and the list of positional arguments are empty, defaults to qemu_target_list. Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 80 + 1 f

[Qemu-devel] [PATCH v5 5/9] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options

2019-03-11 Thread Unai Martinez-Corral
This breaks backward compatibility. Options 'qemu-path' and 'qemu-suffix' have the 'qemu-' prefix, which is not present in other option names ('debian', 'systemd', 'persistent', 'credential'...). In order to keep consistency,

[Qemu-devel] [PATCH v5 0/10] qemu-binfmt-conf.sh

2019-03-11 Thread Unai Martinez-Corral
dd CPUS, add --reset, make -p and -c boolean (no arg) * [PATCH] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg) Regards Unai Martinez-Corral (9): qemu-binfmt-conf.sh: enforce safe style consistency qemu-binfmt-conf.sh: make opts -p and -c boolean qe

[Qemu-devel] [PATCH v5 2/9] qemu-binfmt-conf.sh: make opts -p and -c boolean

2019-03-11 Thread Unai Martinez-Corral
th options boolean in getopt, so if any of them is provided the corresponding variable is set to true. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts

[Qemu-devel] [PATCH v5 1/9] qemu-binfmt-conf.sh: enforce safe style consistency

2019-03-11 Thread Unai Martinez-Corral
Spaces are added before '; then', for consistency. All the tests are prefixed with 'x', in order to avoid risky comparisons (i.e. a user deliberately trying to provoke a syntax error). Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu

[Qemu-devel] [PATCH v5 3/9] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT

2019-03-11 Thread Unai Martinez-Corral
Allow to set options '--persistent' and/or '--credential' through environment variables. If not defined, defaults are used ('no'). Anyway, command-line arguments have priority over environment variables. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vi

[Qemu-devel] [PATCH v5 4/9] qemu-binfmt-conf.sh: use the same presentation format as for qemu-*

2019-03-11 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 63 +++-- 1 file changed, 32 insertions(+), 31 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index ad9ae731a0..35f61d9a6c 100755 --- a/scripts/qemu-binfmt

Re: [Qemu-devel] [PATCH v4 7/10] qemu-binfmt-conf.sh: generalize CPU to positional TARGETS

2019-03-11 Thread Unai Martinez Corral
2019/3/11 a las 14:36, Laurent Vivier: > On 11/03/2019 14:29, Unai Martinez Corral wrote: > > 2019/3/11 12:14, Laurent Vivier: > >> On 11/03/2019 11:30, Unai Martinez-Corral wrote: > > > >>> +-s|--systemd: don't writ

Re: [Qemu-devel] [PATCH v4 7/10] qemu-binfmt-conf.sh: generalize CPU to positional TARGETS

2019-03-11 Thread Unai Martinez Corral
2019/3/11 12:14, Laurent Vivier: > On 11/03/2019 11:30, Unai Martinez-Corral wrote: > > +if [ "$unknown_target" = "true" ] ; then > >if [ "x$cpu" != "x$target" ] ; then My bad. I fixed it before squashin

Re: [Qemu-devel] [PATCH v4 8/10] qemu-binfmt-conf.sh: add option --clear

2019-03-11 Thread Unai Martinez Corral
2019/3/11 12:04, Laurent Vivier: > > +find /proc/sys/fs/binfmt_misc/ -type f -name $names -exec sh -c > > 'printf %s -1 > {}' \; > > The qemu-* will be expanded here if you have a qemu-XXX in the current > directory. You must use "$names". You are correct. Indeed, I had not spotted it because

Re: [Qemu-devel] [PATCH v4 10/10] qemu-binfmt-conf.sh: add --test|--dry-run

2019-03-11 Thread Unai Martinez Corral
2019/3/11 11:45, Laurent Vivier: > > while true ; do > > case "$1" in > > +-t|--test|--dry-run) > > We don't need multiple parameter for the same effect. You must choose > between --test and --dry-run. Ok. I'll take 'test', because the short for '--dry-run' would be '-d' and it is alread

[Qemu-devel] [PATCH v4 9/10] qemu-binfmt-conf.sh: update usage()

2019-03-11 Thread Unai Martinez-Corral
Reorder how the options are presented to the user. Move 'systemd' and 'debian' to the end, so that the latter is close to the additional comments and example commands about it. Add list of default values for environment variables. Signed-off-by: Unai Martinez-Corral ---

[Qemu-devel] [PATCH v4 6/10] qemu-binfmt-conf.sh: honour QEMU_PATH and/or QEMU_SUFFIX

2019-03-11 Thread Unai Martinez-Corral
Allow to set 'path' or 'suffix' through environment variables, consistently with 'persistent' and 'credential'. Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PATCH v4 8/10] qemu-binfmt-conf.sh: add option --clear

2019-03-11 Thread Unai Martinez-Corral
stemd' configurations are not supported. The script will exit with error 'option clear not implemented for this mode yet'. Removal is done by printing '-1' as explained at: https://www.kernel.org/doc/Documentation/admin-guide/binfmt-misc.rst Signed-off-by: Unai Mart

[Qemu-devel] [PATCH v4 7/10] qemu-binfmt-conf.sh: generalize CPU to positional TARGETS

2019-03-11 Thread Unai Martinez-Corral
supported formats are the same as for positional arguments, which have priority. If both the variable and the list of positional arguments are empty, defaults to qemu_target_list. Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 80 + 1 f

[Qemu-devel] [PATCH v4 10/10] qemu-binfmt-conf.sh: add --test|--dry-run

2019-03-11 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index a516181a3a..db85798e76 100755 --- a/scripts/qemu-binfmt-conf.sh +++ b

[Qemu-devel] [PATCH v4 0/10] qemu-binfmt-conf.sh

2019-03-11 Thread Unai Martinez-Corral
US, add --reset, make -p and -c boolean (no arg) * [PATCH] qemu-binfmt-conf.sh: add CPUS, add --reset, make -p and -c boolean (no arg) Regards Unai Martinez-Corral (10): qemu-binfmt-conf.sh: enforce safe style consistency qemu-binfmt-conf.sh: make opts -p and -c boolean qemu-bi

[Qemu-devel] [PATCH v4 2/10] qemu-binfmt-conf.sh: make opts -p and -c boolean

2019-03-11 Thread Unai Martinez-Corral
th options boolean in getopt, so if any of them is provided the corresponding variable is set to true. Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu-binfmt-conf.sh | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/scripts

[Qemu-devel] [PATCH v4 5/10] qemu-binfmt-conf.sh: remove 'qemu' prefix from cli options

2019-03-11 Thread Unai Martinez-Corral
This breaks backward compatibility. Options 'qemu-path' and 'qemu-suffix' have the 'qemu-' prefix, which is not present in other option names ('debian', 'systemd', 'persistent', 'credential'...). In order to keep consistency,

[Qemu-devel] [PATCH v4 1/10] qemu-binfmt-conf.sh: enforce safe style consistency

2019-03-11 Thread Unai Martinez-Corral
Spaces are added before '; then', for consistency. All the tests are prefixed with 'x', in order to avoid risky comparisons (i.e. a user deliberately trying to provoke a syntax error). Signed-off-by: Unai Martinez-Corral Reviewed-by: Laurent Vivier --- scripts/qemu

[Qemu-devel] [PATCH v4 4/10] qemu-binfmt-conf.sh: use the same presentation format as for qemu-*

2019-03-11 Thread Unai Martinez-Corral
Signed-off-by: Unai Martinez-Corral --- scripts/qemu-binfmt-conf.sh | 58 + 1 file changed, 27 insertions(+), 31 deletions(-) diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh index e7a714e22c..489d7d2326 100755 --- a/scripts/qemu

[Qemu-devel] [PATCH v4 3/10] qemu-binfmt-conf.sh: add QEMU_CREDENTIAL and QEMU_PERSISTENT

2019-03-11 Thread Unai Martinez-Corral
Allow to set options '--persistent' and/or '--credential' through environment variables. If not defined, defaults are used ('no'). Anyway, command-line arguments have priority over environment variables. Signed-off-by: Unai Martinez-Corral --- sc

Re: [Qemu-devel] [PATCH v3 7/10] qemu-binfmt-conf.sh: add option --reset

2019-03-10 Thread Unai Martinez Corral
2019/3/10 18:15, Laurent Vivier: > On 06/03/2019 05:52, Unai Martinez-Corral wrote: > > Allows to remove a single or a list of already registered binfmt > > interpreters. If is a list, it must be comma-separated. > > I think ARCHS and CPUS are the same thing, so use the

Re: [Qemu-devel] [PATCH v3 6/10] qemu-binfmt-conf.sh: generalize to positional

2019-03-10 Thread Unai Martinez Corral
2019/3/10 18:02, Laurent Vivier: > On 06/03/2019 05:50, Unai Martinez-Corral wrote: > > The list can be separated by spaces, tabs, newlines or commas. If no > > I think it would be simpler to not manage commas, and to use the default > field separator. Commas were supporte

  1   2   >