On Wed, May 4, 2022 at 8:41 PM Philipp Rudo <prudo(a)redhat.com> wrote:
Hi Pingfan,
On Fri, 29 Apr 2022 15:37:40 +0800
Pingfan Liu <piliu(a)redhat.com> wrote:
> s390x implements zlib/dfltcc dedicated instruction to improve
> compression speed and ratio. Switching from 'makedumpfile -l' to
> 'makedumpfile -c' to benifit from this feature.
>
> Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
> ---
> kexec-tools.spec | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kexec-tools.spec b/kexec-tools.spec
> index 6673000..9f1ba34 100644
> --- a/kexec-tools.spec
> +++ b/kexec-tools.spec
> @@ -275,6 +275,10 @@ fi
> %systemd_post kdump.service
>
> touch /etc/kdump.conf
> +# s390 uses zlib/dfltcc as default to improve compression speed and ratio
> +%ifarch s390x
> +sed -i 's/makedumpfile -l/makedumpfile -c/' /etc/kdump.conf
> +%endif
>
> %ifarch ppc64 ppc64le
> servicelog_notify --remove --command=/usr/lib/kdump/kdump-migrate-action.sh
2>/dev/null
I don't think this approach will work as expected. My biggest concern
is that the sed call is executed even when no kdump.conf is installed.
So if a user changed the option back to -l the change will be reverted
when updating kexec-tools.
A persuading example.
Personally I think we should follow what Kairui suggested for the
sysconfig. I.e. update the config during %build and package the already
correct kdump.conf.
Yes, it is a better choice. I will go that way.
Thanks,
Pingfan