Hello community,

here is the log from the commit of package bulk_extractor for openSUSE:Factory 
checked in at 2013-09-23 08:47:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/bulk_extractor (Old)
 and      /work/SRC/openSUSE:Factory/.bulk_extractor.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "bulk_extractor"

Changes:
--------
--- /work/SRC/openSUSE:Factory/bulk_extractor/bulk_extractor.changes    
2013-09-13 16:14:12.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.bulk_extractor.new/bulk_extractor.changes       
2013-09-23 08:47:20.000000000 +0200
@@ -1,0 +2,12 @@
+Mon Sep 16 21:43:59 UTC 2013 - [email protected]
+
+- fix powerpc32 build (have_atomic.patch)
+
+-------------------------------------------------------------------
+Mon Sep 16 14:41:11 UTC 2013 - [email protected]
+
+- fixes CPUID used on non-x86 architectures (dfxml_nonx86.patch)
+  upstream commint dd05ebf2db10f5a737bc53b9c0396025a951e022
+- replaces be-1.3.1-cpuid.patch.
+
+-------------------------------------------------------------------

Old:
----
  be-1.3.1-cpuid.patch

New:
----
  dfxml_nonx86.patch
  have_atomic.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ bulk_extractor.spec ++++++
--- /var/tmp/diff_new_pack.xhjYB6/_old  2013-09-23 08:47:22.000000000 +0200
+++ /var/tmp/diff_new_pack.xhjYB6/_new  2013-09-23 08:47:22.000000000 +0200
@@ -25,14 +25,18 @@
 Url:            
https://github.com/simsong/bulk_extractor/wiki/Introducing-bulk_extractor
 Source:         
http://digitalcorpora.org/downloads/bulk_extractor/bulk_extractor-1.4.0.tar.gz
 Source2:        be-1.4.0-announcement.pdf
-# PATCH-FIX-UPSTREAM be-1.3.1-cpuid.patch [allow build on non-x86]
-Patch1:         be-1.3.1-cpuid.patch
+# PATCH-FIX-UPSTREAM be-1.3.1-cpuid.patch [replaced with dfxml_nonx86.patch]
+# Patch1:         be-1.3.1-cpuid.patch
 # PATCH-FIX-UPSTREAM ppc-cpuid.patch [allow build on PPC]
 Patch2:         ppc-cpuid.patch
 # PATCH-FIX-OPENSUSE be-1.3.1-remove-date-time.patch [remove __DATE__ and 
__TIME__]
 Patch3:         be-1.4.0-remove-date-time.patch
 # PATCH-FIX-OPENSUSE be-1.3.1-remove-debug-program [/usr/bin/plugin_test 
should not be installed]
 Patch4:         be-1.4.0-remove-debug-program.patch
+# PATCH-FIX-UPSTREAM dfxml_nonx86.patch [ cpuid missing on nonx86 platforms ]
+Patch5:         dfxml_nonx86.patch
+# PATCH-FIX-UPSTREAM have_atomic.patch [ wrap sync_add_and_fetch ]
+Patch6:         have_atomic.patch
 BuildRequires:  afflib-devel
 BuildRequires:  flex
 BuildRequires:  gcc-c++
@@ -55,10 +59,11 @@
 
 %prep
 %setup -q
-# %%patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
+%patch6 -p1
 sed -i 's|-jar `pwd -P`/BEViewer.jar|-jar %{_datadir}/%{name}/BEViewer.jar|' 
java_gui/BEViewer
 cp "%{SOURCE2}" .
 

++++++ dfxml_nonx86.patch ++++++
Index: bulk_extractor-1.4.0/src/dfxml/src/dfxml_writer.cpp
===================================================================
--- bulk_extractor-1.4.0.orig/src/dfxml/src/dfxml_writer.cpp
+++ bulk_extractor-1.4.0/src/dfxml/src/dfxml_writer.cpp
@@ -382,10 +382,16 @@ void dfxml_writer::set_oneline(bool v)
     oneline = v;
 }
 
+#ifdef HAVE_ASM_CPUID
+#ifndef __WORDSIZE
+#define __WORDSIZE 32
+#endif
 
 void dfxml_writer::cpuid(uint32_t op, unsigned long *eax, unsigned long *ebx,
                 unsigned long *ecx, unsigned long *edx) {
-#if defined(__i386__) && defined(__PIC__)
+#ifdef HAVE_ASM_CPUID
+#if defined(__i386__)
+#if defined(__PIC__)
     __asm__ __volatile__("pushl %%ebx      \n\t" /* save %ebx */
                          "cpuid            \n\t"
                          "movl %%ebx, %1   \n\t" /* save what cpuid just put 
in %ebx */
@@ -400,19 +406,17 @@ void dfxml_writer::cpuid(uint32_t op, un
                          : "cc");
 
 #endif
+#endif
+#endif
 }
 
 
 
 void dfxml_writer::add_cpuid()
 {
-#ifdef HAVE_ASM_CPUID
-#ifndef __WORDSIZE
-#define __WORDSIZE 32
-#endif
-#define b(val, base, end) ((val << (__WORDSIZE-end-1)) >> 
(__WORDSIZE-end+base-1))
+#define BFIX(val, base, end) ((val << (__WORDSIZE-end-1)) >> 
(__WORDSIZE-end+base-1))
     char buf[256];
-    unsigned long eax, ebx, ecx, edx;
+    unsigned long eax=0, ebx=0, ecx=0, edx=0; // =0 avoids a compiler warning
     cpuid(0, &eax, &ebx, &ecx, &edx);
     
     snprintf(buf,sizeof(buf),"%.4s%.4s%.4s", (char *)&ebx, (char *)&edx, (char 
*)&ecx);
@@ -420,21 +424,22 @@ void dfxml_writer::add_cpuid()
     xmlout("identification",buf);
 
     cpuid(1, &eax, &ebx, &ecx, &edx);
-    xmlout("family", (int64_t) b(eax, 8, 11));
-    xmlout("model", (int64_t) b(eax, 4, 7));
-    xmlout("stepping", (int64_t) b(eax, 0, 3));
-    xmlout("efamily", (int64_t) b(eax, 20, 27));
-    xmlout("emodel", (int64_t) b(eax, 16, 19));
-    xmlout("brand", (int64_t) b(ebx, 0, 7));
-    xmlout("clflush_size", (int64_t) b(ebx, 8, 15) * 8);
-    xmlout("nproc", (int64_t) b(ebx, 16, 23));
-    xmlout("apicid", (int64_t) b(ebx, 24, 31));
+    xmlout("family", (int64_t) BFIX(eax, 8, 11));
+    xmlout("model", (int64_t) BFIX(eax, 4, 7));
+    xmlout("stepping", (int64_t) BFIX(eax, 0, 3));
+    xmlout("efamily", (int64_t) BFIX(eax, 20, 27));
+    xmlout("emodel", (int64_t) BFIX(eax, 16, 19));
+    xmlout("brand", (int64_t) BFIX(ebx, 0, 7));
+    xmlout("clflush_size", (int64_t) BFIX(ebx, 8, 15) * 8);
+    xmlout("nproc", (int64_t) BFIX(ebx, 16, 23));
+    xmlout("apicid", (int64_t) BFIX(ebx, 24, 31));
     
     cpuid(0x80000006, &eax, &ebx, &ecx, &edx);
-    xmlout("L1_cache_size", (int64_t) b(ecx, 16, 31) * 1024);
+    xmlout("L1_cache_size", (int64_t) BFIX(ecx, 16, 31) * 1024);
     pop();
-#endif
+#undef BFIX
 }
+#endif
 
 void dfxml_writer::add_DFXML_execution_environment(const std::string 
&command_line)
 {
++++++ have_atomic.patch ++++++
Index: bulk_extractor-1.4.0/src/be13_api/feature_recorder.cpp
===================================================================
--- bulk_extractor-1.4.0.orig/src/be13_api/feature_recorder.cpp
+++ bulk_extractor-1.4.0/src/be13_api/feature_recorder.cpp
@@ -642,7 +642,15 @@ std::string feature_recorder::carve(cons
      * that's okay, because the second one will fail.
      */
 
+#ifdef HAVE__SYNC_ADD_AND_FETCH
     uint64_t this_file_number = __sync_add_and_fetch(&file_number,1);
+#else
+    uint64_t this_file_number = 0;
+    {
+        cppmutex::lock lock(Mf);
+        this_file_number = file_number++;
+    }
+#endif
 
     std::string dirname1 = outdir + "/" + name;
     std::stringstream ss;
Index: bulk_extractor-1.4.0/src/be13_api/plugin.cpp
===================================================================
--- bulk_extractor-1.4.0.orig/src/be13_api/plugin.cpp
+++ bulk_extractor-1.4.0/src/be13_api/plugin.cpp
@@ -672,7 +672,9 @@ void be13::plugin::process_sbuf(const cl
         std::stringstream ss;
         ss << "<buflen>" << sp.sbuf.bufsize  << "</buflen>";
         if(alert_recorder && dup_data_alerts) 
alert_recorder->write(sp.sbuf.pos0,"DUP SBUF "+md5.hexdigest(),ss.str());
+#ifdef HAVE__SYNC_ADD_AND_FETCH
         __sync_add_and_fetch(&dup_data_encountered,sp.sbuf.bufsize);
+#endif
     }
 
     /* Determine if the sbuf consists of a repeating ngram. If so,
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to