mirror of
https://github.com/Sonarr/Sonarr
synced 2024-12-21 23:33:00 +00:00
Increased mono dependency from 5.4 to 5.18 for debian
# Conflicts: # docker/tests/run-all.sh
This commit is contained in:
parent
c91a5c80d3
commit
19764014be
9 changed files with 75 additions and 50 deletions
|
@ -7,8 +7,8 @@ Vcs-Git: git@github.com:Sonarr/Sonarr.git
|
|||
Vcs-Browser: https://github.com/Sonarr/Sonarr
|
||||
Build-Depends: debhelper (>= 9),
|
||||
dh-systemd (>= 1.5),
|
||||
mono-devel (>= 5.4),
|
||||
libmono-cil-dev (>= 5.4),
|
||||
mono-devel (>= 5.18),
|
||||
libmono-cil-dev (>= 5.18),
|
||||
cli-common-dev (>= 0.9+xamarin5)
|
||||
|
||||
Package: sonarr
|
||||
|
@ -16,7 +16,7 @@ Architecture: all
|
|||
Provides: nzbdrone
|
||||
Conflicts: 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)
|
||||
Suggests: sqlite3 (>= 3.7), mediainfo (>= 0.7.52)
|
||||
Description: Internet PVR
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Uncomment this to turn on verbose mode.
|
||||
#export DH_VERBOSE=1
|
||||
|
||||
EXCLUDE_MODULEREFS = crypt32 httpapi
|
||||
EXCLUDE_MODULEREFS = crypt32 httpapi __Internal
|
||||
|
||||
%:
|
||||
dh $@ --with=systemd --with=cli
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FROM ubuntu:xenial AS builder
|
||||
|
||||
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 && \
|
||||
echo "deb http://download.mono-project.com/repo/debian stable-xenial/snapshots/$MONO_VERSION main" > /etc/apt/sources.list.d/mono-official-stable.list && \
|
||||
|
|
|
@ -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 \
|
||||
libmono-system-runtime4.0-cil \
|
||||
libmono-system-net-http4.0-cil \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY startup.sh /startup.sh
|
||||
|
|
|
@ -2,16 +2,18 @@
|
|||
opt_parallel=
|
||||
opt_version=
|
||||
opt_mode=both
|
||||
while getopts 'pv:m:?h' c
|
||||
while getopts 'pv:m:r?h' c
|
||||
do
|
||||
case $c in
|
||||
p) opt_parallel=1 ;;
|
||||
v) opt_version=$OPTARG ;;
|
||||
m) opt_mode=$OPTARG ;;
|
||||
r) opt_report=1 ;;
|
||||
?|h) printf "Usage: %s [-p] [-v mono-ver] [-m sonarr|complete]\n" $0
|
||||
printf " -p run parallel\n"
|
||||
printf " -v run specified mono version\n"
|
||||
printf " -m run only mono-'complete' or 'sonarr' package variants\n"
|
||||
printf " -r only report\n"
|
||||
exit 2
|
||||
esac
|
||||
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
|
||||
# excess goes to the swap and will slow down the entire system
|
||||
|
||||
# Preferred versions
|
||||
MONO_VERSIONS="6.8 6.6 6.4 6.0 5.20 5.18"
|
||||
MONO_VERSIONS=""
|
||||
|
||||
# Future versions
|
||||
MONO_VERSIONS="$MONO_VERSIONS 6.10=preview-xenial"
|
||||
|
||||
# Semi-Supported versions
|
||||
MONO_VERSIONS="$MONO_VERSIONS 6.8 6.6 6.4 6.0"
|
||||
|
||||
# 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
|
||||
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"
|
||||
|
||||
if [ "$opt_version" != "" ]; then
|
||||
|
@ -86,23 +93,29 @@ runOne() {
|
|||
echo "Finished Test Docker for mono $MONO_VERSION"
|
||||
}
|
||||
|
||||
if [ "$opt_parallel" == "1" ]; then
|
||||
if [ "$opt_report" != "1" ]; then
|
||||
|
||||
if [ "$opt_parallel" == "1" ]; then
|
||||
for MONO_VERSION_PAIR in $MONO_VERSIONS; do
|
||||
prepOne "$MONO_VERSION_PAIR"
|
||||
done
|
||||
fi
|
||||
|
||||
for MONO_VERSION_PAIR in $MONO_VERSIONS; do
|
||||
prepOne "$MONO_VERSION_PAIR"
|
||||
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
|
||||
|
||||
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
|
||||
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.
|
|
@ -27,9 +27,6 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|||
Subject.Check().ShouldBeOk();
|
||||
}
|
||||
|
||||
[TestCase("4.6.2")]
|
||||
[TestCase("4.7")]
|
||||
[TestCase("4.7.1")]
|
||||
public void should_return_notice(string version)
|
||||
{
|
||||
GivenOutput(version);
|
||||
|
@ -47,6 +44,9 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|||
[TestCase("4.5")]
|
||||
[TestCase("4.5.2")]
|
||||
[TestCase("4.6.1")]
|
||||
[TestCase("4.6.2")]
|
||||
[TestCase("4.7")]
|
||||
[TestCase("4.7.1")]
|
||||
public void should_return_error(string version)
|
||||
{
|
||||
GivenOutput(version);
|
||||
|
@ -55,7 +55,7 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|||
}
|
||||
|
||||
[Test]
|
||||
public void should_return_ok_for_net462_on_Win1511()
|
||||
public void should_return_nok_for_net462_on_Win1511()
|
||||
{
|
||||
Mocker.GetMock<IOsInfo>()
|
||||
.SetupGet(v => v.Version)
|
||||
|
@ -63,7 +63,7 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|||
|
||||
GivenOutput("4.6.2");
|
||||
|
||||
Subject.Check().ShouldBeOk();
|
||||
Subject.Check().ShouldBeError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|||
|
||||
[TestCase("5.18")]
|
||||
[TestCase("5.20")]
|
||||
[TestCase("6.4")]
|
||||
public void should_return_ok(string version)
|
||||
{
|
||||
GivenOutput(version);
|
||||
|
@ -27,7 +28,6 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|||
Subject.Check().ShouldBeOk();
|
||||
}
|
||||
|
||||
[TestCase("5.16")]
|
||||
public void should_return_notice(string version)
|
||||
{
|
||||
GivenOutput(version);
|
||||
|
@ -35,8 +35,6 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|||
Subject.Check().ShouldBeNotice();
|
||||
}
|
||||
|
||||
[TestCase("5.4")]
|
||||
[TestCase("5.8")]
|
||||
public void should_return_warning(string version)
|
||||
{
|
||||
GivenOutput(version);
|
||||
|
@ -57,6 +55,12 @@ namespace NzbDrone.Core.Test.HealthCheck.Checks
|
|||
[TestCase("4.2")]
|
||||
[TestCase("4.4.0")]
|
||||
[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)
|
||||
{
|
||||
GivenOutput(version);
|
||||
|
|
|
@ -28,12 +28,6 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||
|
||||
// Target .Net version, which would allow us to increase our target framework
|
||||
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)
|
||||
{
|
||||
_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
|
||||
var stableVersion = new Version("4.6.2");
|
||||
var stableVersion = new Version("4.7.2");
|
||||
if (dotnetVersion >= stableVersion)
|
||||
{
|
||||
_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");
|
||||
}
|
||||
|
||||
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,
|
||||
$"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");
|
||||
|
|
|
@ -43,7 +43,7 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||
}
|
||||
|
||||
// Stable Mono versions
|
||||
var stableVersion = new Version("5.16");
|
||||
var stableVersion = new Version("5.18");
|
||||
if (monoVersion >= stableVersion)
|
||||
{
|
||||
_logger.Debug("Mono version is {0} or better: {1}", stableVersion, monoVersion);
|
||||
|
@ -51,15 +51,13 @@ namespace NzbDrone.Core.HealthCheck.Checks
|
|||
$"Currently installed Mono version {monoVersion} is supported but upgrading to {bestVersion} is recommended.",
|
||||
"#currently-installed-mono-version-is-supported-but-upgrading-is-recommended");
|
||||
}
|
||||
|
||||
// Old but supported Mono versions, there are known bugs
|
||||
var supportedVersion = new Version("5.4");
|
||||
if (monoVersion >= supportedVersion)
|
||||
|
||||
var oldVersion = new Version("5.4");
|
||||
if (monoVersion >= oldVersion)
|
||||
{
|
||||
_logger.Debug("Mono version is {0} or better: {1}", supportedVersion, monoVersion);
|
||||
return new HealthCheck(GetType(), HealthCheckResult.Warning,
|
||||
$"Currently installed Mono version {monoVersion} is supported but has some known issues. Please upgrade Mono to version {bestVersion}.",
|
||||
"#currently-installed-mono-version-is-supported-but-upgrading-is-recommended");
|
||||
return new HealthCheck(GetType(), HealthCheckResult.Error,
|
||||
$"Currently installed Mono version {monoVersion} is no longer supported. Please upgrade Mono to version {bestVersion}.",
|
||||
"#currently-installed-mono-version-is-old-and-unsupported");
|
||||
}
|
||||
|
||||
return new HealthCheck(GetType(), HealthCheckResult.Error,
|
||||
|
|
Loading…
Reference in a new issue