Re: Automatically generating needed requires for julia

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 01/12/2016 09:58 AM, Mikolaj Izdebski wrote:
On 01/11/2016 11:48 PM, Orion Poplawski wrote:
The julia language loads libraries at run time by using the .so filename.  We
work around this in the julia package by symlinking the needed sonames into
%{_libdir}/julia/, e.g.:

for lib in arpack cholmod dSFMT git2 fftw3_threads gmp mprf openlibm
openspecfun pcr2-8 umfpack
do
   soname=$(objdump -p %{_libdir}/lib${lib}.so | awk '$1 == "SONAME" { print $2}')
   ln -s ../${soname} %{buildroot}%{_libdir}/julia/lib${lib}.so
done

Now we want to automatically generate the needed rpm requires, e.g.:

libarpack.so.2()(64bit)

What I came up with is a rpm-julia-hooks package that julia would BR that
would use rpm fileattrs to generate these.  This feels a bit klunky having a
separate package just to do this task.

Does anyone else have any ideas?

Looks like you are trying to use a custom dependency generator in
addition to internal one. If it's for use in a single package then the
following solution should work:

   %global _use_internal_dependency_generator 0
   %global __find_requires %{SOURCE666} %{_rpmconfigdir}/find-requires
   Source666: %{name}-find-requires.sh

Where julia-find-requires.sh should be a script that generates custom
requires (prints them to stdout) and then calls internal RPM dependency
generator (passed as $1).

Please dont. Disabling internal dependency generator is a trick from last decade which has unwanted side-effects and basically should never be needed or used these days.

Generally speaking putting the fileattrs into a package of their own is the right thing to do, but can indeed be a bit klunky if its for a single package only.

I wouldn't necessarily recommend this, but you *can* wrap just the ELF dependency generator similarly to the above global find-requires trick, eg

Source111: julia-requires.sh
%global __elf_requires %{SOURCE111}

...and then in julia-requires.sh, call the normal elfdeps generator (for added bonus, save the original %__elf_requires macro someplace and use that) and in addition do your own thing for files in %{_libdir}/julia/.

	- Panu -
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
http://lists.fedoraproject.org/admin/lists/devel@xxxxxxxxxxxxxxxxxxxxxxx



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux