Hi Pingfan,
On Thu, 5 May 2022 14:37:19 +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>
---
v1 -> v2:
move 'sed' from %post to %build section
kexec-tools.spec | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kexec-tools.spec b/kexec-tools.spec
index 6673000..1c4c0cf 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -144,6 +144,12 @@ autoreconf
%endif
--sbindir=/usr/sbin
rm -f kexec-tools.spec.in
+
+# s390 uses zlib/dfltcc as default to improve compression speed and ratio
+%ifarch s390x
+sed -i 's/makedumpfile -l/makedumpfile -c/' %{SOURCE8}
+%endif
+
# setup the docs
cp %{SOURCE10} .
cp %{SOURCE11} .
v2 looks better and should work. But I'm wondering if it wouldn't be
better to use a script that generates the config similar to what Kairui
suggests for the sysconfig. My concern is that there are now two places
where kdump.conf is defined. So we always keep in mind to also check
the spec file when we update kdump.conf. Otherwise we might introduce a
bug that could easily be prevented if there is only one place to check.
Thanks
Philipp