From 93f6c554cf2fdb243815396c322878f27ec47e63 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Jan 18 2019 14:53:35 +0000 Subject: Fix detection of HAVE_LARGEFILE with python2 --- diff --git a/0001-Fix-detection-of-HAVE_LARGEFILE-with-python2.patch b/0001-Fix-detection-of-HAVE_LARGEFILE-with-python2.patch new file mode 100644 index 0000000..bace4c2 --- /dev/null +++ b/0001-Fix-detection-of-HAVE_LARGEFILE-with-python2.patch @@ -0,0 +1,75 @@ +From 4b2829af05e4a1ebf2ba29d84cb43245e1577dd5 Mon Sep 17 00:00:00 2001 +From: Lukas Slebodnik +Date: Thu, 17 Jan 2019 21:03:15 +0100 +Subject: [PATCH] Fix detection of HAVE_LARGEFILE with python2 + +There is an assertion if "getconf LFS_CFLAGS" does not return empty string. + + File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Scripting.py", line 158, in waf_entry_point + run_commands() + File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Scripting.py", line 251, in run_commands + ctx = run_command(cmd_name) + File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Scripting.py", line 235, in run_command + ctx.execute() + File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Configure.py", line 159, in execute + super(ConfigurationContext, self).execute() + File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Context.py", line 204, in execute + self.recurse([os.path.dirname(g_module.root_path)]) + File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Context.py", line 286, in recurse + user_function(self) + File "/builddir/build/BUILD/talloc-2.1.15/wscript", line 37, in configure + conf.RECURSE('lib/replace') + File "./buildtools/wafsamba/samba_utils.py", line 33, in fun + return f(*k, **kw) + File "./buildtools/wafsamba/samba_utils.py", line 436, in RECURSE + return ctx.recurse(relpath) + File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Context.py", line 286, in recurse + user_function(self) + File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Utils.py", line 816, in wrap + ret = fun(*k) + File "/builddir/build/BUILD/talloc-2.1.15/lib/replace/wscript", line 30, in configure + conf.RECURSE('buildtools/wafsamba') + File "./buildtools/wafsamba/samba_utils.py", line 33, in fun + return f(*k, **kw) + File "./buildtools/wafsamba/samba_utils.py", line 436, in RECURSE + return ctx.recurse(relpath) + File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Context.py", line 286, in recurse + user_function(self) + File "/builddir/build/BUILD/talloc-2.1.15/third_party/waf/waflib/Utils.py", line 816, in wrap + ret = fun(*k) + File "/builddir/build/BUILD/talloc-2.1.15/buildtools/wafsamba/wscript", line 481, in configure + if not conf.CHECK_LARGEFILE(): + File "./buildtools/wafsamba/samba_utils.py", line 33, in fun + return f(*k, **kw) + File "./buildtools/wafsamba/samba_conftests.py", line 100, in CHECK_LARGEFILE + conf.DEFINE(flag_split[0], '1') + File "./buildtools/wafsamba/samba_utils.py", line 33, in fun + return f(*k, **kw) + File "./buildtools/wafsamba/samba_autoconf.py", line 20, in DEFINE + conf.define(d, v, quote=quote) + File "./buildtools/wafsamba/samba_utils.py", line 33, in fun + return f(*k, **kw) + File "./buildtools/wafsamba/samba_waf18.py", line 89, in define + assert key and isinstance(key, str) +AssertionError + +Signed-off-by: Lukas Slebodnik +--- + buildtools/wafsamba/samba_conftests.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/buildtools/wafsamba/samba_conftests.py b/buildtools/wafsamba/samba_conftests.py +index c0b9ae4929649692c9870edf28e8e0aa94fca113..af3b82e25f1366b74f57659978e272a075588447 100644 +--- a/buildtools/wafsamba/samba_conftests.py ++++ b/buildtools/wafsamba/samba_conftests.py +@@ -86,6 +86,7 @@ def CHECK_LARGEFILE(conf, define='HAVE_LARGEFILE'): + '''see what we need for largefile support''' + getconf_cflags = conf.CHECK_COMMAND(['getconf', 'LFS_CFLAGS']); + if getconf_cflags is not False: ++ getconf_cflags = str(getconf_cflags) + if (conf.CHECK_CODE('return !(sizeof(off_t) >= 8)', + define='WORKING_GETCONF_LFS_CFLAGS', + execute=True, +-- +2.20.1 + diff --git a/libtdb.spec b/libtdb.spec index d97fc99..8d102e1 100644 --- a/libtdb.spec +++ b/libtdb.spec @@ -24,6 +24,9 @@ License: LGPLv3+ URL: http://tdb.samba.org/ Source: http://samba.org/ftp/tdb/tdb-%{version}.tar.gz +# Patches +Patch0001: 0001-Fix-detection-of-HAVE_LARGEFILE-with-python2.patch + BuildRequires: gcc BuildRequires: libxslt BuildRequires: docbook-style-xsl @@ -36,8 +39,6 @@ BuildRequires: python3-devel Provides: bundled(libreplace) -# Patches - %description A library that implements a trivial database.