On 07/26/18 at 07:35pm, Dave Young wrote:
On 07/26/18 at 07:08pm, Dave Young wrote:
> On 07/26/18 at 04:03pm, Bhupesh Sharma wrote:
> > Resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1441677
> > Testing: On x86_64 Fedora machine. After this patch kdump utility and related
> > man page cannot be found on this machine:
> >
> > [root@tyan-gt24-09 ~]# which kdump
> > /usr/bin/which: no kdump in
> >
(/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
> >
> > [root@tyan-gt24-09 ~]# man kdump
> > No manual entry for kdump
> >
> > Update the fedora 'kexec-tools.spec' to not install the obsolete
> > kdump tool.
> >
> > I have submitted an upstream patch to obsolete the kdump tool from
> > upstream kexec-tools (which has been accepted), but after an internal
> > discussion we decided not to backport the upstream 'kexec-tools' patch
> > (which does the same) for fedora, as we would prefer to manage the
> > changes directly in the .spec file itself.
> >
> > Signed-off-by: Bhupesh Sharma <bhsharma(a)redhat.com>
> > ---
> > kexec-tools.spec | 29 ++++++++++++++++++++++++++---
> > 1 file changed, 26 insertions(+), 3 deletions(-)
> >
> > diff --git a/kexec-tools.spec b/kexec-tools.spec
> > index fb09c9eeea37..7f144a63b098 100644
> > --- a/kexec-tools.spec
> > +++ b/kexec-tools.spec
> > @@ -137,6 +137,17 @@ cp %{SOURCE21} .
> > cp %{SOURCE27} .
> > cp %{SOURCE28} .
> >
> > +# remove kdump tool and man page (if it exists)
> > +if [ -f /sbin/kdump ]
> > +then
> > + rm -f /sbin/kdump
> > +fi
> > +
> > +if [ -f %{_mandir}/man8/kdump.8.gz ]
> > +then
> > + rm -f %{_mandir}/man8/kdump.8.gz
> > +fi
Hold on, local build failed with below:
+ cp /home/dyoung/fedpkg/kexec-tools/early-kdump-howto.txt .
+ '[' -f /sbin/kdump ']'
+ rm -f /sbin/kdump
rm: cannot remove '/sbin/kdump': Permission denied
error: Bad exit status from /var/tmp/rpm-tmp.ArdGua (%build)
Bad exit status from /var/tmp/rpm-tmp.ArdGua (%build)
So you might tested with root, for normal user it will not work.
Let me try to move it to other place like %post see if it works.
rpm -Uvh suceeded with this chunk in %post, but with below warnings:
warning: file /usr/share/man/man8/kdump.8.gz: remove failed: No such file or directory
warning: file /sbin/kdump: remove failed: No such file or directory
So as rpm -U will uninstall the installed files first, so they do not
exist any more. Thus I think this chunk can be safely deleted.
>
> > > +
> > > make
> > > %ifarch %{ix86} x86_64 ppc64 s390x ppc64le aarch64
> > > make -C eppic/libeppic
> > > @@ -146,7 +157,7 @@ make -C makedumpfile-1.6.4
LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic" epp
> > > make -C kdump-anaconda-addon/po
> > >
> > > %install
> > > -make install DESTDIR=$RPM_BUILD_ROOT
> > > +mkdir -p -m755 $RPM_BUILD_ROOT/sbin
> > > mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
> > > mkdir -p -m755 $RPM_BUILD_ROOT%{_localstatedir}/crash
> > > mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/man8/
> > > @@ -160,6 +171,11 @@ mkdir -p -m755 $RPM_BUILD_ROOT%{_libdir}
> > > mkdir -p -m755 $RPM_BUILD_ROOT%{_prefix}/lib/kdump
> > > install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_bindir}/kdumpctl
> > >
> > > +install -m 755 build/sbin/kexec $RPM_BUILD_ROOT/sbin/kexec
> > > +install -m 755 build/sbin/vmcore-dmesg $RPM_BUILD_ROOT/sbin/vmcore-dmesg
> > > +install -m 644 build/man/man8/kexec.8 $RPM_BUILD_ROOT%{_mandir}/man8/
> > > +install -m 644 build/man/man8/vmcore-dmesg.8
$RPM_BUILD_ROOT%{_mandir}/man8/
> > > +
> > > SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig.%{_target_cpu}
> > > [ -f $SYSCONFIG ] || SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig.%{_arch}
> > > [ -f $SYSCONFIG ] || SYSCONFIG=$RPM_SOURCE_DIR/kdump.sysconfig
> > > @@ -289,7 +305,10 @@ do
> > > done
> > >
> > > %files
> > > -/sbin/*
> > > +/sbin/kexec
> > > +/sbin/makedumpfile
> > > +/sbin/mkdumprd
> > > +/sbin/vmcore-dmesg
> > > %{_bindir}/*
> > > %{_datadir}/kdump
> > > %{_prefix}/lib/kdump
> > > @@ -303,7 +322,11 @@ done
> > > %endif
> > > %{dracutlibdir}/modules.d/*
> > > %dir %{_localstatedir}/crash
> > > -%{_mandir}/man8/*
> > > +%{_mandir}/man8/kdumpctl.8.gz
> > > +%{_mandir}/man8/kexec.8.gz
> > > +%{_mandir}/man8/makedumpfile.8.gz
> > > +%{_mandir}/man8/mkdumprd.8.gz
> > > +%{_mandir}/man8/vmcore-dmesg.8.gz
> > > %{_mandir}/man5/*
> > > %{_unitdir}/kdump.service
> > > %{_prefix}/lib/systemd/system-generators/kdump-dep-generator.sh
> > > --
> > > 2.7.4
> > >
> >
> > Hi Bhupesh,
> >
> > The patches looks good to me, thanks!
> >
> > Acked-by: Dave Young <dyoung(a)redhat.com>
> > _______________________________________________
> > kexec mailing list -- kexec(a)lists.fedoraproject.org
> > To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
> > Fedora Code of Conduct:
https://getfedora.org/code-of-conduct.html
> > List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
> > List Archives:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.o...
> _______________________________________________
> kexec mailing list -- kexec(a)lists.fedoraproject.org
> To unsubscribe send an email to kexec-leave(a)lists.fedoraproject.org
> Fedora Code of Conduct:
https://getfedora.org/code-of-conduct.html
> List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives:
https://lists.fedoraproject.org/archives/list/kexec@lists.fedoraproject.o...