pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

corefx-git: Revamp patch for Kerberos, add Heimdal option



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sat May 7 13:48:12 2016 +0200
Changeset:	e5603cbc819b809de77943551e01fa297a94d4a0

Modified Files:
	corefx-git/Makefile
	corefx-git/distinfo
	corefx-git/patches/patch-src_Native_System.Net.Security.Native_CMakeLists.txt
	corefx-git/patches/patch-src_Native_configure.cmake
Added Files:
	corefx-git/patches/patch-src_Native_Common_pal__config.h.in
	corefx-git/patches/patch-src_Native_System.Net.Security.Native_pal__gssapi.cpp
	corefx-git/patches/patch-src_Native_System.Net.Security.Native_pal__gssapi.h

Log Message:
corefx-git: Revamp patch for Kerberos, add Heimdal option

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e5603cbc819b809de77943551e01fa297a94d4a0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 corefx-git/Makefile                                |  6 ++++-
 corefx-git/distinfo                                |  7 ++++--
 .../patch-src_Native_Common_pal__config.h.in       | 12 +++++++++
 ...ative_System.Net.Security.Native_CMakeLists.txt | 28 +++++++--------------
 ...tive_System.Net.Security.Native_pal__gssapi.cpp | 19 ++++++++++++++
 ...Native_System.Net.Security.Native_pal__gssapi.h | 13 ++++++++++
 .../patches/patch-src_Native_configure.cmake       | 29 +++++++++++-----------
 7 files changed, 78 insertions(+), 36 deletions(-)

diffs:
diff --git a/corefx-git/Makefile b/corefx-git/Makefile
index 9aa69a5..6f4d551 100644
--- a/corefx-git/Makefile
+++ b/corefx-git/Makefile
@@ -19,6 +19,9 @@ USE_LANGUAGES=	c c++
 USE_TOOLS+=	bash
 REPLACE_BASH+=	build.sh
 
+# NetBSD specific for now
+CMAKE_ARGS+=	 -DHeimdalGssApi=ON
+
 do-configure:
 	${RUN} ${ECHO} Skip configure and call CMake via build.sh
 
@@ -26,7 +29,8 @@ do-build:
 	${RUN} cd ${WRKSRC} && \
 	${PKGSRC_SETENV} ${MAKE_ENV} ./build.sh native verbose cmakeargs ${CMAKE_ARGS:Q}
 
-.include "../../security/mit-krb5/buildlink3.mk"
+# NetBSD uses Heimdal from base
+#.include "../../security/mit-krb5/buildlink3.mk"
 .include "../../www/curl/buildlink3.mk"
 .include "../../textproc/icu/buildlink3.mk"
 
diff --git a/corefx-git/distinfo b/corefx-git/distinfo
index 167fab1..ec78fc4 100644
--- a/corefx-git/distinfo
+++ b/corefx-git/distinfo
@@ -1,3 +1,6 @@
 $NetBSD$
-SHA1 (patch-src_Native_System.Net.Security.Native_CMakeLists.txt) = 6f39c82e1d870dbf5b092a7b017727d0cc409886
-SHA1 (patch-src_Native_configure.cmake) = 9428d24bc7c166d6567959d0bcc34ba96446fe42
+SHA1 (patch-src_Native_Common_pal__config.h.in) = 08b4e586eeed9e904547b2c169a0e19db6682a40
+SHA1 (patch-src_Native_System.Net.Security.Native_CMakeLists.txt) = 5be5902a707925dfd9d3ff613dbf41512b984dbd
+SHA1 (patch-src_Native_System.Net.Security.Native_pal__gssapi.cpp) = 5919f3284c6e80a0b6e8c807b6c6dfd2de0bd994
+SHA1 (patch-src_Native_System.Net.Security.Native_pal__gssapi.h) = 3ef35fb72afe48e5ce80a9a528965eedd24f8ddd
+SHA1 (patch-src_Native_configure.cmake) = 407d20fe5e4d2ab6af70faf0c69e9db4a7d50df3
diff --git a/corefx-git/patches/patch-src_Native_Common_pal__config.h.in b/corefx-git/patches/patch-src_Native_Common_pal__config.h.in
new file mode 100644
index 0000000..51f8237
--- /dev/null
+++ b/corefx-git/patches/patch-src_Native_Common_pal__config.h.in
@@ -0,0 +1,12 @@
+$NetBSD$
+
+--- src/Native/Common/pal_config.h.in.orig	2016-05-03 12:05:51.000000000 +0000
++++ src/Native/Common/pal_config.h.in
+@@ -58,6 +58,7 @@
+ #cmakedefine01 HAVE_GSSFW_HEADERS
+ #cmakedefine01 HAVE_GSS_SPNEGO_MECHANISM
+ #cmakedefine01 HAVE_GSS_KRB5_CRED_NO_CI_FLAGS_X
++#cmakedefine01 HAVE_HEIMDAL_HEADERS
+ 
+ // Mac OS X has stat64, but it is deprecated since plain stat now
+ // provides the same 64-bit aware struct when targeting OS X > 10.5
diff --git a/corefx-git/patches/patch-src_Native_System.Net.Security.Native_CMakeLists.txt b/corefx-git/patches/patch-src_Native_System.Net.Security.Native_CMakeLists.txt
index 106d045..ebbf94b 100644
--- a/corefx-git/patches/patch-src_Native_System.Net.Security.Native_CMakeLists.txt
+++ b/corefx-git/patches/patch-src_Native_System.Net.Security.Native_CMakeLists.txt
@@ -1,28 +1,18 @@
 $NetBSD$
 
---- src/Native/System.Net.Security.Native/CMakeLists.txt.orig	2016-04-16 12:43:49.000000000 +0000
+--- src/Native/System.Net.Security.Native/CMakeLists.txt.orig	2016-05-03 12:05:51.000000000 +0000
 +++ src/Native/System.Net.Security.Native/CMakeLists.txt
-@@ -9,11 +9,14 @@ if (HAVE_GSSFW_HEADERS)
+@@ -9,6 +9,13 @@ if (HAVE_GSSFW_HEADERS)
     if(LIBGSS STREQUAL LIBGSS-NOTFOUND)
        message(FATAL_ERROR "Cannot find GSS.Framework and System.Net.Security.Native cannot build without it. Try installing GSS.Framework (or the appropriate package for your platform)")
     endif()
-+   find_path(LIBGSS_INCLUDE_DIR GSS/GSS.h)
++elseif(HAVE_HEIMDAL_HEADERS)
++   find_library(LIBGSS NAMES gssapi)
++   if(LIBGSS STREQUAL LIBGSS-NOTFOUND)
++      message(FATAL_ERROR "Cannot find libgssapi and System.Net.Security.Native cannot build without it. Try installing heimdal (or the appropriate package for your platform)")
++   endif()
++elseif(HeimdalGssApi)
++     message(FATAL_ERROR "HeimdalGssApi option was set but gssapi headers could not be found and System.Net.Security.Native cannot build without the headers. Try installing heimdal (or the appropriate package for your platform)")
  else()
     find_library(LIBGSS NAMES gssapi_krb5)
     if(LIBGSS STREQUAL LIBGSS-NOTFOUND)
-       message(FATAL_ERROR "Cannot find libgssapi_krb5 and System.Net.Security.Native cannot build without it. Try installing libkrb5-dev (or the appropriate package for your platform)")
-    endif()
-+   # Look up for MIT-KRB5 specific header, not available in Heimdal
-+   find_path(LIBGSS_INCLUDE_DIR gssapi/gssapi_ext.h)
- endif()
- 
- set(NATIVEGSS_SOURCES
-@@ -30,4 +33,8 @@ target_link_libraries(System.Net.Securit
-     ${LIBGSS}
- )
- 
-+include_directories(SYSTEM
-+    ${LIBGSS_INCLUDE_DIR}
-+)
-+
- install (TARGETS System.Net.Security.Native DESTINATION .)
diff --git a/corefx-git/patches/patch-src_Native_System.Net.Security.Native_pal__gssapi.cpp b/corefx-git/patches/patch-src_Native_System.Net.Security.Native_pal__gssapi.cpp
new file mode 100644
index 0000000..22203cc
--- /dev/null
+++ b/corefx-git/patches/patch-src_Native_System.Net.Security.Native_pal__gssapi.cpp
@@ -0,0 +1,19 @@
+$NetBSD$
+
+--- src/Native/System.Net.Security.Native/pal_gssapi.cpp.orig	2016-05-03 12:05:51.000000000 +0000
++++ src/Native/System.Net.Security.Native/pal_gssapi.cpp
+@@ -9,9 +9,14 @@
+ #if HAVE_GSSFW_HEADERS
+ #include <GSS/GSS.h>
+ #else
++#if HAVE_HEIMDAL_HEADERS
++#include <gssapi/gssapi.h>
++#include <gssapi/gssapi_krb5.h>
++#else
+ #include <gssapi/gssapi_ext.h>
+ #include <gssapi/gssapi_krb5.h>
+ #endif
++#endif
+ 
+ #include <assert.h>
+ #include <string.h>
diff --git a/corefx-git/patches/patch-src_Native_System.Net.Security.Native_pal__gssapi.h b/corefx-git/patches/patch-src_Native_System.Net.Security.Native_pal__gssapi.h
new file mode 100644
index 0000000..4b9a9e7
--- /dev/null
+++ b/corefx-git/patches/patch-src_Native_System.Net.Security.Native_pal__gssapi.h
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/Native/System.Net.Security.Native/pal_gssapi.h.orig	2016-05-03 12:05:51.000000000 +0000
++++ src/Native/System.Net.Security.Native/pal_gssapi.h
+@@ -4,7 +4,7 @@
+ 
+ #pragma once
+ 
+-#if HAVE_GSSFW_HEADERS
++#if HAVE_GSSFW_HEADERS || HAVE_HEIMDAL_HEADERS
+ typedef struct gss_name_t_desc_struct GssName;
+ typedef struct gss_ctx_id_t_desc_struct GssCtxId;
+ typedef struct gss_cred_id_t_desc_struct GssCredId;
diff --git a/corefx-git/patches/patch-src_Native_configure.cmake b/corefx-git/patches/patch-src_Native_configure.cmake
index 02be34b..90314ac 100644
--- a/corefx-git/patches/patch-src_Native_configure.cmake
+++ b/corefx-git/patches/patch-src_Native_configure.cmake
@@ -1,18 +1,19 @@
 $NetBSD$
 
---- src/Native/configure.cmake.orig	2016-04-09 19:53:47.000000000 +0000
+--- src/Native/configure.cmake.orig	2016-05-03 12:05:51.000000000 +0000
 +++ src/Native/configure.cmake
-@@ -447,10 +447,13 @@ if (HAVE_GSSFW_HEADERS)
-         "GSS/GSS.h"
-         HAVE_GSS_SPNEGO_MECHANISM)
- else ()
-+    find_path(LIBGSS_INCLUDE_DIR gssapi/gssapi_ext.h)
-+    set(CMAKE_REQUIRED_INCLUDES ${LIBGSS_INCLUDE_DIR})
-     check_symbol_exists(
-         GSS_SPNEGO_MECHANISM
-         "gssapi/gssapi.h"
-         HAVE_GSS_SPNEGO_MECHANISM)
-+    unset(CMAKE_REQUIRED_INCLUDES)
- endif ()
+@@ -437,6 +437,14 @@ check_cxx_source_compiles(
+     "
+     HAVE_CURL_SSLVERSION_TLSv1_012)
  
- set (CMAKE_REQUIRED_LIBRARIES)
++option(HeimdalGssApi "use heimdal implementation of GssApi" OFF)
++
++if (HeimdalGssApi)
++   check_include_files(
++       gssapi/gssapi.h
++       HAVE_HEIMDAL_HEADERS)
++endif()
++
+ check_include_files(
+     GSS/GSS.h
+     HAVE_GSSFW_HEADERS)


Home | Main Index | Thread Index | Old Index