LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-02-2011, 05:12 PM   #1
dazdaz
Member
 
Registered: Aug 2003
Location: Europe
Distribution: RHEL, CentOS, Ubuntu
Posts: 333

Rep: Reputation: 17
Smile creating an RPM


HI, I wanted to try to learn how to create an RPM file and followed this guide.

http://www.ibm.com/developerworks/library/l-rpm1/

I removed the wget RPM from my system so that there are no clashes with this package which I'd like to create and add.

I create the 5 directory's necessary for rpmbuild as in the instructions above.

I update the spec file to version 1.13 of wget.

Code:
rpmbuild -v -bb --clean SPECS/wget.spec
rpmbuild configure and compiles the source but then barfs at the end part and performs a test which I don't understand. It claims to find files on the system which don't exist (I removed the wget package beforehand).

Where is rpmbuild checking for the existence of these files ? This check appears to be preventing the creation of the RPM file.

I tried following the comments at the bottom of the article, but that did'nt work.

Code:
Checking for unpackaged file(s): /usr/lib/rpm/check-files /build/wget-rpm/wget-1.13-root
error: Installed (but unpackaged) file(s) found:
   /usr/local/etc/wgetrc
   /usr/local/share/info/dir
   /usr/local/share/info/wget.info
   /usr/local/share/locale/be/LC_MESSAGES/wget.mo
   /usr/local/share/locale/bg/LC_MESSAGES/wget.mo
   /usr/local/share/locale/ca/LC_MESSAGES/wget.mo
   /usr/local/share/locale/cs/LC_MESSAGES/wget.mo
   /usr/local/share/locale/da/LC_MESSAGES/wget.mo
   /usr/local/share/locale/de/LC_MESSAGES/wget.mo
   /usr/local/share/locale/el/LC_MESSAGES/wget.mo
   /usr/local/share/locale/en_GB/LC_MESSAGES/wget.mo
   /usr/local/share/locale/eo/LC_MESSAGES/wget.mo
   /usr/local/share/locale/es/LC_MESSAGES/wget.mo
   /usr/local/share/locale/et/LC_MESSAGES/wget.mo
   /usr/local/share/locale/eu/LC_MESSAGES/wget.mo
   /usr/local/share/locale/fi/LC_MESSAGES/wget.mo
   /usr/local/share/locale/fr/LC_MESSAGES/wget.mo
   /usr/local/share/locale/ga/LC_MESSAGES/wget.mo
   /usr/local/share/locale/gl/LC_MESSAGES/wget.mo
   /usr/local/share/locale/he/LC_MESSAGES/wget.mo
   /usr/local/share/locale/hr/LC_MESSAGES/wget.mo
   /usr/local/share/locale/hu/LC_MESSAGES/wget.mo
   /usr/local/share/locale/id/LC_MESSAGES/wget.mo
   /usr/local/share/locale/it/LC_MESSAGES/wget.mo
   /usr/local/share/locale/ja/LC_MESSAGES/wget.mo
   /usr/local/share/locale/lt/LC_MESSAGES/wget.mo
   /usr/local/share/locale/nb/LC_MESSAGES/wget.mo
   /usr/local/share/locale/nl/LC_MESSAGES/wget.mo
   /usr/local/share/locale/pl/LC_MESSAGES/wget.mo
   /usr/local/share/locale/pt/LC_MESSAGES/wget.mo
   /usr/local/share/locale/pt_BR/LC_MESSAGES/wget.mo
   /usr/local/share/locale/ro/LC_MESSAGES/wget.mo
   /usr/local/share/locale/ru/LC_MESSAGES/wget.mo
   /usr/local/share/locale/sk/LC_MESSAGES/wget.mo
   /usr/local/share/locale/sl/LC_MESSAGES/wget.mo
   /usr/local/share/locale/sr/LC_MESSAGES/wget.mo
   /usr/local/share/locale/sv/LC_MESSAGES/wget.mo
   /usr/local/share/locale/tr/LC_MESSAGES/wget.mo
   /usr/local/share/locale/uk/LC_MESSAGES/wget.mo
   /usr/local/share/locale/vi/LC_MESSAGES/wget.mo
   /usr/local/share/locale/zh_CN/LC_MESSAGES/wget.mo
   /usr/local/share/locale/zh_TW/LC_MESSAGES/wget.mo

Last edited by dazdaz; 09-02-2011 at 05:21 PM.
 
Old 09-02-2011, 05:38 PM   #2
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 38 x86_64
Posts: 539

Rep: Reputation: 59
Quote:
Originally Posted by dazdaz View Post
HI, I wanted to try to learn how to create an RPM file and followed this guide.


rpmbuild configure and compiles the source but then barfs at the end part and performs a test which I don't understand. It claims to find files on the system which don't exist (I removed the wget package beforehand).

Where is rpmbuild checking for the existence of these files ? This check appears to be preventing the creation of the RPM file.

I tried following the comments at the bottom of the article, but that did'nt work.

Code:
Checking for unpackaged file(s): /usr/lib/rpm/check-files /build/wget-rpm/wget-1.13-root
error: Installed (but unpackaged) file(s) found:
   /usr/local/etc/wgetrc
   /usr/local/share/info/dir
[snip]
All the files that are noted as installed are being built during the build process and temporarily saved in the BUILD dir. The packaging is done in accordance with the rules defined in the spec file. I think you will find that your spec file doesn't properly specify all the files that are being built.
The spec file must define the install path of all the built files so that the rpm (or yum) install process can be done properly.

Cheers,
Terry
 
1 members found this post helpful.
Old 09-02-2011, 06:05 PM   #3
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
for fedora you might want to read the Fedora wiki on building rpm's
https://fedoraproject.org/wiki/How_t...an_RPM_package
 
1 members found this post helpful.
Old 09-02-2011, 06:17 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
...and specifically http://www.linuxquestions.org/questi...9/#post4426075 makes things easier.
 
1 members found this post helpful.
Old 09-03-2011, 02:50 AM   #5
dazdaz
Member
 
Registered: Aug 2003
Location: Europe
Distribution: RHEL, CentOS, Ubuntu
Posts: 333

Original Poster
Rep: Reputation: 17
Thanks for the input, the find trick worked.
Code:
%install
# doStuff
find $RPM_BUILD_ROOT -not -type d -printf "%%%attr(%%m,root,root) %%p\n" | sed -e "s|$RPM_BUILD_ROOT||g" > %{_tmppath}/%{name}_contents.txt
make install prefix=$RPM_BUILD_ROOT/usr/local
# (..)

%files -f %{_tmppath}/%{name}_contents.txt
 
  


Reply



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
Creating an RPM wills Linux - Software 10 11-01-2012 07:56 PM
Can I Get a Help for creating RPM? emcykm Linux - Newbie 5 06-03-2011 02:24 AM
Creating an RPM that installs in a directory made by another RPM erinfin Linux - Software 4 11-15-2007 05:10 PM
Creating RPM Debugger Programming 2 11-14-2006 02:53 AM
Creating RPM. jayakrishnan Linux - General 1 04-10-2002 12:31 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:52 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