Mailinglist Archive: opensuse-buildservice (375 mails)

< Previous Next >
Re: [opensuse-buildservice] Build serve noob, and need help with a rpm spec file
  • From: Dirk Stoecker <opensuse@xxxxxxxxxxxx>
  • Date: Wed, 30 Apr 2008 08:29:04 +0200 (CEST)
  • Message-id: <alpine.LNX.1.10.0804300820560.7945@xxxxxxxxxxxxxxxxx>
On Tue, 29 Apr 2008, Adam Jimerson wrote:

On Tuesday 29 April 2008 03:22:28 pm Cristian Rodríguez wrote:
Michal Marek escribió:
2) Are you sure you want to use a hardlink here? There's no guarantee
that /usr/kenesis-0.1alpha2/ and /usr/bin/ will be on the same

and /usr/kenesis-0.1alpha2/* seems a wrong installation path.. Adam,
care to share your spec file with us ?

Sure, I had a link to my project but that is long gone. I can go ahead and
say there might be a lot of things wrong with my spec

Free free to make fun of any noobish mistakes that I have made with the spec

Well, actually RPM is a painful system, but not because of the problems you mention, but because of design issues (e.g. it uses line comments, but does not removed comments before macro expansion - thus making commented macros impossible - and so on).

Your current spec failure:

ln $RPM_BUILD_ROOT/usr/%{name}-%{version}/ /usr/bin/kenesis

Actually you have the right idea, but the wrong method:
The %{buildroot} or $RPM_BUILD_ROOT means a seperate directory, which equals the final system. Everthing therein must be as in the final system, whereas every access to the files must be prefix with the path.
So your link must be

ln -s /usr/%{name}-%{version}/ $RPM_BUILD_ROOT/usr/bin/kenesis

a) use softlink
b) the link target (i.e. the destination the link points to) must be without
c) the link itself must be with, as it is in the buildroot.

BTW: Is there a good reason to include the version number in the path. As you do a link to /usr/bin you cannot install packages in parallel anyway.
Avoid changes in the paths, when they are unneccessary.

P.S. As said above, I would suggest /usr/share/%{name} as path and I'm pretty sure RPM has already a macro pointing to that directory.

-- (PGP key available)
< Previous Next >
Follow Ups