LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 01-24-2010, 03:37 AM   #1
centguy
Member
 
Registered: Feb 2008
Posts: 627
Blog Entries: 1

Rep: Reputation: 48
How to apply patches in LFS


I am trying to build LFS 6.5

Downloaded gcc-4.4.1.tar.bz2

and

gcc-4.4.1-startfiles_fix-1.patch

How do I apply the patch ?

Sorry for this naive question.
 
Old 01-24-2010, 04:23 AM   #2
affinity
Member
 
Registered: Nov 2009
Distribution: Slackware64
Posts: 132

Rep: Reputation: 20
The tool you are looking for is patch.
 
Old 01-24-2010, 04:51 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by centguy View Post
I am trying to build LFS 6.5

Downloaded gcc-4.4.1.tar.bz2

and

gcc-4.4.1-startfiles_fix-1.patch

How do I apply the patch ?

Sorry for this naive question.
Did you read the rest of the LFS book? All steps are explained in the book.

The applying of the patch you mention is done in chapter 5.10. First command in that chapter is the applying of the patch mentioned.

Hope this helps.
 
Old 01-24-2010, 06:24 AM   #4
centguy
Member
 
Registered: Feb 2008
Posts: 627

Original Poster
Blog Entries: 1

Rep: Reputation: 48
Thanks! I am still at pass 1. And this patch is mentioned at pass 2 ! I don't have the patience for this.

Well that's life sometimes.
 
Old 07-22-2011, 08:01 PM   #5
francois.e
Member
 
Registered: Sep 2008
Posts: 72

Rep: Reputation: 3
How to apply patch on any package?

I hope this could be the place to make this post.

I am trying to apply a patch espgs-8.15.4-bov_fix-1.patch to the espgs-8.15.4-source.tar.bz2. I have unpacked the latter. The patch comes in a text form:
http://www.linuxfromscratch.org/patc...ov_fix-1.patch

I already have the /root/Downloads/espgs-8.15.4 folder. I attempted to copy/paste the text file into a file named espgs-8.15.4-bov_fix-1.patch in this folder, and gave executing permission to the file. This does not work as I get the error code:
bash-4.1# patch -Np1 -i ../espgs-8.15.4-bov_fix-1.patch && sed -i "s/bbox.dev$/x11.dev/" Makefile.in && ./configure --prefix=/usr --enable-threads --without-omni && make
patch: **** Can't open patch file ../espgs-8.15.4-bov_fix-1.patch : No such file or directory

What would you suggest?
 
Old 07-22-2011, 10:19 PM   #6
exvor
Senior Member
 
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
Way to go to necro a thread. Is that patch from a package in the bookit does not lookfm familliar
 
Old 07-23-2011, 01:14 AM   #7
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,
Quote:
Originally Posted by francois.e View Post
I hope this could be the place to make this post.
Actually this is not the correct place: This is an old thread and although your question is about a patch, it isn't related to the original question.

You also need to give us some basic information: Which LFS version are you building? Why this old version?

It seems that this is not LFS related, but BLFS and, depending on what you are doing, probably the wrong BLFS version (6.3 is old and doesn't work with the current, 6.4 and newer, LFS versions). You need to build the development version.

Quote:
I am trying to apply a patch espgs-8.15.4-bov_fix-1.patch to the espgs-8.15.4-source.tar.bz2. I have unpacked the latter. The patch comes in a text form:
http://www.linuxfromscratch.org/patc...ov_fix-1.patch

I already have the /root/Downloads/espgs-8.15.4 folder. I attempted to copy/paste the text file into a file named espgs-8.15.4-bov_fix-1.patch in this folder, and gave executing permission to the file. This does not work as I get the error code:
bash-4.1# patch -Np1 -i ../espgs-8.15.4-bov_fix-1.patch && sed -i "s/bbox.dev$/x11.dev/" Makefile.in && ./configure --prefix=/usr --enable-threads --without-omni && make
patch: **** Can't open patch file ../espgs-8.15.4-bov_fix-1.patch : No such file or directory

What would you suggest?
You need to follow the book. Where does it state that you must move the patch to the package source directory? The patch command also shows that it looks for the patch in the underlying directory. This shouldn't be a surprise, you have done this multiple times when building LFS.

If you extracted the package in /root/Downloads/espgs-8.15.4, the patch should reside in /root/Downloads/

Hope this helps.
 
Old 07-23-2011, 05:31 AM   #8
francois.e
Member
 
Registered: Sep 2008
Posts: 72

Rep: Reputation: 3
Thanks a lot for your replies.

@druuna:

In fact I never built LFS, I was just trying to build espgs-8.15.4. As the INSTALL file mentioned in the README file was not in the package, I just googled dropped on this LFS chapter on installing ESP Ghostscript.

Maybe, I should have found a previous version of espgs for the install file. It seems that I am not at all doing the right thing. In fact, trying to work with espgs, an old program as you mentioned, is not the right path to follow.

In fact, I am just trying to install a program so that my brother hl2170, will function under slackware or porteus.

Its seems that I am just begining to make some difference between ghostscript, cups, gutenprint and other concepts. Given that my printer did not worked just out of the box on porteus.

Actually, I am reading the gutenprint-users-manual.pdf. Lets see if it will make any good.

I am just trying to install that brother printer of mine on Porteus.

I am no linux geek for sure.

Last edited by francois.e; 07-23-2011 at 05:52 AM.
 
  


Reply

Tags
lfs, patch



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Have to apply patches in order? OlRoy *BSD 3 07-18-2008 10:45 AM
apply patches linuxtesting2 Solaris / OpenSolaris 1 05-02-2006 02:51 PM
How to apply patches?? jadukor Slackware 4 12-02-2005 07:37 PM
How do you apply these WIFI patches? john_walsh54 Linux - Newbie 0 10-07-2003 06:49 AM
how to apply patches NGraphiX Linux - General 1 06-17-2003 06:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 06:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration