Increased mono dependency from 5.4 to 5.18 for debian

This commit is contained in:
Taloth Saldono 2019-12-25 11:50:25 +01:00
parent 29cde083f9
commit ce0b7e1077
9 changed files with 76 additions and 51 deletions

View File

@ -7,8 +7,8 @@ Vcs-Git: git@github.com:Sonarr/Sonarr.git
Vcs-Browser: https://github.com/Sonarr/Sonarr Vcs-Browser: https://github.com/Sonarr/Sonarr
Build-Depends: debhelper (>= 9), Build-Depends: debhelper (>= 9),
dh-systemd (>= 1.5), dh-systemd (>= 1.5),
mono-devel (>= 5.4), mono-devel (>= 5.18),
libmono-cil-dev (>= 5.4), libmono-cil-dev (>= 5.18),
cli-common-dev (>= 0.9+xamarin5) cli-common-dev (>= 0.9+xamarin5)
Package: sonarr Package: sonarr
@ -16,7 +16,7 @@ Architecture: all
Provides: nzbdrone Provides: nzbdrone
Conflicts: nzbdrone Conflicts: nzbdrone
Replaces: nzbdrone Replaces: nzbdrone
Depends: adduser, libsqlite3-0 (>= 3.7), libmediainfo0v5 (>= 0.7.52) | libmediainfo0 (>= 0.7.52), mono-runtime (>= 5.4), ca-certificates-mono, libmono-system-net-http4.0-cil (>= 4.0.0~alpha1), ${cli:Depends}, ${misc:Depends} Depends: adduser, libsqlite3-0 (>= 3.7), libmediainfo0v5 (>= 0.7.52) | libmediainfo0 (>= 0.7.52), mono-runtime (>= 5.18), ca-certificates-mono, libmono-system-net-http4.0-cil (>= 4.0.0~alpha1), ${cli:Depends}, ${misc:Depends}
Recommends: libmediainfo0v5 (>= 18.03) | libmediainfo0 (>= 18.03) Recommends: libmediainfo0v5 (>= 18.03) | libmediainfo0 (>= 18.03)
Suggests: sqlite3 (>= 3.7), mediainfo (>= 0.7.52) Suggests: sqlite3 (>= 3.7), mediainfo (>= 0.7.52)
Description: Internet PVR Description: Internet PVR

View File

@ -3,7 +3,7 @@
# Uncomment this to turn on verbose mode. # Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1 #export DH_VERBOSE=1
EXCLUDE_MODULEREFS = crypt32 httpapi EXCLUDE_MODULEREFS = crypt32 httpapi __Internal
%: %:
dh $@ --with=systemd --with=cli dh $@ --with=systemd --with=cli

View File

@ -1,7 +1,7 @@
FROM ubuntu:xenial AS builder FROM ubuntu:xenial AS builder
ENV DEBIAN_FRONTEND noninteractive ENV DEBIAN_FRONTEND noninteractive
ENV MONO_VERSION 5.14 ENV MONO_VERSION 5.18
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
echo "deb http://download.mono-project.com/repo/debian stable-xenial/snapshots/$MONO_VERSION main" > /etc/apt/sources.list.d/mono-official-stable.list && \ echo "deb http://download.mono-project.com/repo/debian stable-xenial/snapshots/$MONO_VERSION main" > /etc/apt/sources.list.d/mono-official-stable.list && \

View File

@ -16,6 +16,7 @@ RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E03280
RUN apt-get update && apt-get install -y \ RUN apt-get update && apt-get install -y \
libmono-system-runtime4.0-cil \ libmono-system-runtime4.0-cil \
libmono-system-net-http4.0-cil \
&& rm -rf /var/lib/apt/lists/* && rm -rf /var/lib/apt/lists/*
COPY startup.sh /startup.sh COPY startup.sh /startup.sh

View File

@ -2,16 +2,18 @@
opt_parallel= opt_parallel=
opt_version= opt_version=
opt_mode=both opt_mode=both
while getopts 'pv:m:?h' c while getopts 'pv:m:r?h' c
do do
case $c in case $c in
p) opt_parallel=1 ;; p) opt_parallel=1 ;;
v) opt_version=$OPTARG ;; v) opt_version=$OPTARG ;;
m) opt_mode=$OPTARG ;; m) opt_mode=$OPTARG ;;
r) opt_report=1 ;;
?|h) printf "Usage: %s [-p] [-v mono-ver] [-m sonarr|complete]\n" $0 ?|h) printf "Usage: %s [-p] [-v mono-ver] [-m sonarr|complete]\n" $0
printf " -p run parallel\n" printf " -p run parallel\n"
printf " -v run specified mono version\n" printf " -v run specified mono version\n"
printf " -m run only mono-'complete' or 'sonarr' package variants\n" printf " -m run only mono-'complete' or 'sonarr' package variants\n"
printf " -r only report\n"
exit 2 exit 2
esac esac
done done
@ -20,17 +22,22 @@ done
# make sure that the docker host has enough memory to handle about ~300 MB per container, so 2-3 GB total # make sure that the docker host has enough memory to handle about ~300 MB per container, so 2-3 GB total
# excess goes to the swap and will slow down the entire system # excess goes to the swap and will slow down the entire system
# Preferred versions MONO_VERSIONS=""
MONO_VERSIONS="6.0 5.20 5.18"
# Future versions # Future versions
MONO_VERSIONS="$MONO_VERSIONS 6.4=preview-xenial" MONO_VERSIONS="$MONO_VERSIONS 6.8=preview-xenial"
# Semi-Supported versions
MONO_VERSIONS="$MONO_VERSIONS 6.6 6.4 6.0"
# Supported versions # Supported versions
MONO_VERSIONS="$MONO_VERSIONS 5.16 5.14 5.12 5.10 5.8 5.4" MONO_VERSIONS="$MONO_VERSIONS 5.20 5.18"
# Legacy unsupported versions (but appear to work)
MONO_VERSIONS="$MONO_VERSIONS 5.16 5.14 5.12"
# Legacy unsupported versions # Legacy unsupported versions
MONO_VERSIONS="$MONO_VERSIONS 5.0" MONO_VERSIONS="$MONO_VERSIONS 5.10 5.8 5.4 5.0"
#MONO_VERSIONS="$MONO_VERSIONS 4.8=stable-wheezy/snapshots/4.8" #MONO_VERSIONS="$MONO_VERSIONS 4.8=stable-wheezy/snapshots/4.8"
if [ "$opt_version" != "" ]; then if [ "$opt_version" != "" ]; then
@ -86,23 +93,29 @@ runOne() {
echo "Finished Test Docker for mono $MONO_VERSION" echo "Finished Test Docker for mono $MONO_VERSION"
} }
if [ "$opt_parallel" == "1" ]; then if [ "$opt_report" != "1" ]; then
for MONO_VERSION_PAIR in $MONO_VERSIONS; do
prepOne "$MONO_VERSION_PAIR"
done
fi
for MONO_VERSION_PAIR in $MONO_VERSIONS; do
if [ "$opt_parallel" == "1" ]; then if [ "$opt_parallel" == "1" ]; then
runOne "$MONO_VERSION_PAIR" & for MONO_VERSION_PAIR in $MONO_VERSIONS; do
else prepOne "$MONO_VERSION_PAIR"
prepOne "$MONO_VERSION_PAIR" done
runOne "$MONO_VERSION_PAIR" fi
for MONO_VERSION_PAIR in $MONO_VERSIONS; do
if [ "$opt_parallel" == "1" ]; then
runOne "$MONO_VERSION_PAIR" &
else
prepOne "$MONO_VERSION_PAIR"
runOne "$MONO_VERSION_PAIR"
fi
done
if [ "$opt_parallel" == "1" ]; then
echo "Waiting for all runs to finish"
wait
echo "Finished all runs"
fi fi
done
if [ "$opt_parallel" == "1" ]; then
echo "Waiting for all runs to finish"
wait
echo "Finished all runs"
fi fi
grep "<test-run" ../../_tests_results/**/*.xml | sed -r 's/.*?mono-([0-9.]+(-s)?).*?_([IU]).*?\.xml.*?failed="([0-9]*)".*/\1\t\3:\tfailed \4/g' | sort -V -t.

View File

@ -27,9 +27,6 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
Subject.Check().ShouldBeOk(); Subject.Check().ShouldBeOk();
} }
[TestCase("4.6.2")]
[TestCase("4.7")]
[TestCase("4.7.1")]
public void should_return_notice(string version) public void should_return_notice(string version)
{ {
GivenOutput(version); GivenOutput(version);
@ -47,6 +44,9 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
[TestCase("4.5")] [TestCase("4.5")]
[TestCase("4.5.2")] [TestCase("4.5.2")]
[TestCase("4.6.1")] [TestCase("4.6.1")]
[TestCase("4.6.2")]
[TestCase("4.7")]
[TestCase("4.7.1")]
public void should_return_error(string version) public void should_return_error(string version)
{ {
GivenOutput(version); GivenOutput(version);
@ -55,7 +55,7 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
} }
[Test] [Test]
public void should_return_ok_for_net462_on_Win1511() public void should_return_nok_for_net462_on_Win1511()
{ {
Mocker.GetMock<IOsInfo>() Mocker.GetMock<IOsInfo>()
.SetupGet(v => v.Version) .SetupGet(v => v.Version)
@ -63,7 +63,7 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
GivenOutput("4.6.2"); GivenOutput("4.6.2");
Subject.Check().ShouldBeOk(); Subject.Check().ShouldBeError();
} }
} }
} }

View File

@ -20,6 +20,7 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
[TestCase("5.18")] [TestCase("5.18")]
[TestCase("5.20")] [TestCase("5.20")]
[TestCase("6.4")]
public void should_return_ok(string version) public void should_return_ok(string version)
{ {
GivenOutput(version); GivenOutput(version);
@ -27,7 +28,6 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
Subject.Check().ShouldBeOk(); Subject.Check().ShouldBeOk();
} }
[TestCase("5.16")]
public void should_return_notice(string version) public void should_return_notice(string version)
{ {
GivenOutput(version); GivenOutput(version);
@ -35,8 +35,6 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
Subject.Check().ShouldBeNotice(); Subject.Check().ShouldBeNotice();
} }
[TestCase("5.4")]
[TestCase("5.8")]
public void should_return_warning(string version) public void should_return_warning(string version)
{ {
GivenOutput(version); GivenOutput(version);
@ -57,6 +55,12 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
[TestCase("4.2")] [TestCase("4.2")]
[TestCase("4.4.0")] [TestCase("4.4.0")]
[TestCase("4.4.1")] [TestCase("4.4.1")]
[TestCase("5.4")]
[TestCase("5.8")]
[TestCase("5.10")]
[TestCase("5.12")]
[TestCase("5.14")]
[TestCase("5.16")]
public void should_return_error(string version) public void should_return_error(string version)
{ {
GivenOutput(version); GivenOutput(version);

View File

@ -28,12 +28,6 @@ namespace NzbDrone.Core.HealthCheck.Checks
// Target .Net version, which would allow us to increase our target framework // Target .Net version, which would allow us to increase our target framework
var targetVersion = new Version("4.7.2"); var targetVersion = new Version("4.7.2");
if (Version.TryParse(_osInfo.Version, out var osVersion) && osVersion < new Version("10.0.14393"))
{
// Windows 10 LTSB 1511 and before do not support 4.7.x
targetVersion = new Version("4.6.2");
}
if (dotnetVersion >= targetVersion) if (dotnetVersion >= targetVersion)
{ {
_logger.Debug("Dotnet version is {0} or better: {1}", targetVersion, dotnetVersion); _logger.Debug("Dotnet version is {0} or better: {1}", targetVersion, dotnetVersion);
@ -41,7 +35,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
} }
// Supported .net version but below our desired target // Supported .net version but below our desired target
var stableVersion = new Version("4.6.2"); var stableVersion = new Version("4.7.2");
if (dotnetVersion >= stableVersion) if (dotnetVersion >= stableVersion)
{ {
_logger.Debug("Dotnet version is {0} or better: {1}", stableVersion, dotnetVersion); _logger.Debug("Dotnet version is {0} or better: {1}", stableVersion, dotnetVersion);
@ -50,6 +44,21 @@ namespace NzbDrone.Core.HealthCheck.Checks
"#currently-installed-net-framework-is-supported-but-upgrading-is-recommended"); "#currently-installed-net-framework-is-supported-but-upgrading-is-recommended");
} }
if (Version.TryParse(_osInfo.Version, out var osVersion) && osVersion < new Version("10.0.14393"))
{
return new HealthCheck(GetType(), HealthCheckResult.Error,
$"Currently installed .Net Framework {dotnetVersion} is no longer supported. However your Operating System cannot be upgraded to {targetVersion}.",
"#currently-installed-net-framework-is-old-and-unsupported");
}
var oldVersion = new Version("4.6.2");
if (dotnetVersion >= oldVersion)
{
return new HealthCheck(GetType(), HealthCheckResult.Error,
$"Currently installed .Net Framework {dotnetVersion} is no longer supported. Please upgrade the .Net Framework to at least {targetVersion}.",
"#currently-installed-net-framework-is-old-and-unsupported");
}
return new HealthCheck(GetType(), HealthCheckResult.Error, return new HealthCheck(GetType(), HealthCheckResult.Error,
$"Currently installed .Net Framework {dotnetVersion} is old and unsupported. Please upgrade the .Net Framework to at least {targetVersion}.", $"Currently installed .Net Framework {dotnetVersion} is old and unsupported. Please upgrade the .Net Framework to at least {targetVersion}.",
"#currently-installed-net-framework-is-old-and-unsupported"); "#currently-installed-net-framework-is-old-and-unsupported");

View File

@ -43,7 +43,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
} }
// Stable Mono versions // Stable Mono versions
var stableVersion = new Version("5.16"); var stableVersion = new Version("5.18");
if (monoVersion >= stableVersion) if (monoVersion >= stableVersion)
{ {
_logger.Debug("Mono version is {0} or better: {1}", stableVersion, monoVersion); _logger.Debug("Mono version is {0} or better: {1}", stableVersion, monoVersion);
@ -52,14 +52,12 @@ namespace NzbDrone.Core.HealthCheck.Checks
"#currently-installed-mono-version-is-supported-but-upgrading-is-recommended"); "#currently-installed-mono-version-is-supported-but-upgrading-is-recommended");
} }
// Old but supported Mono versions, there are known bugs var oldVersion = new Version("5.4");
var supportedVersion = new Version("5.4"); if (monoVersion >= oldVersion)
if (monoVersion >= supportedVersion)
{ {
_logger.Debug("Mono version is {0} or better: {1}", supportedVersion, monoVersion); return new HealthCheck(GetType(), HealthCheckResult.Error,
return new HealthCheck(GetType(), HealthCheckResult.Warning, $"Currently installed Mono version {monoVersion} is no longer supported. Please upgrade Mono to version {bestVersion}.",
$"Currently installed Mono version {monoVersion} is supported but has some known issues. Please upgrade Mono to version {bestVersion}.", "#currently-installed-mono-version-is-old-and-unsupported");
"#currently-installed-mono-version-is-supported-but-upgrading-is-recommended");
} }
return new HealthCheck(GetType(), HealthCheckResult.Error, return new HealthCheck(GetType(), HealthCheckResult.Error,