[samba4/f17] Fix configure to parse version numbers correctly.
asn
asn at fedoraproject.org
Mon Jun 25 12:24:19 UTC 2012
commit e90b932e4bbb0846e5c0947b3d6aa660782fae00
Author: Andreas Schneider <asn at cryptomilk.org>
Date: Mon Jun 25 13:45:19 2012 +0200
Fix configure to parse version numbers correctly.
samba4-4.0.0beta1-fix-python-version-parsing.patch | 68 ++++++++++++++++++++
samba4.spec | 3 +
2 files changed, 71 insertions(+), 0 deletions(-)
---
diff --git a/samba4-4.0.0beta1-fix-python-version-parsing.patch b/samba4-4.0.0beta1-fix-python-version-parsing.patch
new file mode 100644
index 0000000..428738d
--- /dev/null
+++ b/samba4-4.0.0beta1-fix-python-version-parsing.patch
@@ -0,0 +1,68 @@
+commit 7cf78902dc63ec0db1f2310aa0e32d884ca96491
+Author: Jelmer Vernooij <jelmer at samba.org>
+AuthorDate: Mon Apr 9 20:05:06 2012 +0200
+Commit: Jelmer Vernooij <jelmer at samba.org>
+CommitDate: Mon Apr 9 23:16:17 2012 +0200
+
+ wafsamba: Parse Python versions as integers separated by dots.
+
+ This causes tdb "1.2.10" to no longer be considered older than "1.2.9".
+
+ Autobuild-User: Jelmer Vernooij <jelmer at samba.org>
+ Autobuild-Date: Mon Apr 9 23:16:17 CEST 2012 on sn-devel-104
+---
+ buildtools/wafsamba/samba_bundled.py | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
+index 7fc0fb9..6df7454 100644
+--- a/buildtools/wafsamba/samba_bundled.py
++++ b/buildtools/wafsamba/samba_bundled.py
+@@ -209,6 +209,9 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
+ return False
+
+
++def tuplize_version(version_string):
++ return tuple([int(x) for x in version.split(".")])
++
+ @runonce
+ @conf
+ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
+@@ -233,7 +236,7 @@ def CHECK_BUNDLED_SYSTEM_PYTHON(conf, libname, modulename, minversion='0.0.0'):
+ except AttributeError:
+ found = False
+ else:
+- found = tuple(version.split(".")) >= tuple(minversion.split("."))
++ found = tuplize_version(version) >= tuplize_version(minversion)
+ if not found and not conf.LIB_MAY_BE_BUNDLED(libname):
+ Logs.error('ERROR: Python module %s of version %s not found, and bundling disabled' % (libname, minversion))
+ sys.exit(1)
+commit 800a9d8bc3d6805dd297e65c8d32efc74a1329b3
+Author: Jelmer Vernooij <jelmer at samba.org>
+AuthorDate: Tue Apr 10 00:45:20 2012 +0200
+Commit: Jelmer Vernooij <jelmer at samba.org>
+CommitDate: Tue Apr 10 02:21:39 2012 +0200
+
+ wafsamba/bundled: Fix typo in tuplize_version.
+
+ Autobuild-User: Jelmer Vernooij <jelmer at samba.org>
+ Autobuild-Date: Tue Apr 10 02:21:39 CEST 2012 on sn-devel-104
+---
+ buildtools/wafsamba/samba_bundled.py | 2 +-
+ buildtools/wafsamba/tests/__init__.py | 1 +
+ .../tests/{__init__.py => test_bundled.py} | 23 +++++++-------------
+ 3 files changed, 10 insertions(+), 16 deletions(-)
+
+diff --git a/buildtools/wafsamba/samba_bundled.py b/buildtools/wafsamba/samba_bundled.py
+index 6df7454..c5b4022 100644
+--- a/buildtools/wafsamba/samba_bundled.py
++++ b/buildtools/wafsamba/samba_bundled.py
+@@ -209,7 +209,7 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
+ return False
+
+
+-def tuplize_version(version_string):
++def tuplize_version(version):
+ return tuple([int(x) for x in version.split(".")])
+
+ @runonce
diff --git a/samba4.spec b/samba4.spec
index 8c08935..3bb09f0 100644
--- a/samba4.spec
+++ b/samba4.spec
@@ -79,6 +79,7 @@ Patch5: samba4-4.0.0-alpha19-CVE-2012-1182.patch
Patch6: samba4-4.0.0-alpha20-lib-private.patch
Patch7: samba4-CVE-2012-2111.patch
Patch8: samba4-4.0.0-beta1-fix-s3-daemon-memory-leaks.patch
+Patch9: samba4-4.0.0beta1-fix-python-version-parsing.patch
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
@@ -366,6 +367,7 @@ link against the SMB, RPC and other protocols.
%patch6 -p1 -b .private-lib
%patch7 -p1 -b .CVE-2012-2111
%patch8 -p1 -b .daemon_mem_leaks
+%patch9 -p1 -b .python_version_parsing
%build
%define _talloc_lib %nil
@@ -1237,6 +1239,7 @@ rm -rf %{buildroot}
%changelog
* Mon Jun 25 2012 Andreas Schneider <asn at redhat.com> - 2:4.0.0-56.alpha18
- Make sure we fail if we don't find python modules of system libraries.
+- Fix configure to parse version numbers correctly.
* Fri Jun 22 2012 Andreas Schneider <asn at redhat.com> - 2:4.0.0-56.alpha18
- Add missing BuildRequires for python bindings.
More information about the scm-commits
mailing list