From db0f9af6dff09ba4a87366461405994fb9d90b9b Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Thu, 6 Jul 2017 07:48:15 +0200 Subject: [PATCH] Do not install conflicting file _ldb_text.py --- ...ldb_text.py-if-we-have-system-libldb.patch | 47 +++++++++++++++++++ samba.spec | 6 ++- 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 samba-4.7.0-Do-not-install-_ldb_text.py-if-we-have-system-libldb.patch diff --git a/samba-4.7.0-Do-not-install-_ldb_text.py-if-we-have-system-libldb.patch b/samba-4.7.0-Do-not-install-_ldb_text.py-if-we-have-system-libldb.patch new file mode 100644 index 0000000..e5ba42d --- /dev/null +++ b/samba-4.7.0-Do-not-install-_ldb_text.py-if-we-have-system-libldb.patch @@ -0,0 +1,47 @@ +From 0d674fcf95399292b4a2003df8e2a28909b562a2 Mon Sep 17 00:00:00 2001 +From: Andreas Schneider +Date: Thu, 6 Jul 2017 07:44:28 +0200 +Subject: [PATCH] waf: Do not install _ldb_text.py if we have system libldb + +_ldb_text.py is installed as part of the ldb package and also if you +compile Samba with the system ldb version. This way we have have the +file twice in the same location and run into file confilcts. + +This has already been fixed in the past by + 60dc26bfe1573265dcbd87b9dd3439f945e57d97 + +BUG: https://bugzilla.samba.org/show_bug.cgi?id=12882 + +Signed-off-by: Andreas Schneider +--- + lib/ldb/wscript | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/lib/ldb/wscript b/lib/ldb/wscript +index 7f81fe3..b4ae62a 100644 +--- a/lib/ldb/wscript ++++ b/lib/ldb/wscript +@@ -177,12 +177,15 @@ def build(bld): + realname='ldb.so', + cflags='-DPACKAGE_VERSION=\"%s\"' % VERSION) + +- for env in bld.gen_python_environments(['PKGCONFIGDIR']): +- bld.SAMBA_SCRIPT('_ldb_text.py', +- pattern='_ldb_text.py', +- installdir='python') ++ # Do only install this file as part of the Samba build if we do not ++ # use the system libldb! ++ if not bld.CONFIG_SET('USING_SYSTEM_PYLDB_UTIL'): ++ for env in bld.gen_python_environments(['PKGCONFIGDIR']): ++ bld.SAMBA_SCRIPT('_ldb_text.py', ++ pattern='_ldb_text.py', ++ installdir='python') + +- bld.INSTALL_FILES('${PYTHONARCHDIR}', '_ldb_text.py') ++ bld.INSTALL_FILES('${PYTHONARCHDIR}', '_ldb_text.py') + + if not bld.CONFIG_SET('USING_SYSTEM_LDB'): + if bld.is_install: +-- +2.9.4 + diff --git a/samba.spec b/samba.spec index 4fa8d05..84f9be2 100644 --- a/samba.spec +++ b/samba.spec @@ -6,7 +6,7 @@ # ctdb is enabled by default, you can disable it with: --without clustering %bcond_without clustering -%define main_release 2 +%define main_release 3 %define samba_version 4.7.0 %define talloc_version 2.1.9 @@ -119,6 +119,7 @@ Source201: README.downgrade Patch0: samba-4.7.0-unittests-Add-missing-stdint.h-include.patch Patch1: samba-4.7.0-waf-Only-build-unit-tests-with-selftest-enabled.patch Patch2: samba-4.7.0-unittests-Do-not-install-the-test_dummy-rpc-module.patch +Patch3: samba-4.7.0-Do-not-install-_ldb_text.py-if-we-have-system-libldb.patch Requires(pre): /usr/sbin/groupadd Requires(post): systemd @@ -2654,6 +2655,9 @@ rm -rf %{buildroot} %endif # with_clustering_support %changelog +* Thu Jul 06 2017 Andreas Schneider - 4.7.0-3.rc1 +- Do not install conflicting file _ldb_text.py + * Wed Jul 05 2017 Andreas Schneider - 4.7.0-2.rc1 - Fix requirement generation for shared libraries