LinuxQuestions.org
Help answer threads with 0 replies.
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 09-17-2014, 09:44 AM   #1
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Rep: Reputation: 19
rpmbuild doesnt generate rpm binary package


Hi Colleagues,

I would like to ask You for a help. I`m trying to build new rpm package for CentOS 6. Using my spec file I`m able to build src.rpm but for some reason I`m not able to create rpm binary file.

This is my spec file.

Code:
Name:           mc
Version:        4.8.11 
Release:        1%{?dist}
Summary:        Midnight Commander

Group:          System Environment/Base
License:        GPLv2
URL:            http://ftp.midnight-commander.org/mc-4.8.11.tar.bz2
Source0:        mc-4.8.11.tar.bz2
Buildroot:      <dir>
BuildRequires:  glibc-utils
Requires:       sland

%description
This is simply file manager for linux.

%prep
%setup -q


%build
%configure
make %{?_smp_mflags}

%check
make check

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

install -m 755 -d $RPM_BUILD_ROOT/%{_sbindir}
ln -s /home/rpmbuilder/bin/mckonrad $RPM_BUILD_ROOT/%{_sbindir}

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc


%changelog
rpmlint command showing this:

Quote:
[rpmbuilder@localhost SPECS]$ rpmlint mc.spec
mc.spec: W: invalid-url Source0: mc-4.8.11.tar.bz2
0 packages and 1 specfiles checked; 0 errors, 1 warnings.
[rpmbuilder@localhost SPECS]$

I executed command:

rpmbuild -bb mc.spec

and I cannot find *.rpm file in RPMS folder.

I suspect that something is wrong with my mc.spec file.


Would be perfect is somebody can help me.



Cheers

Dlugasx
 
Old 09-17-2014, 09:58 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,591

Rep: Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354
mc-4.8.11.tar.bz2 should exist in the sources subdir. Is this file available?
http://www.rpm.org/max-rpm-snapshot/...spec-file.html
 
1 members found this post helpful.
Old 09-17-2014, 10:14 AM   #3
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Original Poster
Rep: Reputation: 19
Yes its available.

Quote:
[rpmbuilder@localhost SOURCES]$ pwd
/home/rpmbuilder/rpmbuild/SOURCES
[rpmbuilder@localhost SOURCES]$ ll
total 2992
-rw-rw-r--. 1 rpmbuilder rpmbuilder 3062694 Nov 29 2013 mc-4.8.11.tar.bz2
[rpmbuilder@localhost SOURCES]$
rpmbuild -ba - doesnt return any error.
rpmbuild -bb - also no error, but also doesnt produce rpm file
 
Old 09-17-2014, 10:21 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,591

Rep: Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354
you can try rpmbuild -v or -vv to debug it. in which directory did you execute rpmbuild?
 
Old 09-17-2014, 10:26 AM   #5
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Original Poster
Rep: Reputation: 19
I`m executing in ~/rpmbuild/SPECS.

I will try like You said, to debug it and check the output.
 
Old 09-17-2014, 10:38 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,591

Rep: Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354
it looks like rpmbuild does not find that SOURCES dir. probably you need to start it in ~/rpmbuild
 
Old 09-17-2014, 10:47 AM   #7
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Original Poster
Rep: Reputation: 19
Its finding because it compiling mc package.
As I written I`m able to build mc-4.8.11.src.rpm file.

I havent found any errors in the output from

rpmbuild -vv -bb mc.spec
 
Old 09-18-2014, 01:16 AM   #8
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 13,591

Rep: Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354Reputation: 4354
I do not really understand. Building the src.rpm does not mean you are able to compile it. It means you can pack the sources into an rpm. And also I do not know if that rpm really contains the sources. Furthermore you can check if anything was generated into $RPM_BUILD_ROOT (or it was empty). You did not give any usable information, therefore I can only guess....
 
Old 09-18-2014, 02:24 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590
Quote:
Originally Posted by dlugasx View Post
I havent found any errors in the output from

rpmbuild -vv -bb mc.spec
Here it says:
Code:
]$ rpmbuild -vv -bb mc.spec 
error: Failed build dependencies:
        glibc-utils is needed by mc-4.8.11-1
So post the actual output.
 
Old 09-18-2014, 02:51 AM   #10
dlugasx
Member
 
Registered: Dec 2008
Location: Germany/Poland
Distribution: CentOS / Debian / Solaris / RedHat
Posts: 266

Original Poster
Rep: Reputation: 19
I`m using this source file.

http://ftp.midnight-commander.org/mc-4.8.11.tar.bz2


I have also all packages required to compile mc. I tried to build binaries without rpmbuild and its working fine (configure/make/make install).

This is the tree of my rpmbuild folder. rpmbuild is able also to compile source but for some reason its not creating rpm binary file.

Quote:
[rpmbuilder@localhost rpmbuild]$ tree -L 3
.
├── BUILD
│** └── mc-4.8.11
│** ├── ABOUT-NLS
│** ├── acinclude.m4
│** ├── aclocal.m4
│** ├── AUTHORS
│** ├── build-glib2.sh
│** ├── ChangeLog
│** ├── config
│** ├── config.h
│** ├── config.h.in
│** ├── config.log
│** ├── config.status
│** ├── configure
│** ├── configure.ac
│** ├── contrib
│** ├── COPYING
│** ├── debugfiles.list
│** ├── debuglinks.list
│** ├── debugsources.list
│** ├── doc
│** ├── INSTALL
│** ├── intl
│** ├── lib
│** ├── libtool
│** ├── m4
│** ├── m4.include
│** ├── Makefile
│** ├── Makefile.am
│** ├── Makefile.in
│** ├── misc
│** ├── NEWS
│** ├── po
│** ├── README
│** ├── src
│** ├── stamp-h1
│** ├── tests
│** └── version.h
├── BUILDROOT
│** └── mc-4.8.11-1.el6.x86_64
│** ├── etc
│** └── usr
├── RPMS
├── SOURCES
│** └── mc-4.8.11.tar.bz2
├── SPECS
│** ├── mc.spec
│** ├── output3.txt
│** └── output.txt
└── SRPMS
└── mc-4.8.11-1.el6.src.rpm

21 directories, 30 files

Quote:
[rpmbuilder@localhost rpmbuild]$ rpm -qa | grep glibc-libs
[rpmbuilder@localhost rpmbuild]$ rpm -qa | grep glibc-utils
glibc-utils-2.12-1.132.el6_5.4.x86_64
[rpmbuilder@localhost rpmbuild]$

Why its not saving ? Maybe I need to define some variables for RPMS folder ?

Last edited by dlugasx; 09-18-2014 at 02:52 AM.
 
Old 09-18-2014, 07:52 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2020 CentOS6.10 CentOS7.7 + 50+ other Linux OS, for test only.
Posts: 17,322

Rep: Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581Reputation: 3581
`mc-4.8.11 , CentOS 6.

Suggest : Use an already tested file "mc.spec" from mc-4.8.11-1.fc20.src.rpm
http://dl.fedoraproject.org/pub/fedo...1.fc20.src.rpm

BuildRequires: # yum install glib2-devel e2fsprogs-devel slang-devel \
gpm-devel groff aspell-devel libssh2-devel

* No issues with $ rpmbuild -bb mc.spec :
"Wrote : /home/knudfl/rpms/RPMS/i686/mc-4.8.11-1.el6.i686.rpm "

My rpmbuild setup http://www.linuxquestions.org/questi...1-a-766486/#13
→ post #13.
-
Attached Files
File Type: txt mc.spec.bz2.txt (12.5 KB, 19 views)

Last edited by knudfl; 09-18-2014 at 07:53 AM.
 
Old 09-18-2014, 01:49 PM   #12
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590Reputation: 3590
Quote:
Originally Posted by dlugasx View Post
Why its not saving ?
I asked you a simple question.
Please answer it.
 
  


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
when does an rpm package execute the binary mjjones Linux - Software 1 12-07-2012 01:01 PM
RPM - How to package binary tarball awong_xen Linux - Software 2 11-22-2010 06:21 PM
rpmbuild doesn't generate rpm package bujecas Fedora 2 08-07-2009 11:36 AM
How to patch some executables that are part of the binary rpm package ? sultf Linux - Newbie 1 03-03-2009 02:24 PM
how to extract binary or what ever files from rpm package amit_pansuria Programming 5 08-01-2008 07:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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