nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

How to apply patch to rpm spec file.

This is a discussion on How to apply patch to rpm spec file. within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; Hi I have src.rpm and patch for rpm spec file. How can i apply the patch to spec file itself ...


Go Back   nixCraft Linux Forum > Linux Distribution > CentOS / RHEL / Fedora

Linux answers from nixCraft.


CentOS / RHEL / Fedora Discussion about Redhat Enterprise Linux or CentOS or Fedora Linux related problems.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 30-10-2009, 12:46 PM
Junior Member
User
 
Join Date: Oct 2009
OS: Debian
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
skodali2349 is on a distinguished road
Default How to apply patch to rpm spec file.

Hi

I have src.rpm and patch for rpm spec file. How can i apply the patch to spec file itself when building binary rpms ?(other than patch command).


Can anyone help to me ?
Reply With Quote
  #2 (permalink)  
Old 30-10-2009, 05:01 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,709
Thanks: 11
Thanked 244 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

You cannot apply patch while building same rpm file. Are you talking about 3rd spec file?
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 02-11-2009, 12:19 PM
Junior Member
User
 
Join Date: Oct 2009
OS: Debian
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
skodali2349 is on a distinguished road
Default

Thanks. No I am talking about only a single rpm spec file. Is there a way with 3rd spec file ? If yes can you please tell me the procedure.
Reply With Quote
  #4 (permalink)  
Old 02-11-2009, 02:12 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,709
Thanks: 11
Thanked 244 Times in 183 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Not really, you've to use the patch command or write a shell script wrapper:
Code:
#!/bin/bash
SPEC=/path/to/foo.spec
patch -p1 < $SPEC
rpmbuild -bb $SPEC
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
Reply

Tags
centos , rebuilding rpms , redhat , rhel , rpm , spec , src.rpm


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Difference of two directories, compressing and creating a patch file Phanindra Shell scripting 1 04-09-2009 12:02 PM
CentOS Linux Kernel Patch Update Rahul.Kolan CentOS / RHEL / Fedora 7 27-08-2008 07:34 PM
shell script to search specific file from txt file inside zip file and extract it aasif.shaikh Shell scripting 2 31-05-2008 06:44 PM
Apply CentOS Linux package security updates from the Internet raj CentOS / RHEL / Fedora 0 22-04-2008 01:53 AM
Daylight patch for Linux sweta Linux software 1 22-03-2007 12:56 AM


All times are GMT +5.5. The time now is 07:55 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38