- Add support for libldb 1.0.0
This commit is contained in:
		
							parent
							
								
									8923e26c46
								
							
						
					
					
						commit
						e8ab291d89
					
				
							
								
								
									
										62
									
								
								0002-Fix-module-registration-with-newer-LDB-libraries.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								0002-Fix-module-registration-with-newer-LDB-libraries.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,62 @@ | |||||||
|  | From 23e8d84320ae8b76d244764c02e44036e96cd4df Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Stephen Gallagher <sgallagh@redhat.com> | ||||||
|  | Date: Wed, 9 Feb 2011 15:50:07 -0500 | ||||||
|  | Subject: [PATCH 1/2] Fix module registration with newer LDB libraries. | ||||||
|  | 
 | ||||||
|  | ---
 | ||||||
|  |  Makefile.am                |    1 + | ||||||
|  |  src/ldb_modules/memberof.c |   15 ++++++++++++++- | ||||||
|  |  2 files changed, 15 insertions(+), 1 deletions(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/Makefile.am b/Makefile.am
 | ||||||
|  | index 49520f3..cc78d04 100644
 | ||||||
|  | --- a/Makefile.am
 | ||||||
|  | +++ b/Makefile.am
 | ||||||
|  | @@ -637,6 +637,7 @@ auth_tests_SOURCES = \
 | ||||||
|  |      $(SSSD_UTIL_OBJ) | ||||||
|  |  auth_tests_CFLAGS = \ | ||||||
|  |      $(AM_CFLAGS) \ | ||||||
|  | +    -DSYSDB_TEST \
 | ||||||
|  |      $(CHECK_CFLAGS) | ||||||
|  |  auth_tests_LDADD = \ | ||||||
|  |      $(SSSD_LIBS) \ | ||||||
|  | diff --git a/src/ldb_modules/memberof.c b/src/ldb_modules/memberof.c
 | ||||||
|  | index 311e7e5..55c52fd 100644
 | ||||||
|  | --- a/src/ldb_modules/memberof.c
 | ||||||
|  | +++ b/src/ldb_modules/memberof.c
 | ||||||
|  | @@ -1,7 +1,7 @@
 | ||||||
|  |  /* | ||||||
|  |     SSSD memberof module | ||||||
|  |   | ||||||
|  | -   Copyright (C) Simo Sorce <idra@samba.org> 2008
 | ||||||
|  | +   Copyright (C) Simo Sorce <idra@samba.org> 2008-2011
 | ||||||
|  |   | ||||||
|  |     This program is free software; you can redistribute it and/or modify | ||||||
|  |     it under the terms of the GNU General Public License as published by | ||||||
|  | @@ -17,6 +17,11 @@
 | ||||||
|  |     along with this program.  If not, see <http://www.gnu.org/licenses/>. | ||||||
|  |  */ | ||||||
|  |   | ||||||
|  | +/* Temporary workaround, will be fixed in ldb upstream soon */
 | ||||||
|  | +#ifndef LDB_VERSION
 | ||||||
|  | +#define LDB_VERSION "0.9.22"
 | ||||||
|  | +#endif
 | ||||||
|  | +
 | ||||||
|  |  #include <string.h> | ||||||
|  |  #include "ldb_module.h" | ||||||
|  |  #include "util/util.h" | ||||||
|  | @@ -3623,3 +3628,11 @@ const struct ldb_module_ops ldb_memberof_module_ops = {
 | ||||||
|  |      .modify = memberof_mod, | ||||||
|  |      .del = memberof_del, | ||||||
|  |  }; | ||||||
|  | +
 | ||||||
|  | +int ldb_init_module(const char *version)
 | ||||||
|  | +{
 | ||||||
|  | +#ifdef LDB_MODULE_CHECK_VERSION
 | ||||||
|  | +    LDB_MODULE_CHECK_VERSION(version);
 | ||||||
|  | +#endif
 | ||||||
|  | +    return ldb_register_module(&ldb_memberof_module_ops);
 | ||||||
|  | +}
 | ||||||
|  | -- 
 | ||||||
|  | 1.7.4 | ||||||
|  | 
 | ||||||
							
								
								
									
										95
									
								
								0003-Make-make-check-look-nice-again.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										95
									
								
								0003-Make-make-check-look-nice-again.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,95 @@ | |||||||
|  | From 21f28bdbab10881b9fb0b890dfa15af429326606 Mon Sep 17 00:00:00 2001 | ||||||
|  | From: Sumit Bose <sbose@redhat.com> | ||||||
|  | Date: Fri, 11 Feb 2011 12:57:30 +0100 | ||||||
|  | Subject: [PATCH 2/2] Make 'make check' look nice again | ||||||
|  | 
 | ||||||
|  | With current libldb releases 'make check' will print a lot of 'unable to | ||||||
|  | dlopen' messages although the test will succeed. This patch place the | ||||||
|  | memberof module into a directory of its own to avoid these messages. | ||||||
|  | 
 | ||||||
|  | Additionally this patch introduces TESTS_ENVIRONMENT which allows us to | ||||||
|  | remove the SYSDB_TEST preprocessor definition. | ||||||
|  | ---
 | ||||||
|  |  Makefile.am    |   11 ++++++++--- | ||||||
|  |  src/db/sysdb.c |    8 -------- | ||||||
|  |  2 files changed, 8 insertions(+), 11 deletions(-) | ||||||
|  | 
 | ||||||
|  | diff --git a/Makefile.am b/Makefile.am
 | ||||||
|  | index cc78d04..b445f9c 100644
 | ||||||
|  | --- a/Makefile.am
 | ||||||
|  | +++ b/Makefile.am
 | ||||||
|  | @@ -478,6 +478,12 @@ sss_groupshow_LDADD = \
 | ||||||
|  |  ################# | ||||||
|  |  # Feature Tests # | ||||||
|  |  ################# | ||||||
|  | +TESTS_ENVIRONMENT = LDB_MODULES_PATH=$(abs_top_builddir)/ldb_mod_test_dir
 | ||||||
|  | +
 | ||||||
|  | +ldb_mod_test_dir: memberof.la
 | ||||||
|  | +	mkdir -p $(builddir)/ldb_mod_test_dir
 | ||||||
|  | +	cp $(builddir)/.libs/memberof.so $(builddir)/ldb_mod_test_dir
 | ||||||
|  | +
 | ||||||
|  |  noinst_LTLIBRARIES += \ | ||||||
|  |      libsss_test_common.la | ||||||
|  |   | ||||||
|  | @@ -494,7 +500,6 @@ sysdb_tests_SOURCES = \
 | ||||||
|  |      src/tests/sysdb-tests.c \ | ||||||
|  |      $(SSSD_UTIL_OBJ) | ||||||
|  |  sysdb_tests_CFLAGS = \ | ||||||
|  | -    -DSYSDB_TEST \
 | ||||||
|  |      $(AM_CFLAGS) \ | ||||||
|  |      $(CHECK_CFLAGS) | ||||||
|  |  sysdb_tests_LDADD = \ | ||||||
|  | @@ -637,7 +642,6 @@ auth_tests_SOURCES = \
 | ||||||
|  |      $(SSSD_UTIL_OBJ) | ||||||
|  |  auth_tests_CFLAGS = \ | ||||||
|  |      $(AM_CFLAGS) \ | ||||||
|  | -    -DSYSDB_TEST \
 | ||||||
|  |      $(CHECK_CFLAGS) | ||||||
|  |  auth_tests_LDADD = \ | ||||||
|  |      $(SSSD_LIBS) \ | ||||||
|  | @@ -1023,7 +1027,7 @@ docs:
 | ||||||
|  |  	@exit 1 | ||||||
|  |  endif | ||||||
|  |   | ||||||
|  | -all-local:
 | ||||||
|  | +all-local: ldb_mod_test_dir
 | ||||||
|  |  if BUILD_PYTHON_BINDINGS | ||||||
|  |  	cd $(srcdir)/src/config; $(PYTHON) setup.py build --build-base $(abs_builddir)/src/config | ||||||
|  |  endif | ||||||
|  | @@ -1055,6 +1059,7 @@ if BUILD_PYTHON_BINDINGS
 | ||||||
|  |  	cd $(srcdir)/src/config; $(PYTHON) setup.py build --build-base $(abs_builddir)/src/config clean --all | ||||||
|  |  endif | ||||||
|  |  	rm -Rf doc | ||||||
|  | +	rm -Rf ldb_mod_test_dir
 | ||||||
|  |   | ||||||
|  |  CLEANFILES = *.X */*.X */*/*.X | ||||||
|  |   | ||||||
|  | diff --git a/src/db/sysdb.c b/src/db/sysdb.c
 | ||||||
|  | index 1409149..694ce54 100644
 | ||||||
|  | --- a/src/db/sysdb.c
 | ||||||
|  | +++ b/src/db/sysdb.c
 | ||||||
|  | @@ -889,10 +889,6 @@ static int sysdb_check_upgrade_02(TALLOC_CTX *mem_ctx,
 | ||||||
|  |          goto exit; | ||||||
|  |      } | ||||||
|  |   | ||||||
|  | -#ifdef SYSDB_TEST
 | ||||||
|  | -    ldb_set_modules_dir(ctx->ldb, ABS_BUILD_DIR"/.libs");
 | ||||||
|  | -#endif
 | ||||||
|  | -
 | ||||||
|  |      ret = ldb_connect(ldb, ldb_file, 0, NULL); | ||||||
|  |      if (ret != LDB_SUCCESS) { | ||||||
|  |          ret = EIO; | ||||||
|  | @@ -1563,10 +1559,6 @@ static int sysdb_domain_init_internal(TALLOC_CTX *mem_ctx,
 | ||||||
|  |          return EIO; | ||||||
|  |      } | ||||||
|  |   | ||||||
|  | -#ifdef SYSDB_TEST
 | ||||||
|  | -    ldb_set_modules_dir(ctx->ldb, ABS_BUILD_DIR"/.libs");
 | ||||||
|  | -#endif
 | ||||||
|  | -
 | ||||||
|  |      ret = ldb_connect(ctx->ldb, ctx->ldb_file, 0, NULL); | ||||||
|  |      if (ret != LDB_SUCCESS) { | ||||||
|  |          return EIO; | ||||||
|  | -- 
 | ||||||
|  | 1.7.4 | ||||||
|  | 
 | ||||||
							
								
								
									
										12
									
								
								sssd.spec
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								sssd.spec
									
									
									
									
									
								
							| @ -5,7 +5,7 @@ | |||||||
| 
 | 
 | ||||||
| Name: sssd | Name: sssd | ||||||
| Version: 1.5.1 | Version: 1.5.1 | ||||||
| Release: 4%{?dist} | Release: 5%{?dist} | ||||||
| Group: Applications/System | Group: Applications/System | ||||||
| Summary: System Security Services Daemon | Summary: System Security Services Daemon | ||||||
| License: GPLv3+ | License: GPLv3+ | ||||||
| @ -15,6 +15,8 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | |||||||
| 
 | 
 | ||||||
| ### Patches ### | ### Patches ### | ||||||
| Patch0001: 0001-Sanitize-search-filters-for-nested-group-lookups.patch | Patch0001: 0001-Sanitize-search-filters-for-nested-group-lookups.patch | ||||||
|  | Patch0002: 0002-Fix-module-registration-with-newer-LDB-libraries.patch | ||||||
|  | Patch0003: 0003-Make-make-check-look-nice-again.patch | ||||||
| 
 | 
 | ||||||
| ### Dependencies ### | ### Dependencies ### | ||||||
| 
 | 
 | ||||||
| @ -108,11 +110,12 @@ use with ldap_default_authtok_type = obfuscated_password. | |||||||
| %prep | %prep | ||||||
| %setup -q | %setup -q | ||||||
| 
 | 
 | ||||||
| autoreconf -ivf |  | ||||||
| 
 |  | ||||||
| %patch0001 -p1 | %patch0001 -p1 | ||||||
|  | %patch0002 -p1 | ||||||
|  | %patch0003 -p1 | ||||||
| 
 | 
 | ||||||
| %build | %build | ||||||
|  | autoreconf -ivf | ||||||
| %configure \ | %configure \ | ||||||
|     --with-db-path=%{dbpath} \ |     --with-db-path=%{dbpath} \ | ||||||
|     --with-pipe-path=%{pipepath} \ |     --with-pipe-path=%{pipepath} \ | ||||||
| @ -270,6 +273,9 @@ fi | |||||||
| %postun client -p /sbin/ldconfig | %postun client -p /sbin/ldconfig | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Fri Feb 11 2011 Stephen Gallagher <sgallagh@redhat.com> - 1.5.1-5 | ||||||
|  | - Add support for libldb 1.0.0 | ||||||
|  | 
 | ||||||
| * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-4 | * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.1-4 | ||||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild | - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user