Sync from SUSE:SLFO:Main kexec-tools revision 50db5a46eaadf5ecb7b573355aa00474
This commit is contained in:
commit
3e7c766f84
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
112
6419b008fde783fd0cc2cc266bd1c9cf35e99a0e.patch
Normal file
112
6419b008fde783fd0cc2cc266bd1c9cf35e99a0e.patch
Normal file
@ -0,0 +1,112 @@
|
||||
From 6419b008fde783fd0cc2cc266bd1c9cf35e99a0e Mon Sep 17 00:00:00 2001
|
||||
From: Julien Olivain <ju.o@free.fr>
|
||||
Date: Sat, 23 Sep 2023 18:46:06 +0200
|
||||
Subject: kexec: provide a memfd_create() wrapper if not present in libc
|
||||
|
||||
Commit 714fa115 "kexec/arm64: Simplify the code for zImage" introduced
|
||||
a use of the memfd_create() system call, included in version
|
||||
kexec-tools v2.0.27.
|
||||
|
||||
This system call was introduced in kernel commit [1], first included
|
||||
in kernel v3.17 (released on 2014-10-05).
|
||||
|
||||
The memfd_create() glibc wrapper function was added much later in
|
||||
commit [2], first included in glibc version 2.27 (released on
|
||||
2018-02-01).
|
||||
|
||||
This direct use memfd_create() introduced a requirement on
|
||||
Kernel >= 3.17 and glibc >= 2.27.
|
||||
|
||||
There is old toolchains like [3] for example (which ships gcc 7.3.1,
|
||||
glibc 2.25 and includes kernel v4.10 headers), that can still be used
|
||||
to build newer kernels. Even if such toolchains can be seen as
|
||||
outdated, they are is still claimed as supported by recent kernel.
|
||||
For example, Kernel v6.5.5 has a requirement on gcc version 5.1 and
|
||||
greater. See [4].
|
||||
|
||||
Moreover, kexec-tools <= 2.0.26 could be compiled using recent
|
||||
toolchains with alternative libc (e.g. uclibc-ng, musl) which are not
|
||||
providing the memfd_create() wrapper.
|
||||
|
||||
When compiling kexec-tools v2.0.27 with a toolchain not providing the
|
||||
memfd_create() syscall wrapper, the compilation fail with message:
|
||||
|
||||
kexec/kexec.c: In function 'copybuf_memfd':
|
||||
kexec/kexec.c:645:7: warning: implicit declaration of function 'memfd_create'; did you mean 'SYS_memfd_create'? [-Wimplicit-function-declaration]
|
||||
fd = memfd_create("kernel", MFD_ALLOW_SEALING);
|
||||
^~~~~~~~~~~~
|
||||
SYS_memfd_create
|
||||
kexec/kexec.c:645:30: error: 'MFD_ALLOW_SEALING' undeclared (first use in this function); did you mean '_PC_ALLOC_SIZE_MIN'?
|
||||
fd = memfd_create("kernel", MFD_ALLOW_SEALING);
|
||||
^~~~~~~~~~~~~~~~~
|
||||
_PC_ALLOC_SIZE_MIN
|
||||
|
||||
In order to let kexec-tools compile in a wider range of configurations,
|
||||
this commit adds a memfd_create() function check in autoconf configure
|
||||
script, and adds a system call wrapper which will be used if the
|
||||
function is not available. With this commit, the environment
|
||||
requirement is relaxed to only kernel >= v3.17.
|
||||
|
||||
Note: this issue was found in kexec-tools integration in Buildroot [5]
|
||||
using the command "utils/test-pkg -a -p kexec", which tests many
|
||||
toolchain/arch combinations.
|
||||
|
||||
[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=9183df25fe7b194563db3fec6dc3202a5855839c
|
||||
[2] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=59d2cbb1fe4b8601d5cbd359c3806973eab6c62d
|
||||
[3] https://releases.linaro.org/components/toolchain/binaries/7.3-2018.05/aarch64-linux-gnu/gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu.tar.xz
|
||||
[4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/process/changes.rst?h=v6.5.5#n32
|
||||
[5] https://buildroot.org/
|
||||
|
||||
Signed-off-by: Julien Olivain <ju.o@free.fr>
|
||||
Signed-off-by: Simon Horman <horms@kernel.org>
|
||||
---
|
||||
configure.ac | 3 +++
|
||||
kexec/kexec.c | 11 +++++++++++
|
||||
2 files changed, 14 insertions(+)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 352eefee..602de79b 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -208,6 +208,9 @@ if test "$ac_cv_lib_xenctrl_xc_kexec_load" = yes ; then
|
||||
AC_MSG_NOTICE([The kexec_status call is not available]))
|
||||
fi
|
||||
|
||||
+dnl Check if libc has the memfd_create() syscall wrapper
|
||||
+AC_CHECK_FUNCS([memfd_create])
|
||||
+
|
||||
dnl ---Sanity checks
|
||||
if test "$CC" = "no"; then AC_MSG_ERROR([cc not found]); fi
|
||||
if test "$CPP" = "no"; then AC_MSG_ERROR([cpp not found]); fi
|
||||
diff --git a/kexec/kexec.c b/kexec/kexec.c
|
||||
index fdb4c984..08edfca2 100644
|
||||
--- a/kexec/kexec.c
|
||||
+++ b/kexec/kexec.c
|
||||
@@ -31,6 +31,10 @@
|
||||
#include <sys/mount.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
+#ifndef HAVE_MEMFD_CREATE
|
||||
+#include <linux/memfd.h>
|
||||
+#include <sys/syscall.h>
|
||||
+#endif
|
||||
#include <sys/reboot.h>
|
||||
#include <sys/mman.h>
|
||||
#include <unistd.h>
|
||||
@@ -640,6 +644,13 @@ char *slurp_decompress_file(const char *filename, off_t *r_size)
|
||||
return kernel_buf;
|
||||
}
|
||||
|
||||
+#ifndef HAVE_MEMFD_CREATE
|
||||
+static int memfd_create(const char *name, unsigned int flags)
|
||||
+{
|
||||
+ return syscall(SYS_memfd_create, name, flags);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
static int copybuf_memfd(const char *kernel_buf, size_t size)
|
||||
{
|
||||
int fd, count;
|
||||
--
|
||||
cgit
|
||||
|
59
kexec-dont-use-kexec_file_load-on-xen.patch
Normal file
59
kexec-dont-use-kexec_file_load-on-xen.patch
Normal file
@ -0,0 +1,59 @@
|
||||
From: Jiri Bohac <jbohac@suse.cz>
|
||||
Subject: [PATCH] kexec: dont use kexec_file_load on XEN
|
||||
Patch-mainline: 94fbe64fb22d61726ca0c0996987574b6c783c19
|
||||
References: bsc#1218590
|
||||
|
||||
Since commit 29fe5067ed07 ("kexec: make -a the default")
|
||||
kexec tries the kexec_file_load syscall first and only falls back to kexec_load on
|
||||
selected error codes.
|
||||
|
||||
This effectively breaks kexec on XEN, unless -c is pecified to force the kexec_load
|
||||
syscall.
|
||||
|
||||
The XEN-specific functions (xen_kexec_load / xen_kexec_unload) are only called
|
||||
from my_load / k_unload, i.e. the kexec_load code path.
|
||||
|
||||
With -p (panic kernel) kexec_file_load on XEN fails with -EADDRNOTAVAIL (crash
|
||||
kernel reservation is ignored by the kernel on XEN), which is not in the list
|
||||
of return codes that cause the fallback to kexec_file.
|
||||
|
||||
Without -p kexec_file_load actualy leads to a kernel oops on v6.4.0
|
||||
(needs to be dubugged separately).
|
||||
|
||||
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
|
||||
Fixes: 29fe5067ed07 ("kexec: make -a the default")
|
||||
---
|
||||
kexec/kexec.8 | 1 +
|
||||
kexec/kexec.c | 4 ++++
|
||||
2 files changed, 5 insertions(+)
|
||||
|
||||
diff --git a/kexec/kexec.8 b/kexec/kexec.8
|
||||
index b969cea..9e995fe 100644
|
||||
--- a/kexec/kexec.8
|
||||
+++ b/kexec/kexec.8
|
||||
@@ -162,6 +162,7 @@ Specify that the new kernel is of this
|
||||
.TP
|
||||
.BI \-s\ (\-\-kexec-file-syscall)
|
||||
Specify that the new KEXEC_FILE_LOAD syscall should be used exclusively.
|
||||
+Ignored on XEN.
|
||||
.TP
|
||||
.BI \-c\ (\-\-kexec-syscall)
|
||||
Specify that the old KEXEC_LOAD syscall should be used exclusively.
|
||||
diff --git a/kexec/kexec.c b/kexec/kexec.c
|
||||
index 08edfca..9d0ec46 100644
|
||||
--- a/kexec/kexec.c
|
||||
+++ b/kexec/kexec.c
|
||||
@@ -1685,6 +1685,10 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
}
|
||||
}
|
||||
+ if (xen_present()) {
|
||||
+ do_kexec_file_syscall = 0;
|
||||
+ do_kexec_fallback = 0;
|
||||
+ }
|
||||
if (do_kexec_file_syscall) {
|
||||
if (do_load_jump_back_helper && !do_kexec_fallback)
|
||||
die("--load-jump-back-helper not supported with kexec_file_load\n");
|
||||
--
|
||||
2.43.0
|
||||
|
12
kexec-load.service
Normal file
12
kexec-load.service
Normal file
@ -0,0 +1,12 @@
|
||||
[Unit]
|
||||
Description=load default kernel into the current kernel
|
||||
Documentation=man:kexec(8)
|
||||
DefaultDependencies=no
|
||||
Before=shutdown.target umount.target final.target
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/sbin/kexec-bootloader
|
||||
|
||||
[Install]
|
||||
WantedBy=kexec.target
|
BIN
kexec-tools-2.0.27.tar.sign
Normal file
BIN
kexec-tools-2.0.27.tar.sign
Normal file
Binary file not shown.
BIN
kexec-tools-2.0.27.tar.xz
(Stored with Git LFS)
Normal file
BIN
kexec-tools-2.0.27.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
64
kexec-tools-SYS_getrandom.patch
Normal file
64
kexec-tools-SYS_getrandom.patch
Normal file
@ -0,0 +1,64 @@
|
||||
From: Petr Tesarik <ptesarik@suse.com>
|
||||
Subject: Define SYS_getrandom if needed
|
||||
Upstream: never, build fix for SLE12
|
||||
|
||||
SLE12 did not provide a definition for SYS_getrandom.
|
||||
|
||||
Signed-off-by: Petr Tesarik <ptesarik@suse.com>
|
||||
---
|
||||
configure.ac | 1 +
|
||||
kexec/arch/arm64/kexec-arm64.c | 5 +++++
|
||||
kexec/arch/i386/x86-linux-setup.c | 11 ++++++++++-
|
||||
3 files changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -203,6 +203,7 @@ if test "$with_xen" = dl ; then
|
||||
AC_MSG_NOTICE([Xen support disabled]))])
|
||||
fi
|
||||
|
||||
+AC_CHECK_HEADERS([sys/random.h])
|
||||
dnl Check for the Xen kexec_status hypercall - reachable from --with-xen=yes|dl
|
||||
if test "$ac_cv_lib_xenctrl_xc_kexec_load" = yes ; then
|
||||
AC_CHECK_LIB(xenctrl, xc_kexec_status,
|
||||
--- a/kexec/arch/arm64/kexec-arm64.c
|
||||
+++ b/kexec/arch/arm64/kexec-arm64.c
|
||||
@@ -34,6 +34,11 @@
|
||||
#include "mem_regions.h"
|
||||
#include "arch/options.h"
|
||||
|
||||
+#ifndef __NR_getrandom
|
||||
+#define __NR_getrandom 278
|
||||
+__SYSCALL(__NR_getrandom, sys_getrandom)
|
||||
+#endif
|
||||
+
|
||||
#define ROOT_NODE_ADDR_CELLS_DEFAULT 1
|
||||
#define ROOT_NODE_SIZE_CELLS_DEFAULT 1
|
||||
|
||||
--- a/kexec/arch/i386/x86-linux-setup.c
|
||||
+++ b/kexec/arch/i386/x86-linux-setup.c
|
||||
@@ -24,7 +24,6 @@
|
||||
#include <limits.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
-#include <sys/random.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <linux/fb.h>
|
||||
@@ -38,6 +37,16 @@
|
||||
#include "x86-linux-setup.h"
|
||||
#include "../../kexec/kexec-syscall.h"
|
||||
|
||||
+#ifdef HAVE_SYS_RANDOM_H
|
||||
+#include <sys/random.h>
|
||||
+#else
|
||||
+#include <linux/random.h>
|
||||
+static ssize_t getrandom(void *buf, size_t buflen, unsigned int flags)
|
||||
+{
|
||||
+ return syscall(SYS_getrandom, buf, buflen, flags);
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
#ifndef VIDEO_CAPABILITY_64BIT_BASE
|
||||
#define VIDEO_CAPABILITY_64BIT_BASE (1 << 1) /* Frame buffer base is 64-bit */
|
||||
#endif
|
26
kexec-tools-disable-test.patch
Normal file
26
kexec-tools-disable-test.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From: Tony Jones <tonyj@suse.de>
|
||||
Subject: Disable kexec_test
|
||||
|
||||
Disable kexec_test. It is not required in released product (matching latest
|
||||
Fedora). Also one less file for usr_merge
|
||||
|
||||
---
|
||||
Makefile.in | 7 +++++--
|
||||
1 file changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -173,8 +173,11 @@ PSRCS:=$(foreach s, $(SRCS), $(PACKAGE_N
|
||||
PGSRCS:=$(foreach s, $(GENERATED_SRCS), $(PACKAGE_NAME)-$(PACKAGE_VERSION)/$(s))
|
||||
|
||||
MAN_PAGES:=$(KEXEC_MANPAGE) $(VMCORE_DMESG_MANPAGE)
|
||||
-BINARIES_i386:=$(KEXEC_TEST)
|
||||
-BINARIES_x86_64:=$(KEXEC_TEST)
|
||||
+# Dont' build kexec_test
|
||||
+#BINARIES_i386:=$(KEXEC_TEST)
|
||||
+#BINARIES_x86_64:=$(KEXEC_TEST)
|
||||
+BINARIES_i386:=
|
||||
+BINARIES_x86_64:=
|
||||
BINARIES:=$(KEXEC) $(VMCORE_DMESG) $(BINARIES_$(ARCH))
|
||||
|
||||
UNINSTALL_KDUMP = $(sbindir)/kdump
|
1512
kexec-tools-riscv64.patch
Normal file
1512
kexec-tools-riscv64.patch
Normal file
File diff suppressed because it is too large
Load Diff
16
kexec-tools-rpmlintrc
Normal file
16
kexec-tools-rpmlintrc
Normal file
@ -0,0 +1,16 @@
|
||||
#
|
||||
# The name for the init script is correct. kexec-tools is no name
|
||||
# for an init script.
|
||||
addFilter(".*incoherent-init-script-name.*");
|
||||
|
||||
#
|
||||
# $null is a valid dependency.
|
||||
addFilter(".*init-script-undefined-dependency.*");
|
||||
|
||||
#
|
||||
# It does not make any sense to stop the "service" kexec on removal.
|
||||
# kexec is no service but an init script to run kexec when rebooting.
|
||||
# Stopping it here would lead to a very unexpected behaviour on reboot. :)
|
||||
addFilter(".*init-script-without-%stop_on_removal-preun.*");
|
||||
|
||||
# :mode=python:
|
79
kexec-tools-vmcoreinfo-in-xen.patch
Normal file
79
kexec-tools-vmcoreinfo-in-xen.patch
Normal file
@ -0,0 +1,79 @@
|
||||
From: Petr Tesarik <petr@tesarici.cz>
|
||||
Date: Thu, 5 Apr 2018 10:57:05 +0200
|
||||
Subject: Revert "kexec-tools: Read always one vmcoreinfo file"
|
||||
References: bsc#1085626, bsc#951740
|
||||
Upstream: not yet, upstream wants to stay broken
|
||||
|
||||
This reverts commit 455d79f57e9367e5c59093fd74798905bd5762fc.
|
||||
|
||||
The explanation seems bogus. The file under /sys/kernel
|
||||
refers to the Linux kernel VMCOREINFO note, while the
|
||||
file under /sys/hypervisor refers to the Xen hypervisor
|
||||
VMCOREINFO_XEN note. The former note contains information
|
||||
about the Linux kernel. The latter contains information
|
||||
about the Xen hypervisor. Both are needed to allow page
|
||||
filtering in makedumpfile.
|
||||
|
||||
Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
|
||||
|
||||
---
|
||||
kexec/crashdump-elf.c | 33 ++++++++++++++++++++++++++-------
|
||||
1 file changed, 26 insertions(+), 7 deletions(-)
|
||||
|
||||
--- a/kexec/crashdump-elf.c
|
||||
+++ b/kexec/crashdump-elf.c
|
||||
@@ -40,6 +40,8 @@ int FUNC(struct kexec_info *info,
|
||||
uint64_t notes_addr, notes_len;
|
||||
uint64_t vmcoreinfo_addr, vmcoreinfo_len;
|
||||
int has_vmcoreinfo = 0;
|
||||
+ uint64_t vmcoreinfo_addr_xen, vmcoreinfo_len_xen;
|
||||
+ int has_vmcoreinfo_xen = 0;
|
||||
int (*get_note_info)(int cpu, uint64_t *addr, uint64_t *len);
|
||||
long int count_cpu;
|
||||
|
||||
@@ -52,14 +54,16 @@ int FUNC(struct kexec_info *info,
|
||||
return -1;
|
||||
}
|
||||
|
||||
- if (xen_present()) {
|
||||
- if (!get_xen_vmcoreinfo(&vmcoreinfo_addr, &vmcoreinfo_len))
|
||||
- has_vmcoreinfo = 1;
|
||||
- } else
|
||||
- if (!get_kernel_vmcoreinfo(&vmcoreinfo_addr, &vmcoreinfo_len))
|
||||
- has_vmcoreinfo = 1;
|
||||
+ if (get_kernel_vmcoreinfo(&vmcoreinfo_addr, &vmcoreinfo_len) == 0) {
|
||||
+ has_vmcoreinfo = 1;
|
||||
+ }
|
||||
+
|
||||
+ if (xen_present() &&
|
||||
+ get_xen_vmcoreinfo(&vmcoreinfo_addr_xen, &vmcoreinfo_len_xen) == 0) {
|
||||
+ has_vmcoreinfo_xen = 1;
|
||||
+ }
|
||||
|
||||
- sz = sizeof(EHDR) + (nr_cpus + has_vmcoreinfo) * sizeof(PHDR) +
|
||||
+ sz = sizeof(EHDR) + (nr_cpus + has_vmcoreinfo + has_vmcoreinfo_xen) * sizeof(PHDR) +
|
||||
ranges * sizeof(PHDR);
|
||||
|
||||
/*
|
||||
@@ -178,6 +182,21 @@ int FUNC(struct kexec_info *info,
|
||||
dbgprintf_phdr("vmcoreinfo header", phdr);
|
||||
}
|
||||
|
||||
+ if (has_vmcoreinfo_xen) {
|
||||
+ phdr = (PHDR *) bufp;
|
||||
+ bufp += sizeof(PHDR);
|
||||
+ phdr->p_type = PT_NOTE;
|
||||
+ phdr->p_flags = 0;
|
||||
+ phdr->p_offset = phdr->p_paddr = vmcoreinfo_addr_xen;
|
||||
+ phdr->p_vaddr = 0;
|
||||
+ phdr->p_filesz = phdr->p_memsz = vmcoreinfo_len_xen;
|
||||
+ /* Do we need any alignment of segments? */
|
||||
+ phdr->p_align = 0;
|
||||
+
|
||||
+ (elf->e_phnum)++;
|
||||
+ dbgprintf_phdr("vmcoreinfo_xen header", phdr);
|
||||
+ }
|
||||
+
|
||||
/* Setup an PT_LOAD type program header for the region where
|
||||
* Kernel is mapped if elf_info->kern_size is non-zero.
|
||||
*/
|
1546
kexec-tools.changes
Normal file
1546
kexec-tools.changes
Normal file
File diff suppressed because it is too large
Load Diff
76
kexec-tools.keyring
Normal file
76
kexec-tools.keyring
Normal file
@ -0,0 +1,76 @@
|
||||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBE7S0JsBEAC2bQSzrFOJxmDJMEjB90vt5tbmio8ZcY1z+0JuL4evVP2V1Xke
|
||||
3dJMHl8eYj0pv7Wj6rbqVRTSyOYkaRBmqHhNfvYJe79SJg0rm9WjcdboNxhPMPIS
|
||||
MH9zMhs8V3UlbentImu+nNCdLFRAupaegAnvCMkEmBe3lQO5Syd8Xu6kOtMNSXRq
|
||||
inANKBxS330PVK8QWbjzu8fdUx+Fz/0aCbsIujo6IY29Nt/DaSuw6Bpd/dlm6zh3
|
||||
jbeukJ/j0sAiLPareQB7ZGBez1M0M8tHqT8pew8GBV/vhd3oL3Bt32yMQsb40PA7
|
||||
BxCg5bAPUBIa0yJy9ARaOJIU6//FSlyl+cHfoaGw1kHDPG8Z4C/uRzkanqrH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jMgl4O+A12uxGEX+OanBz0ER8pu+LdaTUPy0pHG3aK2b+kn15n3hKDpLHQlmEqNG
|
||||
ZgI0GOmFfFizZuqUzlAnlCNHhCqCslCjIOgeCF4V73F8rYpAlLNdC44h8nw3JN6n
|
||||
v2yqBbVxowLjYaz8gE4Hl5LyxndIbgRfjszow01l+Oa6XjVYix6j6UVlbooAcHiN
|
||||
zi8b45Y1q9d2Bu+sKFFrQP2ADbSDjjPlmX2nhwuJLZ9F7mhkQ/n0aW+KBj0NQ1Rc
|
||||
qsHVD2+G7g==
|
||||
=h5iz
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
128
kexec-tools.spec
Normal file
128
kexec-tools.spec
Normal file
@ -0,0 +1,128 @@
|
||||
#
|
||||
# spec file for package kexec-tools
|
||||
#
|
||||
# Copyright (c) 2023 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.27
|
||||
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
|
||||
Patch0: 6419b008fde783fd0cc2cc266bd1c9cf35e99a0e.patch
|
||||
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
|
||||
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
|
Loading…
Reference in New Issue
Block a user