rpms/globus-common/EL-5 globus-common-mingw.patch, NONE, 1.1 globus-common-pathmax.patch, NONE, 1.1 globus-common.spec, 1.4, 1.5 import.log, 1.4, 1.5

Mattias Ellert ellert at fedoraproject.org
Mon Jun 15 15:40:23 UTC 2009


Author: ellert

Update of /cvs/pkgs/rpms/globus-common/EL-5
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv27308/EL-5

Modified Files:
	globus-common.spec import.log 
Added Files:
	globus-common-mingw.patch globus-common-pathmax.patch 
Log Message:
* Tue Jun 02 2009 Mattias Ellert <mattias.ellert at fysast.uu.se> - 10.2-5
- Update to official Fedora Globus packaging guidelines


globus-common-mingw.patch:

--- NEW FILE globus-common-mingw.patch ---
diff -ur globus_common-10.2.orig/library/globus_common_include.h globus_common-10.2/library/globus_common_include.h
--- globus_common-10.2.orig/library/globus_common_include.h	2008-03-12 20:01:04.000000000 +0100
+++ globus_common-10.2/library/globus_common_include.h	2009-05-10 09:54:07.000000000 +0200
@@ -95,7 +95,7 @@
 #endif
 
 #if defined(TARGET_ARCH_WIN32)
-#   include <Winsock2.h>
+#   include <winsock2.h>
 #   include <process.h>
 #   include <io.h>
 #   include <sys/timeb.h>
diff -ur globus_common-10.2.orig/library/globus_libc.c globus_common-10.2/library/globus_libc.c
--- globus_common-10.2.orig/library/globus_libc.c	2008-04-05 05:09:41.000000000 +0200
+++ globus_common-10.2/library/globus_libc.c	2009-05-10 09:54:07.000000000 +0200
@@ -80,11 +80,13 @@
     char *                              buffer,
     size_t                              buflen);
 
+#if !defined(TARGET_ARCH_WIN32)
 static void
 globus_l_libc_copy_pwd_data_to_buffer(
     struct passwd *                     pwd,
     char *                              buffer,
     size_t                              buflen);
+#endif
 
 /******************************************************************************
 Function: globus_libc_lock()
diff -ur globus_common-10.2.orig/library/globus_libc.h globus_common-10.2/library/globus_libc.h
--- globus_common-10.2.orig/library/globus_libc.h	2008-04-05 05:09:41.000000000 +0200
+++ globus_common-10.2/library/globus_libc.h	2009-05-10 09:54:07.000000000 +0200
@@ -287,11 +287,13 @@
     const time_t *timep, 
     struct tm *result);
 
+#if !defined(TARGET_ARCH_WIN32)
 int globus_libc_getpwnam_r(char *name,
 			   struct passwd *pwd,
 			   char *buffer,
 			   int bufsize,
 			   struct passwd **result);
+#endif
 
 int
 globus_libc_strncasecmp(
diff -ur globus_common-10.2.orig/library/globus_libtool_windows.c globus_common-10.2/library/globus_libtool_windows.c
--- globus_common-10.2.orig/library/globus_libtool_windows.c	2008-03-12 20:01:05.000000000 +0100
+++ globus_common-10.2/library/globus_libtool_windows.c	2009-05-10 10:06:04.000000000 +0200
@@ -68,7 +68,7 @@
     HANDLE                  hDllHandle;
     char                    pcFileName[MAX_FILE_NAME_Z];
     int                     iRefCount;
-    } DllModule, *pDllModule;
+    } DllModule;
     
 
 // Static Variables
@@ -255,6 +255,7 @@
 lt_dlhandle lt_dlopenext (const char *filename)
 {
 pDllModule pModule = NULL;
+char *ffilename = NULL;
 
     // Check Argument
     if(!filename) {
@@ -273,8 +274,13 @@
         return NULL;
         }
         
+    // If there will be modules with sonames other than 0 this will not work
+    ffilename = malloc(strlen(filename) + 3);
+    strncpy(ffilename, filename, strlen(filename) + 1);
+    strcat(ffilename, "-0");
+
     // Is This Module Already Open?
-    pModule = FindLoadedModuleByName(filename);
+    pModule = FindLoadedModuleByName(ffilename);
     if(pModule) {
         // Bump The Reference Count
         pModule->iRefCount += 1;
@@ -284,6 +290,7 @@
         
         // Return The Address Of The Data Struct As The Handle
         iLastError = 0;
+        free (ffilename);
         return (lt_dlhandle) pModule;
         }
     
@@ -292,7 +299,7 @@
     //       Section Before Doing The Open, But That Would Require A Mechanism
     //       To Prevent A Second Request For The Same Module To Be Handled While
     //       A First One Is In Progress - This Is A "Later If Needed" Item
-    pModule = OpenModule(filename);
+    pModule = OpenModule(ffilename);
     if(pModule) {
         // Bump The Reference Count
         pModule->iRefCount += 1;
@@ -300,6 +307,7 @@
         // Return The Module
         LeaveCriticalSection(&csLibLock);
         iLastError = 0;
+        free (ffilename);
         return (lt_dlhandle) pModule;
         }
     
@@ -308,6 +316,7 @@
         
     // Not Found Or Opened
     iLastError = LT_ERROR_DEPLIB_NOT_FOUND;
+    free (ffilename);
     return (lt_dlhandle) pModule;
 }
 
@@ -635,7 +644,9 @@
         }
     
     // Try To Load The Library
+    SetDllDirectory(user_search_path);
     DllHandle = LoadLibrary(NormName);
+    SetDllDirectory(NULL);
     if(DllHandle == NULL) {
         return NULL;
         }    
diff -ur globus_common-10.2.orig/library/globus_uuid.c globus_common-10.2/library/globus_uuid.c
--- globus_common-10.2.orig/library/globus_uuid.c	2008-03-12 20:01:05.000000000 +0100
+++ globus_common-10.2/library/globus_uuid.c	2009-05-10 09:54:07.000000000 +0200
@@ -17,8 +17,8 @@
 #include "globus_common_include.h"
 #include "globus_libc.h"
 #ifdef WIN32
-#include <Iptypes.h>
-#include <Iphlpapi.h>
+#include <iptypes.h>
+#include <iphlpapi.h>
 typedef unsigned __int64 uint64_t;
 typedef unsigned short uint16_t;
 typedef unsigned char uint8_t;

globus-common-pathmax.patch:

--- NEW FILE globus-common-pathmax.patch ---
diff -ur globus_common-10.2.orig/library/globus_common.h.in globus_common-10.2/library/globus_common.h.in
--- globus_common-10.2.orig/library/globus_common.h.in	2006-01-19 06:54:14.000000000 +0100
+++ globus_common-10.2/library/globus_common.h.in	2009-06-03 16:03:07.000000000 +0200
@@ -115,11 +115,6 @@
 #endif
 #endif
 
-#if !defined(MAXPATHLEN) 
-#   include <sys/param.h>
-#   define MAXPATHLEN PATH_MAX
-#endif
-
 /* most network-related functions (getpeername, getsockname,...) have
    an int* as argument, except AIX which uses size_t*. This will
    masquerade the difference. */
diff -ur globus_common-10.2.orig/library/globus_libc.c globus_common-10.2/library/globus_libc.c
--- globus_common-10.2.orig/library/globus_libc.c	2008-04-05 05:09:41.000000000 +0200
+++ globus_common-10.2/library/globus_libc.c	2009-06-03 16:39:35.000000000 +0200
@@ -46,10 +46,7 @@
 #include <arpa/inet.h>
 #endif
 
-#if !defined(MAXPATHLEN)
-#   include <sys/param.h>
-#   define MAXPATHLEN PATH_MAX
-#endif
+#include <stddef.h> /* For offsetof() */
 
 /* HPUX 10.20 headers do not define this */
 #if defined(TARGET_ARCH_HPUX)
@@ -2218,7 +2215,7 @@
     static globus_mutex_t   gethomedir_mutex;
     static int              initialized = GLOBUS_FALSE;
     static struct passwd    pw;
-    static char             homedir[MAXPATHLEN];
+    static char *           homedir;
     static int              homedir_len = 0;
     static char             buf[1024];
     int                     rc;
@@ -2258,7 +2255,8 @@
 	    if (!rc && p)
 	    {
 		len = strlen(p);
-		if (len+1 < MAXPATHLEN)
+		homedir = globus_malloc(len + 1);
+		if (homedir)
 		{
 		    memcpy(homedir, p, len);
 		    homedir[len] = '\0';
@@ -2556,9 +2554,6 @@
 	struct dirent *tmpdir, *entry;
 	int save_errno;
 
-	entry = (struct dirent *) globus_malloc(sizeof(struct dirent)
-						+ MAXPATHLEN
-						+ 1);
 	globus_libc_lock();
 
 	tmpdir = readdir(dirp);
@@ -2570,13 +2565,15 @@
 
 	    globus_libc_unlock();
 
-            globus_free(entry);
-
 	    errno = save_errno;
 
 	    return -1;
 	}
 
+	entry = (struct dirent *) globus_malloc(offsetof(struct dirent, d_name)
+						+ strlen(tmpdir->d_name)
+						+ 1);
+
 	/* copy returned buffer into data structure */
 	entry->d_ino = tmpdir->d_ino;
 #       if defined(GLOBUS_HAVE_DIRENT_OFF)
@@ -2619,8 +2616,8 @@
 #       if defined(GLOBUS_HAVE_READDIR_R_3)
 	{
 	    int rc = 0;
-	    struct dirent *entry = globus_malloc(sizeof(struct dirent)
-						 + MAXPATHLEN
+	    struct dirent *entry = globus_malloc(offsetof(struct dirent, d_name)
+						 + NAME_MAX
 						 + 1);
 
 	    rc = readdir_r(dirp, entry, result);
@@ -2634,8 +2631,8 @@
 	}
 #       elif defined(GLOBUS_HAVE_READDIR_R_2)
 	{
-	    struct dirent *entry = globus_malloc(sizeof(struct dirent)
-						 + MAXPATHLEN
+	    struct dirent *entry = globus_malloc(offsetof(struct dirent, d_name)
+						 + NAME_MAX
 						 + 1);
 	    int rc=0;
 


Index: globus-common.spec
===================================================================
RCS file: /cvs/pkgs/rpms/globus-common/EL-5/globus-common.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- globus-common.spec	27 Apr 2009 20:39:38 -0000	1.4
+++ globus-common.spec	15 Jun 2009 15:39:53 -0000	1.5
@@ -10,7 +10,7 @@ Name:		globus-common
 %global _name %(tr - _ <<< %{name})
 Version:	10.2
 %global setupversion 2.6
-Release:	4%{?dist}
+Release:	5%{?dist}
 Summary:	Globus Toolkit - Common Library
 
 Group:		System Environment/Libraries
@@ -63,9 +63,15 @@ Patch8:		%{name}-extradist.patch
 #		Check for function removed from newer versions of libltdl:
 #		http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=6578
 Patch9:		%{name}-ltdlmutex.patch
+#		Fixes for mingw compilation:
+#		http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=6742
+Patch10:	%{name}-mingw.patch
+#		Not all platforms defines PATH_MAX:
+#		http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=6755
+Patch11:	%{name}-pathmax.patch
 #		Configure options not propagated in globus common setup:
 #		http://bugzilla.globus.org/bugzilla/show_bug.cgi?id=6467
-Patch10:	%{name}-setup.patch
+Patch12:	%{name}-setup.patch
 BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Requires:	globus-libtool >= 1
@@ -73,18 +79,11 @@ BuildRequires:	grid-packaging-tools
 BuildRequires:	globus-libtool-devel >= 1
 BuildRequires:	globus-core >= 4
 BuildRequires:	doxygen
-%if %{?fedora}%{!?fedora:0} >= 3
-BuildRequires:	graphviz
-BuildRequires:	ghostscript
-%else
-%if %{?rhel}%{!?rhel:0} >= 5
 BuildRequires:	graphviz
 BuildRequires:	ghostscript
 %if "%{?rhel}" == "5"
 BuildRequires:	graphviz-gd
 %endif
-%endif
-%endif
 %if %{?fedora}%{!?fedora:0} >= 9
 BuildRequires:	tex(latex)
 %else
@@ -173,8 +172,10 @@ Common Library Documentation Files
 %patch7 -p1 -b .age
 %patch8 -p1 -b .extradist
 %patch9 -p1 -b .ltdlmutex
+%patch10 -p1 -b .mingw
+%patch11 -p1 -b .pathmax
 cd %{_name}_setup-%{setupversion}
-%patch10 -p1 -b .setup
+%patch12 -p1 -b .setup
 cd -
 
 # custom perl requires that removes dependency on gpt perl modules
@@ -262,15 +263,15 @@ my \$metadata = new Grid::GPT::Setup(pac
 \$metadata->finish();
 EOF
 
+GLOBUSPACKAGEDIR=$RPM_BUILD_ROOT%{_datadir}/globus/packages
+
 # Remove libtool archives (.la files)
 find $RPM_BUILD_ROOT%{_libdir} -name 'lib*.la' -exec rm -v '{}' \;
-sed '/lib.*\.la$/d' \
-  -i $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/%{flavor}_rtl.filelist
+sed '/lib.*\.la$/d' -i $GLOBUSPACKAGEDIR/%{_name}/%{flavor}_rtl.filelist
 
 # Remove static libraries (.a files)
 find $RPM_BUILD_ROOT%{_libdir} -name 'lib*.a' -exec rm -v '{}' \;
-sed '/lib.*\.a$/d' \
-  -i $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/%{flavor}_dev.filelist
+sed '/lib.*\.a$/d' -i $GLOBUSPACKAGEDIR/%{_name}/%{flavor}_dev.filelist
 
 # Generate pkg-config file from GPT metadata
 mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgconfig
@@ -278,51 +279,51 @@ mkdir -p $RPM_BUILD_ROOT%{_libdir}/pkgco
   $RPM_BUILD_ROOT%{_libdir}/pkgconfig/%{name}.pc
 
 # Move globus-makefile-header to devel package
-grep globus-makefile-header \
-  $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/%{flavor}_pgm.filelist \
-  >> $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/%{flavor}_dev.filelist
+grep globus-makefile-header $GLOBUSPACKAGEDIR/%{_name}/%{flavor}_pgm.filelist \
+  >> $GLOBUSPACKAGEDIR/%{_name}/%{flavor}_dev.filelist
 sed /globus-makefile-header/d \
-  -i $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/%{flavor}_pgm.filelist
+  -i $GLOBUSPACKAGEDIR/%{_name}/%{flavor}_pgm.filelist
 
 # Remove config.guess file (conflicts with grid-packaging-tools package)
 rm $RPM_BUILD_ROOT%{_datadir}/globus/config.guess
-sed /config.guess/d \
-  -i $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/noflavor_data.filelist
+sed /config.guess/d -i $GLOBUSPACKAGEDIR/%{_name}/noflavor_data.filelist
 
 # Move documentation to default RPM location
 mv $RPM_BUILD_ROOT%{_docdir}/%{_name} \
   $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
 sed s!doc/%{_name}!doc/%{name}-%{version}! \
-  -i $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/noflavor_doc.filelist
+  -i $GLOBUSPACKAGEDIR/%{_name}/noflavor_doc.filelist
 
 # Fix doxygen glitches
 for f in $RPM_BUILD_ROOT%{_mandir}/man3/*.h.3 ; do
   sed 's/P\.RS/P\n.RS/' -i $f
 done
 
-# Remove unwanted documentation
-rm -f $RPM_BUILD_ROOT%{_mandir}/man3/deprecated.3
+# Remove unwanted documentation (needed for RHEL4)
 rm -f $RPM_BUILD_ROOT%{_mandir}/man3/*_%{_name}-%{version}_*.3
-sed -e '/deprecated\.3/d' \
-    -e '/_%{_name}-%{version}_.*\.3/d' \
-  -i $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/noflavor_doc.filelist
+sed -e '/_%{_name}-%{version}_.*\.3/d' \
+  -i $GLOBUSPACKAGEDIR/%{_name}/noflavor_doc.filelist
+
+# Remove deprecated.3 man page (too common name)
+rm -f $RPM_BUILD_ROOT%{_mandir}/man3/deprecated.3
+sed -e '/deprecated\.3/d' -i $GLOBUSPACKAGEDIR/%{_name}/noflavor_doc.filelist
 
 # Install license file
 mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
 install -m 644 -p GLOBUS_LICENSE $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
 
 # Generate package filelists
-cat $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/%{flavor}_rtl.filelist \
+cat $GLOBUSPACKAGEDIR/%{_name}/%{flavor}_rtl.filelist \
   | sed s!^!%{_prefix}! > package.filelist
-cat $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/%{flavor}_pgm.filelist \
-    $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/noflavor_data.filelist \
-    $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}_setup/noflavor_pgm.filelist \
-    $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}_setup/noflavor_rtl.filelist \
-    $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}_setup/noflavor_data.filelist \
+cat $GLOBUSPACKAGEDIR/%{_name}/%{flavor}_pgm.filelist \
+    $GLOBUSPACKAGEDIR/%{_name}/noflavor_data.filelist \
+    $GLOBUSPACKAGEDIR/%{_name}_setup/noflavor_pgm.filelist \
+    $GLOBUSPACKAGEDIR/%{_name}_setup/noflavor_rtl.filelist \
+    $GLOBUSPACKAGEDIR/%{_name}_setup/noflavor_data.filelist \
   | sed s!^!%{_prefix}! > package-progs.filelist
-cat $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/%{flavor}_dev.filelist \
+cat $GLOBUSPACKAGEDIR/%{_name}/%{flavor}_dev.filelist \
   | sed s!^!%{_prefix}! > package-devel.filelist
-cat $RPM_BUILD_ROOT%{_datadir}/globus/packages/%{_name}/noflavor_doc.filelist \
+cat $GLOBUSPACKAGEDIR/%{_name}/noflavor_doc.filelist \
   | sed -e 's!/man/.*!&*!' -e 's!^!%doc %{_prefix}!' > package-doc.filelist
 
 # Touch ghost files
@@ -370,6 +371,9 @@ rm -f config.log config.status
 %dir %{_docdir}/%{name}-%{version}/html
 
 %changelog
+* Tue Jun 02 2009 Mattias Ellert <mattias.ellert at fysast.uu.se> - 10.2-5
+- Update to official Fedora Globus packaging guidelines
+
 * Mon Apr 27 2009 Mattias Ellert <mattias.ellert at fysast.uu.se> - 10.2-4
 - Rebuild with updated libtool
 
@@ -392,7 +396,7 @@ rm -f config.log config.status
 - Add s390x to the list of 64 bit platforms
 - Move globus-makefile-header to devel package
 
-* Thu Jan  1 2009 Mattias Ellert <mattias.ellert at fysast.uu.se> - 10.2-0.3
+* Thu Jan 01 2009 Mattias Ellert <mattias.ellert at fysast.uu.se> - 10.2-0.3
 - Adapt to updated GPT package
 
 * Wed Oct 15 2008 Mattias Ellert <mattias.ellert at fysast.uu.se> - 10.2-0.2


Index: import.log
===================================================================
RCS file: /cvs/pkgs/rpms/globus-common/EL-5/import.log,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- import.log	27 Apr 2009 20:39:38 -0000	1.4
+++ import.log	15 Jun 2009 15:39:53 -0000	1.5
@@ -2,3 +2,4 @@ globus-common-10_2-1_fc9:EL-5:globus-com
 globus-common-10_2-2_fc9:EL-5:globus-common-10.2-2.fc9.src.rpm:1240005583
 globus-common-10_2-3_fc9:EL-5:globus-common-10.2-3.fc9.src.rpm:1240329334
 globus-common-10_2-4_fc9:EL-5:globus-common-10.2-4.fc9.src.rpm:1240864741
+globus-common-10_2-5_fc9:EL-5:globus-common-10.2-5.fc9.src.rpm:1245080370




More information about the fedora-extras-commits mailing list