Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mono/fixes #36711

Closed
wants to merge 6 commits into from
Closed

Mono/fixes #36711

wants to merge 6 commits into from

Conversation

avnik
Copy link
Contributor

@avnik avnik commented Mar 10, 2018

Motivation for this change

Upgrade mono 5.8.x -> 5.10.x.
Fix mono+libgdiplus crashes on reading .gif files (https://github.com/MacTee/KSP-Mod-Admin-aOS segfaults both compiling from source (via resgen) or pre-compiled binaries

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

A lot of updates from mono-project' folks. Patches dropped, because both
merged upstream.
Configure script complains, that unable to build gif loading support,
but it's a lie -- it builds against libgif 5, which have DGifOpenFile as
well.
No packages directly use 5.8, so I replace 5.8 with 5.10 as last
official stable version.
@Mic92
Copy link
Member

Mic92 commented Mar 10, 2018

What mono versions are still supported upstream? The default mono is still mono 4.0, which seems pretty old to me (2015).

@avnik
Copy link
Contributor Author

avnik commented Mar 10, 2018

@Mic92 I add two commits, which introduce mono4 and mono5 defaults, so if we can (if we want) promote these commits to 18.03, and right after change defaults to mono5 and mono5.10 (only on master) -- and look what will break.

I also have intention to refactor dotnetPackages to make them mono build' specific.

mono = mono40;
mono = mono4;

mono4 = mono40;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about mono = mono48? I am pretty sure there have been several fixed security issues in the 4.x series.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, via mono -> mono4 -> mono48 (in stable), and mono5 in master. Just idk what apps can break. I'd happy to leave only 4.8 and latest 5.x (but at least 2 apps require exact 4.6

mono = mono40;
mono = mono4;

mono4 = mono40;

mono40 = callPackage ../development/compilers/mono/4.0.nix {
inherit (darwin) libobjc;
inherit (darwin.apple_sdk.frameworks) Foundation;
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then this one can be dropped as well.

@Mic92
Copy link
Member

Mic92 commented Mar 10, 2018

How stable is mono within a major version? How many different versions are useful to have? Would it
be a good idea to only have one variant per major version, for example 4.8 and 5.10?

@Mic92
Copy link
Member

Mic92 commented Mar 10, 2018

Since we have to support mono in stable also for at least 6 months, it would be also reasonable to upgrade the default mono version (a newer version of mono4) to receive upstream security fixes. We don't have the man power to backport patches on our own.

@avnik
Copy link
Contributor Author

avnik commented Mar 10, 2018

@Mic92 I set default to 4.8, let's look what breaks ;)

@Mic92
Copy link
Member

Mic92 commented Mar 12, 2018

The following fails to build:

  /nix/store/24bk39522rxl98jscl568fa73i7szl13-monodevelop-5.9.4.5.drv
  /nix/store/4gd786f36npc1i4zss96v7dkxyibikvn-ExtCore-0.8.46.drv
  /nix/store/jxrzgk46n44qhfcnlv6n5b3q3qd4gyaj-Newtonsoft.Json-6.0.8.drv
  /nix/store/7qiwwraaymfb6mlfvpsw90n9isnp57mm-Paket-1.18.2.drv
  /nix/store/yis61bmw8rw86hxp0wy4a9r2a1y8vmb3-FSharp.Compiler.Service-0.0.90.drv
  /nix/store/931g0cnbjqcq374hyk1jz80xcf5js523-Deedle-1.2.0.drv
  /nix/store/9hcd4jdnnyppmnw1hpr5farirzbcak76-openra-20180218.drv
  /nix/store/9jrdfsajykqnvqhg682hjg268rgiazvv-unity-editor-5.6.1xf1.drv
  /nix/store/a7zjskfihdhrc2jrv011gcnp612vic44-gdata-sharp-2.2.0.0.drv
  /nix/store/h1ncr8ckzxhaxvjm6da3afnk40hhfqqr-hyena-0.5.drv
  /nix/store/l84nm1555jjllv4sgv3p5ykq7fnh1765-FSharp.AutoComplete-0.18.2.drv
  /nix/store/n7i2zmbis79y736vaibyb2nmcsdrjbx2-nant-2015-11-15.drv
  /nix/store/npbn1ybbq275jqsc1b61lmnrwins9yyy-pdfmod-0.9.1.drv
  /nix/store/nygddif7hsxnz1dasirccqc797b70p57-mono-zeroconf-0.9.0.drv
  /nix/store/xlv7h5dsv78r708ibqz7slcdr48hphvi-Boogie-unstable-2017-01-03.drv
  /nix/store/svpixqv1dd1anl2rv7bk37c9xk3ph79j-Dafny-2.1.0.drv

Could check hydra what packages of this list where broken before?
I can then make an attempt to fix new breakages at least.

@Mic92
Copy link
Member

Mic92 commented Mar 12, 2018

There are all attributes that will be rebuild:

openra keepass-keefox gdata-sharp dbus-sharp-glib-1_0 dotnetPackages.NUnitConsole dotnetPackages.NDeskOptions mono-zeroconf python27Packages.pythonnet dotnetPackages.SharpZipLib eventstore taglib-sharp mono dotnetPackages.MicrosoftDiaSymReader dotnetPackages.NUnit350 dotnetPackages.NUnit dotnetPackages.FSharpCompilerService hyena gnome-sharp dotnetPackages.SystemCollectionsImmutable131 fsharp convchain kodiPlugins.steam-launcher mono-addins libgdiplus gtk-sharp-2_0 keepass steam-run dotnetPackages.ExcelDna dotnetPackages.FsCheck262 mono40 dotnetPackages.NUnit3 gtk-sharp-3_0 steam gio-sharp mono50 dotnetPackages.Fake dotnetPackages.FsLexYacc704 dotnetPackages.FsCheck python36Packages.pythonnet dotnetPackages.FSharpFormatting dotnetPackages.OpenNAT supertux-editor dotnetPackages.Paket dbus-sharp-glib-2_0 dbus-sharp-1_0 tomboy dotnetPackages.ExtCore monodevelop linux-steam-integration dotnetPackages.RestSharp keepass-keeagent nant notify-sharp keepass-keepasshttp dotnetPackages.Projekt dotnetPackages.NewtonsoftJson sonarr pash dotnetPackages.Suave avrdudess dotnetPackages.FsUnit dotnetPackages.MonoNat dotnetPackages.MathNetNumerics dotnetPackages.FSharpDataSQLProvider mono46 steam-run-native dotnetPackages.MaxMindGeoIP2 dotnetbuildhelpers dotnetPackages.FSharpData225 pinta syntex dotnetPackages.NUnitRunners dotnetPackages.FsPickler dotnetPackages.FuzzyLogicLibrary dotnetPackages.SharpFont haxePackages.hxcs dotnetPackages.Nuget dotnetPackages.MicrosoftDiaSymReaderPortablePdb dotnetPackages.MonoAddins dafny dotnetPackages.UnionArgParser jackett unity3d dotnetPackages.FSharpCompilerCodeDom pdfmod dotnetPackages.Fantomas dotnetPackages.FsLexYacc boogie dotnetPackages.SystemCollectionsImmutable dotnetPackages.FSharpAutoComplete dotnetPackages.SystemValueTuple dbus-sharp-2_0 dotnetPackages.SystemReflectionMetadata wavefunctioncollapse dotnetPackages.FsCheckNunit dotnetPackages.ExcelDnaRegistration fsharp41 emby dotnetPackages.StyleCopMSBuild dotnetPackages.MaxMindDb dotnetPackages.SmartIrc4net dotnetPackages.FSharpData ckan dotnetPackages.FSharpCore dotnetPackages.Deedle dotnetPackages.FSharpCompilerTools mono5 dotnetPackages.StyleCopPlusMSBuild gtk-sharp-beans dotnetPackages.Autofac radarr dotnetPackages.GitVersionTree

@matthewbauer
Copy link
Member

This looks good enough to me! I'd like to merge it before it gets stale. Any objections @Mic92?

@Mic92
Copy link
Member

Mic92 commented Apr 26, 2018

@matthewbauer if you can test that we don't break important package, the changes here should be fine.

@Mic92
Copy link
Member

Mic92 commented Apr 26, 2018

The overall amount of rebuilds is still reasonable for mono.

obadz added a commit that referenced this pull request Apr 28, 2018
@obadz
Copy link
Contributor

obadz commented Apr 28, 2018

👍 imho

@obadz
Copy link
Contributor

obadz commented Apr 28, 2018

I think the stuff that breaks in dotnet-packages.nix is very stale (other than Dafny) and can safely be marked as broken.

@aristidb
Copy link
Contributor

I changed the default version of mono to 5.8 in master because 4.0 simply does not evaluate anymore. My thinking was that if packages require 4.8 or older, they should just specify that. But I don't know that much about the difference between mono 4 and mono 5.

@Mic92
Copy link
Member

Mic92 commented Apr 28, 2018

I am not so familiar with the c# ecosystem, so I would like to delegate this decision to someone else.

Synthetica9 pushed a commit to Synthetica9/nixpkgs that referenced this pull request May 3, 2018
@baracoder
Copy link
Contributor

By now there is a stable version of mono 5.14. Could you update to that?

@baracoder baracoder mentioned this pull request Aug 30, 2018
7 tasks
@Mic92
Copy link
Member

Mic92 commented Aug 30, 2018

We already have mono514 in the repository.

@samueldr
Copy link
Member

samueldr commented Sep 9, 2018

FTR, the failing Newtonsoft.Json is already failing, and #46425 fixes it.

@obadz
Copy link
Contributor

obadz commented Dec 20, 2018

Was this given up on?
#52438 points out that we should update to Mono 5.16.
We should probably also default mono5 to 5.16.
Don't know that we need to keep 5.8 around.

@avnik
Copy link
Contributor Author

avnik commented Dec 20, 2018 via email

@avnik
Copy link
Contributor Author

avnik commented Dec 20, 2018

Only gdiplus stuff can be worth,if it not (yet) hit next release of libgdiplus

@obadz
Copy link
Contributor

obadz commented Dec 23, 2018

Ok I moved the libgdiplus stuff in #52712 so it should supersede this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants