From eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 Mon Sep 17 00:00:00 2001 From: Dave Cobbley Date: Tue, 14 Aug 2018 10:05:37 -0700 Subject: [Subtree] Removing import-layers directory As part of the move to subtrees, need to bring all the import layers content to the top level. Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f Signed-off-by: Dave Cobbley Signed-off-by: Brad Bishop --- .../01-support-cross-compile-for-linux-os.patch | 24 +++++++++ .../ctdb/02-link-rep_snprintf-for-ltdbtool.patch | 17 +++++++ ...rvice-ensure-the-PID-directory-is-created.patch | 25 ++++++++++ .../recipes-support/ctdb/ctdb_2.5.6.bb | 57 ++++++++++++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch create mode 100644 meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch create mode 100644 meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch create mode 100644 meta-openembedded/meta-networking/recipes-support/ctdb/ctdb_2.5.6.bb (limited to 'meta-openembedded/meta-networking/recipes-support/ctdb') diff --git a/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch new file mode 100644 index 0000000000..c9195b4f45 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/01-support-cross-compile-for-linux-os.patch @@ -0,0 +1,24 @@ +support cross-compile for linux-os. + +Signed-off-by: Bian Naimeng + +diff -Nurp ctdb-2.5.1.orig/configure ctdb-2.5.1/configure +--- ctdb-2.5.1.orig/configure 2015-05-07 16:24:28.545000238 +0900 ++++ ctdb-2.5.1/configure 2015-05-07 16:28:20.894000244 +0900 +@@ -10692,10 +10692,16 @@ if test x"$libreplace_cv_HAVE_GETADDRINF + # see bug 5910, use our replacements if we detect + # a broken system. + if test "$cross_compiling" = yes; then : ++ case "$target_os" in ++ *linux*) ++ ;; ++ *) + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 + $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + as_fn_error $? "cannot run test program while cross compiling + See \`config.log' for more details" "$LINENO" 5; } ++ ;; ++ esac + else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ diff --git a/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch new file mode 100644 index 0000000000..1294fe41b5 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/02-link-rep_snprintf-for-ltdbtool.patch @@ -0,0 +1,17 @@ +link rep_snprintf from lib/replace/snprintf.o for ltdbtool + +Signed-off-by: Bian Naimeng + +Index: ctdb-2.5.6/Makefile.in +=================================================================== +--- ctdb-2.5.6.orig/Makefile.in ++++ ctdb-2.5.6/Makefile.in +@@ -176,7 +176,7 @@ bin/ctdb: $(CTDB_CLIENT_OBJ) tools/ctdb. + @echo Linking $@ + $(WRAPPER) $(CC) $(CFLAGS) -o $@ tools/ctdb.o tools/ctdb_vacuum.o $(CTDB_CLIENT_OBJ) $(LIB_FLAGS) + +-bin/ltdbtool: tools/ltdbtool.o $(TDB_OBJ) ++bin/ltdbtool: tools/ltdbtool.o $(TDB_OBJ) lib/replace/snprintf.o + @echo Linking $@ + $(WRAPPER) $(CC) $(CFLAGS) -o $@ $+ $(LIB_FLAGS) + diff --git a/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch new file mode 100644 index 0000000000..a7e987b85f --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb/service-ensure-the-PID-directory-is-created.patch @@ -0,0 +1,25 @@ +From f02ff7383f1cc0c118732352ccbae476c7b3b3ba Mon Sep 17 00:00:00 2001 +From: Mark Asselstine +Date: Tue, 17 Nov 2015 16:17:00 -0500 +Subject: [PATCH] service: ensure the PID directory is created + +Signed-off-by: Mark Asselstine +--- + config/ctdb.service | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/config/ctdb.service b/config/ctdb.service +index ea37c30..8537105 100644 +--- a/config/ctdb.service ++++ b/config/ctdb.service +@@ -5,6 +5,7 @@ After=network.target + [Service] + Type=forking + LimitCORE=infinity ++RuntimeDirectory=/run/ctdb + PIDFile=/run/ctdb/ctdbd.pid + ExecStart=/usr/sbin/ctdbd_wrapper /run/ctdb/ctdbd.pid start + ExecStop=/usr/sbin/ctdbd_wrapper /run/ctdb/ctdbd.pid stop +-- +2.1.4 + diff --git a/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb_2.5.6.bb b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb_2.5.6.bb new file mode 100644 index 0000000000..b5a60645c5 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-support/ctdb/ctdb_2.5.6.bb @@ -0,0 +1,57 @@ +DESCRIPTION = "CTDB is a cluster implementation of the TDB database \ +used by Samba and other projects to store temporary data. If an \ +application is already using TDB for temporary data it is very easy \ +to convert that application to be cluster aware and use CTDB instead." +HOMEPAGE = "https://ctdb.samba.org/" +LICENSE = "GPL-2.0+ & LGPL-3.0+ & GPL-3.0+" + +LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \ + file://${COREBASE}/meta/files/common-licenses/LGPL-3.0;md5=bfccfe952269fff2b407dd11f2f3083b \ + file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \ + " + +SRC_URI = "https://ftp.samba.org/pub/${BPN}/${BP}.tar.gz \ + file://01-support-cross-compile-for-linux-os.patch \ + file://02-link-rep_snprintf-for-ltdbtool.patch \ + file://service-ensure-the-PID-directory-is-created.patch \ + " + +SRC_URI[md5sum] = "efc50109f90a4c790124c35e4ba234ad" +SRC_URI[sha256sum] = "fc1cdd7efcc91afc629f21408281bba5da107b9c17e74bdee2f28a532d14f874" + +inherit autotools-brokensep pkgconfig systemd + +PACKAGECONFIG ??= "" +PACKAGECONFIG[libtdb] = "--without-included-tdb,--with-included-tdb,libtdb" + +PARALLEL_MAKE = "" + +DEPENDS += "popt libtevent libtalloc libldb" +DEPENDS_append_libc-musl = " libtirpc" +CFLAGS_append_libc-musl = " -I${STAGING_INCDIR}/tirpc" +LDFLAGS_append_libc-musl = " -ltirpc" + +# ctdbd_wrapper requires pgrep, hence procps +RDEPENDS_${PN} += "procps" + +do_configure() { + oe_runconf +} + +do_install_append() { + install -d ${D}${systemd_unitdir}/system + install -m 0644 ${S}/config/ctdb.service ${D}${systemd_unitdir}/system + sed -i -e 's,/usr/sbin/,${sbindir}/,' ${D}${systemd_unitdir}/system/ctdb.service + sed -i -e 's,\([=\ ]\)/run/,\1${localstatedir}/run/,' ${D}${systemd_unitdir}/system/ctdb.service + + rm -r ${D}/${localstatedir}/run +} + +# The systemd service is disabled by default, as the service will fail to +# start without /etc/ctdb/nodes. If the user supplies this, they can re-enable +# the service. +SYSTEMD_AUTO_ENABLE = "disable" +SYSTEMD_SERVICE_${PN} = "ctdb.service" + +# onnode is a shell script with bashisms and bash #! +RDEPENDS_${PN} += "bash" -- cgit v1.2.3