TritonDataCenter / pkgsrc-legacy

Automatically updated conversion of the "pkgsrc" module from anoncvs.netbsd.org
http://www.pkgsrc.org
127 stars 64 forks source link

lang/mono does not have getdomainame which seems to be used a lot #486

Open sjorge opened 7 years ago

sjorge commented 7 years ago

Looks like lang/mono gets build with getdomainname disabled.

The few mono apps I tried all want and and fail in various ways. (e.g. sonarr and radarr being some of them) Not being able to do a DNS lookup is rather painful.

I haven't tried it but there seems to be a patch available: https://bugzilla.xamarin.com/show_bug.cgi?id=32010

sjorge commented 7 years ago

Patch does not apply, looks like some of it is no longer needed. It compiles with only the last 2 fragments applied. Testing now.

Still does not work with this patch:

$NetBSD$

--- support/unistd.c.orig       2015-08-25 20:33:41.000000000 +0000
+++ support/unistd.c
@@ -210,6 +210,9 @@ Mono_Posix_Syscall_sethostid (gint64 hos
 #endif /* def HAVE_SETHOSTID */

 #ifdef HAVE_GETDOMAINNAME
+#ifdef PLATFORM_SOLARIS
+extern int getdomainname (char *name, int namelen);
+#endif
 gint32
 Mono_Posix_Syscall_getdomainname (char *name, mph_size_t len)
 {
@@ -219,6 +222,9 @@ Mono_Posix_Syscall_getdomainname (char *
 #endif /* def HAVE_GETDOMAINNAME */

 #ifdef HAVE_SETDOMAINNAME
+#ifdef PLATFORM_SOLARIS
+extern int setdomainname (const char *name, int namelen);
+#endif
 gint32
 Mono_Posix_Syscall_setdomainname (const char *name, mph_size_t len)
 {

I also commented this in the Makefile

#CONFIGURE_ENV+=                ac_cv_func_getdomainname=no
#CONFIGURE_ENV+=                ac_cv_func_setdomainname=no

I tested using Sonarr, it keeps failing on getdomainname not being able to resolve addresses 👎

[Warn] Fanzub: Unable to connect to indexer

[v2.0.0.4689] System.EntryPointNotFoundException: getdomainname
  at (wrapper managed-to-native) System.Net.NetworkInformation.CommonUnixIPGlobalProperties:getdomainname (byte[],int)
  at System.Net.NetworkInformation.CommonUnixIPGlobalProperties.get_DomainName () [0x00000] in <filename unknown>:0
  at System.Net.CookieContainer..ctor () [0x00000] in <filename unknown>:0
  at NzbDrone.Common.Http.HttpClient+<>c.<PrepareRequestCookies>b__8_0 () [0x00000] in <filename unknown>:0
  at NzbDrone.Common.Cache.Cached`1[System.Net.CookieContainer].Get (System.String key, System.Func`1 function, Nullable`1 lifeTime) [0x00000] in <filename unknown>:0
  at NzbDrone.Common.Http.HttpClient.PrepareRequestCookies (NzbDrone.Common.Http.HttpRequest request) [0x00000] in <filename unknown>:0
  at NzbDrone.Common.Http.HttpClient.Execute (NzbDrone.Common.Http.HttpRequest request) [0x00000] in <filename unknown>:0
  at NzbDrone.Core.Indexers.HttpIndexerBase`1[NzbDrone.Core.Indexers.Fanzub.FanzubSettings].FetchIndexerResponse (NzbDrone.Core.Indexers.IndexerRequest request) [0x00000] in <filename unknown>:0
  at NzbDrone.Core.Indexers.HttpIndexerBase`1[NzbDrone.Core.Indexers.Fanzub.FanzubSettings].FetchPage (NzbDrone.Core.Indexers.IndexerRequest request, IParseIndexerResponse parser) [0x00000] in <filename unknown>:0
  at NzbDrone.Core.Indexers.HttpIndexerBase`1[NzbDrone.Core.Indexers.Fanzub.FanzubSettings].TestConnection () [0x00000] in <filename unknown>:0

I did not retry other apps like Radarr.