aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-extended
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2020-03-03 13:06:31 -0800
committerKhem Raj <raj.khem@gmail.com>2020-03-03 13:10:33 -0800
commit71e00725fc7d7b470ed8e996fe361951dd1086d2 (patch)
tree6f92bdb75362a75bde39b38784a52ee21295ccaf /meta-networking/recipes-extended
parent6f1e04c396cfe01c008803086c00323ac7e1f59b (diff)
downloadmeta-openembedded-71e00725fc7d7b470ed8e996fe361951dd1086d2.tar.gz
dlm: Fix host-user-contaminated QA errors
- Drop unused 0001-dlm-fix-package-qa-error.patch - Merge appends into main task - remove explicitly mentioning systemd in deps, systemd bbclass will add it - Add a patch to fix install using cp cmd to preserve file permissions Fixes dlm: /usr/lib/libdlmcontrol.so.3 is owned by uid 1000, which is the same as the user running bitbake. This may be due to host contamination [host-user-contaminated] Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-networking/recipes-extended')
-rw-r--r--meta-networking/recipes-extended/dlm/dlm/0001-dlm-fix-package-qa-error.patch32
-rw-r--r--meta-networking/recipes-extended/dlm/dlm/0001-make-Replace-cp-a-with-mode-preserving-options.patch51
-rw-r--r--meta-networking/recipes-extended/dlm/dlm_4.0.9.bb24
3 files changed, 59 insertions, 48 deletions
diff --git a/meta-networking/recipes-extended/dlm/dlm/0001-dlm-fix-package-qa-error.patch b/meta-networking/recipes-extended/dlm/dlm/0001-dlm-fix-package-qa-error.patch
deleted file mode 100644
index 3e384f7d97..0000000000
--- a/meta-networking/recipes-extended/dlm/dlm/0001-dlm-fix-package-qa-error.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 1fb68433bde97d571fc781b52c9521b17fbb8df0 Mon Sep 17 00:00:00 2001
-From: Changqing Li <changqing.li@windriver.com>
-Date: Tue, 24 Jul 2018 17:42:43 +0800
-Subject: [PATCH] dlm: fix package qa error
-
-pass LDFLAG to makefile to fix below error:
-do_package_qa: QA Issue: No GNU_HASH in the elf binary:
-/packages-split/dlm/usr/sbin/dlm_stonith' [ldflags]
-
-Upstream-Status: Inappropriate[oe-specific]
-
-Signed-off-by: Changqing Li <changqing.li@windriver.com>
----
- fence/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/fence/Makefile b/fence/Makefile
-index cca0b2c..2b3963c 100644
---- a/fence/Makefile
-+++ b/fence/Makefile
-@@ -33,7 +33,7 @@ BIN_CFLAGS += -fPIE -DPIE
- BIN_CFLAGS += `pkg-config libxml-2.0 --cflags`
- BIN_CFLAGS += -I../include
-
--BIN_LDFLAGS += -Wl,-z,now -Wl,-z,relro -pie
-+BIN_LDFLAGS += $(LDFLAGS) -Wl,-z,now -Wl,-z,relro -pie
- BIN_LDFLAGS += `pkg-config libxml-2.0 --libs`
- BIN_LDFLAGS += -ldl
-
---
-2.7.4
-
diff --git a/meta-networking/recipes-extended/dlm/dlm/0001-make-Replace-cp-a-with-mode-preserving-options.patch b/meta-networking/recipes-extended/dlm/dlm/0001-make-Replace-cp-a-with-mode-preserving-options.patch
new file mode 100644
index 0000000000..e6a37579ed
--- /dev/null
+++ b/meta-networking/recipes-extended/dlm/dlm/0001-make-Replace-cp-a-with-mode-preserving-options.patch
@@ -0,0 +1,51 @@
+From 2f72f9271b8dd61ca5092e025b0f8243c6fd68f2 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 3 Mar 2020 12:38:19 -0800
+Subject: [PATCH] make: Replace cp -a with mode preserving options
+
+Helps fix permissions in staging area
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ dlm_controld/Makefile | 4 ++--
+ libdlm/Makefile | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/dlm_controld/Makefile b/dlm_controld/Makefile
+index 6081cf8..fe71be2 100644
+--- a/dlm_controld/Makefile
++++ b/dlm_controld/Makefile
+@@ -88,8 +88,8 @@ install: all
+ $(INSTALL) -d $(DESTDIR)/$(PKGDIR)
+ $(INSTALL) -m 755 $(BIN_TARGET) $(DESTDIR)/$(BINDIR)
+ $(INSTALL) -m 755 $(LIB_TARGET) $(DESTDIR)/$(LIBDIR)
+- cp -a $(LIB_SO) $(DESTDIR)/$(LIBDIR)
+- cp -a $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR)
++ cp -R --no-dereference --preserve=mode,links $(LIB_SO) $(DESTDIR)/$(LIBDIR)
++ cp -R --no-dereference --preserve=mode,links $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR)
+ $(INSTALL) -m 644 $(LIB_PC) $(DESTDIR)/$(PKGDIR)
+ $(INSTALL) -m 644 libdlmcontrol.h $(DESTDIR)/$(HDRDIR)
+ $(INSTALL) -m 644 dlm_controld.8 $(DESTDIR)/$(MANDIR)/man8/
+diff --git a/libdlm/Makefile b/libdlm/Makefile
+index ab32761..8820bf8 100644
+--- a/libdlm/Makefile
++++ b/libdlm/Makefile
+@@ -125,10 +125,10 @@ install: all
+ $(INSTALL) -d $(DESTDIR)/$(UDEVDIR)
+ $(INSTALL) -c -m 755 $(LIB_TARGET) $(DESTDIR)/$(LIBDIR)
+ $(INSTALL) -c -m 755 $(LLT_TARGET) $(DESTDIR)/$(LIBDIR)
+- cp -a $(LIB_SO) $(DESTDIR)/$(LIBDIR)
+- cp -a $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR)
+- cp -a $(LLT_SO) $(DESTDIR)/$(LIBDIR)
+- cp -a $(LLT_SMAJOR) $(DESTDIR)/$(LIBDIR)
++ cp -R --no-dereference --preserve=mode,links $(LIB_SO) $(DESTDIR)/$(LIBDIR)
++ cp -R --no-dereference --preserve=mode,links $(LIB_SMAJOR) $(DESTDIR)/$(LIBDIR)
++ cp -R --no-dereference --preserve=mode,links $(LLT_SO) $(DESTDIR)/$(LIBDIR)
++ cp -R --no-dereference --preserve=mode,links $(LLT_SMAJOR) $(DESTDIR)/$(LIBDIR)
+ $(INSTALL) -m 644 $(LIB_PC) $(DESTDIR)/$(PKGDIR)
+ $(INSTALL) -m 644 $(LLT_PC) $(DESTDIR)/$(PKGDIR)
+ $(INSTALL) -c -m 644 $(HDR_TARGET) $(DESTDIR)/$(HDRDIR)
+--
+2.25.1
+
diff --git a/meta-networking/recipes-extended/dlm/dlm_4.0.9.bb b/meta-networking/recipes-extended/dlm/dlm_4.0.9.bb
index 4bf9944aad..577db7087f 100644
--- a/meta-networking/recipes-extended/dlm/dlm_4.0.9.bb
+++ b/meta-networking/recipes-extended/dlm/dlm_4.0.9.bb
@@ -8,6 +8,7 @@ REQUIRED_DISTRO_FEATURES = "systemd"
SRC_URI = "https://pagure.io/dlm/archive/dlm-${PV}/dlm-dlm-${PV}.tar.gz \
file://0001-dlm-fix-compile-error-since-xml2-config-should-not-b.patch \
file://0001-Include-sys-sysmacros.h-for-major-minor-macros-in-gl.patch \
+ file://0001-make-Replace-cp-a-with-mode-preserving-options.patch \
"
SRC_URI[md5sum] = "4c57a941a15547859cd38fd55f66388e"
@@ -21,7 +22,7 @@ LIC_FILES_CHKSUM = "file://README.license;md5=8f0bbcdd678df1bce9863492b6c8832d"
S = "${WORKDIR}/dlm-dlm-${PV}"
-DEPENDS = "corosync systemd"
+DEPENDS += "corosync"
inherit pkgconfig systemd features_check
@@ -40,29 +41,20 @@ do_compile_prepend_toolchain-clang() {
sed -i -e "s/-fstack-clash-protection//g" ${S}/*/Makefile
}
-do_compile_prepend() {
+do_compile() {
sed -i "s/libsystemd-daemon/libsystemd/g" ${S}/dlm_controld/Makefile
sed -i -e "s/ ${DONTBUILD}//g" ${S}/Makefile
-}
-
-do_compile () {
oe_runmake 'CC=${CC}'
}
-do_install_append (){
- install -d ${D}${sysconfdir}/sysconfig/
- install -d ${D}${sysconfdir}/init.d/
- install -m 0644 ${S}/init/dlm.sysconfig ${D}${sysconfdir}/sysconfig/dlm
- install -m 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm
+do_install() {
+ oe_runmake install DESTDIR=${D} LIBDIR=${libdir}
+ install -Dm 0644 ${S}/init/dlm.sysconfig ${D}${sysconfdir}/sysconfig/dlm
+ install -Dm 0644 ${S}/init/dlm.init ${D}${sysconfdir}/init.d/dlm
# install systemd unit files
if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
- install -d ${D}${systemd_unitdir}/system
- install -m 0644 ${S}/init/dlm.service ${D}${systemd_unitdir}/system
+ install -Dm 0644 ${S}/init/dlm.service ${D}${systemd_unitdir}/system/dlm.service
fi
}
-do_install() {
- oe_runmake install DESTDIR=${D} LIBDIR=${libdir}
-}
-