Welcome to the most active Linux Forum on the web.
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 04-21-2006, 03:18 PM   #1
Help Me
LQ Newbie
Registered: Apr 2006
Posts: 2

Rep: Reputation: 0
writing spec file for RPM to move files

Hi there. I am trying to write a simple spec file which moves files from dir (/home/me/ecm/src/*) to another ( /home/me/tmp ).
There is no code to tar, %prep,%build, or %install becasue i am simply moving files, right?

Essentially i think I would have to

1) run rpmbuild
2) cd to dir i want files to be copied/ moved to
3) run rpm

My code :




Any help with why this does not work is appreciated
p.s i am a noob, so please me gentle
Old 04-21-2006, 09:31 PM   #2
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,891

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
Why an rpm to move files? It would be easier to write a shell script which takes two parameters when started: source directory of files to move; target directory to receive files.
Old 05-08-2006, 12:58 PM   #3
Help Me
LQ Newbie
Registered: Apr 2006
Posts: 2

Original Poster
Rep: Reputation: 0
The purpose is to have mutli users to download the .rpm file and to "install" the files to their system in the correct dirs.

The basic idea is the "moving" of files, but it is to install some file in key locations.

By using the %files macro i was able to pack the files to the rpm and using the rpm -Uvh --prefix <dir to place files> I was able to do this.

However when I use the source0 tag with a tar.gz of the files to "unpack" it seems that during the rpm building process (rpmbuild) that the file relocation is completed. Is this correct? Did i misunderstand the fucntionality of the source0 and tarball procedue.

Thanks for any feedback.. =)


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
RPM Spec file creation, %files section question davidas Linux - Software 1 09-13-2007 02:26 AM
questions on writing own rpm .spec file adrianmak Linux - Software 0 08-18-2005 06:03 AM
%file attribute for RPM SPEC files Brian of Gep Linux - Software 3 06-18-2004 04:51 AM
%file attribute for RPM SPEC files Brian of Gep Fedora 0 06-15-2004 07:12 PM
rpm spec files pk21 Programming 3 06-11-2003 04:53 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:45 PM.

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