[RFC] Split kexec-tools into two sub-packages kexec-tools and kdump-tools

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Related: https://bugzilla.redhat.com/show_bug.cgi?id=2121912

Now there is a growing user base to use the kexec reboot and it's
desirable to make the kexec-tools package more modular.

This patch splits current kexec-tools into two sub-packages kexec-tools
and kdump-tools. Now kexec-tools merely provides /usr/sbin/kexec and the
remaining features go into kdump-tools.

"dnf repoquery --whatrequires kexec-tools" shows the following packages
requires kexec-tools,
 - abrt-addon-vmcore
 - anaconda-install-env-deps
 - cockpit-kdump
 - dracut-kiwi-oem-dump
 - realtime-setup
 - retrace-server

For those packages that need kdump, the dependency needs to point to
the new kdump-tools package instead.

Cc: fedora-devel@xxxxxxxxxxxxxxxxxxxxxx
Cc: Dusty Mabe <dustymabe@xxxxxxxxxx>
Cc: crash-catcher-owner@xxxxxxxxxxxxxxxxxxxxxx
CC: anaconda-devel@xxxxxxxxxxxxxxxxxxxxxxx
Cc: Martin Pitt <mpitt@xxxxxxxxxx>
Cc: kiwi-images@xxxxxxxxxxxxxxxx
Cc: Clark Williams <williams@xxxxxxxxxx>
Cc: Matěj Grabovský <mgrabovs@xxxxxxxxxx>
Suggested-by: Zbigniew Jędrzejewski-Szmek <zbyszek@xxxxxxxxx>
Signed-off-by: Coiby Xu <coxu@xxxxxxxxxx>
---
 kexec-tools.spec | 80 +++++++++++++++++++++++++++++-------------------
 1 file changed, 48 insertions(+), 32 deletions(-)

diff --git a/kexec-tools.spec b/kexec-tools.spec
index 360b6c5d..6e78f6d3 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -5,9 +5,10 @@
 
 Name: kexec-tools
 Version: 2.0.26
-Release: 7%{?dist}
+Release: 8%{?dist}
 License: GPLv2
 Summary: The kexec/kdump userspace component
+Obsoletes: kexec-tools < 2.0.26-8
 
 Source0: http://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz
 Source1: kdumpctl
@@ -56,33 +57,6 @@ Source109: dracut-early-kdump-module-setup.sh
 Source200: dracut-fadump-init-fadump.sh
 Source201: dracut-fadump-module-setup.sh
 
-%ifarch ppc64 ppc64le
-Requires(post): servicelog
-Recommends: keyutils
-%endif
-Requires(pre): coreutils sed zlib
-Requires: dracut >= 058
-Requires: dracut-network >= 058
-Requires: dracut-squash >= 058
-Requires: ethtool
-Requires: util-linux
-# Needed for UKI support
-Recommends: binutils
-Recommends: grubby
-Recommends: hostname
-BuildRequires: make
-BuildRequires: zlib-devel elfutils-devel glib2-devel bzip2-devel ncurses-devel bison flex lzo-devel snappy-devel libzstd-devel
-BuildRequires: pkgconfig intltool gettext
-BuildRequires: systemd-rpm-macros
-BuildRequires: automake autoconf libtool
-%ifarch %{ix86} x86_64 ppc64 ppc s390x ppc64le
-Obsoletes: diskdumputils netdump kexec-tools-eppic
-%endif
-
-%ifnarch s390x
-Requires:       systemd-udev%{?_isa}
-%endif
-
 #START INSERT
 
 #
@@ -117,6 +91,42 @@ normal or a panic reboot. This package contains the /sbin/kexec
 binary and ancillary utilities that together form the userspace
 component of the kernel's kexec feature.
 
+%package -n kdump-tools
+Summary: Kernel crash dump collection tools
+Obsoletes: kexec-tools < 2.0.26-8
+%ifarch ppc64 ppc64le
+Requires(post): servicelog
+Recommends: keyutils
+%endif
+Requires(pre): coreutils sed zlib
+Requires: kexec-tools >= 2.0.26-8
+Requires: dracut >= 058
+Requires: dracut-network >= 058
+Requires: dracut-squash >= 058
+Requires: ethtool
+Requires: util-linux
+Requires: binutils
+Obsoletes: kexec-tools = 2.0.26-8
+Recommends: grubby
+Recommends: hostname
+BuildRequires: make
+BuildRequires: zlib-devel elfutils-devel glib2-devel bzip2-devel ncurses-devel bison flex lzo-devel snappy-devel libzstd-devel
+BuildRequires: pkgconfig intltool gettext
+BuildRequires: systemd-rpm-macros
+BuildRequires: automake autoconf libtool
+%ifarch %{ix86} x86_64 ppc64 ppc s390x ppc64le
+Obsoletes: diskdumputils netdump kexec-tools-eppic
+%endif
+
+%ifnarch s390x
+Requires:       systemd-udev%{?_isa}
+%endif
+%description -n kdump-tools
+kdump-tools is reponsible for collecting the crash kernel dump. It builds and
+load the kdump initramfs so when a kernel crashes, the system will boot the
+kdump kernel and initramfs to save the colletecd crash kernel dump to specified
+target.
+
 %prep
 %setup -q
 
@@ -261,7 +271,7 @@ chmod 755 $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/99zz-fadumpini
 mkdir -p $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/
 mv $RPM_BUILD_ROOT/etc/kdump-adv-conf/kdump_dracut_modules/* $RPM_BUILD_ROOT/%{dracutlibdir}/modules.d/
 
-%post
+%post -n kdump-tools
 # Initial installation
 %systemd_post kdump.service
 
@@ -295,10 +305,10 @@ then
 fi
 
 
-%postun
+%postun -n kdump-tools
 %systemd_postun_with_restart kdump.service
 
-%preun
+%preun -n kdump-tools
 %ifarch ppc64 ppc64le
 servicelog_notify --remove --command=/usr/lib/kdump/kdump-migrate-action.sh
 %endif
@@ -326,7 +336,7 @@ do
 	fi
 done
 
-%posttrans
+%posttrans -n kdump-tools
 # Try to reset kernel crashkernel value to new default value or set up
 # crasherkernel value for new install
 #
@@ -342,6 +352,9 @@ fi
 
 %files
 /usr/sbin/kexec
+%{_mandir}/man8/kexec.8.gz
+
+%files -n kdump-tools
 %ifarch %{ix86} x86_64 ppc64 s390x ppc64le aarch64
 /usr/sbin/makedumpfile
 %endif
@@ -396,6 +409,9 @@ fi
 %endif
 
 %changelog
+* Wed Jun 14 2023 Coiby <coxu@xxxxxxxxxx> - 2.0.26-8
+- split kexec-tools into kexec-tools and kdump-tools
+
 * Wed Jun 14 2023 Coiby <coxu@xxxxxxxxxx> - 2.0.26-7
 - kdumpctl: Fix the matching of plus symbol by grep's EREs
 - kdump-lib: Evaluate the memory consumption by smmu and mlx5 separately
-- 
2.41.0
_______________________________________________
Anaconda-devel mailing list -- anaconda-devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to anaconda-devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/anaconda-devel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue




[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux