summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2009-01-30 11:55:46 -0500
committerSimo Sorce <idra@samba.org>2009-02-24 13:43:46 -0500
commit795e12d8315c4f7f0d4b2abb77fb49e0417e362a (patch)
tree13ec245e3986b82cc1be367fcae8d29329ff9fc9 /server
parentf2e97d2a437ec0a231275a7140773a03d5732148 (diff)
downloadsssd-795e12d8315c4f7f0d4b2abb77fb49e0417e362a.tar.gz
sssd-795e12d8315c4f7f0d4b2abb77fb49e0417e362a.tar.bz2
sssd-795e12d8315c4f7f0d4b2abb77fb49e0417e362a.zip
Spec file patch Take 2:
Adding support for generating RPMS for sssd. Fixing TDB autoconf macros to require version 1.1.3 and support for the tdb_repack symbol (required by LDB) Updating tdb.h to #include <sys/stat.h> for proper autoconf Build system modifications to simplify RPM generation Fixing RPM build system as recommended during code review Minor tweaks to Makefile and sssd.spec Make policykit and infopipe configurable Soname and symlinks
Diffstat (limited to 'server')
-rw-r--r--server/conf_macros.m437
-rw-r--r--server/confdb/confdb.c4
-rw-r--r--server/configure.ac4
-rw-r--r--server/external/libtdb.m47
-rw-r--r--server/nss/nsssrv_packet.c2
-rw-r--r--server/server.mk10
6 files changed, 46 insertions, 18 deletions
diff --git a/server/conf_macros.m4 b/server/conf_macros.m4
index 33290d89..2c182cc1 100644
--- a/server/conf_macros.m4
+++ b/server/conf_macros.m4
@@ -58,16 +58,35 @@ AC_DEFUN(WITH_PIPE_PATH,
AC_DEFINE_UNQUOTED(PIPE_PATH, "$pipepath", [Where to store pipe files for the SSSD interconnects])
])
-AC_DEFUN(WITH_DBUS_SYSBUS_PATH,
- [ AC_ARG_WITH([dbus-sysbus-path],
- [AC_HELP_STRING([--with-dbus-sysbus-path=PATH],
- [Where to store policy files for the D-BUS system bus [/etc/dbus-1/system.d]]
+AC_DEFUN(WITH_POLICYKIT,
+ [ AC_ARG_WITH([policykit],
+ [AC_HELP_STRING([--with-policykit],
+ [Whether to include PolicyKit support [yes]]
)
- ]
+ ],
+ [],
+ with_policykit=yes
)
- sysbuspath="/etc/dbus-1/system.d"
- if test x"$with_dbus_sysbus_path" != x; then
- sysbuspath=$with_dbus_sysbus_path
+ if test x"$with_policykit" == xyes; then
+ AC_DEFINE(HAVE_POLICYKIT, 1, [Include PolicyKit support])
+ HAVE_POLICYKIT=1
+ AC_SUBST(HAVE_POLICYKIT)
fi
- AC_SUBST(sysbuspath)
])
+
+AC_DEFUN(WITH_INFOPIPE,
+ [ AC_ARG_WITH([infopipe],
+ [AC_HELP_STRING([--with-infopipe],
+ [Whether to include InfoPipe support [yes]]
+ )
+ ],
+ [],
+ with_infopipe=yes
+ )
+ if test x"$with_infopipe" == xyes; then
+ AC_DEFINE(HAVE_INFOPIPE, 1, [Include InfoPipe support])
+ HAVE_INFOPIPE=1
+ AC_SUBST(HAVE_INFOPIPE)
+ fi
+ ])
+
diff --git a/server/confdb/confdb.c b/server/confdb/confdb.c
index 72967d20..743ce277 100644
--- a/server/confdb/confdb.c
+++ b/server/confdb/confdb.c
@@ -515,6 +515,7 @@ static int confdb_init_db(struct confdb_ctx *cdb)
if (ret != EOK) goto done;
/* InfoPipe */
+#ifdef HAVE_INFOPIPE
/* Set the sssd_info description */
val[0] = "InfoPipe Configuration";
ret = confdb_add_param(cdb, false, "config/services/infp", "description", val);
@@ -529,8 +530,10 @@ static int confdb_init_db(struct confdb_ctx *cdb)
val[0] = "infp";
ret = confdb_add_param(cdb, false, "config/services", "activeServices", val);
if (ret != EOK) goto done;
+#endif
/* PolicyKit */
+#ifdef HAVE_POLICYKIT
/* Set the sssd_pk description */
val[0] = "PolicyKit Backend Configuration";
ret = confdb_add_param(cdb, false, "config/services/spk", "description", val);
@@ -545,6 +548,7 @@ static int confdb_init_db(struct confdb_ctx *cdb)
val[0] = "spk";
ret = confdb_add_param(cdb, false, "config/services", "activeServices", val);
if (ret != EOK) goto done;
+#endif
/* Domains */
val[0] = "Domains served by SSSD";
diff --git a/server/configure.ac b/server/configure.ac
index 4ef3ffc9..b2f73b2e 100644
--- a/server/configure.ac
+++ b/server/configure.ac
@@ -34,13 +34,15 @@ AC_SUBST(SSSD_INTROSPECT_PATH)
m4_include(build_macros.m4)
BUILD_WITH_SHARED_BUILD_DIR
+AC_LD_SONAMEFLAG
m4_include(conf_macros.m4)
WITH_DB_PATH
WITH_PLUGIN_PATH
WITH_PID_PATH
WITH_PIPE_PATH
-WITH_DBUS_SYSBUS_PATH
+WITH_INFOPIPE
+WITH_POLICYKIT
m4_include(pkg.m4)
m4_include(libpopt.m4)
diff --git a/server/external/libtdb.m4 b/server/external/libtdb.m4
index 8c2cab70..196bc5cc 100644
--- a/server/external/libtdb.m4
+++ b/server/external/libtdb.m4
@@ -2,6 +2,7 @@ AC_SUBST(TDB_OBJ)
AC_SUBST(TDB_CFLAGS)
AC_SUBST(TDB_LIBS)
-AC_CHECK_HEADER(tdb.h,
- [AC_CHECK_LIB(tdb, tdb_open, [TDB_LIBS="-ltdb"]) ],
- [PKG_CHECK_MODULES(TDB, tdb >= 1.1.0)])
+AC_CHECK_HEADERS([tdb.h],
+ [AC_CHECK_LIB(tdb, tdb_repack, [TDB_LIBS="-ltdb"], [AC_MSG_ERROR([TDB must support tdb_repack])]) ],
+ [PKG_CHECK_MODULES(TDB, tdb >= 1.1.3)]
+)
diff --git a/server/nss/nsssrv_packet.c b/server/nss/nsssrv_packet.c
index bdf453f6..f79087d4 100644
--- a/server/nss/nsssrv_packet.c
+++ b/server/nss/nsssrv_packet.c
@@ -23,7 +23,7 @@
#include <sys/socket.h>
#include <string.h>
#include <errno.h>
-#include "../talloc/talloc.h"
+#include "talloc.h"
#include "util/util.h"
#include "nss/nsssrv.h"
diff --git a/server/server.mk b/server/server.mk
index c256477e..b37be9fa 100644
--- a/server/server.mk
+++ b/server/server.mk
@@ -65,11 +65,13 @@ sbin/sssd_info: $(INFOPIPE_OBJ) $(UTIL_OBJ)
sbin/sssd_pk: $(POLKIT_OBJ) $(UTIL_OBJ)
$(CC) -o sbin/sssd_pk $(POLKIT_OBJ) $(UTIL_OBJ) $(LDFLAGS) $(LIBS)
-lib/libsss_proxy.$(SHLIBEXT): $(PROXY_BE_OBJ)
- $(SHLD) $(SHLD_FLAGS) -o $@ $(PROXY_BE_OBJ) $(LDFLAGS) $(LIBS)
+lib/$(PROXY_BE_SOBASE): $(PROXY_BE_OBJ)
+ $(SHLD) $(SHLD_FLAGS) $(SONAMEFLAG)$(PROXY_BE_SONAME) -o lib/$(PROXY_BE_SOLIB) $(PROXY_BE_OBJ) $(LDFLAGS) $(LIBS)
+ ln -fs $(PROXY_BE_SOLIB) $@
-lib/memberof.$(SHLIBEXT): $(MEMBEROF_OBJ)
- $(SHLD) $(SHLD_FLAGS) -o $@ $(MEMBEROF_OBJ) $(LDFLAGS) $(LDB_LIBS)
+lib/$(MEMBEROF_SOBASE): $(MEMBEROF_OBJ)
+ $(SHLD) $(SHLD_FLAGS) $(SONAMEFLAG)$(MEMBEROF_SONAME) -o lib/$(MEMBEROF_SOLIB) $(MEMBEROF_OBJ) $(LDFLAGS) $(LDB_LIBS)
+ ln -fs $(MEMBEROF_SOLIB) $@
#Tests
tests/sysdb-tests: $(SYSDB_TEST_OBJ) $(UTIL_OBJ)