[hivex/f14/master] Fix Python bindings on 32 bit arch with upstream patch.
Richard W.M. Jones
rjones at fedoraproject.org
Thu Apr 28 08:54:53 UTC 2011
commit a61ce6f524903d55792b42220e3afe14c550996c
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Thu Apr 28 09:42:26 2011 +0100
Fix Python bindings on 32 bit arch with upstream patch.
(Cherry picked from commit 5e4fb172e5074acde1f19500a5cb926f8dd30d3b).
....5-python-fix-for-i386-integer-size-issue.patch | 164 ++++++++++++++++++++
hivex.spec | 10 +-
2 files changed, 173 insertions(+), 1 deletions(-)
---
diff --git a/hivex-1.2.5-python-fix-for-i386-integer-size-issue.patch b/hivex-1.2.5-python-fix-for-i386-integer-size-issue.patch
new file mode 100644
index 0000000..bec6169
--- /dev/null
+++ b/hivex-1.2.5-python-fix-for-i386-integer-size-issue.patch
@@ -0,0 +1,164 @@
+--- python/hivex-py.c.orig 2011-04-28 09:46:43.687712232 +0100
++++ python/hivex-py.c 2011-04-28 09:46:45.843757332 +0100
+@@ -3,7 +3,7 @@
+ * generator/generator.ml
+ * ANY CHANGES YOU MAKE TO THIS FILE WILL BE LOST.
+ *
+- * Copyright (C) 2009-2010 Red Hat Inc.
++ * Copyright (C) 2009-2011 Red Hat Inc.
+ * Derived from code by Petter Nordahl-Hagen under a compatible license:
+ * Copyright (c) 1997-2007 Petter Nordahl-Hagen.
+ * Derived from code by Markus Stephany under a compatible license:
+@@ -290,7 +290,7 @@
+ PyObject *py_h;
+ long node;
+
+- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_node_name", &py_h, &node))
++ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_node_name", &py_h, &node))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_node_name (h, node);
+@@ -313,7 +313,7 @@
+ PyObject *py_h;
+ long node;
+
+- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_node_children", &py_h, &node))
++ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_node_children", &py_h, &node))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_node_children (h, node);
+@@ -339,7 +339,7 @@
+ long node;
+ char *name;
+
+- if (!PyArg_ParseTuple (args, (char *) "OLs:hivex_node_get_child", &py_h, &node, &name))
++ if (!PyArg_ParseTuple (args, (char *) "Ols:hivex_node_get_child", &py_h, &node, &name))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_node_get_child (h, node, name);
+@@ -367,7 +367,7 @@
+ PyObject *py_h;
+ long node;
+
+- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_node_parent", &py_h, &node))
++ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_node_parent", &py_h, &node))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_node_parent (h, node);
+@@ -390,7 +390,7 @@
+ PyObject *py_h;
+ long node;
+
+- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_node_values", &py_h, &node))
++ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_node_values", &py_h, &node))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_node_values (h, node);
+@@ -415,7 +415,7 @@
+ long node;
+ char *key;
+
+- if (!PyArg_ParseTuple (args, (char *) "OLs:hivex_node_get_value", &py_h, &node, &key))
++ if (!PyArg_ParseTuple (args, (char *) "Ols:hivex_node_get_value", &py_h, &node, &key))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_node_get_value (h, node, key);
+@@ -438,7 +438,7 @@
+ PyObject *py_h;
+ long val;
+
+- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_key", &py_h, &val))
++ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_key", &py_h, &val))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_value_key (h, val);
+@@ -463,7 +463,7 @@
+ PyObject *py_h;
+ long val;
+
+- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_type", &py_h, &val))
++ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_type", &py_h, &val))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_value_type (h, val, &t, &len);
+@@ -488,7 +488,7 @@
+ PyObject *py_h;
+ long val;
+
+- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_value", &py_h, &val))
++ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_value", &py_h, &val))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_value_value (h, val, &t, &len);
+@@ -512,7 +512,7 @@
+ PyObject *py_h;
+ long val;
+
+- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_string", &py_h, &val))
++ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_string", &py_h, &val))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_value_string (h, val);
+@@ -535,7 +535,7 @@
+ PyObject *py_h;
+ long val;
+
+- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_multiple_strings", &py_h, &val))
++ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_multiple_strings", &py_h, &val))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_value_multiple_strings (h, val);
+@@ -560,7 +560,7 @@
+ PyObject *py_h;
+ long val;
+
+- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_dword", &py_h, &val))
++ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_dword", &py_h, &val))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_value_dword (h, val);
+@@ -584,7 +584,7 @@
+ PyObject *py_h;
+ long val;
+
+- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_value_qword", &py_h, &val))
++ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_value_qword", &py_h, &val))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_value_qword (h, val);
+@@ -632,7 +632,7 @@
+ long parent;
+ char *name;
+
+- if (!PyArg_ParseTuple (args, (char *) "OLs:hivex_node_add_child", &py_h, &parent, &name))
++ if (!PyArg_ParseTuple (args, (char *) "Ols:hivex_node_add_child", &py_h, &parent, &name))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_node_add_child (h, parent, name);
+@@ -655,7 +655,7 @@
+ PyObject *py_h;
+ long node;
+
+- if (!PyArg_ParseTuple (args, (char *) "OL:hivex_node_delete_child", &py_h, &node))
++ if (!PyArg_ParseTuple (args, (char *) "Ol:hivex_node_delete_child", &py_h, &node))
+ return NULL;
+ h = get_handle (py_h);
+ r = hivex_node_delete_child (h, node);
+@@ -681,7 +681,7 @@
+ py_set_values values;
+ PyObject *py_values;
+
+- if (!PyArg_ParseTuple (args, (char *) "OLO:hivex_node_set_values", &py_h, &node, &py_values))
++ if (!PyArg_ParseTuple (args, (char *) "OlO:hivex_node_set_values", &py_h, &node, &py_values))
+ return NULL;
+ h = get_handle (py_h);
+ if (get_values (py_values, &values) == -1)
+@@ -710,7 +710,7 @@
+ hive_set_value val;
+ PyObject *py_val;
+
+- if (!PyArg_ParseTuple (args, (char *) "OLO:hivex_node_set_value", &py_h, &node, &py_val))
++ if (!PyArg_ParseTuple (args, (char *) "OlO:hivex_node_set_value", &py_h, &node, &py_val))
+ return NULL;
+ h = get_handle (py_h);
+ if (get_value (py_val, &val) == -1)
diff --git a/hivex.spec b/hivex.spec
index 0dde316..e1a93f9 100644
--- a/hivex.spec
+++ b/hivex.spec
@@ -7,7 +7,7 @@
Name: hivex
Version: 1.2.5
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Read and write Windows Registry binary hive files
Group: Development/Libraries
@@ -34,6 +34,9 @@ BuildRequires: libxml2-devel
# the old version of libguestfs that included this library:
Conflicts: libguestfs <= 1:1.0.84
+# Fix Python bindings on 32 bit arch (patch is upstream).
+Patch1: hivex-1.2.5-python-fix-for-i386-integer-size-issue.patch
+
%description
Hive files are the undocumented binary blobs that Windows uses to
@@ -114,6 +117,8 @@ perl-%{name} contains Perl bindings for %{name}.
%prep
%setup -q
+%patch1 -p0 -b .32bit
+
%build
%configure --disable-static
@@ -197,6 +202,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Thu Apr 28 2011 Richard W.M. Jones <rjones at redhat.com> - 1.2.5-2
+- Fix Python bindings on 32 bit arch with upstream patch.
+
* Wed Apr 13 2011 Richard W.M. Jones <rjones at redhat.com> - 1.2.5-1
- New upstream version 1.2.5.
- This version fixes a number of important memory issues found by
More information about the scm-commits
mailing list