Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-17-2016, 03:14 PM   #1
Registered: Jul 2010
Posts: 170

Rep: Reputation: 2
rpmbuild do not copy files.

spec file:

Summary: A collection of great scripts and tools to maintain Linux systems.
Name: tomcat
Version: 1
Release: 1
License: GPL

BuildArch: noarch
Group: Development/Tools

Source: tomcat.tar.gz

BuildRoot: %{_tmppath}/tools

This is a testpackages that containes some files. The files will be placed on a system.

%setup -q -n %{name}




# Then we create the directories where the files go
# don't worry if the directories exist on your target systems, rpm
# creates if necessary
#mkdir -p $RPM_BUILD_ROOT/local/scripts
mkdir -p $RPM_BUILD_ROOT/tmp

# The actual moving
cp * $RPM_BUILD_ROOT/tmp
#cp * $RPM_BUILD_ROOT/local/bin



%attr(0755,root,root) /tmp

* Mon Jan 23 2012 el <> - 1-1
It build rpm fine with
rpmbuild -ba my.spec

resulting rpm installs fine.

[me@localhost SRPMS]$ sudo rpm -ivh tomcat-1-1.src.rpm
   1:tomcat                 ########################################### [100%]
[me@localhost SRPMS]$
But it does not copy files in /tmp dir.

Neither it show as installed.

[me@localhost SRPMS]$ sudo rpm -ql tomcat-1-1.src.rpm
package tomcat-1-1.src.rpm is not installed
[me@localhost SRPMS]$
Old 06-17-2016, 04:03 PM   #2
John VV
LQ Muse
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,090

Rep: Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474Reputation: 2474
the src rpm's are just the source code

there is no program in them to run

did you update the yum or rpm database

yum ( unless fedora 24 then "dnf" or suse then zypper ) should be used for installing a rpm built from the src rpm
and it will have a different name than the SRC rpm

and a question
why install to /tmp ???
instead of the rhel /usr standard
Old 06-17-2016, 08:56 PM   #3
Registered: Jul 2010
Posts: 170

Original Poster
Rep: Reputation: 2
/tmp because, this rpm is meant to carry one script, that script is only going to run once.

But I will look into putting it in /usr.

So my build rpm need to end up in RPMS in stead for SRPMS.. interesting..
Old 06-21-2016, 09:44 AM   #4
Registered: Jul 2010
Posts: 170

Original Poster
Rep: Reputation: 2
atcual rpm were being saved under rpmbuild/RPMS/noarch/.....

I was able to install them, and they copied over files.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
cp how to copy hidden files and copy recusively without over writing ballsystemlord Linux - Software 5 05-25-2015 02:08 PM
[SOLVED] RPMBUILD unpackaged files listed clcbluemont Linux - Software 2 05-01-2012 10:39 AM
problem with %files directive in rpmbuild pgpython Programming 1 12-11-2010 08:45 PM
in copy files or ls files the command want to invert select some files how to?? hocheetiong Linux - Newbie 3 06-27-2008 06:32 AM
rpmbuild and custom /etc files cachemonet Red Hat 2 10-05-2007 03:57 PM

All times are GMT -5. The time now is 03:05 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration