Fedora Linux Support Community & Resources Center
  #1  
Old 6th September 2006, 03:42 AM
ihavenoname Offline
Registered User
 
Join Date: Dec 2005
Posts: 527
Rpm building

Hello, I am trying to learn how to make an rpm package, I was reading one of the redhat how-tos and it stated that I had to list the packages in that would be installed, does this mean that I would have to manually look through the packages and list the files or is there some sort of script that lists them for me?
Reply With Quote
  #2  
Old 6th September 2006, 07:36 AM
daneel971 Offline
Registered User
 
Join Date: Jun 2005
Location: Italy
Posts: 1,108
Sorry, not sure to understand your question - are you trying to write the %files section of your specfile and do you want to know how to find out which files are installed?
__________________
- Captain...
- Yes, Spock?
- I can't believe my ears...
Reply With Quote
  #3  
Old 7th September 2006, 05:31 AM
ihavenoname Offline
Registered User
 
Join Date: Dec 2005
Posts: 527
Quote:
Originally Posted by daneel971
Sorry, not sure to understand your question - are you trying to write the %files section of your specfile and do you want to know how to find out which files are installed?
yes, that is the section and that is what I wanted to know. (See you did understand it! Give yourself credit! )

Last edited by ihavenoname; 7th September 2006 at 05:37 AM.
Reply With Quote
  #4  
Old 7th September 2006, 05:48 AM
daneel971 Offline
Registered User
 
Join Date: Jun 2005
Location: Italy
Posts: 1,108
For simple rpms (no sub packages), I use a "trick" like this, after the %install section:
Code:
# Grab a list of all of the files that we just installed
cd %{buildroot}
find . -type d | sed '1,2d;s/^\.//' > $RPM_BUILD_DIR/file.list.%{name}

%clean
[  %{buildroot} != "/" ] && rm -rf %{buildroot}
rm -f $RPM_BUILD_DIR/file.list.%{name}

%files -f ../file.list.%{name}
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README TODO
For something more elegant, you have to specify manually the files, even using wildcards - anyway, the method above gives you the list, and that's the starting point.
__________________
- Captain...
- Yes, Spock?
- I can't believe my ears...
Reply With Quote
  #5  
Old 10th September 2006, 12:37 AM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 28
Posts: 7,909
In most cases I prefer to manually specify them. That way I am aware of any file changes within the package. * wildcards are allowed. And Fedora Extras wants them macro-ized, so it ends up looking something like this:

Code:
%files
%defattr(-,root,root,-)
%{_bindir}/something
%{_datadir}/something/
Reply With Quote
Reply

Tags
building, rpm

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help building an RPM bjrosen Using Fedora 2 9th August 2009 11:16 PM
gcc 4.0 building nam speedhunt3r Using Fedora 0 23rd March 2009 01:41 PM
building a src.rpm NEVERTRUSTPEAS Using Fedora 2 27th April 2007 04:27 PM
Building RPM flachi Programming & Packaging 1 3rd May 2005 10:12 AM


Current GMT-time: 12:25 (Thursday, 24-07-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat