LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   How to apply patches in LFS (https://www.linuxquestions.org/questions/linux-from-scratch-13/how-to-apply-patches-in-lfs-784341/)

centguy 01-24-2010 03:37 AM

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.

affinity 01-24-2010 04:23 AM

The tool you are looking for is patch.

druuna 01-24-2010 04:51 AM

Hi,
Quote:

Originally Posted by centguy (Post 3838413)
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.

centguy 01-24-2010 06:24 AM

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.

francois.e 07-22-2011 08:01 PM

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?

exvor 07-22-2011 10:19 PM

Way to go to necro a thread. Is that patch from a package in the bookit does not lookfm familliar

druuna 07-23-2011 01:14 AM

Hi,
Quote:

Originally Posted by francois.e (Post 4422822)
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.

francois.e 07-23-2011 05:31 AM

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.


All times are GMT -5. The time now is 03:52 AM.