Issue
I am having some problems in building a software collections metapackage under fedora 20 or 21. It works ok under RHEL7/RHEL6/Fedora19. I get the same error if I just copy the example on the software collections website (https://www.softwarecollections.org/en/docs/guide/#sect-Creating_a_Meta_Package)
The error I get is (assuming my scl is named 'myscl')
error: File not found: /home/user/rpmbuild/BUILDROOT/myscl-1-1.fc21.x86_64/opt/rh/myscl/myscl
It looks like the software collection name is getting repeated for some reason.
As I say this works fine on RHEL7, where the scl-utils* packages are older.
Any advice would be greatly appreciated.
Solution
with scl-utils-2.0 is it possible only to build new type of collections.
Instead of using following structure in your metapackage specfile
cat >> %{buildroot}%{_scl_scripts}/enable << EOF
export PATH=%{_bindir}\${PATH:+:\${PATH}}
export LD_LIBRARY_PATH=%{_libdir}\${LD_LIBRARY_PATH:+:\${LD_LIBRARY_PATH}}
export MANPATH=%{_mandir}:\$MANPATH
export PKG_CONFIG_PATH=%{_libdir}/pkgconfig\${PKG_CONFIG_PATH:+:\${PKG_CONFIG_PATH}}
EOF
you should use
cat >> %{buildroot}%{_scl_scripts}/%{scl} << EOF
#Module1.0
prepend-path X_SCLS %{scl}
prepend-path PATH %{_bindir}
prepend-path LD_LIBRARY_PATH %{_libdir}
prepend-path MANPATH %{_mandir}
prepend-path PKG_CONFIG_PATH %{_libdir}/pkgconfig
EOF
#automaticaly create enable script for compatibility
%scl_enable_script
See
https://bugzilla.redhat.com/show_bug.cgi?id=1188862
https://bugzilla.redhat.com/show_bug.cgi?id=1180638
Answered By - rkuska