LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 01-01-2009, 08:40 AM   #1
catInHat
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
rpmbuild -bb adds mysterious commands to my empty %build section


Hi everyone!
I run into a strange situation while running rpmbuild -bb. Would very appreciate your comments.

Background
I use SuSE 10.1.
My rpmbuild command is:
rpmbuild -bb --buildroot /tmp/mypackage/BUILD --define '_topdir /tmp/mypackage' myPackage.spec.
The RPM_BUILD_ROOT is set to /tmp/mypackage/BUILD.
The %build section in myPackage.spec file is completely empty.

Problem
After adding set -x to the .sh file which calls rpmbuild, I see the following output:

Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.78582
+ umask 022
+ cd /tmp/mypackage/BUILD
+ /bin/rm -rf /tmp/mypackage/BUILD
++ dirname /tmp/mypackage/BUILD
+ /bin/mkdir -p /tmp/mypackage
+ /bin/mkdir /tmp/mypackage/BUILD

+ exit 0


I know that the "umask" and the "cd" commands are executed for every section in the spec file, so I'm not worried about them. However, the 4 other commands (in red) seem to appear out of nowhere!
I already searched my scripts and files for the mysterious commands, but found nothing.

Do you happen to have an idea for me???
 
Old 01-02-2009, 12:48 AM   #2
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 669

Rep: Reputation: 134Reputation: 134
Quote:
Originally Posted by catInHat View Post
Hi everyone!
I run into a strange situation while running rpmbuild -bb. Would very appreciate your comments.

Background
I use SuSE 10.1.
My rpmbuild command is:
rpmbuild -bb --buildroot /tmp/mypackage/BUILD --define '_topdir /tmp/mypackage' myPackage.spec.
The RPM_BUILD_ROOT is set to /tmp/mypackage/BUILD.
The %build section in myPackage.spec file is completely empty.

Problem
After adding set -x to the .sh file which calls rpmbuild, I see the following output:

Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.78582
+ umask 022
+ cd /tmp/mypackage/BUILD
+ /bin/rm -rf /tmp/mypackage/BUILD
++ dirname /tmp/mypackage/BUILD
+ /bin/mkdir -p /tmp/mypackage
+ /bin/mkdir /tmp/mypackage/BUILD

+ exit 0


I know that the "umask" and the "cd" commands are executed for every section in the spec file, so I'm not worried about them. However, the 4 other commands (in red) seem to appear out of nowhere!
I already searched my scripts and files for the mysterious commands, but found nothing.

Do you happen to have an idea for me???
build should be done on the clean place. So rpmbuild make sure it's clean:
It's remove directory /tmp/mypackage/BUILD with all content and then re-create this directory.

It's pretty harmless, but if you don't like it, then you can just remove %build section altogether
 
Old 01-04-2009, 04:26 AM   #3
catInHat
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks a lot! I removed the %build section and got rid of the redundant commands :-)

I appreciate your help.
 
  


Reply

Tags
rpmbuild


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
Print section with bash commands xeon123 Programming 1 06-16-2007 04:35 PM
rpmbuild --with : mysql - unknown option. How to pass extra options to build? fireman949 Red Hat 0 07-06-2005 07:53 PM
rpmbuild - build section question jcalcote Suse/Novell 3 03-12-2005 07:10 AM
rpmbuild doesn't produce the source code in /usr/src/redhat/BUILD Niceman2005 Linux - Software 2 11-29-2004 06:58 PM
Experiment with Alsaplayer Fails Build: Tarball and rpmbuild farmerdan Linux - Software 0 05-10-2004 09:14 PM


All times are GMT -5. The time now is 08:39 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration