kexec-tools/kexec-tools.spec
Jiri Bohac ef97e3f730 Accepting request 1155728 from home:jbohac:branches:Kernel:kdump
- update to 2.0.28:
  * LoongArch: Load vmlinux.efi to the link address
  * LoongArch: Fix an issue with relocatable vmlinux
  * m68k: fix getrandom() use with uclibc
  * lzma: Relax memory limit for lzma decompressor
  * kexec: ppc64: print help to stdout instead of stderr
  * kexec/loongarch64: fix 'make dist' file loss issue
  * crashdump/x86: set the elfcorehdr segment size for hotplug
  * crashdump/x86: identify elfcorehdr segment for hotplug
  * crashdump: exclude elfcorehdr segment from digest for hotplug
  * crashdump: setup general hotplug support
  * crashdump: introduce the hotplug command line options
  * kexec: define KEXEC_UPDATE_ELFCOREHDR
  * kexec: update manpage with explicit mention of clean kexec
  * zboot: add loongarch kexec_load support
  * zboot: enable arm64 kexec_load for zboot image
- drop 6419b008fde783fd0cc2cc266bd1c9cf35e99a0e.patch, upstream
- add fix-building-on-x86_64-with-binutils-2.41.patch:
  * fix assembling on binutils >= 2.42
- refresh kexec-tools-disable-test.patch

OBS-URL: https://build.opensuse.org/request/show/1155728
OBS-URL: https://build.opensuse.org/package/show/Kernel:kdump/kexec-tools?expand=0&rev=167
2024-03-06 17:12:19 +00:00

129 lines
3.6 KiB
RPMSpec

#
# spec file for package kexec-tools
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# Temporarily bump version to aid package split
Name: kexec-tools
Version: 2.0.28
Release: 0
Summary: Tools for loading replacement kernels into memory
License: GPL-2.0-or-later
Group: System/Kernel
URL: https://projects.horms.net/projects/kexec/
Source: https://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.xz
Source1: https://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.sign
Source2: kexec-tools.keyring
Source3: kexec-load.service
Source4: %{name}-rpmlintrc
Patch3: %{name}-disable-test.patch
Patch4: %{name}-vmcoreinfo-in-xen.patch
# https://patchwork.kernel.org/project/linux-riscv/patch/20190416123233.4779-1-mick@ics.forth.gr/
Patch5: %{name}-riscv64.patch
Patch10: %{name}-SYS_getrandom.patch
Patch11: kexec-dont-use-kexec_file_load-on-xen.patch
Patch12: fix-building-on-x86_64-with-binutils-2.41.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: systemd-rpm-macros
BuildRequires: zlib-devel
#!BuildIgnore: fop
#!BuildIgnore: gcc-PIE
Requires: perl-Bootloader >= 1.6
Requires(post): suse-module-tools
Requires(postun):suse-module-tools
%{?systemd_requires}
%if 0%{?suse_version} == 1600
# No Xen
%else
%ifarch x86_64
BuildRequires: pkgconfig
BuildRequires: xen-devel
%endif
%endif
%description
Kexec is a user space utility for loading another kernel and asking the
currently running kernel to do something with it. A currently running
kernel may be asked to start the loaded kernel on reboot, or to start
the loaded kernel after it panics.
%prep
%setup -q -n %{name}-%{version}
%autopatch -p1
%build
autoreconf -fvi
export CFLAGS="%{optflags} -fPIC"
export BUILD_CFLAGS="%{optflags}"
export LDFLAGS="-pie"
%configure
%make_build
%install
%make_install
mkdir -p %{buildroot}/%{_unitdir}
install -m644 %{SOURCE3} %{buildroot}/%{_unitdir}
mkdir -p %{buildroot}/%{_sbindir}
ln -s service %{buildroot}%{_sbindir}/rckexec-load
%if 0%{?suse_version} < 1550
mkdir -p %{buildroot}/sbin
ln -s %{_sbindir}/kexec %{buildroot}/sbin
%endif
%post
%service_add_post kexec-load.service
%{?regenerate_initrd_post}
%postun
%service_del_postun kexec-load.service
%{?regenerate_initrd_post}
%pre
%service_add_pre kexec-load.service
%preun
%service_del_preun kexec-load.service
%posttrans
%{?regenerate_initrd_posttrans}
# Compatibility cruft
# there is no %license prior to SLE12
%if %{undefined _defaultlicensedir}
%define license %doc
%else
# filesystem before SLE12 SP3 lacks /usr/share/licenses
%if 0%(test ! -d %{_defaultlicensedir} && echo 1)
%define _defaultlicensedir %{_defaultdocdir}
%endif
%endif
# End of compatibility cruft
%files
%license COPYING
%doc AUTHORS News TODO doc
%{_mandir}/man*/*
%if 0%{?suse_version} < 1550
/sbin/kexec
%endif
%{_sbindir}/rckexec-load
%{_sbindir}/kexec
%{_sbindir}/vmcore-dmesg
%{_unitdir}/kexec-load.service
%changelog