Bug 242948 - devel/monodevelop: Fix build on FreeBSD 12.x with OpenSSL 1.1.1
Summary: devel/monodevelop: Fix build on FreeBSD 12.x with OpenSSL 1.1.1
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-mono mailing list
Keywords: needs-qa
Depends on:
Blocks: 231931
  Show dependency treegraph
Reported: 2019-12-28 22:41 UTC by malavon
Modified: 2020-01-20 12:52 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (mono)
koobs: merge-quarterly?

Updated libgit2 and fixed all checksum mismatches (36.79 KB, patch)
2019-12-28 22:41 UTC, malavon
no flags Details | Diff
Updated libgit2 and fixed all checksum mismatches + fixing registry issue (36.95 KB, patch)
2020-01-20 12:51 UTC, malavon
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description malavon 2019-12-28 22:41:16 UTC
Created attachment 210295 [details]
Updated libgit2 and fixed all checksum mismatches

I still need to run tests on a 11.x poudriere build, but on 12.x monodevelop compiles, installs and starts without errors.
Comment 1 malavon 2019-12-28 23:06:18 UTC
Note that I've also tried upgrading to the latest version, but that required upgrading mono (which was succesful), msbuild (still in progress) and fsharp (which I failed at).
Comment 2 malavon 2019-12-29 12:18:38 UTC
This patch might still have issues. I just noticed that I needed to install
the msbuild port as well in order to be able to open and build a .csproj.
Comment 3 Rene Ladan freebsd_committer 2020-01-11 11:02:25 UTC
Ping? Note that this port expired yesterday, but is not removed yet.
Comment 4 Rene Ladan freebsd_committer 2020-01-12 17:42:17 UTC
I get a build_fs_violation when building this port in poudriere, meaning something before the stage phase writes outside WRKDIR :

rene@e17:~ % tail /usr/local/poudriere/data/logs/bulk/head-amd64-default/latest-per-pkg/monodevelop-
gmake[1]: Leaving directory '/wrkdirs/usr/ports/devel/monodevelop/work/monodevelop-monodevelop-'
=>> Checking for filesystem violations... done
=>> Error: Filesystem touched during build:
extra: usr/local/etc/mono/registry
[head-amd64-default] [2020-01-12_18h16m12s] [build_fs_violation:devel/monodevelop:monodevelop-] Queued: 1  Built: 0  Failed: 0  Skipped: 0  Ignored: 0  Tobuild: 1   Time: 00:19:41
[00:19:45] Logs: /usr/local/poudriere/data/logs/bulk/head-amd64-default/2020-01-12_18h16m12s
build of devel/monodevelop | monodevelop- ended at Sun Jan 12 18:35:57 CET 2020
build time: 00:18:54
!!! build failure encountered !!!
Comment 5 Rene Ladan freebsd_committer 2020-01-12 18:30:48 UTC
grep'ing for "registry" through the tarballed work directory finds nothing suspicious as far as I can tell, the only thing is this directory:

rene@e17:~/monodevelop/work % ls -lR .mono/
total 1
drwxr-xr-x  3 rene  rene  4 12 jan. 18:19 registry

total 1
drwxr-xr-x  2 rene  rene  2 12 jan. 18:19 CurrentUser
-rw-r--r--  1 rene  rene  3 12 jan. 18:27 last-btime

total 0
Comment 6 malavon 2020-01-16 12:08:27 UTC
I'm not sure, but I think this check has been added to poudriere testport
recently, or something alike. I reran the build and now I have the same issue,
even though I'm almost certain it used to go through.

I will see if I can fix this, no idea yet where it's coming from yet.
I am however pretty sure that the same issue must have existed in the broken
version since the only change is an update to libgit2.
Comment 7 Rene Ladan freebsd_committer 2020-01-16 20:55:59 UTC
I'm not familiar with Mono so it might be a dependency at fault, or mondevelop itself somehow. That filesystem check has been in poudriere for a long time though.
Comment 8 Rene Ladan freebsd_committer 2020-01-20 12:17:57 UTC
Ah, poudriere bulk does not check for filesystem changes outside of the build directory.
Comment 9 commit-hook freebsd_committer 2020-01-20 12:21:07 UTC
A commit references this bug:

Author: rene
Date: Mon Jan 20 12:20:58 UTC 2020
New revision: 523616
URL: https://svnweb.freebsd.org/changeset/ports/523616

  devel/monodevelop: unexpire by updating libgit2 and recalculating the checksums.

  PR:		242948
  Submitted by:	mavalon
  Approved by:	maintainer timeout (mono, 3 weeks)
  MFH:		2020Q1

Comment 10 malavon 2020-01-20 12:51:25 UTC
Created attachment 210893 [details]
Updated libgit2 and fixed all checksum mismatches + fixing registry issue

Apparently that registry is the same registry as it is on Windows, but written
to a file in either /usr/local/etc/mono or to the user's homedir.
As far as I understand it's actually possible that ports require to modify
this file, but that doesn't hold true for monodevelop.
I fixed this one by simply referencing the work directory as registry dir.
As far as I see this is safe to do. If in doubt, it's best that someone with
actual mono/.Net experience takes a look at this.

As I'm typing this I'm running a build in a 11.x jail to see if everything still
works correctly.
Comment 11 malavon 2020-01-20 12:52:59 UTC
Apparently we were looking at this at the same time.
The extra little patch to the Makefile will fix poudriere testport as well.