Re: [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]

 



On Mon, Jun 19, 2023 at 03:31:27PM +0800, Coiby Xu wrote:
> 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.

Maybe submit this as PR against the dist-git repo? We'll get a test
build then.

> +Obsoletes: kexec-tools = 2.0.26-8
I don't think strict equality can be every satisfied.

> +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
> +Obsoletes: diskdumputils netdump kexec-tools-eppic
One-per-line is the usual recommended style.

> -%post
> +%post -n kdump-tools
>  # Initial installation
>  %systemd_post kdump.service
This one is tricky. %systemd_post presets the service on "first installation",
which is actually the first the time package is installed. I.e. it unfortunately
also would execute the preset on upgrades that split out a subpackage, because
as far as rpm is concerned, this is the initial installation of that subpackage.

The righteous way to solve this would be something like this:

%triggerprein -n kdump-tools -- kexec-tools < 2.0.26-8
touch %{_localstatedir}/lib/rpm-state/kexec-tools.no-preset

%post -n kdump-tools
rm %{_localstatedir}/lib/rpm-state/kexec-tools.no-preset 2>/dev/null && return 0
# Initial installation
%systemd_post kdump.service

A bit of a bother, but at least nobody will be suprised by
kdump.service changing state.

Zbyszek
_______________________________________________
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