added my Recipes
This commit is contained in:
@@ -0,0 +1,204 @@
|
||||
From 69011c7227ad1aaf08d5ab28e46f85dac951c597 Mon Sep 17 00:00:00 2001
|
||||
From: Changqing Li <changqing.li@windriver.com>
|
||||
Date: Thu, 21 Apr 2022 17:22:35 +0800
|
||||
Subject: [PATCH] drbd-utils: support usermerge
|
||||
|
||||
Upstream-Status: Inappropriate [oe-specific]
|
||||
|
||||
Signed-off-by: Changqing Li <changqing.li@windriver.com>
|
||||
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
scripts/Makefile.in | 10 +++++-----
|
||||
scripts/drbd-demote-or-escalate@.service | 2 +-
|
||||
scripts/drbd-promote@.service | 4 ++--
|
||||
scripts/drbd-wait-promotable@.service | 2 +-
|
||||
scripts/drbd.service | 6 +++---
|
||||
scripts/drbd@.service | 6 +++---
|
||||
scripts/ocf.ra@.service | 4 ++--
|
||||
user/v83/Makefile.in | 14 +++++++-------
|
||||
user/v84/Makefile.in | 14 +++++++-------
|
||||
10 files changed, 32 insertions(+), 32 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ae575586..3d7deeae 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -180,7 +180,7 @@ AC_ARG_WITH(tmpfilesdir,
|
||||
AC_SUBST(tmpfilesdir)
|
||||
|
||||
# set default early
|
||||
-default_udevdir=/lib/udev
|
||||
+default_udevdir=${prefix}/lib/udev
|
||||
if test x"$with_udev" = x || \
|
||||
test x"$with_udev" = xyes ; then
|
||||
if test x"$PKG_CONFIG" != x; then
|
||||
diff --git a/scripts/Makefile.in b/scripts/Makefile.in
|
||||
index fcd298e9..bab441a5 100644
|
||||
--- a/scripts/Makefile.in
|
||||
+++ b/scripts/Makefile.in
|
||||
@@ -88,11 +88,11 @@ ifeq ($(subst both,systemd,$(initscripttype)),systemd)
|
||||
install -d $(DESTDIR)$(systemdunitdir)
|
||||
install -m 644 drbd.service $(DESTDIR)$(systemdunitdir)/
|
||||
install -m 644 $(SYSTEMD_TEMPLATES) $(DESTDIR)$(systemdunitdir)/
|
||||
- install -d $(DESTDIR)/lib/drbd/scripts
|
||||
- install -m 755 drbd $(DESTDIR)/lib/drbd/scripts
|
||||
- install -m 755 drbd-service-shim.sh $(DESTDIR)/lib/drbd/scripts
|
||||
- install -m 755 drbd-wait-promotable.sh $(DESTDIR)/lib/drbd/scripts
|
||||
- install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/lib/drbd/scripts
|
||||
+ install -d $(DESTDIR)/${nonarch_libdir}/drbd/scripts
|
||||
+ install -m 755 drbd $(DESTDIR)/${nonarch_libdir}/drbd/scripts
|
||||
+ install -m 755 drbd-service-shim.sh $(DESTDIR)/${nonarch_libdir}/drbd/scripts
|
||||
+ install -m 755 drbd-wait-promotable.sh $(DESTDIR)/${nonarch_libdir}/drbd/scripts
|
||||
+ install -m 755 ocf.ra.wrapper.sh $(DESTDIR)/${nonarch_libdir}/drbd/scripts
|
||||
install -d $(DESTDIR)$(tmpfilesdir)/
|
||||
install -m 444 drbd.tmpfiles.conf $(DESTDIR)$(tmpfilesdir)/drbd.conf
|
||||
endif
|
||||
diff --git a/scripts/drbd-demote-or-escalate@.service b/scripts/drbd-demote-or-escalate@.service
|
||||
index 20932238..8b5ce4a2 100644
|
||||
--- a/scripts/drbd-demote-or-escalate@.service
|
||||
+++ b/scripts/drbd-demote-or-escalate@.service
|
||||
@@ -28,5 +28,5 @@ TimeoutSec=60
|
||||
# "Type=forking" would be an option to have it retry a number of times,
|
||||
# and then only escalate to FailureAction if that did not help.
|
||||
Type=oneshot
|
||||
-ExecStart=/lib/drbd/scripts/drbd-service-shim.sh secondary-or-escalate %I
|
||||
+ExecStart=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh secondary-or-escalate %I
|
||||
ExecStopPost=-/bin/journalctl --sync
|
||||
diff --git a/scripts/drbd-promote@.service b/scripts/drbd-promote@.service
|
||||
index 71345d9b..678e0703 100644
|
||||
--- a/scripts/drbd-promote@.service
|
||||
+++ b/scripts/drbd-promote@.service
|
||||
@@ -24,5 +24,5 @@ RemainAfterExit=yes
|
||||
# (ab)using systemd features
|
||||
# if we cannot configure and promote, that's a condition, not a failure
|
||||
# See the comment above wrt. FailureAction vs OnFailure
|
||||
-ExecCondition=/lib/drbd/scripts/drbd-service-shim.sh primary %I
|
||||
-ExecStop=/lib/drbd/scripts/drbd-service-shim.sh secondary %I
|
||||
+ExecCondition=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh primary %I
|
||||
+ExecStop=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh secondary %I
|
||||
diff --git a/scripts/drbd-wait-promotable@.service b/scripts/drbd-wait-promotable@.service
|
||||
index 81c3789f..3416abc6 100644
|
||||
--- a/scripts/drbd-wait-promotable@.service
|
||||
+++ b/scripts/drbd-wait-promotable@.service
|
||||
@@ -10,7 +10,7 @@ Type=oneshot
|
||||
|
||||
# on first start, wait for access to "good data"
|
||||
# let systemd handle timeouts
|
||||
-ExecStart=/lib/drbd/scripts/drbd-wait-promotable.sh %I
|
||||
+ExecStart=@nonarch_libdir@/drbd/scripts/drbd-wait-promotable.sh %I
|
||||
RemainAfterExit=yes
|
||||
|
||||
[Install]
|
||||
diff --git a/scripts/drbd.service b/scripts/drbd.service
|
||||
index 96c599e7..c81e95a6 100644
|
||||
--- a/scripts/drbd.service
|
||||
+++ b/scripts/drbd.service
|
||||
@@ -12,11 +12,11 @@ RemainAfterExit=yes
|
||||
# A check for INIT_VERSION already exists, just set it to something.
|
||||
Environment=INIT_VERSION=systemd
|
||||
|
||||
-ExecStart=/lib/drbd/scripts/drbd start
|
||||
-ExecStop=/lib/drbd/scripts/drbd stop
|
||||
+ExecStart=@nonarch_libdir@/drbd/scripts/drbd start
|
||||
+ExecStop=@nonarch_libdir@/drbd/scripts/drbd stop
|
||||
|
||||
# Re-adjust everything on reload
|
||||
-ExecReload=/lib/drbd/scripts/drbd reload
|
||||
+ExecReload=@nonarch_libdir@/drbd/scripts/drbd reload
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
diff --git a/scripts/drbd@.service b/scripts/drbd@.service
|
||||
index 76514c5b..e2e500ba 100644
|
||||
--- a/scripts/drbd@.service
|
||||
+++ b/scripts/drbd@.service
|
||||
@@ -35,8 +35,8 @@ RemainAfterExit=yes
|
||||
|
||||
# depends... do we want this as ExecCondition or as ExecStart
|
||||
# failed start is "failed", failed condition is just "not startable yet"
|
||||
-ExecStart=/lib/drbd/scripts/drbd-service-shim.sh adjust %I
|
||||
-ExecReload=/lib/drbd/scripts/drbd-service-shim.sh adjust %I
|
||||
+ExecStart=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh adjust %I
|
||||
+ExecReload=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh adjust %I
|
||||
|
||||
# can only succeed, if you first stop all depending services
|
||||
-ExecStopPost=/lib/drbd/scripts/drbd-service-shim.sh down %I
|
||||
+ExecStopPost=@nonarch_libdir@/drbd/scripts/drbd-service-shim.sh down %I
|
||||
diff --git a/scripts/ocf.ra@.service b/scripts/ocf.ra@.service
|
||||
index 9c2268a6..1666c482 100644
|
||||
--- a/scripts/ocf.ra@.service
|
||||
+++ b/scripts/ocf.ra@.service
|
||||
@@ -22,5 +22,5 @@ Environment=monitor_inverval=30
|
||||
# Only the first argument is used by the wrapper,
|
||||
# the %n is just to identify which is which in the process list.
|
||||
# All parameterization is done via Environment= in per instance override.conf
|
||||
-ExecStart=/lib/drbd/scripts/ocf.ra.wrapper.sh start-and-monitor %n
|
||||
-ExecStopPost=/lib/drbd/scripts/ocf.ra.wrapper.sh stop %n
|
||||
+ExecStart=@nonarch_libdir@/drbd/scripts/ocf.ra.wrapper.sh start-and-monitor %n
|
||||
+ExecStopPost=@nonarch_libdir@/drbd/scripts/ocf.ra.wrapper.sh stop %n
|
||||
diff --git a/user/v83/Makefile.in b/user/v83/Makefile.in
|
||||
index 08cfe574..4c4971b6 100644
|
||||
--- a/user/v83/Makefile.in
|
||||
+++ b/user/v83/Makefile.in
|
||||
@@ -96,19 +96,19 @@ install:
|
||||
ifeq ($(WITH_83_SUPPORT),yes)
|
||||
install -d $(DESTDIR)$(localstatedir)/lib/drbd
|
||||
install -d $(DESTDIR)$(localstatedir)/lock
|
||||
- install -d $(DESTDIR)/lib/drbd/
|
||||
+ install -d $(DESTDIR)/${nonarch_libdir}/drbd/
|
||||
if getent group haclient > /dev/null 2> /dev/null ; then \
|
||||
- install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)/lib/drbd/ ; \
|
||||
- install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ; \
|
||||
+ install -g haclient -m 4750 drbdsetup-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
|
||||
+ install -m 755 drbdadm-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
|
||||
else \
|
||||
- install -m 755 drbdsetup-83 $(DESTDIR)/lib/drbd/ ; \
|
||||
- install -m 755 drbdadm-83 $(DESTDIR)/lib/drbd/ ; \
|
||||
+ install -m 755 drbdsetup-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
|
||||
+ install -m 755 drbdadm-83 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
|
||||
fi
|
||||
endif
|
||||
|
||||
uninstall:
|
||||
- rm -f $(DESTDIR)/lib/drbd/drbdsetup-83
|
||||
- rm -f $(DESTDIR)/lib/drbd/drbdadm-83
|
||||
+ rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdsetup-83
|
||||
+ rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdadm-83
|
||||
|
||||
.PHONY: install uninstall clean distclean
|
||||
../../configure:
|
||||
diff --git a/user/v84/Makefile.in b/user/v84/Makefile.in
|
||||
index 0fcefc5f..81f7d5ec 100644
|
||||
--- a/user/v84/Makefile.in
|
||||
+++ b/user/v84/Makefile.in
|
||||
@@ -110,19 +110,19 @@ ifeq ($(WITH_84_SUPPORT),yes)
|
||||
install -d $(DESTDIR)$(localstatedir)/lib/drbd
|
||||
install -d $(DESTDIR)$(localstatedir)/run/drbd
|
||||
install -d $(DESTDIR)$(localstatedir)/lock
|
||||
- install -d $(DESTDIR)/lib/drbd/
|
||||
+ install -d $(DESTDIR)/${nonarch_libdir}/drbd/
|
||||
if getent group haclient > /dev/null 2> /dev/null ; then \
|
||||
- install -g haclient -m 4750 drbdsetup-84 $(DESTDIR)/lib/drbd/ ; \
|
||||
- install -m 755 drbdadm-84 $(DESTDIR)/lib/drbd/ ; \
|
||||
+ install -g haclient -m 4750 drbdsetup-84 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
|
||||
+ install -m 755 drbdadm-84 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
|
||||
else \
|
||||
- install -m 755 drbdsetup-84 $(DESTDIR)/lib/drbd/ ; \
|
||||
- install -m 755 drbdadm-84 $(DESTDIR)/lib/drbd/ ; \
|
||||
+ install -m 755 drbdsetup-84 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
|
||||
+ install -m 755 drbdadm-84 $(DESTDIR)/${nonarch_libdir}/drbd/ ; \
|
||||
fi
|
||||
endif
|
||||
|
||||
uninstall:
|
||||
- rm -f $(DESTDIR)/lib/drbd/drbdsetup-84
|
||||
- rm -f $(DESTDIR)/lib/drbd/drbdadm-84
|
||||
+ rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdsetup-84
|
||||
+ rm -f $(DESTDIR)/${nonarch_libdir}/drbd/drbdadm-84
|
||||
|
||||
spell:
|
||||
for f in drbdadm_adjust.c drbdadm_main.c drbdadm_parser.c drbdadm_usage_cnt.c drbdsetup.c drbdtool_common.c; do \
|
||||
--
|
||||
2.25.1
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
From a61b9ff2d2cb7387a5cd347b2201535ee45a46ee Mon Sep 17 00:00:00 2001
|
||||
From: Sakib Sajal <sakib.sajal@windriver.com>
|
||||
Date: Thu, 31 Mar 2022 15:09:58 -0400
|
||||
Subject: [PATCH] drbdmon: add LDFLAGS when linking
|
||||
|
||||
Signed-off-by: Sakib Sajal <sakib.sajal@windriver.com>
|
||||
---
|
||||
user/drbdmon/Makefile.in | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
--- a/user/drbdmon/Makefile.in
|
||||
+++ b/user/drbdmon/Makefile.in
|
||||
@@ -1,6 +1,6 @@
|
||||
CXXFLAGS=-std=c++11 -I. -I../shared -Icppdsaext/src -Wall -Werror -pedantic-errors -fPIC -O2 \
|
||||
-Wsign-compare -Wpointer-arith -Wswitch-default -Wswitch-enum -Wtype-limits \
|
||||
--Wmissing-declarations -Wshadow
|
||||
+-Wmissing-declarations -Wshadow -Wno-defaulted-function-deleted -Wno-unused-private-field
|
||||
CXX = @CXX@
|
||||
LIBS = @LIBS@
|
||||
|
||||
@@ -51,7 +51,7 @@ $(dsaext-obj): $(basename $(dsaext-obj))
|
||||
$(integerparse-obj): $(basename $(integerparse-obj)).cpp $(basename $(integerparse-obj)).h
|
||||
|
||||
drbdmon: $(ls-obj)
|
||||
- $(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) $^ $(LIBS)
|
||||
+ $(CXX) -o $@ $(CPPFLAGS) $(CXXFLAGS) $(LDFLAGS) $^ $(LIBS)
|
||||
|
||||
# do not try to rebuild Makefile itself
|
||||
Makefile: ;
|
||||
@@ -0,0 +1,48 @@
|
||||
From 5adae6737e919d957a08df437951ccb6996f9882 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 21 Dec 2022 19:16:03 -0800
|
||||
Subject: [PATCH 1/2] replace off64_t with off_t
|
||||
|
||||
off_t is already 64-bits when _FILE_OFFSET_BITS=64
|
||||
using off_t also makes it portable on musl systems
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
user/v9/drbdadm_main.c | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/user/v9/drbdadm_main.c b/user/v9/drbdadm_main.c
|
||||
index 91e9507d..2030946c 100644
|
||||
--- a/user/v9/drbdadm_main.c
|
||||
+++ b/user/v9/drbdadm_main.c
|
||||
@@ -1264,11 +1264,11 @@ static int adm_resource(const struct cfg_ctx *ctx)
|
||||
return ex;
|
||||
}
|
||||
|
||||
-static off64_t read_drbd_dev_size(int minor)
|
||||
+static off_t read_drbd_dev_size(int minor)
|
||||
{
|
||||
char *path;
|
||||
FILE *file;
|
||||
- off64_t val;
|
||||
+ off_t val;
|
||||
int r;
|
||||
|
||||
m_asprintf(&path, "/sys/block/drbd%d/size", minor);
|
||||
@@ -1289,9 +1289,9 @@ int adm_resize(const struct cfg_ctx *ctx)
|
||||
char *argv[MAX_ARGS];
|
||||
struct d_option *opt;
|
||||
bool is_resize = !strcmp(ctx->cmd->name, "resize");
|
||||
- off64_t old_size = -1;
|
||||
- off64_t target_size = 0;
|
||||
- off64_t new_size;
|
||||
+ off_t old_size = -1;
|
||||
+ off_t target_size = 0;
|
||||
+ off_t new_size;
|
||||
int argc = 0;
|
||||
int silent;
|
||||
int ex;
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
From b70e5bf5bfa5fa2c2fffe08bcf300da1d3583602 Mon Sep 17 00:00:00 2001
|
||||
From: Lars Ellenberg <lars.ellenberg@linbit.com>
|
||||
Date: Wed, 9 Nov 2022 11:01:54 +0100
|
||||
Subject: [PATCH 2/2] drbdadm: drop use of GLOB_MAGCHAR, use strchr heuristic only
|
||||
|
||||
Fixup for
|
||||
2022-09-05 4a1b5900 drbdadm: allow files from an expanded include glob to vanish
|
||||
|
||||
When using the `include` statement, if the glob did not match any file,
|
||||
there is nothing to do, silently ignore. Unless it was no glob, but a literal,
|
||||
which we would expect to exist.
|
||||
|
||||
Also, there is a race between expanding a glob and accessing the file.
|
||||
That also should not happen for literals, though.
|
||||
|
||||
Since we still had the heuristic anyways, because apparently |GLOB_MAGCHAR
|
||||
does not happen for GLOB_NOMATCH returns, and there exist non-GNU libc that
|
||||
don't (and likely won't) implement that extension, just forget about
|
||||
(gl_flags & GLOB_MAGCHAR) but use the incomplete strchr heuristic only.
|
||||
|
||||
Sourced From Alpine: https://git.alpinelinux.org/aports/tree/main/drbd-utils/drop_use_of_GLOB_MAGCHAR.patch
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
user/v9/drbdadm_parser.c | 35 ++++++++++++++++++++---------------
|
||||
1 file changed, 20 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/user/v9/drbdadm_parser.c b/user/v9/drbdadm_parser.c
|
||||
index b2f6ed8a..9a0a775d 100644
|
||||
--- a/user/v9/drbdadm_parser.c
|
||||
+++ b/user/v9/drbdadm_parser.c
|
||||
@@ -1947,14 +1947,29 @@ void include_stmt(char *str)
|
||||
size_t i;
|
||||
int r;
|
||||
|
||||
- cwd = pushd_to_current_config_file_unless_stdin();
|
||||
-
|
||||
- /* """
|
||||
+ /*
|
||||
+ * If the glob did not match any file,
|
||||
+ * there is nothing to do, silently ignore.
|
||||
+ * Unless it was no glob, but a literal,
|
||||
+ * which we would expect to exist.
|
||||
+ *
|
||||
+ * """
|
||||
* As a GNU extension, pglob->gl_flags is set to the
|
||||
* flags specified, ored with GLOB_MAGCHAR if any
|
||||
* metacharacters were found.
|
||||
* """
|
||||
+ *
|
||||
+ * But apparently |GLOB_MAGCHAR does not happen for GLOB_NOMATCH returns,
|
||||
+ * at least not consistently :-(
|
||||
+ * Also, there exist non-GNU libc
|
||||
+ * So we have this incomplete strchr heuristic anyways.
|
||||
*/
|
||||
+ bool contains_glob_magic_char =
|
||||
+ strchr(str, '*') ||
|
||||
+ strchr(str, '?') ||
|
||||
+ strchr(str, '[');
|
||||
+
|
||||
+ cwd = pushd_to_current_config_file_unless_stdin();
|
||||
r = glob(str, 0, NULL, &glob_buf);
|
||||
if (r == 0) {
|
||||
for (i=0; i<glob_buf.gl_pathc; i++) {
|
||||
@@ -1965,7 +1980,7 @@ void include_stmt(char *str)
|
||||
if (f) {
|
||||
include_file(f, strdup(glob_buf.gl_pathv[i]));
|
||||
fclose(f);
|
||||
- } else if (errno == ENOENT && glob_buf.gl_flags & GLOB_MAGCHAR) {
|
||||
+ } else if (errno == ENOENT && contains_glob_magic_char) {
|
||||
/* Noisily ignore race between glob expansion
|
||||
* and actual open. */
|
||||
err("%s:%d: include file vanished after glob expansion '%s'.\n",
|
||||
@@ -1979,17 +1994,7 @@ void include_stmt(char *str)
|
||||
}
|
||||
globfree(&glob_buf);
|
||||
} else if (r == GLOB_NOMATCH) {
|
||||
- /*
|
||||
- * If the glob did not match any file,
|
||||
- * there is nothing to do, silently ignore.
|
||||
- * Unless it was no glob, but a literal,
|
||||
- * which we would expect to exist.
|
||||
- * Apparently |GLOB_MAGCHAR does not happen for GLOB_NOMATCH returns,
|
||||
- * at least not consistently :-(
|
||||
- * So we have this strchr heuristic anyways.
|
||||
- */
|
||||
- /* if (!(glob_buf.gl_flags & GLOB_MAGCHAR)) { */
|
||||
- if (!strchr(str, '?') && !strchr(str, '*') && !strchr(str, '[')) {
|
||||
+ if (!contains_glob_magic_char) {
|
||||
err("%s:%d: Failed to open include file '%s'.\n",
|
||||
config_save, line, str);
|
||||
config_valid = 0;
|
||||
--
|
||||
2.39.0
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
SUMMARY = "Distributed block device driver for Linux"
|
||||
DESCRIPTION = "DRBD mirrors a block device over the network to another machine.\
|
||||
DRBD mirrors a block device over the network to another machine.\
|
||||
Think of it as networked raid 1. It is a building block for\
|
||||
setting up high availability (HA) clusters."
|
||||
HOMEPAGE = "http://www.drbd.org/"
|
||||
SECTION = "admin"
|
||||
LICENSE = "GPL-2.0-or-later"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
|
||||
|
||||
SRC_URI = "git://github.com/LINBIT/drbd-utils;name=drbd-utils;branch=master;protocol=https \
|
||||
git://github.com/LINBIT/drbd-headers;name=drbd-headers;destsuffix=git/drbd-headers;branch=master;protocol=https \
|
||||
file://0001-drbdmon-add-LDFLAGS-when-linking.patch \
|
||||
file://0001-replace-off64_t-with-off_t.patch \
|
||||
${@bb.utils.contains('DISTRO_FEATURES','usrmerge','file://0001-drbd-utils-support-usrmerge.patch','',d)} \
|
||||
"
|
||||
SRC_URI:append:libc-musl = " file://0002-drbdadm-drop-use-of-GLOB_MAGCHAR-use-strchr-heuristi.patch "
|
||||
SRCREV_drbd-utils = "409097fe02187f83790b88ac3e0d94f3c167adab"
|
||||
SRCREV_drbd-headers = "9a0f151fa0085f57910a2dcbbd658d6069554f62"
|
||||
|
||||
SRCREV_FORMAT = "drbd-utils_drbd-headers"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
UPSTREAM_CHECK_URI = "https://github.com/LINBIT/drbd-utils/releases"
|
||||
|
||||
SYSTEMD_SERVICE:${PN} = "drbd.service"
|
||||
SYSTEMD_AUTO_ENABLE = "disable"
|
||||
|
||||
DEPENDS = "flex-native"
|
||||
|
||||
inherit autotools-brokensep systemd
|
||||
|
||||
EXTRA_OECONF = " \
|
||||
--with-initdir=/etc/init.d \
|
||||
--without-pacemaker \
|
||||
--without-rgmanager \
|
||||
--without-bashcompletion \
|
||||
--with-distro debian \
|
||||
--with-initscripttype=both \
|
||||
--with-systemdunitdir=${systemd_unitdir}/system \
|
||||
--without-manual \
|
||||
"
|
||||
|
||||
# If we have inherited reproducible_build, we want to use it.
|
||||
export WANT_DRBD_REPRODUCIBLE_BUILD = "yes"
|
||||
|
||||
do_install:append() {
|
||||
# don't install empty /var/lock and /var/run to avoid conflict with base-files
|
||||
rm -rf ${D}${localstatedir}/lock
|
||||
rm -rf ${D}${localstatedir}/run
|
||||
|
||||
sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-demote-or-escalate@.service
|
||||
sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-promote@.service
|
||||
sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd-wait-promotable@.service
|
||||
sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd.service
|
||||
sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/drbd@.service
|
||||
sed -i -e 's#@nonarch_libdir@#${nonarch_libdir}#g' ${D}${systemd_unitdir}/system/ocf.ra@.service
|
||||
}
|
||||
|
||||
RDEPENDS:${PN} += "bash perl-module-getopt-long perl-module-exporter perl-module-constant perl-module-overloading perl-module-exporter-heavy"
|
||||
|
||||
# The drbd items are explicitly put under /lib when installed.
|
||||
#
|
||||
FILES:${PN} += "/run"
|
||||
FILES:${PN} += "${nonarch_base_libdir}/drbd \
|
||||
${nonarch_libdir}/drbd \
|
||||
${nonarch_libdir}/tmpfiles.d \
|
||||
${nonarch_libdir}/drbdscripts/* \
|
||||
${systemd_unitdir}/system/* \
|
||||
"
|
||||
FILES:${PN}-dbg += "${nonarch_base_libdir}/drbd/.debug"
|
||||
|
||||
CLEANBROKEN = "1"
|
||||
@@ -0,0 +1,24 @@
|
||||
If CONFIG_BLK_DEV_DRBD kernel config is enabled, then DRBD
|
||||
does not build drbd.ko here. Under this circumstance do_install
|
||||
task is going to fail with a below error:
|
||||
-- snip --
|
||||
| install: cannot stat ‘drbd.ko’: No such file or directory
|
||||
| make[1]: *** [install] Error 1
|
||||
-- snip --
|
||||
|
||||
So, check for kernel module existence before installing.
|
||||
|
||||
Upstream-Status: Inappropriate [embedded specific]
|
||||
|
||||
Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
|
||||
--- drbd-9.0.1-1/drbd/Makefile 2016-07-03 06:54:19.421538690 -0700
|
||||
+++ drbd-9.0.1-1/drbd/Makefile_mod 2016-07-03 06:53:18.938801628 -0700
|
||||
@@ -158,7 +158,7 @@ else
|
||||
fi
|
||||
install -d $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR)
|
||||
set -e ; for ko in $(MODOBJS); do \
|
||||
- install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
|
||||
+ [ -e $$ko ] && install -m 644 $$ko $(DESTDIR)/lib/modules/$(KERNELRELEASE)/$(MODSUBDIR); \
|
||||
done
|
||||
ifeq ($(DESTDIR),/)
|
||||
ifeq ($(shell uname -r),$(KERNELRELEASE))
|
||||
@@ -0,0 +1,24 @@
|
||||
SUMMARY = "Distributed block device driver for Linux"
|
||||
DESCRIPTION = "DRBD is a block device which is designed to build high \
|
||||
availability clusters. This is done by mirroring a whole \
|
||||
block device via (a dedicated) network. You could see \
|
||||
it as a network raid-1."
|
||||
HOMEPAGE = "http://oss.linbit.com/drbd/"
|
||||
LICENSE = "GPL-2.0-only"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=5574c6965ae5f583e55880e397fbb018"
|
||||
DEPENDS = "virtual/kernel"
|
||||
|
||||
SRC_URI = "https://pkg.linbit.com//downloads/drbd/9/${BP}.tar.gz \
|
||||
file://check_existence_of_modules_before_installing.patch \
|
||||
"
|
||||
SRC_URI[sha256sum] = "f59ee795188f21d4a62c5319c371ebad65ab3fb9b55e5212c3f1dd558978a843"
|
||||
|
||||
inherit module
|
||||
|
||||
EXTRA_OEMAKE += "KDIR='${STAGING_KERNEL_DIR}' SPAAS=true"
|
||||
|
||||
do_install () {
|
||||
oe_runmake install DESTDIR="${D}"
|
||||
}
|
||||
|
||||
SKIP_RECIPE[drbd] ?= "Needs coccinelle to build with SPAAS"
|
||||
Reference in New Issue
Block a user