[Fedora-packaging] find: /var/tmp/pcore-0.1-Beta-root: No such file or directory
Michael Schwendt
mschwendt at gmail.com
Fri Apr 13 15:56:00 UTC 2012
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 at 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}
# ...
More information about the packaging
mailing list