- ppc64 fixups:
- actually build ppc64 binaries (bug 203407) - correct usage output - avoid segfault in command-line parsing - install kexec man page - use regulation Fedora BuildRoot
This commit is contained in:
parent
19eed8f6b0
commit
e4cc23de29
21
kexec-tools-1.101-ppc64-cliargs.patch
Normal file
21
kexec-tools-1.101-ppc64-cliargs.patch
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
Index: kexec-tools-1.101/kexec/arch/ppc64/fs2dt.c
|
||||||
|
===================================================================
|
||||||
|
--- kexec-tools-1.101.orig/kexec/arch/ppc64/fs2dt.c
|
||||||
|
+++ kexec-tools-1.101/kexec/arch/ppc64/fs2dt.c
|
||||||
|
@@ -267,10 +267,12 @@ void putprops(char *fn, struct dirent **
|
||||||
|
char *old_param;
|
||||||
|
memcpy(temp_cmdline, dt, len);
|
||||||
|
param = strstr(temp_cmdline, "root=");
|
||||||
|
- old_param = strtok(param, " ");
|
||||||
|
- if (cmd_len != 0)
|
||||||
|
- strcat(local_cmdline, " ");
|
||||||
|
- strcat(local_cmdline, old_param);
|
||||||
|
+ if (param) {
|
||||||
|
+ old_param = strtok(param, " ");
|
||||||
|
+ if (cmd_len != 0)
|
||||||
|
+ strcat(local_cmdline, " ");
|
||||||
|
+ strcat(local_cmdline, old_param);
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
strcat(local_cmdline, " ");
|
||||||
|
cmd_len = strlen(local_cmdline);
|
27
kexec-tools-1.101-ppc64-ignore-args.patch
Normal file
27
kexec-tools-1.101-ppc64-ignore-args.patch
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
--- a/kexec/arch/ppc64/kexec-elf-ppc64.c
|
||||||
|
+++ b/kexec/arch/ppc64/kexec-elf-ppc64.c
|
||||||
|
@@ -93,6 +93,7 @@ int elf_ppc64_load(int argc, char **argv
|
||||||
|
#define OPT_APPEND (OPT_ARCH_MAX+0)
|
||||||
|
#define OPT_RAMDISK (OPT_ARCH_MAX+1)
|
||||||
|
#define OPT_DEVICETREEBLOB (OPT_ARCH_MAX+2)
|
||||||
|
+#define OPT_ARGS_IGNORE (OPT_ARCH_MAX+3)
|
||||||
|
|
||||||
|
static const struct option options[] = {
|
||||||
|
KEXEC_ARCH_OPTIONS
|
||||||
|
@@ -101,6 +102,7 @@ int elf_ppc64_load(int argc, char **argv
|
||||||
|
{ "ramdisk", 1, NULL, OPT_RAMDISK },
|
||||||
|
{ "initrd", 1, NULL, OPT_RAMDISK },
|
||||||
|
{ "devicetreeblob", 1, NULL, OPT_DEVICETREEBLOB },
|
||||||
|
+ { "args-linux", 0, NULL, OPT_ARGS_IGNORE },
|
||||||
|
{ 0, 0, NULL, 0 },
|
||||||
|
};
|
||||||
|
|
||||||
|
@@ -134,6 +136,8 @@ int elf_ppc64_load(int argc, char **argv
|
||||||
|
case OPT_DEVICETREEBLOB:
|
||||||
|
devicetreeblob = optarg;
|
||||||
|
break;
|
||||||
|
+ case OPT_ARGS_IGNORE:
|
||||||
|
+ break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
15
kexec-tools-1.101-ppc64-usage.patch
Normal file
15
kexec-tools-1.101-ppc64-usage.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Index: kexec-tools-1.101/kexec/arch/ppc64/kexec-ppc64.c
|
||||||
|
===================================================================
|
||||||
|
--- kexec-tools-1.101.orig/kexec/arch/ppc64/kexec-ppc64.c
|
||||||
|
+++ kexec-tools-1.101/kexec/arch/ppc64/kexec-ppc64.c
|
||||||
|
@@ -552,6 +552,10 @@ int file_types = sizeof(file_type) / siz
|
||||||
|
|
||||||
|
void arch_usage(void)
|
||||||
|
{
|
||||||
|
+ fprintf(stderr, " --command-line=<Command line> command line to append.\n");
|
||||||
|
+ fprintf(stderr, " --append=<Command line> same as --command-line.\n");
|
||||||
|
+ fprintf(stderr, " --ramdisk=<filename> Initial RAM disk.\n");
|
||||||
|
+ fprintf(stderr, " --initrd=<filename> same as --ramdisk.\n");
|
||||||
|
fprintf(stderr, " --devicetreeblob=<filename> Specify device tree blob file.\n");
|
||||||
|
fprintf(stderr, " --elf64-core-headers Prepare core headers in ELF64 format\n");
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
Name: kexec-tools
|
Name: kexec-tools
|
||||||
Version: 1.101
|
Version: 1.101
|
||||||
Release: 45%{dist}
|
Release: 46%{dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Summary: The kexec/kdump userspace component.
|
Summary: The kexec/kdump userspace component.
|
||||||
@ -12,7 +12,7 @@ Source4: kdump.conf
|
|||||||
Source5: kcp.c
|
Source5: kcp.c
|
||||||
Source6: Makefile.kcp
|
Source6: Makefile.kcp
|
||||||
Source7: makedumpfile.tar.gz
|
Source7: makedumpfile.tar.gz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Requires(pre): coreutils chkconfig sed
|
Requires(pre): coreutils chkconfig sed
|
||||||
BuildRequires: zlib-devel elfutils-libelf-devel glib2-devel pkgconfig
|
BuildRequires: zlib-devel elfutils-libelf-devel glib2-devel pkgconfig
|
||||||
|
|
||||||
@ -34,7 +34,9 @@ Patch201: kexec-tools-1.101-ia64-fixup.patch
|
|||||||
#
|
#
|
||||||
# Patches 301 through 400 are meant for ppc64 kexec-tools enablement
|
# Patches 301 through 400 are meant for ppc64 kexec-tools enablement
|
||||||
#
|
#
|
||||||
Patch301: kexec-ppc64-ingnore-args-linux.patch
|
Patch301: kexec-tools-1.101-ppc64-ignore-args.patch
|
||||||
|
Patch302: kexec-tools-1.101-ppc64-usage.patch
|
||||||
|
Patch303: kexec-tools-1.101-ppc64-cliargs.patch
|
||||||
|
|
||||||
#
|
#
|
||||||
# Patches 401 through 500 are meant for s390 kexec-tools enablement
|
# Patches 401 through 500 are meant for s390 kexec-tools enablement
|
||||||
@ -70,6 +72,8 @@ rm -f ../kexec-tools-1.101.spec
|
|||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
%patch201 -p1
|
%patch201 -p1
|
||||||
%patch301 -p1
|
%patch301 -p1
|
||||||
|
%patch302 -p1
|
||||||
|
%patch303 -p1
|
||||||
%patch401 -p1
|
%patch401 -p1
|
||||||
%patch501 -p1
|
%patch501 -p1
|
||||||
%patch601 -p1
|
%patch601 -p1
|
||||||
@ -87,7 +91,12 @@ tar -C makedumpfile -z -x -v -f %{SOURCE7}
|
|||||||
%patch606 -p1
|
%patch606 -p1
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --sbindir=/sbin
|
%configure \
|
||||||
|
%ifarch ppc64
|
||||||
|
--host=powerpc64-redhat-linux-gnu \
|
||||||
|
--build=powerpc64-redhat-linux-gnu \
|
||||||
|
%endif
|
||||||
|
--sbindir=/sbin
|
||||||
rm -f kexec-tools.spec.in
|
rm -f kexec-tools.spec.in
|
||||||
make
|
make
|
||||||
%ifarch %{ix86} x86_64
|
%ifarch %{ix86} x86_64
|
||||||
@ -100,10 +109,12 @@ make install DESTDIR=$RPM_BUILD_ROOT
|
|||||||
mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
|
mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
|
||||||
mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
||||||
mkdir -p -m755 $RPM_BUILD_ROOT%{_localstatedir}/crash
|
mkdir -p -m755 $RPM_BUILD_ROOT%{_localstatedir}/crash
|
||||||
|
mkdir -p -m755 $RPM_BUILD_ROOT%{_mandir}/man8/
|
||||||
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/kdump
|
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/kdump
|
||||||
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/kdump
|
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/kdump
|
||||||
install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/sbin/mkdumprd
|
install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/sbin/mkdumprd
|
||||||
install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/kdump.conf
|
install -m 755 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/kdump.conf
|
||||||
|
install -m 644 kexec/kexec.8 $RPM_BUILD_ROOT%{_mandir}/man8/kexec.8
|
||||||
%ifarch %{ix86} x86_64
|
%ifarch %{ix86} x86_64
|
||||||
install -m 755 makedumpfile/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile
|
install -m 755 makedumpfile/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile
|
||||||
%endif
|
%endif
|
||||||
@ -138,11 +149,20 @@ exit 0
|
|||||||
%ifarch %{ix86} x86_64
|
%ifarch %{ix86} x86_64
|
||||||
%{_libdir}/kexec-tools/kexec_test
|
%{_libdir}/kexec-tools/kexec_test
|
||||||
%endif
|
%endif
|
||||||
|
%{_mandir}/man8/kexec.8*
|
||||||
%doc News
|
%doc News
|
||||||
%doc COPYING
|
%doc COPYING
|
||||||
%doc TODO
|
%doc TODO
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Aug 21 2006 Jarod Wilson <jwilson@redhat.com> - 1.101-46%{dist}
|
||||||
|
- ppc64 fixups:
|
||||||
|
- actually build ppc64 binaries (bug 203407)
|
||||||
|
- correct usage output
|
||||||
|
- avoid segfault in command-line parsing
|
||||||
|
- install kexec man page
|
||||||
|
- use regulation Fedora BuildRoot
|
||||||
|
|
||||||
* Fri Aug 18 2006 Neil Horman <nhorman@redhat.com> - 1.101-45%{dist}
|
* Fri Aug 18 2006 Neil Horman <nhorman@redhat.com> - 1.101-45%{dist}
|
||||||
- fixed typo in mkdumprd for bz 202983
|
- fixed typo in mkdumprd for bz 202983
|
||||||
- fixed typo in mkdumprd for bz 203053
|
- fixed typo in mkdumprd for bz 203053
|
||||||
|
Loading…
Reference in New Issue
Block a user