For earlykdump, kdump-lib-initramfs.sh is sourced by kdump-lib.sh, however it is not installed in dracut-early-kdump-module-setup.sh. Same as xargs, which is used by kdump-lib.sh. Otherwise earlykdump will report file not found errors.
Fixes ("a5faa052d4969cb66719d0b795d746449d3c71b7") for kdump-lib-initramfs.sh kdump-lib-initramfs.sh: prepare to be a POSIX compatible lib And ("4f01cb1b0a4e1ea9467e9ace34d14dcb2fbe135a") for xargs kdump-lib.sh: fix variable quoting issue
Signed-off-by: Tao Liu ltao@redhat.com --- dracut-early-kdump-module-setup.sh | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dracut-early-kdump-module-setup.sh b/dracut-early-kdump-module-setup.sh index 0e46823..0451118 100755 --- a/dracut-early-kdump-module-setup.sh +++ b/dracut-early-kdump-module-setup.sh @@ -50,7 +50,9 @@ install() { inst_binary "/usr/bin/gawk" "/usr/bin/awk" inst_binary "/usr/bin/logger" "/usr/bin/logger" inst_binary "/usr/bin/printf" "/usr/bin/printf" + inst_binary "/usr/bin/xargs" "/usr/bin/xargs" inst_script "/lib/kdump/kdump-lib.sh" "/lib/kdump-lib.sh" + inst_script "/lib/kdump/kdump-lib-initramfs.sh" "/lib/kdump/kdump-lib-initramfs.sh" inst_script "/lib/kdump/kdump-logger.sh" "/lib/kdump-logger.sh" inst_hook cmdline 00 "$moddir/early-kdump.sh" inst_binary "$KDUMP_KERNEL"
Hi Tao,
Thanks for the patch!
On Sat, Dec 18, 2021 at 04:14:44PM +0800, Tao Liu wrote:
For earlykdump, kdump-lib-initramfs.sh is sourced by kdump-lib.sh, however it is not installed in dracut-early-kdump-module-setup.sh. Same as xargs, which is used by kdump-lib.sh. Otherwise earlykdump will report file not found errors.
Should we install /usr/bin/xargs in dracut-module-setup.sh as well since it also sources kdump-lib.sh
Fixes ("a5faa052d4969cb66719d0b795d746449d3c71b7") for kdump-lib-initramfs.sh kdump-lib-initramfs.sh: prepare to be a POSIX compatible lib And ("4f01cb1b0a4e1ea9467e9ace34d14dcb2fbe135a") for xargs kdump-lib.sh: fix variable quoting issue
Signed-off-by: Tao Liu ltao@redhat.com
dracut-early-kdump-module-setup.sh | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dracut-early-kdump-module-setup.sh b/dracut-early-kdump-module-setup.sh index 0e46823..0451118 100755 --- a/dracut-early-kdump-module-setup.sh +++ b/dracut-early-kdump-module-setup.sh @@ -50,7 +50,9 @@ install() { inst_binary "/usr/bin/gawk" "/usr/bin/awk" inst_binary "/usr/bin/logger" "/usr/bin/logger" inst_binary "/usr/bin/printf" "/usr/bin/printf"
- inst_binary "/usr/bin/xargs" "/usr/bin/xargs" inst_script "/lib/kdump/kdump-lib.sh" "/lib/kdump-lib.sh"
- inst_script "/lib/kdump/kdump-lib-initramfs.sh" "/lib/kdump/kdump-lib-initramfs.sh" inst_script "/lib/kdump/kdump-logger.sh" "/lib/kdump-logger.sh" inst_hook cmdline 00 "$moddir/early-kdump.sh" inst_binary "$KDUMP_KERNEL"
-- 2.33.1
Hi Coiby,
On Thu, Dec 23, 2021 at 3:50 PM Coiby Xu coxu@redhat.com wrote:
Hi Tao,
Thanks for the patch!
On Sat, Dec 18, 2021 at 04:14:44PM +0800, Tao Liu wrote:
For earlykdump, kdump-lib-initramfs.sh is sourced by kdump-lib.sh, however it is not installed in dracut-early-kdump-module-setup.sh. Same as xargs, which is used by kdump-lib.sh. Otherwise earlykdump will report file not found errors.
Should we install /usr/bin/xargs in dracut-module-setup.sh as well since it also sources kdump-lib.sh
I think it is not needed.
As for earlykdump, kdump-lib.sh/xargs are used both for making initramfs-kdump.img in 1st kernel, and the runtime in 2nd kernel, so xargs/kdump-lib.sh must be installed in initramfs-kdump.img. However, as for non-earlykdump, kdump-lib.sh/xargs are used only for making initramfs-kdump.img in the 1st kernel, and can both be accessed locally, needn't to be installed in initramfs-kdump.img for 2nd kernel runtime use.
Thanks, Tao Liu
Fixes ("a5faa052d4969cb66719d0b795d746449d3c71b7") for kdump-lib-initramfs.sh kdump-lib-initramfs.sh: prepare to be a POSIX compatible lib And ("4f01cb1b0a4e1ea9467e9ace34d14dcb2fbe135a") for xargs kdump-lib.sh: fix variable quoting issue
Signed-off-by: Tao Liu ltao@redhat.com
dracut-early-kdump-module-setup.sh | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dracut-early-kdump-module-setup.sh b/dracut-early-kdump-module-setup.sh index 0e46823..0451118 100755 --- a/dracut-early-kdump-module-setup.sh +++ b/dracut-early-kdump-module-setup.sh @@ -50,7 +50,9 @@ install() { inst_binary "/usr/bin/gawk" "/usr/bin/awk" inst_binary "/usr/bin/logger" "/usr/bin/logger" inst_binary "/usr/bin/printf" "/usr/bin/printf"
- inst_binary "/usr/bin/xargs" "/usr/bin/xargs" inst_script "/lib/kdump/kdump-lib.sh" "/lib/kdump-lib.sh"
- inst_script "/lib/kdump/kdump-lib-initramfs.sh" "/lib/kdump/kdump-lib-initramfs.sh" inst_script "/lib/kdump/kdump-logger.sh" "/lib/kdump-logger.sh" inst_hook cmdline 00 "$moddir/early-kdump.sh" inst_binary "$KDUMP_KERNEL"
-- 2.33.1
-- Best regards, Coiby
On Fri, Dec 24, 2021 at 05:32:35PM +0800, Tao Liu wrote:
Hi Coiby,
On Thu, Dec 23, 2021 at 3:50 PM Coiby Xu coxu@redhat.com wrote:
Hi Tao,
Thanks for the patch!
On Sat, Dec 18, 2021 at 04:14:44PM +0800, Tao Liu wrote:
For earlykdump, kdump-lib-initramfs.sh is sourced by kdump-lib.sh, however it is not installed in dracut-early-kdump-module-setup.sh. Same as xargs, which is used by kdump-lib.sh. Otherwise earlykdump will report file not found errors.
Should we install /usr/bin/xargs in dracut-module-setup.sh as well since it also sources kdump-lib.sh
I think it is not needed.
As for earlykdump, kdump-lib.sh/xargs are used both for making initramfs-kdump.img in 1st kernel, and the runtime in 2nd kernel, so xargs/kdump-lib.sh must be installed in initramfs-kdump.img. However, as for non-earlykdump, kdump-lib.sh/xargs are used only for making initramfs-kdump.img in the 1st kernel, and can both be accessed locally, needn't to be installed in initramfs-kdump.img for 2nd kernel runtime use.
Thanks for the explanation! Patch has been merged with a small change about the format of "Fixes:" tag,
Fixes: a5faa052d4969cb66719d0b795d746449d3c71b7 ("kdump-lib-initramfs.sh: prepare to be a POSIX compatible lib") Fixes: 4f01cb1b0a4e1ea9467e9ace34d14dcb2fbe135a ("kdump-lib.sh: fix variable quoting issue")
Acked-by: Coiby Xu coxu@redhat.com
Thanks, Tao Liu
Fixes ("a5faa052d4969cb66719d0b795d746449d3c71b7") for kdump-lib-initramfs.sh kdump-lib-initramfs.sh: prepare to be a POSIX compatible lib And ("4f01cb1b0a4e1ea9467e9ace34d14dcb2fbe135a") for xargs kdump-lib.sh: fix variable quoting issue
Signed-off-by: Tao Liu ltao@redhat.com
dracut-early-kdump-module-setup.sh | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dracut-early-kdump-module-setup.sh b/dracut-early-kdump-module-setup.sh index 0e46823..0451118 100755 --- a/dracut-early-kdump-module-setup.sh +++ b/dracut-early-kdump-module-setup.sh @@ -50,7 +50,9 @@ install() { inst_binary "/usr/bin/gawk" "/usr/bin/awk" inst_binary "/usr/bin/logger" "/usr/bin/logger" inst_binary "/usr/bin/printf" "/usr/bin/printf"
- inst_binary "/usr/bin/xargs" "/usr/bin/xargs" inst_script "/lib/kdump/kdump-lib.sh" "/lib/kdump-lib.sh"
- inst_script "/lib/kdump/kdump-lib-initramfs.sh" "/lib/kdump/kdump-lib-initramfs.sh" inst_script "/lib/kdump/kdump-logger.sh" "/lib/kdump-logger.sh" inst_hook cmdline 00 "$moddir/early-kdump.sh" inst_binary "$KDUMP_KERNEL"
-- 2.33.1
-- Best regards, Coiby
Hi Coiby,
On Mon, Dec 27, 2021 at 9:35 AM Coiby Xu coxu@redhat.com wrote:
On Fri, Dec 24, 2021 at 05:32:35PM +0800, Tao Liu wrote:
Hi Coiby,
On Thu, Dec 23, 2021 at 3:50 PM Coiby Xu coxu@redhat.com wrote:
Hi Tao,
Thanks for the patch!
On Sat, Dec 18, 2021 at 04:14:44PM +0800, Tao Liu wrote:
For earlykdump, kdump-lib-initramfs.sh is sourced by kdump-lib.sh, however it is not installed in dracut-early-kdump-module-setup.sh. Same as xargs, which is used by kdump-lib.sh. Otherwise earlykdump will report file not found errors.
Should we install /usr/bin/xargs in dracut-module-setup.sh as well since it also sources kdump-lib.sh
I think it is not needed.
As for earlykdump, kdump-lib.sh/xargs are used both for making initramfs-kdump.img in 1st kernel, and the runtime in 2nd kernel, so xargs/kdump-lib.sh must be installed in initramfs-kdump.img. However, as for non-earlykdump, kdump-lib.sh/xargs are used only for making initramfs-kdump.img in the 1st kernel, and can both be accessed locally, needn't to be installed in initramfs-kdump.img for 2nd kernel runtime use.
Thanks for the explanation! Patch has been merged with a small change about the format of "Fixes:" tag,
Fixes: a5faa052d4969cb66719d0b795d746449d3c71b7 ("kdump-lib-initramfs.sh: prepare to be a POSIX compatible lib") Fixes: 4f01cb1b0a4e1ea9467e9ace34d14dcb2fbe135a ("kdump-lib.sh: fix variable quoting issue")
Acked-by: Coiby Xu coxu@redhat.com
OK, thanks for the info.
Thanks, Tao Liu
Thanks, Tao Liu
Fixes ("a5faa052d4969cb66719d0b795d746449d3c71b7") for kdump-lib-initramfs.sh kdump-lib-initramfs.sh: prepare to be a POSIX compatible lib And ("4f01cb1b0a4e1ea9467e9ace34d14dcb2fbe135a") for xargs kdump-lib.sh: fix variable quoting issue
Signed-off-by: Tao Liu ltao@redhat.com
dracut-early-kdump-module-setup.sh | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/dracut-early-kdump-module-setup.sh b/dracut-early-kdump-module-setup.sh index 0e46823..0451118 100755 --- a/dracut-early-kdump-module-setup.sh +++ b/dracut-early-kdump-module-setup.sh @@ -50,7 +50,9 @@ install() { inst_binary "/usr/bin/gawk" "/usr/bin/awk" inst_binary "/usr/bin/logger" "/usr/bin/logger" inst_binary "/usr/bin/printf" "/usr/bin/printf"
- inst_binary "/usr/bin/xargs" "/usr/bin/xargs" inst_script "/lib/kdump/kdump-lib.sh" "/lib/kdump-lib.sh"
- inst_script "/lib/kdump/kdump-lib-initramfs.sh" "/lib/kdump/kdump-lib-initramfs.sh" inst_script "/lib/kdump/kdump-logger.sh" "/lib/kdump-logger.sh" inst_hook cmdline 00 "$moddir/early-kdump.sh" inst_binary "$KDUMP_KERNEL"
-- 2.33.1
-- Best regards, Coiby
-- Best regards, Coiby
Hi Coiby and Tao
Coiby Xu coxu@redhat.com 于2021年12月27日周一 09:35写道:
On Fri, Dec 24, 2021 at 05:32:35PM +0800, Tao Liu wrote:
Hi Coiby,
On Thu, Dec 23, 2021 at 3:50 PM Coiby Xu coxu@redhat.com wrote:
Hi Tao,
Thanks for the patch!
On Sat, Dec 18, 2021 at 04:14:44PM +0800, Tao Liu wrote:
For earlykdump, kdump-lib-initramfs.sh is sourced by kdump-lib.sh, however it is not installed in dracut-early-kdump-module-setup.sh. Same as xargs, which is used by kdump-lib.sh. Otherwise earlykdump will report file not found errors.
Should we install /usr/bin/xargs in dracut-module-setup.sh as well since it also sources kdump-lib.sh
I think it is not needed.
As for earlykdump, kdump-lib.sh/xargs are used both for making initramfs-kdump.img in 1st kernel, and the runtime in 2nd kernel, so xargs/kdump-lib.sh must be installed in initramfs-kdump.img. However, as for non-earlykdump, kdump-lib.sh/xargs are used only for making initramfs-kdump.img in the 1st kernel, and can both be accessed locally, needn't to be installed in initramfs-kdump.img for 2nd kernel runtime use.
Thanks for the explanation! Patch has been merged with a small change about the format of "Fixes:" tag,
Fixes: a5faa052d4969cb66719d0b795d746449d3c71b7 ("kdump-lib-initramfs.sh: prepare to be a POSIX compatible lib") Fixes: 4f01cb1b0a4e1ea9467e9ace34d14dcb2fbe135a ("kdump-lib.sh: fix variable quoting issue")
A little suggestion, maybe just follow the Linux kernel commit format will be a better idea, a full sha1 id is a bit too long. Quote from linux kernel document:
""" If your patch fixes a bug in a specific commit, e.g. you found an issue using git bisect, please use the ‘Fixes:’ tag with the first 12 characters of the SHA-1 ID, and the one line summary. For example:
Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()")
The following git config settings can be used to add a pretty format for outputting the above style in the git log or git show commands:
[core] abbrev = 12 [pretty] fixes = Fixes: %h ("%s") """
Kairui Song ryncsn@gmail.com 于2021年12月27日周一 13:06写道:
Hi Coiby and Tao
Coiby Xu coxu@redhat.com 于2021年12月27日周一 09:35写道:
On Fri, Dec 24, 2021 at 05:32:35PM +0800, Tao Liu wrote:
Hi Coiby,
On Thu, Dec 23, 2021 at 3:50 PM Coiby Xu coxu@redhat.com wrote:
Hi Tao,
Thanks for the patch!
On Sat, Dec 18, 2021 at 04:14:44PM +0800, Tao Liu wrote:
For earlykdump, kdump-lib-initramfs.sh is sourced by kdump-lib.sh, however it is not installed in dracut-early-kdump-module-setup.sh. Same as xargs, which is used by kdump-lib.sh. Otherwise earlykdump will report file not found errors.
Should we install /usr/bin/xargs in dracut-module-setup.sh as well since it also sources kdump-lib.sh
I think it is not needed.
As for earlykdump, kdump-lib.sh/xargs are used both for making initramfs-kdump.img in 1st kernel, and the runtime in 2nd kernel, so xargs/kdump-lib.sh must be installed in initramfs-kdump.img. However, as for non-earlykdump, kdump-lib.sh/xargs are used only for making initramfs-kdump.img in the 1st kernel, and can both be accessed locally, needn't to be installed in initramfs-kdump.img for 2nd kernel runtime use.
Thanks for the explanation! Patch has been merged with a small change about the format of "Fixes:" tag,
Fixes: a5faa052d4969cb66719d0b795d746449d3c71b7 ("kdump-lib-initramfs.sh: prepare to be a POSIX compatible lib") Fixes: 4f01cb1b0a4e1ea9467e9ace34d14dcb2fbe135a ("kdump-lib.sh: fix variable quoting issue")
A little suggestion, maybe just follow the Linux kernel commit format will be a better idea, a full sha1 id is a bit too long. Quote from linux kernel document:
""" If your patch fixes a bug in a specific commit, e.g. you found an issue using git bisect, please use the ‘Fixes:’ tag with the first 12 characters of the SHA-1 ID, and the one line summary. For example:
Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()")
The following git config settings can be used to add a pretty format for outputting the above style in the git log or git show commands:
[core] abbrev = 12 [pretty] fixes = Fixes: %h ("%s") """
Hmm, after a quick git log check, seems we have been using full sha1 id format in the past for quite several times, you can ignore my reply then.
Hi Kairui,
On Mon, Dec 27, 2021 at 01:12:08PM +0800, Kairui Song wrote:
Kairui Song ryncsn@gmail.com 于2021年12月27日周一 13:06写道:
Hi Coiby and Tao
[...]
A little suggestion, maybe just follow the Linux kernel commit format will be a better idea, a full sha1 id is a bit too long. Quote from linux kernel document:
""" If your patch fixes a bug in a specific commit, e.g. you found an issue using git bisect, please use the ‘Fixes:’ tag with the first 12 characters of the SHA-1 ID, and the one line summary. For example:
Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()")
The following git config settings can be used to add a pretty format for outputting the above style in the git log or git show commands:
[core] abbrev = 12 [pretty] fixes = Fixes: %h ("%s") """
Hmm, after a quick git log check, seems we have been using full sha1 id format in the past for quite several times, you can ignore my reply then.
Thanks for the suggestion! After I did my homework about abbrev length, we should use the default 7 for kexec-tools.
According to the git commit dce9648 ("Make the default abbrev length configurable") [1] by Linus,
"The default of 7 comes from fairly early in git development, when seven hex digits was a lot (it covers about 250+ million hash values). Back then I thought that 65k revisions was a lot (it was what we were about to hit in BK), and each revision tends to be about 5-10 new objects or so, so a million objects was a big number."
Currently, the kexec-tools repo has only 1452 commits,
$ git rev-list --count rawhide 1452
and the first commit 0d17a66 ("Setup of module kexec-tools") was done on Aug 29 2005 and the shortest and yet unique SHA1 has only 4 hex digits,
$ git rev-parse --short=3 0d17a66 0d17
So the default 7 is good enough.
Btw, besides the mistake of using the full SHA1, I also put "commit" inside the Fixes tag i.e. I used "Fixes: commit xxx". Maybe I'll add a style code for kexec-tools and add one rule for Fixes tag in the future.
[1] https://github.com/git/git/commit/dce96489162b05ae3463741f7f0365ff56f0de36