summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch24
-rw-r--r--meta-oe/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch16
-rw-r--r--meta-oe/recipes-support/ctdb/ctdb_2.5.1.bb43
3 files changed, 83 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch b/meta-oe/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch
new file mode 100644
index 0000000000..c9195b4f45
--- /dev/null
+++ b/meta-oe/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch
@@ -0,0 +1,24 @@
1support cross-compile for linux-os.
2
3Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
4
5diff -Nurp ctdb-2.5.1.orig/configure ctdb-2.5.1/configure
6--- ctdb-2.5.1.orig/configure 2015-05-07 16:24:28.545000238 +0900
7+++ ctdb-2.5.1/configure 2015-05-07 16:28:20.894000244 +0900
8@@ -10692,10 +10692,16 @@ if test x"$libreplace_cv_HAVE_GETADDRINF
9 # see bug 5910, use our replacements if we detect
10 # a broken system.
11 if test "$cross_compiling" = yes; then :
12+ case "$target_os" in
13+ *linux*)
14+ ;;
15+ *)
16 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
17 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
18 as_fn_error $? "cannot run test program while cross compiling
19 See \`config.log' for more details" "$LINENO" 5; }
20+ ;;
21+ esac
22 else
23 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24 /* end confdefs.h. */
diff --git a/meta-oe/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch b/meta-oe/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch
new file mode 100644
index 0000000000..1dd9b93a5a
--- /dev/null
+++ b/meta-oe/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch
@@ -0,0 +1,16 @@
1link rep_snprintf from lib/replace/snprintf.o for ltdbtool
2
3Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
4
5diff -Nurp ctdb-2.5.1.orig/Makefile.in ctdb-2.5.1/Makefile.in
6--- ctdb-2.5.1.orig/Makefile.in 2015-05-07 16:43:39.276000236 +0900
7+++ ctdb-2.5.1/Makefile.in 2015-05-07 16:44:09.627000237 +0900
8@@ -170,7 +170,7 @@ bin/ctdb: $(CTDB_CLIENT_OBJ) tools/ctdb.
9 @echo Linking $@
10 $(WRAPPER) $(CC) $(CFLAGS) -o $@ tools/ctdb.o tools/ctdb_vacuum.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS)
11
12-bin/ltdbtool: tools/ltdbtool.o $(TDB_OBJ)
13+bin/ltdbtool: tools/ltdbtool.o $(TDB_OBJ) lib/replace/snprintf.o
14 @echo Linking $@
15 $(WRAPPER) $(CC) $(CFLAGS) -o $@ $+ $(TDB_LIBS) $(LIB_FLAGS)
16
diff --git a/meta-oe/recipes-support/ctdb/ctdb_2.5.1.bb b/meta-oe/recipes-support/ctdb/ctdb_2.5.1.bb
new file mode 100644
index 0000000000..3731efd6b4
--- /dev/null
+++ b/meta-oe/recipes-support/ctdb/ctdb_2.5.1.bb
@@ -0,0 +1,43 @@
1DESCRIPTION = "CTDB is a cluster implementation of the TDB database \
2used by Samba and other projects to store temporary data. If an \
3application is already using TDB for temporary data it is very easy \
4to convert that application to be cluster aware and use CTDB instead."
5DESCRIPTION = "CTDB is a cluster implementation of the TDB database \
6used by Samba and other projects to store temporary data. If an \
7application is already using TDB for temporary data it is very easy \
8to convert that application to be cluster aware and use CTDB instead."
9HOMEPAGE = "https://ctdb.samba.org/"
10LICENSE = "GPL-2.0+ & LGPL-3.0+ & GPL-3.0+"
11
12LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
13 file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \
14 file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
15 "
16
17SRC_URI = "https://ftp.samba.org/pub/${PN}/${BP}.tar.gz \
18 file://01-support-cross-compile-for-linux-os.patch \
19 file://02-link-rep_snprintf-for-ltdbtool.patch \
20 "
21
22SRC_URI[md5sum] = "d0cd91726ff4ca2229e1b21859c94717"
23SRC_URI[sha256sum] = "d5bf3f674cae986bb6178b1db215a703ac94adc5f75fadfdcff63dcbb5e98ab5"
24
25inherit autotools-brokensep pkgconfig systemd
26
27PARALLEL_MAKE = ""
28
29DEPENDS += "popt libtevent talloc"
30
31do_configure() {
32 oe_runconf
33}
34
35do_install_append() {
36 install -d ${D}${systemd_unitdir}/system
37 install -m 0644 ${S}/config/ctdb.service ${D}${systemd_unitdir}/system
38 sed -i -e 's,/usr/sbin/,${sbindir}/,' ${D}${systemd_unitdir}/system/ctdb.service
39}
40
41SYSTEMD_SERVICE_${PN} = "ctdb.service"
42
43FILES_${PN} += "/run"