rpms/kexec-tools/devel kexec-tools-1.101-ppc64-cliargs.patch, NONE, 1.1 kexec-tools-1.101-ppc64-ignore-args.patch, NONE, 1.1 kexec-tools-1.101-ppc64-usage.patch, NONE, 1.1 kexec-tools.spec, 1.54, 1.55 kexec-ppc64-ingnore-args-linux.patch, 1.1, NONE

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Tue Aug 22 14:18:08 UTC 2006


Author: jwilson

Update of /cvs/dist/rpms/kexec-tools/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv19699

Modified Files:
	kexec-tools.spec 
Added Files:
	kexec-tools-1.101-ppc64-cliargs.patch 
	kexec-tools-1.101-ppc64-ignore-args.patch 
	kexec-tools-1.101-ppc64-usage.patch 
Removed Files:
	kexec-ppc64-ingnore-args-linux.patch 
Log Message:
- 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


kexec-tools-1.101-ppc64-cliargs.patch:
 fs2dt.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

--- NEW FILE kexec-tools-1.101-ppc64-cliargs.patch ---
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);

kexec-tools-1.101-ppc64-ignore-args.patch:
 kexec-elf-ppc64.c |    4 ++++
 1 files changed, 4 insertions(+)

--- NEW FILE kexec-tools-1.101-ppc64-ignore-args.patch ---
--- 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;
 		}
 	}
 

kexec-tools-1.101-ppc64-usage.patch:
 kexec-ppc64.c |    4 ++++
 1 files changed, 4 insertions(+)

--- NEW FILE kexec-tools-1.101-ppc64-usage.patch ---
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");
 }


Index: kexec-tools.spec
===================================================================
RCS file: /cvs/dist/rpms/kexec-tools/devel/kexec-tools.spec,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- kexec-tools.spec	18 Aug 2006 17:00:45 -0000	1.54
+++ kexec-tools.spec	22 Aug 2006 14:18:04 -0000	1.55
@@ -1,6 +1,6 @@
 Name: kexec-tools
 Version: 1.101
-Release: 45%{dist}
+Release: 46%{dist}
 License: GPL
 Group: Applications/System
 Summary: The kexec/kdump userspace component.
@@ -12,7 +12,7 @@
 Source5: kcp.c
 Source6: Makefile.kcp
 Source7: makedumpfile.tar.gz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Requires(pre): coreutils chkconfig sed
 BuildRequires: zlib-devel elfutils-libelf-devel glib2-devel pkgconfig
 
@@ -34,7 +34,9 @@
 #
 # 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
@@ -70,6 +72,8 @@
 %patch101 -p1
 %patch201 -p1
 %patch301 -p1
+%patch302 -p1
+%patch303 -p1
 %patch401 -p1
 %patch501 -p1
 %patch601 -p1
@@ -87,7 +91,12 @@
 %patch606 -p1
 
 %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
 make
 %ifarch %{ix86} x86_64
@@ -100,10 +109,12 @@
 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%{_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 644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/kdump
 install -m 755 %{SOURCE3} $RPM_BUILD_ROOT/sbin/mkdumprd
 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
 install -m 755 makedumpfile/makedumpfile $RPM_BUILD_ROOT/sbin/makedumpfile
 %endif
@@ -138,11 +149,20 @@
 %ifarch %{ix86} x86_64
 %{_libdir}/kexec-tools/kexec_test
 %endif
+%{_mandir}/man8/kexec.8*
 %doc News
 %doc COPYING
 %doc TODO
 
 %changelog
+* Mon Aug 21 2006 Jarod Wilson <jwilson at 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 at redhat.com> - 1.101-45%{dist}
 - fixed typo in mkdumprd for bz 202983
 - fixed typo in mkdumprd for bz 203053


--- kexec-ppc64-ingnore-args-linux.patch DELETED ---




More information about the fedora-cvs-commits mailing list