rpms/hardinfo/devel libzfix.patch,NONE,1.1 hardinfo.spec,1.17,1.18

Adel Gadllah (drago01) fedora-extras-commits at redhat.com
Sun Sep 2 09:08:08 UTC 2007


Author: drago01

Update of /cvs/pkgs/rpms/hardinfo/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17084

Modified Files:
	hardinfo.spec 
Added Files:
	libzfix.patch 
Log Message:
fix bug 274381

libzfix.patch:

--- NEW FILE libzfix.patch ---
diff -upNr hardinfo-0.4.2.2.orign/arch/common/zlib.h hardinfo-0.4.2.2/arch/common/zlib.h
--- hardinfo-0.4.2.2.orign/arch/common/zlib.h	2007-07-20 16:44:59.000000000 +0200
+++ hardinfo-0.4.2.2/arch/common/zlib.h	2007-09-02 11:01:14.000000000 +0200
@@ -24,15 +24,20 @@ benchmark_zlib(void)
     static gint (*compress) (gchar *dst, glong *dstlen,
                              const gchar *src, glong srclen) = NULL;
 
+    char* libz_locations[5] = {"libz","/usr/lib/libz.so","/usr/lib64/libz.so","/usr/lib/libz.so.1","/usr/lib64/libz.so.1"};
+    int z;
+
     if (!(compress && compressBound)) {
-	libz = g_module_open("libz", G_MODULE_BIND_LAZY);
+	
+	for(z = 0; z<5; z++) {
+		libz = g_module_open(libz_locations[z] , G_MODULE_BIND_LAZY);
+		if(libz) break;
+	}
+
 	if (!libz) {
-            libz = g_module_open("/usr/lib/libz.so", G_MODULE_BIND_LAZY);
-            if (!libz) {
                 g_warning("Cannot load ZLib: %s", g_module_error());
                 return;
-            }
-	}
+        }	
 
 	if (!g_module_symbol(libz, "compress", (gpointer) & compress)
 	    || !g_module_symbol(libz, "compressBound", (gpointer) & compressBound)) {


Index: hardinfo.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hardinfo/devel/hardinfo.spec,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- hardinfo.spec	15 Aug 2007 13:11:16 -0000	1.17
+++ hardinfo.spec	2 Sep 2007 09:07:35 -0000	1.18
@@ -1,6 +1,6 @@
 Name: hardinfo
 Version: 0.4.2.2
-Release: 17%{?dist}
+Release: 18%{?dist}
 Summary: System Profiler and Benchmark      
 
 Group: Applications/System     
@@ -10,8 +10,8 @@
 Patch0: multilibfix.patch  
 Patch1: fixsensors.patch
 Patch2: fixuserdsp.patch
-Patch3: debug.patch
 Patch4: fix_crash.patch
+Patch5: libzfix.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  gtk2-devel
@@ -34,10 +34,10 @@
 %patch1 -p1 -b .fixsensors
 #use correct uids
 %patch2 -p1 -b .fixuserdsp
-#enable debug output
-#%patch3 -p1 -b .debug
 #fix double free bug
 %patch4 -p1 -b .crash
+#fix libz.so detection
+%patch5 -p1 -b .libzfix
 
 %build
 export LIBDIR=%{_libdir}
@@ -69,6 +69,9 @@
 
 
 %changelog
+* Sun Sep 02 2007 Adel Gadllah <adel.gadllah at gmail.com> 0.4.2.2-18
+- Fix libz detection RH #274381
+
 * Wed Aug 15 2007 Adel Gadllah <adel.gadllah at gmail.com> 0.4.2.2-17
 - Disable debug 
 




More information about the scm-commits mailing list