FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Packaging

 
 
LinkBack Thread Tools
 
Old 04-13-2012, 03:56 PM
Michael Schwendt
 
Default find: /var/tmp/pcore-0.1-Beta-root: No such file or directory

On Fri, 13 Apr 2012 06:49:40 -0700 (PDT), KA (Kamal) wrote:

> Hi,
>
> I am using the following spec file
>
> Summary: pcore binary
> Name: pcore
> Version: 0.1
> Release: Beta
> Epoch: 0
> License: Commercial
> Group: Applications/Telecommunications
> Packager: Kamal Ahmed <kamal.ahmed@unleashbts.com>
> URL: http://pcore.bts.md/
> Source: pcore-0.1.tar.gz
> BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
>
> %description
> ElementalCORE
>
> %prep
> %setup -qn pcore
>
> %build
> %{__make}
>
> %install
> mkdir -p %{name}
> mkdir -p %{_bindir}
> install -d %{name}

These three don't make sense. Read on...

> %clean
>
> %files
> %defattr(-,root,root)
> %doc NEWS
>
>
> But when running rpmbuild -dd pcore.spec , i get error:

What is -dd? Perhaps just a type mistake and you meant -bb. Correct?

> Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.32035
> + umask 022
> + cd /home/kahmed/rpmbuild/BUILD
> + cd pcore

Here the "builddir" was entered. The top directory of the extracted
source tarball.

One which platform did you do this build attempt?
It doesn't look like a recent Fedora or RHEL platform, because those
would empty'n'create the %buildroot directory. That is missing in what
you've quoted.

> + LANG=C
> + export LANG
> + unset DISPLAY
> + mkdir -p pcore
> + mkdir -p /usr/bin
> + install -d pcore

These three commands operated within the build directory, not in the
%buildroot. To operated in the buildroot, you need to use the prefix
%{buildroot} or $RPM_BUILD_ROOT with every path.

> + /usr/lib/rpm/find-debuginfo.sh /home/kahmed/rpmbuild/BUILD/pcore
> find: /var/tmp/pcore-0.1-Beta-root: No such file or directory
> error: Bad exit status from /var/tmp/rpm-tmp.32035 (%install)

This refers to the buildroot, the path specified in the "BuildRoot:" tag.
It doesn't exist for your build, because apparently you use a very old Fedora
where you need to do the following in the %install section:

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
# ...
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 
Old 04-13-2012, 06:31 PM
Michael Schwendt
 
Default find: /var/tmp/pcore-0.1-Beta-root: No such file or directory

On Fri, 13 Apr 2012 10:12:14 -0700 (PDT), KA (Kamal) wrote:

> 3. One which platform did you do this build attempt?
> CentOs 32 bit 5.8

The you need to adjust your spec file %install section as I explained in
my previous reply. You can read it here, too:

https://fedoraproject.org/wiki/EPEL/GuidelinesAndPolicies#Prepping_BuildRoot_For_.25in stall

> Since that IS the target platform, and as far as i understand rpmbuild has to run ON the target platform.
>

Not enough info to conclude whether you misunderstand something.

> 4. i made some progress..
>
> here is an updated pcore.spec

> BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}

Kindly pay attention to what I've written before, please. I've
pointed out that this "BuildRoot" tag specifies the path you are
interest in. Now:

> %install
> mkdir -p %{_tmppath}/%{name}-%{version}-%{release}
> mkdir -p %{name}
> mkdir -p %{_bindir}
> install -d %{name}

You here want to use $RPM_BUILD_ROOT or %buildroot as explained earlier.
It is not helpful, if you go on with your own strange experiments instead
of following advice.

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}
# and then continue to create files in that buildroot
# for example:
mkdir -p %{buildroot}%{_bindir}

> %files
> %defattr(-,root,root)
> %doc NEWS
>
> and i WAS able to get an rpm build with NEWS in the folder*
> /usr/share/doc/pcore-0.1/NEWS

That is something entirely different. The %doc statement as you use it
here for the NEWS file, copies the specified file from the builddir into
the buildroot's default docdir. That has nothing to do with your %install
section _except_ that the buildroot directory must exist (which is why
you need to create it for CentOS 5.8).

> Now i want to copy /pcore/obj/ggsnc/ggsnc to /usr/bin/
> How?

cp -p your LOCALPATH/TO/THE/FILE %{buildroot}%{_bindir}

where the local path refers to a file within the builddir.

> I have NO idea

Don't rush. Read replies more slowly and comment on specific quotes
instead of quoting everything at the bottom.
--
packaging mailing list
packaging@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/packaging
 

Thread Tools




All times are GMT. The time now is 02:04 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org