diff options
-rw-r--r-- | common/dhash/Makefile.am | 22 | ||||
-rw-r--r-- | common/dhash/README | 1 | ||||
-rw-r--r-- | common/dhash/configure.ac | 2 | ||||
-rw-r--r-- | common/dhash/examples/dhash_example.c (renamed from common/dhash/dhash_example.c) | 0 | ||||
-rw-r--r-- | common/dhash/examples/dhash_test.c (renamed from common/dhash/dhash_test.c) | 0 | ||||
-rw-r--r-- | contrib/sssd.spec.in | 56 | ||||
-rw-r--r-- | server/Makefile.am | 15 | ||||
-rw-r--r-- | server/configure.ac | 1 | ||||
-rw-r--r-- | server/external/libdhash.m4 | 12 |
9 files changed, 94 insertions, 15 deletions
diff --git a/common/dhash/Makefile.am b/common/dhash/Makefile.am index de3c34d2..d5a56187 100644 --- a/common/dhash/Makefile.am +++ b/common/dhash/Makefile.am @@ -8,22 +8,28 @@ endif ACLOCAL_AMFLAGS = -I m4 pkgconfigdir = $(libdir)/pkgconfig -dist_noinst_DATA = \ - dhash.pc \ - m4 +dist_pkgconfig_DATA = dhash.pc -noinst_LTLIBRARIES = libdhash.la -libdhash_la_SOURCES = \ - dhash.c \ - dhash.h +dist_noinst_DATA = m4 + +dist_include_HEADERS = dhash.h + +lib_LTLIBRARIES = libdhash.la +libdhash_la_SOURCES = dhash.c +libdhash_la_LDFLAGS = \ + -version-info 1:0:0 check_PROGRAMS = dhash_test dhash_example TESTS = $(check_PROGRAMS) +dhash_test_SOURCES = examples/dhash_test.c dhash_test_LDADD = dhash.o + +dhash_example_SOURCES = examples/dhash_example.c dhash_example_LDADD = dhash.o examplesdir = $(docdir)/examples -dist_noinst_DATA += dhash_test.c dhash_example.c +dist_examples_DATA = examples/dhash_test.c examples/dhash_example.c +dist_doc_DATA = README tests: all $(check_PROGRAMS) diff --git a/common/dhash/README b/common/dhash/README new file mode 100644 index 00000000..bee5024e --- /dev/null +++ b/common/dhash/README @@ -0,0 +1 @@ +Documentation for libdhash can be found in dhash.h diff --git a/common/dhash/configure.ac b/common/dhash/configure.ac index bd210287..1012afbb 100644 --- a/common/dhash/configure.ac +++ b/common/dhash/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([dhash], [0.3.3], [jdennis@redhat.com]) +AC_INIT([dhash], [0.4.0], [jdennis@redhat.com]) AC_CONFIG_SRCDIR([dhash.c]) AC_CONFIG_AUX_DIR([build]) AM_INIT_AUTOMAKE([-Wall -Werror foreign]) diff --git a/common/dhash/dhash_example.c b/common/dhash/examples/dhash_example.c index 7ed01d71..7ed01d71 100644 --- a/common/dhash/dhash_example.c +++ b/common/dhash/examples/dhash_example.c diff --git a/common/dhash/dhash_test.c b/common/dhash/examples/dhash_test.c index 27eb88d5..27eb88d5 100644 --- a/common/dhash/dhash_test.c +++ b/common/dhash/examples/dhash_test.c diff --git a/contrib/sssd.spec.in b/contrib/sssd.spec.in index b723df5a..65080a98 100644 --- a/contrib/sssd.spec.in +++ b/contrib/sssd.spec.in @@ -12,6 +12,8 @@ URL: http://www.freeipa.org/ Source0: %{name}-%{version}.tar.gz BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) +%define dhash_version 0.4.0 + ### Patches ### ### Dependencies ### @@ -19,6 +21,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) Requires: libldb >= 0.9.3 Requires: libtdb >= 1.1.3 Requires: sssd-client = %{version}-%{release} +Requires: libdhash = %{dhash_version}-%{release} Requires: cyrus-sasl-gssapi Requires(post): python Requires(preun): initscripts chkconfig @@ -76,6 +79,28 @@ Group: Applications/System Provides the libraries needed by the PAM and NSS stacks to connect to the SSSD service. +%package -n libdhash +Summary: Dynamic hash table +Group: Development/Libraries +Version: %{dhash_version} +License: LGPLv3+ + +%description -n libdhash +A hash table which will dynamically resize to achieve optimal storage & access +time properties + +%package -n libdhash-devel +Summary: Development files for libdhash +Group: Development/Libraries +Version: %{dhash_version} +Requires: libdhash = %{dhash_version}-%{release} +License: LGPLv3+ + +%description -n libdhash-devel +A hash table which will dynamically resize to achieve optimal storage & access +time properties + + %prep %setup -q @@ -88,7 +113,8 @@ KRB5_LIBS=-lkrb5 \ --with-pipe-path=%{pipepath} \ --with-pubconf-path=%{pubconfpath} \ --with-init-dir=%{_initrddir} \ - --enable-nsslibdir=/%{_lib} + --enable-nsslibdir=/%{_lib} \ + --disable-static make %{?_smp_mflags} @@ -97,6 +123,14 @@ rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT +# Remove the example files from the output directory +# We will copy them directly from the source directory +# for packaging +rm -f \ + $RPM_BUILD_ROOT/usr/share/doc/dhash/README \ + $RPM_BUILD_ROOT/usr/share/doc/dhash/examples/dhash_example.c \ + $RPM_BUILD_ROOT/usr/share/doc/dhash/examples/dhash_test.c + # Prepare language files /usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT sss_daemon /usr/lib/rpm/find-lang.sh $RPM_BUILD_ROOT sss_client @@ -111,6 +145,7 @@ install -m400 server/config/etc/sssd.api.d/* $RPM_BUILD_ROOT%{_sysconfdir}/sssd/ rm -f \ $RPM_BUILD_ROOT/%{_lib}/libnss_sss.la \ $RPM_BUILD_ROOT/%{_lib}/security/pam_sss.la \ + $RPM_BUILD_ROOT/%{_libdir}/libdhash.la \ $RPM_BUILD_ROOT/%{_libdir}/ldb/memberof.la \ $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_ldap.la \ $RPM_BUILD_ROOT/%{_libdir}/sssd/libsss_proxy.la \ @@ -182,6 +217,21 @@ rm -rf $RPM_BUILD_ROOT /%{_lib}/security/pam_sss.so %{_mandir}/man8/pam_sss.8* +%files -n libdhash +%defattr(-,root,root,-) +%doc common/dhash/COPYING +%doc common/dhash/COPYING.LESSER +%{_libdir}/libdhash.so.1 +%{_libdir}/libdhash.so.1.0.0 + +%files -n libdhash-devel +%defattr(-,root,root,-) +%{_includedir}/dhash.h +%{_libdir}/libdhash.so +%{_libdir}/pkgconfig/dhash.pc +%doc common/dhash/README +%doc common/dhash/examples + %post /sbin/ldconfig /sbin/chkconfig --add %{servicename} @@ -206,6 +256,10 @@ fi %postun client -p /sbin/ldconfig +%post -n libdhash -p /sbin/ldconfig + +%postun -n libdhash -p /sbin/ldconfig + %changelog * Mon Sep 28 2009 Sumit Bose <sbose@redhat.com> - 0.6.0-0 - New upstream release 0.6.0 diff --git a/server/Makefile.am b/server/Makefile.am index 989b39e6..100189d4 100644 --- a/server/Makefile.am +++ b/server/Makefile.am @@ -145,11 +145,16 @@ INI_CFG_LIBS = \ -L$(builddir)/../common/ini/.libs/ \ -lini_config -DHASH_CFLAGS = \ - -I$(srcdir)/../common/dhash -DHASH_LIBS = \ - -L$(builddir)/../common/dhash/ \ - -ldhash +if HAVE_SYSTEM_DHASH + DHASH_CFLAGS = $(SYSTEM_DHASH_CFLAGS) + DHASH_LIBS = $(SYSTEM_DHASH_LIBS) +else + DHASH_CFLAGS = \ + -I$(srcdir)/../common/dhash + DHASH_LIBS = \ + -L$(builddir)/../common/dhash/ \ + -ldhash +endif AM_CPPFLAGS = -Wall \ -Iinclude \ diff --git a/server/configure.ac b/server/configure.ac index 72b15cd0..4f560239 100644 --- a/server/configure.ac +++ b/server/configure.ac @@ -62,6 +62,7 @@ m4_include([external/libtalloc.m4]) m4_include([external/libtdb.m4]) m4_include([external/libtevent.m4]) m4_include([external/libldb.m4]) +m4_include([external/libdhash.m4]) m4_include([external/pam.m4]) m4_include([external/ldap.m4]) m4_include([external/libpcre.m4]) diff --git a/server/external/libdhash.m4 b/server/external/libdhash.m4 new file mode 100644 index 00000000..e3afdac3 --- /dev/null +++ b/server/external/libdhash.m4 @@ -0,0 +1,12 @@ +AC_SUBST(SYSTEM_DHASH_OBJ) +AC_SUBST(SYSTEM_DHASH_CFLAGS) +AC_SUBST(SYSTEM_DHASH_LIBS) + +PKG_CHECK_MODULES(SYSTEM_DHASH, dhash >= 0.4.0, + have_system_dhash=true, + have_system_dhash=false + ) +# This is future-compatible. Right now, we'll force the use of our +# in-tree copy. When dhash is split off as its own source package, we'll +# fix this test +AM_CONDITIONAL(HAVE_SYSTEM_DHASH, test x$have_system_dhash = xtrue_FORCE_IN_TREE) |