diff --git a/gcc-no-undefined-flag-fix.patch b/gcc-no-undefined-flag-fix.patch deleted file mode 100644 index 8a627d0..0000000 --- a/gcc-no-undefined-flag-fix.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 8880e5b8a295788dcae8f5cc038de92cd97b6807 Mon Sep 17 00:00:00 2001 -From: Simon Horman -Date: Wed, 30 Mar 2011 08:34:39 +0900 -Subject: build: Pass --no-undefined as a linker option -Git-commit: 8880e5b8a295788dcae8f5cc038de92cd97b6807 -Patch-mainline: yes - -gcc-4.6 does not accept --no-undefined as a compiler option - -Reported-by: Civil -Acked-by: "Eric W. Biederman" -Signed-off-by: Simon Horman -Signed-off-by: Jiri Slaby ---- - purgatory/Makefile | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/purgatory/Makefile b/purgatory/Makefile -index ea0c19a..ee1679c 100644 ---- a/purgatory/Makefile -+++ b/purgatory/Makefile -@@ -56,8 +56,8 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS) \ - -I$(srcdir)/include \ - -I$(shell $(CC) -print-file-name=include) - $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\ -- --no-undefined -nostartfiles -nostdlib -nodefaultlibs \ -- -e purgatory_start -r -+ -Wl,--no-undefined -nostartfiles -nostdlib \ -+ -nodefaultlibs -e purgatory_start -r - - $(PURGATORY): $(PURGATORY_OBJS) - $(MKDIR) -p $(@D) --- -1.7.4.2 - diff --git a/kexec-tools-2.0.2.tar.bz2 b/kexec-tools-2.0.2.tar.bz2 deleted file mode 100644 index 6f0344f..0000000 --- a/kexec-tools-2.0.2.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f9acb94dcf4cee2a04da18112a6e5732cdcbe98f893039a93582d88307e0103f -size 305961 diff --git a/kexec-tools-2.0.2-rpmlintrc b/kexec-tools-2.0.3-rpmlintrc similarity index 100% rename from kexec-tools-2.0.2-rpmlintrc rename to kexec-tools-2.0.3-rpmlintrc diff --git a/kexec-tools-2.0.3.tar.bz2 b/kexec-tools-2.0.3.tar.bz2 new file mode 100644 index 0000000..046a937 --- /dev/null +++ b/kexec-tools-2.0.3.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:936c89c7229928fe165571c81a13c2837a73d8747779331ef11606bb1f8c8d55 +size 300199 diff --git a/kexec-tools-disable-test.patch b/kexec-tools-disable-test.patch new file mode 100644 index 0000000..008535d --- /dev/null +++ b/kexec-tools-disable-test.patch @@ -0,0 +1,26 @@ +From: Tony Jones +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 +@@ -176,8 +176,11 @@ PSRCS:=$(foreach s, $(SRCS), $(PACKAGE_N + PGSRCS:=$(foreach s, $(GENERATED_SRCS), $(PACKAGE_NAME)-$(PACKAGE_VERSION)/$(s)) + + MAN_PAGES:=$(KEXEC_MANPAGE) $(KDUMP_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) $(KDUMP) $(VMCORE_DMESG) $(BINARIES_$(ARCH)) + + TARGETS:=$(BINARIES) $(MAN_PAGES) diff --git a/kexec-tools-fix-makefile-binaries.patch b/kexec-tools-fix-makefile-binaries.patch new file mode 100644 index 0000000..427e3e2 --- /dev/null +++ b/kexec-tools-fix-makefile-binaries.patch @@ -0,0 +1,18 @@ +From: Tony Jones +Date: Tue Oct 9 17:35:14 2012 +Subject: kexec: fix Makefile.in binaries_arch +Git-commit: aaedd5321b239a919a080da84ed5c96fb4481ed2 + +--- a/Makefile.in 2011-10-03 00:56:38.000000000 +0200 ++++ b/Makefile.in 2012-09-26 18:36:44.232086000 +0200 +@@ -176,8 +176,8 @@ + PGSRCS:=$(foreach s, $(GENERATED_SRCS), $(PACKAGE_NAME)-$(PACKAGE_VERSION)/$(s)) + + MAN_PAGES:=$(KEXEC_MANPAGE) $(KDUMP_MANPAGE) $(VMCORE_DMESG_MANPAGE) +-BINARIES_i386:=$(KEXEC_TEST) $(KEXEC_TEST) +-BINARIES_x86_64:=$(KEXEC) $(KDUMP) $(BINARIES_$(ARCH)) ++BINARIES_i386:=$(KEXEC_TEST) ++BINARIES_x86_64:=$(KEXEC_TEST) + BINARIES:=$(KEXEC) $(KDUMP) $(VMCORE_DMESG) $(BINARIES_$(ARCH)) + + TARGETS:=$(BINARIES) $(MAN_PAGES) diff --git a/kexec-fix-strncat.patch b/kexec-tools-fix-strncat.patch similarity index 100% rename from kexec-fix-strncat.patch rename to kexec-tools-fix-strncat.patch diff --git a/kexec-tools-no-vga-output.diff b/kexec-tools-no-vga-output.patch similarity index 100% rename from kexec-tools-no-vga-output.diff rename to kexec-tools-no-vga-output.patch diff --git a/kexec-tools-xen-present.diff b/kexec-tools-xen-present.diff deleted file mode 100644 index 34440b5..0000000 --- a/kexec-tools-xen-present.diff +++ /dev/null @@ -1,133 +0,0 @@ -From: Olaf Hering -References: bnc#658413, bnc#694863 -Subject: xen_present() should be named is_xen_pv() (includes also dom0). - -A hvm guest is like physical hardware and should not need special handling. -Use code from xen-detect.c instead of stat() to distinguish hvm from pv because -xenfs in a pv_ops kernel generates /proc/xen/capabilities unconditionally. - ---- - kexec/crashdump-xen.c | 100 +++++++++++++++++++++++++++++++++++++++++++++++--- - 1 file changed, 95 insertions(+), 5 deletions(-) - -Index: kexec-tools-2.0.2/kexec/crashdump-xen.c -=================================================================== ---- kexec-tools-2.0.2.orig/kexec/crashdump-xen.c -+++ kexec-tools-2.0.2/kexec/crashdump-xen.c -@@ -10,6 +10,8 @@ - #include - #include - #include -+#include -+#include - #include "kexec.h" - #include "crashdump.h" - #include "kexec-syscall.h" -@@ -25,14 +27,102 @@ struct crash_note_info { - unsigned long length; - }; - --int xen_phys_cpus = 0; --struct crash_note_info *xen_phys_notes; -+static int xen_phys_cpus; -+static struct crash_note_info *xen_phys_notes; - --int xen_present(void) -+/* based on code from xen-detect.c */ -+static int is_dom0; -+#if defined(__i386__) || defined(__x86_64__) -+static jmp_buf xen_sigill_jmp; -+void xen_sigill_handler(int sig) -+{ -+ longjmp(xen_sigill_jmp, 1); -+} -+ -+static void xen_cpuid(uint32_t idx, uint32_t *regs, int pv_context) -+{ -+#ifdef __i386__ -+ /* Use the stack to avoid reg constraint failures with some gcc flags */ -+ asm volatile ( -+ "push %%eax; push %%ebx; push %%ecx; push %%edx\n\t" -+ "test %1,%1 ; jz 1f ; ud2a ; .ascii \"xen\" ; 1: cpuid\n\t" -+ "mov %%eax,(%2); mov %%ebx,4(%2)\n\t" -+ "mov %%ecx,8(%2); mov %%edx,12(%2)\n\t" -+ "pop %%edx; pop %%ecx; pop %%ebx; pop %%eax\n\t" -+ : : "a" (idx), "c" (pv_context), "S" (regs) : "memory" ); -+#else -+ asm volatile ( -+ "test %5,%5 ; jz 1f ; ud2a ; .ascii \"xen\" ; 1: cpuid\n\t" -+ : "=a" (regs[0]), "=b" (regs[1]), "=c" (regs[2]), "=d" (regs[3]) -+ : "0" (idx), "1" (pv_context), "2" (0) ); -+#endif -+} -+ -+static int check_for_xen(int pv_context) - { -- struct stat buf; -+ uint32_t regs[4]; -+ char signature[13]; -+ uint32_t base; -+ -+ for (base = 0x40000000; base < 0x40010000; base += 0x100) -+ { -+ xen_cpuid(base, regs, pv_context); -+ -+ *(uint32_t *)(signature + 0) = regs[1]; -+ *(uint32_t *)(signature + 4) = regs[2]; -+ *(uint32_t *)(signature + 8) = regs[3]; -+ signature[12] = '\0'; -+ -+ if (strcmp("XenVMMXenVMM", signature) == 0 && regs[0] >= (base + 2)) -+ goto found; -+ } -+ -+ return 0; -+ -+found: -+ xen_cpuid(base + 1, regs, pv_context); -+ return regs[0]; -+} - -- return stat("/proc/xen", &buf) == 0; -+static int xen_detect_pv_guest(void) -+{ -+ struct sigaction act, oldact; -+ int is_pv = -1; -+ -+ if (setjmp(xen_sigill_jmp)) -+ return is_pv; -+ -+ memset(&act, 0, sizeof(act)); -+ act.sa_handler = xen_sigill_handler; -+ sigemptyset (&act.sa_mask); -+ if (sigaction(SIGILL, &act, &oldact)) -+ return is_pv; -+ if (check_for_xen(1)) -+ is_pv = 1; -+ sigaction(SIGILL, &oldact, NULL); -+ return is_pv; -+} -+#else -+static int xen_detect_pv_guest(void) -+{ -+ return 1; -+} -+#endif -+ -+/* -+ * Return 1 if its a PV guest. -+ * This includes dom0, which is the only PV guest where kexec/kdump works. -+ * HVM guests have to be handled as native hardware. -+ */ -+int xen_present(void) -+{ -+ if (!is_dom0) { -+ if (access("/proc/xen", F_OK) == 0) -+ is_dom0 = xen_detect_pv_guest(); -+ else -+ is_dom0 = -1; -+ } -+ return is_dom0 > 0; - } - - unsigned long xen_architecture(struct crash_elf_info *elf_info) diff --git a/kexec-tools-xen-static.diff b/kexec-tools-xen-static.patch similarity index 65% rename from kexec-tools-xen-static.diff rename to kexec-tools-xen-static.patch index 08acc05..369f600 100644 --- a/kexec-tools-xen-static.diff +++ b/kexec-tools-xen-static.patch @@ -8,17 +8,19 @@ to use Xen support without a runtime dependency to the Xen package. Signed-off-by: Bernhard Walle ================================================================================ -Index: kexec-tools-2.0.2/configure.ac -=================================================================== ---- kexec-tools-2.0.2.orig/configure.ac -+++ kexec-tools-2.0.2/configure.ac -@@ -155,7 +155,8 @@ fi +--- + configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -160,7 +160,8 @@ fi dnl find Xen control stack libraries if test "$with_xen" = yes ; then AC_CHECK_HEADER(xenctrl.h, - AC_CHECK_LIB(xenctrl, xc_version, , + AC_CHECK_LIB(xenctrl, xc_version, -+ [[LIBS="$LIBS -Wl,-Bstatic -lxenctrl -Wl,-Bdynamic"]], ++ [[LIBS="$LIBS -Wl,-Bstatic -lxenctrl -Wl,-Bdynamic"]] AC_MSG_NOTICE([Xen support disabled]))) - fi - + if test "$ac_cv_lib_xenctrl_xc_version" = yes ; then + AC_CHECK_FUNCS(xc_get_machine_memory_map) diff --git a/kexec-tools.changes b/kexec-tools.changes index 09a6c43..2204fde 100644 --- a/kexec-tools.changes +++ b/kexec-tools.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Oct 11 23:10:42 UTC 2012 - tonyj@suse.com + +- Update to kexec 2.0.3. Drop unneeded patches. + ------------------------------------------------------------------- Thu Jun 14 16:23:58 CEST 2012 - ohering@suse.de diff --git a/kexec-tools.spec b/kexec-tools.spec index b4ec55f..8bf7513 100644 --- a/kexec-tools.spec +++ b/kexec-tools.spec @@ -26,19 +26,19 @@ PreReq: %insserv_prereq %fillup_prereq Summary: Tools for fast kernel loading License: GPL-2.0+ Group: System/Kernel -Version: 2.0.2 +Version: 2.0.3 Release: 0 Source: %{name}-%{version}.tar.bz2 Source1: kexec-bootloader Source2: kexec-bootloader.8.txt Source3: kexec.init Source4: %{name}-%{version}-rpmlintrc -Patch0: %{name}-no-vga-output.diff -Patch1: %{name}-xen-static.diff -Patch2: gcc-no-undefined-flag-fix.patch -Patch3: kexec-fix-strncat.patch -Patch4: kexec-tools-xen-present.diff -Patch5: kexec-tools-xen-balloon-up.patch +Patch0: %{name}-no-vga-output.patch +Patch1: %{name}-xen-static.patch +Patch2: %{name}-fix-strncat.patch +Patch3: %{name}-xen-balloon-up.patch +Patch4: %{name}-fix-makefile-binaries.patch +Patch5: %{name}-disable-test.patch Url: ftp://kernel.org/pub/linux/utils/kernel/kexec/%{name}-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build #!BuildIgnore: fop @@ -116,10 +116,6 @@ install -m 0755 kexec.init ${RPM_BUILD_ROOT}/etc/init.d/kexec %endif #UsrMerge mkdir -p $RPM_BUILD_ROOT/sbin -%ifarch %ix86 x86_64 -mkdir -p $RPM_BUILD_ROOT/%_lib -ln -s %{_libdir}/kexec-tools $RPM_BUILD_ROOT/%_lib -%endif ln -s %{_sbindir}/kdump $RPM_BUILD_ROOT/sbin ln -s %{_sbindir}/kexec $RPM_BUILD_ROOT/sbin #EndUsrMerge @@ -128,13 +124,6 @@ ln -s %{_sbindir}/kexec $RPM_BUILD_ROOT/sbin [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT %if 0%{?suse_version} >= 1110 -#UsrMerge -%pre -if [ -d /%_lib/kexec-tools ];then - rm -rf /%_lib/kexec-tools -fi -#EndUsrMerge - %post %{fillup_and_insserv -n kexec kexec} %endif @@ -152,9 +141,6 @@ fi %doc %{_mandir}/man*/* #UsrMerge /sbin/* -%ifarch %ix86 x86_64 -/%_lib/kexec-tools* -%endif #EndUsrMerge %{_sbindir} %if 0%{?suse_version} >= 1110 @@ -162,8 +148,5 @@ fi /etc/init.d/kexec %config /etc/init.d/kexec %endif -%ifarch %ix86 x86_64 -%{_libdir}/kexec-tools* -%endif %changelog