Mailinglist Archive: opensuse-buildservice (145 mails)

< Previous Next >
Re: [opensuse-buildservice] prj config to get oss repo?
  • From: Ludwig Nussel <ludwig.nussel@xxxxxxx>
  • Date: Wed, 23 Nov 2011 11:21:25 +0100
  • Message-id: <>
Juergen Weigert wrote:
On Nov 22, 11 12:05:50 +0100, Michael Schroeder wrote:
On Tue, Nov 22, 2011 at 11:25:15PM +1300, Volker Kuhlmann wrote:
I have found the problem.

%if 0%(vs="%{vers}"; test ${vs:0:3} = 4.5 && echo 1)

works just fine, except in the OBS for BuildRequires:. It does work in
the OBS in %description and %build.

Yeah, OBS can't expand %() for obvious reasons.

The "obvious" reasons are, that
* When building a package, the source server employs a
virtual machine, and %() shell expansions are honored.
* But when we evaluate BuildRequires, the source server does not employ
a virtual machine, and %() shell expansions are disabled for security

Not only that. It wouldn't make sense. BuildRequires are evaluated
on the host system because BuildRequires define what's required to
install the target system in the first place. So common constructs
like %(rpm -q something) would run on the host which yields no
useful result even if the execution could be made secure.
The solution is to use macros in the prjconf to define the
properties of the target system.


(o_ Ludwig Nussel
SUSE LINUX Products GmbH, GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB
16746 (AG Nürnberg)
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups