On 28/06/2021 21.38, Paul Gevers wrote:
Attached is also the latest version of my proposed patch,
I'm trying to upload this to experimental/NEW tonight.
I've converted my patch to a series of commits:
https://salsa.debian.org/dotnet-team/mono/-/merge_requests/4
(there is also a signed tag in anbe/mono if it doesn't show up in the
merge request)
Building from git caused some additional changes to appear in the source
debdiff: debian/patches/debian-changes (header only) and debian/.gitignore
Final diff attached (I think I accidentally sent an older version
yesterday).
Uploaded, waiting in NEW, ftp-master pinged.
I've also verified that building libglib3.0-cil (src:gtk-sharp3) against
the patched mono still yields the same dependencies as before
(especially Depends: libmono-corlib4.5-cil (>> ...) ), so I don't expect
problems when rebuilding any other -cil package.
Andreas
PS: I'm happy to help if my changes cause unforeseen trouble ;-)
diff -Nru mono-6.8.0.105+dfsg/debian/.gitignore mono-6.8.0.105+dfsg/debian/.gitignore
--- mono-6.8.0.105+dfsg/debian/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ mono-6.8.0.105+dfsg/debian/.gitignore 2021-06-29 12:07:42.000000000 +0200
@@ -0,0 +1,8 @@
+tmp/
+patched/
+mono-*/
+monodoc-*/
+libmono*/
+files
+*.debhelper*
+*.substvars
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-06-29 12:07:42.000000000 +0200
@@ -1,3 +1,27 @@
+mono (6.8.0.105+dfsg-3.1) experimental; urgency=medium
+
+ * Non-maintainer upload.
+ * 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 'cli' binfmt registration to mono-runtime which ships the files.
+ * Ship /etc/mono/registry/LocalMachine/.
+ * Clean up empty /usr/lib/mono/aot-cache/${MONOARCH}/.
+ * mono-mcs: Clean up obsolete alternatives. (Closes: #801789)
+ * 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)
+ * Upload to experimental.
+
+ -- Andreas Beckmann <a...@debian.org> Tue, 29 Jun 2021 12:07:42 +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-06-29 12:07:42.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,25 @@
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.
+ .
+ This package contains only mscorlib.dll without a mono-runtime dependency
+ to avoid a dependency cycle between the mono core components. For all other
+ uses you should install libmono-corlib4.5-cil instead.
+
Package: libmono-i18n4.0-all
Architecture: all
Depends: ${misc:Depends},
@@ -802,7 +823,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 +865,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 +2991,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/detector/.gitignore mono-6.8.0.105+dfsg/debian/detector/.gitignore
--- mono-6.8.0.105+dfsg/debian/detector/.gitignore 1970-01-01 01:00:00.000000000 +0100
+++ mono-6.8.0.105+dfsg/debian/detector/.gitignore 2021-06-29 12:07:42.000000000 +0200
@@ -0,0 +1 @@
+binfmt-detector-cli
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-06-29 12:07:42.000000000 +0200
@@ -1,9 +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
+#!/bin/sh
+set -e
# 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-06-29 12:07:42.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-06-29 12:07:42.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-06-29 12:07:42.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 1970-01-01 01:00:00.000000000 +0100
@@ -1,7 +0,0 @@
-#!/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-06-29 12:07:42.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-06-29 12:07:42.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/patches/debian-changes mono-6.8.0.105+dfsg/debian/patches/debian-changes
--- mono-6.8.0.105+dfsg/debian/patches/debian-changes 2020-04-08 15:11:12.000000000 +0200
+++ mono-6.8.0.105+dfsg/debian/patches/debian-changes 2021-06-29 12:07:42.000000000 +0200
@@ -5,12 +5,35 @@
information below has been extracted from the changelog. Adjust it or drop
it.
.
- mono (6.8.0.105+dfsg-3) unstable; urgency=high
+ mono (6.8.0.105+dfsg-3.1) experimental; urgency=medium
.
- * [2501df4] Workaround for gacutil System.Native mapping dependency
- (Closes: #954635)
-Author: Jo Shields <joshi...@microsoft.com>
-Bug-Debian: https://bugs.debian.org/954635
+ * Non-maintainer upload.
+ * 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 'cli' binfmt registration to mono-runtime which ships the files.
+ * Ship /etc/mono/registry/LocalMachine/.
+ * Clean up empty /usr/lib/mono/aot-cache/${MONOARCH}/.
+ * mono-mcs: Clean up obsolete alternatives. (Closes: #801789)
+ * 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)
+ * Upload to experimental.
+Author: Andreas Beckmann <a...@debian.org>
+Bug-Debian: https://bugs.debian.org/528090
+Bug-Debian: https://bugs.debian.org/656895
+Bug-Debian: https://bugs.debian.org/801789
+Bug-Debian: https://bugs.debian.org/940301
+Bug-Debian: https://bugs.debian.org/985066
+Bug-Debian: https://bugs.debian.org/986275
+Bug-Debian: https://bugs.debian.org/986293
---
The information above should follow the Patch Tagging Guidelines, please
@@ -23,7 +46,7 @@
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
-Last-Update: 2020-04-08
+Last-Update: 2021-06-29
--- mono-6.8.0.105+dfsg.orig/Makefile.am
+++ mono-6.8.0.105+dfsg/Makefile.am
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-06-29 12:07:42.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-06-29 12:07:42.000000000 +0200
@@ -371,6 +371,22 @@
#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
+ # END HACK
dh_gencontrol -i -- -Vmono:upversion=$(UPVERSION) -Vmono:next-upversion=$(NEXT_UPVERSION)
dh_md5sums -i
dh_builddeb -i