Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Linux Programming & Scripting
Reload this Page RPM Build Mystery
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Linux Programming & Scripting C, Perl, PHP, Bash Scripts, anything programming or script related post in here!

Reply
 
Thread Tools Display Modes
Old 07-02-2007   #1 (permalink)
Just Joined!
 
Join Date: Jul 2007
Posts: 1
Unhappy RPM Build Mystery

I finished writing PHP scrips that adds a web based interface to my Linux systemto perform bare metal backup. However, since then (two days), I have been struggling to build an RPM out of these scripts so that it is easy to distribute it. I read a lot of documentation online already and finally managed to create the RPM without any errors. But when I try to install the RPM, it is not doing its job. All, I want to do with the RPM is to copy three files to the respective locations in /etc/ and /var/log
I would *really* appreciate if some one can help me please.

This is how my spec look like:

Name: cc-test
Version: 1.1
Release: 12
Group: System Environment/Base
Packager: Home
Summary: Bare metal backup restore
Vendor: Home
License: GPL
Source: %{name}-%{version}.tar.gz
Buildroot: /tmp/%{name}-%{version}

%description
Bare metal backup restore

%prep
%setup -q

%install
mkdir -p $RPM_BUILD_ROOT/usr/bin
install -m 755 iBook $RPM_BUILD_ROOT/usr/bin/iBook
install -m 644 IBM $RPM_BUILD_ROOT/usr/bin/IBM
install -m 644 IBM /var/webconfig/IBM

%files
%attr(-,mkhan,mkhan)
/usr/bin/iBook
/usr/bin/IBM

I use "rpmbuild --define "_topdir /home/mkhan/rpms" -ba cc-test.spec" to create the RPM, and both the rpm and src.rpm files get created Okay. Below is the output:

Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.94845
+ umask 022
+ cd /home/mkhan/rpms/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/mkhan/rpms/BUILD
+ rm -rf cc-test-1.1
+ tar -xf /home/mkhan/rpms/SOURCES/cc-test-1.1.tar.gz
+ cd cc-test-1.1
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
++ /usr/bin/id -u
+ '[' 500 = 0 ']'
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.94845
+ umask 022
+ cd /home/mkhan/rpms/BUILD
+ cd cc-test-1.1
+ LANG=C
+ export LANG
+ unset DISPLAY
+ mkdir -p /tmp/cc-test-1.1/usr/bin
+ install -m 755 iBook /tmp/cc-test-1.1/usr/bin/iBook
+ install -m 644 IBM /tmp/cc-test-1.1/usr/bin/IBM
+ install -m 644 IBM /var/webconfig/IBM
+ /usr/lib/rpm/redhat/brp-compress
+ /usr/lib/rpm/redhat/brp-strip /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-static-archive /usr/bin/strip
+ /usr/lib/rpm/redhat/brp-strip-comment-note /usr/bin/strip /usr/bin/objdump
+ /usr/lib/rpm/brp-python-bytecompile
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: cc-test-1.1-12
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Checking for unpackaged file(s): /usr/lib/rpm/check-files /tmp/cc-test-1.1
Wrote: /home/mkhan/rpms/SRPMS/cc-test-1.1-12.src.rpm
Wrote: /home/mkhan/rpms/RPMS/i386/cc-test-1.1-12.i386.rpm

I use "sudo rpm --force -ivh cc-test-1.1-12.i386.rpm" to install the RPM on a CentOS file server. And this is the output that I get:
Preparing... ########################################### [100%]
1:cc-test ########################################### [100%]

But when I go to /var/webconfig/ directory, the 'IBM' file is not copied.

I'm really frustrated with building and RPM, and would really appreciate some help.

thank you,
mkhan
mkhan1484 is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Similar Threads
Thread Thread Starter Forum Replies Last Post
I am stuck in how to install eclipse UML plugin chrainy Linux Programming & Scripting 1 02-24-2007 05:28 PM
I don't think i want this... Weedman Gentoo Linux Help 6 04-15-2006 06:38 AM
cyrus-sasl 2.1.19 installation on Slackware 10.1 wolven00 Slackware Linux Help 0 04-26-2005 08:59 AM
amarok-1.2.2 build error guitarinvegas Linux Applications 2 04-08-2005 06:37 AM
X Keyboard works on doesn't work on any new kernel build davidjneff Redhat / Fedora Linux Help 2 03-16-2005 03:32 PM

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 11:49 PM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0