[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Kerberos + GSSAPI support in Tortoise SVN

From: Jean-Yves Avenard <jyavenard_at_gmail.com>
Date: Sat, 25 Sep 2010 00:55:12 +1000

Hi

On 24 September 2010 20:47, Stefan Küng <tortoisesvn_at_gmail.com> wrote:
> Sure, send the patch, but for trunk, not 1.6.x please.
> And together with some information where to get the necessary lib files
> and where to put them so the build script works.

Here it is then. I haven't tested it on trunk, but I'm fairly
confident it will be okay..
I also haven't been able to test a 64 bits compilation, compilation on
64 bits always fail for me on my Windows 7 Ultimate 64 bits VM in
VMWare (linking error, with no useful message showing)

To add to the documentation.

Pre-requisite. MIT Kerberos for Windows SDK at
http://web.mit.edu/kerberos/dist/index.html.
Currently version 3.2.2
http://web.mit.edu/kerberos/dist/kfw/3.2/kfw-3.2.2/kfw-3-2-2-sdk.zip
(340kB)

- unzip the MIT kerberos SDK into 'common' and rename the folder to 'kerberos'

Whilte we are at the documentation, would be worse adding some version
requirement.
TortoiseSVN doesn't compile with zlib > 1.2.3 (in 1.2.4 and 1.2.5 ,
some asm files are gone, causing build to fail)
TortoiseSVN doesn't compile with latest nant alpha (0.91), it does
compile with 0.90

Index: default.build
===================================================================
--- default.build (revision 20180)
+++ default.build (working copy)
@@ -54,6 +54,14 @@
     <property name="devrelease" value="" />
   </target>

+ <target name="gssapi">
+ <description>
+ Sets the environment up to build an GSSAPI enabled release version,
+ with the '-gssapi' markers.
+ </description>
+ <property name="devrelease" value="-gssapi" />
+ </target>
+
   <target name="x64">
     <description>
       Compiles everything for the win64 platform.
Index: src/TortoiseSVNSetup/StructureFragment.wxs
===================================================================
--- src/TortoiseSVNSetup/StructureFragment.wxs (revision 20180)
+++ src/TortoiseSVNSetup/StructureFragment.wxs (working copy)
@@ -77,6 +77,7 @@
               <File Id="F__saslLOGIN" Name="saslLOGIN.dll" DiskId="1"
Source="..\..\bin\$(var.ReleasePath)\bin\saslLOGIN.dll" />
               <File Id="F__saslNTLM" Name="saslNTLM.dll" DiskId="1"
Source="..\..\bin\$(var.ReleasePath)\bin\saslNTLM.dll" />
               <File Id="F__saslPLAIN" Name="saslPLAIN.dll" DiskId="1"
Source="..\..\bin\$(var.ReleasePath)\bin\saslPLAIN.dll" />
+ <File Id="F__saslGSSAPI" Name="saslGSSAPI.dll"
DiskId="1" Source="..\..\bin\$(var.ReleasePath)\bin\saslGSSAPI.dll" />
             </Component>

             <Component Id="C__gettext" Guid="$(var.GuidGettext)"
Win64="$(var.Win64YesNo)">
@@ -697,4 +698,4 @@
       </Directory>
     </Directory>
   </Fragment>
-</Wix>
\ No newline at end of file
+</Wix>
Index: ext/build/neon.build
===================================================================
--- ext/build/neon.build (revision 20180)
+++ ext/build/neon.build (working copy)
@@ -94,6 +94,7 @@
         <include name="..\apr-util\xml\expat\lib" />
         <include name="..\..\..\common\openssl\inc32" />
         <include name="..\..\..\common\zlib" />
+ <include name="..\..\..\common\kerberos\inc\krb5" />
       </includedirs>
       <defines>
         <define name="_CRT_NONSTDC_NO_DEPRECATE" />
@@ -120,6 +121,9 @@
         <define name="NOGDI" />
         <define name="NONLS" />
         <define name="NOCRYPT" />
+ <define name="HAVE_GSSAPI" />
+ <define name="HAVE_GSSAPI_GSSAPI_H" />
+ <define name="HAVE_GSSAPI_GSSAPI_GENERIC_H" />
       </defines>
     </cl>
     <property name="machineoption" value="/MACHINE:X86"
if="${platform == 'win32'}" />
@@ -132,6 +136,7 @@
         <include
name="..\..\..\common\zlib\${configuration}${static}_${platform}\zlibstat.lib"
/>
         <include name="..\..\..\common\openssl\out32\libeay32.lib" />
         <include name="..\..\..\common\openssl\out32\ssleay32.lib" />
+ <include name="..\..\..\common\kerberos\lib\i386\gssapi32.lib" />
       </sources>
     </lib>
   </target>
Index: ext/build/sasl.build
===================================================================
--- ext/build/sasl.build (revision 20180)
+++ ext/build/sasl.build (working copy)
@@ -206,12 +206,15 @@
         <include name="plugins\login_init.c" />
         <include name="plugins\ntlm.c" />
         <include name="plugins\ntlm_init.c" />
+ <include name="plugins\gssapi.c" />
+ <include name="plugins\gssapiv2_init.c" />
       </sources>
       <includedirs>
         <include name="include" />
         <include name="plugins" />
         <include name="win32\include" />
         <include name="..\..\..\common\openssl\inc32" />
+ <include name="..\..\..\common\kerberos\inc\krb5" />
       </includedirs>
       <defines>
         <define name="_CRT_NONSTDC_NO_DEPRECATE" />
@@ -228,6 +231,7 @@
         <define name="WIN64" if="${platform == 'x64'}" />
         <define name="NDEBUG" if="${configuration == 'release'}"/>
         <define name="_DEBUG" if="${configuration != 'release'}"/>
+ <define name="HAVE_GSS_C_NT_HOSTBASED_SERVICE" />
       </defines>
     </cl>
     <property name="machineoption" value="/MACHINE:X86"
if="${platform == 'win32'}" />
@@ -323,6 +327,21 @@
       <arg value='/outputresource:".\${configuration}${static}_${platform}\saslPLAIN.dll;#2"'
/>
     </exec>

+ <link
+ output="${configuration}_${platform}\saslGSSAPI.dll"
+ options='/INCREMENTAL:NO /NOLOGO /MANIFEST
/MANIFESTFILE:".\${configuration}_${platform}\saslGSSAPI.dll.manifest"
/DEBUG /PDB:".\${configuration}_${platform}/saslGSSAPI.pdb" /DLL
/SUBSYSTEM:WINDOWS /OPT:REF
/IMPLIB:".\${configuration}_${platform}/saslGSSAPI.lib"
${machineoption} ..\..\..\common\kerberos\lib\i386\gssapi32.lib
..\..\..\common\openssl\out32\libeay32.lib
..\..\..\common\openssl\out32\ssleay32.lib
${configuration}_${platform}\libsasl.res ws2_32.lib mswsock.lib
rpcrt4.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib
advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib'>
+ <sources>
+ <include name="${configuration}_${platform}\plugin_common.obj" />
+ <include name="${configuration}_${platform}\gssapi*.obj" />
+ </sources>
+ </link>
+ <exec program="mt.exe">
+ <arg value="-nologo" />
+ <arg value="-manifest" />
+ <arg value=".\${configuration}_${platform}\saslGSSAPI.dll.manifest" />
+ <arg value='/outputresource:".\${configuration}_${platform}\saslGSSAPI.dll;#2"'
/>
+ </exec>
+
     <copy todir="..\..\bin\${configuration}${bindirextension}\bin"
overwrite="true" flatten="true" failonerror="false">
       <fileset>
         <include name="${configuration}${static}_${platform}\*.dll" />

That's it.. Easy uh? :) (did take me a while to get there though)

Jean-Yves

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=2664268

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-09-24 16:55:26 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.