Change to the toplevel source directory (the one containing the files COPYING
, bfd
and so on) and apply the patch:
zcat ../binutils-2.13.2.1-r5900-7.diff.gz | patch -p1
You almost always need to pass either -p0
or -p1
when applying a patch. The number is the number of path components to strip from the file names in the patch. Check the first few lines of the patch. Here, they are
diff -urN binutils-2.13.2.1.orig/ChangeLog.PS2 binutils-2.13.2.1/ChangeLog.PS2
--- binutils-2.13.2.1.orig/ChangeLog.PS2 1969-12-31 18:00:00.000000000 -0
+++ binutils-2.13.2.1/ChangeLog.PS2 2003-01-20 17:48:29.000000000 -0600
Since all paths have a leading directory, you need to pass -p1
. If the first line was something like diff -urN ../binutils-2.13.2.1.orig/ChangeLog.PS2 ChangeLog.PS2
or diff -urN ChangeLog.PS2.orig ChangeLog.PS2
, you would use -p0
.
Once you've applied the patch, run rpmbuild -bb
to build a new binary package.