Remove obsolete kdump tool and add missing uninstall rule
Subsystems (3)
cover Remove obsolete kdump tool and add missing uninstall rule
This patchset contains two patches:
[1/2] - Adds a missing uninstall rule to 'Makefile.in' to allow easier
uninstallation of executables and man pages installed via 'make install'
[2/2] - Removes obsolete kdump tool as per the discussion on kexec
mailing list (see [1] for details), where a conclusion was reached that with the availability of tools like crash/gdb the analysis of the crashdump core has become rather easy, and it makes the kdump tool obsolete.
Also the same naming convention (man page) causes confusion when compared to similarly named distribution specific kdump service/utilities, so its better to remove the same from kexec-tools.
I tested the patchset on my apm mustang and qualcomm arm64 boards and the changes seem to work fine.
[1] http://lists.infradead.org/pipermail/kexec/2018-April/020483.html
Bhupesh Sharma (2):
Makefile.in: Add uninstall rule
Remove obsolete kdump tool
Makefile.in | 92 +++++++++++++-- kdump/Makefile | 30 ----- kdump/kdump.8 | 39 ------- kdump/kdump.c | 327 ---------------------------------------------------- kexec-tools.spec.in | 2 - 5 files changed, 83 insertions(+), 407 deletions(-) delete mode 100644 kdump/Makefile delete mode 100644 kdump/kdump.8 delete mode 100644 kdump/kdump.c
Signature · 7 lines
2.7.4 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 1/2 Makefile.in: Add uninstall rule
Presently the Makedumpfile.in doesn't include a uninstall rule, which is useful in case we want to preform a reverse of the install process done by Makefile.in
This patch adds this rule, thus making it easier to remove installed executables and man pages in case one needs to uninstall the same.
--- Makefile.in | 83 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 81 insertions(+), 2 deletions(-)
Makefile.in +81 -2
@@ -182,10 +182,21 @@ BINARIES_i386:=$(KEXEC_TEST) BINARIES_x86_64:=$(KEXEC_TEST) BINARIES:=$(KEXEC) $(KDUMP) $(VMCORE_DMESG) $(BINARIES_$(ARCH)) -TARGETS:=$(BINARIES) $(MAN_PAGES) +UNINSTALL_KDUMP = $(sbindir)/kdump +UNINSTALL_KDUMP_MANPAGE = $(mandir)/man8/kdump.8 +UNINSTALL_KEXEC = $(sbindir)/kexec +UNINSTALL_KEXEC_MANPAGE = $(mandir)/man8/kexec.8 +UNINSTALL_VMCORE_DMESG = $(sbindir)/vmcore-dmesg +UNINSTALL_VMCORE_DMESG_MANPAGE = $(mandir)/man8/vmcore-dmesg.8 +TARGETS:=$(BINARIES) $(MAN_PAGES) targets: $(TARGETS) +UNINSTALL_TARGETS:=$(UNINSTALL_KDUMP) $(UNINSTALL_KDUMP_MANPAGE) \ + $(UNINSTALL_KEXEC) $(UNINSTALL_KEXEC_MANPAGE) \ + $(UNINSTALL_VMCORE_DMESG) $(UNINSTALL_VMCORE_DMESG_MANPAGE) +uninstall-targets: $(UNINSTALL_TARGETS) + Makefile: Makefile.in config.status ./config.status
@@ -218,6 +229,7 @@ echo:: @echo ARCH=$(ARCH) @echo BINARIES=$(BINARIES) @echo TARGETS=$(TARGETS) + @echo UNINSTALL_TARGETS=$(UNINSTALL_TARGETS) @echo CC=$(CC) @echo AR=$(AR) @echo LD=$(LD)
@@ -323,5 +335,72 @@ install: $(TARGETS) fi; \ done -.PHONY: echo install all targets clean dist-clean distclean \ +uninstall: + UINSTALL_LIST='$(UNINSTALL_TARGETS)'; for file in $$UINSTALL_LIST ; do \ + if test `$(DIRNAME) $$file` = "$(sbindir)" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(bindir)" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(libexecdir)" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(datadir)" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(sysconfdir)" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(sharedstatedir)" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(localstatedir)" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(libdir)" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(infodir)" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(mandir)/man1" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(mandir)/man2" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(mandir)/man3" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(mandir)/man4" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(mandir)/man5" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(mandir)/man6" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(mandir)/man7" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(mandir)/man8" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(includedir)" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(pkgdatadir)" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(pkglibdir)" ; then \ + rm -rf $$file ; \ + fi; \ + if test `$(DIRNAME) $$file` = "$(pkgincludedir)" ; then \ + rm -rf $$file ; \ + fi; \ + done + +.PHONY: echo install uninstall all targets uninstall-targets clean dist-clean distclean \ maintainer-clean maintainerclean tarball rpm
Signature · 7 lines
2.7.4 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
PATCH 2/2 Remove obsolete kdump tool
In reply to Bhupesh SharmaThe kdump tool presently allows one to generate an ELF file containing the ELF header, PT_NOTE and PT_LOAD segments (which can be analyzed later by tools like 'readelf') of the crashdump read from memory, when passed with an appropriate 'elfcorehdr' value(which represents the physical address of the start of the ELF header).
With the availability of tools like crash/gdb the analysis of the crashdump core has become rather easy, and it makes the kdump tool obsolete. Also the same naming convention (man page) causes confusion when compared to similarly named distribution specific kdump service/utilities.
Also most distributions (like Fedora for e.g.) now support more enhanced kdump service and utilities which can be used to analyze the crashdump core contents better. Taking an example of the Fedora specific kdump service and utilities, the following sequence of steps happen when the primary kernel crashes:
1. If the crashkernel is loaded, then the system starts executing the same.
2. When the boot process gets to the point when kdump service is started, the crashdump core is usually copied out to disk (for e.g. inside '/var/crash') using 'cp' command from '/proc/vmcore':
# cp /proc/vmcore <dump-file>
3. Thereafter the system is rebooted back into the normal kernel.
4. Once back to your normal kernel, one can use the crashdump core available on hard disk in conjunction with the previously installed kernel (with debuginfo) to perform postmortem analysis with tools like gdb/crash:
# gdb vmlinux <dump-file>
Accordingly, this patch removes the obsolete kdump tool from 'kexec-tools'.
--- Makefile.in | 9 +- kdump/Makefile | 30 ----- kdump/kdump.8 | 39 ------- kdump/kdump.c | 327 ---------------------------------------------------- kexec-tools.spec.in | 2 - 5 files changed, 2 insertions(+), 405 deletions(-) delete mode 100644 kdump/Makefile delete mode 100644 kdump/kdump.8 delete mode 100644 kdump/kdump.c
Makefile.in +2 -7
@@ -155,11 +155,6 @@ include $(srcdir)/purgatory/Makefile # include $(srcdir)/kexec/Makefile - -# kdump (read a crashdump from memory) -# -include $(srcdir)/kdump/Makefile - # vmcore-dmesg (read dmesg from a vmcore) # include $(srcdir)/vmcore-dmesg/Makefile
@@ -177,10 +172,10 @@ SRCS:= $(dist) PSRCS:=$(foreach s, $(SRCS), $(PACKAGE_NAME)-$(PACKAGE_VERSION)/$(s)) PGSRCS:=$(foreach s, $(GENERATED_SRCS), $(PACKAGE_NAME)-$(PACKAGE_VERSION)/$(s)) -MAN_PAGES:=$(KEXEC_MANPAGE) $(KDUMP_MANPAGE) $(VMCORE_DMESG_MANPAGE) +MAN_PAGES:=$(KEXEC_MANPAGE) $(VMCORE_DMESG_MANPAGE) BINARIES_i386:=$(KEXEC_TEST) BINARIES_x86_64:=$(KEXEC_TEST) -BINARIES:=$(KEXEC) $(KDUMP) $(VMCORE_DMESG) $(BINARIES_$(ARCH)) +BINARIES:=$(KEXEC) $(VMCORE_DMESG) $(BINARIES_$(ARCH)) UNINSTALL_KDUMP = $(sbindir)/kdump UNINSTALL_KDUMP_MANPAGE = $(mandir)/man8/kdump.8
kdump/Makefile deleted +0 -30
@@ -1,30 +0,0 @@ -# -# kdump (reading a crashdump from memory) -# - -KDUMP_SRCS:= kdump/kdump.c - -KDUMP_OBJS = $(call objify, $(KDUMP_SRCS)) -KDUMP_DEPS = $(call depify, $(KDUMP_OBJS)) - -KDUMP = $(SBINDIR)/kdump -KDUMP_MANPAGE = $(MANDIR)/man8/kdump.8 - -dist += kdump/Makefile $(KDUMP_SRCS) kdump/kdump.8 -clean += $(KDUMP_OBJS) $(KDUMP_DEPS) $(KDUMP) $(KDUMP_MANPAGE) - --include $(KDUMP_DEPS) - -$(KDUMP): CC=$(TARGET_CC) -$(KDUMP): $(KDUMP_OBJS) - @$(MKDIR) -p $(@D) - $(LINK.o) -o $@ $^ $(CFLAGS) $(LIBS) - -$(KDUMP_MANPAGE): kdump/kdump.8 - $(MKDIR) -p $(MANDIR)/man8 - cp $^ $(KDUMP_MANPAGE) -echo:: - @echo "KDUMP_SRCS $(KDUMP_SRCS)" - @echo "KDUMP_DEPS $(KDUMP_DEPS)" - @echo "KDUMP_OBJS $(KDUMP_OBJS)" -
kdump/kdump.8 deleted +0 -39
@@ -1,39 +0,0 @@ -.\" Hey, EMACS: -*- nroff -*- -.\" First parameter, NAME, should be all caps -.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection -.\" other parameters are allowed: see man(7), man(1) -.TH KDUMP 8 "Jul 27, 2005" -.\" Please adjust this date whenever revising the manpage. -.\" -.\" Some roff macros, for reference: -.\" .nh disable hyphenation -.\" .hy enable hyphenation -.\" .ad l left justify -.\" .ad b justify to both left and right margins -.\" .nf disable filling -.\" .fi enable filling -.\" .br insert line break -.\" .sp <n> insert n+1 empty lines -.\" for manpage-specific macros, see man(7) -.SH NAME -kdump \- This is just a placeholder until real man page has been written -.SH SYNOPSIS -.B kdump -.RI [ options ] " start_address" ... -.SH DESCRIPTION -.PP -.\" TeX users may be more comfortable with the \fB<whatever>\fP and -.\" \fI<whatever>\fP escape sequences to invode bold face and italics, -.\" respectively. -\fBkdump\fP does not have a man page yet. -.SH OPTIONS -.\"These programs follow the usual GNU command line syntax, with long -.\"options starting with two dashes (`-'). -.\"A summary of options is included below. -.\"For a complete description, see the Info files. -.SH SEE ALSO -.SH AUTHOR -kdump was written by Eric Biederman. -.PP -This manual page was written by Khalid Aziz <[email protected]>, -for the Debian project (but may be used by others).
kdump/kdump.c deleted +0 -327
327 lines not on this page · raw message
kexec-tools.spec.in +0 -2
@@ -30,13 +30,11 @@ make install DESTDIR=${RPM_BUILD_ROOT} %files %defattr(-,root,root) %{_sbindir}/kexec -%{_sbindir}/kdump %{_sbindir}/vmcore-dmesg %doc News %doc COPYING %doc TODO %{_mandir}/man8/kexec.8.gz -%{_mandir}/man8/kdump.8.gz %{_mandir}/man8/vmcore-dmesg.8.gz %changelog
Signature · 7 lines
2.7.4 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Hello Russell, Simon,
Quoted 19 lines · Bhupesh Sharma
This patchset contains two patches:
[1/2] - Adds a missing uninstall rule to 'Makefile.in' to allow easier
uninstallation of executables and man pages installed via 'make install'
[2/2] - Removes obsolete kdump tool as per the discussion on kexec
mailing list (see [1] for details), where a conclusion was reached that with the availability of tools like crash/gdb the analysis of the crashdump core has become rather easy, and it makes the kdump tool obsolete.Also the same naming convention (man page) causes confusion when compared to similarly named distribution specific kdump service/utilities, so its better to remove the same from kexec-tools.
I tested the patchset on my apm mustang and qualcomm arm64 boards and the changes seem to work fine.
Quoted 7 lines
[1] http://lists.infradead.org/pipermail/kexec/2018-April/020483.html
Cc Russell King <[email protected]>Cc Simon Horman <[email protected]>Cc Dave Young <[email protected]>Cc Vivek Goyal <[email protected]>Cc AKASHI Takahiro <[email protected]>
Ping. Any comments on this?
Thanks,
Bhupesh
Quoted 14 lines
Bhupesh Sharma (2):
Makefile.in: Add uninstall rule
Remove obsolete kdump toolMakefile.in | 92 +++++++++++++-- kdump/Makefile | 30 ----- kdump/kdump.8 | 39 ------- kdump/kdump.c | 327 ---------------------------------------------------- kexec-tools.spec.in | 2 - 5 files changed, 83 insertions(+), 407 deletions(-) delete mode 100644 kdump/Makefile delete mode 100644 kdump/kdump.8 delete mode 100644 kdump/kdump.c
Quoted 3 lines
--
2.7.4
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi Bhupesh,
Quoted 11 lines · Bhupesh Sharma
This patchset contains two patches:
[1/2] - Adds a missing uninstall rule to 'Makefile.in' to allow easier
uninstallation of executables and man pages installed via 'make install'
[2/2] - Removes obsolete kdump tool as per the discussion on kexec
mailing list (see [1] for details), where a conclusion was reached that with the availability of tools like crash/gdb the analysis of the crashdump core has become rather easy, and it makes the kdump tool obsolete.
Quoted 4 lines
Also the same naming convention (man page) causes confusion when compared to similarly named distribution specific kdump service/utilities, so its better to remove the same from kexec-tools.
I'm not suer about adding 'make uninstall', the second patch looks good, can you send 2/2 separately?
Quoted 16 lines
I tested the patchset on my apm mustang and qualcomm arm64 boards and the changes seem to work fine.
[1] http://lists.infradead.org/pipermail/kexec/2018-April/020483.html
Cc Russell King <[email protected]>Cc Simon Horman <[email protected]>Cc Dave Young <[email protected]>Cc Vivek Goyal <[email protected]>Cc AKASHI Takahiro <[email protected]>Bhupesh Sharma (2):
Makefile.in: Add uninstall rule
Remove obsolete kdump tool
Quoted 18 lines
Makefile.in | 92 +++++++++++++-- kdump/Makefile | 30 ----- kdump/kdump.8 | 39 ------- kdump/kdump.c | 327 ---------------------------------------------------- kexec-tools.spec.in | 2 - 5 files changed, 83 insertions(+), 407 deletions(-) delete mode 100644 kdump/Makefile delete mode 100644 kdump/kdump.8 delete mode 100644 kdump/kdump.cSignature · 7 lines
2.7.4 _______________________________________________ kexec mailing list [email protected] http://lists.infradead.org/mailman/listinfo/kexec
Thanks
Dave
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Hi Dave,
Thanks for the review.
Quoted 13 lines · Dave Young
Hi Bhupesh,
Quoted 11 lines · Bhupesh Sharma
This patchset contains two patches:
[1/2] - Adds a missing uninstall rule to 'Makefile.in' to allow easier
uninstallation of executables and man pages installed via 'make install'
[2/2] - Removes obsolete kdump tool as per the discussion on kexec
mailing list (see [1] for details), where a conclusion was reached that with the availability of tools like crash/gdb the analysis of the crashdump core has become rather easy, and it makes the kdump tool obsolete.
Quoted 7 lines
Quoted 4 lines
Also the same naming convention (man page) causes confusion when compared to similarly named distribution specific kdump service/utilities, so its better to remove the same from kexec-tools.
I'm not suer about adding 'make uninstall', the second patch looks good, can you send 2/2 separately?
I added 'make uninstall' rule to 'kexec-tools' to allow removing the executable(s) and man page(s) installed after making source and using 'make install' makefile rule.
Generally other user-space tools also have a similar makefile rule and its useful for root filesystems which use a non-rpm based environment(s) to cleaning uninstall locally compiled and installed executable(s) and man page(s).
I can send a new version separating the two patches.
@Russell, Simon - Do you have further comments, which I should include in the new version? If yes, kindly share the same.
Regards,
Bhupesh
Quoted 29 lines
Quoted 29 lines
I tested the patchset on my apm mustang and qualcomm arm64 boards and the changes seem to work fine.
[1] http://lists.infradead.org/pipermail/kexec/2018-April/020483.html
Cc Russell King <[email protected]>Cc Simon Horman <[email protected]>Cc Dave Young <[email protected]>Cc Vivek Goyal <[email protected]>Cc AKASHI Takahiro <[email protected]>Bhupesh Sharma (2):
Makefile.in: Add uninstall rule
Remove obsolete kdump toolMakefile.in | 92 +++++++++++++-- kdump/Makefile | 30 ----- kdump/kdump.8 | 39 ------- kdump/kdump.c | 327 ---------------------------------------------------- kexec-tools.spec.in | 2 - 5 files changed, 83 insertions(+), 407 deletions(-) delete mode 100644 kdump/Makefile delete mode 100644 kdump/kdump.8 delete mode 100644 kdump/kdump.c--
2.7.4
Quoted 7 lines
Quoted 4 lines
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexecThanks
Dave
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec
Quoted 35 lines · Bhupesh Sharma
Hi Dave,
Thanks for the review.
Quoted 13 lines · Dave Young
Hi Bhupesh,
Quoted 11 lines · Bhupesh Sharma
This patchset contains two patches:
[1/2] - Adds a missing uninstall rule to 'Makefile.in' to allow easier
uninstallation of executables and man pages installed via 'make install'
[2/2] - Removes obsolete kdump tool as per the discussion on kexec
mailing list (see [1] for details), where a conclusion was reached that with the availability of tools like crash/gdb the analysis of the crashdump core has become rather easy, and it makes the kdump tool obsolete.Quoted 7 lines
Quoted 4 lines
Also the same naming convention (man page) causes confusion when compared to similarly named distribution specific kdump service/utilities, so its better to remove the same from kexec-tools.
I'm not suer about adding 'make uninstall', the second patch looks good, can you send 2/2 separately?
I added 'make uninstall' rule to 'kexec-tools' to allow removing the executable(s) and man page(s) installed after making source and using 'make install' makefile rule.
Generally other user-space tools also have a similar makefile rule and its useful for root filesystems which use a non-rpm based environment(s) to cleaning uninstall locally compiled and installed executable(s) and man page(s).
Quoted 4 lines
I can send a new version separating the two patches.
@Russell, Simon - Do you have further comments, which I should include in the new version? If yes, kindly share the same.
This sounds fine to me.
_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec