Hello,
On Mon, Jan 9, 2017 at 1:40 PM, Dave Young <dyoung(a)redhat.com> wrote:
Hi, Tong
On 01/04/17 at 03:20pm, Tong Li wrote:
> Resolves: bz1399436
>
> Since currently crashkernel= will be handled in kdump anaconda addon
> we can safely remove rhcrashkernel-param callback.
>
> Signed-off-by: Tong Li <tonli(a)redhat.com>
> ---
> v1 -> v2: delete rhcrashkernel-param file as well
> v2 -> v3: remove the mention of justification from commit log
> V3 -> v4: also drop /usr/sbin/ since no other files use it
> Since only rhcrashkernel-param was installed to /usr/sbin/, droping this
> directory as well to make rpm build correctly.
Why it fails if there's nothing in /usr/sbin/ installed? Is there some
documentation or code explanation about this?
I found a manual from
rpm.org which described a similar situation.
(
http://rpm.org/max-rpm-snapshot/ch-rpm-b-command.html)
From this example, it seems that listing non-exist file in %file will
cause the build error. After removing rhcrashkernel-param from the
repo, /usr/sbin/* can't match any file, which causes the build error
in last patch.
Here's the example from that manual:
So far, we've only seen what happens when the %files list is correct.
Let's see what happens where the list has problems. In this example,
we've added a bogus file to the package's %files list
# rpmbuild -bl cdplayer-1.0.spec
* Package: cdplayer
File List Check: cdplayer-1.0-1
File not found: /usr/local/bin/bogus
Build failed.
#
>
> kexec-tools.spec | 4 ----
> rhcrashkernel-param | 6 ------
> 2 files changed, 10 deletions(-)
> delete mode 100644 rhcrashkernel-param
>
> diff --git a/kexec-tools.spec b/kexec-tools.spec
> index d73b398..b6d2552 100644
> --- a/kexec-tools.spec
> +++ b/kexec-tools.spec
> @@ -19,7 +19,6 @@ Source12: mkdumprd.8
> Source14: 98-kexec.rules
> Source15: kdump.conf.5
> Source16: kdump.service
> -Source17: rhcrashkernel-param
> Source18: kdump.sysconfig.s390x
> Source19: eppic_050615.tar.gz
> Source20: kdump-lib.sh
> @@ -187,8 +186,6 @@ install -m 644 %{SOURCE14}
$RPM_BUILD_ROOT%{_udevrulesdir}/98-kexec.rules
> install -m 644 %{SOURCE15} $RPM_BUILD_ROOT%{_mandir}/man5/kdump.conf.5
> install -m 644 %{SOURCE16} $RPM_BUILD_ROOT%{_unitdir}/kdump.service
> install -m 755 -D %{SOURCE22}
$RPM_BUILD_ROOT%{_prefix}/lib/systemd/system-generators/kdump-dep-generator.sh
> -mkdir -p $RPM_BUILD_ROOT/usr/sbin
> -install -m 755 %{SOURCE17} $RPM_BUILD_ROOT/usr/sbin/rhcrashkernel-param
>
> %ifarch %{ix86} x86_64 ppc64 s390x ppc64le
> install -m 755 makedumpfile-1.6.0/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile
> @@ -292,7 +289,6 @@ done
>
> %files
> /sbin/*
> -/usr/sbin/*
> %{_bindir}/*
> %{_datadir}/kdump
> %{_prefix}/lib/kdump
> diff --git a/rhcrashkernel-param b/rhcrashkernel-param
> deleted file mode 100644
> index a823e4b..0000000
> --- a/rhcrashkernel-param
> +++ /dev/null
> @@ -1,6 +0,0 @@
> -#!/bin/sh
> -if grep -q Fedora /etc/redhat-release; then
> - echo -n
> -else
> - echo crashkernel=auto
> -fi
Thanks
Dave
Regards,
--
Tong