Re: find: /var/tmp/pcore-0.1-Beta-root: No such file or directory

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

 



Michael,

1.
%install
mkdir -p %{name}
mkdir -p %{_bindir}
install -d %{name}

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

- Yes, they do not make sense, i as just experimenting. my intention was to use the %install section, to create
directories like /usr/bin in "temp"/build area to be able to copy the executables there later on.
Especially since the makefile does NOT have "install" section

2. What is -dd? Perhaps just a type mistake and you meant -bb. Correct?
yes its a typo, i meant -bb

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

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

4. i made some progress..

here is an updated pcore.spec

Source: pcore-0.1.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}
BuildRequires: gcc = 4.1.2
BuildRequires: make >= 3.81
BuildRequires: postgresql84-devel = 8.4.9

%description
ElementalCORE

%prep
%setup -qn pcore

%build
%{__make}

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

%clean

%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

Now i want to copy /pcore/obj/ggsnc/ggsnc to /usr/bin/
How?
I have NO idea

I really appreciate your help.
Thanks,
-Kamal.


From: Michael Schwendt <mschwendt@xxxxxxxxx>
To: packaging@xxxxxxxxxxxxxxxxxxxxxxx
Sent: Friday, April 13, 2012 11:56 AM
Subject: Re: [Fedora-packaging] 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@xxxxxxxxxxxxxx>
> 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@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging

--
packaging mailing list
packaging@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux