Re: rpm packaging problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 3, 2009 at 9:04 AM, ram s <ramforummail@xxxxxxxxx> wrote:
Hello all,

sorry to ask questions again and again.
I am new to rpm packaging.

I am trying to  create one RPM package for my daemon application in Fedora 10.

daemon application contains ,
1. daemon.c
2. daemon.h
3. list.c
4.list.h
5.makefile.

So , I am just tar the daemon application as "daemon.tar.gz".
 

IMHO, daemon-1.tar.gz is a better choice for your tarball (1 is your Version in the SPEC) and also the topleveldir of the tarball should be daemon-1. In this case you can use in %prep
%setup -q
only

But only for good style, YMMV

I put this daemon.tar.gz in /home/user/rpmbuild/SOURCES directory.

I am creating spec filr and put it in /home/user/rpmbuild/SPECS  directory.

Now, I am tying to create binary RPM for my application. I am in x86_64 architecture.

when I run rpmbuild -bs daemon-1.spec   and then rpmbuild -bb daemon-1.spec

only source rpm created. Binary RPM is not created.

How to cretae binary RPM for my application.

MY spec file is,

[SPEC]
Summary: This Package install Daemon application
Name: daemon
Version:1
Release:1
License: GPL
Group: Applications/System
Source:daemon.tar.gz
IMHO, Better Source0:
BuildRoot: /home/nco_user/rpmbuild/tmp

In general Fedora pkg use

BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
or
BuildRoot: %{_tmppath}/%{name}-root

BTW, in rpm 4.6 BuildRoot isn't used anymore, e.g. is ignored but not harm.
 
BuildArch:noarch
Why noarch ? Is a binary package.
Packager:S.J.Ram

IMHO, no good in general using Packager in a spec directly. Use %packager in ~/.rpmmacros

%define destdir /home/nco_user/rpmbuild/builddir
Why it is defined ? You not use. Again only for readability.
%description
This Package install Daemon application
%prep
%setup -qn %{name}
%build
make

%install
#rm -rf $RPM_BUILD_ROOT
make install

Typo perhaps ? Where are you installing ? You HAVE to install in the RPM_BUILD_ROOT with something like this

rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

BTW, your makefile have DESTDIR target ? probably not. If this is the case  in %install

rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_tmppath}
install -m755 daemon    $RPM_BUILD_ROOT%{_tmppath}/daemon

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{_tmppath}/daemon

Sure that %{_tmppath} is a good choice for the dest dir ? Or it is only for test ?

[/SPEC]


please guide me to create binary rpm.
Do I need to change SPEC file?.
thank you.

Anyway your SPEC probably trigger a rpm bug IF rpmbuild -bb don't create a binary rpm AND you not have rpmbuild error. In this case, it is difficult to tell without a complete reproducer.

Regards
 

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list


_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux