[Fedora-packaging] Scripting language dependencies

Tom Lane tgl at redhat.com
Fri Feb 17 15:10:48 UTC 2012


Bill Nottingham <notting at redhat.com> writes:
> OK, so how about:

> Scripting inside of spec files

> Inside of a spec file, sometimes it is necessary to call a programming or
> scripting language during %setup, %build, or %install. In Fedora, spec
> files may in general only use the following languages for this purpose:

> 1. Python
> 2. Perl
> 3. awk/sed

> Also, if your package already BuildRequires a specific scripting language
> (such as Ruby, or Tcl) as part of its normal compile process, it may also be
> called from the spec file.

Couple of questions:

1. Which of the above alternatives demand a BuildRequires for the
language?  (Is BuildRequires the right thing for calls that aren't in
%build?)

2. Can we put even stricter limits on scripting language calls from
macro definitions?  As an example, the specfile for python-psycopg2
contains

%{expand: %%define py3ver %(python3 -c 'import sys;print(sys.version[0:3])')}

which I find to be a perpetual annoyance because I don't have python3
installed on my system, and so *any* tool that parses the specfile burps
out an error message, for example pretty nearly any fedpkg command
complains about that.  In the particular case, %py3ver isn't used
anywhere that's critical except in an actual build, so things work,
but it's unsightly as can be.  I have seen specfiles in other people's
packages where specfile parsing fails entirely unless you have
$randompackage installed, and that seems bad to me.

Now, just instituting a policy edict against this isn't going to fix it,
and if I knew how to get rid of the python-psycopg2 usage I would have
done so already.  But if we're going to have anything about scripting
languages in the policy then I'd like to have some guidance about cases
like this.

			regards, tom lane


More information about the packaging mailing list