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@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 + 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
kexec_test seems to be no longer used upstream, so we had introduced the 'kexec-tools-2.0.3-disable-kexec-test.patch' earlier to disable the same from fedora kexec-tools as well.
However an earlier patch "Remove obsolete kdump tool" now explicitly installs needed files via appropriate logic in .spec file, so we can drop this patch now to reduce the maintenance burden.
Signed-off-by: Bhupesh Sharma bhsharma@redhat.com --- kexec-tools-2.0.3-disable-kexec-test.patch | 17 ----------------- kexec-tools.spec | 2 -- 2 files changed, 19 deletions(-) delete mode 100644 kexec-tools-2.0.3-disable-kexec-test.patch
diff --git a/kexec-tools-2.0.3-disable-kexec-test.patch b/kexec-tools-2.0.3-disable-kexec-test.patch deleted file mode 100644 index 6fc73f2db181..000000000000 --- a/kexec-tools-2.0.3-disable-kexec-test.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git kexec-tools-2.0.3/kexec_test/Makefile kexec-tools-2.0.3/kexec_test/Makefile -index fec6210..2ed4d51 100644 ---- kexec-tools-2.0.3/kexec_test/Makefile -+++ kexec-tools-2.0.3/kexec_test/Makefile -@@ -8,12 +8,6 @@ dist += kexec_test/Makefile $(KEXEC_TEST_SRCS) \ - kexec_test/x86-setup-legacy-pic.S - - BUILD_KEXEC_TEST = no --ifeq ($(ARCH),i386) --BUILD_KEXEC_TEST = yes --endif --ifeq ($(ARCH),x86_64) --BUILD_KEXEC_TEST = yes --endif - - ifeq ($(BUILD_KEXEC_TEST),yes) - diff --git a/kexec-tools.spec b/kexec-tools.spec index 7f144a63b098..b5471c429bc6 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -87,7 +87,6 @@ Obsoletes: diskdumputils netdump kexec-tools-eppic # # Patches 601 onward are generic patches # -Patch601: kexec-tools-2.0.3-disable-kexec-test.patch Patch604: kexec-tools-2.0.16-koji-build-fail-workaround.patch
%description @@ -111,7 +110,6 @@ tar -z -x -v -f %{SOURCE9} tar -z -x -v -f %{SOURCE19} tar -z -x -v -f %{SOURCE23}
-%patch601 -p1 %patch604 -p1
%ifarch ppc
On 07/26/18 at 04:03pm, Bhupesh Sharma wrote:
kexec_test seems to be no longer used upstream, so we had introduced the 'kexec-tools-2.0.3-disable-kexec-test.patch' earlier to disable the same from fedora kexec-tools as well.
However an earlier patch "Remove obsolete kdump tool" now explicitly installs needed files via appropriate logic in .spec file, so we can drop this patch now to reduce the maintenance burden.
Signed-off-by: Bhupesh Sharma bhsharma@redhat.com
kexec-tools-2.0.3-disable-kexec-test.patch | 17 ----------------- kexec-tools.spec | 2 -- 2 files changed, 19 deletions(-) delete mode 100644 kexec-tools-2.0.3-disable-kexec-test.patch
diff --git a/kexec-tools-2.0.3-disable-kexec-test.patch b/kexec-tools-2.0.3-disable-kexec-test.patch deleted file mode 100644 index 6fc73f2db181..000000000000 --- a/kexec-tools-2.0.3-disable-kexec-test.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git kexec-tools-2.0.3/kexec_test/Makefile kexec-tools-2.0.3/kexec_test/Makefile -index fec6210..2ed4d51 100644 ---- kexec-tools-2.0.3/kexec_test/Makefile -+++ kexec-tools-2.0.3/kexec_test/Makefile -@@ -8,12 +8,6 @@ dist += kexec_test/Makefile $(KEXEC_TEST_SRCS) \
- kexec_test/x86-setup-legacy-pic.S
- BUILD_KEXEC_TEST = no
--ifeq ($(ARCH),i386) --BUILD_KEXEC_TEST = yes --endif --ifeq ($(ARCH),x86_64) --BUILD_KEXEC_TEST = yes --endif
- ifeq ($(BUILD_KEXEC_TEST),yes)
diff --git a/kexec-tools.spec b/kexec-tools.spec index 7f144a63b098..b5471c429bc6 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -87,7 +87,6 @@ Obsoletes: diskdumputils netdump kexec-tools-eppic # # Patches 601 onward are generic patches # -Patch601: kexec-tools-2.0.3-disable-kexec-test.patch Patch604: kexec-tools-2.0.16-koji-build-fail-workaround.patch
The binutils should have fixed the build issue, I will verify, if it works I will remove Patch604 as well.
%description @@ -111,7 +110,6 @@ tar -z -x -v -f %{SOURCE9} tar -z -x -v -f %{SOURCE19} tar -z -x -v -f %{SOURCE23}
-%patch601 -p1 %patch604 -p1
%ifarch ppc
2.7.4
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@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
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@redhat.com
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@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.
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@redhat.com _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@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.org/...
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@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@redhat.com _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@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.org/...
kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@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.org/...
On 07/26/18 at 07:47pm, Dave Young wrote:
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@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.
Bhupesh, I have manually changed the commit and pushed. No need resend
Thanks dave
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@redhat.com _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@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.org/...
kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@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.org/...