Control: tag -1 moreinfo On 27/06/2021 22.06, Paul Gevers wrote:
Noted. Am I correct that the other issues you found and mention below were only found after you tried to fix this issue? In other words, if we leave this (RC buggy) hack in bullseye that the other bugs do not appear? I'm really, really wondering if at this stage of the release we shouldn't just leave this bug in, instead of rushing (albeit piuparts tested) solutions in. Maybe it's best to fix this early in bookworm?
I have no results at hand for unpatched mono on buster->bullseye because all the tests get skipped for a failed dependency. I do have a failure for unpatched mono on stretch->buster->bullseye on the buster->bullseye part that seems to create a slightly more complex mono + *-cil installation without triggering the conffile mishandling error. (I see no mono related failures on stretch->buster->(bullseye + patched mono).) Among other errors there is Setting up libglib2.0-cil (2.12.40-3) ...Unhandled Exception:
System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: /usr/lib/../lib/libmono-system-native.so assembly:<unknown assembly> type:<unknown type> member:(null) at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag() at Interop+Sys..cctor () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 --- End of inner exception stack trace --- at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x0000f] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 at System.IO.File.Exists (System.String path) [0x00058] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00031] in <3a4d36ecef0a47439a72108fe400486f>:0 at Mono.Tools.Driver.Main (System.String[] args) [0x00347] in <3a4d36ecef0a47439a72108fe400486f>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: /usr/lib/../lib/libmono-system-native.so assembly:<unknown assembly> type:<unknown type> member:(null ) at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag() at Interop+Sys..cctor () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 --- End of inner exception stack trace --- at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x0000f] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 at System.IO.File.Exists (System.String path) [0x00058] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00031] in <3a4d36ecef0a47439a72108fe400486f>:0 at Mono.Tools.Driver.Main (System.String[] args) [0x00347] in <3a4d36ecef0a47439a72108fe400486f>:0 E: installing Assembly /usr/share/cli-common/policies.d/libglib2.0-cil/policy.2.10.glib-sharp.dll failed E: Installation of policy.2.10.glib-sharp with /usr/share/cli-common/runtimes.d/mono failed dpkg: error processing package libglib2.0-cil (--configure): installed libglib2.0-cil package post-installation script subprocess returned error exit status 1 At the time of the failure mono-gac (the conffile mishandler) is not configured, yet. I'm sure this could be reproduced in plain buster->bullseye using the right package set. Attached is also the latest version of my proposed patch, I'm trying to upload this to experimental/NEW tonight. Andreas
Attachment:
mono.unpatched.log.gz
Description: application/gzip
diff -Nru mono-6.8.0.105+dfsg/debian/changelog mono-6.8.0.105+dfsg/debian/changelog --- mono-6.8.0.105+dfsg/debian/changelog 2020-04-08 15:11:12.000000000 +0200 +++ mono-6.8.0.105+dfsg/debian/changelog 2021-03-31 13:38:34.000000000 +0200 @@ -1,3 +1,25 @@ +mono (6.8.0.105+dfsg-4) UNRELEASED; urgency=medium + + * mono-gac: Add Pre-Depends: mono-runtime-common (>= 5.20) and stop messing + with /etc/mono/config manually. gacutil is used from hooks called by + maintainer scripts and must stay functional even if unpacked and not yet + configured. (Closes: #985066) + * Move mono-gac dependency from mono-runtime-common to mono-runtime-sgen and + mono-runtime-boehm to avoid introducing a new dependency cycle. + * libmono-system4.0-cil, libmono-system-configuration4.0-cil: Drop + mono-runtime dependency, all their rdepends also depend on + libmono-corlib4.5-cil which already has the mono-runtime dependency. + * Move the actual library from libmono-corlib4.5-cil to + libmono-corlib4.5-dll and redirect the circular libmono-*-cil + dependencies there to break the dependency cycle between mono-runtime and + libmono-*-cil. (Closes: #940301, #528090, #656895, #986275, #986293) + * Move 'cli' binfmt registration to mono-runtime which ships the files. + * mono-mcs: Clean up obsolete alternatives. (Closes: #801789) + * Ship /etc/mono/registry/LocalMachine/. + * Clean up empty /usr/lib/mono/aot-cache/${MONOARCH}/. + + -- Andreas Beckmann <anbe@debian.org> Wed, 31 Mar 2021 13:38:34 +0200 + mono (6.8.0.105+dfsg-3) unstable; urgency=high * [2501df4] Workaround for gacutil System.Native mapping dependency diff -Nru mono-6.8.0.105+dfsg/debian/control mono-6.8.0.105+dfsg/debian/control --- mono-6.8.0.105+dfsg/debian/control 2020-02-25 22:34:26.000000000 +0100 +++ mono-6.8.0.105+dfsg/debian/control 2021-03-31 13:38:34.000000000 +0200 @@ -36,11 +36,9 @@ mono-2.0-runtime (<< 2.4), mono-runtime (<< 3.2.1) Suggests: xdg-utils | libgnome2-0 | konqueror -Recommends: binfmt-support (>= 1.1.2) Depends: ${shlibs:Depends}, ${misc:Depends}, binutils, - mono-gac (= ${source:Version}) Description: Mono runtime - common files Mono is a platform for running and developing applications based on the ECMA/ISO Standards. Mono is an open source effort led by Xamarin. @@ -59,6 +57,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, mono-runtime-sgen (= ${binary:Version}) +Recommends: binfmt-support (>= 1.1.2) Description: Mono runtime - default version Mono is a platform for running and developing applications based on the ECMA/ISO Standards. Mono is an open source effort led by Xamarin. @@ -78,6 +77,7 @@ Architecture: amd64 armel arm64 armhf i386 mipsel kfreebsd-amd64 kfreebsd-i386 powerpc ppc64 ppc64el s390x Depends: ${shlibs:Depends}, ${misc:Depends}, + mono-gac (= ${source:Version}), mono-runtime-common (= ${binary:Version}) Homepage: http://www.mono-project.com/Compacting_GC Description: Mono runtime - SGen @@ -100,6 +100,7 @@ Architecture: amd64 armel armhf i386 mipsel kfreebsd-amd64 kfreebsd-i386 powerpc ppc64 ppc64el s390x Depends: ${shlibs:Depends}, ${misc:Depends}, + mono-gac (= ${source:Version}), mono-runtime-common (= ${binary:Version}) Description: Mono runtime - Boehm Mono is a platform for running and developing applications based on the @@ -663,7 +664,8 @@ Package: libmono-corlib4.5-cil Architecture: all -Depends: ${misc:Depends}, tzdata, +Depends: ${misc:Depends}, + libmono-corlib4.5-dll (= ${source:Version}), mono-runtime (>= ${mono:upversion}), mono-runtime (<< ${mono:next-upversion}) Recommends: libmono-i18n-west4.0-cil Suggests: libmono-i18n4.0-all @@ -682,6 +684,26 @@ US-ASCII, ISO 8859-1 (Latin 1) and UTF-8 users don't need any extra I18N packages. +Package: libmono-corlib4.5-dll +Architecture: all +Depends: ${misc:Depends}, tzdata, +Breaks: libmono-corlib4.5-cil (<< 6.8.0.105+dfsg-3.1~) +Replaces: libmono-corlib4.5-cil (<< 6.8.0.105+dfsg-3.1~) +Description: Mono core library (for CLI 4.5) + Mono is a platform for running and developing applications based on the + ECMA/ISO Standards. Mono is an open source effort led by Xamarin. + Mono provides a complete CLR (Common Language Runtime) including compiler and + runtime, which can produce and execute CIL (Common Intermediate Language) + bytecode (aka assemblies), and a class library. + . + This package contains the Core Library (mscorlib.dll) of Mono for CLI 4.5, + which is the glue between the BCL (Base Class Libraries) and the JIT. + . + You should install libmono-i18n-west4.0-cil if you are using + ISO 8859-15 (Latin 9) or other common Western European code pages. + US-ASCII, ISO 8859-1 (Latin 1) and UTF-8 users don't need any extra I18N + packages. + Package: libmono-i18n4.0-all Architecture: all Depends: ${misc:Depends}, @@ -802,7 +824,7 @@ Recommends: ca-certificates-mono (= ${source:Version}) Depends: ${misc:Depends}, ${cli:Depends}, - mono-runtime (>= ${mono:upversion}), mono-runtime (<< ${mono:next-upversion}) +# mono-runtime (>= ${mono:upversion}), mono-runtime (<< ${mono:next-upversion}) Description: Mono System libraries (for CLI 4.0) Mono is a platform for running and developing applications based on the ECMA/ISO Standards. Mono is an open source effort led by Xamarin. @@ -844,7 +866,7 @@ Architecture: all Depends: ${misc:Depends}, ${cli:Depends}, - mono-runtime (>= ${mono:upversion}), mono-runtime (<< ${mono:next-upversion}) +# mono-runtime (>= ${mono:upversion}), mono-runtime (<< ${mono:next-upversion}) Description: Mono System.Configuration library (for CLI 4.0) Mono is a platform for running and developing applications based on the ECMA/ISO Standards. Mono is an open source effort led by Xamarin. @@ -2970,6 +2992,7 @@ Package: mono-gac Architecture: all +Pre-Depends: mono-runtime-common (>= 5.20), Depends: ${misc:Depends}, mono-4.0-gac (= ${source:Version}) Provides: global-assembly-cache-tool diff -Nru mono-6.8.0.105+dfsg/debian/mono-gac.postinst mono-6.8.0.105+dfsg/debian/mono-gac.postinst --- mono-6.8.0.105+dfsg/debian/mono-gac.postinst 2020-02-25 20:06:42.000000000 +0100 +++ mono-6.8.0.105+dfsg/debian/mono-gac.postinst 2021-03-31 13:38:31.000000000 +0200 @@ -1,10 +1,5 @@ #!/bin/sh -e -# Work around for gacutil needing /etc/mono/config >= 5.20 -if [ -e /etc/mono/config.dpkg-new ]; then - mv /etc/mono/config.dpkg-new /etc/mono/config -fi - # On upgrades we need to repopulate the GAC and framework paths # to accomodate any changes in layout # diff -Nru mono-6.8.0.105+dfsg/debian/mono-mcs.postinst mono-6.8.0.105+dfsg/debian/mono-mcs.postinst --- mono-6.8.0.105+dfsg/debian/mono-mcs.postinst 1970-01-01 01:00:00.000000000 +0100 +++ mono-6.8.0.105+dfsg/debian/mono-mcs.postinst 2021-03-31 13:38:34.000000000 +0200 @@ -0,0 +1,9 @@ +#!/bin/sh +set -e + +if [ "$1" = "configure" ]; then + # clean up obsolete alternatives, can be removed after bullseye + update-alternatives --remove c-sharp-compiler /usr/bin/mcs +fi + +#DEBHELPER# diff -Nru mono-6.8.0.105+dfsg/debian/mono-runtime-common.dirs mono-6.8.0.105+dfsg/debian/mono-runtime-common.dirs --- mono-6.8.0.105+dfsg/debian/mono-runtime-common.dirs 2020-02-25 20:06:42.000000000 +0100 +++ mono-6.8.0.105+dfsg/debian/mono-runtime-common.dirs 2021-03-31 13:38:34.000000000 +0200 @@ -1,2 +1,2 @@ -usr/share/binfmts +etc/mono/registry/LocalMachine usr/share/dotnet diff -Nru mono-6.8.0.105+dfsg/debian/mono-runtime-common.postinst mono-6.8.0.105+dfsg/debian/mono-runtime-common.postinst --- mono-6.8.0.105+dfsg/debian/mono-runtime-common.postinst 2020-02-25 20:06:42.000000000 +0100 +++ mono-6.8.0.105+dfsg/debian/mono-runtime-common.postinst 2021-03-31 13:38:34.000000000 +0200 @@ -1,8 +1,5 @@ -#!/bin/sh -e - -if [ configure = "$1" ] && [ -x /usr/sbin/update-binfmts ]; then - update-binfmts --import cli -fi +#!/bin/sh +set -e if [ configure = "$1" ] && [ -d /usr/share/dotnet/mono/ ] && [ -L /usr/share/dotnet/mono ]; then # it's a symlink @@ -13,5 +10,4 @@ ldconfig fi -mkdir -p /etc/mono/registry/LocalMachine/ #DEBHELPER# diff -Nru mono-6.8.0.105+dfsg/debian/mono-runtime-common.prerm mono-6.8.0.105+dfsg/debian/mono-runtime-common.prerm --- mono-6.8.0.105+dfsg/debian/mono-runtime-common.prerm 2020-02-25 20:06:42.000000000 +0100 +++ mono-6.8.0.105+dfsg/debian/mono-runtime-common.prerm 2021-03-31 13:38:34.000000000 +0200 @@ -1,7 +1,3 @@ #!/bin/sh -e -if [ "$1" = remove ] && [ -x /usr/sbin/update-binfmts ]; then - update-binfmts --package mono-runtime --remove cli /usr/bin/cli -fi - #DEBHELPER# diff -Nru mono-6.8.0.105+dfsg/debian/mono-runtime.postinst mono-6.8.0.105+dfsg/debian/mono-runtime.postinst --- mono-6.8.0.105+dfsg/debian/mono-runtime.postinst 2020-02-25 20:06:42.000000000 +0100 +++ mono-6.8.0.105+dfsg/debian/mono-runtime.postinst 2021-03-31 13:38:34.000000000 +0200 @@ -1,7 +1,12 @@ -#!/bin/sh -e +#!/bin/sh +set -e update-alternatives \ --install /usr/bin/cli cli /usr/bin/mono 10 \ --slave /usr/share/man/man1/cli.1.gz cli.1.gz /usr/share/man/man1/mono.1.gz +if [ configure = "$1" ] && [ -x /usr/sbin/update-binfmts ]; then + update-binfmts --import cli +fi + #DEBHELPER# diff -Nru mono-6.8.0.105+dfsg/debian/mono-runtime.prerm mono-6.8.0.105+dfsg/debian/mono-runtime.prerm --- mono-6.8.0.105+dfsg/debian/mono-runtime.prerm 2020-02-25 20:06:42.000000000 +0100 +++ mono-6.8.0.105+dfsg/debian/mono-runtime.prerm 2021-03-31 13:38:34.000000000 +0200 @@ -1,4 +1,9 @@ -#!/bin/sh -e +#!/bin/sh +set -e + +if [ "$1" = remove ] && [ -x /usr/sbin/update-binfmts ]; then + update-binfmts --package mono-runtime --remove cli /usr/bin/cli +fi if [ "$1" = remove ]; then update-alternatives --remove cli /usr/bin/mono diff -Nru mono-6.8.0.105+dfsg/debian/prerm-monoaot mono-6.8.0.105+dfsg/debian/prerm-monoaot --- mono-6.8.0.105+dfsg/debian/prerm-monoaot 2020-02-25 20:06:42.000000000 +0100 +++ mono-6.8.0.105+dfsg/debian/prerm-monoaot 2021-03-31 13:38:34.000000000 +0200 @@ -1 +1,4 @@ -rm -f /usr/lib/mono/aot-cache/`mono --version | grep Architecture | sed 's/.*: //' | sed 's/el,.*//'`/`basename #FILE#` +MONOARCH=`mono --version | grep Architecture | sed 's/.*: //' | sed 's/el,.*//'` +rm -f /usr/lib/mono/aot-cache/${MONOARCH}/`basename #FILE#` +test ! -d /usr/lib/mono/aot-cache/${MONOARCH} || rmdir --ignore-fail-on-non-empty /usr/lib/mono/aot-cache/${MONOARCH} +test ! -d /usr/lib/mono/aot-cache || rmdir --ignore-fail-on-non-empty /usr/lib/mono/aot-cache diff -Nru mono-6.8.0.105+dfsg/debian/rules mono-6.8.0.105+dfsg/debian/rules --- mono-6.8.0.105+dfsg/debian/rules 2020-02-25 20:06:42.000000000 +0100 +++ mono-6.8.0.105+dfsg/debian/rules 2021-03-31 13:38:34.000000000 +0200 @@ -371,6 +371,21 @@ #DH_VERBOSE=1 debian/dh_clideps -i -l debian/tmp $(DH_INTERNAL_MONO_PARAM) # mono-1.0/2.0-gac needs special runtime dep, to prevent circular dep (mono-runtime <-> mono-1.0/2.0-gac) debian/dh_clideps -p mono-4.0-gac -r $(DH_INTERNAL_MONO_PARAM) + # HACK to break the dependency cycle between runtime and libmono* + debian/dh_clideps -p libmono-system4.0-cil -r $(DH_INTERNAL_MONO_PARAM) + sed -r -i '/cli:Depends/s/mono-runtime \([^,]*\)//' debian/libmono-system4.0-cil.substvars + debian/dh_clideps -p libmono-system-core4.0-cil -r $(DH_INTERNAL_MONO_PARAM) + mv debian/libmono-corlib4.5-cil/usr/lib debian/libmono-corlib4.5-dll/usr/ + mv debian/libmono-corlib4.5-cil/DEBIAN/clilibs debian/libmono-corlib4.5-dll/DEBIAN/ + sed -i s/libmono-corlib4.5-cil/libmono-corlib4.5-dll/ \ + debian/libmono-system4.0-cil.substvars \ + debian/libmono-system-configuration4.0-cil.substvars \ + debian/libmono-system-core4.0-cil.substvars \ + debian/libmono-system-numerics4.0-cil.substvars \ + debian/libmono-system-security4.0-cil.substvars \ + debian/libmono-system-xml4.0-cil.substvars \ + debian/libmono-security4.0-cil.substvars \ + debian/mono-4.0-gac.substvars dh_gencontrol -i -- -Vmono:upversion=$(UPVERSION) -Vmono:next-upversion=$(NEXT_UPVERSION) dh_md5sums -i dh_builddeb -i