Fedora Linux Support Community & Resources Center
  #1  
Old 20th January 2011, 05:54 AM
auny87 Offline
Registered User
 
Join Date: Jan 2011
Posts: 11
linuxfedorafirefox
unable to create RPM without source

i am new to building RPM packages. i am tyring to package a set of binary files in a tar ball. i donot want to include the sources in the RPM. the tar ball includes some binaries and some scripts. two of the binaries in the tarball are named mb and mpe. for the start i am only trying to install these two
here is my spec

I think the problem is that i am unable to copy from the build directory to the buildoot directory in the install process

Name: npm
Version: 2.7.0.100
Release: 1%{?dist}
Summary: The "NPM-MPS System"

Group: Applications/Text
License: GPLv3+
Source0: npm_2.7.0-100.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

#BuildRequires: gettext
#Requires:
#Requires(post):info
#Requires(preun):info

%description
this is only to test for mb and mpe


%prep
%setup -q -n npm_2.7.0-100




%install
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
#rm -rf $RPM_BUILD_ROOT
#mkdir $RPM_BUILD_ROOT/%{_bindir}/
#install -m 777 $RPM_BUILD_ROOT/%{_bindir}/%{name}/
cp -p %{_build_dir}/npm_2.7.0-100/bin/mb $RPM_BUILD_ROOT/%{_bindir}/%{name}/



#%post

#%preun


%clean
rm -rf $RPM_BUILD_ROOT



i know the problem is in the %install area in the cp or install section whichever is use . this is the error that rpmbuild gives me

1)if u use cp -p
mkdir -p /home/Talha/rpmbuild/BUILDROOT/npm-2.7.0.100-1.fc13.i386//usr/bin
+ cp -p '%{_build_dir}/npm_2.7.0-100/bin/mb' /home/Talha/rpmbuild/BUILDROOT/npm-2.7.0.100-1.fc13.i386//usr/bin/npm/
cp: cannot stat `%{_build_dir}/npm_2.7.0-100/bin/mb': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.Bo2Qp5 (%install)

2)if i use install -m
+ mkdir -p /home/Talha/rpmbuild/BUILDROOT/npm-2.7.0.100-1.fc13.i386//usr/bin
+ install -m 777 -d /home/Talha/rpmbuild/BUILDROOT/npm-2.7.0.100-1.fc13.i386//usr/bin/npm/
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/brp-python-bytecompile /usr/bin/python 1
+ /usr/lib/rpm/redhat/brp-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: npm-2.7.0.100-1.fc13.i686
error: File not found: /home/Talha/rpmbuild/BUILDROOT/npm-2.7.0.100-1.fc13.i386/usr/bin/mb
error: File not found: /home/Talha/rpmbuild/BUILDROOT/npm-2.7.0.100-1.fc13.i386/usr/bin/mpe


RPM build errors:
File not found: /home/Talha/rpmbuild/BUILDROOT/npm-2.7.0.100-1.fc13.i386/usr/bin/mb
File not found: /home/Talha/rpmbuild/BUILDROOT/npm-2.7.0.100-1.fc13.i386/usr/bin/mpe
Reply With Quote
  #2  
Old 21st January 2011, 12:30 AM
Dies Offline
Registered User
 
Join Date: Oct 2006
Posts: 4,752
linuxubuntufirefox
Re: unable to create RPM without source

If those files are already installed on your system I would think this to be the easiest spec file ever...
Code:
Name: npm
Version: 2.7.0.100
Release: 1%{?dist}
Summary: The "NPM-MPS System"

Group: Applications/Text
License: GPLv3+
Source0: npm_2.7.0-100.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
this is only to test for mb and mpe

%files
/usr/bin/mb
/usr/bin/mpe
But then I haven't built any rpm packages in a while and don't feel like rebooting just to try this out...
Reply With Quote
  #3  
Old 21st January 2011, 06:44 PM
ultra magnus Offline
Registered User
 
Join Date: Nov 2007
Location: Finland
Age: 30
Posts: 312
linuxfirefox
Re: unable to create RPM without source

Code:
Name: npm
Version: 2.7.0.100
Release: 1%{?dist}
Summary: The "NPM-MPS System"

Group: Applications/Text
License: GPLv3+
Source0: npm_2.7.0-100.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
this is only to test for mb and mpe

%prep

%setup -q


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m 755 mdb $RPM_BUILD_ROOT%{_bindir}
install -m 755 mpe $RPM_BUILD_ROOT%{_bindir}

%clean
rm -rf $RPM_BUILD_ROOT

%files
/usr/bin/mb
/usr/bin/mpe


% changelog
* Day Month day of month name email version-release
also when commenting stuff out, "#" is not enough. use "#" and an extra "%" in front of any "%". ^spec something like that maybe?
__________________
my blog
my forum
my "art"
my packages
IRC: Magnu5

Last edited by ultra magnus; 21st January 2011 at 06:51 PM.
Reply With Quote
  #4  
Old 21st January 2011, 10:48 PM
Dies Offline
Registered User
 
Join Date: Oct 2006
Posts: 4,752
linuxubuntufirefox
Re: unable to create RPM without source

Quote:
Originally Posted by ultra magnus View Post
Code:
Name: npm
Version: 2.7.0.100
Release: 1%{?dist}
Summary: The "NPM-MPS System"

Group: Applications/Text
License: GPLv3+
Source0: npm_2.7.0-100.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
this is only to test for mb and mpe

%prep

%setup -q


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m 755 mdb $RPM_BUILD_ROOT%{_bindir}
install -m 755 mpe $RPM_BUILD_ROOT%{_bindir}

%clean
rm -rf $RPM_BUILD_ROOT

%files
/usr/bin/mb
/usr/bin/mpe


% changelog
* Day Month day of month name email version-release
also when commenting stuff out, "#" is not enough. use "#" and an extra "%" in front of any "%". ^spec something like that maybe?
Why would you even bother with all that when you're just sourcing the files from the installed system anyways...
Reply With Quote
  #5  
Old 22nd January 2011, 10:37 AM
ultra magnus Offline
Registered User
 
Join Date: Nov 2007
Location: Finland
Age: 30
Posts: 312
linuxfirefox
Re: unable to create RPM without source

%files should be:
Code:
%files
%{_bindir}/md
%{_bindir}/mpe
typotypotypo
__________________
my blog
my forum
my "art"
my packages
IRC: Magnu5
Reply With Quote
  #6  
Old 23rd January 2011, 04:33 PM
auny87 Offline
Registered User
 
Join Date: Jan 2011
Posts: 11
windows_7chrome
Re: unable to create RPM without source

i have to package so that i can distribute it onwards. the source will actually be located on an ftp server.. this is just my first try at making an RPM hence i am just trying to package a tarball that i already have. i was able to get away with this problem and now i am stuck in the dependency issue as you can see from my other thread. can anyone plz comment on what might be going wrong there
Reply With Quote
Reply

Tags
create, rpm, source, unable

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
Unable to create ISO files using K3b srini2174 Using Fedora 1 6th June 2010 07:10 PM
installing rm-devtools so as to ultimately rebuild a F9 source to create an F10 rpm mak1 Using Fedora 0 16th December 2008 12:53 AM
create rpm from source .tar.gz robghealey Using Fedora 23 29th June 2008 12:12 PM


Current GMT-time: 08:44 (Thursday, 20-06-2013)

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