User:Chkr/MonoMultiarchChanges

From FedoraProject

< User:Chkr(Difference between revisions)
Jump to: navigation, search
m
Line 24: Line 24:
  
 
== Detailed Description ==
 
== Detailed Description ==
The way how mono is packaged in Fedora is uncommon with respect to mono's default search paths. In order to provide multi-arch support (32-bit and 64-bit run-time could be both installed on x86_64 systems), the standard mono's libdir /usr/lib was changed to %{_libdir}. This causes lots of unnecessary work by the maintainers and quite a couple of bug reports due to uncaught uses of these default paths within the mono packages. Solving this issue would include to loose the ability to use 32bit parts of the mono stack in x86-64 - a feature which never worked correctly and is not available for other perl or python either.
+
The way how mono is packaged in Fedora is uncommon with respect to mono's default search paths. In order to provide multi-arch support (32-bit and 64-bit run-time could be both installed on x86_64 systems), the standard mono's libdir /usr/lib was changed to %{_libdir}. This causes lots of unnecessary work by the maintainers and quite a couple of bug reports due to uncaught uses of these default paths within the mono packages.  
 +
Reverting this decision and using again mono's standard search path /usr/lib would result in conflicts between i686 and x86_64 packages because both would contain the same files (possibly with different content). That means, that we would have to prevent that any mono i686 package would be drawn into the x86_64 repos and so we would loose the ability to use 32bit parts of the mono stack in x86-64 - a feature which never worked correctly and is not available for other run-time environments like perl or python either.
  
 
== Benefit to Fedora ==
 
== Benefit to Fedora ==
 
<!-- What is the benefit to the platform?  If this is a major capability update, what has changed?  If this is a new feature, what capabilities does it bring? Why will Fedora become a better distribution or project because of this feature?-->
 
<!-- What is the benefit to the platform?  If this is a major capability update, what has changed?  If this is a new feature, what capabilities does it bring? Why will Fedora become a better distribution or project because of this feature?-->
This requires the maintainers to add lots of patches or "sed" constructs into the spec file in order to make all mono-based packages aware of this. All of these changes can't be upstreamed because they are contrary to the idea how mono should be located in the file system.
+
Keeping the multi-arch support (and so changing mono's default search path to %{_libdir}) requires the maintainers to add lots of patches or "sed" constructs into the spec file in order to make all mono-based packages aware of this. All of these changes can't be upstreamed because they are contrary to upstream's idea how mono should be located in the file system.
  
 
== Scope ==
 
== Scope ==
 
<!-- What work do the developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
 
<!-- What work do the developers have to accomplish to complete the feature in time for release?  Is it a large change affecting many parts of the distribution or is it a very isolated change? What are those changes?-->
All mono-based packages most be re-compiled. <pre>repoquery --whatrequires mono(System)</pre> reports 114 packages which may be 50 separate source packages.
+
The Fedora-specific %{_libdir} patches more be removed from all mono-based packages and the have to be be re-compiled. <pre>repoquery --whatrequires mono(System)</pre> reports 114 packages which may be 50 separate source packages. Additionally rel-eng must change the mash scripts to prevent that any mono-based packages are drawn into the x86_64 repository.
  
 
== How To Test ==
 
== How To Test ==
Line 48: Line 49:
 
3. What are the expected results of those actions?
 
3. What are the expected results of those actions?
 
-->
 
-->
# install any mono-based package you like to use (preferably for x86 and x86-64)
+
# install any mono-based package you like to use (preferably on x86 and on x86-64 systems)
 
# try whether it still works correctly
 
# try whether it still works correctly
  
Line 54: Line 55:
 
<!-- If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice. -->
 
<!-- If this feature is noticeable by its target audience, how will their experiences change as a result?  Describe what they will see or notice. -->
 
# Most user won't recognize it.
 
# Most user won't recognize it.
# There may be some users who used the 32-bit mono core packagesin x86-64. These packages will not be available anymore.
+
# There may be some users who used the 32-bit mono core packages in x86-64. These packages will not be available anymore.
  
 
== Dependencies ==
 
== Dependencies ==
Line 63: Line 64:
 
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "None necessary, revert to previous release behaviour."  Or it might not.  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
 
<!-- If you cannot complete your feature by the final development freeze, what is the backup plan?  This might be as simple as "None necessary, revert to previous release behaviour."  Or it might not.  If you feature is not completed in time we want to assure others that other parts of Fedora will not be in jeopardy.  -->
 
# do the recompilation of all packages using a special build-target to check whether it works correctly
 
# do the recompilation of all packages using a special build-target to check whether it works correctly
# don't remove the patches for the packages from the CVS yet
+
# in case it turns out that the migration can't be done, the git commits of the modified mono-based packages must be reverted
# in case it turns out that the migration can't be done, the spec files of the modified mono-based packages must be reverted
+
# since no builds where done for dist-rawhide, no rebuilds are necessary in that case
# since no builds where done for dist-rawhide, no rebuilds are necessary
+
  
 
== Documentation ==
 
== Documentation ==
Line 127: Line 127:
 
* blacklist all mono packages from mash's "multi-arch" selection rule which pulls in 32bit packages into x86-64
 
* blacklist all mono packages from mash's "multi-arch" selection rule which pulls in 32bit packages into x86-64
 
* these rules follow the same ideas as used by the python packages (in Fedora) and the mono packages in OpenSUSE
 
* these rules follow the same ideas as used by the python packages (in Fedora) and the mono packages in OpenSUSE
 +
* like OpenSUSE we may also change all mono packages which only contain mono binaries and no ELF binaries to noarch
  
 
== Release Notes ==
 
== Release Notes ==
 
<!-- The Fedora Release Notes inform end-users about what is new in the release.  Examples of past release notes are here: http://docs.fedoraproject.org/release-notes/ -->
 
<!-- The Fedora Release Notes inform end-users about what is new in the release.  Examples of past release notes are here: http://docs.fedoraproject.org/release-notes/ -->
 
<!-- The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the documentation team and shipped with the release. -->
 
<!-- The release notes also help users know how to deal with platform changes such as ABIs/APIs, configuration or data file formats, or upgrade concerns.  If there are any such changes involved in this feature, indicate them here.  You can also link to upstream documentation if it satisfies this need.  This information forms the basis of the release notes edited by the documentation team and shipped with the release. -->
* no necessary
+
* no specific release notes necessary
  
 
== Comments and Discussion ==
 
== Comments and Discussion ==

Revision as of 19:45, 2 May 2011


Contents

Mono Multiarch Changes

Summary

Remove the multiarch support for mono on x86-64 systems.

Owner

  • Email: chkr@fedoraproject.org

Current status

  • Targeted release: Fedora 16
  • Last updated: (DATE)
  • Percentage of completion: 00%


Detailed Description

The way how mono is packaged in Fedora is uncommon with respect to mono's default search paths. In order to provide multi-arch support (32-bit and 64-bit run-time could be both installed on x86_64 systems), the standard mono's libdir /usr/lib was changed to %{_libdir}. This causes lots of unnecessary work by the maintainers and quite a couple of bug reports due to uncaught uses of these default paths within the mono packages. Reverting this decision and using again mono's standard search path /usr/lib would result in conflicts between i686 and x86_64 packages because both would contain the same files (possibly with different content). That means, that we would have to prevent that any mono i686 package would be drawn into the x86_64 repos and so we would loose the ability to use 32bit parts of the mono stack in x86-64 - a feature which never worked correctly and is not available for other run-time environments like perl or python either.

Benefit to Fedora

Keeping the multi-arch support (and so changing mono's default search path to %{_libdir}) requires the maintainers to add lots of patches or "sed" constructs into the spec file in order to make all mono-based packages aware of this. All of these changes can't be upstreamed because they are contrary to upstream's idea how mono should be located in the file system.

Scope

The Fedora-specific %{_libdir} patches more be removed from all mono-based packages and the have to be be re-compiled.
repoquery --whatrequires mono(System)
reports 114 packages which may be 50 separate source packages. Additionally rel-eng must change the mash scripts to prevent that any mono-based packages are drawn into the x86_64 repository.

How To Test

  1. install any mono-based package you like to use (preferably on x86 and on x86-64 systems)
  2. try whether it still works correctly

User Experience

  1. Most user won't recognize it.
  2. There may be some users who used the 32-bit mono core packages in x86-64. These packages will not be available anymore.

Dependencies

  • the "mash" tool to generate the x86-64 repositories must blacklist all -devel RPMS of the mono-based packages

Contingency Plan

  1. do the recompilation of all packages using a special build-target to check whether it works correctly
  2. in case it turns out that the migration can't be done, the git commits of the modified mono-based packages must be reverted
  3. since no builds where done for dist-rawhide, no rebuilds are necessary in that case

Documentation

Existing issue

  • example from monodevelop.spec:

sed -i -e 's!$(prefix)/lib/!%{_libdir}/!' \
    -e 's!${exec_prefix}/lib!%{_libdir}!' configure
sed -i -e 's!/lib/monodevelop!/%{_lib}/monodevelop!' monodevelop
sed -i -e 's!$PREFIX/lib/!%{_libdir}/!' mdtool.in
sed -i -e 's!monodevelop}/lib/!monodevelop}/%{_lib}/!' monodevelop.in

find . -name '*.cs' -and \
     ! \( -name 'GNUCompiler.cs' -or -name 'CProjectConfiguration.cs' \) \
      | while read f ;
        do
        sed -i -e 's!"lib"!"%{_lib}"!' "$f" 1>/dev/null
        done

find . -name Makefile.in -or -name \*.pc.in \
       -or -name \*.in -or -name \*.xml \
       | while read f ;
         do
           sed -i -e 's!$(prefix)/lib/!%{_libdir}/!' \
               -e 's!@prefix@/lib/!%{_libdir}/!' \
               -e 's!/usr/lib/!%{_libdir}/!' \
               -e 's!${exec_prefix}/lib/!%{_libdir}/!' "$f" 1>/dev/null
         done
  • another example from mono-basic.spec
%prep
%setup -q
sed -i -e 's!@libdir@!%{_libdir}!' %{PATCH0}
%patch0 -p1 -b .original
sed -i -e 's!%{_libdir}!@libdir@!' %{PATCH0}
sed -i -e 's!$(prefix)/lib/!%{_libdir}/!' build/config-default.make
sed -i -e 's!${exec_prefix}/lib!%{_libdir}!' configure

Idea

  • mono-based packages may contain mono assemblies ("nearly arch-independent") and ELF binaries (e.g. glue code etc., arch-dependent)
  • the assemblies are usually put in the GAC, mono's "global assembly cache"
  • the arch-dependent files are correctly copied into %{_libdir}
  • upstream places the gac into /usr/lib (/usr/lib/mono/gac)
    • Fedora moves the GAC into /usr/lib64
    • this is the source of all the packaging pain - most mono packages have this path hard-coded
    • move the GAC back to /usr/lib
    • ability to install 32-bit mono runtime and 64-bit mono runtime gets lost (most likely no use case)


Necessary Changes

  • general rule: remove all patches in the mono-based packages which deals with altering the lib path
    • ensure, that mono assemblies are either
      • correctly installed into the gac in /usr/lib or
      • installed into %{_libdir}/progam (packages which contain ELF libraries) or
      • installed into /usr/lib/program (packages which contain only mono assemblies)
    • ensure, that ELF binaries are correctly installed into %{_libdir}
  • blacklist all mono packages from mash's "multi-arch" selection rule which pulls in 32bit packages into x86-64
  • these rules follow the same ideas as used by the python packages (in Fedora) and the mono packages in OpenSUSE
  • like OpenSUSE we may also change all mono packages which only contain mono binaries and no ELF binaries to noarch

Release Notes

  • no specific release notes necessary

Comments and Discussion