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 - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-21-2009, 01:46 AM   #1
kavinsiva
LQ Newbie
 
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
Error while creating RPM package


Hi,

I am new to creating RPMs i wrote a spec file while invoking the comment rebuild -ba printer.spec i am getting followinf error

error: File not found: /home/sivakumar/rpmbuild/BUILDROOT/ZebraPrinter-1.0-1.i386/home/sivakumar/rpmbuild/BUILDROOT/ZebraPrinter-1.0-1.i386/ZPCprinter-1.0
error: File not found: /home/sivakumar/rpmbuild/BUILDROOT/ZebraPrinter-1.0-1.i386/home/sivakumar/rpmbuild/BUILDROOT/ZebraPrinter-1.0-1.i386/ZPCprinter-1.0/ZPCprinters


RPM build errors:
File not found: /home/sivakumar/rpmbuild/BUILDROOT/ZebraPrinter-1.0-1.i386/home/sivakumar/rpmbuild/BUILDROOT/ZebraPrinter-1.0-1.i386/ZPCprinter-1.0
File not found: /home/sivakumar/rpmbuild/BUILDROOT/ZebraPrinter-1.0-1.i386/home/sivakumar/rpmbuild/BUILDROOT/ZebraPrinter-1.0-1.i386/ZPCprinter-1.0/ZPCprinters

my spec file
<spec>
Summary:Zebra Printer GUI
Name: ZebraPrinter
Version:1.0
Release: 1
License:Gpl
Source: ZPCprinter.tar.gz
%description
This UI wil lHelp to use Zebra Printer

%prep
%setup

%install
install -m 0755 -d /home/sivakumar/rpmbuild/ZPCprinter-1.0
install -m 0755 -d /home/sivakumar/rpmbuild/ZPCprinter-1.0/ZPCprinters

%files

%dir /home/sivakumar/rpmbuild/BUILDROOT/ZebraPrinter-1.0-1.i386/ZPCprinter-1.0
%dir /home/sivakumar/rpmbuild/BUILDROOT/ZebraPrinter-1.0-1.i386/ZPCprinter-1.0/ZPCprinters
</spec>
 
Old 08-21-2009, 04:58 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by kavinsiva View Post
I am new to creating RPMs
That's cool. It isn't hard to do but you best start by reading first.

From your .spec file I see:
- the license is called "GPL", not "Gpl" (minor nit),
- the %_buildroot was not defined (unless it's in your ~/.rpmmacros),
- no parts of the default "./configure; make; make install" mantra are used (how do you install things?),
- you don't use any "make install" (or "make DESTDIR=$RPM_BUILD_ROOT install") or use manual 'install' commands to install files (right now its just two directorynames),
- you should use BUILDROOT like "install -d $RPM_BUILD_ROOT/etc/ZPCprinter-1.0" (not also prepend actual path),
- the $RPM_BUILD_ROOT was not cleaned up,
- the %files section is incomplete (no %defattr, no %doc, no %attr),
- the %changelog section is missing.

It would be really beneficial for you if you would read the package building docs that come with your distribution or else the docs at rpm(5).org or the Fedora Wiki.
 
Old 08-21-2009, 06:43 AM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Example, short "home made" spec files, that work :

Please see the attached files, post # 3 here

http://www.linuxquestions.org/questi...hlight=xfardic
.....
.....
Links, I found useful by creating the first spec file
http://www.rpm.org/max-rpm/s1-rpm-bu...spec-file.html
http://docs.fedoraproject.org/drafts...specfiles.html
http://docs.fedoraproject.org/drafts...n/ch09s05.html
http://docs.fedoraproject.org/drafts...html#id2972829
.....

Last edited by knudfl; 08-21-2009 at 07:04 AM.
 
Old 08-21-2009, 06:54 AM   #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
Nice work. Same three last points apply though wrt $RPM_BUILD_ROOT cleanup, %defattr and %attr and %changelog?
 
  


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
Error creating php 5.2.8 package NetNightmare Slackware 3 02-22-2009 05:43 AM
Creating RPM Package without sources, building etc prakashpms Linux - Software 1 08-27-2008 02:19 PM
error while creating rpm anshul2181981 Linux - Software 2 01-31-2007 09:18 AM
problems in creating a rpm package gobi_dgm Linux - Software 1 09-18-2006 05:28 AM
Creating an RPM package? WeNdeL Linux - Software 3 03-05-2003 09:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:32 AM.

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