[scl.org] Question about generating RPMs that depend on SCLs (like python27)

Alan Robertson alanr at unix.sh
Fri Jul 18 17:10:57 UTC 2014

On 07/16/2014 02:30 AM, Bohuslav Kabrda wrote:
> That's correct. The problem here is, I think, that the package places it's files into sitearch of the SCL, but it's not actually an SCL package. One of the results of having it as non-SCL package means, that %scl_package_override() function, present in the python27-build subpackage doesn't get invoked. This function looks like this (you need to 's/@scl@/python27/'):
> # override __os_install_post for this collection
> # the python27_os_install_post macro is defined in macros.python2.python27 in python27-python-devel
> # the name is intentionally hardcoded to always provide the same name
> %scl_package_override() %{expand:%{?@scl at _os_install_post:%global __os_install_post %@scl at _os_install_post}
> %global __python_requires %@scl at _python_requires
> %global __python_provides %@scl at _python_provides
This looks like it has a typo in it.

If @scl@ is python27, then

	%global __python_requires %@scl at _python_requires
	%global __python_requires python27_python_requires
	%global __python_provides %@scl at _python_provides
	%global __python_provides python27_python_provides

Why is the original spelled with two underscores ("__python_requires") but the replacement name ("python27_python_requires") only has one underscore?

This seems a bit inconsistent...  It looks correct, but inconsistent...

I see that the python27_python_requires macro is defined in /etc/rpm/macros.python2.python27.  I see that __python_requires is defined in the file /usr/lib/rpm/macros.
The definition of python27_python_requires is:
%python27_python_provides /usr/lib/rpm/pythondeps-scl.sh --provides %{?scl_prefix}
%python27_python_requires /usr/lib/rpm/pythondeps-scl.sh --requires %{?scl_prefix}

So, it expects you to set scl_prefix.  I set it to "python27-"  From 
what I can see in the macro definitions, that's what I expect it would want.

Well, at least now I get different problems!

+ install -p -D -m0755 
+ install -p -D -m0755 
+ rm -f 
+ mkdir -p 
+ mkdir -p 
+ mkdir -p /rpmbuild/BUILDROOT/assimilation-cma-0.1.4-0.30.x86_64/usr/lib64
+ mkdir -p 
+ /usr/lib/rpm/brp-scl-compress '%{_scl_root}'
/var/tmp/rpm-tmp.uQBlOW: line 59: /usr/lib/rpm/brp-scl-compress: No such 
file or directory
error: Bad exit status from /var/tmp/rpm-tmp.uQBlOW (%install)
     Bad exit status from /var/tmp/rpm-tmp.uQBlOW (%install)

Looks like that should come from scl-utils-build...

     Alan Robertson <alanr at unix.sh> - @OSSAlanR

"Openness is the foundation and preservative of friendship...  Let me claim from you at all times your undisguised opinions." - William Wilberforce

More information about the SCLorg mailing list