1

I have 3 files (from here)that I have been given to install in an attempt to upgrade the compiler:

binutils-2.13.2.1-1.mipsel.rpm
binutils-2.13.2.1-1.src.rpm
binutils-2.13.2.1-r5900-7.diff.gz

I'm kinda fumbling around with this.

What I've done is:

rpm -i mipsel -vv
rpm -i src -vv

I have no idea what to do with the .diff.gz I understand it's a patch but don't really know how to deal with it.

1

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.

  • ah thanks, sorry my linux is not so hot, I dont really have a source directory. I assume I have to somehow unpack the .src.rpm – PhilCK Jul 25 '11 at 18:25
  • @PhilCK Ah, yes, my rpm is a bit rusty. I think that's rpmbuild -bp /usr/src/rpm/SPECS/binutils-2.13.2.1-1.spec, and the source will be unpacked in /usr/src/rpm/SOURCES/binutils-2.13.2.1-1. – Gilles 'SO- stop being evil' Jul 25 '11 at 18:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.