LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Closed Thread
  Search this Thread
Old 05-16-2013, 03:01 PM   #1
your_shadow03
Senior Member
 
Registered: Jun 2008
Location: Germany
Distribution: Slackware
Posts: 1,466
Blog Entries: 6

Rep: Reputation: 51
issue during RPM build


I created a directory structure as shown below:
Code:

$cd /home/raj
$cd rpmbuild/
$ls BUILD/ BUILDROOT/ SPECS/ SOURCES/ tmp/

$cd /home/raj/rpmbuild/SOURCES


[raj@proj SOURCES]$ ls
etc  opt  usr
[raj@roj SOURCES]$
I created one file under each directory and zipped it through tar cvf command
Code:
SOURCES]$ ls
custom.tar.gz
Now I create a SPEC file like shown below:
Code:
Name:           custom
Version:        1.0
Release:        1%{?dist}
Summary:        Custom sam PKG

Group:          Development/Libraries
License:        GPL
URL:            NA
Source:        custom-1.0.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-root

BuildRequires:  gcc
Requires:       glibc

%description
                This is my test RPM

%prep
%setup -q


%build



%install

find "$RPM_BUILD_ROOT" -not -type d -printf '%%attr(%m,root,root) /%P\n' > %{_tmppath}/%{name}_contents.txt


%clean
rm -rf $RPM_BUILD_ROOT


%files
%files -f %{_tmppath}/%{name}_contents.txt



[raj@proj SPECS]$ rpmbuild -bb custom.spec
Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.tasfMI
+ umask 022
+ cd /home/raj/rpmbuild/BUILD
+ LANG=C
+ export LANG
+ unset DISPLAY
+ cd /home/raj/rpmbuild/BUILD
+ rm -rf custom-1.0
+ /bin/tar -xf /home/raj/rpmbuild/SOURCES/custom-1.0.tar.gz
+ cd custom-1.0
+ /bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ exit 0
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.b4qn0X
+ umask 022
+ cd /home/raj/rpmbuild/BUILD
+ cd custom-1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ exit 0
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.e0qhfd
+ umask 022
+ cd /home/raj/rpmbuild/BUILD
+ '[' /home/raj/rpmbuild/BUILDROOT/custom-1.0-1.el6.x86_64 '!=' / ']'
+ rm -rf /home/raj/rpmbuild/BUILDROOT/custom-1.0-1.el6.x86_64
++ dirname /home/raj/rpmbuild/BUILDROOT/custom-1.0-1.el6.x86_64
+ mkdir -p /home/raj/rpmbuild/BUILDROOT
+ mkdir /home/raj/rpmbuild/BUILDROOT/custom-1.0-1.el6.x86_64
+ cd custom-1.0
+ LANG=C
+ export LANG
+ unset DISPLAY
+ find /home/raj/rpmbuild/BUILDROOT/custom-1.0-1.el6.x86_64 -not -type d -printf                                                                                         '%attr(%m,root,root) /%PATCH\n'
+ /usr/lib/rpm/find-debuginfo.sh --strict-build-id /home/raj/rpmbuild/BUILD/cust                                                                                        om-1.0
+ /usr/lib/rpm/check-buildroot
+ /usr/lib/rpm/redhat/brp-compress
+ /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-python-hardlink
+ /usr/lib/rpm/redhat/brp-java-repack-jars
Processing files: custom-1.0-1.el6.x86_64
Processing files: custom-debuginfo-1.0-1.el6.x86_64
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/raj/rpmbuild/BUI                                                                                        LDROOT/custom-1.0-1.el6.x86_64
warning: Could not canonicalize hostname: cseproj
Wrote: /home/raj/rpmbuild/RPMS/x86_64/custom-1.0-1.el6.x86_64.rpm
Wrote: /home/raj/rpmbuild/RPMS/x86_64/custom-debuginfo-1.0-1.el6.x86_64.rpm
Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.T5grtY
+ umask 022
+ cd /home/raj/rpmbuild/BUILD
+ cd custom-1.0
+ rm -rf /home/raj/rpmbuild/BUILDROOT/custom-1.0-1.el6.x86_64
+ exit 0
While I check if RPM contains files or not, I found:

Code:
 rpm -qlip custom-1.0-1.el6.x86_64.rpm
Name        : custom                       Relocations: (not relocatable)
Version     : 1.0                               Vendor: (none)
Release     : 1.el6                         Build Date: Fri 17 May 2013 09:12:06 AM IST
Install Date: (not installed)               Build Host: cseproj
Group       : Development/Libraries         Source RPM: custom-1.0-1.el6.src.rpm
Size        : 0                                License: GPL
Signature   : (none)
URL         : NA
Summary     : Custom sam PKG
Description :
                This is my test RPM
(contains no files)
 
Old 05-16-2013, 04:09 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
First your created this thread, then you created this thread on the same topic (should have continued in the first one) and now this thread. I don't know your reason for doing that but as LQ moderator I find this practice inefficient and not acceptable. Do not do that again. Continue here.
 
Old 05-17-2013, 03:29 PM   #3
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.
 
  


Closed Thread



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
self build rpm fails with missing dependencies on build host zhjim Linux - Software 1 09-24-2009 08:47 AM
Issue with RPM Build ??? ajeetraina Linux - Server 9 08-31-2007 08:10 AM
How can I generate / build and RPM from *.src.rpm file sreekumartg Red Hat 3 02-23-2007 05:23 PM
Help with RPM Build issue for xemacs adymcc Linux - Desktop 2 02-13-2007 07:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:31 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
Open Source Consulting | Domain Registration