Bug 29919 - mono-find-provider/requires scripts always fail with Mono 4.0.1 RPMs
Summary: mono-find-provider/requires scripts always fail with Mono 4.0.1 RPMs
Status: NEW
Alias: None
Product: Installers
Classification: Mono
Component: Linux packages ()
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Duncan Mak
URL:
Depends on:
Blocks:
 
Reported: 2015-05-11 01:28 UTC by Matt Z
Modified: 2017-05-16 21:03 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 29919 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
NEW

Description Matt Z 2015-05-11 01:28:39 UTC
As of Mono 4.0.1, the mono-find-provider/requires scripts always fail since they test for the existence of $libdir/libmono-2.0.so.1, which is no longer installed by the official RPMs. The file libmono-2.0.so does exist (as a symlink to libmonoboehm-2.0.so).

Related: I wonder why this check is present at all in these scripts, as no executable is ran from the scripts that makes use of that library from what I can tell. If the library check is necessary, shouldn't these scripts be included in the appropriate RPM package that ensures the library is installed? Installing mono-core and mono-develop installs these scripts, but doesn't install the necessary dependent package (libmono-2_0-1) that would allow these scripts to work (once the original issue above is fixed)
Comment 1 Matt Z 2015-05-11 02:20:53 UTC
The spec file looks like it's wants to create libmono-2.0.so.1:
https://github.com/directhex/xamarin-mono/blob/centos/mono-core.spec#L381

But I just verified that if I install just the libmono-2_0-1 package, nothing is installed.

If I install libmono-2_0-devel package, then I see the following in /usr/lib64:

lrwxrwxrwx. 1 root root       19 May 11 00:17 /usr/lib64/libmono-2.0.so -> libmonoboehm-2.0.so
lrwxrwxrwx. 1 root root       25 May 11 00:17 /usr/lib64/libmonoboehm-2.0.so -> libmonoboehm-2.0.so.1.0.0
lrwxrwxrwx. 1 root root       25 May 11 00:17 /usr/lib64/libmonoboehm-2.0.so.1 -> libmonoboehm-2.0.so.1.0.0
-rwxr-xr-x. 1 root root 13498339 May  6 16:31 /usr/lib64/libmonoboehm-2.0.so.1.0.0
Comment 2 Jo Shields 2015-05-11 07:06:26 UTC
RPM is weird.

bash-4.2# rpm -qpl libmono-2_0-1-4.0.1-2.x86_64.rpm 
/usr/lib64/libmono-2.0.so.1
/usr/lib64/libmono-2.0.so.1.0.0
bash-4.2# rpm -ql libmono-2_0-1
/usr/lib64/libmono-2.0.so.1
/usr/lib64/libmono-2.0.so.1.0.0
bash-4.2# ls /usr/lib64/libmono-2.0.so.1
ls: cannot access /usr/lib64/libmono-2.0.so.1: No such file or directory
Comment 3 Jo Shields 2015-05-11 07:17:32 UTC
As to mono-find-*, those scripts are so fundamentally broken in so many ways... but I can't go making radical changes in ways that would break Fedora/SUSE compatibility without speaking to the distro maintainers. If you have bright ideas on improving those scripts, send a pull request and chances are anything half-sane will get accepted.
Comment 4 Jo Shields 2015-05-11 08:26:37 UTC
I've just pushed a slightly less buggy RPM.
Comment 5 Matt Z 2015-05-11 17:06:17 UTC
The current scripts seem fairly straight-forward to me. What kinds of changes are you looking for? I might have time to make the changes.
Comment 6 Jo Shields 2015-05-11 19:04:28 UTC
The biggest problem by far is the Mono metadata dependency/provides isn't restricted to the GAC. So for example, if MonoDevelop bundles its own NUnit in /usr/lib/monodevelop/addins/NUnit, a preocprovides: mono(NUnit)=2.6.3.0 gets added to monodevelop.rpm, even though thatthat install location is private. This even causes RPMs to satisfy their own dependencies, eg the monodevelop/NUnit case.

The Debian dependency generators know which packages contain which public (ie GAC) assemblies, and either add a dependency on the relevant package or throw a fatal error during the build for any unknown and unresolvable assembly references. This process also tracks across dllmaps into unmanaged libs.