summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2015-04-03 18:14:13 +0200
committerVijay Bellur <vbellur@redhat.com>2015-04-10 11:39:52 +0000
commit6eb27480b6559103e4437facd7aecbcd373479c9 (patch)
tree946b5531baddce4387ac7786f7230c3d52dd1161
parent26cbd3bdf5dad190559afbdf0ac125262c4e90a6 (diff)
build: make contrib/uuid dependency optional
On Linux systems we should use the libuuid from the distribution and not bundle and statically link the contrib/uuid/ bits. libglusterfs/src/compat-uuid.h has been introduced and should become an abstraction layer for different UUID APIs. Non-Linux operating systems should implement their compatibility layer there. Once all operating systems have an implementation in compat-uuid.h, we can remove contrib/uuid/ from the repository completely. Change-Id: I345e5357644be2521685e00358bb8c83c4ea0577 BUG: 1206587 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/10129 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac36
-rw-r--r--glusterfs-api.pc.in1
-rw-r--r--glusterfs.spec.in1
-rw-r--r--libgfchangelog.pc.in1
-rw-r--r--libgfdb.pc.in2
-rw-r--r--libglusterfs/src/Makefile.am44
-rw-r--r--libglusterfs/src/common-utils.h2
-rw-r--r--libglusterfs/src/compat-uuid.h78
-rw-r--r--libglusterfs/src/gfdb/Makefile.am17
-rw-r--r--libglusterfs/src/gfdb/gfdb_data_store_types.h1
-rw-r--r--libglusterfs/src/iatt.h2
-rw-r--r--libglusterfs/src/inode.h2
-rw-r--r--libglusterfs/src/xlator.h1
-rw-r--r--xlators/features/changelog/lib/src/Makefile.am12
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog-api.c2
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog-journal-handler.c2
-rw-r--r--xlators/features/marker/src/marker.h2
-rw-r--r--xlators/mgmt/glusterd/src/Makefile.am2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.h2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-pmap.h2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-sm.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-sm.h2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.h2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.h2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.h2
-rw-r--r--xlators/mount/fuse/src/Makefile.am2
-rw-r--r--xlators/nfs/server/src/mount3.h2
-rw-r--r--xlators/nfs/server/src/nfs-common.h2
-rw-r--r--xlators/nfs/server/src/nfs3-fh.h2
-rw-r--r--xlators/nfs/server/src/nlm4.h2
33 files changed, 160 insertions, 78 deletions
diff --git a/Makefile.am b/Makefile.am
index 3b71fa8a4ea..05c4af767d4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,6 +7,7 @@ EXTRA_DIST = autogen.sh \
build-aux/xdrgen \
contrib/argp-standalone \
contrib/umountd \
+ contrib/uuid \
$(shell find $(top_srcdir)/tests -type f -print)
SUBDIRS = $(ARGP_STANDALONE_DIR) libglusterfs rpc api xlators glusterfsd \
@@ -17,6 +18,7 @@ pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = glusterfs-api.pc libgfchangelog.pc libgfdb.pc
CLEANFILES =
+CONFIG_CLEAN_FILES = $(CONTRIB_BUILDDIR)/uuid/uuid_types.h
gitclean: distclean
find . -name Makefile.in -exec rm -f {} \;
diff --git a/configure.ac b/configure.ac
index 5fe304abf4d..9fe68e948f4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -397,6 +397,19 @@ case $host_os in
esac
AC_SUBST(MATH_LIB)
+dnl use libuuid.so or fall-back to contrib/uuid
+PKG_CHECK_MODULES([UUID], [uuid],
+ [HAVE_LIBUUID=yes
+ AC_DEFINE(HAVE_LIBUUID, 1, [have libuuid.so])
+ PKGCONFIG_UUID=uuid],
+ [HAVE_LIBUUID=no
+ UUID_CFLAGS='-I$(CONTRIBDIR)/uuid'])
+AM_CONDITIONAL([HAVE_LIBUUID], [test x$HAVE_LIBUUID = xyes])
+dnl libglusterfs needs uuid.h, practically everything depends on it
+GF_CPPFLAGS="${GF_CPPFLAGS} ${UUID_CFLAGS}"
+dnl PKGCONFIG_UUID is used for the dependency in *.pc.in files
+AC_SUBST(PKGCONFIG_UUID)
+
dnl NetBSD does not support POSIX ACLs :-(
case $host_os in
*netbsd*)
@@ -837,6 +850,9 @@ if test "x${ac_cv_header_argp_h}" = "xno"; then
ARGP_STANDALONE_DIR='${top_builddir}/contrib/argp-standalone'
fi
+dnl libglusterfs needs argp.h, practically everything depends on it
+GF_CPPFLAGS="${GF_CPPFLAGS} ${ARGP_STANDALONE_CPPFLAGS}"
+
AC_SUBST(ARGP_STANDALONE_CPPFLAGS)
AC_SUBST(ARGP_STANDALONE_LDADD)
AC_SUBST(ARGP_STANDALONE_DIR)
@@ -923,7 +939,7 @@ AC_COMPILE_IFELSE(
AC_MSG_RESULT([$CLANG])
if test "x$CLANG" = "xyes"; then
- GF_COMPILER_FLAGS="-Wno-gnu"
+ GF_CFLAGS="${GF_CFLAGS} -Wno-gnu"
fi
if test "x$ac_cv_header_execinfo_h" = "xno"; then
@@ -937,7 +953,7 @@ if test "x$ac_cv_header_execinfo_h" = "xno"; then
# execinfo.c in ./contrib/libexecinfo uses __builtin_frame_address(n)
# for providing cross platform backtrace*() functions.
if test "x$CLANG" = "xno"; then
- CFLAGS="$CFLAGS -fno-omit-frame-pointer"
+ GF_CFLAGS="${GF_CFLAGS} -fno-omit-frame-pointer"
fi
fi
@@ -969,23 +985,19 @@ prefix=$old_prefix
case $host_os in
linux*)
GF_HOST_OS="GF_LINUX_HOST_OS"
- GF_CFLAGS="${GF_COMPILER_FLAGS} ${ARGP_STANDALONE_CPPFLAGS}"
- GF_LDADD="${ARGP_STANDALONE_LDADD}"
GF_FUSE_CFLAGS="-DFUSERMOUNT_DIR=\\\"\$(bindir)\\\""
GLUSTERD_WORKDIR="${LOCALSTATEDIR}/lib/glusterd"
;;
solaris*)
GF_HOST_OS="GF_SOLARIS_HOST_OS"
- GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -m64"
- GF_LDFLAGS=""
- GF_LDADD="${ARGP_STANDALONE_LDADD}"
+ GF_CFLAGS="${GF_CFLAGS} -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -m64"
BUILD_FUSE_CLIENT=no
FUSE_CLIENT_SUBDIR=""
GLUSTERD_WORKDIR="${LOCALSTATEDIR}/lib/glusterd"
;;
*netbsd*)
GF_HOST_OS="GF_BSD_HOST_OS"
- GF_CFLAGS="${ARGP_STANDALONE_CPPFLAGS} -D_INCOMPLETE_XOPEN_C063"
+ GF_CFLAGS="${GF_CFLAGS} -D_INCOMPLETE_XOPEN_C063"
GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_BASENAME"
GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_DIRNAME"
GF_FUSE_CFLAGS="-DFUSERMOUNT_DIR=\\\"\$(sbindir)\\\""
@@ -1002,7 +1014,7 @@ case $host_os in
;;
*freebsd*)
GF_HOST_OS="GF_BSD_HOST_OS"
- GF_CFLAGS="${GF_COMPILER_FLAGS} ${ARGP_STANDALONE_CPPFLAGS} -O0"
+ GF_CFLAGS="${GF_CFLAGS} ${ARGP_STANDALONE_CPPFLAGS} -O0"
GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_BASENAME"
GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_DIRNAME"
GF_CFLAGS="${GF_CFLAGS} -D_LIBGEN_H_"
@@ -1022,7 +1034,7 @@ case $host_os in
darwin*)
GF_HOST_OS="GF_DARWIN_HOST_OS"
LIBTOOL=glibtool
- GF_CFLAGS="${GF_COMPILER_FLAGS} ${ARGP_STANDALONE_CPPFLAGS} "
+ GF_CFLAGS="${GF_CFLAGS} ${ARGP_STANDALONE_CPPFLAGS} "
GF_CFLAGS="${GF_CFLAGS} -D_REENTRANT -D_XOPEN_SOURCE "
GF_CFLAGS="${GF_CFLAGS} -D_DARWIN_USE_64_BIT_INODE "
GF_CFLAGS="${GF_CFLAGS} -DTHREAD_UNSAFE_BASENAME"
@@ -1239,8 +1251,8 @@ CONTRIBDIR='$(top_srcdir)/contrib'
AC_SUBST(CONTRIBDIR)
GF_CPPDEFINES='-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D$(GF_HOST_OS)'
-GF_CPPINCLUDES='-I$(top_srcdir)/libglusterfs/src -I$(CONTRIBDIR)/uuid'
-GF_CPPFLAGS="$GF_CPPDEFINES $GF_CPPINCLUDES"
+GF_CPPINCLUDES='-I$(top_srcdir)/libglusterfs/src'
+GF_CPPFLAGS="$GF_CPPFLAGS $GF_CPPDEFINES $GF_CPPINCLUDES"
AC_SUBST([GF_CPPFLAGS])
AM_CONDITIONAL([GF_LINUX_HOST_OS], test "${GF_HOST_OS}" = "GF_LINUX_HOST_OS")
diff --git a/glusterfs-api.pc.in b/glusterfs-api.pc.in
index a8bc8ebda99..5d234543414 100644
--- a/glusterfs-api.pc.in
+++ b/glusterfs-api.pc.in
@@ -7,5 +7,6 @@ Name: glusterfs-api
Description: GlusterFS API
/* This is the API version, NOT package version */
Version: @GFAPI_VERSION@
+Requires: @PKGCONFIG_UUID@
Libs: -L${libdir} @GFAPI_LIBS@ -lgfapi -lglusterfs -lgfrpc -lgfxdr
Cflags: -I${includedir}/glusterfs -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -DUSE_POSIX_ACLS=@USE_POSIX_ACLS@
diff --git a/glusterfs.spec.in b/glusterfs.spec.in
index 53b0c8ed602..fe0ef897e41 100644
--- a/glusterfs.spec.in
+++ b/glusterfs.spec.in
@@ -204,6 +204,7 @@ BuildRequires: libaio-devel libacl-devel
BuildRequires: python-devel
BuildRequires: python-ctypes
BuildRequires: userspace-rcu-devel >= 0.7
+BuildRequires: libuuid-devel
%if ( 0%{?_with_cmocka:1} )
BuildRequires: libcmocka-devel >= 1.0.1
%endif
diff --git a/libgfchangelog.pc.in b/libgfchangelog.pc.in
index 398f1233ffe..91c85e6f1f8 100644
--- a/libgfchangelog.pc.in
+++ b/libgfchangelog.pc.in
@@ -7,5 +7,6 @@ includedir=@includedir@
Name: libgfchangelog
Description: GlusterFS Changelog Consumer Library
Version: @LIBGFCHANGELOG_VERSION@
+Requires: @PKGCONFIG_UUID@
Libs: -L${libdir} -lgfchangelog -lglusterfs
Cflags: -I${includedir}/glusterfs/gfchangelog -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64
diff --git a/libgfdb.pc.in b/libgfdb.pc.in
index 15871b92102..945685cde98 100644
--- a/libgfdb.pc.in
+++ b/libgfdb.pc.in
@@ -9,4 +9,4 @@ Description: GlusterFS Database Library
Version: @LIBGFDB_VERSION@
Libs: -L${libdir} -lgfchangedb -lglusterfs
Cflags: -I${includedir}/glusterfs/gfdb
-Requires: sqlite3
+Requires: sqlite3 @PKGCONFIG_UUID@
diff --git a/libglusterfs/src/Makefile.am b/libglusterfs/src/Makefile.am
index 33de0a287c7..09341d164dd 100644
--- a/libglusterfs/src/Makefile.am
+++ b/libglusterfs/src/Makefile.am
@@ -1,13 +1,13 @@
-libglusterfs_la_CFLAGS = -Wall $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS) \
+libglusterfs_la_CFLAGS = $(GF_CFLAGS) $(GF_DARWIN_LIBGLUSTERFS_CFLAGS) \
-DDATADIR=\"$(localstatedir)\"
libglusterfs_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 \
-DXLATORDIR=\"$(libdir)/glusterfs/$(PACKAGE_VERSION)/xlator\" \
-I$(top_srcdir)/rpc/rpc-lib/src/ -I$(CONTRIBDIR)/rbtree \
-I$(CONTRIBDIR)/libexecinfo ${ARGP_STANDALONE_CPPFLAGS} \
- -DSBIN_DIR=\"$(sbindir)\" -lm
+ -DSBIN_DIR=\"$(sbindir)\"
-libglusterfs_la_LIBADD = @LEXLIB@ $(ZLIB_LIBS) $(MATH_LIB)
+libglusterfs_la_LIBADD = @LEXLIB@ $(ZLIB_LIBS) $(MATH_LIB) $(UUID_LIBS)
libglusterfs_la_LDFLAGS = -version-info $(LIBGLUSTERFS_LT_VERSION)
lib_LTLIBRARIES = libglusterfs.la
@@ -20,19 +20,14 @@ libglusterfs_la_SOURCES = dict.c xlator.c logging.c \
compat.c fd.c compat-errno.c event.c mem-pool.c gf-dirent.c syscall.c \
iobuf.c globals.c statedump.c stack.c checksum.c daemon.c timespec.c \
$(CONTRIBDIR)/rbtree/rb.c rbthash.c store.c latency.c \
- graph.c $(CONTRIBDIR)/uuid/clear.c $(CONTRIBDIR)/uuid/copy.c \
- $(CONTRIBDIR)/uuid/gen_uuid.c $(CONTRIBDIR)/uuid/pack.c \
- $(CONTRIBDIR)/uuid/parse.c $(CONTRIBDIR)/uuid/unparse.c \
- $(CONTRIBDIR)/uuid/uuid_time.c $(CONTRIBDIR)/uuid/compare.c \
- $(CONTRIBDIR)/uuid/isnull.c $(CONTRIBDIR)/uuid/unpack.c syncop.c \
- graph-print.c trie.c run.c options.c fd-lk.c circ-buff.c \
- event-history.c gidcache.c ctx.c client_t.c event-poll.c event-epoll.c \
- syncop-utils.c \
- $(CONTRIBDIR)/libgen/basename_r.c $(CONTRIBDIR)/libgen/dirname_r.c \
- $(CONTRIBDIR)/stdlib/gf_mkostemp.c strfd.c parse-utils.c \
- $(CONTRIBDIR)/mount/mntent.c $(CONTRIBDIR)/libexecinfo/execinfo.c\
- quota-common-utils.c rot-buffs.c $(CONTRIBDIR)/timer-wheel/timer-wheel.c \
- $(CONTRIBDIR)/timer-wheel/find_last_bit.c
+ graph.c syncop.c graph-print.c trie.c run.c options.c fd-lk.c \
+ circ-buff.c event-history.c gidcache.c ctx.c client_t.c event-poll.c \
+ event-epoll.c syncop-utils.c $(CONTRIBDIR)/libgen/basename_r.c \
+ $(CONTRIBDIR)/libgen/dirname_r.c $(CONTRIBDIR)/stdlib/gf_mkostemp.c \
+ strfd.c parse-utils.c $(CONTRIBDIR)/mount/mntent.c \
+ $(CONTRIBDIR)/libexecinfo/execinfo.c quota-common-utils.c rot-buffs.c \
+ $(CONTRIBDIR)/timer-wheel/timer-wheel.c \
+ $(CONTRIBDIR)/timer-wheel/find_last_bit.c
nodist_libglusterfs_la_SOURCES = y.tab.c graph.lex.c
@@ -43,16 +38,24 @@ noinst_HEADERS = common-utils.h defaults.h dict.h glusterfs.h hashfn.h timespec.
fd.h revision.h compat-errno.h event.h mem-pool.h byte-order.h \
gf-dirent.h locking.h syscall.h iobuf.h globals.h statedump.h \
checksum.h daemon.h $(CONTRIBDIR)/rbtree/rb.h store.h\
- rbthash.h iatt.h latency.h mem-types.h $(CONTRIBDIR)/uuid/uuidd.h \
- $(CONTRIBDIR)/uuid/uuid.h $(CONTRIBDIR)/uuid/uuidP.h \
- $(CONTRIB_BUILDDIR)/uuid/uuid_types.h syncop.h graph-utils.h trie.h \
+ rbthash.h iatt.h latency.h mem-types.h syncop.h graph-utils.h trie.h \
run.h options.h lkowner.h fd-lk.h circ-buff.h event-history.h \
gidcache.h client_t.h glusterfs-acl.h glfs-message-id.h \
template-component-messages.h strfd.h syncop-utils.h parse-utils.h \
$(CONTRIBDIR)/mount/mntent_compat.h lvm-defaults.h \
$(CONTRIBDIR)/libexecinfo/execinfo_compat.h \
unittest/unittest.h quota-common-utils.h rot-buffs.h \
- $(CONTRIBDIR)/timer-wheel/timer-wheel.h
+ $(CONTRIBDIR)/timer-wheel/timer-wheel.h compat-uuid.h
+
+if !HAVE_LIBUUID
+# FIXME: unbundle libuuid, see compat-uuid.h.
+libglusterfs_la_SOURCES += $(CONTRIBDIR)/uuid/clear.c \
+ $(CONTRIBDIR)/uuid/copy.c $(CONTRIBDIR)/uuid/gen_uuid.c \
+ $(CONTRIBDIR)/uuid/pack.c $(CONTRIBDIR)/uuid/parse.c \
+ $(CONTRIBDIR)/uuid/unparse.c $(CONTRIBDIR)/uuid/uuid_time.c \
+ $(CONTRIBDIR)/uuid/compare.c $(CONTRIBDIR)/uuid/isnull.c \
+ $(CONTRIBDIR)/uuid/unpack.c
+endif
libgfchangelog_HEADERS = changelog.h
@@ -66,7 +69,6 @@ y.tab.h: graph.y
$(YACC) -p graphyy -d $(srcdir)/graph.y
CLEANFILES = graph.lex.c y.tab.c y.tab.h
-CONFIG_CLEAN_FILES = $(CONTRIB_BUILDDIR)/uuid/uuid_types.h
if UNITTEST
CLEANFILES += *.gcda *.gcno *_xunit.xml
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index a93c6233a4e..057c4aeb8dc 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -41,7 +41,7 @@ void trap (void);
#include "glusterfs.h"
#include "locking.h"
#include "mem-pool.h"
-#include "uuid.h"
+#include "compat-uuid.h"
#define STRINGIFY(val) #val
#define TOSTRING(val) STRINGIFY(val)
diff --git a/libglusterfs/src/compat-uuid.h b/libglusterfs/src/compat-uuid.h
new file mode 100644
index 00000000000..4161b958508
--- /dev/null
+++ b/libglusterfs/src/compat-uuid.h
@@ -0,0 +1,78 @@
+/*
+ * Copyright (c) 2015 Red Hat, Inc. <http://www.redhat.com>
+ * This file is part of GlusterFS.
+ *
+ * This file is licensed to you under your choice of the GNU Lesser
+ * General Public License, version 3 or any later version (LGPLv3 or
+ * later), or the GNU General Public License, version 2 (GPLv2), in all
+ * cases as published by the Free Software Foundation.
+ */
+
+#ifndef _GF_UUID_H
+#define _GF_UUID_H
+
+#if defined(HAVE_LIBUUID) /* Linux like libuuid.so */
+
+#include <uuid.h>
+
+static inline void
+gf_uuid_clear (uuid_t uuid)
+{
+ uuid_clear (uuid);
+}
+
+static inline int
+gf_uuid_compare (uuid_t u1, uuid_t u2)
+{
+ return uuid_compare (u1, u2);
+}
+
+static inline void
+gf_uuid_copy (uuid_t dst, uuid_t src)
+{
+ uuid_copy (dst, src);
+}
+
+static inline void
+gf_uuid_generate (uuid_t uuid)
+{
+ uuid_generate (uuid);
+}
+
+static inline int
+gf_uuid_is_null (uuid_t uuid)
+{
+ return uuid_is_null (uuid);
+}
+
+static inline int
+gf_uuid_parse (const char *in, uuid_t uuid)
+{
+ return uuid_parse (in, uuid);
+}
+
+static inline void
+gf_uuid_unparse (const uuid_t uuid, char *out)
+{
+ uuid_unparse (uuid, out);
+}
+
+/* TODO: add more uuid APIs, use constructs like this:
+#elif defined(__NetBSD__) * NetBSD libc *
+
+#include <string.h>
+
+static inline void
+gf_uuid_clear (uuid_t uuid)
+{
+ memset (uuid, 0, sizeof (uuid_t));
+}
+
+*/
+
+#else /* use bundled Linux like libuuid from contrib/uuid/ */
+
+#include "uuid.h"
+
+#endif /* HAVE_UUID */
+#endif /* _GF_UUID_H */
diff --git a/libglusterfs/src/gfdb/Makefile.am b/libglusterfs/src/gfdb/Makefile.am
index fdc11bf131a..30d1b7bcdde 100644
--- a/libglusterfs/src/gfdb/Makefile.am
+++ b/libglusterfs/src/gfdb/Makefile.am
@@ -5,7 +5,8 @@ libgfdb_la_CPPFLAGS = $(GF_CPPFLAGS) -D__USE_FILE_OFFSET64 -fpic \
-I$(top_srcdir)/libglusterfs/src \
-DDATADIR=\"$(localstatedir)\"
-libgfdb_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la $(SQLITE_LIBS)
+libgfdb_la_LIBADD = $(top_builddir)/libglusterfs/src/libglusterfs.la \
+ $(SQLITE_LIBS) $(UUID_LIBS)
libgfdb_la_LDFLAGS = $(GF_LDFLAGS) -version-info $(LIBGLUSTERFS_LT_VERSION)
@@ -18,25 +19,15 @@ endif
CONTRIB_BUILDDIR = $(top_builddir)/contrib
libgfdb_la_SOURCES = gfdb_data_store.c gfdb_sqlite3_helper.c\
- gfdb_sqlite3.c \
- $(CONTRIBDIR)/uuid/clear.c \
- $(CONTRIBDIR)/uuid/copy.c $(CONTRIBDIR)/uuid/gen_uuid.c \
- $(CONTRIBDIR)/uuid/pack.c $(CONTRIBDIR)/uuid/parse.c \
- $(CONTRIBDIR)/uuid/unparse.c $(CONTRIBDIR)/uuid/uuid_time.c \
- $(CONTRIBDIR)/uuid/compare.c $(CONTRIBDIR)/uuid/isnull.c \
- $(CONTRIBDIR)/uuid/unpack.c
+ gfdb_sqlite3.c
noinst_HEADERS = gfdb_data_store.h gfdb_data_store_types.h gfdb_sqlite3_helper.h\
- gfdb_sqlite3.h gfdb_mem-types.h \
- $(CONTRIBDIR)/uuid/uuidd.h \
- $(CONTRIBDIR)/uuid/uuid.h $(CONTRIBDIR)/uuid/uuid.h \
- $(CONTRIB_BUILDDIR)/uuid/uuid_types.h
+ gfdb_sqlite3.h gfdb_mem-types.h
libgfdb_HEADERS = gfdb_data_store.h gfdb_data_store_types.h \
gfdb_sqlite3.h gfdb_mem-types.h gfdb_sqlite3_helper.c
CLEANFILES =
-CONFIG_CLEAN_FILES = $(CONTRIB_BUILDDIR)/uuid/uuid_types.h
$(top_builddir)/libglusterfs/src/libglusterfs.la:
$(MAKE) -C $(top_builddir)/libglusterfs/src/ all
diff --git a/libglusterfs/src/gfdb/gfdb_data_store_types.h b/libglusterfs/src/gfdb/gfdb_data_store_types.h
index 94708ac1d3b..5bd95241f06 100644
--- a/libglusterfs/src/gfdb/gfdb_data_store_types.h
+++ b/libglusterfs/src/gfdb/gfdb_data_store_types.h
@@ -21,6 +21,7 @@
#include <string.h>
#include "common-utils.h"
+#include "compat-uuid.h"
#include "gfdb_mem-types.h"
#include "dict.h"
diff --git a/libglusterfs/src/iatt.h b/libglusterfs/src/iatt.h
index da6b83dc176..a404d9c8cd0 100644
--- a/libglusterfs/src/iatt.h
+++ b/libglusterfs/src/iatt.h
@@ -22,7 +22,7 @@
#include <unistd.h>
#include "compat.h"
-#include "uuid.h"
+#include "compat-uuid.h"
typedef enum {
IA_INVAL = 0,
diff --git a/libglusterfs/src/inode.h b/libglusterfs/src/inode.h
index f7ca1925aac..50815599347 100644
--- a/libglusterfs/src/inode.h
+++ b/libglusterfs/src/inode.h
@@ -33,7 +33,7 @@ typedef struct _dentry dentry_t;
#include "list.h"
#include "xlator.h"
#include "iatt.h"
-#include "uuid.h"
+#include "compat-uuid.h"
#include "fd.h"
struct _inode_table {
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index 9bea950d720..a238913d03b 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -27,6 +27,7 @@
#include "compat.h"
#include "list.h"
#include "latency.h"
+#include "compat-uuid.h"
#define FIRST_CHILD(xl) (xl->children->xlator)
#define SECOND_CHILD(xl) (xl->children->next->xlator)
diff --git a/xlators/features/changelog/lib/src/Makefile.am b/xlators/features/changelog/lib/src/Makefile.am
index 456e211b89d..7da4f7c78ae 100644
--- a/xlators/features/changelog/lib/src/Makefile.am
+++ b/xlators/features/changelog/lib/src/Makefile.am
@@ -21,19 +21,11 @@ CONTRIB_BUILDDIR = $(top_builddir)/contrib
libgfchangelog_la_SOURCES = gf-changelog.c gf-changelog-journal-handler.c gf-changelog-helpers.c \
gf-changelog-api.c gf-history-changelog.c gf-changelog-rpc.c gf-changelog-reborp.c \
- $(top_srcdir)/xlators/features/changelog/src/changelog-rpc-common.c \
- $(CONTRIBDIR)/uuid/clear.c $(CONTRIBDIR)/uuid/copy.c \
- $(CONTRIBDIR)/uuid/gen_uuid.c $(CONTRIBDIR)/uuid/pack.c \
- $(CONTRIBDIR)/uuid/parse.c $(CONTRIBDIR)/uuid/unparse.c \
- $(CONTRIBDIR)/uuid/uuid_time.c $(CONTRIBDIR)/uuid/compare.c \
- $(CONTRIBDIR)/uuid/isnull.c $(CONTRIBDIR)/uuid/unpack.c
+ $(top_srcdir)/xlators/features/changelog/src/changelog-rpc-common.c
-noinst_HEADERS = gf-changelog-helpers.h gf-changelog-rpc.h gf-changelog-journal.h \
- $(CONTRIBDIR)/uuid/uuidd.h $(CONTRIBDIR)/uuid/uuid.h \
- $(CONTRIBDIR)/uuid/uuidP.h $(CONTRIB_BUILDDIR)/uuid/uuid_types.h
+noinst_HEADERS = gf-changelog-helpers.h gf-changelog-rpc.h gf-changelog-journal.h
CLEANFILES =
-CONFIG_CLEAN_FILES = $(CONTRIB_BUILDDIR)/uuid/uuid_types.h
$(top_builddir)/libglusterfs/src/libglusterfs.la:
$(MAKE) -C $(top_builddir)/libglusterfs/src/ all
diff --git a/xlators/features/changelog/lib/src/gf-changelog-api.c b/xlators/features/changelog/lib/src/gf-changelog-api.c
index cea2ff01988..eee3ad1eefd 100644
--- a/xlators/features/changelog/lib/src/gf-changelog-api.c
+++ b/xlators/features/changelog/lib/src/gf-changelog-api.c
@@ -8,7 +8,7 @@
cases as published by the Free Software Foundation.
*/
-#include "uuid.h"
+#include "compat-uuid.h"
#include "globals.h"
#include "glusterfs.h"
diff --git a/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c b/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
index c4e14708b5f..4029a562dfa 100644
--- a/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
+++ b/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c
@@ -8,7 +8,7 @@
cases as published by the Free Software Foundation.
*/
-#include "uuid.h"
+#include "compat-uuid.h"
#include "globals.h"
#include "glusterfs.h"
diff --git a/xlators/features/marker/src/marker.h b/xlators/features/marker/src/marker.h
index 23d1580f0e5..b2d58d23f6c 100644
--- a/xlators/features/marker/src/marker.h
+++ b/xlators/features/marker/src/marker.h
@@ -18,7 +18,7 @@
#include "marker-quota.h"
#include "xlator.h"
#include "defaults.h"
-#include "uuid.h"
+#include "compat-uuid.h"
#include "call-stub.h"
#define MARKER_XATTR_PREFIX "trusted.glusterfs"
diff --git a/xlators/mgmt/glusterd/src/Makefile.am b/xlators/mgmt/glusterd/src/Makefile.am
index 6ca0bf5960f..4793f31a034 100644
--- a/xlators/mgmt/glusterd/src/Makefile.am
+++ b/xlators/mgmt/glusterd/src/Makefile.am
@@ -43,7 +43,7 @@ noinst_HEADERS = glusterd.h glusterd-utils.h glusterd-op-sm.h \
AM_CPPFLAGS = $(GF_CPPFLAGS) -I$(top_srcdir)/libglusterfs/src \
-I$(rpclibdir) -I$(CONTRIBDIR)/rbtree \
-I$(top_srcdir)/rpc/xdr/src -I$(top_srcdir)/rpc/rpc-lib/src \
- -I$(CONTRIBDIR)/uuid -I$(CONTRIBDIR)/mount \
+ -I$(CONTRIBDIR)/mount \
-I$(CONTRIBDIR)/userspace-rcu \
-DSBIN_DIR=\"$(sbindir)\" -DDATADIR=\"$(localstatedir)\" \
-DGSYNCD_PREFIX=\"$(libexecdir)/glusterfs\" \
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 75943267e90..d7694258301 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -18,7 +18,7 @@
#include <sys/mount.h>
#include <libgen.h>
-#include "uuid.h"
+#include "compat-uuid.h"
#include "fnmatch.h"
#include "xlator.h"
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.h b/xlators/mgmt/glusterd/src/glusterd-op-sm.h
index abfed02027e..69bfd4c92a5 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.h
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.h
@@ -17,7 +17,7 @@
#include <pthread.h>
-#include "uuid.h"
+#include "compat-uuid.h"
#include "glusterfs.h"
#include "xlator.h"
diff --git a/xlators/mgmt/glusterd/src/glusterd-pmap.h b/xlators/mgmt/glusterd/src/glusterd-pmap.h
index 6336ee998fd..47434390303 100644
--- a/xlators/mgmt/glusterd/src/glusterd-pmap.h
+++ b/xlators/mgmt/glusterd/src/glusterd-pmap.h
@@ -16,7 +16,7 @@
#endif
#include <pthread.h>
-#include "uuid.h"
+#include "compat-uuid.h"
#include "glusterfs.h"
#include "xlator.h"
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.c b/xlators/mgmt/glusterd/src/glusterd-sm.c
index 2ea473aeb16..f8228b0ab83 100644
--- a/xlators/mgmt/glusterd/src/glusterd-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-sm.c
@@ -17,7 +17,7 @@
#include <sys/resource.h>
#include <libgen.h>
-#include "uuid.h"
+#include "compat-uuid.h"
#include "fnmatch.h"
#include "xlator.h"
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.h b/xlators/mgmt/glusterd/src/glusterd-sm.h
index 42fcaf87a32..be137802a64 100644
--- a/xlators/mgmt/glusterd/src/glusterd-sm.h
+++ b/xlators/mgmt/glusterd/src/glusterd-sm.h
@@ -16,7 +16,7 @@
#endif
#include <pthread.h>
-#include "uuid.h"
+#include "compat-uuid.h"
#include "rpc-clnt.h"
#include "glusterfs.h"
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.h b/xlators/mgmt/glusterd/src/glusterd-store.h
index 45ed86a4163..72fdd851d23 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.h
+++ b/xlators/mgmt/glusterd/src/glusterd-store.h
@@ -16,7 +16,7 @@
#endif
#include <pthread.h>
-#include "uuid.h"
+#include "compat-uuid.h"
#include "glusterfs.h"
#include "xlator.h"
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h
index abe687eb89c..80c7c19d508 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.h
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.h
@@ -16,7 +16,7 @@
#endif
#include <pthread.h>
-#include "uuid.h"
+#include "compat-uuid.h"
#include "glusterfs.h"
#include "xlator.h"
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 30461d39fad..6ffde511af4 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -18,7 +18,7 @@
#include <sys/resource.h>
#include <libgen.h>
-#include "uuid.h"
+#include "compat-uuid.h"
#include "glusterd.h"
#include "rpcsvc.h"
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h
index 8f8af26acfe..480cfc66269 100644
--- a/xlators/mgmt/glusterd/src/glusterd.h
+++ b/xlators/mgmt/glusterd/src/glusterd.h
@@ -20,7 +20,7 @@
#include <pthread.h>
#include <libgen.h>
-#include "uuid.h"
+#include "compat-uuid.h"
#include "rpc-clnt.h"
#include "glusterfs.h"
diff --git a/xlators/mount/fuse/src/Makefile.am b/xlators/mount/fuse/src/Makefile.am
index 7d1f93447bf..749fb3bbbb5 100644
--- a/xlators/mount/fuse/src/Makefile.am
+++ b/xlators/mount/fuse/src/Makefile.am
@@ -27,7 +27,7 @@ fuse_la_SOURCES = fuse-helpers.c fuse-resolve.c fuse-bridge.c \
$(CONTRIBDIR)/fuse-lib/misc.c $(mount_source)
fuse_la_LDFLAGS = -module -avoid-version
-fuse_la_LIBADD = @GF_FUSE_LDADD@
+fuse_la_LIBADD = $(GF_LDADD) @GF_FUSE_LDADD@
AM_CPPFLAGS = $(GF_CPPFLAGS) \
-I$(top_srcdir)/libglusterfs/src -I$(CONTRIBDIR)/fuse-include \
diff --git a/xlators/nfs/server/src/mount3.h b/xlators/nfs/server/src/mount3.h
index 8ef9c62a655..026300e886f 100644
--- a/xlators/nfs/server/src/mount3.h
+++ b/xlators/nfs/server/src/mount3.h
@@ -25,7 +25,7 @@
#include "xdr-nfs3.h"
#include "locking.h"
#include "nfs3-fh.h"
-#include "uuid.h"
+#include "compat-uuid.h"
#include "exports.h"
#include "mount3-auth.h"
#include "auth-cache.h"
diff --git a/xlators/nfs/server/src/nfs-common.h b/xlators/nfs/server/src/nfs-common.h
index 2e97f1563c9..401484c0f3c 100644
--- a/xlators/nfs/server/src/nfs-common.h
+++ b/xlators/nfs/server/src/nfs-common.h
@@ -21,7 +21,7 @@
#include "xlator.h"
#include "rpcsvc.h"
#include "iatt.h"
-#include "uuid.h"
+#include "compat-uuid.h"
//NFS_PATH_MAX hard-coded to 4096 as a work around for bug 2476.
//nfs server crashes when path received is longer than PATH_MAX
diff --git a/xlators/nfs/server/src/nfs3-fh.h b/xlators/nfs/server/src/nfs3-fh.h
index 3e64772af07..eb969e44e22 100644
--- a/xlators/nfs/server/src/nfs3-fh.h
+++ b/xlators/nfs/server/src/nfs3-fh.h
@@ -20,7 +20,7 @@
#include "xdr-nfs3.h"
#include "iatt.h"
#include <sys/types.h>
-#include "uuid.h"
+#include "compat-uuid.h"
/* BIG FAT WARNING: The file handle code is tightly coupled to NFSv3 file
* handles for now. This will change if and when we need v4. */
diff --git a/xlators/nfs/server/src/nlm4.h b/xlators/nfs/server/src/nlm4.h
index 0ed05deb947..0ab03d8c575 100644
--- a/xlators/nfs/server/src/nlm4.h
+++ b/xlators/nfs/server/src/nlm4.h
@@ -27,7 +27,7 @@
#include "xdr-nfs3.h"
#include "locking.h"
#include "nfs3-fh.h"
-#include "uuid.h"
+#include "compat-uuid.h"
#include "nlm4-xdr.h"
#include "lkowner.h"